From 06d78702c355d2ab30929a214f668a19b78c2690 Mon Sep 17 00:00:00 2001 From: Uri Goldshtein Date: Sat, 2 Jan 2016 14:38:27 +0200 Subject: [PATCH] Release 1.3.3 With new angular-babel dependency fixes #1015 --- dist/BUNDLE.md | 2 +- dist/angular-meteor.bundle.js | 844 +++++++++++-------------- dist/angular-meteor.bundle.min.js | 14 +- packages/angular-with-blaze/.versions | 2 +- packages/angular-with-blaze/package.js | 2 +- packages/angular/.versions | 4 +- packages/angular/package.js | 4 +- packages/urigo-angular/.versions | 6 +- packages/urigo-angular/package.js | 6 +- 9 files changed, 400 insertions(+), 484 deletions(-) diff --git a/dist/BUNDLE.md b/dist/BUNDLE.md index 67bd4df5a..e366b1320 100644 --- a/dist/BUNDLE.md +++ b/dist/BUNDLE.md @@ -1,5 +1,5 @@ ## How to create bundle and minfied files -Run `./bundle-min.sh` from the `.dist` folder. +Run `./bundle-min.sh` from the root folder. It will create `angular-meteor.bundle.js` and `angular-meteor.bundle.min.js` files in the dist folder. diff --git a/dist/angular-meteor.bundle.js b/dist/angular-meteor.bundle.js index 44a780617..d20cf0ddb 100644 --- a/dist/angular-meteor.bundle.js +++ b/dist/angular-meteor.bundle.js @@ -20,14 +20,6 @@ var EJSON, EJSONTest; (function(){ -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/ejson/packages/ejson.js // -// // -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -(function(){ // 1 - // 2 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // packages/ejson/ejson.js // @@ -552,16 +544,16 @@ EJSON.clone = function (v) { EJSON.newBinary = Base64.newBinary; // 516 // 517 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // 527 -}).call(this); // 528 - // 529 - // 530 - // 531 - // 532 - // 533 - // 534 -(function(){ // 535 - // 536 + +}).call(this); + + + + + + +(function(){ + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // packages/ejson/stringify.js // @@ -688,10 +680,6 @@ EJSON._canonicalStringify = function (value, options) { }; // 118 // 119 /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // 663 -}).call(this); // 664 - // 665 -/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -727,29 +715,21 @@ var MongoID; (function(){ -////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/mongo-id/packages/mongo-id.js // -// // -////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -(function(){ // 1 - // 2 -//////////////////////////////////////////////////////////////////////////////////////////////////////// // 3 -// // // 4 -// packages/mongo-id/id.js // // 5 -// // // 6 -//////////////////////////////////////////////////////////////////////////////////////////////////////// // 7 - // // 8 -MongoID = {}; // 1 // 9 - // 2 // 10 -MongoID._looksLikeObjectID = function (str) { // 3 // 11 - return str.length === 24 && str.match(/^[0-9a-f]*$/); // 4 // 12 -}; // 5 // 13 - // 6 // 14 -MongoID.ObjectID = function (hexString) { // 7 // 15 - //random-based impl of Mongo ObjectID // 8 // 16 - var self = this; // 9 // 17 +//////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/mongo-id/id.js // +// // +//////////////////////////////////////////////////////////////////////////////////////////////////////// + // +MongoID = {}; // 1 + // 2 +MongoID._looksLikeObjectID = function (str) { // 3 + return str.length === 24 && str.match(/^[0-9a-f]*$/); // 4 +}; // 5 + // 6 +MongoID.ObjectID = function (hexString) { // 7 + //random-based impl of Mongo ObjectID // 8 + var self = this; // 9 if (hexString) { // 10 hexString = hexString.toLowerCase(); // 11 if (!MongoID._looksLikeObjectID(hexString)) { // 12 @@ -805,7 +785,7 @@ MongoID.idStringify = function (id) { } else if (id.substr(0, 1) === "-" || // escape previously dashed strings // 62 id.substr(0, 1) === "~" || // escape escaped numbers, true, false // 63 MongoID._looksLikeObjectID(id) || // escape object-id-form strings // 64 - id.substr(0, 1) === '{') { // escape object-form strings, for maybe implementing later // 73 + id.substr(0, 1) === '{') { // escape object-form strings, for maybe implementing later return "-" + id; // 66 } else { // 67 return id; // other strings go through unchanged. // 68 @@ -837,11 +817,7 @@ MongoID.idParse = function (id) { }; // 94 // 95 // 96 -//////////////////////////////////////////////////////////////////////////////////////////////////////// // 105 - // 106 -}).call(this); // 107 - // 108 -////////////////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -875,119 +851,111 @@ var DiffSequence; (function(){ -//////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/diff-sequence/packages/diff-sequence.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////// - // -(function(){ // 1 - // 2 -///////////////////////////////////////////////////////////////////////////////////// // 3 -// // // 4 -// packages/diff-sequence/diff.js // // 5 -// // // 6 -///////////////////////////////////////////////////////////////////////////////////// // 7 - // // 8 -DiffSequence = {}; // 1 // 9 - // 2 // 10 -// ordered: bool. // 3 // 11 -// old_results and new_results: collections of documents. // 4 // 12 -// if ordered, they are arrays. // 5 // 13 -// if unordered, they are IdMaps // 6 // 14 -DiffSequence.diffQueryChanges = function (ordered, oldResults, newResults, // 7 // 15 - observer, options) { // 8 // 16 - if (ordered) // 9 // 17 - DiffSequence.diffQueryOrderedChanges( // 10 // 18 - oldResults, newResults, observer, options); // 11 // 19 - else // 12 // 20 - DiffSequence.diffQueryUnorderedChanges( // 13 // 21 - oldResults, newResults, observer, options); // 14 // 22 -}; // 15 // 23 - // 16 // 24 -DiffSequence.diffQueryUnorderedChanges = function (oldResults, newResults, // 17 // 25 - observer, options) { // 18 // 26 - options = options || {}; // 19 // 27 - var projectionFn = options.projectionFn || EJSON.clone; // 20 // 28 - // 21 // 29 - if (observer.movedBefore) { // 22 // 30 - throw new Error("_diffQueryUnordered called with a movedBefore observer!"); // 23 // 31 - } // 24 // 32 - // 25 // 33 - newResults.forEach(function (newDoc, id) { // 26 // 34 - var oldDoc = oldResults.get(id); // 27 // 35 - if (oldDoc) { // 28 // 36 - if (observer.changed && !EJSON.equals(oldDoc, newDoc)) { // 29 // 37 - var projectedNew = projectionFn(newDoc); // 30 // 38 - var projectedOld = projectionFn(oldDoc); // 31 // 39 - var changedFields = // 32 // 40 - DiffSequence.makeChangedFields(projectedNew, projectedOld); // 33 // 41 - if (! _.isEmpty(changedFields)) { // 34 // 42 - observer.changed(id, changedFields); // 35 // 43 - } // 36 // 44 - } // 37 // 45 - } else if (observer.added) { // 38 // 46 - var fields = projectionFn(newDoc); // 39 // 47 - delete fields._id; // 40 // 48 - observer.added(newDoc._id, fields); // 41 // 49 - } // 42 // 50 - }); // 43 // 51 - // 44 // 52 - if (observer.removed) { // 45 // 53 - oldResults.forEach(function (oldDoc, id) { // 46 // 54 - if (!newResults.has(id)) // 47 // 55 - observer.removed(id); // 48 // 56 - }); // 49 // 57 - } // 50 // 58 -}; // 51 // 59 - // 52 // 60 - // 53 // 61 -DiffSequence.diffQueryOrderedChanges = function (old_results, new_results, // 54 // 62 - observer, options) { // 55 // 63 - options = options || {}; // 56 // 64 - var projectionFn = options.projectionFn || EJSON.clone; // 57 // 65 - // 58 // 66 - var new_presence_of_id = {}; // 59 // 67 - _.each(new_results, function (doc) { // 60 // 68 - if (new_presence_of_id[doc._id]) // 61 // 69 - Meteor._debug("Duplicate _id in new_results"); // 62 // 70 - new_presence_of_id[doc._id] = true; // 63 // 71 - }); // 64 // 72 - // 65 // 73 - var old_index_of_id = {}; // 66 // 74 - _.each(old_results, function (doc, i) { // 67 // 75 - if (doc._id in old_index_of_id) // 68 // 76 - Meteor._debug("Duplicate _id in old_results"); // 69 // 77 - old_index_of_id[doc._id] = i; // 70 // 78 - }); // 71 // 79 - // 72 // 80 - // ALGORITHM: // 73 // 81 - // // 74 // 82 - // To determine which docs should be considered "moved" (and which // 75 // 83 - // merely change position because of other docs moving) we run // 76 // 84 - // a "longest common subsequence" (LCS) algorithm. The LCS of the // 77 // 85 - // old doc IDs and the new doc IDs gives the docs that should NOT be // 78 // 86 - // considered moved. // 79 // 87 - // 80 // 88 - // To actually call the appropriate callbacks to get from the old state to the // 81 // 89 - // new state: // 82 // 90 - // 83 // 91 - // First, we call removed() on all the items that only appear in the old // 84 // 92 - // state. // 85 // 93 - // 86 // 94 - // Then, once we have the items that should not move, we walk through the new // 87 // 95 - // results array group-by-group, where a "group" is a set of items that have // 88 // 96 - // moved, anchored on the end by an item that should not move. One by one, we // 89 // 97 - // move each of those elements into place "before" the anchoring end-of-group // 90 // 98 - // item, and fire changed events on them if necessary. Then we fire a changed // 91 // 99 - // event on the anchor, and move on to the next group. There is always at // 92 // 100 - // least one group; the last group is anchored by a virtual "null" id at the // 93 // 101 - // end. // 94 // 102 - // 95 // 103 - // Asymptotically: O(N k) where k is number of ops, or potentially // 96 // 104 - // O(N log N) if inner loop of LCS were made to be binary search. // 97 // 105 - // 98 // 106 - // 99 // 107 +///////////////////////////////////////////////////////////////////////////////////// +// // +// packages/diff-sequence/diff.js // +// // +///////////////////////////////////////////////////////////////////////////////////// + // +DiffSequence = {}; // 1 + // 2 +// ordered: bool. // 3 +// old_results and new_results: collections of documents. // 4 +// if ordered, they are arrays. // 5 +// if unordered, they are IdMaps // 6 +DiffSequence.diffQueryChanges = function (ordered, oldResults, newResults, // 7 + observer, options) { // 8 + if (ordered) // 9 + DiffSequence.diffQueryOrderedChanges( // 10 + oldResults, newResults, observer, options); // 11 + else // 12 + DiffSequence.diffQueryUnorderedChanges( // 13 + oldResults, newResults, observer, options); // 14 +}; // 15 + // 16 +DiffSequence.diffQueryUnorderedChanges = function (oldResults, newResults, // 17 + observer, options) { // 18 + options = options || {}; // 19 + var projectionFn = options.projectionFn || EJSON.clone; // 20 + // 21 + if (observer.movedBefore) { // 22 + throw new Error("_diffQueryUnordered called with a movedBefore observer!"); // 23 + } // 24 + // 25 + newResults.forEach(function (newDoc, id) { // 26 + var oldDoc = oldResults.get(id); // 27 + if (oldDoc) { // 28 + if (observer.changed && !EJSON.equals(oldDoc, newDoc)) { // 29 + var projectedNew = projectionFn(newDoc); // 30 + var projectedOld = projectionFn(oldDoc); // 31 + var changedFields = // 32 + DiffSequence.makeChangedFields(projectedNew, projectedOld); // 33 + if (! _.isEmpty(changedFields)) { // 34 + observer.changed(id, changedFields); // 35 + } // 36 + } // 37 + } else if (observer.added) { // 38 + var fields = projectionFn(newDoc); // 39 + delete fields._id; // 40 + observer.added(newDoc._id, fields); // 41 + } // 42 + }); // 43 + // 44 + if (observer.removed) { // 45 + oldResults.forEach(function (oldDoc, id) { // 46 + if (!newResults.has(id)) // 47 + observer.removed(id); // 48 + }); // 49 + } // 50 +}; // 51 + // 52 + // 53 +DiffSequence.diffQueryOrderedChanges = function (old_results, new_results, // 54 + observer, options) { // 55 + options = options || {}; // 56 + var projectionFn = options.projectionFn || EJSON.clone; // 57 + // 58 + var new_presence_of_id = {}; // 59 + _.each(new_results, function (doc) { // 60 + if (new_presence_of_id[doc._id]) // 61 + Meteor._debug("Duplicate _id in new_results"); // 62 + new_presence_of_id[doc._id] = true; // 63 + }); // 64 + // 65 + var old_index_of_id = {}; // 66 + _.each(old_results, function (doc, i) { // 67 + if (doc._id in old_index_of_id) // 68 + Meteor._debug("Duplicate _id in old_results"); // 69 + old_index_of_id[doc._id] = i; // 70 + }); // 71 + // 72 + // ALGORITHM: // 73 + // // 74 + // To determine which docs should be considered "moved" (and which // 75 + // merely change position because of other docs moving) we run // 76 + // a "longest common subsequence" (LCS) algorithm. The LCS of the // 77 + // old doc IDs and the new doc IDs gives the docs that should NOT be // 78 + // considered moved. // 79 + // 80 + // To actually call the appropriate callbacks to get from the old state to the // 81 + // new state: // 82 + // 83 + // First, we call removed() on all the items that only appear in the old // 84 + // state. // 85 + // 86 + // Then, once we have the items that should not move, we walk through the new // 87 + // results array group-by-group, where a "group" is a set of items that have // 88 + // moved, anchored on the end by an item that should not move. One by one, we // 89 + // move each of those elements into place "before" the anchoring end-of-group // 90 + // item, and fire changed events on them if necessary. Then we fire a changed // 91 + // event on the anchor, and move on to the next group. There is always at // 92 + // least one group; the last group is anchored by a virtual "null" id at the // 93 + // end. // 94 + // 95 + // Asymptotically: O(N k) where k is number of ops, or potentially // 96 + // O(N log N) if inner loop of LCS were made to be binary search. // 97 + // 98 + // 99 //////// LCS (longest common sequence, with respect to _id) // 100 // (see Wikipedia article on Longest Increasing Subsequence, // 101 // where the LIS is taken of the sequence of old indices of the // 102 @@ -1061,7 +1029,7 @@ DiffSequence.diffQueryOrderedChanges = function (old_results, new_results, if (!_.has(old_index_of_id, newDoc._id)) { // 170 fields = projectionFn(newDoc); // 171 delete fields._id; // 172 - observer.addedBefore && observer.addedBefore(newDoc._id, fields, groupId); // 181 + observer.addedBefore && observer.addedBefore(newDoc._id, fields, groupId); observer.added && observer.added(newDoc._id, fields); // 174 } else { // 175 // moved // 176 @@ -1141,11 +1109,7 @@ DiffSequence.applyChanges = function (doc, changeFields) { }; // 250 // 251 // 252 -///////////////////////////////////////////////////////////////////////////////////// // 261 - // 262 -}).call(this); // 263 - // 264 -//////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -1183,119 +1147,111 @@ var ObserveSequence, seqChangedToEmpty, seqChangedToArray, seqChangedToCursor; (function(){ -////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/observe-sequence/packages/observe-sequence.js // -// // -////////////////////////////////////////////////////////////////////////////////////////// - // -(function(){ // 1 - // 2 -/////////////////////////////////////////////////////////////////////////////////// // 3 -// // // 4 -// packages/observe-sequence/observe_sequence.js // // 5 -// // // 6 -/////////////////////////////////////////////////////////////////////////////////// // 7 - // // 8 -var warn = function () { // 1 // 9 - if (ObserveSequence._suppressWarnings) { // 2 // 10 - ObserveSequence._suppressWarnings--; // 3 // 11 - } else { // 4 // 12 - if (typeof console !== 'undefined' && console.warn) // 5 // 13 - console.warn.apply(console, arguments); // 6 // 14 - // 7 // 15 - ObserveSequence._loggedWarnings++; // 8 // 16 - } // 9 // 17 -}; // 10 // 18 - // 11 // 19 -var idStringify = MongoID.idStringify; // 12 // 20 -var idParse = MongoID.idParse; // 13 // 21 - // 14 // 22 -ObserveSequence = { // 15 // 23 - _suppressWarnings: 0, // 16 // 24 - _loggedWarnings: 0, // 17 // 25 - // 18 // 26 - // A mechanism similar to cursor.observe which receives a reactive // 19 // 27 - // function returning a sequence type and firing appropriate callbacks // 20 // 28 - // when the value changes. // 21 // 29 - // // 22 // 30 - // @param sequenceFunc {Function} a reactive function returning a // 23 // 31 - // sequence type. The currently supported sequence types are: // 24 // 32 - // Array, Cursor, and null. // 25 // 33 - // // 26 // 34 - // @param callbacks {Object} similar to a specific subset of // 27 // 35 - // callbacks passed to `cursor.observe` // 28 // 36 - // (http://docs.meteor.com/#observe), with minor variations to // 29 // 37 - // support the fact that not all sequences contain objects with // 30 // 38 - // _id fields. Specifically: // 31 // 39 - // // 32 // 40 - // * addedAt(id, item, atIndex, beforeId) // 33 // 41 - // * changedAt(id, newItem, oldItem, atIndex) // 34 // 42 - // * removedAt(id, oldItem, atIndex) // 35 // 43 - // * movedTo(id, item, fromIndex, toIndex, beforeId) // 36 // 44 - // // 37 // 45 - // @returns {Object(stop: Function)} call 'stop' on the return value // 38 // 46 - // to stop observing this sequence function. // 39 // 47 - // // 40 // 48 - // We don't make any assumptions about our ability to compare sequence // 41 // 49 - // elements (ie, we don't assume EJSON.equals works; maybe there is extra // 42 // 50 - // state/random methods on the objects) so unlike cursor.observe, we may // 43 // 51 - // sometimes call changedAt() when nothing actually changed. // 44 // 52 - // XXX consider if we *can* make the stronger assumption and avoid // 45 // 53 - // no-op changedAt calls (in some cases?) // 46 // 54 - // // 47 // 55 - // XXX currently only supports the callbacks used by our // 48 // 56 - // implementation of {{#each}}, but this can be expanded. // 49 // 57 - // // 50 // 58 - // XXX #each doesn't use the indices (though we'll eventually need // 51 // 59 - // a way to get them when we support `@index`), but calling // 52 // 60 - // `cursor.observe` causes the index to be calculated on every // 53 // 61 - // callback using a linear scan (unless you turn it off by passing // 54 // 62 - // `_no_indices`). Any way to avoid calculating indices on a pure // 55 // 63 - // cursor observe like we used to? // 56 // 64 - observe: function (sequenceFunc, callbacks) { // 57 // 65 - var lastSeq = null; // 58 // 66 - var activeObserveHandle = null; // 59 // 67 - // 60 // 68 - // 'lastSeqArray' contains the previous value of the sequence // 61 // 69 - // we're observing. It is an array of objects with '_id' and // 62 // 70 - // 'item' fields. 'item' is the element in the array, or the // 63 // 71 - // document in the cursor. // 64 // 72 - // // 65 // 73 - // '_id' is whichever of the following is relevant, unless it has // 66 // 74 - // already appeared -- in which case it's randomly generated. // 67 // 75 - // // 68 // 76 - // * if 'item' is an object: // 69 // 77 - // * an '_id' field, if present // 70 // 78 - // * otherwise, the index in the array // 71 // 79 - // // 72 // 80 - // * if 'item' is a number or string, use that value // 73 // 81 - // // 74 // 82 - // XXX this can be generalized by allowing {{#each}} to accept a // 75 // 83 - // general 'key' argument which could be a function, a dotted // 76 // 84 - // field name, or the special @index value. // 77 // 85 - var lastSeqArray = []; // elements are objects of form {_id, item} // 78 // 86 - var computation = Tracker.autorun(function () { // 79 // 87 - var seq = sequenceFunc(); // 80 // 88 - // 81 // 89 - Tracker.nonreactive(function () { // 82 // 90 - var seqArray; // same structure as `lastSeqArray` above. // 83 // 91 - // 84 // 92 - if (activeObserveHandle) { // 85 // 93 - // If we were previously observing a cursor, replace lastSeqArray with // 94 - // more up-to-date information. Then stop the old observe. // 87 // 95 - lastSeqArray = _.map(lastSeq.fetch(), function (doc) { // 88 // 96 - return {_id: doc._id, item: doc}; // 89 // 97 - }); // 90 // 98 - activeObserveHandle.stop(); // 91 // 99 - activeObserveHandle = null; // 92 // 100 - } // 93 // 101 - // 94 // 102 - if (!seq) { // 95 // 103 - seqArray = seqChangedToEmpty(lastSeqArray, callbacks); // 96 // 104 - } else if (seq instanceof Array) { // 97 // 105 - seqArray = seqChangedToArray(lastSeqArray, seq, callbacks); // 98 // 106 - } else if (isStoreCursor(seq)) { // 99 // 107 +/////////////////////////////////////////////////////////////////////////////////// +// // +// packages/observe-sequence/observe_sequence.js // +// // +/////////////////////////////////////////////////////////////////////////////////// + // +var warn = function () { // 1 + if (ObserveSequence._suppressWarnings) { // 2 + ObserveSequence._suppressWarnings--; // 3 + } else { // 4 + if (typeof console !== 'undefined' && console.warn) // 5 + console.warn.apply(console, arguments); // 6 + // 7 + ObserveSequence._loggedWarnings++; // 8 + } // 9 +}; // 10 + // 11 +var idStringify = MongoID.idStringify; // 12 +var idParse = MongoID.idParse; // 13 + // 14 +ObserveSequence = { // 15 + _suppressWarnings: 0, // 16 + _loggedWarnings: 0, // 17 + // 18 + // A mechanism similar to cursor.observe which receives a reactive // 19 + // function returning a sequence type and firing appropriate callbacks // 20 + // when the value changes. // 21 + // // 22 + // @param sequenceFunc {Function} a reactive function returning a // 23 + // sequence type. The currently supported sequence types are: // 24 + // Array, Cursor, and null. // 25 + // // 26 + // @param callbacks {Object} similar to a specific subset of // 27 + // callbacks passed to `cursor.observe` // 28 + // (http://docs.meteor.com/#observe), with minor variations to // 29 + // support the fact that not all sequences contain objects with // 30 + // _id fields. Specifically: // 31 + // // 32 + // * addedAt(id, item, atIndex, beforeId) // 33 + // * changedAt(id, newItem, oldItem, atIndex) // 34 + // * removedAt(id, oldItem, atIndex) // 35 + // * movedTo(id, item, fromIndex, toIndex, beforeId) // 36 + // // 37 + // @returns {Object(stop: Function)} call 'stop' on the return value // 38 + // to stop observing this sequence function. // 39 + // // 40 + // We don't make any assumptions about our ability to compare sequence // 41 + // elements (ie, we don't assume EJSON.equals works; maybe there is extra // 42 + // state/random methods on the objects) so unlike cursor.observe, we may // 43 + // sometimes call changedAt() when nothing actually changed. // 44 + // XXX consider if we *can* make the stronger assumption and avoid // 45 + // no-op changedAt calls (in some cases?) // 46 + // // 47 + // XXX currently only supports the callbacks used by our // 48 + // implementation of {{#each}}, but this can be expanded. // 49 + // // 50 + // XXX #each doesn't use the indices (though we'll eventually need // 51 + // a way to get them when we support `@index`), but calling // 52 + // `cursor.observe` causes the index to be calculated on every // 53 + // callback using a linear scan (unless you turn it off by passing // 54 + // `_no_indices`). Any way to avoid calculating indices on a pure // 55 + // cursor observe like we used to? // 56 + observe: function (sequenceFunc, callbacks) { // 57 + var lastSeq = null; // 58 + var activeObserveHandle = null; // 59 + // 60 + // 'lastSeqArray' contains the previous value of the sequence // 61 + // we're observing. It is an array of objects with '_id' and // 62 + // 'item' fields. 'item' is the element in the array, or the // 63 + // document in the cursor. // 64 + // // 65 + // '_id' is whichever of the following is relevant, unless it has // 66 + // already appeared -- in which case it's randomly generated. // 67 + // // 68 + // * if 'item' is an object: // 69 + // * an '_id' field, if present // 70 + // * otherwise, the index in the array // 71 + // // 72 + // * if 'item' is a number or string, use that value // 73 + // // 74 + // XXX this can be generalized by allowing {{#each}} to accept a // 75 + // general 'key' argument which could be a function, a dotted // 76 + // field name, or the special @index value. // 77 + var lastSeqArray = []; // elements are objects of form {_id, item} // 78 + var computation = Tracker.autorun(function () { // 79 + var seq = sequenceFunc(); // 80 + // 81 + Tracker.nonreactive(function () { // 82 + var seqArray; // same structure as `lastSeqArray` above. // 83 + // 84 + if (activeObserveHandle) { // 85 + // If we were previously observing a cursor, replace lastSeqArray with + // more up-to-date information. Then stop the old observe. // 87 + lastSeqArray = _.map(lastSeq.fetch(), function (doc) { // 88 + return {_id: doc._id, item: doc}; // 89 + }); // 90 + activeObserveHandle.stop(); // 91 + activeObserveHandle = null; // 92 + } // 93 + // 94 + if (!seq) { // 95 + seqArray = seqChangedToEmpty(lastSeqArray, callbacks); // 96 + } else if (seq instanceof Array) { // 97 + seqArray = seqChangedToArray(lastSeqArray, seq, callbacks); // 98 + } else if (isStoreCursor(seq)) { // 99 var result /* [seqArray, activeObserveHandle] */ = // 100 seqChangedToCursor(lastSeqArray, seq, callbacks); // 101 seqArray = result[0]; // 102 @@ -1418,7 +1374,7 @@ var diffArray = function (lastSeqArray, seqArray, callbacks) { // There are two cases: // 219 // 1. The element is moved forward. Then all the positions in between // 220 // are moved back. // 221 - // 2. The element is moved back. Then the positions in between *and* the // 230 + // 2. The element is moved back. Then the positions in between *and* the // element that is currently standing on the moved element's future // 223 // position are moved forward. // 224 _.each(posCur, function (elCurPosition, id) { // 225 @@ -1545,11 +1501,7 @@ seqChangedToCursor = function (lastSeqArray, cursor, callbacks) { return [seqArray, observeHandle]; // 346 }; // 347 // 348 -/////////////////////////////////////////////////////////////////////////////////// // 357 - // 358 -}).call(this); // 359 - // 360 -////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -1608,119 +1560,111 @@ var babelHelpers; (function(){ -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/babel-runtime/packages/babel-runtime.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -(function(){ // 1 - // 2 -///////////////////////////////////////////////////////////////////////////////////////////////////////////// // 3 -// // // 4 -// packages/babel-runtime/babel-runtime.js // // 5 -// // // 6 -///////////////////////////////////////////////////////////////////////////////////////////////////////////// // 7 - // // 8 -var hasOwn = Object.prototype.hasOwnProperty; // 1 // 9 - // 2 // 10 -function canDefineNonEnumerableProperties() { // 3 // 11 - var testObj = {}; // 4 // 12 - var testPropName = "t"; // 5 // 13 - // 6 // 14 - try { // 7 // 15 - Object.defineProperty(testObj, testPropName, { // 8 // 16 - enumerable: false, // 9 // 17 - value: testObj // 10 // 18 - }); // 11 // 19 - // 12 // 20 - for (var k in testObj) { // 13 // 21 - if (k === testPropName) { // 14 // 22 - return false; // 15 // 23 - } // 16 // 24 - } // 17 // 25 - } catch (e) { // 18 // 26 - return false; // 19 // 27 - } // 20 // 28 - // 21 // 29 - return testObj[testPropName] === testObj; // 22 // 30 -} // 23 // 31 - // 24 // 32 -// The name `babelHelpers` is hard-coded in Babel. Otherwise we would make it // 25 // 33 -// something capitalized and more descriptive, like `BabelRuntime`. // 26 // 34 -babelHelpers = { // 27 // 35 - // Meteor-specific runtime helper for wrapping the object of for-in // 28 // 36 - // loops, so that inherited Array methods defined by es5-shim can be // 29 // 37 - // ignored in browsers where they cannot be defined as non-enumerable. // 30 // 38 - sanitizeForInObject: canDefineNonEnumerableProperties() // 31 // 39 - ? function (value) { return value; } // 32 // 40 - : function (obj) { // 33 // 41 - if (Array.isArray(obj)) { // 34 // 42 - var newObj = {}; // 35 // 43 - var keys = Object.keys(obj); // 36 // 44 - var keyCount = keys.length; // 37 // 45 - for (var i = 0; i < keyCount; ++i) { // 38 // 46 - var key = keys[i]; // 39 // 47 - newObj[key] = obj[key]; // 40 // 48 - } // 41 // 49 - return newObj; // 42 // 50 - } // 43 // 51 - // 44 // 52 - return obj; // 45 // 53 - }, // 46 // 54 - // 47 // 55 - // es6.templateLiterals // 48 // 56 - // Constructs the object passed to the tag function in a tagged // 49 // 57 - // template literal. // 50 // 58 - taggedTemplateLiteralLoose: function (strings, raw) { // 51 // 59 - // Babel's own version of this calls Object.freeze on `strings` and // 52 // 60 - // `strings.raw`, but it doesn't seem worth the compatibility and // 53 // 61 - // performance concerns. If you're writing code against this helper, // 54 // 62 - // don't add properties to these objects. // 55 // 63 - strings.raw = raw; // 56 // 64 - return strings; // 57 // 65 - }, // 58 // 66 - // 59 // 67 - // es6.classes // 60 // 68 - // Checks that a class constructor is being called with `new`, and throws // 61 // 69 - // an error if it is not. // 62 // 70 - classCallCheck: function (instance, Constructor) { // 63 // 71 - if (!(instance instanceof Constructor)) { // 64 // 72 - throw new TypeError("Cannot call a class as a function"); // 65 // 73 - } // 66 // 74 - }, // 67 // 75 - // 68 // 76 - // es6.classes // 69 // 77 - inherits: function (subClass, superClass) { // 70 // 78 - if (typeof superClass !== "function" && superClass !== null) { // 71 // 79 - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); // 80 - } // 73 // 81 - // 74 // 82 - if (superClass) { // 75 // 83 - if (Object.create) { // 76 // 84 - // All but IE 8 // 77 // 85 - subClass.prototype = Object.create(superClass.prototype, { // 78 // 86 - constructor: { // 79 // 87 - value: subClass, // 80 // 88 - enumerable: false, // 81 // 89 - writable: true, // 82 // 90 - configurable: true // 83 // 91 - } // 84 // 92 - }); // 85 // 93 - } else { // 86 // 94 - // IE 8 path. Slightly worse for modern browsers, because `constructor` // 87 // 95 - // is enumerable and shows up in the inspector unnecessarily. // 88 // 96 - // It's not an "own" property of any instance though. // 89 // 97 - // // 90 // 98 - // For correctness when writing code, // 91 // 99 - // don't enumerate all the own-and-inherited properties of an instance // 92 // 100 - // of a class and expect not to find `constructor` (but who does that?). // 93 // 101 - var F = function () { // 94 // 102 - this.constructor = subClass; // 95 // 103 - }; // 96 // 104 - F.prototype = superClass.prototype; // 97 // 105 - subClass.prototype = new F(); // 98 // 106 - } // 99 // 107 +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/babel-runtime/babel-runtime.js // +// // +///////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +var hasOwn = Object.prototype.hasOwnProperty; // 1 + // 2 +function canDefineNonEnumerableProperties() { // 3 + var testObj = {}; // 4 + var testPropName = "t"; // 5 + // 6 + try { // 7 + Object.defineProperty(testObj, testPropName, { // 8 + enumerable: false, // 9 + value: testObj // 10 + }); // 11 + // 12 + for (var k in testObj) { // 13 + if (k === testPropName) { // 14 + return false; // 15 + } // 16 + } // 17 + } catch (e) { // 18 + return false; // 19 + } // 20 + // 21 + return testObj[testPropName] === testObj; // 22 +} // 23 + // 24 +// The name `babelHelpers` is hard-coded in Babel. Otherwise we would make it // 25 +// something capitalized and more descriptive, like `BabelRuntime`. // 26 +babelHelpers = { // 27 + // Meteor-specific runtime helper for wrapping the object of for-in // 28 + // loops, so that inherited Array methods defined by es5-shim can be // 29 + // ignored in browsers where they cannot be defined as non-enumerable. // 30 + sanitizeForInObject: canDefineNonEnumerableProperties() // 31 + ? function (value) { return value; } // 32 + : function (obj) { // 33 + if (Array.isArray(obj)) { // 34 + var newObj = {}; // 35 + var keys = Object.keys(obj); // 36 + var keyCount = keys.length; // 37 + for (var i = 0; i < keyCount; ++i) { // 38 + var key = keys[i]; // 39 + newObj[key] = obj[key]; // 40 + } // 41 + return newObj; // 42 + } // 43 + // 44 + return obj; // 45 + }, // 46 + // 47 + // es6.templateLiterals // 48 + // Constructs the object passed to the tag function in a tagged // 49 + // template literal. // 50 + taggedTemplateLiteralLoose: function (strings, raw) { // 51 + // Babel's own version of this calls Object.freeze on `strings` and // 52 + // `strings.raw`, but it doesn't seem worth the compatibility and // 53 + // performance concerns. If you're writing code against this helper, // 54 + // don't add properties to these objects. // 55 + strings.raw = raw; // 56 + return strings; // 57 + }, // 58 + // 59 + // es6.classes // 60 + // Checks that a class constructor is being called with `new`, and throws // 61 + // an error if it is not. // 62 + classCallCheck: function (instance, Constructor) { // 63 + if (!(instance instanceof Constructor)) { // 64 + throw new TypeError("Cannot call a class as a function"); // 65 + } // 66 + }, // 67 + // 68 + // es6.classes // 69 + inherits: function (subClass, superClass) { // 70 + if (typeof superClass !== "function" && superClass !== null) { // 71 + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } // 73 + // 74 + if (superClass) { // 75 + if (Object.create) { // 76 + // All but IE 8 // 77 + subClass.prototype = Object.create(superClass.prototype, { // 78 + constructor: { // 79 + value: subClass, // 80 + enumerable: false, // 81 + writable: true, // 82 + configurable: true // 83 + } // 84 + }); // 85 + } else { // 86 + // IE 8 path. Slightly worse for modern browsers, because `constructor` // 87 + // is enumerable and shows up in the inspector unnecessarily. // 88 + // It's not an "own" property of any instance though. // 89 + // // 90 + // For correctness when writing code, // 91 + // don't enumerate all the own-and-inherited properties of an instance // 92 + // of a class and expect not to find `constructor` (but who does that?). // 93 + var F = function () { // 94 + this.constructor = subClass; // 95 + }; // 96 + F.prototype = superClass.prototype; // 97 + subClass.prototype = new F(); // 98 + } // 99 // 100 // For modern browsers, this would be `subClass.__proto__ = superClass`, // 101 // but IE <=10 don't support `__proto__`, and in this case the difference // 102 @@ -1877,11 +1821,7 @@ babelHelpers = { slice: Array.prototype.slice // 253 }; // 254 // 255 -///////////////////////////////////////////////////////////////////////////////////////////////////////////// // 264 - // 265 -}).call(this); // 266 - // 267 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -5418,29 +5358,21 @@ var Session; (function(){ -/////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/session/packages/session.js // -// // -/////////////////////////////////////////////////////////////////////////////////////// - // -(function(){ // 1 - // 2 -///////////////////////////////////////////////////////////////////////////////// // 3 -// // // 4 -// packages/session/session.js // // 5 -// // // 6 -///////////////////////////////////////////////////////////////////////////////// // 7 - // // 8 -Session = new ReactiveDict('session'); // 1 // 9 - // 2 // 10 -// Documentation here is really awkward because the methods are defined // 3 // 11 -// elsewhere // 4 // 12 - // 5 // 13 -/** // 6 // 14 - * @memberOf Session // 7 // 15 - * @method set // 8 // 16 - * @summary Set a variable in the session. Notify any listeners that the value // 17 +///////////////////////////////////////////////////////////////////////////////// +// // +// packages/session/session.js // +// // +///////////////////////////////////////////////////////////////////////////////// + // +Session = new ReactiveDict('session'); // 1 + // 2 +// Documentation here is really awkward because the methods are defined // 3 +// elsewhere // 4 + // 5 +/** // 6 + * @memberOf Session // 7 + * @method set // 8 + * @summary Set a variable in the session. Notify any listeners that the value * has changed (eg: redraw templates, and rerun any // 10 * [`Tracker.autorun`](#tracker_autorun) computations, that called // 11 * [`Session.get`](#session_get) on this `key`.) // 12 @@ -5484,11 +5416,7 @@ Session = new ReactiveDict('session'); / * test against // 50 */ // 51 // 52 -///////////////////////////////////////////////////////////////////////////////// // 61 - // 62 -}).call(this); // 63 - // 64 -/////////////////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// }).call(this); @@ -5522,29 +5450,21 @@ var ReactiveVar; (function(){ -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// // -// packages/reactive-var/packages/reactive-var.js // -// // -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // -(function(){ // 1 - // 2 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 3 -// // // 4 -// packages/reactive-var/reactive-var.js // // 5 -// // // 6 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 7 - // // 8 -/* // 1 // 9 - * ## [new] ReactiveVar(initialValue, [equalsFunc]) // 2 // 10 - * // 3 // 11 - * A ReactiveVar holds a single value that can be get and set, // 4 // 12 - * such that calling `set` will invalidate any Computations that // 5 // 13 - * called `get`, according to the usual contract for reactive // 6 // 14 - * data sources. // 7 // 15 - * // 8 // 16 - * A ReactiveVar is much like a Session variable -- compare `foo.get()` // 9 // 17 +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// // +// packages/reactive-var/reactive-var.js // +// // +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // +/* // 1 + * ## [new] ReactiveVar(initialValue, [equalsFunc]) // 2 + * // 3 + * A ReactiveVar holds a single value that can be get and set, // 4 + * such that calling `set` will invalidate any Computations that // 5 + * called `get`, according to the usual contract for reactive // 6 + * data sources. // 7 + * // 8 + * A ReactiveVar is much like a Session variable -- compare `foo.get()` // 9 * to `Session.get("foo")` -- but it doesn't have a global name and isn't // 10 * automatically migrated across hot code pushes. Also, while Session // 11 * variables can only hold JSON or EJSON, ReactiveVars can hold any value. // 12 @@ -5569,7 +5489,7 @@ var ReactiveVar; * @instanceName reactiveVar // 31 * @summary Constructor for a ReactiveVar, which represents a single reactive variable. // 32 * @locus Client // 33 - * @param {Any} initialValue The initial value to set. `equalsFunc` is ignored when setting the initial value. // 42 + * @param {Any} initialValue The initial value to set. `equalsFunc` is ignored when setting the initial value. * @param {Function} [equalsFunc] Optional. A function of two arguments, called on the old value and the new value whenever the ReactiveVar is set. If it returns true, no set is performed. If omitted, the default `equalsFunc` returns true if its arguments are `===` and are of type number, boolean, string, undefined, or null. */ // 36 ReactiveVar = function (initialValue, equalsFunc) { // 37 @@ -5633,11 +5553,7 @@ ReactiveVar.prototype._numListeners = function() { return count; // 95 }; // 96 // 97 -////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 106 - // 107 -}).call(this); // 108 - // 109 -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////////////////////////// }).call(this); diff --git a/dist/angular-meteor.bundle.min.js b/dist/angular-meteor.bundle.min.js index 62cb8f723..6aba6e74a 100644 --- a/dist/angular-meteor.bundle.min.js +++ b/dist/angular-meteor.bundle.min.js @@ -1,7 +1,7 @@ -(function(){var Meteor=Package.meteor.Meteor;var _=Package.underscore._;var Base64=Package.base64.Base64;var EJSON,EJSONTest;(function(){(function(){EJSON={};EJSONTest={};var customTypes={};EJSON.addType=function(name,factory){if(_.has(customTypes,name))throw new Error("Type "+name+" already present");customTypes[name]=factory};var isInfOrNan=function(obj){return _.isNaN(obj)||obj===Infinity||obj===-Infinity};var builtinConverters=[{matchJSONValue:function(obj){return _.has(obj,"$date")&&_.size(obj)===1},matchObject:function(obj){return obj instanceof Date},toJSONValue:function(obj){return{$date:obj.getTime()}},fromJSONValue:function(obj){return new Date(obj.$date)}},{matchJSONValue:function(obj){return _.has(obj,"$InfNaN")&&_.size(obj)===1},matchObject:isInfOrNan,toJSONValue:function(obj){var sign;if(_.isNaN(obj))sign=0;else if(obj===Infinity)sign=1;else sign=-1;return{$InfNaN:sign}},fromJSONValue:function(obj){return obj.$InfNaN/0}},{matchJSONValue:function(obj){return _.has(obj,"$binary")&&_.size(obj)===1},matchObject:function(obj){return typeof Uint8Array!=="undefined"&&obj instanceof Uint8Array||obj&&_.has(obj,"$Uint8ArrayPolyfill")},toJSONValue:function(obj){return{$binary:Base64.encode(obj)}},fromJSONValue:function(obj){return Base64.decode(obj.$binary)}},{matchJSONValue:function(obj){return _.has(obj,"$escape")&&_.size(obj)===1},matchObject:function(obj){if(_.isEmpty(obj)||_.size(obj)>2){return false}return _.any(builtinConverters,function(converter){return converter.matchJSONValue(obj)})},toJSONValue:function(obj){var newObj={};_.each(obj,function(value,key){newObj[key]=EJSON.toJSONValue(value)});return{$escape:newObj}},fromJSONValue:function(obj){var newObj={};_.each(obj.$escape,function(value,key){newObj[key]=EJSON.fromJSONValue(value)});return newObj}},{matchJSONValue:function(obj){return _.has(obj,"$type")&&_.has(obj,"$value")&&_.size(obj)===2},matchObject:function(obj){return EJSON._isCustomType(obj)},toJSONValue:function(obj){var jsonValue=Meteor._noYieldsAllowed(function(){return obj.toJSONValue()});return{$type:obj.typeName(),$value:jsonValue}},fromJSONValue:function(obj){var typeName=obj.$type;if(!_.has(customTypes,typeName))throw new Error("Custom EJSON type "+typeName+" is not defined");var converter=customTypes[typeName];return Meteor._noYieldsAllowed(function(){return converter(obj.$value)})}}];EJSON._isCustomType=function(obj){return obj&&typeof obj.toJSONValue==="function"&&typeof obj.typeName==="function"&&_.has(customTypes,obj.typeName())};EJSON._getTypes=function(){return customTypes};EJSON._getConverters=function(){return builtinConverters};var adjustTypesToJSONValue=EJSON._adjustTypesToJSONValue=function(obj){if(obj===null)return null;var maybeChanged=toJSONValueHelper(obj);if(maybeChanged!==undefined)return maybeChanged;if(typeof obj!=="object")return obj;_.each(obj,function(value,key){if(typeof value!=="object"&&value!==undefined&&!isInfOrNan(value))return;var changed=toJSONValueHelper(value);if(changed){obj[key]=changed;return}adjustTypesToJSONValue(value)});return obj};var toJSONValueHelper=function(item){for(var i=0;i=bKeys.length){return false}if(x!==bKeys[i]){return false}if(!EJSON.equals(val,b[bKeys[i]],options)){return false}i++;return true});return ret&&i===bKeys.length}else{i=0;ret=_.all(a,function(val,key){if(!_.has(b,key)){return false}if(!EJSON.equals(val,b[key],options)){return false}i++;return true});return ret&&_.size(b)===i}};EJSON.clone=function(v){var ret;if(typeof v!=="object")return v;if(v===null)return null;if(v instanceof Date)return new Date(v.getTime());if(v instanceof RegExp)return v;if(EJSON.isBinary(v)){ret=EJSON.newBinary(v.length);for(var i=0;i0){if(old_idx_seq(seq_ends[j-1])max_seq_len)max_seq_len=j+1}}var idx=max_seq_len===0?-1:seq_ends[max_seq_len-1];while(idx>=0){unmoved.push(idx);idx=ptrs[idx]}unmoved.reverse();unmoved.push(new_results.length);_.each(old_results,function(doc){if(!new_presence_of_id[doc._id])observer.removed&&observer.removed(doc._id)});var startOfGroup=0;_.each(unmoved,function(endOfGroup){var groupId=new_results[endOfGroup]?new_results[endOfGroup]._id:null;var oldDoc,newDoc,fields,projectedNew,projectedOld;for(var i=startOfGroup;i=position)posCur[id]++})}lengthCur++;posCur[idStringify(id)]=position;callbacks.addedAt(id,seqArray[posNew[idStringify(id)]].item,position,before)},movedBefore:function(id,before){if(id===before)return;var oldPosition=posCur[idStringify(id)];var newPosition=before?posCur[idStringify(before)]:lengthCur;if(newPosition>oldPosition){newPosition--}_.each(posCur,function(elCurPosition,id){if(oldPosition=prevPosition)posCur[id]--});delete posCur[idStringify(id)];lengthCur--;callbacks.removedAt(id,lastSeqArray[posOld[idStringify(id)]].item,prevPosition)}});_.each(posNew,function(pos,idString){var id=idParse(idString);if(_.has(posOld,idString)){var newItem=seqArray[pos].item;var oldItem=lastSeqArray[posOld[idString]].item;if(typeof newItem==="object"||newItem!==oldItem)callbacks.changedAt(id,newItem,oldItem,pos)}})};seqChangedToEmpty=function(lastSeqArray,callbacks){return[]};seqChangedToArray=function(lastSeqArray,array,callbacks){var idsUsed={};var seqArray=_.map(array,function(item,index){var id;if(typeof item==="string"){id="-"+item}else if(typeof item==="number"||typeof item==="boolean"||item===undefined){id=item}else if(typeof item==="object"){id=item&&_.has(item,"_id")?item._id:index}else{throw new Error("{{#each}} doesn't support arrays with "+"elements of type "+typeof item)}var idString=idStringify(id);if(idsUsed[idString]){if(typeof item==="object"&&"_id"in item)warn("duplicate id "+id+" in",array);id=Random.id()}else{idsUsed[idString]=true}return{_id:id,item:item}});return seqArray};seqChangedToCursor=function(lastSeqArray,cursor,callbacks){var initial=true;var seqArray=[];var observeHandle=cursor.observe({addedAt:function(document,atIndex,before){if(initial){if(before!==null)throw new Error("Expected initial data from observe in order");seqArray.push({_id:document._id,item:document})}else{callbacks.addedAt(document._id,document,atIndex,before)}},changedAt:function(newDocument,oldDocument,atIndex){callbacks.changedAt(newDocument._id,newDocument,oldDocument,atIndex)},removedAt:function(oldDocument,atIndex){callbacks.removedAt(oldDocument._id,oldDocument,atIndex)},movedTo:function(document,fromIndex,toIndex,before){callbacks.movedTo(document._id,document,fromIndex,toIndex,before)}});initial=false;return[seqArray,observeHandle]}}).call(this)}).call(this);if(typeof Package==="undefined")Package={};Package["observe-sequence"]={ObserveSequence:ObserveSequence}})();(function(){var Meteor=Package.meteor.Meteor;var ECMAScript;if(typeof Package==="undefined")Package={};Package.ecmascript={ECMAScript:ECMAScript}})();(function(){var Meteor=Package.meteor.Meteor;var babelHelpers;(function(){(function(){var hasOwn=Object.prototype.hasOwnProperty;function canDefineNonEnumerableProperties(){var testObj={};var testPropName="t";try{Object.defineProperty(testObj,testPropName,{enumerable:false,value:testObj});for(var k in testObj){if(k===testPropName){return false}}}catch(e){return false}return testObj[testPropName]===testObj}babelHelpers={sanitizeForInObject:canDefineNonEnumerableProperties()?function(value){return value}:function(obj){if(Array.isArray(obj)){var newObj={};var keys=Object.keys(obj);var keyCount=keys.length;for(var i=0;ii)$defineProperty(it,key=keys[i++],P[key]);return it};var $create=function create(it,P){return P===undefined?_create(it):$defineProperties(_create(it),P)};var $propertyIsEnumerable=function propertyIsEnumerable(key){var E=isEnum.call(this,key);return E||!has(this,key)||!has(AllSymbols,key)||has(this,HIDDEN)&&this[HIDDEN][key]?E:true};var $getOwnPropertyDescriptor=function getOwnPropertyDescriptor(it,key){var D=getDesc(it=toIObject(it),key);if(D&&has(AllSymbols,key)&&!(has(it,HIDDEN)&&it[HIDDEN][key]))D.enumerable=true;return D};var $getOwnPropertyNames=function getOwnPropertyNames(it){var names=getNames(toIObject(it)),result=[],i=0,key;while(names.length>i)if(!has(AllSymbols,key=names[i++])&&key!=HIDDEN)result.push(key);return result};var $getOwnPropertySymbols=function getOwnPropertySymbols(it){var names=getNames(toIObject(it)),result=[],i=0,key;while(names.length>i)if(has(AllSymbols,key=names[i++]))result.push(AllSymbols[key]);return result};var $stringify=function stringify(it){var args=[it],i=1,replacer,$replacer;while(arguments.length>i)args.push(arguments[i++]);replacer=args[1];if(typeof replacer=="function")$replacer=replacer;if($replacer||!isArray(replacer))replacer=function(key,value){if($replacer)value=$replacer.call(this,key,value);if(!isSymbol(value))return value};args[1]=replacer;return _stringify.apply($JSON,args)};var buggyJSON=$fails(function(){var S=$Symbol();return _stringify([S])!="[null]"||_stringify({a:S})!="{}"||_stringify(Object(S))!="{}"});if(!useNative){$Symbol=function Symbol(){if(isSymbol(this))throw TypeError("Symbol is not a constructor");return wrap(uid(arguments[0]))};$redef($Symbol.prototype,"toString",function toString(){return this._k});isSymbol=function(it){return it instanceof $Symbol};$.create=$create;$.isEnum=$propertyIsEnumerable;$.getDesc=$getOwnPropertyDescriptor;$.setDesc=$defineProperty;$.setDescs=$defineProperties;$.getNames=$names.get=$getOwnPropertyNames;$.getSymbols=$getOwnPropertySymbols;if(SUPPORT_DESC&&!__webpack_require__(27)){$redef(ObjectProto,"propertyIsEnumerable",$propertyIsEnumerable,true)}}var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=$Symbol(key)},keyFor:function keyFor(key){return keyOf(SymbolRegistry,key)},useSetter:function(){setter=true},useSimple:function(){setter=false}};$.each.call(("hasInstance,isConcatSpreadable,iterator,match,replace,search,"+"species,split,toPrimitive,toStringTag,unscopables").split(","),function(it){var sym=wks(it);symbolStatics[it]=useNative?sym:wrap(sym)});setter=true;$def($def.G+$def.W,{Symbol:$Symbol});$def($def.S,"Symbol",symbolStatics);$def($def.S+$def.F*!useNative,"Object",{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols});$JSON&&$def($def.S+$def.F*(!useNative||buggyJSON),"JSON",{stringify:$stringify});setTag($Symbol,"Symbol");setTag(Math,"Math",true);setTag(global.JSON,"JSON",true)},function(module,exports){var $Object=Object;module.exports={create:$Object.create,getProto:$Object.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:$Object.getOwnPropertyDescriptor,setDesc:$Object.defineProperty,setDescs:$Object.defineProperties,getKeys:$Object.keys,getNames:$Object.getOwnPropertyNames,getSymbols:$Object.getOwnPropertySymbols,each:[].forEach}},function(module,exports){var UNDEFINED="undefined";var global=module.exports=typeof window!=UNDEFINED&&window.Math==Math?window:typeof self!=UNDEFINED&&self.Math==Math?self:Function("return this")();if(typeof __g=="number")__g=global},function(module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},function(module,exports,__webpack_require__){module.exports=!__webpack_require__(7)(function(){ -return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return true}}},function(module,exports,__webpack_require__){var global=__webpack_require__(4),core=__webpack_require__(9),hide=__webpack_require__(10),$redef=__webpack_require__(12),PROTOTYPE="prototype";var ctx=function(fn,that){return function(){return fn.apply(that,arguments)}};var $def=function(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,isProto=type&$def.P,target=isGlobal?global:type&$def.S?global[name]||(global[name]={}):(global[name]||{})[PROTOTYPE],exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;out=(own?target:source)[key];if(type&$def.B&&own)exp=ctx(out,global);else exp=isProto&&typeof out=="function"?ctx(Function.call,out):out;if(target&&!own)$redef(target,key,out);if(exports[key]!=out)hide(exports,key,exp);if(isProto)(exports[PROTOTYPE]||(exports[PROTOTYPE]={}))[key]=out}};global.core=core;$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;module.exports=$def},function(module,exports){var core=module.exports={version:"1.2.1"};if(typeof __e=="number")__e=core},function(module,exports,__webpack_require__){var $=__webpack_require__(3),createDesc=__webpack_require__(11);module.exports=__webpack_require__(6)?function(object,key,value){return $.setDesc(object,key,createDesc(1,value))}:function(object,key,value){object[key]=value;return object}},function(module,exports){module.exports=function(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}},function(module,exports,__webpack_require__){var global=__webpack_require__(4),hide=__webpack_require__(10),SRC=__webpack_require__(13)("src"),TO_STRING="toString",$toString=Function[TO_STRING],TPL=(""+$toString).split(TO_STRING);__webpack_require__(9).inspectSource=function(it){return $toString.call(it)};(module.exports=function(O,key,val,safe){if(typeof val=="function"){hide(val,SRC,O[key]?""+O[key]:TPL.join(String(key)));if(!("name"in val))val.name=key}if(O===global){O[key]=val}else{if(!safe)delete O[key];hide(O,key,val)}})(Function.prototype,TO_STRING,function toString(){return typeof this=="function"&&this[SRC]||$toString.call(this)})},function(module,exports){var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(key===undefined?"":key,")_",(++id+px).toString(36))}},function(module,exports,__webpack_require__){var global=__webpack_require__(4),SHARED="__core-js_shared__",store=global[SHARED]||(global[SHARED]={});module.exports=function(key){return store[key]||(store[key]={})}},function(module,exports,__webpack_require__){var has=__webpack_require__(5),hide=__webpack_require__(10),TAG=__webpack_require__(16)("toStringTag");module.exports=function(it,tag,stat){if(it&&!has(it=stat?it:it.prototype,TAG))hide(it,TAG,tag)}},function(module,exports,__webpack_require__){var store=__webpack_require__(14)("wks"),Symbol=__webpack_require__(4).Symbol;module.exports=function(name){return store[name]||(store[name]=Symbol&&Symbol[name]||(Symbol||__webpack_require__(13))("Symbol."+name))}},function(module,exports,__webpack_require__){var $=__webpack_require__(3),toIObject=__webpack_require__(18);module.exports=function(object,el){var O=toIObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},function(module,exports,__webpack_require__){var IObject=__webpack_require__(19),defined=__webpack_require__(21);module.exports=function(it){return IObject(defined(it))}},function(module,exports,__webpack_require__){var cof=__webpack_require__(20);module.exports=0 in Object("z")?Object:function(it){return cof(it)=="String"?it.split(""):Object(it)}},function(module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},function(module,exports){module.exports=function(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}},function(module,exports,__webpack_require__){var toString={}.toString,toIObject=__webpack_require__(18),getNames=__webpack_require__(3).getNames;var windowNames=typeof window=="object"&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];var getWindowNames=function(it){try{return getNames(it)}catch(e){return windowNames.slice()}};module.exports.get=function getOwnPropertyNames(it){if(windowNames&&toString.call(it)=="[object Window]")return getWindowNames(it);return getNames(toIObject(it))}},function(module,exports,__webpack_require__){var $=__webpack_require__(3);module.exports=function(it){var keys=$.getKeys(it),getSymbols=$.getSymbols;if(getSymbols){var symbols=getSymbols(it),isEnum=$.isEnum,i=0,key;while(symbols.length>i)if(isEnum.call(it,key=symbols[i++]))keys.push(key)}return keys}},function(module,exports,__webpack_require__){var cof=__webpack_require__(20);module.exports=Array.isArray||function(arg){return cof(arg)=="Array"}},function(module,exports){module.exports=function(it){return typeof it==="object"?it!==null:typeof it==="function"}},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},function(module,exports){module.exports=false},function(module,exports,__webpack_require__){var $def=__webpack_require__(8);$def($def.S+$def.F,"Object",{assign:__webpack_require__(29)})},function(module,exports,__webpack_require__){var toObject=__webpack_require__(30),IObject=__webpack_require__(19),enumKeys=__webpack_require__(23),has=__webpack_require__(5);module.exports=__webpack_require__(7)(function(){var a=Object.assign,A={},B={},S=Symbol(),K="abcdefghijklmnopqrst";A[S]=7;K.split("").forEach(function(k){B[k]=k});return a({},A)[S]!=7||Object.keys(a({},B)).join("")!=K})?function assign(target,source){var T=toObject(target),l=arguments.length,i=1;while(l>i){var S=IObject(arguments[i++]),keys=enumKeys(S),length=keys.length,j=0,key;while(length>j)if(has(S,key=keys[j++]))T[key]=S[key]}return T}:Object.assign},function(module,exports,__webpack_require__){var defined=__webpack_require__(21);module.exports=function(it){return Object(defined(it))}},function(module,exports,__webpack_require__){var $def=__webpack_require__(8);$def($def.S,"Object",{is:__webpack_require__(32)})},function(module,exports){module.exports=Object.is||function is(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}},function(module,exports,__webpack_require__){var $def=__webpack_require__(8);$def($def.S,"Object",{setPrototypeOf:__webpack_require__(34).set})},function(module,exports,__webpack_require__){var getDesc=__webpack_require__(3).getDesc,isObject=__webpack_require__(25),anObject=__webpack_require__(26);var check=function(O,proto){anObject(O);if(!isObject(proto)&&proto!==null)throw TypeError(proto+": can't set as prototype!")};module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(test,buggy,set){try{set=__webpack_require__(35)(Function.call,getDesc(Object.prototype,"__proto__").set,2);set(test,[]);buggy=!(test instanceof Array)}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}({},false):undefined),check:check}},function(module,exports,__webpack_require__){var aFunction=__webpack_require__(36);module.exports=function(fn,that,length){aFunction(fn);if(that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},function(module,exports){module.exports=function(it){if(typeof it!="function")throw TypeError(it+" is not a function!");return it}},function(module,exports,__webpack_require__){"use strict";var classof=__webpack_require__(38),test={};test[__webpack_require__(16)("toStringTag")]="z";if(test+""!="[object z]"){__webpack_require__(12)(Object.prototype,"toString",function toString(){return"[object "+classof(this)+"]"},true)}},function(module,exports,__webpack_require__){var cof=__webpack_require__(20),TAG=__webpack_require__(16)("toStringTag"),ARG=cof(function(){return arguments}())=="Arguments";module.exports=function(it){var O,T,B;return it===undefined?"Undefined":it===null?"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:ARG?cof(O):(B=cof(O))=="Object"&&typeof O.callee=="function"?"Arguments":B}},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("freeze",function($freeze){return function freeze(it){return $freeze&&isObject(it)?$freeze(it):it}})},function(module,exports,__webpack_require__){module.exports=function(KEY,exec){var $def=__webpack_require__(8),fn=(__webpack_require__(9).Object||{})[KEY]||Object[KEY],exp={};exp[KEY]=exec(fn);$def($def.S+$def.F*__webpack_require__(7)(function(){fn(1)}),"Object",exp)}},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("seal",function($seal){return function seal(it){return $seal&&isObject(it)?$seal(it):it}})},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("preventExtensions",function($preventExtensions){return function preventExtensions(it){return $preventExtensions&&isObject(it)?$preventExtensions(it):it}})},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("isFrozen",function($isFrozen){return function isFrozen(it){return isObject(it)?$isFrozen?$isFrozen(it):false:true}})},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("isSealed",function($isSealed){return function isSealed(it){return isObject(it)?$isSealed?$isSealed(it):false:true}})},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("isExtensible",function($isExtensible){return function isExtensible(it){return isObject(it)?$isExtensible?$isExtensible(it):true:false}})},function(module,exports,__webpack_require__){var toIObject=__webpack_require__(18);__webpack_require__(40)("getOwnPropertyDescriptor",function($getOwnPropertyDescriptor){return function getOwnPropertyDescriptor(it,key){return $getOwnPropertyDescriptor(toIObject(it),key)}})},function(module,exports,__webpack_require__){var toObject=__webpack_require__(30);__webpack_require__(40)("getPrototypeOf",function($getPrototypeOf){return function getPrototypeOf(it){return $getPrototypeOf(toObject(it))}})},function(module,exports,__webpack_require__){var toObject=__webpack_require__(30);__webpack_require__(40)("keys",function($keys){return function keys(it){return $keys(toObject(it))}})},function(module,exports,__webpack_require__){__webpack_require__(40)("getOwnPropertyNames",function(){return __webpack_require__(22).get})},function(module,exports,__webpack_require__){__webpack_require__(51);__webpack_require__(57);__webpack_require__(63);__webpack_require__(64);__webpack_require__(66);__webpack_require__(69);__webpack_require__(72);__webpack_require__(74);__webpack_require__(76);module.exports=__webpack_require__(9).Array},function(module,exports,__webpack_require__){"use strict";var $at=__webpack_require__(52)(true);__webpack_require__(54)(String,"String",function(iterated){this._t=String(iterated);this._i=0},function(){var O=this._t,index=this._i,point;if(index>=O.length)return{value:undefined,done:true};point=$at(O,index);this._i+=point.length;return{value:point,done:false}})},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(53),defined=__webpack_require__(21);module.exports=function(TO_STRING){return function(that,pos){var s=String(defined(that)),i=toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},function(module,exports){var ceil=Math.ceil,floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}},function(module,exports,__webpack_require__){"use strict";var LIBRARY=__webpack_require__(27),$def=__webpack_require__(8),$redef=__webpack_require__(12),hide=__webpack_require__(10),has=__webpack_require__(5),SYMBOL_ITERATOR=__webpack_require__(16)("iterator"),Iterators=__webpack_require__(55),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values";var returnThis=function(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){__webpack_require__(56)(Constructor,NAME,next);var createMethod=function(kind){switch(kind){case KEYS:return function keys(){return new Constructor(this,kind)};case VALUES:return function values(){return new Constructor(this,kind)}}return function entries(){return new Constructor(this,kind)}};var TAG=NAME+" Iterator",proto=Base.prototype,_native=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],_default=_native||createMethod(DEFAULT),methods,key;if(_native){var IteratorPrototype=__webpack_require__(3).getProto(_default.call(new Base));__webpack_require__(15)(IteratorPrototype,TAG,true);if(!LIBRARY&&has(proto,FF_ITERATOR))hide(IteratorPrototype,SYMBOL_ITERATOR,returnThis)}if(!LIBRARY||FORCE)hide(proto,SYMBOL_ITERATOR,_default);Iterators[NAME]=_default;Iterators[TAG]=returnThis;if(DEFAULT){methods={keys:IS_SET?_default:createMethod(KEYS),values:DEFAULT==VALUES?_default:createMethod(VALUES),entries:DEFAULT!=VALUES?_default:createMethod("entries")};if(FORCE)for(key in methods){if(!(key in proto))$redef(proto,key,methods[key])}else $def($def.P+$def.F*BUGGY,NAME,methods)}}},function(module,exports){module.exports={}},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),IteratorPrototype={};__webpack_require__(10)(IteratorPrototype,__webpack_require__(16)("iterator"),function(){return this});module.exports=function(Constructor,NAME,next){Constructor.prototype=$.create(IteratorPrototype,{next:__webpack_require__(11)(1,next)});__webpack_require__(15)(Constructor,NAME+" Iterator")}},function(module,exports,__webpack_require__){"use strict";var ctx=__webpack_require__(35),$def=__webpack_require__(8),toObject=__webpack_require__(30),call=__webpack_require__(58),isArrayIter=__webpack_require__(59),toLength=__webpack_require__(60),getIterFn=__webpack_require__(61);$def($def.S+$def.F*!__webpack_require__(62)(function(iter){Array.from(iter)}),"Array",{from:function from(arrayLike){var O=toObject(arrayLike),C=typeof this=="function"?this:Array,mapfn=arguments[1],mapping=mapfn!==undefined,index=0,iterFn=getIterFn(O),length,result,step,iterator;if(mapping)mapfn=ctx(mapfn,arguments[2],2);if(iterFn!=undefined&&!(C==Array&&isArrayIter(iterFn))){for(iterator=iterFn.call(O),result=new C;!(step=iterator.next()).done;index++){result[index]=mapping?call(iterator,mapfn,[step.value,index],true):step.value}}else{length=toLength(O.length);for(result=new C(length);length>index;index++){result[index]=mapping?mapfn(O[index],index):O[index]}}result.length=index;return result}})},function(module,exports,__webpack_require__){var anObject=__webpack_require__(26);module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator["return"];if(ret!==undefined)anObject(ret.call(iterator));throw e}}},function(module,exports,__webpack_require__){var Iterators=__webpack_require__(55),ITERATOR=__webpack_require__(16)("iterator");module.exports=function(it){return(Iterators.Array||Array.prototype[ITERATOR])===it}},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(53),min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),9007199254740991):0}},function(module,exports,__webpack_require__){var classof=__webpack_require__(38),ITERATOR=__webpack_require__(16)("iterator"),Iterators=__webpack_require__(55);module.exports=__webpack_require__(9).getIteratorMethod=function(it){if(it!=undefined)return it[ITERATOR]||it["@@iterator"]||Iterators[classof(it)]}},function(module,exports,__webpack_require__){var SYMBOL_ITERATOR=__webpack_require__(16)("iterator"),SAFE_CLOSING=false;try{var riter=[7][SYMBOL_ITERATOR]();riter["return"]=function(){SAFE_CLOSING=true};Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec){if(!SAFE_CLOSING)return false;var safe=false;try{var arr=[7],iter=arr[SYMBOL_ITERATOR]();iter.next=function(){safe=true};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return safe}},function(module,exports,__webpack_require__){"use strict";var $def=__webpack_require__(8);$def($def.S+$def.F*__webpack_require__(7)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){var index=0,length=arguments.length,result=new(typeof this=="function"?this:Array)(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}})},function(module,exports,__webpack_require__){__webpack_require__(65)(Array)},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),SPECIES=__webpack_require__(16)("species");module.exports=function(C){if(__webpack_require__(6)&&!(SPECIES in C))$.setDesc(C,SPECIES,{configurable:true,get:function(){return this}})}},function(module,exports,__webpack_require__){"use strict";var setUnscope=__webpack_require__(67),step=__webpack_require__(68),Iterators=__webpack_require__(55),toIObject=__webpack_require__(18);__webpack_require__(54)(Array,"Array",function(iterated,kind){this._t=toIObject(iterated);this._i=0;this._k=kind},function(){var O=this._t,kind=this._k,index=this._i++;if(!O||index>=O.length){this._t=undefined;return step(1)}if(kind=="keys")return step(0,index);if(kind=="values")return step(0,O[index]);return step(0,[index,O[index]])},"values");Iterators.Arguments=Iterators.Array;setUnscope("keys");setUnscope("values");setUnscope("entries")},function(module,exports,__webpack_require__){var UNSCOPABLES=__webpack_require__(16)("unscopables");if([][UNSCOPABLES]==undefined)__webpack_require__(10)(Array.prototype,UNSCOPABLES,{});module.exports=function(key){[][UNSCOPABLES][key]=true}},function(module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},function(module,exports,__webpack_require__){"use strict";var $def=__webpack_require__(8);$def($def.P,"Array",{copyWithin:__webpack_require__(70)});__webpack_require__(67)("copyWithin")},function(module,exports,__webpack_require__){"use strict";var toObject=__webpack_require__(30),toIndex=__webpack_require__(71),toLength=__webpack_require__(60);module.exports=[].copyWithin||function copyWithin(target,start){var O=toObject(this),len=toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],count=Math.min((end===undefined?len:toIndex(end,len))-from,len-to),inc=1;if(from0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O}},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(53),max=Math.max,min=Math.min;module.exports=function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)}},function(module,exports,__webpack_require__){var $def=__webpack_require__(8);$def($def.P,"Array",{fill:__webpack_require__(73)});__webpack_require__(67)("fill")},function(module,exports,__webpack_require__){"use strict";var toObject=__webpack_require__(30),toIndex=__webpack_require__(71),toLength=__webpack_require__(60);module.exports=[].fill||function fill(value){var O=toObject(this,true),length=toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O}},function(module,exports,__webpack_require__){"use strict";var KEY="find",$def=__webpack_require__(8),forced=true,$find=__webpack_require__(75)(5);if(KEY in[])Array(1)[KEY](function(){forced=false});$def($def.P+$def.F*forced,"Array",{find:function find(callbackfn){return $find(this,callbackfn,arguments[1])}});__webpack_require__(67)(KEY)},function(module,exports,__webpack_require__){var ctx=__webpack_require__(35),isObject=__webpack_require__(25),IObject=__webpack_require__(19),toObject=__webpack_require__(30),toLength=__webpack_require__(60),isArray=__webpack_require__(24),SPECIES=__webpack_require__(16)("species");var ASC=function(original,length){var C;if(isArray(original)&&isObject(C=original.constructor)){C=C[SPECIES];if(C===null)C=undefined}return new(C===undefined?Array:C)(length)};module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function($this,callbackfn,that){var O=toObject($this),self=IObject(O),f=ctx(callbackfn,that,3),length=toLength(self.length),index=0,result=IS_MAP?ASC($this,length):IS_FILTER?ASC($this,0):undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},function(module,exports,__webpack_require__){"use strict";var KEY="findIndex",$def=__webpack_require__(8),forced=true,$find=__webpack_require__(75)(6);if(KEY in[])Array(1)[KEY](function(){forced=false});$def($def.P+$def.F*forced,"Array",{findIndex:function findIndex(callbackfn){return $find(this,callbackfn,arguments[1])}});__webpack_require__(67)(KEY)},function(module,exports,__webpack_require__){__webpack_require__(78);__webpack_require__(79);__webpack_require__(80);__webpack_require__(51);__webpack_require__(82);__webpack_require__(83);__webpack_require__(87);__webpack_require__(88);__webpack_require__(90);__webpack_require__(91);__webpack_require__(93);__webpack_require__(94);__webpack_require__(95);module.exports=__webpack_require__(9).String},function(module,exports,__webpack_require__){var $def=__webpack_require__(8),toIndex=__webpack_require__(71),fromCharCode=String.fromCharCode,$fromCodePoint=String.fromCodePoint;$def($def.S+$def.F*(!!$fromCodePoint&&$fromCodePoint.length!=1),"String",{fromCodePoint:function fromCodePoint(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")}})},function(module,exports,__webpack_require__){var $def=__webpack_require__(8),toIObject=__webpack_require__(18),toLength=__webpack_require__(60);$def($def.S,"String",{raw:function raw(callSite){var tpl=toIObject(callSite.raw),len=toLength(tpl.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(tpl[i++]));if(i0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}},function(module,exports,__webpack_require__){"use strict";var $def=__webpack_require__(8),toLength=__webpack_require__(60),context=__webpack_require__(84),STARTS_WITH="startsWith",$startsWith=""[STARTS_WITH];$def($def.P+$def.F*__webpack_require__(86)(STARTS_WITH),"String",{startsWith:function startsWith(searchString){var that=context(this,searchString,STARTS_WITH),index=toLength(Math.min(arguments[1],that.length)),search=String(searchString);return $startsWith?$startsWith.call(that,search,index):that.slice(index,index+search.length)===search}})},function(module,exports,__webpack_require__){__webpack_require__(92)("match",1,function(defined,MATCH){return function match(regexp){"use strict";var O=defined(this),fn=regexp==undefined?undefined:regexp[MATCH];return fn!==undefined?fn.call(regexp,O):new RegExp(regexp)[MATCH](String(O))}})},function(module,exports,__webpack_require__){"use strict";module.exports=function(KEY,length,exec){var defined=__webpack_require__(21),SYMBOL=__webpack_require__(16)(KEY),original=""[KEY];if(__webpack_require__(7)(function(){var O={};O[SYMBOL]=function(){return 7};return""[KEY](O)!=7})){__webpack_require__(12)(String.prototype,KEY,exec(defined,SYMBOL,original));__webpack_require__(10)(RegExp.prototype,SYMBOL,length==2?function(string,arg){return original.call(string,this,arg)}:function(string){return original.call(string,this)})}}},function(module,exports,__webpack_require__){__webpack_require__(92)("replace",2,function(defined,REPLACE,$replace){return function replace(searchValue,replaceValue){"use strict";var O=defined(this),fn=searchValue==undefined?undefined:searchValue[REPLACE];return fn!==undefined?fn.call(searchValue,O,replaceValue):$replace.call(String(O),searchValue,replaceValue)}})},function(module,exports,__webpack_require__){__webpack_require__(92)("search",1,function(defined,SEARCH){return function search(regexp){"use strict";var O=defined(this),fn=regexp==undefined?undefined:regexp[SEARCH];return fn!==undefined?fn.call(regexp,O):new RegExp(regexp)[SEARCH](String(O))}})},function(module,exports,__webpack_require__){__webpack_require__(92)("split",2,function(defined,SPLIT,$split){return function split(separator,limit){"use strict";var O=defined(this),fn=separator==undefined?undefined:separator[SPLIT];return fn!==undefined?fn.call(separator,O,limit):$split.call(String(O),separator,limit)}})},function(module,exports,__webpack_require__){__webpack_require__(97);__webpack_require__(98);module.exports=__webpack_require__(9).Function},function(module,exports,__webpack_require__){var setDesc=__webpack_require__(3).setDesc,createDesc=__webpack_require__(11),has=__webpack_require__(5),FProto=Function.prototype,nameRE=/^\s*function ([^ (]*)/,NAME="name";NAME in FProto||__webpack_require__(6)&&setDesc(FProto,NAME,{configurable:true,get:function(){var match=(""+this).match(nameRE),name=match?match[1]:"";has(this,NAME)||setDesc(this,NAME,createDesc(5,name));return name}})},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),isObject=__webpack_require__(25),HAS_INSTANCE=__webpack_require__(16)("hasInstance"),FunctionProto=Function.prototype;if(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto,HAS_INSTANCE,{value:function(O){if(typeof this!="function"||!isObject(O))return false;if(!isObject(this.prototype))return O instanceof this;while(O=$.getProto(O))if(this.prototype===O)return true;return false}})},function(module,exports,__webpack_require__){__webpack_require__(2);module.exports=__webpack_require__(9).Symbol},function(module,exports,__webpack_require__){__webpack_require__(37);__webpack_require__(51);__webpack_require__(101);__webpack_require__(102);module.exports=__webpack_require__(9).Map},function(module,exports,__webpack_require__){__webpack_require__(66);var global=__webpack_require__(4),hide=__webpack_require__(10),Iterators=__webpack_require__(55),ITERATOR=__webpack_require__(16)("iterator"),NL=global.NodeList,HTC=global.HTMLCollection,NLProto=NL&&NL.prototype,HTCProto=HTC&&HTC.prototype,ArrayValues=Iterators.NodeList=Iterators.HTMLCollection=Iterators.Array;if(NL&&!(ITERATOR in NLProto))hide(NLProto,ITERATOR,ArrayValues);if(HTC&&!(ITERATOR in HTCProto))hide(HTCProto,ITERATOR,ArrayValues)},function(module,exports,__webpack_require__){"use strict";var strong=__webpack_require__(103);__webpack_require__(107)("Map",function(get){return function Map(){return get(this,arguments[0])}},{get:function get(key){var entry=strong.getEntry(this,key);return entry&&entry.v},set:function set(key,value){return strong.def(this,key===0?0:key,value)}},strong,true)},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),hide=__webpack_require__(10),ctx=__webpack_require__(35),species=__webpack_require__(65),strictNew=__webpack_require__(104),defined=__webpack_require__(21),forOf=__webpack_require__(105),step=__webpack_require__(68),ID=__webpack_require__(13)("id"),$has=__webpack_require__(5),isObject=__webpack_require__(25),isExtensible=Object.isExtensible||isObject,SUPPORT_DESC=__webpack_require__(6),SIZE=SUPPORT_DESC?"_s":"size",id=0;var fastKey=function(it,create){if(!isObject(it))return typeof it=="symbol"?it:(typeof it=="string"?"S":"P")+it;if(!$has(it,ID)){if(!isExtensible(it))return"F";if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]};var getEntry=function(that,key){var index=fastKey(key),entry;if(index!=="F")return that._i[index];for(entry=that._f;entry;entry=entry.n){if(entry.k==key)return entry}};module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){strictNew(that,C,NAME); -that._i=$.create(null);that._f=undefined;that._l=undefined;that[SIZE]=0;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});__webpack_require__(106)(C.prototype,{clear:function clear(){for(var that=this,data=that._i,entry=that._f;entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that._f=that._l=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that._i[entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that._f==entry)that._f=next;if(that._l==entry)that._l=prev;that[SIZE]--}return!!entry},forEach:function forEach(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this._f){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function has(key){return!!getEntry(this,key)}});if(SUPPORT_DESC)$.setDesc(C.prototype,"size",{get:function(){return defined(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that._l=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that._l,n:undefined,r:false};if(!that._f)that._f=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!=="F")that._i[index]=entry}return that},getEntry:getEntry,setStrong:function(C,NAME,IS_MAP){__webpack_require__(54)(C,NAME,function(iterated,kind){this._t=iterated;this._k=kind;this._l=undefined},function(){var that=this,kind=that._k,entry=that._l;while(entry&&entry.r)entry=entry.p;if(!that._t||!(that._l=entry=entry?entry.n:that._t._f)){that._t=undefined;return step(1)}if(kind=="keys")return step(0,entry.k);if(kind=="values")return step(0,entry.v);return step(0,[entry.k,entry.v])},IS_MAP?"entries":"values",!IS_MAP,true);species(C);species(__webpack_require__(9)[NAME])}}},function(module,exports){module.exports=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it}},function(module,exports,__webpack_require__){var ctx=__webpack_require__(35),call=__webpack_require__(58),isArrayIter=__webpack_require__(59),anObject=__webpack_require__(26),toLength=__webpack_require__(60),getIterFn=__webpack_require__(61);module.exports=function(iterable,entries,fn,that){var iterFn=getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0,length,step,iterator;if(typeof iterFn!="function")throw TypeError(iterable+" is not iterable!");if(isArrayIter(iterFn))for(length=toLength(iterable.length);length>index;index++){entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index])}else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;){call(iterator,f,step.value,entries)}}},function(module,exports,__webpack_require__){var $redef=__webpack_require__(12);module.exports=function(target,src){for(var key in src)$redef(target,key,src[key]);return target}},function(module,exports,__webpack_require__){"use strict";var global=__webpack_require__(4),$def=__webpack_require__(8),forOf=__webpack_require__(105),strictNew=__webpack_require__(104);module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=global[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};var fixMethod=function(KEY){var fn=proto[KEY];__webpack_require__(12)(proto,KEY,KEY=="delete"?function(a){return fn.call(this,a===0?0:a)}:KEY=="has"?function has(a){return fn.call(this,a===0?0:a)}:KEY=="get"?function get(a){return fn.call(this,a===0?0:a)}:KEY=="add"?function add(a){fn.call(this,a===0?0:a);return this}:function set(a,b){fn.call(this,a===0?0:a,b);return this})};if(typeof C!="function"||!(IS_WEAK||proto.forEach&&!__webpack_require__(7)(function(){(new C).entries().next()}))){C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER);__webpack_require__(106)(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](IS_WEAK?{}:-0,1),buggyZero;if(!__webpack_require__(62)(function(iter){new C(iter)})){C=wrapper(function(target,iterable){strictNew(target,C,NAME);var that=new Base;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that);return that});C.prototype=proto;proto.constructor=C}IS_WEAK||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER);if(IS_WEAK&&proto.clear)delete proto.clear}__webpack_require__(15)(C,NAME);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);if(!IS_WEAK)common.setStrong(C,NAME,IS_MAP);return C}},function(module,exports,__webpack_require__){__webpack_require__(37);__webpack_require__(51);__webpack_require__(101);__webpack_require__(109);module.exports=__webpack_require__(9).Set},function(module,exports,__webpack_require__){"use strict";var strong=__webpack_require__(103);__webpack_require__(107)("Set",function(get){return function Set(){return get(this,arguments[0])}},{add:function add(value){return strong.def(this,value=value===0?0:value,value)}},strong)}]);if(typeof Package==="undefined")Package={};Package["ecmascript-runtime"]={Symbol:Symbol,Map:Map,Set:Set}})();(function(){var Meteor=Package.meteor.Meteor;var Promise;(function(){(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:false};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.loaded=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.p="";return __webpack_require__(0)})([function(module,exports,__webpack_require__){var MeteorPromise=__webpack_require__(1);var es6PromiseThen=MeteorPromise.prototype.then;MeteorPromise.prototype.then=function(onResolved,onRejected){if(typeof Meteor==="object"&&typeof Meteor.bindEnvironment==="function"){return es6PromiseThen.call(this,onResolved&&Meteor.bindEnvironment(onResolved,raise),onRejected&&Meteor.bindEnvironment(onRejected,raise))}return es6PromiseThen.call(this,onResolved,onRejected)};function raise(exception){throw exception}Promise=MeteorPromise},function(module,exports,__webpack_require__){(function(global){var hasOwn=Object.prototype.hasOwnProperty;var g=typeof global==="object"?global:typeof window==="object"?window:typeof self==="object"?self:this;var GlobalPromise=g.Promise;var NpmPromise=__webpack_require__(2);function copyMethods(target,source){Object.keys(source).forEach(function(key){var value=source[key];if(typeof value==="function"&&!hasOwn.call(target,key)){target[key]=value}})}if(typeof GlobalPromise==="function"){copyMethods(GlobalPromise,NpmPromise);copyMethods(GlobalPromise.prototype,NpmPromise.prototype);module.exports=GlobalPromise}else{module.exports=NpmPromise}}).call(exports,function(){return this}())},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(3)},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(4);__webpack_require__(6);__webpack_require__(7);__webpack_require__(8);__webpack_require__(9)},function(module,exports,__webpack_require__){"use strict";var asap=__webpack_require__(5);function noop(){}var LAST_ERROR=null;var IS_ERROR={};function getThen(obj){try{return obj.then}catch(ex){LAST_ERROR=ex;return IS_ERROR}}function tryCallOne(fn,a){try{return fn(a)}catch(ex){LAST_ERROR=ex;return IS_ERROR}}function tryCallTwo(fn,a,b){try{fn(a,b)}catch(ex){LAST_ERROR=ex;return IS_ERROR}}module.exports=Promise;function Promise(fn){if(typeof this!=="object"){throw new TypeError("Promises must be constructed via new")}if(typeof fn!=="function"){throw new TypeError("not a function")}this._37=0;this._12=null;this._59=[];if(fn===noop)return;doResolve(fn,this)}Promise._99=noop;Promise.prototype.then=function(onFulfilled,onRejected){if(this.constructor!==Promise){return safeThen(this,onFulfilled,onRejected)}var res=new Promise(noop);handle(this,new Handler(onFulfilled,onRejected,res));return res};function safeThen(self,onFulfilled,onRejected){return new self.constructor(function(resolve,reject){var res=new Promise(noop);res.then(resolve,reject);handle(self,new Handler(onFulfilled,onRejected,res))})}function handle(self,deferred){while(self._37===3){self=self._12}if(self._37===0){self._59.push(deferred);return}asap(function(){var cb=self._37===1?deferred.onFulfilled:deferred.onRejected;if(cb===null){if(self._37===1){resolve(deferred.promise,self._12)}else{reject(deferred.promise,self._12)}return}var ret=tryCallOne(cb,self._12);if(ret===IS_ERROR){reject(deferred.promise,LAST_ERROR)}else{resolve(deferred.promise,ret)}})}function resolve(self,newValue){if(newValue===self){return reject(self,new TypeError("A promise cannot be resolved with itself."))}if(newValue&&(typeof newValue==="object"||typeof newValue==="function")){var then=getThen(newValue);if(then===IS_ERROR){return reject(self,LAST_ERROR)}if(then===self.then&&newValue instanceof Promise){self._37=3;self._12=newValue;finale(self);return}else if(typeof then==="function"){doResolve(then.bind(newValue),self);return}}self._37=1;self._12=newValue;finale(self)}function reject(self,newValue){self._37=2;self._12=newValue;finale(self)}function finale(self){for(var i=0;icapacity){for(var scan=0,newLength=queue.length-index;scan0?argumentCount:0);return new Promise(function(resolve,reject){args.push(function(err,res){if(err)reject(err);else resolve(res)});var res=fn.apply(self,args);if(res&&(typeof res==="object"||typeof res==="function")&&typeof res.then==="function"){resolve(res)}})}};Promise.nodeify=function(fn){return function(){var args=Array.prototype.slice.call(arguments);var callback=typeof args[args.length-1]==="function"?args.pop():null;var ctx=this;try{return fn.apply(this,arguments).nodeify(callback,ctx)}catch(ex){if(callback===null||typeof callback=="undefined"){return new Promise(function(resolve,reject){reject(ex)})}else{asap(function(){callback.call(ctx,ex)})}}}};Promise.prototype.nodeify=function(callback,ctx){if(typeof callback!="function")return this;this.then(function(value){asap(function(){callback.call(ctx,null,value)})},function(err){asap(function(){callback.call(ctx,err)})})}},function(module,exports,__webpack_require__){"use strict";var rawAsap=__webpack_require__(5);var freeTasks=[];var pendingErrors=[];var requestErrorThrow=rawAsap.makeRequestCallFromTimer(throwFirstError);function throwFirstError(){if(pendingErrors.length){throw pendingErrors.shift()}}module.exports=asap;function asap(task){var rawTask;if(freeTasks.length){rawTask=freeTasks.pop()}else{rawTask=new RawTask}rawTask.task=task;rawAsap(rawTask)}function RawTask(){this.task=null}RawTask.prototype.call=function(){try{this.task.call()}catch(error){if(asap.onerror){asap.onerror(error)}else{pendingErrors.push(error);requestErrorThrow()}}finally{this.task=null;freeTasks[freeTasks.length]=this}}}])}).call(this);if(typeof Package==="undefined")Package={};Package.promise={Promise:Promise}})();(function(){var Meteor=Package.meteor.Meteor;var _=Package.underscore._;var Tracker=Package.tracker.Tracker;var Deps=Package.tracker.Deps;var EJSON=Package.ejson.EJSON;var ECMAScript=Package.ecmascript.ECMAScript;var babelHelpers=Package["babel-runtime"].babelHelpers;var Symbol=Package["ecmascript-runtime"].Symbol;var Map=Package["ecmascript-runtime"].Map;var Set=Package["ecmascript-runtime"].Set;var Promise=Package.promise.Promise;var ReactiveDict;(function(){var stringify=function(value){if(value===undefined)return"undefined";return EJSON.stringify(value)};var parse=function(serialized){if(serialized===undefined||serialized==="undefined")return undefined;return EJSON.parse(serialized)};var changed=function(v){v&&v.changed()};ReactiveDict=function(dictName){if(dictName){if(typeof dictName==="string"){ReactiveDict._registerDictForMigrate(dictName,this);this.keys=ReactiveDict._loadMigratedDict(dictName)||{};this.name=dictName}else if(typeof dictName==="object"){this.keys=dictName}else{throw new Error("Invalid ReactiveDict argument: "+dictName)}}else{this.keys={}}this.allDeps=new Tracker.Dependency;this.keyDeps={};this.keyValueDeps={}};_.extend(ReactiveDict.prototype,{set:function(keyOrObject,value){var self=this;if(typeof keyOrObject==="object"&&value===undefined){self._setObject(keyOrObject);return}var key=keyOrObject;value=stringify(value);var keyExisted=_.has(self.keys,key);var oldSerializedValue=keyExisted?self.keys[key]:"undefined";var isNewValue=value!==oldSerializedValue;self.keys[key]=value;if(isNewValue||!keyExisted){self.allDeps.changed()}if(isNewValue){changed(self.keyDeps[key]);if(self.keyValueDeps[key]){changed(self.keyValueDeps[key][oldSerializedValue]);changed(self.keyValueDeps[key][value])}}},setDefault:function(key,value){var self=this;if(!_.has(self.keys,key)){self.set(key,value)}},get:function(key){var self=this;self._ensureKey(key);self.keyDeps[key].depend();return parse(self.keys[key])},equals:function(key,value){var self=this;var ObjectID=null;if(Package.mongo){ObjectID=Package.mongo.Mongo.ObjectID}if(typeof value!=="string"&&typeof value!=="number"&&typeof value!=="boolean"&&typeof value!=="undefined"&&!(value instanceof Date)&&!(ObjectID&&value instanceof ObjectID)&&value!==null){throw new Error("ReactiveDict.equals: value must be scalar")}var serializedValue=stringify(value);if(Tracker.active){self._ensureKey(key);if(!_.has(self.keyValueDeps[key],serializedValue))self.keyValueDeps[key][serializedValue]=new Tracker.Dependency;var isNew=self.keyValueDeps[key][serializedValue].depend();if(isNew){Tracker.onInvalidate(function(){if(!self.keyValueDeps[key][serializedValue].hasDependents())delete self.keyValueDeps[key][serializedValue]})}}var oldValue=undefined;if(_.has(self.keys,key))oldValue=parse(self.keys[key]);return EJSON.equals(oldValue,value)},all:function(){this.allDeps.depend();var ret={};_.each(this.keys,function(value,key){ret[key]=parse(value)});return ret},clear:function(){var self=this;var oldKeys=self.keys;self.keys={};self.allDeps.changed();_.each(oldKeys,function(value,key){changed(self.keyDeps[key]);changed(self.keyValueDeps[key][value]);changed(self.keyValueDeps[key]["undefined"])})},"delete":function(key){var self=this;var didRemove=false;if(_.has(self.keys,key)){var oldValue=self.keys[key];delete self.keys[key];changed(self.keyDeps[key]);if(self.keyValueDeps[key]){changed(self.keyValueDeps[key][oldValue]);changed(self.keyValueDeps[key]["undefined"])}self.allDeps.changed();didRemove=true}return didRemove},_setObject:function(object){var self=this;_.each(object,function(value,key){self.set(key,value)})},_ensureKey:function(key){var self=this;if(!(key in self.keyDeps)){self.keyDeps[key]=new Tracker.Dependency;self.keyValueDeps[key]={}}},_getMigrationData:function(){return this.keys}})}).call(this);(function(){ReactiveDict._migratedDictData={};ReactiveDict._dictsToMigrate={};ReactiveDict._loadMigratedDict=function(dictName){if(_.has(ReactiveDict._migratedDictData,dictName))return ReactiveDict._migratedDictData[dictName];return null};ReactiveDict._registerDictForMigrate=function(dictName,dict){if(_.has(ReactiveDict._dictsToMigrate,dictName))throw new Error("Duplicate ReactiveDict name: "+dictName);ReactiveDict._dictsToMigrate[dictName]=dict};if(Meteor.isClient&&Package.reload){var migrationData=Package.reload.Reload._migrationData("reactive-dict");if(migrationData&&migrationData.dicts)ReactiveDict._migratedDictData=migrationData.dicts;Package.reload.Reload._onMigrate("reactive-dict",function(){var dictsToMigrate=ReactiveDict._dictsToMigrate;var dataToMigrate={};for(var dictName in babelHelpers.sanitizeForInObject(dictsToMigrate))dataToMigrate[dictName]=dictsToMigrate[dictName]._getMigrationData();return[true,{dicts:dataToMigrate}]})}}).call(this);if(typeof Package==="undefined")Package={};Package["reactive-dict"]={ReactiveDict:ReactiveDict}})();(function(){var Meteor=Package.meteor.Meteor;var _=Package.underscore._;var ReactiveDict=Package["reactive-dict"].ReactiveDict;var EJSON=Package.ejson.EJSON;var Session;(function(){(function(){Session=new ReactiveDict("session")}).call(this)}).call(this);if(typeof Package==="undefined")Package={};Package.session={Session:Session}})();(function(){var Meteor=Package.meteor.Meteor;var Tracker=Package.tracker.Tracker;var Deps=Package.tracker.Deps;var ReactiveVar;(function(){(function(){ReactiveVar=function(initialValue,equalsFunc){if(!(this instanceof ReactiveVar))return new ReactiveVar(initialValue,equalsFunc);this.curValue=initialValue;this.equalsFunc=equalsFunc;this.dep=new Tracker.Dependency};ReactiveVar._isEqual=function(oldValue,newValue){var a=oldValue,b=newValue;if(a!==b)return false;else return!a||typeof a==="number"||typeof a==="boolean"||typeof a==="string"};ReactiveVar.prototype.get=function(){if(Tracker.active)this.dep.depend();return this.curValue};ReactiveVar.prototype.set=function(newValue){var oldValue=this.curValue;if((this.equalsFunc||ReactiveVar._isEqual)(oldValue,newValue))return;this.curValue=newValue;this.dep.changed()};ReactiveVar.prototype.toString=function(){return"ReactiveVar{"+this.get()+"}"};ReactiveVar.prototype._numListeners=function(){var count=0;for(var id in this.dep._dependentsById)count++;return count}}).call(this)}).call(this);if(typeof Package==="undefined")Package={};Package["reactive-var"]={ReactiveVar:ReactiveVar}})();(function(){var Meteor=Package.meteor.Meteor;var Mongo=Package.mongo.Mongo;var Tracker=Package.tracker.Tracker;var Deps=Package.tracker.Deps;var LocalCollection=Package.minimongo.LocalCollection;var Minimongo=Package.minimongo.Minimongo;var CollectionExtensions;(function(){(function(){CollectionExtensions={};CollectionExtensions._extensions=[];Meteor.addCollectionExtension=function(customFunction){if(typeof customFunction!=="function"){throw new Meteor.Error("collection-extension-wrong-argument","You must pass a function into Meteor.addCollectionExtension().")}CollectionExtensions._extensions.push(customFunction);if(typeof Meteor.users!=="undefined"){customFunction.apply(Meteor.users,["users"])}};Meteor.addCollectionPrototype=function(name,customFunction){if(typeof name!=="string"){throw new Meteor.Error("collection-extension-wrong-argument","You must pass a string as the first argument into Meteor.addCollectionPrototype().")}if(typeof customFunction!=="function"){throw new Meteor.Error("collection-extension-wrong-argument","You must pass a function as the second argument into Meteor.addCollectionPrototype().")}(typeof Mongo!=="undefined"?Mongo.Collection:Meteor.Collection).prototype[name]=customFunction};CollectionExtensions._reassignCollectionPrototype=function(instance,constr){var hasSetPrototypeOf=typeof Object.setPrototypeOf==="function";if(!constr)constr=typeof Mongo!=="undefined"?Mongo.Collection:Meteor.Collection;if(hasSetPrototypeOf){Object.setPrototypeOf(instance,constr.prototype)}else if(instance.__proto__){instance.__proto__=constr.prototype}};CollectionExtensions._wrapCollection=function(ns,as){if(!as._CollectionPrototype)as._CollectionPrototype=new as.Collection(null);var constructor=as.Collection;var proto=as._CollectionPrototype;ns.Collection=function(){var ret=constructor.apply(this,arguments);CollectionExtensions._processCollectionExtensions(this,arguments);return ret};ns.Collection.prototype=proto;ns.Collection.prototype.constructor=ns.Collection;for(var prop in constructor){if(constructor.hasOwnProperty(prop)){ns.Collection[prop]=constructor[prop]}}};CollectionExtensions._processCollectionExtensions=function(self,args){var args=args?[].slice.call(args,0):undefined;var extensions=CollectionExtensions._extensions;for(var i=0,len=extensions.length;itext2.length?text1:text2;var shorttext=text1.length>text2.length?text2:text1;var i=longtext.indexOf(shorttext);if(i!=-1){diffs=[[DIFF_INSERT,longtext.substring(0,i)],[DIFF_EQUAL,shorttext],[DIFF_INSERT,longtext.substring(i+shorttext.length)]];if(text1.length>text2.length){diffs[0][0]=diffs[2][0]=DIFF_DELETE}return diffs}if(shorttext.length==1){return[[DIFF_DELETE,text1],[DIFF_INSERT,text2]]}longtext=shorttext=null;var hm=this.diff_halfMatch_(text1,text2);if(hm){var text1_a=hm[0];var text1_b=hm[1];var text2_a=hm[2];var text2_b=hm[3];var mid_common=hm[4];var diffs_a=this.diff_main(text1_a,text2_a,checklines,deadline);var diffs_b=this.diff_main(text1_b,text2_b,checklines,deadline);return diffs_a.concat([[DIFF_EQUAL,mid_common]],diffs_b)}if(checklines&&text1.length>100&&text2.length>100){return this.diff_lineMode_(text1,text2,deadline)}return this.diff_bisect_(text1,text2,deadline)};diff_match_patch.prototype.diff_lineMode_=function(text1,text2,deadline){var a=this.diff_linesToChars_(text1,text2);text1=a[0];text2=a[1];var linearray=a[2];var diffs=this.diff_bisect_(text1,text2,deadline);this.diff_charsToLines_(diffs,linearray);this.diff_cleanupSemantic(diffs);diffs.push([DIFF_EQUAL,""]);var pointer=0;var count_delete=0;var count_insert=0;var text_delete="";var text_insert="";while(pointer=1&&count_insert>=1){var a=this.diff_main(text_delete,text_insert,false,deadline);diffs.splice(pointer-count_delete-count_insert,count_delete+count_insert);pointer=pointer-count_delete-count_insert;for(var j=a.length-1;j>=0;j--){diffs.splice(pointer,0,a[j])}pointer=pointer+a.length}count_insert=0;count_delete=0;text_delete="";text_insert="";break}pointer++}diffs.pop();return diffs};diff_match_patch.prototype.diff_bisect_=function(text1,text2,deadline){var text1_length=text1.length;var text2_length=text2.length;var max_d=Math.ceil((text1_length+text2_length)/2);var v_offset=max_d;var v_length=2*max_d;var v1=new Array(v_length);var v2=new Array(v_length);for(var x=0;xdeadline){break}for(var k1=-d+k1start;k1<=d-k1end;k1+=2){var k1_offset=v_offset+k1;var x1;if(k1==-d||k1!=d&&v1[k1_offset-1]text1_length){k1end+=2}else if(y1>text2_length){k1start+=2}else if(front){var k2_offset=v_offset+delta-k1;if(k2_offset>=0&&k2_offset=x2){return this.diff_bisectSplit_(text1,text2,x1,y1,deadline)}}}}for(var k2=-d+k2start;k2<=d-k2end;k2+=2){var k2_offset=v_offset+k2;var x2;if(k2==-d||k2!=d&&v2[k2_offset-1]text1_length){k2end+=2}else if(y2>text2_length){k2start+=2}else if(!front){var k1_offset=v_offset+delta-k2;if(k1_offset>=0&&k1_offset=x2){return this.diff_bisectSplit_(text1,text2,x1,y1,deadline); -}}}}}return[[DIFF_DELETE,text1],[DIFF_INSERT,text2]]};diff_match_patch.prototype.diff_bisectSplit_=function(text1,text2,x,y,deadline){var text1a=text1.substring(0,x);var text2a=text2.substring(0,y);var text1b=text1.substring(x);var text2b=text2.substring(y);var diffs=this.diff_main(text1a,text2a,false,deadline);var diffsb=this.diff_main(text1b,text2b,false,deadline);return diffs.concat(diffsb)};diff_match_patch.prototype.diff_linesToChars_=function(text1,text2){var lineArray=[];var lineHash={};lineArray[0]="";function diff_linesToCharsMunge_(text){var chars="";var lineStart=0;var lineEnd=-1;var lineArrayLength=lineArray.length;while(lineEndtext2_length){text1=text1.substring(text1_length-text2_length)}else if(text1_lengthtext2.length?text1:text2;var shorttext=text1.length>text2.length?text2:text1;if(longtext.length<4||shorttext.length*2=longtext.length){return[best_longtext_a,best_longtext_b,best_shorttext_a,best_shorttext_b,best_common]}else{return null}}var hm1=diff_halfMatchI_(longtext,shorttext,Math.ceil(longtext.length/4));var hm2=diff_halfMatchI_(longtext,shorttext,Math.ceil(longtext.length/2));var hm;if(!hm1&&!hm2){return null}else if(!hm2){hm=hm1}else if(!hm1){hm=hm2}else{hm=hm1[4].length>hm2[4].length?hm1:hm2}var text1_a,text1_b,text2_a,text2_b;if(text1.length>text2.length){text1_a=hm[0];text1_b=hm[1];text2_a=hm[2];text2_b=hm[3]}else{text2_a=hm[0];text2_b=hm[1];text1_a=hm[2];text1_b=hm[3]}var mid_common=hm[4];return[text1_a,text1_b,text2_a,text2_b,mid_common]};diff_match_patch.prototype.diff_cleanupSemantic=function(diffs){var changes=false;var equalities=[];var equalitiesLength=0;var lastequality=null;var pointer=0;var length_insertions1=0;var length_deletions1=0;var length_insertions2=0;var length_deletions2=0;while(pointer0?equalities[equalitiesLength-1]:-1;length_insertions1=0;length_deletions1=0;length_insertions2=0;length_deletions2=0;lastequality=null;changes=true}}pointer++}if(changes){this.diff_cleanupMerge(diffs)}this.diff_cleanupSemanticLossless(diffs);pointer=1;while(pointer=deletion.length/2||overlap_length>=insertion.length/2){diffs.splice(pointer,0,[DIFF_EQUAL,insertion.substring(0,overlap_length)]);diffs[pointer-1][1]=deletion.substring(0,deletion.length-overlap_length);diffs[pointer+1][1]=insertion.substring(overlap_length);pointer++}pointer++}pointer++}};diff_match_patch.prototype.diff_cleanupSemanticLossless=function(diffs){var punctuation=/[^a-zA-Z0-9]/;var whitespace=/\s/;var linebreak=/[\r\n]/;var blanklineEnd=/\n\r?\n$/;var blanklineStart=/^\r?\n\r?\n/;function diff_cleanupSemanticScore_(one,two){if(!one||!two){return 5}var score=0;if(one.charAt(one.length-1).match(punctuation)||two.charAt(0).match(punctuation)){score++;if(one.charAt(one.length-1).match(whitespace)||two.charAt(0).match(whitespace)){score++;if(one.charAt(one.length-1).match(linebreak)||two.charAt(0).match(linebreak)){score++;if(one.match(blanklineEnd)||two.match(blanklineStart)){score++}}}}return score}var pointer=1;while(pointer=bestScore){bestScore=score;bestEquality1=equality1;bestEdit=edit;bestEquality2=equality2}}if(diffs[pointer-1][1]!=bestEquality1){if(bestEquality1){diffs[pointer-1][1]=bestEquality1}else{diffs.splice(pointer-1,1);pointer--}diffs[pointer][1]=bestEdit;if(bestEquality2){diffs[pointer+1][1]=bestEquality2}else{diffs.splice(pointer+1,1);pointer--}}}pointer++}};diff_match_patch.prototype.diff_cleanupEfficiency=function(diffs){var changes=false;var equalities=[];var equalitiesLength=0;var lastequality="";var pointer=0;var pre_ins=false;var pre_del=false;var post_ins=false;var post_del=false;while(pointer0?equalities[equalitiesLength-1]:-1;post_ins=post_del=false}changes=true}}pointer++}if(changes){this.diff_cleanupMerge(diffs)}};diff_match_patch.prototype.diff_cleanupMerge=function(diffs){diffs.push([DIFF_EQUAL,""]);var pointer=0;var count_delete=0;var count_insert=0;var text_delete="";var text_insert="";var commonlength;while(pointer1){if(count_delete!==0&&count_insert!==0){commonlength=this.diff_commonPrefix(text_insert,text_delete);if(commonlength!==0){if(pointer-count_delete-count_insert>0&&diffs[pointer-count_delete-count_insert-1][0]==DIFF_EQUAL){diffs[pointer-count_delete-count_insert-1][1]+=text_insert.substring(0,commonlength)}else{diffs.splice(0,0,[DIFF_EQUAL,text_insert.substring(0,commonlength)]);pointer++}text_insert=text_insert.substring(commonlength);text_delete=text_delete.substring(commonlength)}commonlength=this.diff_commonSuffix(text_insert,text_delete);if(commonlength!==0){diffs[pointer][1]=text_insert.substring(text_insert.length-commonlength)+diffs[pointer][1];text_insert=text_insert.substring(0,text_insert.length-commonlength);text_delete=text_delete.substring(0,text_delete.length-commonlength)}}if(count_delete===0){diffs.splice(pointer-count_delete-count_insert,count_delete+count_insert,[DIFF_INSERT,text_insert])}else if(count_insert===0){diffs.splice(pointer-count_delete-count_insert,count_delete+count_insert,[DIFF_DELETE,text_delete])}else{diffs.splice(pointer-count_delete-count_insert,count_delete+count_insert,[DIFF_DELETE,text_delete],[DIFF_INSERT,text_insert])}pointer=pointer-count_delete-count_insert+(count_delete?1:0)+(count_insert?1:0)+1}else if(pointer!==0&&diffs[pointer-1][0]==DIFF_EQUAL){diffs[pointer-1][1]+=diffs[pointer][1];diffs.splice(pointer,1)}else{pointer++}count_insert=0;count_delete=0;text_delete="";text_insert="";break}}if(diffs[diffs.length-1][1]===""){diffs.pop()}var changes=false;pointer=1;while(pointerloc){break}last_chars1=chars1;last_chars2=chars2}if(diffs.length!=x&&diffs[x][0]===DIFF_DELETE){return last_chars2}return last_chars2+(loc-last_chars1)};diff_match_patch.prototype.diff_prettyHtml=function(diffs){var html=[];var i=0;var pattern_amp=/&/g;var pattern_lt=//g;var pattern_para=/\n/g;for(var x=0;x");switch(op){case DIFF_INSERT:html[x]=''+text+"";break;case DIFF_DELETE:html[x]=''+text+"";break;case DIFF_EQUAL:html[x]=""+text+"";break}if(op!==DIFF_DELETE){i+=data.length}}return html.join("")};diff_match_patch.prototype.diff_text1=function(diffs){var text=[];for(var x=0;xthis.Match_MaxBits){throw new Error("Pattern too long for this browser.")}var s=this.match_alphabet_(pattern);var dmp=this;function match_bitapScore_(e,x){var accuracy=e/pattern.length;var proximity=Math.abs(loc-x);if(!dmp.Match_Distance){return proximity?1:accuracy}return accuracy+proximity/dmp.Match_Distance}var score_threshold=this.Match_Threshold;var best_loc=text.indexOf(pattern,loc);if(best_loc!=-1){score_threshold=Math.min(match_bitapScore_(0,best_loc),score_threshold);best_loc=text.lastIndexOf(pattern,loc+pattern.length);if(best_loc!=-1){score_threshold=Math.min(match_bitapScore_(0,best_loc),score_threshold)}}var matchmask=1<=start;j--){var charMatch=s[text.charAt(j-1)];if(d===0){rd[j]=(rd[j+1]<<1|1)&charMatch}else{rd[j]=(rd[j+1]<<1|1)&charMatch|((last_rd[j+1]|last_rd[j])<<1|1)|last_rd[j+1]}if(rd[j]&matchmask){var score=match_bitapScore_(d,j-1);if(score<=score_threshold){score_threshold=score;best_loc=j-1;if(best_loc>loc){start=Math.max(1,2*loc-best_loc)}else{break}}}}if(match_bitapScore_(d+1,loc)>score_threshold){break}last_rd=rd}return best_loc};diff_match_patch.prototype.match_alphabet_=function(pattern){var s={};for(var i=0;i2){this.diff_cleanupSemantic(diffs);this.diff_cleanupEfficiency(diffs)}}else if(a&&typeof a=="object"&&typeof opt_b=="undefined"&&typeof opt_c=="undefined"){diffs=a;text1=this.diff_text1(diffs)}else if(typeof a=="string"&&opt_b&&typeof opt_b=="object"&&typeof opt_c=="undefined"){text1=a;diffs=opt_b}else if(typeof a=="string"&&typeof opt_b=="string"&&opt_c&&typeof opt_c=="object"){text1=a;diffs=opt_c}else{throw new Error("Unknown call format to patch_make.")}if(diffs.length===0){return[]}var patches=[];var patch=new diff_match_patch.patch_obj;var patchDiffLength=0;var char_count1=0;var char_count2=0;var prepatch_text=text1;var postpatch_text=text1;for(var x=0;x=2*this.Patch_Margin){if(patchDiffLength){this.patch_addContext_(patch,prepatch_text);patches.push(patch);patch=new diff_match_patch.patch_obj;patchDiffLength=0;prepatch_text=postpatch_text;char_count1=char_count2}}break}if(diff_type!==DIFF_INSERT){char_count1+=diff_text.length}if(diff_type!==DIFF_DELETE){char_count2+=diff_text.length}}if(patchDiffLength){this.patch_addContext_(patch,prepatch_text);patches.push(patch)}return patches};diff_match_patch.prototype.patch_deepCopy=function(patches){var patchesCopy=[];for(var x=0;xthis.Match_MaxBits){start_loc=this.match_main(text,text1.substring(0,this.Match_MaxBits),expected_loc);if(start_loc!=-1){end_loc=this.match_main(text,text1.substring(text1.length-this.Match_MaxBits),expected_loc+text1.length-this.Match_MaxBits);if(end_loc==-1||start_loc>=end_loc){start_loc=-1}}}else{start_loc=this.match_main(text,text1,expected_loc)}if(start_loc==-1){results[x]=false;delta-=patches[x].length2-patches[x].length1}else{results[x]=true;delta=start_loc-expected_loc;var text2;if(end_loc==-1){text2=text.substring(start_loc,start_loc+text1.length)}else{text2=text.substring(start_loc,end_loc+this.Match_MaxBits)}if(text1==text2){text=text.substring(0,start_loc)+this.diff_text2(patches[x].diffs)+text.substring(start_loc+text1.length)}else{var diffs=this.diff_main(text1,text2,false);if(text1.length>this.Match_MaxBits&&this.diff_levenshtein(diffs)/text1.length>this.Patch_DeleteThreshold){results[x]=false}else{this.diff_cleanupSemanticLossless(diffs);var index1=0;var index2;for(var y=0;ydiffs[0][1].length){var extraLength=paddingLength-diffs[0][1].length;diffs[0][1]=nullPadding.substring(diffs[0][1].length)+diffs[0][1];patch.start1-=extraLength;patch.start2-=extraLength;patch.length1+=extraLength;patch.length2+=extraLength}patch=patches[patches.length-1];diffs=patch.diffs;if(diffs.length==0||diffs[diffs.length-1][0]!=DIFF_EQUAL){diffs.push([DIFF_EQUAL,nullPadding]);patch.length1+=paddingLength;patch.length2+=paddingLength}else if(paddingLength>diffs[diffs.length-1][1].length){var extraLength=paddingLength-diffs[diffs.length-1][1].length;diffs[diffs.length-1][1]+=nullPadding.substring(0,extraLength);patch.length1+=extraLength;patch.length2+=extraLength}return nullPadding};diff_match_patch.prototype.patch_splitMax=function(patches){var patch_size=this.Match_MaxBits;for(var x=0;xpatch_size){var bigpatch=patches[x];patches.splice(x--,1);var start1=bigpatch.start1;var start2=bigpatch.start2;var precontext="";while(bigpatch.diffs.length!==0){var patch=new diff_match_patch.patch_obj;var empty=true;patch.start1=start1-precontext.length;patch.start2=start2-precontext.length;if(precontext!==""){patch.length1=patch.length2=precontext.length;patch.diffs.push([DIFF_EQUAL,precontext])}while(bigpatch.diffs.length!==0&&patch.length12*patch_size){patch.length1+=diff_text.length;start1+=diff_text.length;empty=false;patch.diffs.push([diff_type,diff_text]);bigpatch.diffs.shift()}else{diff_text=diff_text.substring(0,patch_size-patch.length1-this.Patch_Margin);patch.length1+=diff_text.length;start1+=diff_text.length;if(diff_type===DIFF_EQUAL){patch.length2+=diff_text.length;start2+=diff_text.length}else{empty=false}patch.diffs.push([diff_type,diff_text]);if(diff_text==bigpatch.diffs[0][1]){bigpatch.diffs.shift()}else{bigpatch.diffs[0][1]=bigpatch.diffs[0][1].substring(diff_text.length)}}}precontext=this.diff_text2(patch.diffs);precontext=precontext.substring(precontext.length-this.Patch_Margin);var postcontext=this.diff_text1(bigpatch.diffs).substring(0,this.Patch_Margin);if(postcontext!==""){patch.length1+=postcontext.length;patch.length2+=postcontext.length;if(patch.diffs.length!==0&&patch.diffs[patch.diffs.length-1][0]===DIFF_EQUAL){patch.diffs[patch.diffs.length-1][1]+=postcontext}else{patch.diffs.push([DIFF_EQUAL,postcontext])}}if(!empty){patches.splice(++x,0,patch)}}}}};diff_match_patch.prototype.patch_toText=function(patches){var text=[];for(var x=0;x0&&len2>0&&!matchContext.objectHash&&typeof matchContext.matchByPosition!=="boolean"){matchContext.matchByPosition=!arraysHaveMatchByRef(array1,array2,len1,len2)}while(commonHead0){for(var removeItemIndex1=0;removeItemIndex1=0;index--){index1=toRemove[index];var indexDiff=delta["_"+index1];var removedValue=array.splice(index1,1)[0];if(indexDiff[2]===ARRAY_MOVE){toInsert.push({index:indexDiff[1],value:removedValue})}}toInsert=toInsert.sort(compare.numericallyBy("index"));var toInsertLength=toInsert.length;for(index=0;index0){for(index=0;indexreverseIndex){reverseIndex++}else if(moveFromIndex>=reverseIndex&&moveToIndexmatrix[index1-1][index2]){return backtrack(matrix,array1,array2,index1,index2-1,context)}else{return backtrack(matrix,array1,array2,index1-1,index2,context)}};var get=function(array1,array2,match,context){context=context||{};var matrix=lengthMatrix(array1,array2,match||defaultMatch,context);var result=backtrack(matrix,array1,array2,array1.length,array2.length,context);if(typeof array1==="string"&&typeof array2==="string"){result.sequence=result.sequence.join("")}return result};exports.get=get},{}],13:[function(require,module,exports){var DiffContext=require("../contexts/diff").DiffContext;var PatchContext=require("../contexts/patch").PatchContext;var ReverseContext=require("../contexts/reverse").ReverseContext;var collectChildrenDiffFilter=function collectChildrenDiffFilter(context){if(!context||!context.children){return}var length=context.children.length;var child;var result=context.result;for(var index=0;index=position)posCur[id]++});lengthCur++;posCur[idStringify(id)]=position;callbacks.addedAt(id,seqArray[posNew[idStringify(id)]],position,before)},movedBefore:function(id,before){var prevPosition=posCur[idStringify(id)];var position=before?posCur[idStringify(before)]:lengthCur-1;_.each(posCur,function(pos,id){if(pos>=prevPosition&&pos<=position)posCur[id]--;else if(pos<=prevPosition&&pos>=position)posCur[id]++});posCur[idStringify(id)]=position;callbacks.movedTo(id,seqArray[posNew[idStringify(id)]],prevPosition,position,before)},removed:function(id){var prevPosition=posCur[idStringify(id)];_.each(posCur,function(pos,id){if(pos>=prevPosition)posCur[id]--});delete posCur[idStringify(id)];lengthCur--;callbacks.removedAt(id,lastSeqArray[posOld[idStringify(id)]],prevPosition)}});_.each(posNew,function(pos,idString){if(!_.has(posOld,idString))return;var id=idParse(idString);var newItem=seqArray[pos]||{};var oldItem=lastSeqArray[posOld[idString]];var updates=getUpdates(oldItem,newItem,preventNestedDiff);if(!_.isEmpty(updates))callbacks.changedAt(id,updates,pos,oldItem)})}diffArray.shallow=function(lastSeqArray,seqArray,callbacks){return diffArray(lastSeqArray,seqArray,callbacks,true)};diffArray.deepCopyChanges=function(oldItem,newItem){var setDiff=getUpdates(oldItem,newItem).$set;_.each(setDiff,function(v,deepKey){setDeep(oldItem,deepKey,v)})};diffArray.deepCopyRemovals=function(oldItem,newItem){var unsetDiff=getUpdates(oldItem,newItem).$unset;_.each(unsetDiff,function(v,deepKey){unsetDeep(oldItem,deepKey)})};diffArray.getChanges=function(newCollection,oldCollection,diffMethod){var changes={added:[],removed:[],changed:[]};diffMethod(oldCollection,newCollection,{addedAt:function(id,item,index){changes.added.push({item:item,index:index})},removedAt:function(id,item,index){changes.removed.push({item:item,index:index})},changedAt:function(id,updates,index,oldItem){changes.changed.push({selector:id,modifier:updates})},movedTo:function(id,item,fromIndex,toIndex){}});return changes};var setDeep=function(obj,deepKey,v){var split=deepKey.split(".");var initialKeys=_.initial(split);var lastKey=_.last(split);initialKeys.reduce(function(subObj,k,i){var nextKey=split[i+1];if(isNumStr(nextKey)){if(subObj[k]==null)subObj[k]=[];if(subObj[k].length==parseInt(nextKey))subObj[k].push(null)}else if(subObj[k]==null||!isHash(subObj[k])){subObj[k]={}}return subObj[k]},obj);var deepObj=getDeep(obj,initialKeys);deepObj[lastKey]=v;return v};var unsetDeep=function(obj,deepKey){var split=deepKey.split(".");var initialKeys=_.initial(split);var lastKey=_.last(split);var deepObj=getDeep(obj,initialKeys);if(_.isArray(deepObj)&&isNumStr(lastKey))return!!deepObj.splice(lastKey,1);else return delete deepObj[lastKey]};var getDeep=function(obj,keys){return keys.reduce(function(subObj,k){return subObj[k]},obj)};var isHash=function(obj){return _.isObject(obj)&&Object.getPrototypeOf(obj)===Object.prototype};var isNumStr=function(str){return str.match(/^\d+$/)};return diffArray}])}).call(this);(function(){"use strict";(function(){var module=angular.module("getUpdates",[]);var utils=function(){var rip=function(obj,level){if(level<1)return{};return _.reduce(obj,function(clone,v,k){v=_.isObject(v)?rip(v,--level):v;clone[k]=v;return clone},{})};var toPaths=function(obj){var keys=getKeyPaths(obj);var values=getDeepValues(obj);return _.object(keys,values)};var getKeyPaths=function(obj){var keys=_.keys(obj).map(function(k){var v=obj[k];if(!_.isObject(v)||_.isEmpty(v)||_.isArray(v))return k;return getKeyPaths(v).map(function(subKey){return k+"."+subKey})});return _.flatten(keys)};var getDeepValues=function(obj,arr){arr=arr||[];_.values(obj).forEach(function(v){if(!_.isObject(v)||_.isEmpty(v)||_.isArray(v))arr.push(v);else getDeepValues(v,arr)});return arr};var flatten=function(arr){return arr.reduce(function(flattened,v,i){if(_.isArray(v)&&!_.isEmpty(v))flattened.push.apply(flattened,flatten(v));else flattened.push(v);return flattened},[])};var setFilled=function(obj,k,v){if(!_.isEmpty(v))obj[k]=v};var assert=function(result,msg){if(!result)throwErr(msg)};var throwErr=function(msg){throw Error("get-updates error - "+msg)};return{rip:rip,toPaths:toPaths,getKeyPaths:getKeyPaths,getDeepValues:getDeepValues,setFilled:setFilled,assert:assert,throwErr:throwErr}}();var getDifference=function(){var getDifference=function(src,dst,isShallow){var level;if(isShallow>1)level=isShallow;else if(isShallow)level=1;if(level){src=utils.rip(src,level);dst=utils.rip(dst,level)}return compare(src,dst)};var compare=function(src,dst){var srcKeys=_.keys(src);var dstKeys=_.keys(dst);var keys=_.chain([]).concat(srcKeys).concat(dstKeys).uniq().without("$$hashKey").value();return keys.reduce(function(diff,k){var srcValue=src[k];var dstValue=dst[k];if(_.isDate(srcValue)&&_.isDate(dstValue)){ -if(srcValue.getTime()!=dstValue.getTime())diff[k]=dstValue}if(_.isObject(srcValue)&&_.isObject(dstValue)){var valueDiff=getDifference(srcValue,dstValue);utils.setFilled(diff,k,valueDiff)}else if(srcValue!==dstValue){diff[k]=dstValue}return diff},{})};return getDifference}();var getUpdates=function(){var getUpdates=function(src,dst,isShallow){utils.assert(_.isObject(src),"first argument must be an object");utils.assert(_.isObject(dst),"second argument must be an object");var diff=getDifference(src,dst,isShallow);var paths=utils.toPaths(diff);var set=createSet(paths);var unset=createUnset(paths);var pull=createPull(unset);var updates={};utils.setFilled(updates,"$set",set);utils.setFilled(updates,"$unset",unset);utils.setFilled(updates,"$pull",pull);return updates};var createSet=function(paths){var undefinedKeys=getUndefinedKeys(paths);return _.omit(paths,undefinedKeys)};var createUnset=function(paths){var undefinedKeys=getUndefinedKeys(paths);var unset=_.pick(paths,undefinedKeys);return _.reduce(unset,function(result,v,k){result[k]=true;return result},{})};var createPull=function(unset){var arrKeyPaths=_.keys(unset).map(function(k){var split=k.match(/(.*)\.\d+$/);return split&&split[1]});return _.compact(arrKeyPaths).reduce(function(pull,k){pull[k]=null;return pull},{})};var getUndefinedKeys=function(obj){return _.keys(obj).filter(function(k){var v=obj[k];return _.isUndefined(v)})};return getUpdates}();module.value("getUpdates",getUpdates)})()}).call(this);(function(){"use strict";var angularMeteorSubscribe=angular.module("angular-meteor.subscribe",[]);angularMeteorSubscribe.service("$meteorSubscribe",["$q",function($q){var self=this;this._subscribe=function(scope,deferred,args){console.warn("[angular-meteor.subscribe] Please note that this module is deprecated since 1.3.0 and will be removed in 1.4.0! Replace it with the new syntax described here: http://www.angular-meteor.com/api/1.3.1/subscribe");var subscription=null;var lastArg=args[args.length-1];if(angular.isObject(lastArg)&&angular.isFunction(lastArg.onStop)){var onStop=lastArg.onStop;args.pop()}args.push({onReady:function(){deferred.resolve(subscription)},onStop:function(err){if(!deferred.promise.$$state.status){if(err)deferred.reject(err);else deferred.reject(new Meteor.Error("Subscription Stopped","Subscription stopped by a call to stop method. Either by the client or by the server."))}else if(onStop)onStop.apply(this,Array.prototype.slice.call(arguments))}});subscription=Meteor.subscribe.apply(scope,args);return subscription};this.subscribe=function(){var deferred=$q.defer();var args=Array.prototype.slice.call(arguments);var subscription=null;self._subscribe(this,deferred,args);return deferred.promise}}]);angularMeteorSubscribe.run(["$rootScope","$q","$meteorSubscribe",function($rootScope,$q,$meteorSubscribe){Object.getPrototypeOf($rootScope).$meteorSubscribe=function(){var deferred=$q.defer();var args=Array.prototype.slice.call(arguments);var subscription=$meteorSubscribe._subscribe(this,deferred,args);this.$on("$destroy",function(){subscription.stop()});return deferred.promise}}])}).call(this);(function(){"use strict";var angularMeteorStopper=angular.module("angular-meteor.stopper",["angular-meteor.subscribe"]);angularMeteorStopper.factory("$meteorStopper",["$q","$meteorSubscribe",function($q,$meteorSubscribe){function $meteorStopper($meteorEntity){return function(){var args=Array.prototype.slice.call(arguments);var meteorEntity=$meteorEntity.apply(this,args);angular.extend(meteorEntity,$meteorStopper);meteorEntity.$$scope=this;this.$on("$destroy",function(){meteorEntity.stop();if(meteorEntity.subscription)meteorEntity.subscription.stop()});return meteorEntity}}$meteorStopper.subscribe=function(){var args=Array.prototype.slice.call(arguments);this.subscription=$meteorSubscribe._subscribe(this.$$scope,$q.defer(),args);return this};return $meteorStopper}])}).call(this);(function(){"use strict";var angularMeteorCollection=angular.module("angular-meteor.collection",["angular-meteor.stopper","angular-meteor.subscribe","angular-meteor.utils","diffArray"]);angularMeteorCollection.factory("AngularMeteorCollection",["$q","$meteorSubscribe","$meteorUtils","$rootScope","$timeout","diffArray",function($q,$meteorSubscribe,$meteorUtils,$rootScope,$timeout,diffArray){function AngularMeteorCollection(curDefFunc,collection,diffArrayFunc,autoClientSave){console.warn("[angular-meteor.$meteorCollection] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/meteorCollection");var data=[];data._serverBackup=[];data._diffArrayFunc=diffArrayFunc;data._hObserve=null;data._hNewCurAutorun=null;data._hDataAutorun=null;if(angular.isDefined(collection)){data.$$collection=collection}else{var cursor=curDefFunc();data.$$collection=$meteorUtils.getCollectionByName(cursor.collection.name)}_.extend(data,AngularMeteorCollection);data._startCurAutorun(curDefFunc,autoClientSave);return data}AngularMeteorCollection._startCurAutorun=function(curDefFunc,autoClientSave){var self=this;self._hNewCurAutorun=Tracker.autorun(function(){Tracker.onInvalidate(function(){self._stopCursor()});if(autoClientSave)self._setAutoClientSave();self._updateCursor(curDefFunc(),autoClientSave)})};AngularMeteorCollection.subscribe=function(){$meteorSubscribe.subscribe.apply(this,arguments);return this};AngularMeteorCollection.save=function(docs,useUnsetModifier){if(!docs)docs=this;docs=[].concat(docs);var promises=docs.map(function(doc){return this._upsertDoc(doc,useUnsetModifier)},this);return $meteorUtils.promiseAll(promises)};AngularMeteorCollection._upsertDoc=function(doc,useUnsetModifier){var deferred=$q.defer();var collection=this.$$collection;var createFulfill=_.partial($meteorUtils.fulfill,deferred,null);doc=$meteorUtils.stripDollarPrefixedKeys(doc);var docId=doc._id;var isExist=collection.findOne(docId);if(isExist){delete doc._id;var modifier=useUnsetModifier?{$unset:doc}:{$set:doc};collection.update(docId,modifier,createFulfill(function(){return{_id:docId,action:"updated"}}))}else{collection.insert(doc,createFulfill(function(id){return{_id:id,action:"inserted"}}))}return deferred.promise};AngularMeteorCollection._updateDiff=function(selector,update,callback){callback=callback||angular.noop;var setters=_.omit(update,"$pull");var updates=[setters];_.each(update.$pull,function(pull,prop){var puller={};puller[prop]=pull;updates.push({$pull:puller})});this._updateParallel(selector,updates,callback)};AngularMeteorCollection._updateParallel=function(selector,updates,callback){var self=this;var done=_.after(updates.length,callback);var next=function(err,affectedDocsNum){if(err)return callback(err);done(null,affectedDocsNum)};_.each(updates,function(update){self.$$collection.update(selector,update,next)})};AngularMeteorCollection.remove=function(keyOrDocs){var keys;if(!keyOrDocs){keys=_.pluck(this,"_id")}else{keyOrDocs=[].concat(keyOrDocs);keys=_.map(keyOrDocs,function(keyOrDoc){return keyOrDoc._id||keyOrDoc})}check(keys,[Match.OneOf(String,Mongo.ObjectID)]);var promises=keys.map(function(key){return this._removeDoc(key)},this);return $meteorUtils.promiseAll(promises)};AngularMeteorCollection._removeDoc=function(id){var deferred=$q.defer();var collection=this.$$collection;var fulfill=$meteorUtils.fulfill(deferred,null,{_id:id,action:"removed"});collection.remove(id,fulfill);return deferred.promise};AngularMeteorCollection._updateCursor=function(cursor,autoClientSave){var self=this;if(self._hObserve)self._stopObserving();self._hObserve=cursor.observe({addedAt:function(doc,atIndex){self.splice(atIndex,0,doc);self._serverBackup.splice(atIndex,0,doc);self._setServerUpdateMode()},changedAt:function(doc,oldDoc,atIndex){diffArray.deepCopyChanges(self[atIndex],doc);diffArray.deepCopyRemovals(self[atIndex],doc);self._serverBackup[atIndex]=self[atIndex];self._setServerUpdateMode()},movedTo:function(doc,fromIndex,toIndex){self.splice(fromIndex,1);self.splice(toIndex,0,doc);self._serverBackup.splice(fromIndex,1);self._serverBackup.splice(toIndex,0,doc);self._setServerUpdateMode()},removedAt:function(oldDoc){var removedIndex=$meteorUtils.findIndexById(self,oldDoc);if(removedIndex!=-1){self.splice(removedIndex,1);self._serverBackup.splice(removedIndex,1);self._setServerUpdateMode()}else{removedIndex=$meteorUtils.findIndexById(self._serverBackup,oldDoc);if(removedIndex!=-1){self._serverBackup.splice(removedIndex,1)}}}});self._hDataAutorun=Tracker.autorun(function(){cursor.fetch();if(self._serverMode)self._unsetServerUpdateMode(autoClientSave)})};AngularMeteorCollection._stopObserving=function(){this._hObserve.stop();this._hDataAutorun.stop();delete this._serverMode;delete this._hUnsetTimeout};AngularMeteorCollection._setServerUpdateMode=function(name){this._serverMode=true;this._unsetAutoClientSave()};AngularMeteorCollection._unsetServerUpdateMode=function(autoClientSave){var self=this;if(self._hUnsetTimeout){$timeout.cancel(self._hUnsetTimeout);self._hUnsetTimeout=null}self._hUnsetTimeout=$timeout(function(){self._serverMode=false;var changes=diffArray.getChanges(self,self._serverBackup,self._diffArrayFunc);self._saveChanges(changes);if(autoClientSave)self._setAutoClientSave()},0)};AngularMeteorCollection.stop=function(){this._stopCursor();this._hNewCurAutorun.stop()};AngularMeteorCollection._stopCursor=function(){this._unsetAutoClientSave();if(this._hObserve){this._hObserve.stop();this._hDataAutorun.stop()}this.splice(0);this._serverBackup.splice(0)};AngularMeteorCollection._unsetAutoClientSave=function(name){if(this._hRegAutoBind){this._hRegAutoBind();this._hRegAutoBind=null}};AngularMeteorCollection._setAutoClientSave=function(){var self=this;self._unsetAutoClientSave();self._hRegAutoBind=$rootScope.$watch(function(){return self},function(nItems,oItems){if(nItems===oItems)return;var changes=diffArray.getChanges(self,oItems,self._diffArrayFunc);self._unsetAutoClientSave();self._saveChanges(changes);self._setAutoClientSave()},true)};AngularMeteorCollection._saveChanges=function(changes){var self=this;var addedDocs=changes.added.reverse().map(function(descriptor){self.splice(descriptor.index,1);return descriptor.item});if(addedDocs.length)self.save(addedDocs);var removedDocs=changes.removed.map(function(descriptor){return descriptor.item});if(removedDocs.length)self.remove(removedDocs);changes.changed.forEach(function(descriptor){self._updateDiff(descriptor.selector,descriptor.modifier)})};return AngularMeteorCollection}]);angularMeteorCollection.factory("$meteorCollectionFS",["$meteorCollection","diffArray",function($meteorCollection,diffArray){function $meteorCollectionFS(reactiveFunc,autoClientSave,collection){console.warn("[angular-meteor.$meteorCollectionFS] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/files");return new $meteorCollection(reactiveFunc,autoClientSave,collection,diffArray.shallow)}return $meteorCollectionFS}]);angularMeteorCollection.factory("$meteorCollection",["AngularMeteorCollection","$rootScope","diffArray",function(AngularMeteorCollection,$rootScope,diffArray){function $meteorCollection(reactiveFunc,autoClientSave,collection,diffFn){if(!reactiveFunc){throw new TypeError("The first argument of $meteorCollection is undefined.")}if(!(angular.isFunction(reactiveFunc)||angular.isFunction(reactiveFunc.find))){throw new TypeError("The first argument of $meteorCollection must be a function or a have a find function property.")}if(!angular.isFunction(reactiveFunc)){collection=angular.isDefined(collection)?collection:reactiveFunc;reactiveFunc=_.bind(reactiveFunc.find,reactiveFunc)}autoClientSave=angular.isDefined(autoClientSave)?autoClientSave:true;diffFn=diffFn||diffArray;return new AngularMeteorCollection(reactiveFunc,collection,diffFn,autoClientSave)}return $meteorCollection}]);angularMeteorCollection.run(["$rootScope","$meteorCollection","$meteorCollectionFS","$meteorStopper",function($rootScope,$meteorCollection,$meteorCollectionFS,$meteorStopper){var scopeProto=Object.getPrototypeOf($rootScope);scopeProto.$meteorCollection=$meteorStopper($meteorCollection);scopeProto.$meteorCollectionFS=$meteorStopper($meteorCollectionFS)}])}).call(this);(function(){"use strict";var angularMeteorObject=angular.module("angular-meteor.object",["angular-meteor.utils","angular-meteor.subscribe","angular-meteor.collection","getUpdates","diffArray"]);angularMeteorObject.factory("AngularMeteorObject",["$q","$meteorSubscribe","$meteorUtils","diffArray","getUpdates","AngularMeteorCollection",function($q,$meteorSubscribe,$meteorUtils,diffArray,getUpdates,AngularMeteorCollection){AngularMeteorObject.$$internalProps=["$$collection","$$options","$$id","$$hashkey","$$internalProps","$$scope","bind","save","reset","subscribe","stop","autorunComputation","unregisterAutoBind","unregisterAutoDestroy","getRawObject","_auto","_setAutos","_eventEmitter","_serverBackup","_updateDiff","_updateParallel","_getId"];function AngularMeteorObject(collection,selector,options){console.warn("[angular-meteor.$meteorObject] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/meteorObject");var helpers=collection._helpers;var data=_.isFunction(helpers)?Object.create(helpers.prototype):{};var doc=collection.findOne(selector,options);var collectionExtension=_.pick(AngularMeteorCollection,"_updateParallel");_.extend(data,doc);_.extend(data,AngularMeteorObject);_.extend(data,collectionExtension);data.$$options=_.omit(options,"skip","limit");data.$$collection=collection;data.$$id=data._getId(selector);data._serverBackup=doc||{};return data}AngularMeteorObject.getRawObject=function(){return angular.copy(_.omit(this,this.$$internalProps))};AngularMeteorObject.subscribe=function(){$meteorSubscribe.subscribe.apply(this,arguments);return this};AngularMeteorObject.save=function(custom){var deferred=$q.defer();var collection=this.$$collection;var createFulfill=_.partial($meteorUtils.fulfill,deferred,null);var oldDoc=collection.findOne(this.$$id);var mods;if(oldDoc){if(custom)mods={$set:custom};else{mods=getUpdates(oldDoc,this.getRawObject());if(_.isEmpty(mods)){return $q.when({action:"updated"})}}this._updateDiff(mods,createFulfill({action:"updated"}))}else{if(custom)mods=_.clone(custom);else mods=this.getRawObject();mods._id=mods._id||this.$$id;collection.insert(mods,createFulfill({action:"inserted"}))}return deferred.promise};AngularMeteorObject._updateDiff=function(update,callback){var selector=this.$$id;AngularMeteorCollection._updateDiff.call(this,selector,update,callback)};AngularMeteorObject.reset=function(keepClientProps){var self=this;var options=this.$$options;var id=this.$$id;var doc=this.$$collection.findOne(id,options);if(doc){var docKeys=_.keys(doc);var docExtension=_.pick(doc,docKeys);var clientProps;_.extend(self,docExtension);_.extend(self._serverBackup,docExtension);if(keepClientProps){clientProps=_.intersection(_.keys(self),_.keys(self._serverBackup))}else{clientProps=_.keys(self)}var serverProps=_.keys(doc);var removedKeys=_.difference(clientProps,serverProps,self.$$internalProps);removedKeys.forEach(function(prop){delete self[prop];delete self._serverBackup[prop]})}else{_.keys(this.getRawObject()).forEach(function(prop){delete self[prop]});self._serverBackup={}}};AngularMeteorObject.stop=function(){if(this.unregisterAutoDestroy)this.unregisterAutoDestroy();if(this.unregisterAutoBind)this.unregisterAutoBind();if(this.autorunComputation&&this.autorunComputation.stop)this.autorunComputation.stop()};AngularMeteorObject._getId=function(selector){var options=_.extend({},this.$$options,{fields:{_id:1},reactive:false,transform:null});var doc=this.$$collection.findOne(selector,options);if(doc)return doc._id;if(selector instanceof Mongo.ObjectID)return selector;if(_.isString(selector))return selector;return new Mongo.ObjectID};return AngularMeteorObject}]);angularMeteorObject.factory("$meteorObject",["$rootScope","$meteorUtils","getUpdates","AngularMeteorObject",function($rootScope,$meteorUtils,getUpdates,AngularMeteorObject){function $meteorObject(collection,id,auto,options){if(!collection){throw new TypeError("The first argument of $meteorObject is undefined.")}if(!angular.isFunction(collection.findOne)){throw new TypeError("The first argument of $meteorObject must be a function or a have a findOne function property.")}var data=new AngularMeteorObject(collection,id,options);data._auto=auto!==false;_.extend(data,$meteorObject);data._setAutos();return data}$meteorObject._setAutos=function(){var self=this;this.autorunComputation=$meteorUtils.autorun($rootScope,function(){self.reset(true)});this.unregisterAutoBind=this._auto&&$rootScope.$watch(function(){return self.getRawObject()},function(item,oldItem){if(item!==oldItem)self.save()},true);this.unregisterAutoDestroy=$rootScope.$on("$destroy",function(){if(self&&self.stop)self.pop()})};return $meteorObject}]);angularMeteorObject.run(["$rootScope","$meteorObject","$meteorStopper",function($rootScope,$meteorObject,$meteorStopper){var scopeProto=Object.getPrototypeOf($rootScope);scopeProto.$meteorObject=$meteorStopper($meteorObject)}])}).call(this);(function(){"use strict";var angularMeteorUser=angular.module("angular-meteor.user",["angular-meteor.utils","angular-meteor.reactive-scope"]);angularMeteorUser.service("$meteorUser",["$rootScope","$meteorUtils","$q",function($rootScope,$meteorUtils,$q){var pack=Package["accounts-base"];if(!pack)return;var self=this;var Accounts=pack.Accounts;this.waitForUser=function(){console.warn("[angular-meteor.waitForUser] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! http://info.meteor.com/blog/angular-meteor-1.3");var deferred=$q.defer();$meteorUtils.autorun($rootScope,function(){if(!Meteor.loggingIn())deferred.resolve(Meteor.user())},true);return deferred.promise};this.requireUser=function(ignoreDeprecation){if(!ignoreDeprecation){console.warn("[angular-meteor.requireUser] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! http://info.meteor.com/blog/angular-meteor-1.3")}var deferred=$q.defer();$meteorUtils.autorun($rootScope,function(){if(!Meteor.loggingIn()){if(Meteor.user()==null)deferred.reject("AUTH_REQUIRED");else deferred.resolve(Meteor.user())}},true);return deferred.promise};this.requireValidUser=function(validatorFn){console.warn("[angular-meteor.requireValidUser] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! http://info.meteor.com/blog/angular-meteor-1.3");return self.requireUser(true).then(function(user){var valid=validatorFn(user);if(valid===true)return user;else if(typeof valid==="string")return $q.reject(valid);else return $q.reject("FORBIDDEN")})};this.loginWithPassword=$meteorUtils.promissor(Meteor,"loginWithPassword");this.createUser=$meteorUtils.promissor(Accounts,"createUser");this.changePassword=$meteorUtils.promissor(Accounts,"changePassword");this.forgotPassword=$meteorUtils.promissor(Accounts,"forgotPassword");this.resetPassword=$meteorUtils.promissor(Accounts,"resetPassword");this.verifyEmail=$meteorUtils.promissor(Accounts,"verifyEmail");this.logout=$meteorUtils.promissor(Meteor,"logout");this.logoutOtherClients=$meteorUtils.promissor(Meteor,"logoutOtherClients");this.loginWithFacebook=$meteorUtils.promissor(Meteor,"loginWithFacebook");this.loginWithTwitter=$meteorUtils.promissor(Meteor,"loginWithTwitter");this.loginWithGoogle=$meteorUtils.promissor(Meteor,"loginWithGoogle");this.loginWithGithub=$meteorUtils.promissor(Meteor,"loginWithGithub");this.loginWithMeteorDeveloperAccount=$meteorUtils.promissor(Meteor,"loginWithMeteorDeveloperAccount");this.loginWithMeetup=$meteorUtils.promissor(Meteor,"loginWithMeetup");this.loginWithWeibo=$meteorUtils.promissor(Meteor,"loginWithWeibo")}]);angularMeteorUser.run(["$rootScope",function($rootScope){console.warn("[angular-meteor.$rootScope.currentUser/loggingIn] Please note that this functionality has migrated to a separate package and will be deprecated in 1.4.0. For more info: http://www.angular-meteor.com/api/1.3.2/auth");$rootScope.autorun(function(){if(!Meteor.user)return;$rootScope.currentUser=Meteor.user();$rootScope.loggingIn=Meteor.loggingIn()},true)}])}).call(this);(function(){"use strict";var angularMeteorMethods=angular.module("angular-meteor.methods",["angular-meteor.utils"]);angularMeteorMethods.service("$meteorMethods",["$q","$meteorUtils",function($q,$meteorUtils){this.call=function(){console.warn("[angular-meteor.$meteor.call] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/methods");var deferred=$q.defer();var fulfill=$meteorUtils.fulfill(deferred);var args=_.toArray(arguments).concat(fulfill);Meteor.call.apply(this,args);return deferred.promise}}])}).call(this);(function(){"use strict";var angularMeteorSession=angular.module("angular-meteor.session",["angular-meteor.utils"]);angularMeteorSession.factory("$meteorSession",["$meteorUtils","$parse",function($meteorUtils,$parse){return function(session){return{bind:function(scope,model){console.warn("[angular-meteor.session.bind] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! http://www.angular-meteor.com/api/1.3.0/session");var getter=$parse(model);var setter=getter.assign;$meteorUtils.autorun(scope,function(){setter(scope,Session.get(session))});scope.$watch(model,function(newItem,oldItem){Session.set(session,getter(scope))},true)}}}}])}).call(this);(function(){var angularMeteorReactiveScope=angular.module("angular-meteor.reactive-scope",["angular-meteor.reactive"]);angularMeteorReactiveScope.run(["$rootScope","$reactive","$parse",function($rootScope,$reactive,$parse){var ReactiveScope=function(){function ReactiveScope(){babelHelpers.classCallCheck(this,ReactiveScope)}ReactiveScope.prototype.helpers=function(){function helpers(def){this.stopOnDestroy($reactive(this).helpers(def))}return helpers}();ReactiveScope.prototype.autorun=function(){function autorun(fn){return this.stopOnDestroy(Meteor.autorun(fn))}return autorun}();ReactiveScope.prototype.subscribe=function(){function subscribe(name,fn,resultCb){var _this=this;if(fn===undefined)fn=angular.noop;var result={};var autorunComp=this.autorun(function(){var _Meteor;var args=fn.apply(_this)||[];if(!angular.isArray(args)){throw new Error("[angular-meteor][ReactiveContext] The return value of arguments function in subscribe must be an array! ")}var subscriptionResult=(_Meteor=Meteor).subscribe.apply(_Meteor,[name].concat(args,[resultCb]));_this.stopOnDestroy(subscriptionResult);result.ready=subscriptionResult.ready.bind(subscriptionResult);result.subscriptionId=subscriptionResult.subscriptionId});result.stop=autorunComp.stop.bind(autorunComp);return result}return subscribe}();ReactiveScope.prototype.getReactively=function(){function getReactively(property,objectEquality){var _this2=this;if(!this.$$trackerDeps){this.$$trackerDeps={}}if(angular.isUndefined(objectEquality)){objectEquality=false}if(!this.$$trackerDeps[property]){this.$$trackerDeps[property]=new Tracker.Dependency;this.$watch(property,function(newVal,oldVal){if(newVal!==oldVal){_this2.$$trackerDeps[property].changed()}},objectEquality)}this.$$trackerDeps[property].depend();return $parse(property)(this)}return getReactively}();ReactiveScope.prototype.stopOnDestroy=function(){function stopOnDestroy(stoppable){this.$on("$destroy",function(){return stoppable.stop()});return stoppable}return stopOnDestroy}();return ReactiveScope}();angular.extend(Object.getPrototypeOf($rootScope),ReactiveScope.prototype)}])}).call(this);(function(){"use strict";var angularMeteorUtils=angular.module("angular-meteor.utils",[]);angularMeteorUtils.service("$meteorUtils",["$q","$timeout",function($q,$timeout){var self=this;this.autorun=function(scope,fn,ignoreDeprecation){if(!ignoreDeprecation){console.warn("[angular-meteor.utils.autorun] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.1/autorun")}var comp=Tracker.autorun(function(c){fn(c);if(!c.firstRun)$timeout(angular.noop,0)});scope.$on("$destroy",function(){comp.stop()});return comp};this.stripDollarPrefixedKeys=function(data){if(!_.isObject(data)||data instanceof Date||data instanceof File||EJSON.toJSONValue(data).$type==="oid"||typeof FS==="object"&&data instanceof FS.File)return data;var out=_.isArray(data)?[]:{};_.each(data,function(v,k){if(typeof k!=="string"||k.charAt(0)!=="$")out[k]=self.stripDollarPrefixedKeys(v)});return out};this.fulfill=function(deferred,boundError,boundResult){return function(err,result){if(err)deferred.reject(boundError==null?err:boundError);else if(typeof boundResult=="function")deferred.resolve(boundResult==null?result:boundResult(result));else deferred.resolve(boundResult==null?result:boundResult)}};this.promissor=function(obj,method){return function(){var deferred=$q.defer();var fulfill=self.fulfill(deferred);var args=_.toArray(arguments).concat(fulfill);obj[method].apply(obj,args);return deferred.promise}};this.promiseAll=function(promises){var allPromise=$q.all(promises);allPromise["finally"](function(){$timeout(angular.noop)});return allPromise};this.getCollectionByName=function(string){return Mongo.Collection.get(string)};this.findIndexById=function(collection,doc){var foundDoc=_.find(collection,function(colDoc){return EJSON.equals(colDoc._id,doc._id)});return _.indexOf(collection,foundDoc)}}]);angularMeteorUtils.run(["$rootScope","$meteorUtils",function($rootScope,$meteorUtils){Object.getPrototypeOf($rootScope).$meteorAutorun=function(fn){return $meteorUtils.autorun(this,fn)}}])}).call(this);(function(){"use strict";var angularMeteorCamera=angular.module("angular-meteor.camera",["angular-meteor.utils"]);angularMeteorCamera.service("$meteorCamera",["$q","$meteorUtils",function($q,$meteorUtils){console.warn("[angular-meteor.camera] Please note that this module has moved to a separate package and is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/camera");var pack=Package["mdg:camera"];if(!pack)return;var MeteorCamera=pack.MeteorCamera;this.getPicture=function(options){console.warn("[angular-meteor.camera] Please note that this module has moved to a separate package and is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/camera");options=options||{};var deferred=$q.defer();MeteorCamera.getPicture(options,$meteorUtils.fulfill(deferred));return deferred.promise}}])}).call(this);(function(){angular.module("angular-meteor.reactive",["angular-meteor.reactive-scope"]).factory("$reactive",["$rootScope","$parse",function($rootScope,$parse){var ReactiveContext=function(){function ReactiveContext(context){babelHelpers.classCallCheck(this,ReactiveContext);if(!context||!angular.isObject(context)){throw new Error("[angular-meteor][ReactiveContext] The context for ReactiveContext is required and must be an object!")}this.context=context;if(this._isScope(this.context)){this.scope=this.context}this.stoppables=[];this.propertiesTrackerDeps={};this.usingNewScope=false}ReactiveContext.prototype.attach=function(){function attach(scope){if(!this.scope&&this._isScope(scope)){this.scope=scope}return this}return attach}();ReactiveContext.prototype._isScope=function(){function _isScope(obj){return obj instanceof Object.getPrototypeOf($rootScope).constructor}return _isScope}();ReactiveContext.prototype._handleCursor=function(){function _handleCursor(cursor,name){var _this=this;if(angular.isUndefined(this.context[name])){this._setValHelper(name,cursor.fetch(),false)}else{var diff=jsondiffpatch.diff(this.context[name],cursor.fetch());jsondiffpatch.patch(this.context[name],diff)}var initial=true;var handle=cursor.observe({addedAt:function(doc,atIndex){if(!initial){_this.context[name].splice(atIndex,0,doc);_this._propertyChanged(name)}},changedAt:function(doc,oldDoc,atIndex){var diff=jsondiffpatch.diff(_this.context[name][atIndex],doc);jsondiffpatch.patch(_this.context[name][atIndex],diff);_this._propertyChanged(name)},movedTo:function(doc,fromIndex,toIndex){_this.context[name].splice(fromIndex,1);_this.context[name].splice(toIndex,0,doc);_this._propertyChanged(name)},removedAt:function(oldDoc,atIndex){_this.context[name].splice(atIndex,1);_this._propertyChanged(name)}});initial=false;return handle}return _handleCursor}();ReactiveContext.prototype._handleNonCursor=function(){function _handleNonCursor(data,name){if(angular.isUndefined(this.propertiesTrackerDeps[name])&&angular.isDefined(this.context[name])){console.warn("[angular-meteor][ReactiveContext] Your tried to create helper named '"+name+"' on your context, but there's already property with that name - angular-meteor will override it!");this.context[name]=undefined}if(angular.isUndefined(this.context[name])){this._setValHelper(name,data)}else{if(!_.isObject(data)&&!_.isArray(data)||!_.isObject(this.context[name])&&!_.isArray(this.context[name])){this.context[name]=data}else{var diff=jsondiffpatch.diff(this.context[name],data);jsondiffpatch.patch(this.context[name],diff);this._propertyChanged(name)}}}return _handleNonCursor}();ReactiveContext.prototype._verifyScope=function(){function _verifyScope(){if(!this.scope){this.usingNewScope=true;this.scope=$rootScope.$new(true)}}return _verifyScope}();ReactiveContext.prototype.helpers=function(){function helpers(props){var _this2=this;_.each(props,function(v,k){if(_.isFunction(v)){_this2._setFnHelper(k,v)}else{console.warn("[angular-meteor][helpers] Your tried to create helper for primitive '"+k+"', please note that this feature will be deprecated in 1.4 in favor of using 'getReactively' - http://www.angular-meteor.com/api/1.3.1/get-reactively");_this2._setValHelper(k,v);if(angular.isObject(v)){_this2.getReactively(k,true)}}});return this}return helpers}();ReactiveContext.prototype.getReactively=function(){function getReactively(k,objectEquality){var _this3=this;var context=this.context;if(angular.isUndefined(objectEquality)){objectEquality=false}this._verifyScope();var currentValue=$parse(k)(context);if(!this.propertiesTrackerDeps[k]){(function(){var initialValue=currentValue;_this3.propertiesTrackerDeps[k]=new Tracker.Dependency;_this3.scope.$watch(function(){return $parse(k)(context)},function(newValue,oldValue){if(newValue!==oldValue||newValue!==initialValue){_this3.propertiesTrackerDeps[k].changed()}},objectEquality)})()}this.propertiesTrackerDeps[k].depend();return currentValue}return getReactively}();ReactiveContext.prototype._setValHelper=function(){function _setValHelper(k,v){var _this4=this;var addWatcher=arguments.length<=2||arguments[2]===undefined?true:arguments[2];if(addWatcher){this.getReactively(k,true)}this.propertiesTrackerDeps[k]=new Tracker.Dependency;v=_.clone(v);Object.defineProperty(this.context,k,{configurable:true,enumerable:true,get:function(){_this4.propertiesTrackerDeps[k].depend();return v},set:function(newValue){v=newValue;_this4._propertyChanged(k)}})}return _setValHelper}();ReactiveContext.prototype._setFnHelper=function(){function _setFnHelper(k,fn){var _this5=this;this.stoppables.push(Tracker.autorun(function(comp){var data=fn.apply(_this5.context);Tracker.nonreactive(function(){if(_this5._isMeteorCursor(data)){(function(){var stoppableObservation=_this5._handleCursor(data,k);comp.onInvalidate(function(){stoppableObservation.stop();_this5.context[k].splice(0)})})()}else{_this5._handleNonCursor(data,k)}_this5._propertyChanged(k)})}))}return _setFnHelper}();ReactiveContext.prototype._isMeteorCursor=function(){function _isMeteorCursor(obj){return obj instanceof Mongo.Collection.Cursor}return _isMeteorCursor}();ReactiveContext.prototype._propertyChanged=function(){function _propertyChanged(k){if(this.scope&&!this.scope.$$destroyed&&!$rootScope.$$phase){ -this.scope.$digest()}this.propertiesTrackerDeps[k].changed()}return _propertyChanged}();ReactiveContext.prototype.subscribe=function(){function subscribe(name,fn,resultCb){var _this6=this;if(!angular.isString(name)){throw new Error("[angular-meteor][ReactiveContext] The first argument of 'subscribe' method must be a string!")}var result={};fn=fn||angular.noop;resultCb=resultCb||angular.noop;if(!angular.isFunction(fn)){throw new Error("[angular-meteor][ReactiveContext] The second argument of 'subscribe' method must be a function!")}if(this.scope&&this.scope!==this.context){result=this.scope.subscribe(name,fn,resultCb);this.stoppables.push(result)}else{var autorunComp=this.autorun(function(){var _Meteor;var args=fn.apply(_this6.context)||[];if(!angular.isArray(args)){throw new Error("[angular-meteor][ReactiveContext] The return value of arguments function in subscribe must be an array! ")}var subscriptionResult=(_Meteor=Meteor).subscribe.apply(_Meteor,[name].concat(args,[resultCb]));result.ready=subscriptionResult.ready.bind(subscriptionResult);result.subscriptionId=subscriptionResult.subscriptionId});result.stop=autorunComp.stop.bind(autorunComp)}return result}return subscribe}();ReactiveContext.prototype.autorun=function(){function autorun(fn){if(this.scope&&this.scope!==this.context){return this.scope.autorun(fn)}else{var stoppable=Meteor.autorun(fn);this.stoppables.push(stoppable);return stoppable}}return autorun}();ReactiveContext.prototype.stop=function(){function stop(){angular.forEach(this.stoppables,function(stoppable){stoppable.stop()});this.stoppables=[];if(this.usingNewScope){this.scope.$destroy();this.scope=undefined}return this}return stop}();return ReactiveContext}();return function(context){var reactiveContext=new ReactiveContext(context);_.keys(ReactiveContext.prototype).filter(function(k){return k.charAt(0)!="_"}).forEach(function(k){return context[k]=reactiveContext[k].bind(reactiveContext)});return reactiveContext}}])}).call(this);(function(){var angularMeteor=angular.module("angular-meteor",["angular-meteor.subscribe","angular-meteor.collection","angular-meteor.object","angular-meteor.user","angular-meteor.methods","angular-meteor.session","angular-meteor.reactive-scope","angular-meteor.utils","angular-meteor.camera","angular-meteor.reactive"]);angularMeteor.run(["$compile","$document","$rootScope",function($compile,$document,$rootScope){if(Package["iron:router"]){var appLoaded=false;Package["iron:router"].Router.onAfterAction(function(req,res,next){Tracker.afterFlush(function(){if(!appLoaded){$compile($document)($rootScope);if(!$rootScope.$$phase)$rootScope.$apply();appLoaded=true}})})}}]);angularMeteor.service("$meteor",["$meteorCollection","$meteorCollectionFS","$meteorObject","$meteorMethods","$meteorSession","$meteorSubscribe","$meteorUtils","$meteorCamera","$meteorUser",function($meteorCollection,$meteorCollectionFS,$meteorObject,$meteorMethods,$meteorSession,$meteorSubscribe,$meteorUtils,$meteorCamera,$meteorUser){this.collection=$meteorCollection;this.collectionFS=$meteorCollectionFS;this.object=$meteorObject;this.subscribe=$meteorSubscribe.subscribe;this.call=$meteorMethods.call;this.loginWithPassword=$meteorUser.loginWithPassword;this.requireUser=$meteorUser.requireUser;this.requireValidUser=$meteorUser.requireValidUser;this.waitForUser=$meteorUser.waitForUser;this.createUser=$meteorUser.createUser;this.changePassword=$meteorUser.changePassword;this.forgotPassword=$meteorUser.forgotPassword;this.resetPassword=$meteorUser.resetPassword;this.verifyEmail=$meteorUser.verifyEmail;this.loginWithMeteorDeveloperAccount=$meteorUser.loginWithMeteorDeveloperAccount;this.loginWithFacebook=$meteorUser.loginWithFacebook;this.loginWithGithub=$meteorUser.loginWithGithub;this.loginWithGoogle=$meteorUser.loginWithGoogle;this.loginWithMeetup=$meteorUser.loginWithMeetup;this.loginWithTwitter=$meteorUser.loginWithTwitter;this.loginWithWeibo=$meteorUser.loginWithWeibo;this.logout=$meteorUser.logout;this.logoutOtherClients=$meteorUser.logoutOtherClients;this.session=$meteorSession;this.autorun=$meteorUtils.autorun;this.getCollectionByName=$meteorUtils.getCollectionByName;this.getPicture=$meteorCamera.getPicture}])}).call(this);if(typeof Package==="undefined")Package={};Package["angular-meteor-data"]={}})(); \ No newline at end of file +(function(){var Meteor=Package.meteor.Meteor;var _=Package.underscore._;var Base64=Package.base64.Base64;var EJSON,EJSONTest;(function(){EJSON={};EJSONTest={};var customTypes={};EJSON.addType=function(name,factory){if(_.has(customTypes,name))throw new Error("Type "+name+" already present");customTypes[name]=factory};var isInfOrNan=function(obj){return _.isNaN(obj)||obj===Infinity||obj===-Infinity};var builtinConverters=[{matchJSONValue:function(obj){return _.has(obj,"$date")&&_.size(obj)===1},matchObject:function(obj){return obj instanceof Date},toJSONValue:function(obj){return{$date:obj.getTime()}},fromJSONValue:function(obj){return new Date(obj.$date)}},{matchJSONValue:function(obj){return _.has(obj,"$InfNaN")&&_.size(obj)===1},matchObject:isInfOrNan,toJSONValue:function(obj){var sign;if(_.isNaN(obj))sign=0;else if(obj===Infinity)sign=1;else sign=-1;return{$InfNaN:sign}},fromJSONValue:function(obj){return obj.$InfNaN/0}},{matchJSONValue:function(obj){return _.has(obj,"$binary")&&_.size(obj)===1},matchObject:function(obj){return typeof Uint8Array!=="undefined"&&obj instanceof Uint8Array||obj&&_.has(obj,"$Uint8ArrayPolyfill")},toJSONValue:function(obj){return{$binary:Base64.encode(obj)}},fromJSONValue:function(obj){return Base64.decode(obj.$binary)}},{matchJSONValue:function(obj){return _.has(obj,"$escape")&&_.size(obj)===1},matchObject:function(obj){if(_.isEmpty(obj)||_.size(obj)>2){return false}return _.any(builtinConverters,function(converter){return converter.matchJSONValue(obj)})},toJSONValue:function(obj){var newObj={};_.each(obj,function(value,key){newObj[key]=EJSON.toJSONValue(value)});return{$escape:newObj}},fromJSONValue:function(obj){var newObj={};_.each(obj.$escape,function(value,key){newObj[key]=EJSON.fromJSONValue(value)});return newObj}},{matchJSONValue:function(obj){return _.has(obj,"$type")&&_.has(obj,"$value")&&_.size(obj)===2},matchObject:function(obj){return EJSON._isCustomType(obj)},toJSONValue:function(obj){var jsonValue=Meteor._noYieldsAllowed(function(){return obj.toJSONValue()});return{$type:obj.typeName(),$value:jsonValue}},fromJSONValue:function(obj){var typeName=obj.$type;if(!_.has(customTypes,typeName))throw new Error("Custom EJSON type "+typeName+" is not defined");var converter=customTypes[typeName];return Meteor._noYieldsAllowed(function(){return converter(obj.$value)})}}];EJSON._isCustomType=function(obj){return obj&&typeof obj.toJSONValue==="function"&&typeof obj.typeName==="function"&&_.has(customTypes,obj.typeName())};EJSON._getTypes=function(){return customTypes};EJSON._getConverters=function(){return builtinConverters};var adjustTypesToJSONValue=EJSON._adjustTypesToJSONValue=function(obj){if(obj===null)return null;var maybeChanged=toJSONValueHelper(obj);if(maybeChanged!==undefined)return maybeChanged;if(typeof obj!=="object")return obj;_.each(obj,function(value,key){if(typeof value!=="object"&&value!==undefined&&!isInfOrNan(value))return;var changed=toJSONValueHelper(value);if(changed){obj[key]=changed;return}adjustTypesToJSONValue(value)});return obj};var toJSONValueHelper=function(item){for(var i=0;i=bKeys.length){return false}if(x!==bKeys[i]){return false}if(!EJSON.equals(val,b[bKeys[i]],options)){return false}i++;return true});return ret&&i===bKeys.length}else{i=0;ret=_.all(a,function(val,key){if(!_.has(b,key)){return false}if(!EJSON.equals(val,b[key],options)){return false}i++;return true});return ret&&_.size(b)===i}};EJSON.clone=function(v){var ret;if(typeof v!=="object")return v;if(v===null)return null;if(v instanceof Date)return new Date(v.getTime());if(v instanceof RegExp)return v;if(EJSON.isBinary(v)){ret=EJSON.newBinary(v.length);for(var i=0;i0){if(old_idx_seq(seq_ends[j-1])max_seq_len)max_seq_len=j+1}}var idx=max_seq_len===0?-1:seq_ends[max_seq_len-1];while(idx>=0){unmoved.push(idx);idx=ptrs[idx]}unmoved.reverse();unmoved.push(new_results.length);_.each(old_results,function(doc){if(!new_presence_of_id[doc._id])observer.removed&&observer.removed(doc._id)});var startOfGroup=0;_.each(unmoved,function(endOfGroup){var groupId=new_results[endOfGroup]?new_results[endOfGroup]._id:null;var oldDoc,newDoc,fields,projectedNew,projectedOld;for(var i=startOfGroup;i=position)posCur[id]++})}lengthCur++;posCur[idStringify(id)]=position;callbacks.addedAt(id,seqArray[posNew[idStringify(id)]].item,position,before)},movedBefore:function(id,before){if(id===before)return;var oldPosition=posCur[idStringify(id)];var newPosition=before?posCur[idStringify(before)]:lengthCur;if(newPosition>oldPosition){newPosition--}_.each(posCur,function(elCurPosition,id){if(oldPosition=prevPosition)posCur[id]--});delete posCur[idStringify(id)];lengthCur--;callbacks.removedAt(id,lastSeqArray[posOld[idStringify(id)]].item,prevPosition)}});_.each(posNew,function(pos,idString){var id=idParse(idString);if(_.has(posOld,idString)){var newItem=seqArray[pos].item;var oldItem=lastSeqArray[posOld[idString]].item;if(typeof newItem==="object"||newItem!==oldItem)callbacks.changedAt(id,newItem,oldItem,pos)}})};seqChangedToEmpty=function(lastSeqArray,callbacks){return[]};seqChangedToArray=function(lastSeqArray,array,callbacks){var idsUsed={};var seqArray=_.map(array,function(item,index){var id;if(typeof item==="string"){id="-"+item}else if(typeof item==="number"||typeof item==="boolean"||item===undefined){id=item}else if(typeof item==="object"){id=item&&_.has(item,"_id")?item._id:index}else{throw new Error("{{#each}} doesn't support arrays with "+"elements of type "+typeof item)}var idString=idStringify(id);if(idsUsed[idString]){if(typeof item==="object"&&"_id"in item)warn("duplicate id "+id+" in",array);id=Random.id()}else{idsUsed[idString]=true}return{_id:id,item:item}});return seqArray};seqChangedToCursor=function(lastSeqArray,cursor,callbacks){var initial=true;var seqArray=[];var observeHandle=cursor.observe({addedAt:function(document,atIndex,before){if(initial){if(before!==null)throw new Error("Expected initial data from observe in order");seqArray.push({_id:document._id,item:document})}else{callbacks.addedAt(document._id,document,atIndex,before)}},changedAt:function(newDocument,oldDocument,atIndex){callbacks.changedAt(newDocument._id,newDocument,oldDocument,atIndex)},removedAt:function(oldDocument,atIndex){callbacks.removedAt(oldDocument._id,oldDocument,atIndex)},movedTo:function(document,fromIndex,toIndex,before){callbacks.movedTo(document._id,document,fromIndex,toIndex,before)}});initial=false;return[seqArray,observeHandle]}}).call(this);if(typeof Package==="undefined")Package={};Package["observe-sequence"]={ObserveSequence:ObserveSequence}})();(function(){var Meteor=Package.meteor.Meteor;var ECMAScript;if(typeof Package==="undefined")Package={};Package.ecmascript={ECMAScript:ECMAScript}})();(function(){var Meteor=Package.meteor.Meteor;var babelHelpers;(function(){var hasOwn=Object.prototype.hasOwnProperty;function canDefineNonEnumerableProperties(){var testObj={};var testPropName="t";try{Object.defineProperty(testObj,testPropName,{enumerable:false,value:testObj});for(var k in testObj){if(k===testPropName){return false}}}catch(e){return false}return testObj[testPropName]===testObj}babelHelpers={sanitizeForInObject:canDefineNonEnumerableProperties()?function(value){return value}:function(obj){if(Array.isArray(obj)){var newObj={};var keys=Object.keys(obj);var keyCount=keys.length;for(var i=0;ii)$defineProperty(it,key=keys[i++],P[key]);return it};var $create=function create(it,P){return P===undefined?_create(it):$defineProperties(_create(it),P)};var $propertyIsEnumerable=function propertyIsEnumerable(key){var E=isEnum.call(this,key);return E||!has(this,key)||!has(AllSymbols,key)||has(this,HIDDEN)&&this[HIDDEN][key]?E:true};var $getOwnPropertyDescriptor=function getOwnPropertyDescriptor(it,key){var D=getDesc(it=toIObject(it),key);if(D&&has(AllSymbols,key)&&!(has(it,HIDDEN)&&it[HIDDEN][key]))D.enumerable=true;return D};var $getOwnPropertyNames=function getOwnPropertyNames(it){var names=getNames(toIObject(it)),result=[],i=0,key;while(names.length>i)if(!has(AllSymbols,key=names[i++])&&key!=HIDDEN)result.push(key);return result};var $getOwnPropertySymbols=function getOwnPropertySymbols(it){var names=getNames(toIObject(it)),result=[],i=0,key;while(names.length>i)if(has(AllSymbols,key=names[i++]))result.push(AllSymbols[key]);return result};var $stringify=function stringify(it){var args=[it],i=1,replacer,$replacer;while(arguments.length>i)args.push(arguments[i++]);replacer=args[1];if(typeof replacer=="function")$replacer=replacer;if($replacer||!isArray(replacer))replacer=function(key,value){if($replacer)value=$replacer.call(this,key,value);if(!isSymbol(value))return value};args[1]=replacer;return _stringify.apply($JSON,args)};var buggyJSON=$fails(function(){var S=$Symbol();return _stringify([S])!="[null]"||_stringify({a:S})!="{}"||_stringify(Object(S))!="{}"});if(!useNative){$Symbol=function Symbol(){if(isSymbol(this))throw TypeError("Symbol is not a constructor");return wrap(uid(arguments[0]))};$redef($Symbol.prototype,"toString",function toString(){return this._k});isSymbol=function(it){return it instanceof $Symbol};$.create=$create;$.isEnum=$propertyIsEnumerable;$.getDesc=$getOwnPropertyDescriptor;$.setDesc=$defineProperty;$.setDescs=$defineProperties;$.getNames=$names.get=$getOwnPropertyNames;$.getSymbols=$getOwnPropertySymbols;if(SUPPORT_DESC&&!__webpack_require__(27)){$redef(ObjectProto,"propertyIsEnumerable",$propertyIsEnumerable,true)}}var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=$Symbol(key)},keyFor:function keyFor(key){return keyOf(SymbolRegistry,key)},useSetter:function(){setter=true},useSimple:function(){setter=false}};$.each.call(("hasInstance,isConcatSpreadable,iterator,match,replace,search,"+"species,split,toPrimitive,toStringTag,unscopables").split(","),function(it){var sym=wks(it);symbolStatics[it]=useNative?sym:wrap(sym)});setter=true;$def($def.G+$def.W,{Symbol:$Symbol});$def($def.S,"Symbol",symbolStatics);$def($def.S+$def.F*!useNative,"Object",{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols});$JSON&&$def($def.S+$def.F*(!useNative||buggyJSON),"JSON",{stringify:$stringify});setTag($Symbol,"Symbol");setTag(Math,"Math",true);setTag(global.JSON,"JSON",true)},function(module,exports){var $Object=Object;module.exports={create:$Object.create,getProto:$Object.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:$Object.getOwnPropertyDescriptor,setDesc:$Object.defineProperty,setDescs:$Object.defineProperties,getKeys:$Object.keys,getNames:$Object.getOwnPropertyNames,getSymbols:$Object.getOwnPropertySymbols,each:[].forEach}},function(module,exports){var UNDEFINED="undefined";var global=module.exports=typeof window!=UNDEFINED&&window.Math==Math?window:typeof self!=UNDEFINED&&self.Math==Math?self:Function("return this")();if(typeof __g=="number")__g=global},function(module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},function(module,exports,__webpack_require__){module.exports=!__webpack_require__(7)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(module,exports){ +module.exports=function(exec){try{return!!exec()}catch(e){return true}}},function(module,exports,__webpack_require__){var global=__webpack_require__(4),core=__webpack_require__(9),hide=__webpack_require__(10),$redef=__webpack_require__(12),PROTOTYPE="prototype";var ctx=function(fn,that){return function(){return fn.apply(that,arguments)}};var $def=function(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,isProto=type&$def.P,target=isGlobal?global:type&$def.S?global[name]||(global[name]={}):(global[name]||{})[PROTOTYPE],exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;out=(own?target:source)[key];if(type&$def.B&&own)exp=ctx(out,global);else exp=isProto&&typeof out=="function"?ctx(Function.call,out):out;if(target&&!own)$redef(target,key,out);if(exports[key]!=out)hide(exports,key,exp);if(isProto)(exports[PROTOTYPE]||(exports[PROTOTYPE]={}))[key]=out}};global.core=core;$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;module.exports=$def},function(module,exports){var core=module.exports={version:"1.2.1"};if(typeof __e=="number")__e=core},function(module,exports,__webpack_require__){var $=__webpack_require__(3),createDesc=__webpack_require__(11);module.exports=__webpack_require__(6)?function(object,key,value){return $.setDesc(object,key,createDesc(1,value))}:function(object,key,value){object[key]=value;return object}},function(module,exports){module.exports=function(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}},function(module,exports,__webpack_require__){var global=__webpack_require__(4),hide=__webpack_require__(10),SRC=__webpack_require__(13)("src"),TO_STRING="toString",$toString=Function[TO_STRING],TPL=(""+$toString).split(TO_STRING);__webpack_require__(9).inspectSource=function(it){return $toString.call(it)};(module.exports=function(O,key,val,safe){if(typeof val=="function"){hide(val,SRC,O[key]?""+O[key]:TPL.join(String(key)));if(!("name"in val))val.name=key}if(O===global){O[key]=val}else{if(!safe)delete O[key];hide(O,key,val)}})(Function.prototype,TO_STRING,function toString(){return typeof this=="function"&&this[SRC]||$toString.call(this)})},function(module,exports){var id=0,px=Math.random();module.exports=function(key){return"Symbol(".concat(key===undefined?"":key,")_",(++id+px).toString(36))}},function(module,exports,__webpack_require__){var global=__webpack_require__(4),SHARED="__core-js_shared__",store=global[SHARED]||(global[SHARED]={});module.exports=function(key){return store[key]||(store[key]={})}},function(module,exports,__webpack_require__){var has=__webpack_require__(5),hide=__webpack_require__(10),TAG=__webpack_require__(16)("toStringTag");module.exports=function(it,tag,stat){if(it&&!has(it=stat?it:it.prototype,TAG))hide(it,TAG,tag)}},function(module,exports,__webpack_require__){var store=__webpack_require__(14)("wks"),Symbol=__webpack_require__(4).Symbol;module.exports=function(name){return store[name]||(store[name]=Symbol&&Symbol[name]||(Symbol||__webpack_require__(13))("Symbol."+name))}},function(module,exports,__webpack_require__){var $=__webpack_require__(3),toIObject=__webpack_require__(18);module.exports=function(object,el){var O=toIObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},function(module,exports,__webpack_require__){var IObject=__webpack_require__(19),defined=__webpack_require__(21);module.exports=function(it){return IObject(defined(it))}},function(module,exports,__webpack_require__){var cof=__webpack_require__(20);module.exports=0 in Object("z")?Object:function(it){return cof(it)=="String"?it.split(""):Object(it)}},function(module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},function(module,exports){module.exports=function(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}},function(module,exports,__webpack_require__){var toString={}.toString,toIObject=__webpack_require__(18),getNames=__webpack_require__(3).getNames;var windowNames=typeof window=="object"&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];var getWindowNames=function(it){try{return getNames(it)}catch(e){return windowNames.slice()}};module.exports.get=function getOwnPropertyNames(it){if(windowNames&&toString.call(it)=="[object Window]")return getWindowNames(it);return getNames(toIObject(it))}},function(module,exports,__webpack_require__){var $=__webpack_require__(3);module.exports=function(it){var keys=$.getKeys(it),getSymbols=$.getSymbols;if(getSymbols){var symbols=getSymbols(it),isEnum=$.isEnum,i=0,key;while(symbols.length>i)if(isEnum.call(it,key=symbols[i++]))keys.push(key)}return keys}},function(module,exports,__webpack_require__){var cof=__webpack_require__(20);module.exports=Array.isArray||function(arg){return cof(arg)=="Array"}},function(module,exports){module.exports=function(it){return typeof it==="object"?it!==null:typeof it==="function"}},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);module.exports=function(it){if(!isObject(it))throw TypeError(it+" is not an object!");return it}},function(module,exports){module.exports=false},function(module,exports,__webpack_require__){var $def=__webpack_require__(8);$def($def.S+$def.F,"Object",{assign:__webpack_require__(29)})},function(module,exports,__webpack_require__){var toObject=__webpack_require__(30),IObject=__webpack_require__(19),enumKeys=__webpack_require__(23),has=__webpack_require__(5);module.exports=__webpack_require__(7)(function(){var a=Object.assign,A={},B={},S=Symbol(),K="abcdefghijklmnopqrst";A[S]=7;K.split("").forEach(function(k){B[k]=k});return a({},A)[S]!=7||Object.keys(a({},B)).join("")!=K})?function assign(target,source){var T=toObject(target),l=arguments.length,i=1;while(l>i){var S=IObject(arguments[i++]),keys=enumKeys(S),length=keys.length,j=0,key;while(length>j)if(has(S,key=keys[j++]))T[key]=S[key]}return T}:Object.assign},function(module,exports,__webpack_require__){var defined=__webpack_require__(21);module.exports=function(it){return Object(defined(it))}},function(module,exports,__webpack_require__){var $def=__webpack_require__(8);$def($def.S,"Object",{is:__webpack_require__(32)})},function(module,exports){module.exports=Object.is||function is(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}},function(module,exports,__webpack_require__){var $def=__webpack_require__(8);$def($def.S,"Object",{setPrototypeOf:__webpack_require__(34).set})},function(module,exports,__webpack_require__){var getDesc=__webpack_require__(3).getDesc,isObject=__webpack_require__(25),anObject=__webpack_require__(26);var check=function(O,proto){anObject(O);if(!isObject(proto)&&proto!==null)throw TypeError(proto+": can't set as prototype!")};module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(test,buggy,set){try{set=__webpack_require__(35)(Function.call,getDesc(Object.prototype,"__proto__").set,2);set(test,[]);buggy=!(test instanceof Array)}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}({},false):undefined),check:check}},function(module,exports,__webpack_require__){var aFunction=__webpack_require__(36);module.exports=function(fn,that,length){aFunction(fn);if(that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},function(module,exports){module.exports=function(it){if(typeof it!="function")throw TypeError(it+" is not a function!");return it}},function(module,exports,__webpack_require__){"use strict";var classof=__webpack_require__(38),test={};test[__webpack_require__(16)("toStringTag")]="z";if(test+""!="[object z]"){__webpack_require__(12)(Object.prototype,"toString",function toString(){return"[object "+classof(this)+"]"},true)}},function(module,exports,__webpack_require__){var cof=__webpack_require__(20),TAG=__webpack_require__(16)("toStringTag"),ARG=cof(function(){return arguments}())=="Arguments";module.exports=function(it){var O,T,B;return it===undefined?"Undefined":it===null?"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:ARG?cof(O):(B=cof(O))=="Object"&&typeof O.callee=="function"?"Arguments":B}},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("freeze",function($freeze){return function freeze(it){return $freeze&&isObject(it)?$freeze(it):it}})},function(module,exports,__webpack_require__){module.exports=function(KEY,exec){var $def=__webpack_require__(8),fn=(__webpack_require__(9).Object||{})[KEY]||Object[KEY],exp={};exp[KEY]=exec(fn);$def($def.S+$def.F*__webpack_require__(7)(function(){fn(1)}),"Object",exp)}},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("seal",function($seal){return function seal(it){return $seal&&isObject(it)?$seal(it):it}})},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("preventExtensions",function($preventExtensions){return function preventExtensions(it){return $preventExtensions&&isObject(it)?$preventExtensions(it):it}})},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("isFrozen",function($isFrozen){return function isFrozen(it){return isObject(it)?$isFrozen?$isFrozen(it):false:true}})},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("isSealed",function($isSealed){return function isSealed(it){return isObject(it)?$isSealed?$isSealed(it):false:true}})},function(module,exports,__webpack_require__){var isObject=__webpack_require__(25);__webpack_require__(40)("isExtensible",function($isExtensible){return function isExtensible(it){return isObject(it)?$isExtensible?$isExtensible(it):true:false}})},function(module,exports,__webpack_require__){var toIObject=__webpack_require__(18);__webpack_require__(40)("getOwnPropertyDescriptor",function($getOwnPropertyDescriptor){return function getOwnPropertyDescriptor(it,key){return $getOwnPropertyDescriptor(toIObject(it),key)}})},function(module,exports,__webpack_require__){var toObject=__webpack_require__(30);__webpack_require__(40)("getPrototypeOf",function($getPrototypeOf){return function getPrototypeOf(it){return $getPrototypeOf(toObject(it))}})},function(module,exports,__webpack_require__){var toObject=__webpack_require__(30);__webpack_require__(40)("keys",function($keys){return function keys(it){return $keys(toObject(it))}})},function(module,exports,__webpack_require__){__webpack_require__(40)("getOwnPropertyNames",function(){return __webpack_require__(22).get})},function(module,exports,__webpack_require__){__webpack_require__(51);__webpack_require__(57);__webpack_require__(63);__webpack_require__(64);__webpack_require__(66);__webpack_require__(69);__webpack_require__(72);__webpack_require__(74);__webpack_require__(76);module.exports=__webpack_require__(9).Array},function(module,exports,__webpack_require__){"use strict";var $at=__webpack_require__(52)(true);__webpack_require__(54)(String,"String",function(iterated){this._t=String(iterated);this._i=0},function(){var O=this._t,index=this._i,point;if(index>=O.length)return{value:undefined,done:true};point=$at(O,index);this._i+=point.length;return{value:point,done:false}})},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(53),defined=__webpack_require__(21);module.exports=function(TO_STRING){return function(that,pos){var s=String(defined(that)),i=toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},function(module,exports){var ceil=Math.ceil,floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}},function(module,exports,__webpack_require__){"use strict";var LIBRARY=__webpack_require__(27),$def=__webpack_require__(8),$redef=__webpack_require__(12),hide=__webpack_require__(10),has=__webpack_require__(5),SYMBOL_ITERATOR=__webpack_require__(16)("iterator"),Iterators=__webpack_require__(55),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values";var returnThis=function(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){__webpack_require__(56)(Constructor,NAME,next);var createMethod=function(kind){switch(kind){case KEYS:return function keys(){return new Constructor(this,kind)};case VALUES:return function values(){return new Constructor(this,kind)}}return function entries(){return new Constructor(this,kind)}};var TAG=NAME+" Iterator",proto=Base.prototype,_native=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],_default=_native||createMethod(DEFAULT),methods,key;if(_native){var IteratorPrototype=__webpack_require__(3).getProto(_default.call(new Base));__webpack_require__(15)(IteratorPrototype,TAG,true);if(!LIBRARY&&has(proto,FF_ITERATOR))hide(IteratorPrototype,SYMBOL_ITERATOR,returnThis)}if(!LIBRARY||FORCE)hide(proto,SYMBOL_ITERATOR,_default);Iterators[NAME]=_default;Iterators[TAG]=returnThis;if(DEFAULT){methods={keys:IS_SET?_default:createMethod(KEYS),values:DEFAULT==VALUES?_default:createMethod(VALUES),entries:DEFAULT!=VALUES?_default:createMethod("entries")};if(FORCE)for(key in methods){if(!(key in proto))$redef(proto,key,methods[key])}else $def($def.P+$def.F*BUGGY,NAME,methods)}}},function(module,exports){module.exports={}},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),IteratorPrototype={};__webpack_require__(10)(IteratorPrototype,__webpack_require__(16)("iterator"),function(){return this});module.exports=function(Constructor,NAME,next){Constructor.prototype=$.create(IteratorPrototype,{next:__webpack_require__(11)(1,next)});__webpack_require__(15)(Constructor,NAME+" Iterator")}},function(module,exports,__webpack_require__){"use strict";var ctx=__webpack_require__(35),$def=__webpack_require__(8),toObject=__webpack_require__(30),call=__webpack_require__(58),isArrayIter=__webpack_require__(59),toLength=__webpack_require__(60),getIterFn=__webpack_require__(61);$def($def.S+$def.F*!__webpack_require__(62)(function(iter){Array.from(iter)}),"Array",{from:function from(arrayLike){var O=toObject(arrayLike),C=typeof this=="function"?this:Array,mapfn=arguments[1],mapping=mapfn!==undefined,index=0,iterFn=getIterFn(O),length,result,step,iterator;if(mapping)mapfn=ctx(mapfn,arguments[2],2);if(iterFn!=undefined&&!(C==Array&&isArrayIter(iterFn))){for(iterator=iterFn.call(O),result=new C;!(step=iterator.next()).done;index++){result[index]=mapping?call(iterator,mapfn,[step.value,index],true):step.value}}else{length=toLength(O.length);for(result=new C(length);length>index;index++){result[index]=mapping?mapfn(O[index],index):O[index]}}result.length=index;return result}})},function(module,exports,__webpack_require__){var anObject=__webpack_require__(26);module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator["return"];if(ret!==undefined)anObject(ret.call(iterator));throw e}}},function(module,exports,__webpack_require__){var Iterators=__webpack_require__(55),ITERATOR=__webpack_require__(16)("iterator");module.exports=function(it){return(Iterators.Array||Array.prototype[ITERATOR])===it}},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(53),min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),9007199254740991):0}},function(module,exports,__webpack_require__){var classof=__webpack_require__(38),ITERATOR=__webpack_require__(16)("iterator"),Iterators=__webpack_require__(55);module.exports=__webpack_require__(9).getIteratorMethod=function(it){if(it!=undefined)return it[ITERATOR]||it["@@iterator"]||Iterators[classof(it)]}},function(module,exports,__webpack_require__){var SYMBOL_ITERATOR=__webpack_require__(16)("iterator"),SAFE_CLOSING=false;try{var riter=[7][SYMBOL_ITERATOR]();riter["return"]=function(){SAFE_CLOSING=true};Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec){if(!SAFE_CLOSING)return false;var safe=false;try{var arr=[7],iter=arr[SYMBOL_ITERATOR]();iter.next=function(){safe=true};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return safe}},function(module,exports,__webpack_require__){"use strict";var $def=__webpack_require__(8);$def($def.S+$def.F*__webpack_require__(7)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){var index=0,length=arguments.length,result=new(typeof this=="function"?this:Array)(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}})},function(module,exports,__webpack_require__){__webpack_require__(65)(Array)},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),SPECIES=__webpack_require__(16)("species");module.exports=function(C){if(__webpack_require__(6)&&!(SPECIES in C))$.setDesc(C,SPECIES,{configurable:true,get:function(){return this}})}},function(module,exports,__webpack_require__){"use strict";var setUnscope=__webpack_require__(67),step=__webpack_require__(68),Iterators=__webpack_require__(55),toIObject=__webpack_require__(18);__webpack_require__(54)(Array,"Array",function(iterated,kind){this._t=toIObject(iterated);this._i=0;this._k=kind},function(){var O=this._t,kind=this._k,index=this._i++;if(!O||index>=O.length){this._t=undefined;return step(1)}if(kind=="keys")return step(0,index);if(kind=="values")return step(0,O[index]);return step(0,[index,O[index]])},"values");Iterators.Arguments=Iterators.Array;setUnscope("keys");setUnscope("values");setUnscope("entries")},function(module,exports,__webpack_require__){var UNSCOPABLES=__webpack_require__(16)("unscopables");if([][UNSCOPABLES]==undefined)__webpack_require__(10)(Array.prototype,UNSCOPABLES,{});module.exports=function(key){[][UNSCOPABLES][key]=true}},function(module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},function(module,exports,__webpack_require__){"use strict";var $def=__webpack_require__(8);$def($def.P,"Array",{copyWithin:__webpack_require__(70)});__webpack_require__(67)("copyWithin")},function(module,exports,__webpack_require__){"use strict";var toObject=__webpack_require__(30),toIndex=__webpack_require__(71),toLength=__webpack_require__(60);module.exports=[].copyWithin||function copyWithin(target,start){var O=toObject(this),len=toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],count=Math.min((end===undefined?len:toIndex(end,len))-from,len-to),inc=1;if(from0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O}},function(module,exports,__webpack_require__){var toInteger=__webpack_require__(53),max=Math.max,min=Math.min;module.exports=function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)}},function(module,exports,__webpack_require__){var $def=__webpack_require__(8);$def($def.P,"Array",{fill:__webpack_require__(73)});__webpack_require__(67)("fill")},function(module,exports,__webpack_require__){"use strict";var toObject=__webpack_require__(30),toIndex=__webpack_require__(71),toLength=__webpack_require__(60);module.exports=[].fill||function fill(value){var O=toObject(this,true),length=toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O}},function(module,exports,__webpack_require__){"use strict";var KEY="find",$def=__webpack_require__(8),forced=true,$find=__webpack_require__(75)(5);if(KEY in[])Array(1)[KEY](function(){forced=false});$def($def.P+$def.F*forced,"Array",{find:function find(callbackfn){return $find(this,callbackfn,arguments[1])}});__webpack_require__(67)(KEY)},function(module,exports,__webpack_require__){var ctx=__webpack_require__(35),isObject=__webpack_require__(25),IObject=__webpack_require__(19),toObject=__webpack_require__(30),toLength=__webpack_require__(60),isArray=__webpack_require__(24),SPECIES=__webpack_require__(16)("species");var ASC=function(original,length){var C;if(isArray(original)&&isObject(C=original.constructor)){C=C[SPECIES];if(C===null)C=undefined}return new(C===undefined?Array:C)(length)};module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function($this,callbackfn,that){var O=toObject($this),self=IObject(O),f=ctx(callbackfn,that,3),length=toLength(self.length),index=0,result=IS_MAP?ASC($this,length):IS_FILTER?ASC($this,0):undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},function(module,exports,__webpack_require__){"use strict";var KEY="findIndex",$def=__webpack_require__(8),forced=true,$find=__webpack_require__(75)(6);if(KEY in[])Array(1)[KEY](function(){forced=false});$def($def.P+$def.F*forced,"Array",{findIndex:function findIndex(callbackfn){return $find(this,callbackfn,arguments[1])}});__webpack_require__(67)(KEY)},function(module,exports,__webpack_require__){__webpack_require__(78);__webpack_require__(79);__webpack_require__(80);__webpack_require__(51);__webpack_require__(82);__webpack_require__(83);__webpack_require__(87);__webpack_require__(88);__webpack_require__(90);__webpack_require__(91);__webpack_require__(93);__webpack_require__(94);__webpack_require__(95);module.exports=__webpack_require__(9).String},function(module,exports,__webpack_require__){var $def=__webpack_require__(8),toIndex=__webpack_require__(71),fromCharCode=String.fromCharCode,$fromCodePoint=String.fromCodePoint;$def($def.S+$def.F*(!!$fromCodePoint&&$fromCodePoint.length!=1),"String",{fromCodePoint:function fromCodePoint(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")}})},function(module,exports,__webpack_require__){var $def=__webpack_require__(8),toIObject=__webpack_require__(18),toLength=__webpack_require__(60);$def($def.S,"String",{raw:function raw(callSite){var tpl=toIObject(callSite.raw),len=toLength(tpl.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(tpl[i++]));if(i0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}},function(module,exports,__webpack_require__){"use strict";var $def=__webpack_require__(8),toLength=__webpack_require__(60),context=__webpack_require__(84),STARTS_WITH="startsWith",$startsWith=""[STARTS_WITH];$def($def.P+$def.F*__webpack_require__(86)(STARTS_WITH),"String",{startsWith:function startsWith(searchString){var that=context(this,searchString,STARTS_WITH),index=toLength(Math.min(arguments[1],that.length)),search=String(searchString);return $startsWith?$startsWith.call(that,search,index):that.slice(index,index+search.length)===search}})},function(module,exports,__webpack_require__){__webpack_require__(92)("match",1,function(defined,MATCH){return function match(regexp){"use strict";var O=defined(this),fn=regexp==undefined?undefined:regexp[MATCH];return fn!==undefined?fn.call(regexp,O):new RegExp(regexp)[MATCH](String(O))}})},function(module,exports,__webpack_require__){"use strict";module.exports=function(KEY,length,exec){var defined=__webpack_require__(21),SYMBOL=__webpack_require__(16)(KEY),original=""[KEY];if(__webpack_require__(7)(function(){var O={};O[SYMBOL]=function(){return 7};return""[KEY](O)!=7})){__webpack_require__(12)(String.prototype,KEY,exec(defined,SYMBOL,original));__webpack_require__(10)(RegExp.prototype,SYMBOL,length==2?function(string,arg){return original.call(string,this,arg)}:function(string){return original.call(string,this)})}}},function(module,exports,__webpack_require__){__webpack_require__(92)("replace",2,function(defined,REPLACE,$replace){return function replace(searchValue,replaceValue){"use strict";var O=defined(this),fn=searchValue==undefined?undefined:searchValue[REPLACE];return fn!==undefined?fn.call(searchValue,O,replaceValue):$replace.call(String(O),searchValue,replaceValue)}})},function(module,exports,__webpack_require__){__webpack_require__(92)("search",1,function(defined,SEARCH){return function search(regexp){"use strict";var O=defined(this),fn=regexp==undefined?undefined:regexp[SEARCH];return fn!==undefined?fn.call(regexp,O):new RegExp(regexp)[SEARCH](String(O))}})},function(module,exports,__webpack_require__){__webpack_require__(92)("split",2,function(defined,SPLIT,$split){return function split(separator,limit){"use strict";var O=defined(this),fn=separator==undefined?undefined:separator[SPLIT];return fn!==undefined?fn.call(separator,O,limit):$split.call(String(O),separator,limit)}})},function(module,exports,__webpack_require__){__webpack_require__(97);__webpack_require__(98);module.exports=__webpack_require__(9).Function},function(module,exports,__webpack_require__){var setDesc=__webpack_require__(3).setDesc,createDesc=__webpack_require__(11),has=__webpack_require__(5),FProto=Function.prototype,nameRE=/^\s*function ([^ (]*)/,NAME="name";NAME in FProto||__webpack_require__(6)&&setDesc(FProto,NAME,{configurable:true,get:function(){var match=(""+this).match(nameRE),name=match?match[1]:"";has(this,NAME)||setDesc(this,NAME,createDesc(5,name));return name}})},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),isObject=__webpack_require__(25),HAS_INSTANCE=__webpack_require__(16)("hasInstance"),FunctionProto=Function.prototype;if(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto,HAS_INSTANCE,{value:function(O){if(typeof this!="function"||!isObject(O))return false;if(!isObject(this.prototype))return O instanceof this;while(O=$.getProto(O))if(this.prototype===O)return true;return false}})},function(module,exports,__webpack_require__){__webpack_require__(2);module.exports=__webpack_require__(9).Symbol},function(module,exports,__webpack_require__){__webpack_require__(37);__webpack_require__(51);__webpack_require__(101);__webpack_require__(102);module.exports=__webpack_require__(9).Map},function(module,exports,__webpack_require__){__webpack_require__(66);var global=__webpack_require__(4),hide=__webpack_require__(10),Iterators=__webpack_require__(55),ITERATOR=__webpack_require__(16)("iterator"),NL=global.NodeList,HTC=global.HTMLCollection,NLProto=NL&&NL.prototype,HTCProto=HTC&&HTC.prototype,ArrayValues=Iterators.NodeList=Iterators.HTMLCollection=Iterators.Array;if(NL&&!(ITERATOR in NLProto))hide(NLProto,ITERATOR,ArrayValues);if(HTC&&!(ITERATOR in HTCProto))hide(HTCProto,ITERATOR,ArrayValues)},function(module,exports,__webpack_require__){"use strict";var strong=__webpack_require__(103);__webpack_require__(107)("Map",function(get){return function Map(){return get(this,arguments[0])}},{get:function get(key){var entry=strong.getEntry(this,key);return entry&&entry.v},set:function set(key,value){return strong.def(this,key===0?0:key,value)}},strong,true)},function(module,exports,__webpack_require__){"use strict";var $=__webpack_require__(3),hide=__webpack_require__(10),ctx=__webpack_require__(35),species=__webpack_require__(65),strictNew=__webpack_require__(104),defined=__webpack_require__(21),forOf=__webpack_require__(105),step=__webpack_require__(68),ID=__webpack_require__(13)("id"),$has=__webpack_require__(5),isObject=__webpack_require__(25),isExtensible=Object.isExtensible||isObject,SUPPORT_DESC=__webpack_require__(6),SIZE=SUPPORT_DESC?"_s":"size",id=0;var fastKey=function(it,create){if(!isObject(it))return typeof it=="symbol"?it:(typeof it=="string"?"S":"P")+it;if(!$has(it,ID)){if(!isExtensible(it))return"F";if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]};var getEntry=function(that,key){var index=fastKey(key),entry;if(index!=="F")return that._i[index];for(entry=that._f;entry;entry=entry.n){if(entry.k==key)return entry}};module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){strictNew(that,C,NAME);that._i=$.create(null);that._f=undefined;that._l=undefined;that[SIZE]=0;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that); +});__webpack_require__(106)(C.prototype,{clear:function clear(){for(var that=this,data=that._i,entry=that._f;entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that._f=that._l=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that._i[entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that._f==entry)that._f=next;if(that._l==entry)that._l=prev;that[SIZE]--}return!!entry},forEach:function forEach(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this._f){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function has(key){return!!getEntry(this,key)}});if(SUPPORT_DESC)$.setDesc(C.prototype,"size",{get:function(){return defined(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that._l=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that._l,n:undefined,r:false};if(!that._f)that._f=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!=="F")that._i[index]=entry}return that},getEntry:getEntry,setStrong:function(C,NAME,IS_MAP){__webpack_require__(54)(C,NAME,function(iterated,kind){this._t=iterated;this._k=kind;this._l=undefined},function(){var that=this,kind=that._k,entry=that._l;while(entry&&entry.r)entry=entry.p;if(!that._t||!(that._l=entry=entry?entry.n:that._t._f)){that._t=undefined;return step(1)}if(kind=="keys")return step(0,entry.k);if(kind=="values")return step(0,entry.v);return step(0,[entry.k,entry.v])},IS_MAP?"entries":"values",!IS_MAP,true);species(C);species(__webpack_require__(9)[NAME])}}},function(module,exports){module.exports=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it}},function(module,exports,__webpack_require__){var ctx=__webpack_require__(35),call=__webpack_require__(58),isArrayIter=__webpack_require__(59),anObject=__webpack_require__(26),toLength=__webpack_require__(60),getIterFn=__webpack_require__(61);module.exports=function(iterable,entries,fn,that){var iterFn=getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0,length,step,iterator;if(typeof iterFn!="function")throw TypeError(iterable+" is not iterable!");if(isArrayIter(iterFn))for(length=toLength(iterable.length);length>index;index++){entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index])}else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;){call(iterator,f,step.value,entries)}}},function(module,exports,__webpack_require__){var $redef=__webpack_require__(12);module.exports=function(target,src){for(var key in src)$redef(target,key,src[key]);return target}},function(module,exports,__webpack_require__){"use strict";var global=__webpack_require__(4),$def=__webpack_require__(8),forOf=__webpack_require__(105),strictNew=__webpack_require__(104);module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=global[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};var fixMethod=function(KEY){var fn=proto[KEY];__webpack_require__(12)(proto,KEY,KEY=="delete"?function(a){return fn.call(this,a===0?0:a)}:KEY=="has"?function has(a){return fn.call(this,a===0?0:a)}:KEY=="get"?function get(a){return fn.call(this,a===0?0:a)}:KEY=="add"?function add(a){fn.call(this,a===0?0:a);return this}:function set(a,b){fn.call(this,a===0?0:a,b);return this})};if(typeof C!="function"||!(IS_WEAK||proto.forEach&&!__webpack_require__(7)(function(){(new C).entries().next()}))){C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER);__webpack_require__(106)(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](IS_WEAK?{}:-0,1),buggyZero;if(!__webpack_require__(62)(function(iter){new C(iter)})){C=wrapper(function(target,iterable){strictNew(target,C,NAME);var that=new Base;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that);return that});C.prototype=proto;proto.constructor=C}IS_WEAK||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER);if(IS_WEAK&&proto.clear)delete proto.clear}__webpack_require__(15)(C,NAME);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);if(!IS_WEAK)common.setStrong(C,NAME,IS_MAP);return C}},function(module,exports,__webpack_require__){__webpack_require__(37);__webpack_require__(51);__webpack_require__(101);__webpack_require__(109);module.exports=__webpack_require__(9).Set},function(module,exports,__webpack_require__){"use strict";var strong=__webpack_require__(103);__webpack_require__(107)("Set",function(get){return function Set(){return get(this,arguments[0])}},{add:function add(value){return strong.def(this,value=value===0?0:value,value)}},strong)}]);if(typeof Package==="undefined")Package={};Package["ecmascript-runtime"]={Symbol:Symbol,Map:Map,Set:Set}})();(function(){var Meteor=Package.meteor.Meteor;var Promise;(function(){(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:false};modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);module.loaded=true;return module.exports}__webpack_require__.m=modules;__webpack_require__.c=installedModules;__webpack_require__.p="";return __webpack_require__(0)})([function(module,exports,__webpack_require__){var MeteorPromise=__webpack_require__(1);var es6PromiseThen=MeteorPromise.prototype.then;MeteorPromise.prototype.then=function(onResolved,onRejected){if(typeof Meteor==="object"&&typeof Meteor.bindEnvironment==="function"){return es6PromiseThen.call(this,onResolved&&Meteor.bindEnvironment(onResolved,raise),onRejected&&Meteor.bindEnvironment(onRejected,raise))}return es6PromiseThen.call(this,onResolved,onRejected)};function raise(exception){throw exception}Promise=MeteorPromise},function(module,exports,__webpack_require__){(function(global){var hasOwn=Object.prototype.hasOwnProperty;var g=typeof global==="object"?global:typeof window==="object"?window:typeof self==="object"?self:this;var GlobalPromise=g.Promise;var NpmPromise=__webpack_require__(2);function copyMethods(target,source){Object.keys(source).forEach(function(key){var value=source[key];if(typeof value==="function"&&!hasOwn.call(target,key)){target[key]=value}})}if(typeof GlobalPromise==="function"){copyMethods(GlobalPromise,NpmPromise);copyMethods(GlobalPromise.prototype,NpmPromise.prototype);module.exports=GlobalPromise}else{module.exports=NpmPromise}}).call(exports,function(){return this}())},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(3)},function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(4);__webpack_require__(6);__webpack_require__(7);__webpack_require__(8);__webpack_require__(9)},function(module,exports,__webpack_require__){"use strict";var asap=__webpack_require__(5);function noop(){}var LAST_ERROR=null;var IS_ERROR={};function getThen(obj){try{return obj.then}catch(ex){LAST_ERROR=ex;return IS_ERROR}}function tryCallOne(fn,a){try{return fn(a)}catch(ex){LAST_ERROR=ex;return IS_ERROR}}function tryCallTwo(fn,a,b){try{fn(a,b)}catch(ex){LAST_ERROR=ex;return IS_ERROR}}module.exports=Promise;function Promise(fn){if(typeof this!=="object"){throw new TypeError("Promises must be constructed via new")}if(typeof fn!=="function"){throw new TypeError("not a function")}this._37=0;this._12=null;this._59=[];if(fn===noop)return;doResolve(fn,this)}Promise._99=noop;Promise.prototype.then=function(onFulfilled,onRejected){if(this.constructor!==Promise){return safeThen(this,onFulfilled,onRejected)}var res=new Promise(noop);handle(this,new Handler(onFulfilled,onRejected,res));return res};function safeThen(self,onFulfilled,onRejected){return new self.constructor(function(resolve,reject){var res=new Promise(noop);res.then(resolve,reject);handle(self,new Handler(onFulfilled,onRejected,res))})}function handle(self,deferred){while(self._37===3){self=self._12}if(self._37===0){self._59.push(deferred);return}asap(function(){var cb=self._37===1?deferred.onFulfilled:deferred.onRejected;if(cb===null){if(self._37===1){resolve(deferred.promise,self._12)}else{reject(deferred.promise,self._12)}return}var ret=tryCallOne(cb,self._12);if(ret===IS_ERROR){reject(deferred.promise,LAST_ERROR)}else{resolve(deferred.promise,ret)}})}function resolve(self,newValue){if(newValue===self){return reject(self,new TypeError("A promise cannot be resolved with itself."))}if(newValue&&(typeof newValue==="object"||typeof newValue==="function")){var then=getThen(newValue);if(then===IS_ERROR){return reject(self,LAST_ERROR)}if(then===self.then&&newValue instanceof Promise){self._37=3;self._12=newValue;finale(self);return}else if(typeof then==="function"){doResolve(then.bind(newValue),self);return}}self._37=1;self._12=newValue;finale(self)}function reject(self,newValue){self._37=2;self._12=newValue;finale(self)}function finale(self){for(var i=0;icapacity){for(var scan=0,newLength=queue.length-index;scan0?argumentCount:0);return new Promise(function(resolve,reject){args.push(function(err,res){if(err)reject(err);else resolve(res)});var res=fn.apply(self,args);if(res&&(typeof res==="object"||typeof res==="function")&&typeof res.then==="function"){resolve(res)}})}};Promise.nodeify=function(fn){return function(){var args=Array.prototype.slice.call(arguments);var callback=typeof args[args.length-1]==="function"?args.pop():null;var ctx=this;try{return fn.apply(this,arguments).nodeify(callback,ctx)}catch(ex){if(callback===null||typeof callback=="undefined"){return new Promise(function(resolve,reject){reject(ex)})}else{asap(function(){callback.call(ctx,ex)})}}}};Promise.prototype.nodeify=function(callback,ctx){if(typeof callback!="function")return this;this.then(function(value){asap(function(){callback.call(ctx,null,value)})},function(err){asap(function(){callback.call(ctx,err)})})}},function(module,exports,__webpack_require__){"use strict";var rawAsap=__webpack_require__(5);var freeTasks=[];var pendingErrors=[];var requestErrorThrow=rawAsap.makeRequestCallFromTimer(throwFirstError);function throwFirstError(){if(pendingErrors.length){throw pendingErrors.shift()}}module.exports=asap;function asap(task){var rawTask;if(freeTasks.length){rawTask=freeTasks.pop()}else{rawTask=new RawTask}rawTask.task=task;rawAsap(rawTask)}function RawTask(){this.task=null}RawTask.prototype.call=function(){try{this.task.call()}catch(error){if(asap.onerror){asap.onerror(error)}else{pendingErrors.push(error);requestErrorThrow()}}finally{this.task=null;freeTasks[freeTasks.length]=this}}}])}).call(this);if(typeof Package==="undefined")Package={};Package.promise={Promise:Promise}})();(function(){var Meteor=Package.meteor.Meteor;var _=Package.underscore._;var Tracker=Package.tracker.Tracker;var Deps=Package.tracker.Deps;var EJSON=Package.ejson.EJSON;var ECMAScript=Package.ecmascript.ECMAScript;var babelHelpers=Package["babel-runtime"].babelHelpers;var Symbol=Package["ecmascript-runtime"].Symbol;var Map=Package["ecmascript-runtime"].Map;var Set=Package["ecmascript-runtime"].Set;var Promise=Package.promise.Promise;var ReactiveDict;(function(){var stringify=function(value){if(value===undefined)return"undefined";return EJSON.stringify(value)};var parse=function(serialized){if(serialized===undefined||serialized==="undefined")return undefined;return EJSON.parse(serialized)};var changed=function(v){v&&v.changed()};ReactiveDict=function(dictName){if(dictName){if(typeof dictName==="string"){ReactiveDict._registerDictForMigrate(dictName,this);this.keys=ReactiveDict._loadMigratedDict(dictName)||{};this.name=dictName}else if(typeof dictName==="object"){this.keys=dictName}else{throw new Error("Invalid ReactiveDict argument: "+dictName)}}else{this.keys={}}this.allDeps=new Tracker.Dependency;this.keyDeps={};this.keyValueDeps={}};_.extend(ReactiveDict.prototype,{set:function(keyOrObject,value){var self=this;if(typeof keyOrObject==="object"&&value===undefined){self._setObject(keyOrObject);return}var key=keyOrObject;value=stringify(value);var keyExisted=_.has(self.keys,key);var oldSerializedValue=keyExisted?self.keys[key]:"undefined";var isNewValue=value!==oldSerializedValue;self.keys[key]=value;if(isNewValue||!keyExisted){self.allDeps.changed()}if(isNewValue){changed(self.keyDeps[key]);if(self.keyValueDeps[key]){changed(self.keyValueDeps[key][oldSerializedValue]);changed(self.keyValueDeps[key][value])}}},setDefault:function(key,value){var self=this;if(!_.has(self.keys,key)){self.set(key,value)}},get:function(key){var self=this;self._ensureKey(key);self.keyDeps[key].depend();return parse(self.keys[key])},equals:function(key,value){var self=this;var ObjectID=null;if(Package.mongo){ObjectID=Package.mongo.Mongo.ObjectID}if(typeof value!=="string"&&typeof value!=="number"&&typeof value!=="boolean"&&typeof value!=="undefined"&&!(value instanceof Date)&&!(ObjectID&&value instanceof ObjectID)&&value!==null){throw new Error("ReactiveDict.equals: value must be scalar")}var serializedValue=stringify(value);if(Tracker.active){self._ensureKey(key);if(!_.has(self.keyValueDeps[key],serializedValue))self.keyValueDeps[key][serializedValue]=new Tracker.Dependency;var isNew=self.keyValueDeps[key][serializedValue].depend();if(isNew){Tracker.onInvalidate(function(){if(!self.keyValueDeps[key][serializedValue].hasDependents())delete self.keyValueDeps[key][serializedValue]})}}var oldValue=undefined;if(_.has(self.keys,key))oldValue=parse(self.keys[key]);return EJSON.equals(oldValue,value)},all:function(){this.allDeps.depend();var ret={};_.each(this.keys,function(value,key){ret[key]=parse(value)});return ret},clear:function(){var self=this;var oldKeys=self.keys;self.keys={};self.allDeps.changed();_.each(oldKeys,function(value,key){changed(self.keyDeps[key]);changed(self.keyValueDeps[key][value]);changed(self.keyValueDeps[key]["undefined"])})},"delete":function(key){var self=this;var didRemove=false;if(_.has(self.keys,key)){var oldValue=self.keys[key];delete self.keys[key];changed(self.keyDeps[key]);if(self.keyValueDeps[key]){changed(self.keyValueDeps[key][oldValue]);changed(self.keyValueDeps[key]["undefined"])}self.allDeps.changed();didRemove=true}return didRemove},_setObject:function(object){var self=this;_.each(object,function(value,key){self.set(key,value)})},_ensureKey:function(key){var self=this;if(!(key in self.keyDeps)){self.keyDeps[key]=new Tracker.Dependency;self.keyValueDeps[key]={}}},_getMigrationData:function(){return this.keys}})}).call(this);(function(){ReactiveDict._migratedDictData={};ReactiveDict._dictsToMigrate={};ReactiveDict._loadMigratedDict=function(dictName){if(_.has(ReactiveDict._migratedDictData,dictName))return ReactiveDict._migratedDictData[dictName];return null};ReactiveDict._registerDictForMigrate=function(dictName,dict){if(_.has(ReactiveDict._dictsToMigrate,dictName))throw new Error("Duplicate ReactiveDict name: "+dictName);ReactiveDict._dictsToMigrate[dictName]=dict};if(Meteor.isClient&&Package.reload){var migrationData=Package.reload.Reload._migrationData("reactive-dict");if(migrationData&&migrationData.dicts)ReactiveDict._migratedDictData=migrationData.dicts;Package.reload.Reload._onMigrate("reactive-dict",function(){var dictsToMigrate=ReactiveDict._dictsToMigrate;var dataToMigrate={};for(var dictName in babelHelpers.sanitizeForInObject(dictsToMigrate))dataToMigrate[dictName]=dictsToMigrate[dictName]._getMigrationData();return[true,{dicts:dataToMigrate}]})}}).call(this);if(typeof Package==="undefined")Package={};Package["reactive-dict"]={ReactiveDict:ReactiveDict}})();(function(){var Meteor=Package.meteor.Meteor;var _=Package.underscore._;var ReactiveDict=Package["reactive-dict"].ReactiveDict;var EJSON=Package.ejson.EJSON;var Session;(function(){Session=new ReactiveDict("session")}).call(this);if(typeof Package==="undefined")Package={};Package.session={Session:Session}})();(function(){var Meteor=Package.meteor.Meteor;var Tracker=Package.tracker.Tracker;var Deps=Package.tracker.Deps;var ReactiveVar;(function(){ReactiveVar=function(initialValue,equalsFunc){if(!(this instanceof ReactiveVar))return new ReactiveVar(initialValue,equalsFunc);this.curValue=initialValue;this.equalsFunc=equalsFunc;this.dep=new Tracker.Dependency};ReactiveVar._isEqual=function(oldValue,newValue){var a=oldValue,b=newValue;if(a!==b)return false;else return!a||typeof a==="number"||typeof a==="boolean"||typeof a==="string"};ReactiveVar.prototype.get=function(){if(Tracker.active)this.dep.depend();return this.curValue};ReactiveVar.prototype.set=function(newValue){var oldValue=this.curValue;if((this.equalsFunc||ReactiveVar._isEqual)(oldValue,newValue))return;this.curValue=newValue;this.dep.changed()};ReactiveVar.prototype.toString=function(){return"ReactiveVar{"+this.get()+"}"};ReactiveVar.prototype._numListeners=function(){var count=0;for(var id in this.dep._dependentsById)count++;return count}}).call(this);if(typeof Package==="undefined")Package={};Package["reactive-var"]={ReactiveVar:ReactiveVar}})();(function(){var Meteor=Package.meteor.Meteor;var Mongo=Package.mongo.Mongo;var Tracker=Package.tracker.Tracker;var Deps=Package.tracker.Deps;var LocalCollection=Package.minimongo.LocalCollection;var Minimongo=Package.minimongo.Minimongo;var CollectionExtensions;(function(){(function(){CollectionExtensions={};CollectionExtensions._extensions=[];Meteor.addCollectionExtension=function(customFunction){if(typeof customFunction!=="function"){throw new Meteor.Error("collection-extension-wrong-argument","You must pass a function into Meteor.addCollectionExtension().")}CollectionExtensions._extensions.push(customFunction);if(typeof Meteor.users!=="undefined"){customFunction.apply(Meteor.users,["users"])}};Meteor.addCollectionPrototype=function(name,customFunction){if(typeof name!=="string"){throw new Meteor.Error("collection-extension-wrong-argument","You must pass a string as the first argument into Meteor.addCollectionPrototype().")}if(typeof customFunction!=="function"){throw new Meteor.Error("collection-extension-wrong-argument","You must pass a function as the second argument into Meteor.addCollectionPrototype().")}(typeof Mongo!=="undefined"?Mongo.Collection:Meteor.Collection).prototype[name]=customFunction};CollectionExtensions._reassignCollectionPrototype=function(instance,constr){var hasSetPrototypeOf=typeof Object.setPrototypeOf==="function";if(!constr)constr=typeof Mongo!=="undefined"?Mongo.Collection:Meteor.Collection;if(hasSetPrototypeOf){Object.setPrototypeOf(instance,constr.prototype)}else if(instance.__proto__){instance.__proto__=constr.prototype}};CollectionExtensions._wrapCollection=function(ns,as){if(!as._CollectionPrototype)as._CollectionPrototype=new as.Collection(null);var constructor=as.Collection;var proto=as._CollectionPrototype;ns.Collection=function(){var ret=constructor.apply(this,arguments);CollectionExtensions._processCollectionExtensions(this,arguments);return ret};ns.Collection.prototype=proto;ns.Collection.prototype.constructor=ns.Collection;for(var prop in constructor){if(constructor.hasOwnProperty(prop)){ns.Collection[prop]=constructor[prop]}}};CollectionExtensions._processCollectionExtensions=function(self,args){var args=args?[].slice.call(args,0):undefined;var extensions=CollectionExtensions._extensions;for(var i=0,len=extensions.length;itext2.length?text1:text2;var shorttext=text1.length>text2.length?text2:text1;var i=longtext.indexOf(shorttext);if(i!=-1){diffs=[[DIFF_INSERT,longtext.substring(0,i)],[DIFF_EQUAL,shorttext],[DIFF_INSERT,longtext.substring(i+shorttext.length)]];if(text1.length>text2.length){diffs[0][0]=diffs[2][0]=DIFF_DELETE}return diffs}if(shorttext.length==1){return[[DIFF_DELETE,text1],[DIFF_INSERT,text2]]}longtext=shorttext=null;var hm=this.diff_halfMatch_(text1,text2);if(hm){var text1_a=hm[0];var text1_b=hm[1];var text2_a=hm[2];var text2_b=hm[3];var mid_common=hm[4];var diffs_a=this.diff_main(text1_a,text2_a,checklines,deadline);var diffs_b=this.diff_main(text1_b,text2_b,checklines,deadline);return diffs_a.concat([[DIFF_EQUAL,mid_common]],diffs_b)}if(checklines&&text1.length>100&&text2.length>100){return this.diff_lineMode_(text1,text2,deadline)}return this.diff_bisect_(text1,text2,deadline)};diff_match_patch.prototype.diff_lineMode_=function(text1,text2,deadline){var a=this.diff_linesToChars_(text1,text2);text1=a[0];text2=a[1];var linearray=a[2];var diffs=this.diff_bisect_(text1,text2,deadline);this.diff_charsToLines_(diffs,linearray);this.diff_cleanupSemantic(diffs);diffs.push([DIFF_EQUAL,""]);var pointer=0;var count_delete=0;var count_insert=0;var text_delete="";var text_insert="";while(pointer=1&&count_insert>=1){var a=this.diff_main(text_delete,text_insert,false,deadline);diffs.splice(pointer-count_delete-count_insert,count_delete+count_insert);pointer=pointer-count_delete-count_insert;for(var j=a.length-1;j>=0;j--){diffs.splice(pointer,0,a[j])}pointer=pointer+a.length}count_insert=0;count_delete=0;text_delete="";text_insert="";break}pointer++}diffs.pop();return diffs};diff_match_patch.prototype.diff_bisect_=function(text1,text2,deadline){var text1_length=text1.length;var text2_length=text2.length;var max_d=Math.ceil((text1_length+text2_length)/2);var v_offset=max_d;var v_length=2*max_d;var v1=new Array(v_length);var v2=new Array(v_length);for(var x=0;xdeadline){break}for(var k1=-d+k1start;k1<=d-k1end;k1+=2){var k1_offset=v_offset+k1;var x1;if(k1==-d||k1!=d&&v1[k1_offset-1]text1_length){k1end+=2}else if(y1>text2_length){k1start+=2}else if(front){var k2_offset=v_offset+delta-k1;if(k2_offset>=0&&k2_offset=x2){return this.diff_bisectSplit_(text1,text2,x1,y1,deadline)}}}}for(var k2=-d+k2start;k2<=d-k2end;k2+=2){var k2_offset=v_offset+k2;var x2;if(k2==-d||k2!=d&&v2[k2_offset-1]text1_length){k2end+=2}else if(y2>text2_length){k2start+=2}else if(!front){var k1_offset=v_offset+delta-k2;if(k1_offset>=0&&k1_offset=x2){return this.diff_bisectSplit_(text1,text2,x1,y1,deadline)}}}}}return[[DIFF_DELETE,text1],[DIFF_INSERT,text2]]};diff_match_patch.prototype.diff_bisectSplit_=function(text1,text2,x,y,deadline){var text1a=text1.substring(0,x); +var text2a=text2.substring(0,y);var text1b=text1.substring(x);var text2b=text2.substring(y);var diffs=this.diff_main(text1a,text2a,false,deadline);var diffsb=this.diff_main(text1b,text2b,false,deadline);return diffs.concat(diffsb)};diff_match_patch.prototype.diff_linesToChars_=function(text1,text2){var lineArray=[];var lineHash={};lineArray[0]="";function diff_linesToCharsMunge_(text){var chars="";var lineStart=0;var lineEnd=-1;var lineArrayLength=lineArray.length;while(lineEndtext2_length){text1=text1.substring(text1_length-text2_length)}else if(text1_lengthtext2.length?text1:text2;var shorttext=text1.length>text2.length?text2:text1;if(longtext.length<4||shorttext.length*2=longtext.length){return[best_longtext_a,best_longtext_b,best_shorttext_a,best_shorttext_b,best_common]}else{return null}}var hm1=diff_halfMatchI_(longtext,shorttext,Math.ceil(longtext.length/4));var hm2=diff_halfMatchI_(longtext,shorttext,Math.ceil(longtext.length/2));var hm;if(!hm1&&!hm2){return null}else if(!hm2){hm=hm1}else if(!hm1){hm=hm2}else{hm=hm1[4].length>hm2[4].length?hm1:hm2}var text1_a,text1_b,text2_a,text2_b;if(text1.length>text2.length){text1_a=hm[0];text1_b=hm[1];text2_a=hm[2];text2_b=hm[3]}else{text2_a=hm[0];text2_b=hm[1];text1_a=hm[2];text1_b=hm[3]}var mid_common=hm[4];return[text1_a,text1_b,text2_a,text2_b,mid_common]};diff_match_patch.prototype.diff_cleanupSemantic=function(diffs){var changes=false;var equalities=[];var equalitiesLength=0;var lastequality=null;var pointer=0;var length_insertions1=0;var length_deletions1=0;var length_insertions2=0;var length_deletions2=0;while(pointer0?equalities[equalitiesLength-1]:-1;length_insertions1=0;length_deletions1=0;length_insertions2=0;length_deletions2=0;lastequality=null;changes=true}}pointer++}if(changes){this.diff_cleanupMerge(diffs)}this.diff_cleanupSemanticLossless(diffs);pointer=1;while(pointer=deletion.length/2||overlap_length>=insertion.length/2){diffs.splice(pointer,0,[DIFF_EQUAL,insertion.substring(0,overlap_length)]);diffs[pointer-1][1]=deletion.substring(0,deletion.length-overlap_length);diffs[pointer+1][1]=insertion.substring(overlap_length);pointer++}pointer++}pointer++}};diff_match_patch.prototype.diff_cleanupSemanticLossless=function(diffs){var punctuation=/[^a-zA-Z0-9]/;var whitespace=/\s/;var linebreak=/[\r\n]/;var blanklineEnd=/\n\r?\n$/;var blanklineStart=/^\r?\n\r?\n/;function diff_cleanupSemanticScore_(one,two){if(!one||!two){return 5}var score=0;if(one.charAt(one.length-1).match(punctuation)||two.charAt(0).match(punctuation)){score++;if(one.charAt(one.length-1).match(whitespace)||two.charAt(0).match(whitespace)){score++;if(one.charAt(one.length-1).match(linebreak)||two.charAt(0).match(linebreak)){score++;if(one.match(blanklineEnd)||two.match(blanklineStart)){score++}}}}return score}var pointer=1;while(pointer=bestScore){bestScore=score;bestEquality1=equality1;bestEdit=edit;bestEquality2=equality2}}if(diffs[pointer-1][1]!=bestEquality1){if(bestEquality1){diffs[pointer-1][1]=bestEquality1}else{diffs.splice(pointer-1,1);pointer--}diffs[pointer][1]=bestEdit;if(bestEquality2){diffs[pointer+1][1]=bestEquality2}else{diffs.splice(pointer+1,1);pointer--}}}pointer++}};diff_match_patch.prototype.diff_cleanupEfficiency=function(diffs){var changes=false;var equalities=[];var equalitiesLength=0;var lastequality="";var pointer=0;var pre_ins=false;var pre_del=false;var post_ins=false;var post_del=false;while(pointer0?equalities[equalitiesLength-1]:-1;post_ins=post_del=false}changes=true}}pointer++}if(changes){this.diff_cleanupMerge(diffs)}};diff_match_patch.prototype.diff_cleanupMerge=function(diffs){diffs.push([DIFF_EQUAL,""]);var pointer=0;var count_delete=0;var count_insert=0;var text_delete="";var text_insert="";var commonlength;while(pointer1){if(count_delete!==0&&count_insert!==0){commonlength=this.diff_commonPrefix(text_insert,text_delete);if(commonlength!==0){if(pointer-count_delete-count_insert>0&&diffs[pointer-count_delete-count_insert-1][0]==DIFF_EQUAL){diffs[pointer-count_delete-count_insert-1][1]+=text_insert.substring(0,commonlength)}else{diffs.splice(0,0,[DIFF_EQUAL,text_insert.substring(0,commonlength)]);pointer++}text_insert=text_insert.substring(commonlength);text_delete=text_delete.substring(commonlength)}commonlength=this.diff_commonSuffix(text_insert,text_delete);if(commonlength!==0){diffs[pointer][1]=text_insert.substring(text_insert.length-commonlength)+diffs[pointer][1];text_insert=text_insert.substring(0,text_insert.length-commonlength);text_delete=text_delete.substring(0,text_delete.length-commonlength)}}if(count_delete===0){diffs.splice(pointer-count_delete-count_insert,count_delete+count_insert,[DIFF_INSERT,text_insert])}else if(count_insert===0){diffs.splice(pointer-count_delete-count_insert,count_delete+count_insert,[DIFF_DELETE,text_delete])}else{diffs.splice(pointer-count_delete-count_insert,count_delete+count_insert,[DIFF_DELETE,text_delete],[DIFF_INSERT,text_insert])}pointer=pointer-count_delete-count_insert+(count_delete?1:0)+(count_insert?1:0)+1}else if(pointer!==0&&diffs[pointer-1][0]==DIFF_EQUAL){diffs[pointer-1][1]+=diffs[pointer][1];diffs.splice(pointer,1)}else{pointer++}count_insert=0;count_delete=0;text_delete="";text_insert="";break}}if(diffs[diffs.length-1][1]===""){diffs.pop()}var changes=false;pointer=1;while(pointerloc){break}last_chars1=chars1;last_chars2=chars2}if(diffs.length!=x&&diffs[x][0]===DIFF_DELETE){return last_chars2}return last_chars2+(loc-last_chars1)};diff_match_patch.prototype.diff_prettyHtml=function(diffs){var html=[];var i=0;var pattern_amp=/&/g;var pattern_lt=//g;var pattern_para=/\n/g;for(var x=0;x");switch(op){case DIFF_INSERT:html[x]=''+text+"";break;case DIFF_DELETE:html[x]=''+text+"";break;case DIFF_EQUAL:html[x]=""+text+"";break}if(op!==DIFF_DELETE){i+=data.length}}return html.join("")};diff_match_patch.prototype.diff_text1=function(diffs){var text=[];for(var x=0;xthis.Match_MaxBits){throw new Error("Pattern too long for this browser.")}var s=this.match_alphabet_(pattern);var dmp=this;function match_bitapScore_(e,x){var accuracy=e/pattern.length;var proximity=Math.abs(loc-x);if(!dmp.Match_Distance){return proximity?1:accuracy}return accuracy+proximity/dmp.Match_Distance}var score_threshold=this.Match_Threshold;var best_loc=text.indexOf(pattern,loc);if(best_loc!=-1){score_threshold=Math.min(match_bitapScore_(0,best_loc),score_threshold);best_loc=text.lastIndexOf(pattern,loc+pattern.length);if(best_loc!=-1){score_threshold=Math.min(match_bitapScore_(0,best_loc),score_threshold)}}var matchmask=1<=start;j--){var charMatch=s[text.charAt(j-1)];if(d===0){rd[j]=(rd[j+1]<<1|1)&charMatch}else{rd[j]=(rd[j+1]<<1|1)&charMatch|((last_rd[j+1]|last_rd[j])<<1|1)|last_rd[j+1]}if(rd[j]&matchmask){var score=match_bitapScore_(d,j-1);if(score<=score_threshold){score_threshold=score;best_loc=j-1;if(best_loc>loc){start=Math.max(1,2*loc-best_loc)}else{break}}}}if(match_bitapScore_(d+1,loc)>score_threshold){break}last_rd=rd}return best_loc};diff_match_patch.prototype.match_alphabet_=function(pattern){var s={};for(var i=0;i2){this.diff_cleanupSemantic(diffs);this.diff_cleanupEfficiency(diffs)}}else if(a&&typeof a=="object"&&typeof opt_b=="undefined"&&typeof opt_c=="undefined"){diffs=a;text1=this.diff_text1(diffs)}else if(typeof a=="string"&&opt_b&&typeof opt_b=="object"&&typeof opt_c=="undefined"){text1=a;diffs=opt_b}else if(typeof a=="string"&&typeof opt_b=="string"&&opt_c&&typeof opt_c=="object"){text1=a;diffs=opt_c}else{throw new Error("Unknown call format to patch_make.")}if(diffs.length===0){return[]}var patches=[];var patch=new diff_match_patch.patch_obj;var patchDiffLength=0;var char_count1=0;var char_count2=0;var prepatch_text=text1;var postpatch_text=text1;for(var x=0;x=2*this.Patch_Margin){if(patchDiffLength){this.patch_addContext_(patch,prepatch_text);patches.push(patch);patch=new diff_match_patch.patch_obj;patchDiffLength=0;prepatch_text=postpatch_text;char_count1=char_count2}}break}if(diff_type!==DIFF_INSERT){char_count1+=diff_text.length}if(diff_type!==DIFF_DELETE){char_count2+=diff_text.length}}if(patchDiffLength){this.patch_addContext_(patch,prepatch_text);patches.push(patch)}return patches};diff_match_patch.prototype.patch_deepCopy=function(patches){var patchesCopy=[];for(var x=0;xthis.Match_MaxBits){start_loc=this.match_main(text,text1.substring(0,this.Match_MaxBits),expected_loc);if(start_loc!=-1){end_loc=this.match_main(text,text1.substring(text1.length-this.Match_MaxBits),expected_loc+text1.length-this.Match_MaxBits);if(end_loc==-1||start_loc>=end_loc){start_loc=-1}}}else{start_loc=this.match_main(text,text1,expected_loc)}if(start_loc==-1){results[x]=false;delta-=patches[x].length2-patches[x].length1}else{results[x]=true;delta=start_loc-expected_loc;var text2;if(end_loc==-1){text2=text.substring(start_loc,start_loc+text1.length)}else{text2=text.substring(start_loc,end_loc+this.Match_MaxBits)}if(text1==text2){text=text.substring(0,start_loc)+this.diff_text2(patches[x].diffs)+text.substring(start_loc+text1.length)}else{var diffs=this.diff_main(text1,text2,false);if(text1.length>this.Match_MaxBits&&this.diff_levenshtein(diffs)/text1.length>this.Patch_DeleteThreshold){results[x]=false}else{this.diff_cleanupSemanticLossless(diffs);var index1=0;var index2;for(var y=0;ydiffs[0][1].length){var extraLength=paddingLength-diffs[0][1].length;diffs[0][1]=nullPadding.substring(diffs[0][1].length)+diffs[0][1];patch.start1-=extraLength;patch.start2-=extraLength;patch.length1+=extraLength;patch.length2+=extraLength}patch=patches[patches.length-1];diffs=patch.diffs;if(diffs.length==0||diffs[diffs.length-1][0]!=DIFF_EQUAL){diffs.push([DIFF_EQUAL,nullPadding]);patch.length1+=paddingLength;patch.length2+=paddingLength}else if(paddingLength>diffs[diffs.length-1][1].length){var extraLength=paddingLength-diffs[diffs.length-1][1].length;diffs[diffs.length-1][1]+=nullPadding.substring(0,extraLength);patch.length1+=extraLength;patch.length2+=extraLength}return nullPadding};diff_match_patch.prototype.patch_splitMax=function(patches){var patch_size=this.Match_MaxBits;for(var x=0;xpatch_size){var bigpatch=patches[x];patches.splice(x--,1);var start1=bigpatch.start1;var start2=bigpatch.start2;var precontext="";while(bigpatch.diffs.length!==0){var patch=new diff_match_patch.patch_obj;var empty=true;patch.start1=start1-precontext.length;patch.start2=start2-precontext.length;if(precontext!==""){patch.length1=patch.length2=precontext.length;patch.diffs.push([DIFF_EQUAL,precontext])}while(bigpatch.diffs.length!==0&&patch.length12*patch_size){patch.length1+=diff_text.length;start1+=diff_text.length;empty=false;patch.diffs.push([diff_type,diff_text]);bigpatch.diffs.shift()}else{diff_text=diff_text.substring(0,patch_size-patch.length1-this.Patch_Margin);patch.length1+=diff_text.length;start1+=diff_text.length;if(diff_type===DIFF_EQUAL){patch.length2+=diff_text.length;start2+=diff_text.length}else{empty=false}patch.diffs.push([diff_type,diff_text]);if(diff_text==bigpatch.diffs[0][1]){bigpatch.diffs.shift()}else{bigpatch.diffs[0][1]=bigpatch.diffs[0][1].substring(diff_text.length)}}}precontext=this.diff_text2(patch.diffs);precontext=precontext.substring(precontext.length-this.Patch_Margin);var postcontext=this.diff_text1(bigpatch.diffs).substring(0,this.Patch_Margin);if(postcontext!==""){patch.length1+=postcontext.length;patch.length2+=postcontext.length;if(patch.diffs.length!==0&&patch.diffs[patch.diffs.length-1][0]===DIFF_EQUAL){patch.diffs[patch.diffs.length-1][1]+=postcontext}else{patch.diffs.push([DIFF_EQUAL,postcontext])}}if(!empty){patches.splice(++x,0,patch)}}}}};diff_match_patch.prototype.patch_toText=function(patches){var text=[];for(var x=0;x0&&len2>0&&!matchContext.objectHash&&typeof matchContext.matchByPosition!=="boolean"){matchContext.matchByPosition=!arraysHaveMatchByRef(array1,array2,len1,len2)}while(commonHead0){for(var removeItemIndex1=0;removeItemIndex1=0;index--){index1=toRemove[index];var indexDiff=delta["_"+index1];var removedValue=array.splice(index1,1)[0];if(indexDiff[2]===ARRAY_MOVE){toInsert.push({index:indexDiff[1],value:removedValue})}}toInsert=toInsert.sort(compare.numericallyBy("index"));var toInsertLength=toInsert.length;for(index=0;index0){for(index=0;indexreverseIndex){reverseIndex++}else if(moveFromIndex>=reverseIndex&&moveToIndexmatrix[index1-1][index2]){return backtrack(matrix,array1,array2,index1,index2-1,context)}else{return backtrack(matrix,array1,array2,index1-1,index2,context)}};var get=function(array1,array2,match,context){context=context||{};var matrix=lengthMatrix(array1,array2,match||defaultMatch,context);var result=backtrack(matrix,array1,array2,array1.length,array2.length,context);if(typeof array1==="string"&&typeof array2==="string"){result.sequence=result.sequence.join("")}return result};exports.get=get},{}],13:[function(require,module,exports){var DiffContext=require("../contexts/diff").DiffContext;var PatchContext=require("../contexts/patch").PatchContext;var ReverseContext=require("../contexts/reverse").ReverseContext;var collectChildrenDiffFilter=function collectChildrenDiffFilter(context){if(!context||!context.children){return}var length=context.children.length;var child;var result=context.result;for(var index=0;index=position)posCur[id]++});lengthCur++;posCur[idStringify(id)]=position;callbacks.addedAt(id,seqArray[posNew[idStringify(id)]],position,before)},movedBefore:function(id,before){var prevPosition=posCur[idStringify(id)];var position=before?posCur[idStringify(before)]:lengthCur-1;_.each(posCur,function(pos,id){if(pos>=prevPosition&&pos<=position)posCur[id]--;else if(pos<=prevPosition&&pos>=position)posCur[id]++});posCur[idStringify(id)]=position;callbacks.movedTo(id,seqArray[posNew[idStringify(id)]],prevPosition,position,before)},removed:function(id){var prevPosition=posCur[idStringify(id)];_.each(posCur,function(pos,id){if(pos>=prevPosition)posCur[id]--});delete posCur[idStringify(id)];lengthCur--;callbacks.removedAt(id,lastSeqArray[posOld[idStringify(id)]],prevPosition)}});_.each(posNew,function(pos,idString){if(!_.has(posOld,idString))return;var id=idParse(idString);var newItem=seqArray[pos]||{};var oldItem=lastSeqArray[posOld[idString]];var updates=getUpdates(oldItem,newItem,preventNestedDiff);if(!_.isEmpty(updates))callbacks.changedAt(id,updates,pos,oldItem)})}diffArray.shallow=function(lastSeqArray,seqArray,callbacks){return diffArray(lastSeqArray,seqArray,callbacks,true)};diffArray.deepCopyChanges=function(oldItem,newItem){var setDiff=getUpdates(oldItem,newItem).$set;_.each(setDiff,function(v,deepKey){setDeep(oldItem,deepKey,v)})};diffArray.deepCopyRemovals=function(oldItem,newItem){var unsetDiff=getUpdates(oldItem,newItem).$unset;_.each(unsetDiff,function(v,deepKey){unsetDeep(oldItem,deepKey)})};diffArray.getChanges=function(newCollection,oldCollection,diffMethod){var changes={added:[],removed:[],changed:[]};diffMethod(oldCollection,newCollection,{addedAt:function(id,item,index){changes.added.push({item:item,index:index})},removedAt:function(id,item,index){changes.removed.push({item:item,index:index})},changedAt:function(id,updates,index,oldItem){changes.changed.push({selector:id,modifier:updates})},movedTo:function(id,item,fromIndex,toIndex){}});return changes};var setDeep=function(obj,deepKey,v){var split=deepKey.split(".");var initialKeys=_.initial(split);var lastKey=_.last(split);initialKeys.reduce(function(subObj,k,i){var nextKey=split[i+1];if(isNumStr(nextKey)){if(subObj[k]==null)subObj[k]=[];if(subObj[k].length==parseInt(nextKey))subObj[k].push(null)}else if(subObj[k]==null||!isHash(subObj[k])){subObj[k]={}}return subObj[k]},obj);var deepObj=getDeep(obj,initialKeys);deepObj[lastKey]=v;return v};var unsetDeep=function(obj,deepKey){var split=deepKey.split(".");var initialKeys=_.initial(split);var lastKey=_.last(split);var deepObj=getDeep(obj,initialKeys);if(_.isArray(deepObj)&&isNumStr(lastKey))return!!deepObj.splice(lastKey,1);else return delete deepObj[lastKey]};var getDeep=function(obj,keys){return keys.reduce(function(subObj,k){return subObj[k]},obj)};var isHash=function(obj){return _.isObject(obj)&&Object.getPrototypeOf(obj)===Object.prototype};var isNumStr=function(str){return str.match(/^\d+$/)};return diffArray}])}).call(this);(function(){"use strict";(function(){var module=angular.module("getUpdates",[]);var utils=function(){var rip=function(obj,level){if(level<1)return{};return _.reduce(obj,function(clone,v,k){v=_.isObject(v)?rip(v,--level):v;clone[k]=v;return clone},{})};var toPaths=function(obj){var keys=getKeyPaths(obj);var values=getDeepValues(obj);return _.object(keys,values)};var getKeyPaths=function(obj){var keys=_.keys(obj).map(function(k){var v=obj[k];if(!_.isObject(v)||_.isEmpty(v)||_.isArray(v))return k;return getKeyPaths(v).map(function(subKey){return k+"."+subKey})});return _.flatten(keys)};var getDeepValues=function(obj,arr){arr=arr||[];_.values(obj).forEach(function(v){if(!_.isObject(v)||_.isEmpty(v)||_.isArray(v))arr.push(v);else getDeepValues(v,arr)});return arr};var flatten=function(arr){return arr.reduce(function(flattened,v,i){if(_.isArray(v)&&!_.isEmpty(v))flattened.push.apply(flattened,flatten(v));else flattened.push(v);return flattened},[])};var setFilled=function(obj,k,v){if(!_.isEmpty(v))obj[k]=v};var assert=function(result,msg){if(!result)throwErr(msg)};var throwErr=function(msg){throw Error("get-updates error - "+msg)};return{rip:rip,toPaths:toPaths,getKeyPaths:getKeyPaths,getDeepValues:getDeepValues,setFilled:setFilled,assert:assert,throwErr:throwErr}}();var getDifference=function(){var getDifference=function(src,dst,isShallow){var level;if(isShallow>1)level=isShallow;else if(isShallow)level=1;if(level){src=utils.rip(src,level);dst=utils.rip(dst,level)}return compare(src,dst)};var compare=function(src,dst){var srcKeys=_.keys(src);var dstKeys=_.keys(dst);var keys=_.chain([]).concat(srcKeys).concat(dstKeys).uniq().without("$$hashKey").value();return keys.reduce(function(diff,k){var srcValue=src[k];var dstValue=dst[k];if(_.isDate(srcValue)&&_.isDate(dstValue)){if(srcValue.getTime()!=dstValue.getTime())diff[k]=dstValue}if(_.isObject(srcValue)&&_.isObject(dstValue)){var valueDiff=getDifference(srcValue,dstValue); +utils.setFilled(diff,k,valueDiff)}else if(srcValue!==dstValue){diff[k]=dstValue}return diff},{})};return getDifference}();var getUpdates=function(){var getUpdates=function(src,dst,isShallow){utils.assert(_.isObject(src),"first argument must be an object");utils.assert(_.isObject(dst),"second argument must be an object");var diff=getDifference(src,dst,isShallow);var paths=utils.toPaths(diff);var set=createSet(paths);var unset=createUnset(paths);var pull=createPull(unset);var updates={};utils.setFilled(updates,"$set",set);utils.setFilled(updates,"$unset",unset);utils.setFilled(updates,"$pull",pull);return updates};var createSet=function(paths){var undefinedKeys=getUndefinedKeys(paths);return _.omit(paths,undefinedKeys)};var createUnset=function(paths){var undefinedKeys=getUndefinedKeys(paths);var unset=_.pick(paths,undefinedKeys);return _.reduce(unset,function(result,v,k){result[k]=true;return result},{})};var createPull=function(unset){var arrKeyPaths=_.keys(unset).map(function(k){var split=k.match(/(.*)\.\d+$/);return split&&split[1]});return _.compact(arrKeyPaths).reduce(function(pull,k){pull[k]=null;return pull},{})};var getUndefinedKeys=function(obj){return _.keys(obj).filter(function(k){var v=obj[k];return _.isUndefined(v)})};return getUpdates}();module.value("getUpdates",getUpdates)})()}).call(this);(function(){"use strict";var angularMeteorSubscribe=angular.module("angular-meteor.subscribe",[]);angularMeteorSubscribe.service("$meteorSubscribe",["$q",function($q){var self=this;this._subscribe=function(scope,deferred,args){console.warn("[angular-meteor.subscribe] Please note that this module is deprecated since 1.3.0 and will be removed in 1.4.0! Replace it with the new syntax described here: http://www.angular-meteor.com/api/1.3.1/subscribe");var subscription=null;var lastArg=args[args.length-1];if(angular.isObject(lastArg)&&angular.isFunction(lastArg.onStop)){var onStop=lastArg.onStop;args.pop()}args.push({onReady:function(){deferred.resolve(subscription)},onStop:function(err){if(!deferred.promise.$$state.status){if(err)deferred.reject(err);else deferred.reject(new Meteor.Error("Subscription Stopped","Subscription stopped by a call to stop method. Either by the client or by the server."))}else if(onStop)onStop.apply(this,Array.prototype.slice.call(arguments))}});subscription=Meteor.subscribe.apply(scope,args);return subscription};this.subscribe=function(){var deferred=$q.defer();var args=Array.prototype.slice.call(arguments);var subscription=null;self._subscribe(this,deferred,args);return deferred.promise}}]);angularMeteorSubscribe.run(["$rootScope","$q","$meteorSubscribe",function($rootScope,$q,$meteorSubscribe){Object.getPrototypeOf($rootScope).$meteorSubscribe=function(){var deferred=$q.defer();var args=Array.prototype.slice.call(arguments);var subscription=$meteorSubscribe._subscribe(this,deferred,args);this.$on("$destroy",function(){subscription.stop()});return deferred.promise}}])}).call(this);(function(){"use strict";var angularMeteorStopper=angular.module("angular-meteor.stopper",["angular-meteor.subscribe"]);angularMeteorStopper.factory("$meteorStopper",["$q","$meteorSubscribe",function($q,$meteorSubscribe){function $meteorStopper($meteorEntity){return function(){var args=Array.prototype.slice.call(arguments);var meteorEntity=$meteorEntity.apply(this,args);angular.extend(meteorEntity,$meteorStopper);meteorEntity.$$scope=this;this.$on("$destroy",function(){meteorEntity.stop();if(meteorEntity.subscription)meteorEntity.subscription.stop()});return meteorEntity}}$meteorStopper.subscribe=function(){var args=Array.prototype.slice.call(arguments);this.subscription=$meteorSubscribe._subscribe(this.$$scope,$q.defer(),args);return this};return $meteorStopper}])}).call(this);(function(){"use strict";var angularMeteorCollection=angular.module("angular-meteor.collection",["angular-meteor.stopper","angular-meteor.subscribe","angular-meteor.utils","diffArray"]);angularMeteorCollection.factory("AngularMeteorCollection",["$q","$meteorSubscribe","$meteorUtils","$rootScope","$timeout","diffArray",function($q,$meteorSubscribe,$meteorUtils,$rootScope,$timeout,diffArray){function AngularMeteorCollection(curDefFunc,collection,diffArrayFunc,autoClientSave){console.warn("[angular-meteor.$meteorCollection] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/meteorCollection");var data=[];data._serverBackup=[];data._diffArrayFunc=diffArrayFunc;data._hObserve=null;data._hNewCurAutorun=null;data._hDataAutorun=null;if(angular.isDefined(collection)){data.$$collection=collection}else{var cursor=curDefFunc();data.$$collection=$meteorUtils.getCollectionByName(cursor.collection.name)}_.extend(data,AngularMeteorCollection);data._startCurAutorun(curDefFunc,autoClientSave);return data}AngularMeteorCollection._startCurAutorun=function(curDefFunc,autoClientSave){var self=this;self._hNewCurAutorun=Tracker.autorun(function(){Tracker.onInvalidate(function(){self._stopCursor()});if(autoClientSave)self._setAutoClientSave();self._updateCursor(curDefFunc(),autoClientSave)})};AngularMeteorCollection.subscribe=function(){$meteorSubscribe.subscribe.apply(this,arguments);return this};AngularMeteorCollection.save=function(docs,useUnsetModifier){if(!docs)docs=this;docs=[].concat(docs);var promises=docs.map(function(doc){return this._upsertDoc(doc,useUnsetModifier)},this);return $meteorUtils.promiseAll(promises)};AngularMeteorCollection._upsertDoc=function(doc,useUnsetModifier){var deferred=$q.defer();var collection=this.$$collection;var createFulfill=_.partial($meteorUtils.fulfill,deferred,null);doc=$meteorUtils.stripDollarPrefixedKeys(doc);var docId=doc._id;var isExist=collection.findOne(docId);if(isExist){delete doc._id;var modifier=useUnsetModifier?{$unset:doc}:{$set:doc};collection.update(docId,modifier,createFulfill(function(){return{_id:docId,action:"updated"}}))}else{collection.insert(doc,createFulfill(function(id){return{_id:id,action:"inserted"}}))}return deferred.promise};AngularMeteorCollection._updateDiff=function(selector,update,callback){callback=callback||angular.noop;var setters=_.omit(update,"$pull");var updates=[setters];_.each(update.$pull,function(pull,prop){var puller={};puller[prop]=pull;updates.push({$pull:puller})});this._updateParallel(selector,updates,callback)};AngularMeteorCollection._updateParallel=function(selector,updates,callback){var self=this;var done=_.after(updates.length,callback);var next=function(err,affectedDocsNum){if(err)return callback(err);done(null,affectedDocsNum)};_.each(updates,function(update){self.$$collection.update(selector,update,next)})};AngularMeteorCollection.remove=function(keyOrDocs){var keys;if(!keyOrDocs){keys=_.pluck(this,"_id")}else{keyOrDocs=[].concat(keyOrDocs);keys=_.map(keyOrDocs,function(keyOrDoc){return keyOrDoc._id||keyOrDoc})}check(keys,[Match.OneOf(String,Mongo.ObjectID)]);var promises=keys.map(function(key){return this._removeDoc(key)},this);return $meteorUtils.promiseAll(promises)};AngularMeteorCollection._removeDoc=function(id){var deferred=$q.defer();var collection=this.$$collection;var fulfill=$meteorUtils.fulfill(deferred,null,{_id:id,action:"removed"});collection.remove(id,fulfill);return deferred.promise};AngularMeteorCollection._updateCursor=function(cursor,autoClientSave){var self=this;if(self._hObserve)self._stopObserving();self._hObserve=cursor.observe({addedAt:function(doc,atIndex){self.splice(atIndex,0,doc);self._serverBackup.splice(atIndex,0,doc);self._setServerUpdateMode()},changedAt:function(doc,oldDoc,atIndex){diffArray.deepCopyChanges(self[atIndex],doc);diffArray.deepCopyRemovals(self[atIndex],doc);self._serverBackup[atIndex]=self[atIndex];self._setServerUpdateMode()},movedTo:function(doc,fromIndex,toIndex){self.splice(fromIndex,1);self.splice(toIndex,0,doc);self._serverBackup.splice(fromIndex,1);self._serverBackup.splice(toIndex,0,doc);self._setServerUpdateMode()},removedAt:function(oldDoc){var removedIndex=$meteorUtils.findIndexById(self,oldDoc);if(removedIndex!=-1){self.splice(removedIndex,1);self._serverBackup.splice(removedIndex,1);self._setServerUpdateMode()}else{removedIndex=$meteorUtils.findIndexById(self._serverBackup,oldDoc);if(removedIndex!=-1){self._serverBackup.splice(removedIndex,1)}}}});self._hDataAutorun=Tracker.autorun(function(){cursor.fetch();if(self._serverMode)self._unsetServerUpdateMode(autoClientSave)})};AngularMeteorCollection._stopObserving=function(){this._hObserve.stop();this._hDataAutorun.stop();delete this._serverMode;delete this._hUnsetTimeout};AngularMeteorCollection._setServerUpdateMode=function(name){this._serverMode=true;this._unsetAutoClientSave()};AngularMeteorCollection._unsetServerUpdateMode=function(autoClientSave){var self=this;if(self._hUnsetTimeout){$timeout.cancel(self._hUnsetTimeout);self._hUnsetTimeout=null}self._hUnsetTimeout=$timeout(function(){self._serverMode=false;var changes=diffArray.getChanges(self,self._serverBackup,self._diffArrayFunc);self._saveChanges(changes);if(autoClientSave)self._setAutoClientSave()},0)};AngularMeteorCollection.stop=function(){this._stopCursor();this._hNewCurAutorun.stop()};AngularMeteorCollection._stopCursor=function(){this._unsetAutoClientSave();if(this._hObserve){this._hObserve.stop();this._hDataAutorun.stop()}this.splice(0);this._serverBackup.splice(0)};AngularMeteorCollection._unsetAutoClientSave=function(name){if(this._hRegAutoBind){this._hRegAutoBind();this._hRegAutoBind=null}};AngularMeteorCollection._setAutoClientSave=function(){var self=this;self._unsetAutoClientSave();self._hRegAutoBind=$rootScope.$watch(function(){return self},function(nItems,oItems){if(nItems===oItems)return;var changes=diffArray.getChanges(self,oItems,self._diffArrayFunc);self._unsetAutoClientSave();self._saveChanges(changes);self._setAutoClientSave()},true)};AngularMeteorCollection._saveChanges=function(changes){var self=this;var addedDocs=changes.added.reverse().map(function(descriptor){self.splice(descriptor.index,1);return descriptor.item});if(addedDocs.length)self.save(addedDocs);var removedDocs=changes.removed.map(function(descriptor){return descriptor.item});if(removedDocs.length)self.remove(removedDocs);changes.changed.forEach(function(descriptor){self._updateDiff(descriptor.selector,descriptor.modifier)})};return AngularMeteorCollection}]);angularMeteorCollection.factory("$meteorCollectionFS",["$meteorCollection","diffArray",function($meteorCollection,diffArray){function $meteorCollectionFS(reactiveFunc,autoClientSave,collection){console.warn("[angular-meteor.$meteorCollectionFS] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/files");return new $meteorCollection(reactiveFunc,autoClientSave,collection,diffArray.shallow)}return $meteorCollectionFS}]);angularMeteorCollection.factory("$meteorCollection",["AngularMeteorCollection","$rootScope","diffArray",function(AngularMeteorCollection,$rootScope,diffArray){function $meteorCollection(reactiveFunc,autoClientSave,collection,diffFn){if(!reactiveFunc){throw new TypeError("The first argument of $meteorCollection is undefined.")}if(!(angular.isFunction(reactiveFunc)||angular.isFunction(reactiveFunc.find))){throw new TypeError("The first argument of $meteorCollection must be a function or a have a find function property.")}if(!angular.isFunction(reactiveFunc)){collection=angular.isDefined(collection)?collection:reactiveFunc;reactiveFunc=_.bind(reactiveFunc.find,reactiveFunc)}autoClientSave=angular.isDefined(autoClientSave)?autoClientSave:true;diffFn=diffFn||diffArray;return new AngularMeteorCollection(reactiveFunc,collection,diffFn,autoClientSave)}return $meteorCollection}]);angularMeteorCollection.run(["$rootScope","$meteorCollection","$meteorCollectionFS","$meteorStopper",function($rootScope,$meteorCollection,$meteorCollectionFS,$meteorStopper){var scopeProto=Object.getPrototypeOf($rootScope);scopeProto.$meteorCollection=$meteorStopper($meteorCollection);scopeProto.$meteorCollectionFS=$meteorStopper($meteorCollectionFS)}])}).call(this);(function(){"use strict";var angularMeteorObject=angular.module("angular-meteor.object",["angular-meteor.utils","angular-meteor.subscribe","angular-meteor.collection","getUpdates","diffArray"]);angularMeteorObject.factory("AngularMeteorObject",["$q","$meteorSubscribe","$meteorUtils","diffArray","getUpdates","AngularMeteorCollection",function($q,$meteorSubscribe,$meteorUtils,diffArray,getUpdates,AngularMeteorCollection){AngularMeteorObject.$$internalProps=["$$collection","$$options","$$id","$$hashkey","$$internalProps","$$scope","bind","save","reset","subscribe","stop","autorunComputation","unregisterAutoBind","unregisterAutoDestroy","getRawObject","_auto","_setAutos","_eventEmitter","_serverBackup","_updateDiff","_updateParallel","_getId"];function AngularMeteorObject(collection,selector,options){console.warn("[angular-meteor.$meteorObject] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/meteorObject");var helpers=collection._helpers;var data=_.isFunction(helpers)?Object.create(helpers.prototype):{};var doc=collection.findOne(selector,options);var collectionExtension=_.pick(AngularMeteorCollection,"_updateParallel");_.extend(data,doc);_.extend(data,AngularMeteorObject);_.extend(data,collectionExtension);data.$$options=_.omit(options,"skip","limit");data.$$collection=collection;data.$$id=data._getId(selector);data._serverBackup=doc||{};return data}AngularMeteorObject.getRawObject=function(){return angular.copy(_.omit(this,this.$$internalProps))};AngularMeteorObject.subscribe=function(){$meteorSubscribe.subscribe.apply(this,arguments);return this};AngularMeteorObject.save=function(custom){var deferred=$q.defer();var collection=this.$$collection;var createFulfill=_.partial($meteorUtils.fulfill,deferred,null);var oldDoc=collection.findOne(this.$$id);var mods;if(oldDoc){if(custom)mods={$set:custom};else{mods=getUpdates(oldDoc,this.getRawObject());if(_.isEmpty(mods)){return $q.when({action:"updated"})}}this._updateDiff(mods,createFulfill({action:"updated"}))}else{if(custom)mods=_.clone(custom);else mods=this.getRawObject();mods._id=mods._id||this.$$id;collection.insert(mods,createFulfill({action:"inserted"}))}return deferred.promise};AngularMeteorObject._updateDiff=function(update,callback){var selector=this.$$id;AngularMeteorCollection._updateDiff.call(this,selector,update,callback)};AngularMeteorObject.reset=function(keepClientProps){var self=this;var options=this.$$options;var id=this.$$id;var doc=this.$$collection.findOne(id,options);if(doc){var docKeys=_.keys(doc);var docExtension=_.pick(doc,docKeys);var clientProps;_.extend(self,docExtension);_.extend(self._serverBackup,docExtension);if(keepClientProps){clientProps=_.intersection(_.keys(self),_.keys(self._serverBackup))}else{clientProps=_.keys(self)}var serverProps=_.keys(doc);var removedKeys=_.difference(clientProps,serverProps,self.$$internalProps);removedKeys.forEach(function(prop){delete self[prop];delete self._serverBackup[prop]})}else{_.keys(this.getRawObject()).forEach(function(prop){delete self[prop]});self._serverBackup={}}};AngularMeteorObject.stop=function(){if(this.unregisterAutoDestroy)this.unregisterAutoDestroy();if(this.unregisterAutoBind)this.unregisterAutoBind();if(this.autorunComputation&&this.autorunComputation.stop)this.autorunComputation.stop()};AngularMeteorObject._getId=function(selector){var options=_.extend({},this.$$options,{fields:{_id:1},reactive:false,transform:null});var doc=this.$$collection.findOne(selector,options);if(doc)return doc._id;if(selector instanceof Mongo.ObjectID)return selector;if(_.isString(selector))return selector;return new Mongo.ObjectID};return AngularMeteorObject}]);angularMeteorObject.factory("$meteorObject",["$rootScope","$meteorUtils","getUpdates","AngularMeteorObject",function($rootScope,$meteorUtils,getUpdates,AngularMeteorObject){function $meteorObject(collection,id,auto,options){if(!collection){throw new TypeError("The first argument of $meteorObject is undefined.")}if(!angular.isFunction(collection.findOne)){throw new TypeError("The first argument of $meteorObject must be a function or a have a findOne function property.")}var data=new AngularMeteorObject(collection,id,options);data._auto=auto!==false;_.extend(data,$meteorObject);data._setAutos();return data}$meteorObject._setAutos=function(){var self=this;this.autorunComputation=$meteorUtils.autorun($rootScope,function(){self.reset(true)});this.unregisterAutoBind=this._auto&&$rootScope.$watch(function(){return self.getRawObject()},function(item,oldItem){if(item!==oldItem)self.save()},true);this.unregisterAutoDestroy=$rootScope.$on("$destroy",function(){if(self&&self.stop)self.pop()})};return $meteorObject}]);angularMeteorObject.run(["$rootScope","$meteorObject","$meteorStopper",function($rootScope,$meteorObject,$meteorStopper){var scopeProto=Object.getPrototypeOf($rootScope);scopeProto.$meteorObject=$meteorStopper($meteorObject)}])}).call(this);(function(){"use strict";var angularMeteorUser=angular.module("angular-meteor.user",["angular-meteor.utils","angular-meteor.reactive-scope"]);angularMeteorUser.service("$meteorUser",["$rootScope","$meteorUtils","$q",function($rootScope,$meteorUtils,$q){var pack=Package["accounts-base"];if(!pack)return;var self=this;var Accounts=pack.Accounts;this.waitForUser=function(){console.warn("[angular-meteor.waitForUser] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! http://info.meteor.com/blog/angular-meteor-1.3");var deferred=$q.defer();$meteorUtils.autorun($rootScope,function(){if(!Meteor.loggingIn())deferred.resolve(Meteor.user())},true);return deferred.promise};this.requireUser=function(ignoreDeprecation){if(!ignoreDeprecation){console.warn("[angular-meteor.requireUser] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! http://info.meteor.com/blog/angular-meteor-1.3")}var deferred=$q.defer();$meteorUtils.autorun($rootScope,function(){if(!Meteor.loggingIn()){if(Meteor.user()==null)deferred.reject("AUTH_REQUIRED");else deferred.resolve(Meteor.user())}},true);return deferred.promise};this.requireValidUser=function(validatorFn){console.warn("[angular-meteor.requireValidUser] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! http://info.meteor.com/blog/angular-meteor-1.3");return self.requireUser(true).then(function(user){var valid=validatorFn(user);if(valid===true)return user;else if(typeof valid==="string")return $q.reject(valid);else return $q.reject("FORBIDDEN")})};this.loginWithPassword=$meteorUtils.promissor(Meteor,"loginWithPassword");this.createUser=$meteorUtils.promissor(Accounts,"createUser");this.changePassword=$meteorUtils.promissor(Accounts,"changePassword");this.forgotPassword=$meteorUtils.promissor(Accounts,"forgotPassword");this.resetPassword=$meteorUtils.promissor(Accounts,"resetPassword");this.verifyEmail=$meteorUtils.promissor(Accounts,"verifyEmail");this.logout=$meteorUtils.promissor(Meteor,"logout");this.logoutOtherClients=$meteorUtils.promissor(Meteor,"logoutOtherClients");this.loginWithFacebook=$meteorUtils.promissor(Meteor,"loginWithFacebook");this.loginWithTwitter=$meteorUtils.promissor(Meteor,"loginWithTwitter");this.loginWithGoogle=$meteorUtils.promissor(Meteor,"loginWithGoogle");this.loginWithGithub=$meteorUtils.promissor(Meteor,"loginWithGithub");this.loginWithMeteorDeveloperAccount=$meteorUtils.promissor(Meteor,"loginWithMeteorDeveloperAccount");this.loginWithMeetup=$meteorUtils.promissor(Meteor,"loginWithMeetup");this.loginWithWeibo=$meteorUtils.promissor(Meteor,"loginWithWeibo")}]);angularMeteorUser.run(["$rootScope",function($rootScope){console.warn("[angular-meteor.$rootScope.currentUser/loggingIn] Please note that this functionality has migrated to a separate package and will be deprecated in 1.4.0. For more info: http://www.angular-meteor.com/api/1.3.2/auth");$rootScope.autorun(function(){if(!Meteor.user)return;$rootScope.currentUser=Meteor.user();$rootScope.loggingIn=Meteor.loggingIn()},true)}])}).call(this);(function(){"use strict";var angularMeteorMethods=angular.module("angular-meteor.methods",["angular-meteor.utils"]);angularMeteorMethods.service("$meteorMethods",["$q","$meteorUtils",function($q,$meteorUtils){this.call=function(){console.warn("[angular-meteor.$meteor.call] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/methods");var deferred=$q.defer();var fulfill=$meteorUtils.fulfill(deferred);var args=_.toArray(arguments).concat(fulfill);Meteor.call.apply(this,args);return deferred.promise}}])}).call(this);(function(){"use strict";var angularMeteorSession=angular.module("angular-meteor.session",["angular-meteor.utils"]);angularMeteorSession.factory("$meteorSession",["$meteorUtils","$parse",function($meteorUtils,$parse){return function(session){return{bind:function(scope,model){console.warn("[angular-meteor.session.bind] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! http://www.angular-meteor.com/api/1.3.0/session");var getter=$parse(model);var setter=getter.assign;$meteorUtils.autorun(scope,function(){setter(scope,Session.get(session))});scope.$watch(model,function(newItem,oldItem){Session.set(session,getter(scope))},true)}}}}])}).call(this);(function(){var angularMeteorReactiveScope=angular.module("angular-meteor.reactive-scope",["angular-meteor.reactive"]);angularMeteorReactiveScope.run(["$rootScope","$reactive","$parse",function($rootScope,$reactive,$parse){var ReactiveScope=function(){function ReactiveScope(){babelHelpers.classCallCheck(this,ReactiveScope)}ReactiveScope.prototype.helpers=function(){function helpers(def){this.stopOnDestroy($reactive(this).helpers(def))}return helpers}();ReactiveScope.prototype.autorun=function(){function autorun(fn){return this.stopOnDestroy(Meteor.autorun(fn))}return autorun}();ReactiveScope.prototype.subscribe=function(){function subscribe(name,fn,resultCb){var _this=this;if(fn===undefined)fn=angular.noop;var result={};var autorunComp=this.autorun(function(){var _Meteor;var args=fn.apply(_this)||[];if(!angular.isArray(args)){throw new Error("[angular-meteor][ReactiveContext] The return value of arguments function in subscribe must be an array! ")}var subscriptionResult=(_Meteor=Meteor).subscribe.apply(_Meteor,[name].concat(args,[resultCb]));_this.stopOnDestroy(subscriptionResult);result.ready=subscriptionResult.ready.bind(subscriptionResult);result.subscriptionId=subscriptionResult.subscriptionId});result.stop=autorunComp.stop.bind(autorunComp);return result}return subscribe}();ReactiveScope.prototype.getReactively=function(){function getReactively(property,objectEquality){var _this2=this;if(!this.$$trackerDeps){this.$$trackerDeps={}}if(angular.isUndefined(objectEquality)){objectEquality=false}if(!this.$$trackerDeps[property]){this.$$trackerDeps[property]=new Tracker.Dependency;this.$watch(property,function(newVal,oldVal){if(newVal!==oldVal){_this2.$$trackerDeps[property].changed()}},objectEquality)}this.$$trackerDeps[property].depend();return $parse(property)(this)}return getReactively}();ReactiveScope.prototype.stopOnDestroy=function(){function stopOnDestroy(stoppable){this.$on("$destroy",function(){return stoppable.stop()});return stoppable}return stopOnDestroy}();return ReactiveScope}();angular.extend(Object.getPrototypeOf($rootScope),ReactiveScope.prototype)}])}).call(this);(function(){"use strict";var angularMeteorUtils=angular.module("angular-meteor.utils",[]);angularMeteorUtils.service("$meteorUtils",["$q","$timeout",function($q,$timeout){var self=this;this.autorun=function(scope,fn,ignoreDeprecation){if(!ignoreDeprecation){console.warn("[angular-meteor.utils.autorun] Please note that this method is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.1/autorun")}var comp=Tracker.autorun(function(c){fn(c);if(!c.firstRun)$timeout(angular.noop,0)});scope.$on("$destroy",function(){comp.stop()});return comp};this.stripDollarPrefixedKeys=function(data){if(!_.isObject(data)||data instanceof Date||data instanceof File||EJSON.toJSONValue(data).$type==="oid"||typeof FS==="object"&&data instanceof FS.File)return data;var out=_.isArray(data)?[]:{};_.each(data,function(v,k){if(typeof k!=="string"||k.charAt(0)!=="$")out[k]=self.stripDollarPrefixedKeys(v)});return out};this.fulfill=function(deferred,boundError,boundResult){return function(err,result){if(err)deferred.reject(boundError==null?err:boundError);else if(typeof boundResult=="function")deferred.resolve(boundResult==null?result:boundResult(result));else deferred.resolve(boundResult==null?result:boundResult)}};this.promissor=function(obj,method){return function(){var deferred=$q.defer();var fulfill=self.fulfill(deferred);var args=_.toArray(arguments).concat(fulfill);obj[method].apply(obj,args);return deferred.promise}};this.promiseAll=function(promises){var allPromise=$q.all(promises);allPromise["finally"](function(){$timeout(angular.noop)});return allPromise};this.getCollectionByName=function(string){return Mongo.Collection.get(string)};this.findIndexById=function(collection,doc){var foundDoc=_.find(collection,function(colDoc){return EJSON.equals(colDoc._id,doc._id)});return _.indexOf(collection,foundDoc)}}]);angularMeteorUtils.run(["$rootScope","$meteorUtils",function($rootScope,$meteorUtils){Object.getPrototypeOf($rootScope).$meteorAutorun=function(fn){return $meteorUtils.autorun(this,fn)}}])}).call(this);(function(){"use strict";var angularMeteorCamera=angular.module("angular-meteor.camera",["angular-meteor.utils"]);angularMeteorCamera.service("$meteorCamera",["$q","$meteorUtils",function($q,$meteorUtils){console.warn("[angular-meteor.camera] Please note that this module has moved to a separate package and is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/camera");var pack=Package["mdg:camera"];if(!pack)return;var MeteorCamera=pack.MeteorCamera;this.getPicture=function(options){console.warn("[angular-meteor.camera] Please note that this module has moved to a separate package and is deprecated since 1.3.0 and will be removed in 1.4.0! For more info: http://www.angular-meteor.com/api/1.3.0/camera");options=options||{};var deferred=$q.defer();MeteorCamera.getPicture(options,$meteorUtils.fulfill(deferred));return deferred.promise}}])}).call(this);(function(){angular.module("angular-meteor.reactive",["angular-meteor.reactive-scope"]).factory("$reactive",["$rootScope","$parse",function($rootScope,$parse){var ReactiveContext=function(){function ReactiveContext(context){babelHelpers.classCallCheck(this,ReactiveContext);if(!context||!angular.isObject(context)){throw new Error("[angular-meteor][ReactiveContext] The context for ReactiveContext is required and must be an object!")}this.context=context;if(this._isScope(this.context)){this.scope=this.context}this.stoppables=[];this.propertiesTrackerDeps={};this.usingNewScope=false}ReactiveContext.prototype.attach=function(){function attach(scope){if(!this.scope&&this._isScope(scope)){this.scope=scope}return this}return attach}();ReactiveContext.prototype._isScope=function(){function _isScope(obj){return obj instanceof Object.getPrototypeOf($rootScope).constructor}return _isScope}();ReactiveContext.prototype._handleCursor=function(){function _handleCursor(cursor,name){var _this=this;if(angular.isUndefined(this.context[name])){this._setValHelper(name,cursor.fetch(),false)}else{var diff=jsondiffpatch.diff(this.context[name],cursor.fetch());jsondiffpatch.patch(this.context[name],diff)}var initial=true;var handle=cursor.observe({addedAt:function(doc,atIndex){if(!initial){_this.context[name].splice(atIndex,0,doc);_this._propertyChanged(name)}},changedAt:function(doc,oldDoc,atIndex){var diff=jsondiffpatch.diff(_this.context[name][atIndex],doc);jsondiffpatch.patch(_this.context[name][atIndex],diff);_this._propertyChanged(name)},movedTo:function(doc,fromIndex,toIndex){_this.context[name].splice(fromIndex,1);_this.context[name].splice(toIndex,0,doc);_this._propertyChanged(name)},removedAt:function(oldDoc,atIndex){_this.context[name].splice(atIndex,1);_this._propertyChanged(name)}});initial=false;return handle}return _handleCursor}();ReactiveContext.prototype._handleNonCursor=function(){function _handleNonCursor(data,name){if(angular.isUndefined(this.propertiesTrackerDeps[name])&&angular.isDefined(this.context[name])){console.warn("[angular-meteor][ReactiveContext] Your tried to create helper named '"+name+"' on your context, but there's already property with that name - angular-meteor will override it!");this.context[name]=undefined}if(angular.isUndefined(this.context[name])){this._setValHelper(name,data)}else{if(!_.isObject(data)&&!_.isArray(data)||!_.isObject(this.context[name])&&!_.isArray(this.context[name])){this.context[name]=data}else{var diff=jsondiffpatch.diff(this.context[name],data);jsondiffpatch.patch(this.context[name],diff);this._propertyChanged(name)}}}return _handleNonCursor}();ReactiveContext.prototype._verifyScope=function(){function _verifyScope(){if(!this.scope){this.usingNewScope=true;this.scope=$rootScope.$new(true)}}return _verifyScope}();ReactiveContext.prototype.helpers=function(){function helpers(props){var _this2=this;_.each(props,function(v,k){if(_.isFunction(v)){_this2._setFnHelper(k,v)}else{console.warn("[angular-meteor][helpers] Your tried to create helper for primitive '"+k+"', please note that this feature will be deprecated in 1.4 in favor of using 'getReactively' - http://www.angular-meteor.com/api/1.3.1/get-reactively");_this2._setValHelper(k,v);if(angular.isObject(v)){_this2.getReactively(k,true)}}});return this}return helpers}();ReactiveContext.prototype.getReactively=function(){function getReactively(k,objectEquality){var _this3=this;var context=this.context;if(angular.isUndefined(objectEquality)){objectEquality=false}this._verifyScope();var currentValue=$parse(k)(context);if(!this.propertiesTrackerDeps[k]){(function(){var initialValue=currentValue;_this3.propertiesTrackerDeps[k]=new Tracker.Dependency;_this3.scope.$watch(function(){return $parse(k)(context)},function(newValue,oldValue){if(newValue!==oldValue||newValue!==initialValue){_this3.propertiesTrackerDeps[k].changed()}},objectEquality)})()}this.propertiesTrackerDeps[k].depend();return currentValue}return getReactively}();ReactiveContext.prototype._setValHelper=function(){function _setValHelper(k,v){var _this4=this;var addWatcher=arguments.length<=2||arguments[2]===undefined?true:arguments[2];if(addWatcher){this.getReactively(k,true)}this.propertiesTrackerDeps[k]=new Tracker.Dependency;v=_.clone(v);Object.defineProperty(this.context,k,{configurable:true,enumerable:true,get:function(){_this4.propertiesTrackerDeps[k].depend();return v},set:function(newValue){v=newValue;_this4._propertyChanged(k)}})}return _setValHelper}();ReactiveContext.prototype._setFnHelper=function(){function _setFnHelper(k,fn){var _this5=this;this.stoppables.push(Tracker.autorun(function(comp){var data=fn.apply(_this5.context);Tracker.nonreactive(function(){if(_this5._isMeteorCursor(data)){(function(){var stoppableObservation=_this5._handleCursor(data,k);comp.onInvalidate(function(){stoppableObservation.stop();_this5.context[k].splice(0)})})()}else{_this5._handleNonCursor(data,k)}_this5._propertyChanged(k)})}))}return _setFnHelper}();ReactiveContext.prototype._isMeteorCursor=function(){function _isMeteorCursor(obj){return obj instanceof Mongo.Collection.Cursor}return _isMeteorCursor}();ReactiveContext.prototype._propertyChanged=function(){function _propertyChanged(k){if(this.scope&&!this.scope.$$destroyed&&!$rootScope.$$phase){this.scope.$digest()}this.propertiesTrackerDeps[k].changed()}return _propertyChanged}();ReactiveContext.prototype.subscribe=function(){ +function subscribe(name,fn,resultCb){var _this6=this;if(!angular.isString(name)){throw new Error("[angular-meteor][ReactiveContext] The first argument of 'subscribe' method must be a string!")}var result={};fn=fn||angular.noop;resultCb=resultCb||angular.noop;if(!angular.isFunction(fn)){throw new Error("[angular-meteor][ReactiveContext] The second argument of 'subscribe' method must be a function!")}if(this.scope&&this.scope!==this.context){result=this.scope.subscribe(name,fn,resultCb);this.stoppables.push(result)}else{var autorunComp=this.autorun(function(){var _Meteor;var args=fn.apply(_this6.context)||[];if(!angular.isArray(args)){throw new Error("[angular-meteor][ReactiveContext] The return value of arguments function in subscribe must be an array! ")}var subscriptionResult=(_Meteor=Meteor).subscribe.apply(_Meteor,[name].concat(args,[resultCb]));result.ready=subscriptionResult.ready.bind(subscriptionResult);result.subscriptionId=subscriptionResult.subscriptionId});result.stop=autorunComp.stop.bind(autorunComp)}return result}return subscribe}();ReactiveContext.prototype.autorun=function(){function autorun(fn){if(this.scope&&this.scope!==this.context){return this.scope.autorun(fn)}else{var stoppable=Meteor.autorun(fn);this.stoppables.push(stoppable);return stoppable}}return autorun}();ReactiveContext.prototype.stop=function(){function stop(){angular.forEach(this.stoppables,function(stoppable){stoppable.stop()});this.stoppables=[];if(this.usingNewScope){this.scope.$destroy();this.scope=undefined}return this}return stop}();return ReactiveContext}();return function(context){var reactiveContext=new ReactiveContext(context);_.keys(ReactiveContext.prototype).filter(function(k){return k.charAt(0)!="_"}).forEach(function(k){return context[k]=reactiveContext[k].bind(reactiveContext)});return reactiveContext}}])}).call(this);(function(){var angularMeteor=angular.module("angular-meteor",["angular-meteor.subscribe","angular-meteor.collection","angular-meteor.object","angular-meteor.user","angular-meteor.methods","angular-meteor.session","angular-meteor.reactive-scope","angular-meteor.utils","angular-meteor.camera","angular-meteor.reactive"]);angularMeteor.run(["$compile","$document","$rootScope",function($compile,$document,$rootScope){if(Package["iron:router"]){var appLoaded=false;Package["iron:router"].Router.onAfterAction(function(req,res,next){Tracker.afterFlush(function(){if(!appLoaded){$compile($document)($rootScope);if(!$rootScope.$$phase)$rootScope.$apply();appLoaded=true}})})}}]);angularMeteor.service("$meteor",["$meteorCollection","$meteorCollectionFS","$meteorObject","$meteorMethods","$meteorSession","$meteorSubscribe","$meteorUtils","$meteorCamera","$meteorUser",function($meteorCollection,$meteorCollectionFS,$meteorObject,$meteorMethods,$meteorSession,$meteorSubscribe,$meteorUtils,$meteorCamera,$meteorUser){this.collection=$meteorCollection;this.collectionFS=$meteorCollectionFS;this.object=$meteorObject;this.subscribe=$meteorSubscribe.subscribe;this.call=$meteorMethods.call;this.loginWithPassword=$meteorUser.loginWithPassword;this.requireUser=$meteorUser.requireUser;this.requireValidUser=$meteorUser.requireValidUser;this.waitForUser=$meteorUser.waitForUser;this.createUser=$meteorUser.createUser;this.changePassword=$meteorUser.changePassword;this.forgotPassword=$meteorUser.forgotPassword;this.resetPassword=$meteorUser.resetPassword;this.verifyEmail=$meteorUser.verifyEmail;this.loginWithMeteorDeveloperAccount=$meteorUser.loginWithMeteorDeveloperAccount;this.loginWithFacebook=$meteorUser.loginWithFacebook;this.loginWithGithub=$meteorUser.loginWithGithub;this.loginWithGoogle=$meteorUser.loginWithGoogle;this.loginWithMeetup=$meteorUser.loginWithMeetup;this.loginWithTwitter=$meteorUser.loginWithTwitter;this.loginWithWeibo=$meteorUser.loginWithWeibo;this.logout=$meteorUser.logout;this.logoutOtherClients=$meteorUser.logoutOtherClients;this.session=$meteorSession;this.autorun=$meteorUtils.autorun;this.getCollectionByName=$meteorUtils.getCollectionByName;this.getPicture=$meteorCamera.getPicture}])}).call(this);if(typeof Package==="undefined")Package={};Package["angular-meteor-data"]={}})(); \ No newline at end of file diff --git a/packages/angular-with-blaze/.versions b/packages/angular-with-blaze/.versions index 6530621fb..4a79695ac 100644 --- a/packages/angular-with-blaze/.versions +++ b/packages/angular-with-blaze/.versions @@ -1,6 +1,6 @@ angular-blaze-templates-compiler@0.0.1 angular-meteor-data@0.0.9 -angular-with-blaze@1.3.2 +angular-with-blaze@1.3.3 angular:angular@1.4.7 babel-compiler@5.8.24_1 babel-runtime@0.1.4 diff --git a/packages/angular-with-blaze/package.js b/packages/angular-with-blaze/package.js index 115060048..476629234 100644 --- a/packages/angular-with-blaze/package.js +++ b/packages/angular-with-blaze/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "angular-with-blaze", summary: "Everything you need to use both AngularJS and Blaze templates in your Meteor app", - version: "1.3.2", + version: "1.3.3", git: "https://github.com/Urigo/angular-meteor.git", documentation: "../../README.md" }); diff --git a/packages/angular/.versions b/packages/angular/.versions index e2df31476..e3cf4e8e8 100644 --- a/packages/angular/.versions +++ b/packages/angular/.versions @@ -1,4 +1,4 @@ -angular@1.3.2 +angular@1.3.3 angular-meteor-data@0.0.9 angular-templates@0.0.3 angular:angular@1.4.7 @@ -39,7 +39,7 @@ mongo-id@1.0.1 npm-mongo@1.4.39_1 observe-sequence@1.0.7 ordered-dict@1.0.4 -pbastowski:angular-babel@1.0.7 +pbastowski:angular-babel@1.0.8 promise@0.5.1 random@1.0.5 reactive-dict@1.1.3 diff --git a/packages/angular/package.js b/packages/angular/package.js index 14ff02033..eb2e95cd1 100644 --- a/packages/angular/package.js +++ b/packages/angular/package.js @@ -1,7 +1,7 @@ Package.describe({ name: "angular", summary: "Everything you need to use AngularJS in your Meteor app", - version: "1.3.2", + version: "1.3.3", git: "https://github.com/Urigo/angular-meteor.git", documentation: "../../README.md" }); @@ -12,6 +12,6 @@ Package.onUse(function (api) { api.imply([ 'angular-meteor-data@0.0.9', 'angular-templates@0.0.3', - 'pbastowski:angular-babel@1.0.7' + 'pbastowski:angular-babel@1.0.8' ]) }); diff --git a/packages/urigo-angular/.versions b/packages/urigo-angular/.versions index 95297b7f0..c8c5e07c0 100644 --- a/packages/urigo-angular/.versions +++ b/packages/urigo-angular/.versions @@ -1,4 +1,4 @@ -angular@1.3.2 +angular@1.3.3 angular-meteor-data@0.0.9 angular-templates@0.0.3 angular:angular@1.4.7 @@ -39,7 +39,7 @@ mongo-id@1.0.1 npm-mongo@1.4.39_1 observe-sequence@1.0.7 ordered-dict@1.0.4 -pbastowski:angular-babel@1.0.7 +pbastowski:angular-babel@1.0.8 promise@0.5.1 random@1.0.5 reactive-dict@1.1.3 @@ -53,6 +53,6 @@ templating-tools@1.0.0 tracker@1.0.9 ui@1.0.8 underscore@1.0.4 -urigo:angular@1.3.2 +urigo:angular@1.3.3 webapp@1.2.3 webapp-hashing@1.0.5 diff --git a/packages/urigo-angular/package.js b/packages/urigo-angular/package.js index 106468589..a41d84bbb 100644 --- a/packages/urigo-angular/package.js +++ b/packages/urigo-angular/package.js @@ -1,11 +1,11 @@ Package.describe({ name: "urigo:angular", summary: "Deprecated: use the official `angular` package instead!", - version: "1.3.2", + version: "1.3.3", git: "https://github.com/Urigo/angular-meteor.git", documentation: null }); Package.on_use(function (api) { - api.imply("angular@1.3.2"); -}); \ No newline at end of file + api.imply("angular@1.3.3"); +});