Skip to content

Instantly share code, notes, and snippets.

@phwd
Forked from steipete/ReactNative.js
Created January 13, 2024 18:43
Show Gist options
  • Save phwd/0fc6961be62b1d04ef769f2fdb39fc06 to your computer and use it in GitHub Desktop.
Save phwd/0fc6961be62b1d04ef769f2fdb39fc06 to your computer and use it in GitHub Desktop.
Facebook Group App's ReactNative
This file has been truncated, but you can view the full file.
__SSTOKENSTRING = "@generated SignedSource<<dbe928e1275c495c1922c1bf063ffb70>>";
! function(e) {
function t(e) {
function t() {
var t = Array.prototype.map.call(arguments, function(e) {
if (null == e) return null === e ? "null" : "undefined";
if ("string" == typeof e) return '"' + e + '"';
try {
return JSON.stringify(e)
} catch (t) {
if ("function" == typeof e.toString) try {
return e.toString()
} catch (t) {
return "unknown"
}
}
}).join(", ");
e.nativeLoggingHook(t)
}
function r(t) {
if (!Array.isArray(t)) {
var r = t;
t = [];
for (var i in r)
if (r.hasOwnProperty(i)) {
var a = r[i];
a[n] = i, t.push(a)
}
}
if (0 === t.length) return void e.nativeLoggingHook("");
var s = Object.keys(t[0]).sort(),
l = [],
u = [];
s.forEach(function(e, n) {
u[n] = e.length;
for (var r = 0; r < t.length; r++) {
var o = t[r][e].toString();
l[r] = l[r] || [], l[r][n] = o, u[n] = Math.max(u[n], o.length)
}
});
for (var c = function(e, t) {
var n = e.map(function(e, t) {
var n = o(" ", u[t] - e.length).join("");
return e + n
});
return t = t || " ", n.join(t + "|" + t)
}, d = u.map(function(e) {
return o("-", e).join("")
}), p = c(d, "-"), h = c(s), f = [h, p], m = 0; m < t.length; m++) f.push(c(l[m]));
e.nativeLoggingHook("\n" + f.join("\n"))
}
if (e.nativeLoggingHook) {
var o = function(e, t) {
return Array.apply(null, Array(t)).map(function() {
return e
})
};
e.console = {
error: t,
info: t,
log: t,
warn: t,
table: r
}
}
}
var n = "(index)";
"undefined" != typeof module ? module.exports = t : t(e)
}(this),
function(e) {
function t() {
var t = function(t) {
e.console.error("Error: \n stack: " + t.stack + "\n line: " + t.line + "\n message: " + t.message, t)
};
e.ErrorUtils.setGlobalHandler(t)
}
var n = {
_inGuard: 0,
_globalHandler: null,
setGlobalHandler: function(e) {
n._globalHandler = e
},
reportError: function(e) {
Error._globalHandler && n._globalHandler(e)
},
applyWithGuard: function(e, t, r) {
try {
return n._inGuard++, e.apply(t, r)
} catch (o) {
n._globalHandler && n._globalHandler(o)
} finally {
n._inGuard--
}
},
applyWithGuardIfNeeded: function(e, t, r) {
return n.inGuard() ? e.apply(t, r) : void n.applyWithGuard(e, t, r)
},
inGuard: function() {
return n._inGuard
},
guard: function(e, t, r) {
function o() {
return n.applyWithGuard(e, r || this, arguments, null, t)
}
return t = t || e.name || "<generated guard>", o
}
};
e.ErrorUtils = n, t()
}(this), __VERSION__ = .44, __DEV__ = !1, Object.assign = function(e) {
if (__DEV__) {
if (null == e) throw new TypeError("Object.assign target cannot be null or undefined");
if ("object" != typeof e && "function" != typeof e) throw new TypeError("In this environment the target of assign MUST be an object.This error is a performance optimization and not spec compliant.")
}
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
if (null != n) {
if (__DEV__ && "object" != typeof n && "function" != typeof n) throw new TypeError("In this environment the target of assign MUST be an object.This error is a performance optimization and not spec compliant.");
for (var r in n) {
if (__DEV__) {
var o = Object.prototype.hasOwnProperty;
if (!o.call(n, r)) throw new TypeError("One of the sources to assign has an enumerable key on the prototype chain. This is an edge case that we do not support. This error is a performance optimization and not spec compliant.")
}
e[r] = n[r]
}
}
}
return e
},
function(e) {
function t(e) {
for (var t = Array.prototype.slice.call(e), n = {}; t.length;) {
var r = t.shift();
if (!n[r]) {
n[r] = !0;
var o = p[r];
if (o && o.waiting)
for (var i = 0; i < o.dependencies.length; i++) {
var a = o.dependencies[i];
(!p[a] || p[a].waiting) && t.push(a)
}
}
}
for (r in n) y.call(n, r) && t.push(r);
return t
}
function n(e) {
for (var t = [], n = 0; n < e.length; n++) {
var r = e[n],
o = r,
i = p[r];
if (i)
if (i.waiting) {
for (var a = [], s = 0; s < i.dependencies.length; s++) {
var l = i.dependencies[s];
(!p[l] || p[l].waiting) && a.push(l)
}
o += " is waiting for " + a.join(", ")
} else o += " is ready";
else o += " is not defined";
t.push(o)
}
return t.join("\n")
}
function r(o) {
if (e.ErrorUtils && !e.ErrorUtils.inGuard()) return ErrorUtils.applyWithGuard(r, this, arguments);
var i, a, s, l = p[o];
if (!p[o]) throw s = 'Requiring unknown module "' + o + '"', __DEV__ && (s += ". It may not be loaded yet. Did you forget to run arc build?"), new Error(s);
if (l.hasError) throw new Error('Requiring module "' + o + '" which threw an exception');
if (l.waiting) {
if (s = 'Requiring module "' + o + '" with unresolved dependencies', __DEV__) {
var u = t([o]);
e.console && e.console.error(n(u));
for (var c = [], h = 0; h < u.length; h++) {
var f = u[h];
p[f] || c.push(f)
}
s += ": " + c.join(", ")
}
throw new Error(s)
}
if (!l.exports) {
var m = l.exports = {},
g = l.factory;
if ("[object Function]" === d.call(g)) {
var y, v = [],
S = l.dependencies,
w = S.length;
l.special & _ && (w = Math.min(w, g.length));
try {
for (a = 0; w > a; a++) i = S[a], v.push("module" === i ? l : "exports" === i ? m : r(i));
y = g.apply(l.context || e, v)
} catch (b) {
throw l.hasError = !0, b
}
if (y) {
if (__DEV__ && "object" != typeof y && "function" != typeof y) throw new Error('Factory for module "' + o + '" returned an invalid value "' + y + '". Returned value should be either a function or an object.');
l.exports = y
}
} else l.exports = g
}
return 1 === l.refcount-- && delete p[o], l.exports
}
function o(e, t, n, r, o, a) {
void 0 === t ? (t = [], n = e, e = s()) : void 0 === n && (n = t, "[object Array]" === d.call(e) ? (t = e, e = s()) : t = []);
var l = {
cancel: function() {
i(e)
}
},
c = p[e];
if (c) return a && (c.refcount += a), l;
if (!t && !n && a) return f[e] = (f[e] || 0) + a, l;
if (c = {
id: e
}, c.refcount = (f[e] || 0) + (a || 0), delete f[e], __DEV__) {
if (!n || "object" != typeof n && "function" != typeof n && "string" != typeof n) throw new Error('Invalid factory "' + n + '" for module "' + e + '". Factory should be either a function or an object.');
if ("[object Array]" !== d.call(t)) throw new Error('Invalid dependencies for module "' + e + '". Dependencies must be passed as an array.')
}
return c.factory = n, c.dependencies = t, c.context = o, c.special = r, c.waitingMap = {}, c.waiting = 0, c.hasError = !1, p[e] = c, u(e), l
}
function i(e) {
if (p[e]) {
var t = p[e];
delete p[e];
for (var n in t.waitingMap) t.waitingMap[n] && delete h[n][e];
for (var r = 0; r < t.dependencies.length; r++) n = t.dependencies[r], p[n] ? 1 === p[n].refcount-- && i(n) : f[n] && f[n] --
}
}
function a(e, t, n) {
return o(e, t, void 0, g, n, 1)
}
function s() {
return "__mod__" + m++
}
function l(e, t) {
e.waitingMap[t] || e.id === t || (e.waiting++, e.waitingMap[t] = 1, h[t] || (h[t] = {}), h[t][e.id] = 1)
}
function u(e) {
var t, n, o, i = [],
a = p[e];
for (n = 0; n < a.dependencies.length; n++)
if (t = a.dependencies[n], p[t]) {
if (p[t].waiting)
for (o in p[t].waitingMap) p[t].waitingMap[o] && l(a, o)
} else l(a, t);
if (0 === a.waiting && a.special & g && i.push(e), h[e]) {
var s, u = h[e];
h[e] = void 0;
for (t in u) {
s = p[t];
for (o in a.waitingMap) a.waitingMap[o] && l(s, o);
s.waitingMap[e] && (s.waitingMap[e] = void 0, s.waiting--), 0 === s.waiting && s.special & g && i.push(t)
}
}
for (n = 0; n < i.length; n++) r(i[n])
}
function c(e, t) {
p[e] = {
id: e
}, p[e].exports = t
}
if (!e.require) {
var d = Object.prototype.toString,
p = {},
h = {},
f = {},
m = 0,
g = 1,
_ = 2,
y = Object.prototype.hasOwnProperty;
c("module", 0), c("exports", 0), c("define", o), c("global", e), c("require", r), c("requireDynamic", r), c("requireLazy", a), e.require = r, e.requireDynamic = r, e.requireLazy = a, r.__debug = {
modules: p,
deps: h
};
var v = function(e, t, n, r) {
o(e, t, n, r || _)
};
e.__d = function(e, t, n, r) {
t = ["global", "require", "requireDynamic", "requireLazy", "module", "exports"].concat(t), v(e, t, n, r)
}
}
}(this), process = {
env: {}
}, process.env.NODE_ENV = "production", __d("RKMainBundle", [], function(e, t, n, r, o) {
"use strict";
var i = t("Bundler");
i.registerConfig([{
appKey: "GroupsFeedApp",
component: function() {
return t("GroupsFeedApp")
}
}, {
appKey: "GroupsPermalinkApp",
component: function() {
return t("GroupsPermalinkApp")
}
}, {
appKey: "GroupsPendingPostsApp",
component: function() {
return t("GroupsPendingPostsApp")
}
}, {
appKey: "GroupsReportedPostsApp",
component: function() {
return t("GroupsReportedPostsApp")
}
}]), o.exports = i
}), __d("Bundler", [], function(e, t, n, r, o) {
"use strict";
function i() {}
var a = t("invariant"),
s = t("renderApplication");
__DEV__ && t("RKRenderingPerf");
var l = {};
i.registerConfig = function(e) {
for (var t = 0; t < e.length; ++t) e[t].run ? i.registerRunnable(e[t].appKey, e[t].run) : i.registerComponent(e[t].appKey, e[t].component)
}, i.registerComponent = function(e, t) {
return l[e] = {
run: function(e) {
return s(t(), e.initialProps, e.rootTag)
}
}, e
}, i.registerRunnable = function(e, t) {
return l[e] = {
run: t
}, e
}, i.runApplication = function(e, t) {
console.log('Running application "' + e + '" with appParams: ', t), l[e] && l[e].run || a(0, "Application " + e + " has not been registered."), l[e].run(t)
}, o.exports = i
}), __d("invariant", [], function(e, t, n, r, o) {
"use strict";
var i = function(e, t, n, r, o, i, a, s) {
if (__DEV__ && void 0 === t) throw new Error("invariant requires an error message argument");
if (!e) {
var l;
if (void 0 === t) l = new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
else {
var u = [n, r, o, i, a, s],
c = 0;
l = new Error("Invariant Violation: " + t.replace(/%s/g, function() {
return u[c++]
}))
}
throw l.framesToPop = 1, l
}
};
o.exports = i
}), __d("renderApplication", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
n || s(0, "Expect to have a valid rootTag, instead got ", n), a.render(a.createElement(e, Object.assign({}, t)), n)
}
var a = t("React"),
s = t("invariant");
o.exports = i
}), __d("React", [], function(e, t, n, r, o) {
"use strict";
o.exports = t("ReactIOS")
}), __d("ReactIOS", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactComponent"),
a = t("ReactCompositeComponent"),
s = t("ReactContext"),
l = t("ReactCurrentOwner"),
u = t("ReactElement"),
c = t("ReactElementValidator"),
d = t("ReactInstanceHandles"),
p = t("ReactIOSDefaultInjection"),
h = t("ReactIOSMount"),
f = t("ReactLegacyElement"),
m = t("ReactPropTypes"),
g = t("deprecated"),
_ = t("invariant");
p.inject();
var y = u.createElement,
v = u.createFactory;
__DEV__ && (y = c.createElement, v = c.createFactory), y = f.wrapCreateElement(y), v = f.wrapCreateFactory(v);
var S = function(e) {
var t = e.type.defaultProps,
n = e.props;
for (var r in t) void 0 === n[r] && (n[r] = t[r])
},
w = function(e) {
return __DEV__ && _(0, "This optimized path should never be used in DEV mode because it does not provide validation. Check your JSX transform."), e._owner = l.current, e._context = s.current, e.type.defaultProps && S(e), e
},
b = function(e, t) {
h.renderComponent(e, t)
},
R = {
hasReactIOSInitialized: !1,
PropTypes: m,
createClass: a.createClass,
createElement: y,
createFactory: v,
_augmentElement: w,
render: b,
unmountComponentAtNode: h.unmountComponentAtNode,
__internals: {
Component: i,
CurrentOwner: l,
InstanceHandles: d,
Mount: h
},
unmountComponentAtNodeAndRemoveContainer: h.unmountComponentAtNodeAndRemoveContainer,
isValidClass: u.isValidFactory,
isValidElement: u.isValidElement,
renderComponent: g("React", "renderComponent", "render", this, b),
isValidComponent: g("React", "isValidComponent", "isValidElement", this, u.isValidElement)
};
o.exports = R
}), __d("ReactComponent", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactElement"),
a = t("ReactOwner"),
s = t("ReactUpdates"),
l = t("invariant"),
u = t("keyMirror"),
c = u({
MOUNTED: null,
UNMOUNTED: null
}),
d = !1,
p = null,
h = null,
f = {
injection: {
injectEnvironment: function(e) {
d && l(0, "ReactComponent: injectEnvironment() can only be called once."), h = e.mountImageIntoNode, p = e.unmountIDFromEnvironment, f.BackendIDOperations = e.BackendIDOperations, d = !0
}
},
LifeCycle: c,
BackendIDOperations: null,
Mixin: {
isMounted: function() {
return this._lifeCycleState === c.MOUNTED
},
setProps: function(e, t) {
var n = this._pendingElement || this._currentElement;
this.replaceProps(Object.assign({}, n.props, e), t)
},
replaceProps: function(e, t) {
this.isMounted() || l(0, "replaceProps(...): Can only update a mounted component."), 0 !== this._mountDepth && l(0, "replaceProps(...): You called `setProps` or `replaceProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."), this._pendingElement = i.cloneAndReplaceProps(this._pendingElement || this._currentElement, e), s.enqueueUpdate(this, t)
},
_setPropsInternal: function(e, t) {
var n = this._pendingElement || this._currentElement;
this._pendingElement = i.cloneAndReplaceProps(n, Object.assign({}, n.props, e)), s.enqueueUpdate(this, t)
},
construct: function(e) {
this.props = e.props, this._owner = e._owner, this._lifeCycleState = c.UNMOUNTED, this._pendingCallbacks = null, this._currentElement = e, this._pendingElement = null
},
mountComponent: function(e, t, n) {
this.isMounted() && l(0, "mountComponent(%s, ...): Can only mount an unmounted component. Make sure to avoid storing components between renders or reusing a single component instance in multiple places.", e);
var r = this._currentElement.ref;
if (null != r) {
var o = this._currentElement._owner;
a.addComponentAsRefTo(this, r, o)
}
this._rootNodeID = e, this._lifeCycleState = c.MOUNTED, this._mountDepth = n
},
unmountComponent: function() {
this.isMounted() || l(0, "unmountComponent(): Can only unmount a mounted component.");
var e = this._currentElement.ref;
null != e && a.removeComponentAsRefFrom(this, e, this._owner), p(this._rootNodeID), this._rootNodeID = null, this._lifeCycleState = c.UNMOUNTED
},
receiveComponent: function(e, t) {
this.isMounted() || l(0, "receiveComponent(...): Can only update a mounted component."), this._pendingElement = e, this.performUpdateIfNecessary(t)
},
performUpdateIfNecessary: function(e) {
if (null != this._pendingElement) {
var t = this._currentElement,
n = this._pendingElement;
this._currentElement = n, this.props = n.props, this._owner = n._owner, this._pendingElement = null, this.updateComponent(e, t)
}
},
updateComponent: function(e, t) {
var n = this._currentElement;
(n._owner !== t._owner || n.ref !== t.ref) && (null != t.ref && a.removeComponentAsRefFrom(this, t.ref, t._owner), null != n.ref && a.addComponentAsRefTo(this, n.ref, n._owner))
},
mountComponentIntoNode: function(e, t, n) {
var r = s.ReactReconcileTransaction.getPooled();
r.perform(this._mountComponentIntoNode, this, e, t, r, n), s.ReactReconcileTransaction.release(r)
},
_mountComponentIntoNode: function(e, t, n, r) {
var o = this.mountComponent(e, n, 0);
h(o, t, r)
},
isOwnedBy: function(e) {
return this._owner === e
},
getSiblingByRef: function(e) {
var t = this._owner;
return t && t.refs ? t.refs[e] : null
}
}
};
o.exports = f
}), __d("ReactElement", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
Object.defineProperty(e, t, {
configurable: !1,
enumerable: !0,
get: function() {
return this._store ? this._store[t] : null
},
set: function(e) {
u(!1, "Don't set the " + t + " property of the component. Mutate the existing props object instead."), this._store[t] = e
}
})
}
function a(e) {
try {
var t = {
props: !0
};
for (var n in t) i(e, n);
d = !0
} catch (r) {}
}
var s = t("ReactContext"),
l = t("ReactCurrentOwner"),
u = t("warning"),
c = {
key: !0,
ref: !0
},
d = !1,
p = function(e, t, n, r, o, i) {
return this.type = e, this.key = t, this.ref = n, this._owner = r, this._context = o, __DEV__ && (this._store = {
validated: !1,
props: i
}, d) ? void Object.freeze(this) : void(this.props = i)
};
__DEV__ && a(p.prototype), p.prototype._isReactElement = !0, p.createElement = function(e, t, n) {
var r, o = {},
i = null,
a = null;
if (null != t) {
a = void 0 === t.ref ? null : t.ref, i = void 0 === t.key ? null : "" + t.key;
for (r in t) t.hasOwnProperty(r) && !c.hasOwnProperty(r) && (o[r] = t[r])
}
var u = arguments.length - 2;
if (1 === u) o.children = n;
else if (u > 1) {
for (var d = Array(u), h = 0; u > h; h++) d[h] = arguments[h + 2];
o.children = d
}
if (e.defaultProps) {
var f = e.defaultProps;
for (r in f) "undefined" == typeof o[r] && (o[r] = f[r])
}
return new p(e, i, a, l.current, s.current, o)
}, p.createFactory = function(e) {
var t = p.createElement.bind(null, e);
return t.type = e, t
}, p.cloneAndReplaceProps = function(e, t) {
var n = new p(e.type, e.key, e.ref, e._owner, e._context, t);
return __DEV__ && (n._store.validated = e._store.validated), n
}, p.isValidElement = function(e) {
var t = !(!e || !e._isReactElement);
return t
}, o.exports = p
}), __d("ReactContext", [], function(e, t, n, r, o) {
"use strict";
var i = {
current: {},
withContext: function(e, t) {
var n, r = i.current;
i.current = Object.assign({}, r, e);
try {
n = t()
} finally {
i.current = r
}
return n
}
};
o.exports = i
}), __d("ReactCurrentOwner", [], function(e, t, n, r, o) {
"use strict";
var i = {
current: null
};
o.exports = i
}), __d("warning", [], function(e, t, n, r, o) {
"use strict";
var i = t("emptyFunction"),
a = i;
__DEV__ && (a = function(e, t) {
for (var n = [], r = 2, o = arguments.length; o > r; r++) n.push(arguments[r]);
if (void 0 === t) throw new Error("`warning(condition, format, ...args)` requires a warning message argument");
if (!e) {
var i = 0;
console.warn("Warning: " + t.replace(/%s/g, function() {
return n[i++]
}))
}
}), o.exports = a
}), __d("emptyFunction", [], function(e, t, n, r, o) {
function i(e) {
return function() {
return e
}
}
function a() {}
Object.assign(a, {
thatReturns: i,
thatReturnsFalse: i(!1),
thatReturnsTrue: i(!0),
thatReturnsNull: i(null),
thatReturnsThis: function() {
return this
},
thatReturnsArgument: function(e) {
return e
}
}), o.exports = a
}), __d("ReactOwner", [], function(e, t, n, r, o) {
"use strict";
var i = t("emptyObject"),
a = t("invariant"),
s = {
isValidOwner: function(e) {
return !(!e || "function" != typeof e.attachRef || "function" != typeof e.detachRef)
},
addComponentAsRefTo: function(e, t, n) {
s.isValidOwner(n) || a(0, "addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref."), n.attachRef(t, e)
},
removeComponentAsRefFrom: function(e, t, n) {
s.isValidOwner(n) || a(0, "removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This usually means that you're trying to remove a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref."), n.refs[t] === e && n.detachRef(t)
},
Mixin: {
construct: function() {
this.refs = i
},
attachRef: function(e, t) {
t.isOwnedBy(this) || a(0, "attachRef(%s, ...): Only a component's owner can store a ref to it.", e);
var n = this.refs === i ? this.refs = {} : this.refs;
n[e] = t
},
detachRef: function(e) {
delete this.refs[e]
}
}
};
o.exports = s
}), __d("emptyObject", [], function(e, t, n, r, o) {
"use strict";
var i = {};
__DEV__ && Object.freeze(i), o.exports = i
}), __d("ReactUpdates", [], function(e, t, n, r, o) {
"use strict";
function i() {
F.ReactReconcileTransaction && b || _(0, "ReactUpdates: must inject a reconcile transaction class and batching strategy")
}
function a() {
this.reinitializeTransaction(), this.dirtyComponentsLength = null, this.callbackQueue = p.getPooled(), this.reconcileTransaction = F.ReactReconcileTransaction.getPooled()
}
function s(e, t, n) {
i(), b.batchedUpdates(e, t, n)
}
function l(e, t) {
return e._mountDepth - t._mountDepth
}
function u(e) {
var t = e.dirtyComponentsLength;
t !== v.length && _(0, "Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).", t, v.length), v.sort(l);
for (var n = 0; t > n; n++) {
var r = v[n];
if (r.isMounted()) {
var o = r._pendingCallbacks;
if (r._pendingCallbacks = null, r.performUpdateIfNecessary(e.reconcileTransaction), o)
for (var i = 0; i < o.length; i++) e.callbackQueue.enqueue(o[i], r)
}
}
}
function c(e, t) {
return t && "function" != typeof t && _(0, "enqueueUpdate(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable."), i(), y(null == f.current, "enqueueUpdate(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."), b.isBatchingUpdates ? (v.push(e), void(t && (e._pendingCallbacks ? e._pendingCallbacks.push(t) : e._pendingCallbacks = [t]))) : void b.batchedUpdates(c, e, t)
}
function d(e, t) {
b.isBatchingUpdates || _(0, "ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched."), S.enqueue(e, t), w = !0
}
var p = t("CallbackQueue"),
h = t("PooledClass"),
f = t("ReactCurrentOwner"),
m = t("ReactPerf"),
g = t("Transaction"),
_ = t("invariant"),
y = t("warning"),
v = [],
S = p.getPooled(),
w = !1,
b = null,
R = {
initialize: function() {
this.dirtyComponentsLength = v.length
},
close: function() {
this.dirtyComponentsLength !== v.length ? (v.splice(0, this.dirtyComponentsLength), D()) : v.length = 0
}
},
C = {
initialize: function() {
this.callbackQueue.reset()
},
close: function() {
this.callbackQueue.notifyAll()
}
},
E = [R, C];
Object.assign(a.prototype, g.Mixin, {
getTransactionWrappers: function() {
return E
},
destructor: function() {
this.dirtyComponentsLength = null, p.release(this.callbackQueue), this.callbackQueue = null, F.ReactReconcileTransaction.release(this.reconcileTransaction), this.reconcileTransaction = null
},
perform: function(e, t, n) {
return g.Mixin.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, e, t, n)
}
}), h.addPoolingTo(a);
var D = m.measure("ReactUpdates", "flushBatchedUpdates", function() {
for (; v.length || w;) {
if (v.length) {
var e = a.getPooled();
e.perform(u, null, e), a.release(e)
}
if (w) {
w = !1;
var t = S;
S = p.getPooled(), t.notifyAll(), p.release(t)
}
}
}),
x = {
injectReconcileTransaction: function(e) {
e || _(0, "ReactUpdates: must provide a reconcile transaction class"), F.ReactReconcileTransaction = e
},
injectBatchingStrategy: function(e) {
e || _(0, "ReactUpdates: must provide a batching strategy"), "function" != typeof e.batchedUpdates && _(0, "ReactUpdates: must provide a batchedUpdates() function"), "boolean" != typeof e.isBatchingUpdates && _(0, "ReactUpdates: must provide an isBatchingUpdates boolean attribute"), b = e
}
},
F = {
ReactReconcileTransaction: null,
batchedUpdates: s,
enqueueUpdate: c,
flushBatchedUpdates: D,
injection: x,
asap: d
};
o.exports = F
}), __d("CallbackQueue", [], function(e, t, n, r, o) {
"use strict";
function i() {
this._callbacks = null, this._contexts = null
}
var a = t("PooledClass"),
s = t("invariant");
Object.assign(i.prototype, {
enqueue: function(e, t) {
this._callbacks = this._callbacks || [], this._contexts = this._contexts || [], this._callbacks.push(e), this._contexts.push(t)
},
notifyAll: function() {
var e = this._callbacks,
t = this._contexts;
if (e) {
e.length !== t.length && s(0, "Mismatched list of contexts in callback queue"), this._callbacks = null, this._contexts = null;
for (var n = 0, r = e.length; r > n; n++) e[n].call(t[n]);
e.length = 0, t.length = 0
}
},
reset: function() {
this._callbacks = null, this._contexts = null
},
destructor: function() {
this.reset()
}
}), a.addPoolingTo(i), o.exports = i
}), __d("PooledClass", [], function(e, t, n, r, o) {
"use strict";
var i = t("invariant"),
a = function(e) {
var t = this;
if (t.instancePool.length) {
var n = t.instancePool.pop();
return t.call(n, e), n
}
return new t(e)
},
s = function(e, t) {
var n = this;
if (n.instancePool.length) {
var r = n.instancePool.pop();
return n.call(r, e, t), r
}
return new n(e, t)
},
l = function(e, t, n) {
var r = this;
if (r.instancePool.length) {
var o = r.instancePool.pop();
return r.call(o, e, t, n), o
}
return new r(e, t, n)
},
u = function(e, t, n, r, o) {
var i = this;
if (i.instancePool.length) {
var a = i.instancePool.pop();
return i.call(a, e, t, n, r, o), a
}
return new i(e, t, n, r, o)
},
c = function(e) {
var t = this;
e instanceof t || i(0, "Trying to release an instance into a pool of a different type."), e.destructor && e.destructor(), t.instancePool.length < t.poolSize && t.instancePool.push(e)
},
d = 10,
p = a,
h = function(e, t) {
var n = e;
return n.instancePool = [], n.getPooled = t || p, n.poolSize || (n.poolSize = d), n.release = c, n
},
f = {
addPoolingTo: h,
oneArgumentPooler: a,
twoArgumentPooler: s,
threeArgumentPooler: l,
fiveArgumentPooler: u
};
o.exports = f
}), __d("ReactPerf", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
return n
}
var a = {
enableMeasure: !1,
storedMeasure: i,
measure: function(e, t, n) {
if (__DEV__) {
var r = null,
o = function() {
return a.enableMeasure ? (r || (r = a.storedMeasure(e, t, n)), r.apply(this, arguments)) : n.apply(this, arguments)
};
return o.displayName = e + "_" + t, o
}
return n
},
injection: {
injectMeasure: function(e) {
a.storedMeasure = e
}
}
};
o.exports = a
}), __d("Transaction", [], function(e, t, n, r, o) {
"use strict";
var i = t("invariant"),
a = {
reinitializeTransaction: function() {
this.transactionWrappers = this.getTransactionWrappers(), this.wrapperInitData ? this.wrapperInitData.length = 0 : this.wrapperInitData = [], this._isInTransaction = !1
},
_isInTransaction: !1,
getTransactionWrappers: null,
isInTransaction: function() {
return !!this._isInTransaction
},
perform: function(e, t, n, r, o, a, s, l) {
this.isInTransaction() && i(0, "Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.");
var u, c;
try {
this._isInTransaction = !0, u = !0, this.initializeAll(0), c = e.call(t, n, r, o, a, s, l), u = !1
} finally {
try {
if (u) try {
this.closeAll(0)
} catch (d) {} else this.closeAll(0)
} finally {
this._isInTransaction = !1
}
}
return c
},
initializeAll: function(e) {
for (var t = this.transactionWrappers, n = e; n < t.length; n++) {
var r = t[n];
try {
this.wrapperInitData[n] = s.OBSERVED_ERROR, this.wrapperInitData[n] = r.initialize ? r.initialize.call(this) : null
} finally {
if (this.wrapperInitData[n] === s.OBSERVED_ERROR) try {
this.initializeAll(n + 1)
} catch (o) {}
}
}
},
closeAll: function(e) {
this.isInTransaction() || i(0, "Transaction.closeAll(): Cannot close transaction when none are open.");
for (var t = this.transactionWrappers, n = e; n < t.length; n++) {
var r, o = t[n],
a = this.wrapperInitData[n];
try {
r = !0, a !== s.OBSERVED_ERROR && o.close && o.close.call(this, a), r = !1
} finally {
if (r) try {
this.closeAll(n + 1)
} catch (l) {}
}
}
this.wrapperInitData.length = 0
}
},
s = {
Mixin: a,
OBSERVED_ERROR: {}
};
o.exports = s
}), __d("keyMirror", [], function(e, t, n, r, o) {
"use strict";
var i = t("invariant"),
a = function(e) {
var t, n = {};
e instanceof Object && !Array.isArray(e) || i(0, "keyMirror(...): Argument must be an object.");
for (t in e) e.hasOwnProperty(t) && (n[t] = t);
return n
};
o.exports = a
}), __d("ReactCompositeComponent", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t = e._owner || null;
return t && t.constructor && t.constructor.displayName ? " Check the render method of `" + t.constructor.displayName + "`." : ""
}
function a(e, t, n) {
for (var r in t) t.hasOwnProperty(r) && "function" != typeof t[r] && I(0, "%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.", e.displayName || "ReactCompositeComponent", D[n], r)
}
function s(e, t) {
var n = G.hasOwnProperty(t) ? G[t] : null;
U.hasOwnProperty(t) && n !== O.OVERRIDE_BASE && I(0, "ReactCompositeComponentInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.", t), e.hasOwnProperty(t) && n !== O.DEFINE_MANY && n !== O.DEFINE_MANY_MERGED && I(0, "ReactCompositeComponentInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.", t)
}
function l(e) {
var t = e._compositeLifeCycleState;
e.isMounted() || t === B.MOUNTING || I(0, "replaceState(...): Can only update a mounted or mounting component."), null != g.current && I(0, "replaceState(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."), t === B.UNMOUNTING && I(0, "replaceState(...): Cannot update while unmounting component. This usually means you called setState() on an unmounted component.")
}
function u(e, t) {
if (t) {
w.isValidFactory(t) && I(0, "ReactCompositeComponent: You're attempting to use a component class as a mixin. Instead, just use a regular object."), _.isValidElement(t) && I(0, "ReactCompositeComponent: You're attempting to use a component as a mixin. Instead, just use a regular object.");
var n = e.prototype;
t.hasOwnProperty(Q) && $.mixins(e, t.mixins);
for (var r in t)
if (t.hasOwnProperty(r) && r !== Q) {
var o = t[r];
if (s(n, r), $.hasOwnProperty(r)) $[r](e, o);
else {
var i = G.hasOwnProperty(r),
a = n.hasOwnProperty(r),
l = o && o.__reactDontBind,
u = "function" == typeof o,
c = u && !i && !a && !l;
if (c) n.__reactAutoBindMap || (n.__reactAutoBindMap = {}), n.__reactAutoBindMap[r] = o, n[r] = o;
else if (a) {
var d = G[r];
(!i || d !== O.DEFINE_MANY_MERGED && d !== O.DEFINE_MANY) && I(0, "ReactCompositeComponent: Unexpected spec policy %s for key %s when mixing in component specs.", d, r), d === O.DEFINE_MANY_MERGED ? n[r] = p(n[r], o) : d === O.DEFINE_MANY && (n[r] = h(n[r], o))
} else n[r] = o, __DEV__ && "function" == typeof o && t.displayName && (n[r].displayName = t.displayName + "_" + r)
}
}
}
}
function c(e, t) {
if (t)
for (var n in t) {
var r = t[n];
if (t.hasOwnProperty(n)) {
var o = n in $;
o && I(0, 'ReactCompositeComponent: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', n);
var i = n in e;
i && I(0, "ReactCompositeComponent: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.", n), e[n] = r
}
}
}
function d(e, t) {
return e && t && "object" == typeof e && "object" == typeof t || I(0, "mergeObjectsWithNoDuplicateKeys(): Cannot merge non-objects"), k(t, function(t, n) {
void 0 !== e[n] && I(0, "mergeObjectsWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.", n), e[n] = t
}), e
}
function p(e, t) {
return function() {
var n = e.apply(this, arguments),
r = t.apply(this, arguments);
return null == n ? r : null == r ? n : d(n, r)
}
}
function h(e, t) {
return function() {
e.apply(this, arguments), t.apply(this, arguments)
}
}
var f = t("ReactComponent"),
m = t("ReactContext"),
g = t("ReactCurrentOwner"),
_ = t("ReactElement"),
y = t("ReactElementValidator"),
v = t("ReactEmptyComponent"),
S = t("ReactErrorUtils"),
w = t("ReactLegacyElement"),
b = t("ReactOwner"),
R = t("ReactPerf"),
C = t("ReactPropTransferer"),
E = t("ReactPropTypeLocations"),
D = t("ReactPropTypeLocationNames"),
x = t("ReactUpdates"),
F = t("instantiateReactComponent"),
I = t("invariant"),
T = t("keyMirror"),
P = t("keyOf"),
L = t("monitorCodeUse"),
k = t("mapObject"),
M = t("shouldUpdateReactComponent"),
A = t("warning"),
Q = P({
mixins: null
}),
O = T({
DEFINE_ONCE: null,
DEFINE_MANY: null,
OVERRIDE_BASE: null,
DEFINE_MANY_MERGED: null
}),
N = [],
G = {
mixins: O.DEFINE_MANY,
statics: O.DEFINE_MANY,
propTypes: O.DEFINE_MANY,
contextTypes: O.DEFINE_MANY,
childContextTypes: O.DEFINE_MANY,
getDefaultProps: O.DEFINE_MANY_MERGED,
getInitialState: O.DEFINE_MANY_MERGED,
getChildContext: O.DEFINE_MANY_MERGED,
render: O.DEFINE_ONCE,
componentWillMount: O.DEFINE_MANY,
componentDidMount: O.DEFINE_MANY,
componentWillReceiveProps: O.DEFINE_MANY,
shouldComponentUpdate: O.DEFINE_ONCE,
componentWillUpdate: O.DEFINE_MANY,
componentDidUpdate: O.DEFINE_MANY,
componentWillUnmount: O.DEFINE_MANY,
updateComponent: O.OVERRIDE_BASE
},
$ = {
displayName: function(e, t) {
e.displayName = t
},
mixins: function(e, t) {
if (t)
for (var n = 0; n < t.length; n++) u(e, t[n])
},
childContextTypes: function(e, t) {
a(e, t, E.childContext), e.childContextTypes = Object.assign({}, e.childContextTypes, t)
},
contextTypes: function(e, t) {
a(e, t, E.context), e.contextTypes = Object.assign({}, e.contextTypes, t)
},
getDefaultProps: function(e, t) {
e.getDefaultProps = e.getDefaultProps ? p(e.getDefaultProps, t) : t
},
propTypes: function(e, t) {
a(e, t, E.prop), e.propTypes = Object.assign({}, e.propTypes, t)
},
statics: function(e, t) {
c(e, t)
}
},
B = T({
MOUNTING: null,
UNMOUNTING: null,
RECEIVING_PROPS: null
}),
U = {
construct: function() {
f.Mixin.construct.apply(this, arguments), b.Mixin.construct.apply(this, arguments), this.state = null, this._pendingState = null, this.context = null, this._compositeLifeCycleState = null
},
isMounted: function() {
return f.Mixin.isMounted.call(this) && this._compositeLifeCycleState !== B.MOUNTING
},
mountComponent: R.measure("ReactCompositeComponent", "mountComponent", function(e, t, n) {
f.Mixin.mountComponent.call(this, e, t, n), this._compositeLifeCycleState = B.MOUNTING, this.__reactAutoBindMap && this._bindAutoBindMethods(), this.context = this._processContext(this._currentElement._context), this.props = this._processProps(this.props), this.state = this.getInitialState ? this.getInitialState() : null, ("object" != typeof this.state || Array.isArray(this.state)) && I(0, "%s.getInitialState(): must return an object or null", this.constructor.displayName || "ReactCompositeComponent"), this._pendingState = null, this._pendingForceUpdate = !1, this.componentWillMount && (this.componentWillMount(), this._pendingState && (this.state = this._pendingState, this._pendingState = null)), this._renderedComponent = F(this._renderValidatedComponent(), this._currentElement.type), this._compositeLifeCycleState = null;
var r = this._renderedComponent.mountComponent(e, t, n + 1);
return this.componentDidMount && t.getReactMountReady().enqueue(this.componentDidMount, this), r
}),
unmountComponent: function() {
this._compositeLifeCycleState = B.UNMOUNTING, this.componentWillUnmount && this.componentWillUnmount(), this._compositeLifeCycleState = null, this._renderedComponent.unmountComponent(), this._renderedComponent = null, f.Mixin.unmountComponent.call(this)
},
setState: function(e, t) {
"object" != typeof e && null != e && I(0, "setState(...): takes an object of state variables to update."), __DEV__ && A(null != e, "setState(...): You passed an undefined or null state object; instead, use forceUpdate()."), this.replaceState(Object.assign({}, this._pendingState || this.state, e), t)
},
replaceState: function(e, t) {
l(this), this._pendingState = e, this._compositeLifeCycleState !== B.MOUNTING && x.enqueueUpdate(this, t)
},
_processContext: function(e) {
var t = null,
n = this.constructor.contextTypes;
if (n) {
t = {};
for (var r in n) t[r] = e[r];
__DEV__ && this._checkPropTypes(n, t, E.context)
}
return t
},
_processChildContext: function(e) {
var t = this.getChildContext && this.getChildContext(),
n = this.constructor.displayName || "ReactCompositeComponent";
if (t) {
"object" != typeof this.constructor.childContextTypes && I(0, "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", n), __DEV__ && this._checkPropTypes(this.constructor.childContextTypes, t, E.childContext);
for (var r in t) r in this.constructor.childContextTypes || I(0, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', n, r);
return Object.assign({}, e, t)
}
return e
},
_processProps: function(e) {
if (__DEV__) {
var t = this.constructor.propTypes;
t && this._checkPropTypes(t, e, E.prop)
}
return e
},
_checkPropTypes: function(e, t, n) {
var r = this.constructor.displayName;
for (var o in e)
if (e.hasOwnProperty(o)) {
var a = e[o](t, o, r, n);
if (a instanceof Error) {
var s = i(this);
A(!1, a.message + s)
}
}
},
performUpdateIfNecessary: function(e) {
var t = this._compositeLifeCycleState;
if (t !== B.MOUNTING && t !== B.RECEIVING_PROPS && (null != this._pendingElement || null != this._pendingState || this._pendingForceUpdate)) {
var n = this.context,
r = this.props,
o = this._currentElement;
null != this._pendingElement && (o = this._pendingElement, n = this._processContext(o._context), r = this._processProps(o.props), this._pendingElement = null, this._compositeLifeCycleState = B.RECEIVING_PROPS, this.componentWillReceiveProps && this.componentWillReceiveProps(r, n)), this._compositeLifeCycleState = null;
var i = this._pendingState || this.state;
this._pendingState = null;
var a = this._pendingForceUpdate || !this.shouldComponentUpdate || this.shouldComponentUpdate(r, i, n);
__DEV__ && "undefined" == typeof a && console.warn((this.constructor.displayName || "ReactCompositeComponent") + ".shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false."), a ? (this._pendingForceUpdate = !1, this._performComponentUpdate(o, r, i, n, e)) : (this._currentElement = o, this.props = r, this.state = i, this.context = n, this._owner = o._owner)
}
},
_performComponentUpdate: function(e, t, n, r, o) {
var i = this._currentElement,
a = this.props,
s = this.state,
l = this.context;
this.componentWillUpdate && this.componentWillUpdate(t, n, r), this._currentElement = e, this.props = t, this.state = n, this.context = r, this._owner = e._owner, this.updateComponent(o, i), this.componentDidUpdate && o.getReactMountReady().enqueue(this.componentDidUpdate.bind(this, a, s, l), this)
},
receiveComponent: function(e, t) {
(e !== this._currentElement || null == e._owner) && f.Mixin.receiveComponent.call(this, e, t)
},
updateComponent: R.measure("ReactCompositeComponent", "updateComponent", function(e, t) {
f.Mixin.updateComponent.call(this, e, t);
var n = this._renderedComponent,
r = n._currentElement,
o = this._renderValidatedComponent();
if (M(r, o)) n.receiveComponent(o, e);
else {
var i = this._rootNodeID,
a = n._rootNodeID;
n.unmountComponent(), this._renderedComponent = F(o, this._currentElement.type);
var s = this._renderedComponent.mountComponent(i, e, this._mountDepth + 1);
f.BackendIDOperations.dangerouslyReplaceNodeWithMarkupByID(a, s)
}
}),
forceUpdate: function(e) {
var t = this._compositeLifeCycleState;
this.isMounted() || t === B.MOUNTING || I(0, "forceUpdate(...): Can only force an update on mounted or mounting components."), (t === B.UNMOUNTING || null != g.current) && I(0, "forceUpdate(...): Cannot force an update while unmounting component or within a `render` function."), this._pendingForceUpdate = !0, x.enqueueUpdate(this, e)
},
_renderValidatedComponent: R.measure("ReactCompositeComponent", "_renderValidatedComponent", function() {
var e, t = m.current;
m.current = this._processChildContext(this._currentElement._context), g.current = this;
try {
e = this.render(), null === e || e === !1 ? (e = v.getEmptyComponent(), v.registerNullComponentID(this._rootNodeID)) : v.deregisterNullComponentID(this._rootNodeID)
} finally {
m.current = t, g.current = null
}
return _.isValidElement(e) || I(0, "%s.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.", this.constructor.displayName || "ReactCompositeComponent"), e
}),
_bindAutoBindMethods: function() {
for (var e in this.__reactAutoBindMap)
if (this.__reactAutoBindMap.hasOwnProperty(e)) {
var t = this.__reactAutoBindMap[e];
this[e] = this._bindAutoBindMethod(S.guard(t, this.constructor.displayName + "." + e))
}
},
_bindAutoBindMethod: function(e) {
var t = this,
n = e.bind(t);
if (__DEV__) {
n.__reactBoundContext = t, n.__reactBoundMethod = e, n.__reactBoundArguments = null;
var r = t.constructor.displayName,
o = n.bind;
n.bind = function(i) {
for (var a = [], s = 1, l = arguments.length; l > s; s++) a.push(arguments[s]);
if (i !== t && null !== i) L("react_bind_warning", {
component: r
}), console.warn("bind(): React component methods may only be bound to the component instance. See " + r);
else if (!a.length) return L("react_bind_warning", {
component: r
}), console.warn("bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See " + r), n;
var u = o.apply(n, arguments);
return u.__reactBoundContext = t, u.__reactBoundMethod = e, u.__reactBoundArguments = a, u
}
}
return n
}
},
V = function() {};
Object.assign(V.prototype, f.Mixin, b.Mixin, C.Mixin, U);
var q = {
LifeCycle: B,
Base: V,
createClass: function(e) {
var t = function() {};
t.prototype = new V, t.prototype.constructor = t, N.forEach(u.bind(null, t)), u(t, e), t.getDefaultProps && (t.defaultProps = t.getDefaultProps()), t.prototype.render || I(0, "createClass(...): Class specification must implement a `render` method."), __DEV__ && t.prototype.componentShouldUpdate && (L("react_component_should_update_warning", {
component: e.displayName
}), console.warn((e.displayName || "A component") + " has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value."));
for (var n in G) t.prototype[n] || (t.prototype[n] = null);
return w.wrapFactory(__DEV__ ? y.createFactory(t) : _.createFactory(t))
},
injection: {
injectMixin: function(e) {
N.push(e)
}
}
};
o.exports = q
}), __d("ReactElementValidator", [], function(e, t, n, r, o) {
"use strict";
function i() {
var e = f.current;
return e && e.constructor.displayName || void 0
}
function a(e, t) {
e._store.validated || null != e.key || (e._store.validated = !0, l("react_key_warning", 'Each child in an array should have a unique "key" prop.', e, t))
}
function s(e, t, n) {
v.test(e) && l("react_numeric_key_warning", "Child objects should have non-numeric keys so ordering is preserved.", t, n)
}
function l(e, t, n, r) {
var o = i(),
a = r.displayName,
s = o || a,
l = g[e];
if (!l.hasOwnProperty(s)) {
l[s] = !0, t += o ? " Check the render method of " + o + "." : " Check the renderComponent call using <" + a + ">.";
var u = null;
n._owner && n._owner !== f.current && (u = n._owner.constructor.displayName, t += " It was passed a child from " + u + "."), t += " See http://fb.me/react-warning-keys for more information.", m(e, {
component: s,
componentOwner: u
}), console.warn(t)
}
}
function u() {
var e = i() || "";
_.hasOwnProperty(e) || (_[e] = !0, m("react_object_map_children"))
}
function c(e, t) {
if (Array.isArray(e))
for (var n = 0; n < e.length; n++) {
var r = e[n];
p.isValidElement(r) && a(r, t)
} else if (p.isValidElement(e)) e._store.validated = !0;
else if (e && "object" == typeof e) {
u();
for (var o in e) s(o, e[o], t)
}
}
function d(e, t, n, r) {
for (var o in t)
if (t.hasOwnProperty(o)) {
var i;
try {
i = t[o](n, o, e, r)
} catch (a) {
i = a
}
i instanceof Error && !(i.message in y) && (y[i.message] = !0, m("react_failed_descriptor_type_check", {
message: i.message
}))
}
}
var p = t("ReactElement"),
h = t("ReactPropTypeLocations"),
f = t("ReactCurrentOwner"),
m = t("monitorCodeUse"),
g = {
react_key_warning: {},
react_numeric_key_warning: {}
},
_ = {},
y = {},
v = /^\d+$/,
S = {
createElement: function(e) {
var t = p.createElement.apply(this, arguments);
if (null == t) return t;
for (var n = 2; n < arguments.length; n++) c(arguments[n], e);
var r = e.displayName;
return e.propTypes && d(r, e.propTypes, t.props, h.prop), e.contextTypes && d(r, e.contextTypes, t._context, h.context), t
},
createFactory: function(e) {
var t = S.createElement.bind(null, e);
return t.type = e, t
}
};
o.exports = S
}), __d("ReactPropTypeLocations", [], function(e, t, n, r, o) {
"use strict";
var i = t("keyMirror"),
a = i({
prop: null,
context: null,
childContext: null
});
o.exports = a
}), __d("monitorCodeUse", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
(!e || /[^a-z0-9_]/.test(e)) && a(0, "You must provide an eventName using only the characters [a-z0-9_]")
}
var a = t("invariant");
o.exports = i
}), __d("ReactEmptyComponent", [], function(e, t, n, r, o) {
"use strict";
function i() {
return u || d(0, "Trying to return null from a render, but no null placeholder component was injected."), u()
}
function a(e) {
p[e] = !0
}
function s(e) {
delete p[e]
}
function l(e) {
return p[e]
}
var u, c = t("ReactElement"),
d = t("invariant"),
p = {},
h = {
injectEmptyComponent: function(e) {
u = c.createFactory(e)
}
},
f = {
deregisterNullComponentID: s,
getEmptyComponent: i,
injection: h,
isNullComponentID: l,
registerNullComponentID: a
};
o.exports = f
}), __d("ReactErrorUtils", [], function(e, t, n, r, o) {
"use strict";
var i = {
guard: function(e) {
return e
}
};
o.exports = i
}), __d("ReactLegacyElement", [], function(e, t, n, r, o) {
"use strict";
function i() {
if (g._isLegacyCallWarningEnabled) {
var e = u.current,
t = e && e.constructor ? e.constructor.displayName : "";
t || (t = "Something"), h.hasOwnProperty(t) || (h[t] = !0, p(!1, t + " is calling a React component directly. Use a factory or JSX instead. See: http://fb.me/react-legacyfactory"), d("react_legacy_factory_call", {
version: 3,
name: t
}))
}
}
function a(e) {
var t = e.prototype && "function" == typeof e.prototype.mountComponent && "function" == typeof e.prototype.receiveComponent;
if (t) p(!1, "Did not expect to get a React class here. Use `Component` instead of `Component.type` or `this.constructor`.");
else {
if (!e._reactWarnedForThisType) {
try {
e._reactWarnedForThisType = !0
} catch (n) {}
d("react_non_component_in_jsx", {
version: 3,
name: e.name
})
}
p(!1, "This JSX uses a plain function. Only React components are valid in React's JSX transform.")
}
}
function s(e) {
p(!1, "Do not pass React.DOM." + e.type + ' to JSX or createFactory. Use the string "' + e + '" instead.')
}
function l(e, t) {
if ("function" == typeof t)
for (var n in t)
if (t.hasOwnProperty(n)) {
var r = t[n];
if ("function" == typeof r) {
var o = r.bind(t);
for (var i in r) r.hasOwnProperty(i) && (o[i] = r[i]);
e[n] = o
} else e[n] = r
}
}
var u = t("ReactCurrentOwner"),
c = t("invariant"),
d = t("monitorCodeUse"),
p = t("warning"),
h = {},
f = {},
m = {},
g = {};
g.wrapCreateFactory = function(e) {
var t = function(t) {
return "function" != typeof t ? e(t) : t.isReactNonLegacyFactory ? (__DEV__ && s(t), e(t.type)) : t.isReactLegacyFactory ? e(t.type) : (__DEV__ && a(t), t)
};
return t
}, g.wrapCreateElement = function(e) {
var t = function(t) {
if ("function" != typeof t) return e.apply(this, arguments);
var n;
return t.isReactNonLegacyFactory ? (__DEV__ && s(t), n = Array.prototype.slice.call(arguments, 0), n[0] = t.type, e.apply(this, n)) : t.isReactLegacyFactory ? (t._isMockFunction && (t.type._mockedReactClassConstructor = t), n = Array.prototype.slice.call(arguments, 0), n[0] = t.type, e.apply(this, n)) : (__DEV__ && a(t), t.apply(null, Array.prototype.slice.call(arguments, 1)))
};
return t
}, g.wrapFactory = function(e) {
"function" != typeof e && c(0, "This is suppose to accept a element factory");
var t = function() {
return __DEV__ && i(), e.apply(this, arguments)
};
return l(t, e.type), t.isReactLegacyFactory = f, t.type = e.type, t
}, g.markNonLegacyFactory = function(e) {
return e.isReactNonLegacyFactory = m, e
}, g.isValidFactory = function(e) {
return "function" == typeof e && e.isReactLegacyFactory === f
}, g._isLegacyCallWarningEnabled = !0, o.exports = g
}), __d("ReactPropTransferer", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return function(t, n, r) {
t[n] = t.hasOwnProperty(n) ? e(t[n], r) : r
}
}
function a(e, t) {
for (var n in t)
if (t.hasOwnProperty(n)) {
var r = h[n];
r && h.hasOwnProperty(n) ? r(e, n, t[n]) : e.hasOwnProperty(n) || (e[n] = t[n])
}
return e
}
var s = t("emptyFunction"),
l = t("invariant"),
u = t("joinClasses"),
c = t("warning"),
d = !1,
p = i(function(e, t) {
return Object.assign({}, t, e)
}),
h = {
children: s,
className: i(u),
style: p
},
f = {
TransferStrategies: h,
mergeProps: function(e, t) {
return a(Object.assign({}, e), t)
},
Mixin: {
transferPropsTo: function(e) {
return e._owner !== this && l(0, "%s: You can't call transferPropsTo() on a component that you don't own, %s. This usually means you are calling transferPropsTo() on a component passed in as props or children.", this.constructor.displayName, "string" == typeof e.type ? e.type : e.type.displayName), __DEV__ && (d || (d = !0, c(!1, "transferPropsTo is deprecated. See http://fb.me/react-transferpropsto for more information."))), a(e.props, this.props), e
}
}
};
o.exports = f
}), __d("joinClasses", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
e || (e = "");
var t, n = arguments.length;
if (n > 1)
for (var r = 1; n > r; r++) t = arguments[r], t && (e = (e ? e + " " : "") + t);
return e
}
o.exports = i
}), __d("ReactPropTypeLocationNames", [], function(e, t, n, r, o) {
"use strict";
var i = {};
__DEV__ && (i = {
prop: "prop",
context: "context",
childContext: "child context"
}), o.exports = i
}), __d("instantiateReactComponent", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
var n;
if (__DEV__ && (a(e && ("function" == typeof e.type || "string" == typeof e.type), "Only functions or strings can be mounted as React components."), e.type._mockedReactClassConstructor)) {
l._isLegacyCallWarningEnabled = !1;
try {
n = new e.type._mockedReactClassConstructor(e.props)
} finally {
l._isLegacyCallWarningEnabled = !0
}
s.isValidElement(n) && (n = new n.type(n.props));
var r = n.render;
if (r) return r._isMockFunction && !r._getMockImplementation() && r.mockImplementation(c.getEmptyComponent), n.construct(e), n;
e = c.getEmptyComponent()
}
return n = "string" == typeof e.type ? u.createInstanceForTag(e.type, e.props, t) : new e.type(e.props), __DEV__ && a("function" == typeof n.construct && "function" == typeof n.mountComponent && "function" == typeof n.receiveComponent, "Only React Components can be mounted."), n.construct(e), n
}
var a = t("warning"),
s = t("ReactElement"),
l = t("ReactLegacyElement"),
u = t("ReactNativeComponent"),
c = t("ReactEmptyComponent");
o.exports = i
}), __d("ReactNativeComponent", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
var r = l[e];
return null == r ? (s || a(0, "There is no registered component for the tag %s", e), new s(e, t)) : n === e ? (s || a(0, "There is no registered component for the tag %s", e), new s(e, t)) : new r.type(t)
}
var a = t("invariant"),
s = null,
l = {},
u = {
injectGenericComponentClass: function(e) {
s = e
},
injectComponentClasses: function(e) {
Object.assign(l, e)
}
},
c = {
createInstanceForTag: i,
injection: u
};
o.exports = c
}), __d("keyOf", [], function(e, t, n, r, o) {
var i = function(e) {
var t;
for (t in e)
if (e.hasOwnProperty(t)) return t;
return null
};
o.exports = i
}), __d("mapObject", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
if (!e) return null;
var r = {};
for (var o in e) a.call(e, o) && (r[o] = t.call(n, e[o], o, e));
return r
}
var a = Object.prototype.hasOwnProperty;
o.exports = i
}), __d("shouldUpdateReactComponent", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
return e && t && e.type === t.type && e.key === t.key && e._owner === t._owner ? !0 : !1
}
o.exports = i
}), __d("ReactInstanceHandles", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return m + e.toString(36)
}
function a(e, t) {
return e.charAt(t) === m || t === e.length
}
function s(e) {
return "" === e || e.charAt(0) === m && e.charAt(e.length - 1) !== m
}
function l(e, t) {
return 0 === t.indexOf(e) && a(t, e.length)
}
function u(e) {
return e ? e.substr(0, e.lastIndexOf(m)) : ""
}
function c(e, t) {
if (s(e) && s(t) || f(0, "getNextDescendantID(%s, %s): Received an invalid React DOM ID.", e, t), l(e, t) || f(0, "getNextDescendantID(...): React has made an invalid assumption about the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.", e, t), e === t) return e;
for (var n = e.length + g, r = n; r < t.length && !a(t, r); r++);
return t.substr(0, r)
}
function d(e, t) {
var n = Math.min(e.length, t.length);
if (0 === n) return "";
for (var r = 0, o = 0; n >= o; o++)
if (a(e, o) && a(t, o)) r = o;
else if (e.charAt(o) !== t.charAt(o)) break;
var i = e.substr(0, r);
return s(i) || f(0, "getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s", e, t, i), i
}
function p(e, t, n, r, o, i) {
e = e || "", t = t || "", e === t && f(0, "traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.", e);
var a = l(t, e);
a || l(e, t) || f(0, "traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.", e, t);
for (var s = 0, d = a ? u : c, p = e;; p = d(p, t)) {
var h;
if (o && p === e || i && p === t || (h = n(p, a, r)), h === !1 || p === t) break;
s++ < _ || f(0, "traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s", e, t)
}
}
var h = t("ReactRootIndex"),
f = t("invariant"),
m = ".",
g = m.length,
_ = 100,
y = {
createReactRootID: function() {
return i(h.createReactRootIndex())
},
createReactID: function(e, t) {
return e + t
},
getReactRootIDFromNodeID: function(e) {
if (e && e.charAt(0) === m && e.length > 1) {
var t = e.indexOf(m, 1);
return t > -1 ? e.substr(0, t) : e
}
return null
},
traverseEnterLeave: function(e, t, n, r, o) {
var i = d(e, t);
i !== e && p(e, i, n, r, !1, !0), i !== t && p(i, t, n, o, !0, !1)
},
traverseTwoPhase: function(e, t, n) {
e && (p("", e, t, n, !0, !1), p(e, "", t, n, !1, !0))
},
traverseTwoPhaseSkipTarget: function(e, t, n) {
e && (p("", e, t, n, !0, !0), p(e, "", t, n, !0, !0))
},
traverseAncestors: function(e, t, n) {
p("", e, t, n, !0, !1)
},
_getFirstCommonAncestorID: d,
_getNextDescendantID: c,
isAncestorIDOf: l,
SEPARATOR: m
};
o.exports = y
}), __d("ReactRootIndex", [], function(e, t, n, r, o) {
"use strict";
var i = {
injectCreateReactRootIndex: function(e) {
a.createReactRootIndex = e
}
},
a = {
createReactRootIndex: null,
injection: i
};
o.exports = a
}), __d("ReactIOSDefaultInjection", [], function(e, t, n, r, o) {
"use strict";
function i() {
a.injection.injectEventPluginOrder(l), a.injection.injectInstanceHandle(m), b.injection.injectGlobalResponderHandler(y), a.injection.injectEventPluginsByName({
ResponderEventPlugin: b,
IOSNativeBridgeEventPlugin: u
}), w.injection.injectReconcileTransaction(g.ReactReconcileTransaction), w.injection.injectBatchingStrategy(h), d.injection.injectEnvironment(g), s.injection.injectMount(v), p.injection.injectMixin(_), S.inject(function(e) {
return new f(R.type, null, null, null, null, {
text: e
})
}), c.injection.injectImplementation(C)
}
t("InitializeJavaScriptAppEngine");
var a = t("EventPluginHub"),
s = t("EventPluginUtils"),
l = t("IOSDefaultEventPluginOrder"),
u = t("IOSNativeBridgeEventPlugin"),
c = t("NodeHandle"),
d = t("ReactComponent"),
p = t("ReactCompositeComponent"),
h = t("ReactDefaultBatchingStrategy"),
f = t("ReactElement"),
m = t("ReactInstanceHandles"),
g = t("ReactIOSComponentEnvironment"),
_ = t("ReactIOSComponentMixin"),
y = t("ReactIOSGlobalResponderHandler"),
v = t("ReactIOSMount"),
S = t("ReactTextComponent"),
w = t("ReactUpdates"),
b = t("ResponderEventPlugin"),
R = t("RKRawText"),
C = t("UniversalWorkerNodeHandle");
t("RKEventEmitter"), t("RKLog"), t("RKJSTimers"), o.exports = {
inject: i
}
}), __d("InitializeJavaScriptAppEngine", [], function(e, t) {
function n(e) {
GLOBAL.console.error("Error: \n stack: \n" + e.stack + "\n URL: " + e.sourceURL + "\n line: " + e.line + "\n message: " + e.message), c && (c.reportUnhandledException(e.message, d(e)), __DEV__ && p(function(t) {
try {
var n = d(e, t);
c.updateExceptionMessage(e.message, n)
} catch (r) {
GLOBAL.console.error("#CLOWNTOWN (error while displaying error): " + r.message)
}
}))
}
function r() {
l.setGlobalHandler(n)
}
function o() {
GLOBAL.Text = void 0, GLOBAL.Image = void 0, GLOBAL.document = {
body: {},
createElement: function() {
return {}
}
}
}
function i() {
GLOBAL.setTimeout = s.setTimeout, GLOBAL.setInterval = s.setInterval, GLOBAL.setImmediate = s.setImmediate, GLOBAL.clearTimeout = s.clearTimeout, GLOBAL.clearInterval = s.clearInterval, GLOBAL.clearImmediate = s.clearImmediate, GLOBAL.cancelAnimationFrame = s.clearInterval, GLOBAL.requestAnimationFrame = function(e) {
return s.requestAnimationFrame(e)
}, "undefined" != typeof __fbUseWebSocketMessageQueue && s.setInterval(function() {}, 0)
}
function a() {
GLOBAL.alert || (GLOBAL.alert = function(e) {
var t = {
title: "Alert",
message: "" + e,
buttons: [{
cancel: "Okay"
}]
};
u.alertWithArgs(t, null)
})
}
var s = t("JSTimers");
t("RKDeviceEventEmitter");
var l = t("ErrorUtils"),
u = t("RKAlertManager"),
c = t("NativeModules").RKExceptionsManager,
d = t("errorToString"),
p = t("loadSourceMap");
"undefined" == typeof GLOBAL && (GLOBAL = this), "undefined" == typeof window && (window = GLOBAL), r(), o(), i(), a()
}), __d("JSTimers", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeModules").RKTiming,
a = t("JSTimersExecution"),
s = {
Types: a.Types,
_getFreeIndex: function() {
var e = a.timerIDs.indexOf(null);
return -1 === e && (e = a.timerIDs.length), e
},
setTimeout: function(e, t) {
for (var n = [], r = 2, o = arguments.length; o > r; r++) n.push(arguments[r]);
var l = a.GUID++,
u = s._getFreeIndex();
return a.timerIDs[u] = l, a.callbacks[u] = e, a.callbacks[u] = function() {
return e.apply(void 0, n)
}, a.types[u] = a.Type.setTimeout, i.createTimer(l, t, Date.now(), !1), l
},
setInterval: function(e, t) {
for (var n = [], r = 2, o = arguments.length; o > r; r++) n.push(arguments[r]);
var l = a.GUID++,
u = s._getFreeIndex();
return a.timerIDs[u] = l, a.callbacks[u] = e, a.callbacks[u] = function() {
return e.apply(void 0, n)
}, a.types[u] = a.Type.setInterval, i.createTimer(l, t, Date.now(), !0), l
},
setImmediate: function(e) {
for (var t = [], n = 1, r = arguments.length; r > n; n++) t.push(arguments[n]);
var o = a.GUID++,
i = s._getFreeIndex();
return a.timerIDs[i] = o, a.callbacks[i] = e, a.callbacks[i] = function() {
return e.apply(void 0, t)
}, a.types[i] = a.Type.setImmediate, a.immediates.push(o), o
},
requestAnimationFrame: function(e) {
var t = a.GUID++,
n = s._getFreeIndex();
return a.timerIDs[n] = t, a.callbacks[n] = e, a.types[n] = a.Type.requestAnimationFrame, i.createTimer(t, 0, Date.now(), !1), t
},
clearTimeout: function(e) {
s._clearTimerID(e)
},
clearInterval: function(e) {
s._clearTimerID(e)
},
clearImmediate: function(e) {
s._clearTimerID(e), a.immediates.splice(a.immediates.indexOf(e), 1)
},
cancelAnimationFrame: function(e) {
s._clearTimerID(e)
},
_clearTimerID: function(e) {
var t = a.timerIDs.indexOf(e); - 1 !== t && (a._clearIndex(t), a.types[t] !== a.Type.setImmediate && i.deleteTimer(e))
}
};
o.exports = s
}), __d("NativeModules", [], function(e, t, n, r, o) {
"use strict";
o.exports = t("BatchedBridge").RemoteModules
}), __d("BatchedBridge", [], function(e, t, n, r, o) {
"use strict";
var i, a = t("BatchedBridgeFactory");
i = t("undefined" != typeof __fbUseWebSocketMessageQueue ? "WebSocketMessageQueue" : "MessageQueue");
var s = __fbBatchedBridgeConfig.remoteModuleConfig,
l = __fbBatchedBridgeConfig.localModulesConfig,
u = a.create(i, s, l);
u._config = s, o.exports = u
}), __d("BatchedBridgeFactory", [], function(e, t, n, r, o) {
"use strict";
var i = t("invariant"),
a = t("keyMirror"),
s = t("mapObject"),
l = t("warning"),
u = Array.prototype.slice,
c = a({
remote: null,
local: null
}),
d = {
MethodTypes: c,
_createDeprecatedBridgedModule: function(e, t, n) {
var r = s(t.methods, function(t, r) {
return t.type === c.local ? null : function() {
var t = arguments.length ? arguments[arguments.length - 1] : null,
o = "function" == typeof t,
i = u.call(arguments, 0, arguments.length - (o ? 1 : 0)),
a = o ? t : null;
return e.callDeprecated(n, r, i, a)
}
});
for (var o in t.constants) l(!r[o], "saw constant and method named %s", o), r[o] = t.constants[o];
return r
},
_createBridgedModule: function(e, t, n) {
var r = s(t.methods, function(t, r) {
return t.type === c.local ? null : function() {
var t = arguments.length > 0 ? arguments[arguments.length - 1] : null,
o = arguments.length > 1 ? arguments[arguments.length - 2] : null,
a = "function" == typeof t,
s = "function" == typeof o,
l = a;
a && s || !a && !s || i(0, "You must supply error callbacks and success callbacks or neither");
var c = u.call(arguments, 0, arguments.length - (l ? 2 : 0)),
d = l ? t : null,
p = l ? o : null;
return e.call(n, r, c, p, d)
}
});
for (var o in t.constants) l(!r[o], "saw constant and method named %s", o), r[o] = t.constants[o];
return r
},
create: function(e, t, n) {
var r = new e(t, n);
return {
callFunction: r.callFunction.bind(r),
callFunctionReturnFlushedQueue: r.callFunctionReturnFlushedQueue.bind(r),
invokeCallback: r.invokeCallback.bind(r),
invokeCallbackAndReturnFlushedQueue: r.invokeCallbackAndReturnFlushedQueue.bind(r),
flushedQueue: r.flushedQueue.bind(r),
RemoteModulesDeprecated: s(t, this._createDeprecatedBridgedModule.bind(this, r)),
RemoteModules: s(t, this._createBridgedModule.bind(this, r)),
setLoggingEnabled: r.setLoggingEnabled.bind(r),
getLoggedOutgoingItems: r.getLoggedOutgoingItems.bind(r),
getLoggedIncomingItems: r.getLoggedIncomingItems.bind(r),
replayPreviousLog: r.replayPreviousLog.bind(r)
}
}
};
o.exports = d
}), __d("WebSocketMessageQueue", [], function(e, t, n, r, o) {
"use strict";
function i() {
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]);
i.instances || (i.instances = []), i.instances.push(this), a.apply(this, e), this._ws = l(u ? i.CatalystJSRuntime(this) : i.RemoteJSRuntime(this))
}
var a = t("MessageQueue"),
s = t("JSONRPC"),
l = t("createJSONRPCWebSocket"),
u = "undefined" != typeof navigator && navigator.userAgent.indexOf("Catalyst") > -1;
s.MessageID = u ? 2e4 : 3e4, s.Runtime = u ? "Catalyst" : "Browser", i.prototype = Object.create(a.prototype), i.CatalystJSRuntime = function(e) {
return {
url: "ws://localhost:8188",
onerror: function(e) {
console.error(e.error)
},
methods: {
connected: function() {
this["CatalystJSRuntime init"]()
},
clientAdded: function() {
this["CatalystJSRuntime init"]()
},
"CatalystJSRuntime init": function() {
e._ws.unpause(), e._ws.sendMethodCall("CatalystJSRuntime connected", [{
location: this["CatalystJSRuntime location get"](),
"NATIVELY INJECTED OBJECTS": this["CatalystJSRuntime NATIVELY INJECTED OBJECTS get"]()
}]), e._ws.pause()
},
"RemoteBootstrapJSRuntime ready": function() {
this["CatalystJSRuntime init"]()
}.bind(this),
"RemoteJSRuntime ready": function() {
e._ws.unpause(), e._ws.flush()
},
"CatalystJSRuntime NATIVELY INJECTED OBJECTS get": function() {
var e = document.getElementsByTagName("script")[0].innerText;
return e.substr(e.indexOf("/* BEGIN NATIVELY INJECTED OBJECTS */"), e.indexOf("/* END NATIVELY INJECTED OBJECTS */"))
},
"CatalystJSRuntime location get": function() {
return window.location.href
},
"CatalystJSRuntime MessageQueue$_pushRequestToOutgoingItems": function() {
for (var t = [], n = 0, r = arguments.length; r > n; n++) t.push(arguments[n]);
a.prototype._pushRequestToOutgoingItems.apply(e, t)
}
}
}
}.bind(this), i.RemoteJSRuntime = function(e) {
return {
url: "ws://localhost:8188",
onerror: function(e) {
console.error(e.error)
},
methods: {
connected: function() {
e._ws.sendMethodCall("RemoteJSRuntime ready", [], function() {
e._ws.unpause(), e._ws.flush()
}), e._ws.flush()
},
clientAdded: function() {
window.onbeforeunload = function() {}, location.reload()
},
clientRemoved: function() {},
"CatalystJSRuntime connected": function() {},
"RemoteJSRuntime MessageQueue$_callFunction": function() {
for (var t = [], n = 0, r = arguments.length; r > n; n++) t.push(arguments[n]);
return a.prototype._callFunction.apply(e, t)
},
"RemoteJSRuntime MessageQueue$_invokeCallback": function() {
for (var t = [], n = 0, r = arguments.length; r > n; n++) t.push(arguments[n]);
return a.prototype._invokeCallback.apply(e, t)
},
"RemoteJSRuntime MessageQueue$_flushedQueueUnguarded": function() {
for (var t = [], n = 0, r = arguments.length; r > n; n++) t.push(arguments[n]);
return a.prototype._flushedQueueUnguarded.apply(e, t)
}
}
}
}, u && (i.prototype._callFunction = function() {
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]);
this._ws.sendMethodCall("RemoteJSRuntime MessageQueue$_callFunction", e)
}, i.prototype._invokeCallback = function() {
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]);
this._ws.sendMethodCall("RemoteJSRuntime MessageQueue$_invokeCallback", e)
}, i.prototype._isFlushedQueueEmpty = function() {
return !(this._outgoingItems.length > 0 && this._outgoingItems[0].length > 0 && this._outgoingItems[0][0].length > 0)
}, i.prototype._pushRequestToOutgoingItems = function() {
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]);
return console.warn("Ignored _pushRequestToOutgoingItems!", "Catalyst JS runtime is running in remote debug mode. This function should never get called."), a.prototype._pushRequestToOutgoingItems.apply(this, e)
}), u || (i.prototype._pushRequestToOutgoingItems = function() {
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]);
this._ws.sendMethodCall("CatalystJSRuntime MessageQueue$_pushRequestToOutgoingItems", e)
}), o.exports = i
}), __d("MessageQueue", [], function(e, t, n, r, o) {
"use strict";
var i = t("ErrorUtils"),
a = t("invariant"),
s = t("warning"),
l = t("JSTimersExecution"),
u = "Error in MessageQueue implementation",
c = t,
d = function(e, t, n) {
return e[t].apply(e, n)
},
p = function(e, t, n) {
this._requireFunc = n || c, this._initBookeeping(), this._initNamingMap(e, t)
},
h = 0,
f = 1,
m = 2,
g = 3,
_ = 4,
y = function(e, t, n, r) {
return e && i.applyWithGuard(e, r, t), n ? i.applyWithGuard(n, r, null) : null
},
v = function() {
return {
GUID: 1,
errorCallbackIDForSuccessCallbackID: function(e) {
return e + 1
},
successCallbackIDForErrorCallbackID: function(e) {
return e - 1
},
allocateCallbackIDs: function(e) {
e.successCallbackID = this.GUID++, e.errorCallbackID = this.GUID++
},
isSuccessCallback: function(e) {
return e % 2 === 1
}
}
},
S = {
_initNamingMap: function(e, t) {
function n(e, t, n, r, o) {
for (var i in e) {
var a = e[i],
s = a.moduleID;
t[i] = s, n[s] = i, r[i] = {}, o[i] = {};
var l = a.methods;
for (var u in l) {
var c = l[u].methodID;
r[i][u] = c, o[i][c] = u
}
}
}
this._remoteModuleNameToModuleID = {}, this._remoteModuleIDToModuleName = {}, this._remoteModuleNameToMethodNameToID = {}, this._remoteModuleNameToMethodIDToName = {}, this._localModuleNameToModuleID = {}, this._localModuleIDToModuleName = {}, this._localModuleNameToMethodNameToID = {}, this._localModuleNameToMethodIDToName = {}, n(e, this._remoteModuleNameToModuleID, this._remoteModuleIDToModuleName, this._remoteModuleNameToMethodNameToID, this._remoteModuleNameToMethodIDToName), n(t, this._localModuleNameToModuleID, this._localModuleIDToModuleName, this._localModuleNameToMethodNameToID, this._localModuleNameToMethodIDToName)
},
_initBookeeping: function() {
this._POOLED_CBIDS = {
errorCallbackID: null,
successCallbackID: null
}, this._bookkeeping = v(), this._threadLocalCallbacksByID = [], this._threadLocalScopesByID = [], this._outgoingItems = [
[],
[],
[],
[],
[]
], this._outgoingItemsSwap = [
[],
[],
[],
[],
[]
]
},
invokeCallback: function(e, t) {
return y(this._invokeCallback, [e, t], null, this)
},
_invokeCallback: function(e, t) {
try {
var n = this._threadLocalCallbacksByID[e],
r = this._threadLocalScopesByID[e];
s(n, "Cannot find callback with CBID %s. Native module may have invoked both the success callback and the error callback.", e), n.apply(r, t)
} catch (o) {
throw o
} finally {
this._freeResourcesForCallbackID(e)
}
},
invokeCallbackAndReturnFlushedQueue: function(e, t) {
return this._enableLogging && this._loggedIncomingItems.push([(new Date).getTime(), e, t]), y(this._invokeCallback, [e, t], this._flushedQueueUnguarded, this)
},
callFunction: function(e, t, n) {
return y(this._callFunction, [e, t, n], null, this)
},
_callFunction: function(e, t, n) {
var r = this._localModuleIDToModuleName[e],
o = this._localModuleNameToMethodIDToName[r][t],
i = d(this._requireFunc(r), o, n);
return i
},
callFunctionReturnFlushedQueue: function(e, t, n) {
return this._enableLogging && this._loggedIncomingItems.push([(new Date).getTime(), e, t, n]), y(this._callFunction, [e, t, n], this._flushedQueueUnguarded, this)
},
setLoggingEnabled: function(e) {
this._enableLogging = e, this._loggedIncomingItems = [], this._loggedOutgoingItems = [
[],
[],
[],
[],
[]
]
},
getLoggedIncomingItems: function() {
return this._loggedIncomingItems
},
getLoggedOutgoingItems: function() {
return this._loggedOutgoingItems
},
replayPreviousLog: function(e) {
this._outgoingItems = e
},
_swapAndReinitializeBuffer: function() {
var e = this._outgoingItems,
t = this._outgoingItemsSwap;
t[h].length = 0, t[f].length = 0, t[m].length = 0, t[g].length = 0, t[_].length = 0, this._outgoingItemsSwap = e, this._outgoingItems = t
},
_pushRequestToOutgoingItems: function(e, t, n) {
this._outgoingItems[h].push(e), this._outgoingItems[f].push(t), this._outgoingItems[m].push(n), this._enableLogging && (this._loggedOutgoingItems[h].push(e), this._loggedOutgoingItems[f].push(t), this._loggedOutgoingItems[m].push(n))
},
_pushResponseToOutgoingItems: function(e, t) {
this._outgoingItems[g].push(e), this._outgoingItems[_].push(t)
},
_freeResourcesForCallbackID: function(e) {
var t = this._bookkeeping.isSuccessCallback(e) ? this._bookkeeping.errorCallbackIDForSuccessCallbackID(e) : this._bookkeeping.successCallbackIDForErrorCallbackID(e);
this._threadLocalCallbacksByID[e] = null, this._threadLocalScopesByID[e] = null, this._threadLocalCallbacksByID[t] && (this._threadLocalCallbacksByID[t] = null, this._threadLocalScopesByID[t] = null)
},
_storeCallbacksInCurrentThread: function(e, t, n) {
e || t || a(0, u), this._bookkeeping.allocateCallbackIDs(this._POOLED_CBIDS);
var r = this._POOLED_CBIDS.successCallbackID,
o = this._POOLED_CBIDS.errorCallbackID;
this._threadLocalCallbacksByID[o] = e, this._threadLocalCallbacksByID[r] = t, this._threadLocalScopesByID[o] = n, this._threadLocalScopesByID[r] = n
},
flushedQueue: function() {
return y(null, null, this._flushedQueueUnguarded, this)
},
_flushedQueueUnguarded: function() {
l.callImmediates();
var e = this._outgoingItems;
this._swapAndReinitializeBuffer();
var t = e[h].length || e[_].length ? e : null;
return t
},
callDeprecated: function(e, t, n, r, o) {
r && "function" != typeof r && a(0, "Last argument (callback) must be function"), r && (this._storeCallbacksInCurrentThread(null, r, o, this._POOLED_CBIDS), n.push(this._POOLED_CBIDS.successCallbackID));
var i = this._remoteModuleNameToModuleID[e];
if (void 0 === i || null === i) throw new Error("Unrecognized module name:" + e);
var s = this._remoteModuleNameToMethodNameToID[e][t];
if (void 0 === s || null === i) throw new Error("Unrecognized method name:" + t);
this._pushRequestToOutgoingItems(i, s, n)
},
call: function(e, t, n, r, o, i) {
(r && "function" != typeof r || o && "function" != typeof o) && a(0, "Callbacks must be functions"), (r || o) && (this._storeCallbacksInCurrentThread(r, o, i, this._POOLED_CBIDS), n.push(this._POOLED_CBIDS.errorCallbackID), n.push(this._POOLED_CBIDS.successCallbackID));
var s = this._remoteModuleNameToModuleID[e];
if (void 0 === s || null === s) throw new Error("Unrecognized module name:" + e);
var l = this._remoteModuleNameToMethodNameToID[e][t];
if (void 0 === l || null === s) throw new Error("Unrecognized method name:" + t);
this._pushRequestToOutgoingItems(s, l, n)
},
__numPendingCallbacksOnlyUseMeInTestCases: function() {
for (var e = this._threadLocalCallbacksByID, t = 0, n = 0; n < e.length; n++) e[n] && t++;
return t
}
};
Object.assign(p.prototype, S), o.exports = p
}), __d("ErrorUtils", [], function(e, t, n, r, o) {
var i = this;
o.exports = i.ErrorUtils
}), __d("JSTimersExecution", [], function(e, t, n, r, o) {
"use strict";
var i = t("invariant"),
a = t("keyMirror"),
s = t("performanceNow"),
l = t("warning"),
u = {
GUID: 1,
Type: a({
setTimeout: null,
setInterval: null,
requestAnimationFrame: null,
setImmediate: null
}),
callbacks: [],
types: [],
timerIDs: [],
immediates: [],
callTimer: function(e) {
l(e <= u.GUID, "Tried to call timer with ID " + e + " but no such timer exists");
var t = u.timerIDs.indexOf(e);
if (-1 !== t) {
var n = u.types[t],
r = u.callbacks[t];
(n === u.Type.setTimeout || n === u.Type.setImmediate || n === u.Type.requestAnimationFrame) && u._clearIndex(t);
try {
if (n === u.Type.setTimeout || n === u.Type.setInterval || n === u.Type.setImmediate) r();
else {
if (n !== u.Type.requestAnimationFrame) return void console.error("Tried to call a callback with invalid type: " + n);
var o = s();
r(o)
}
} catch (i) {
u.errors = u.errors || [], u.errors.push(i)
}
}
},
callTimers: function(e) {
0 === e.length && i(0, 'Probably shouldn\'t call "callTimers" with no timerIDs'), u.errors = null, e.forEach(u.callTimer);
var n = u.errors;
if (n) {
var r = n.length;
if (r > 1)
for (var o = 1; r > o; o++) t("JSTimers").setTimeout(function(e) {
throw e
}.bind(null, n[o]), 0);
throw n[0]
}
},
callImmediates: function() {
for (u.errors = null; 0 !== u.immediates.length;) u.callTimer(u.immediates.shift());
u.errors && u.errors.forEach(function(e) {
return t("JSTimers").setTimeout(function() {
throw e
}, 0)
})
},
_clearIndex: function(e) {
u.timerIDs[e] = null, u.callbacks[e] = null, u.types[e] = null
}
};
o.exports = u
}), __d("performanceNow", [], function(e, t, n, r, o) {
var i = t("performance");
i && i.now || (i = Date);
var a = i.now.bind(i);
o.exports = a
}), __d("performance", [], function(e, t, n, r, o) {
"use strict";
var i, a = t("ExecutionEnvironment");
a.canUseDOM && (i = window.performance || window.msPerformance || window.webkitPerformance), o.exports = i || {}
}), __d("ExecutionEnvironment", [], function(e, t, n, r, o) {
"use strict";
var i = !("undefined" == typeof window || !window.document || !window.document.createElement),
a = {
canUseDOM: i,
canUseWorkers: "undefined" != typeof Worker,
canUseEventListeners: i && !(!window.addEventListener && !window.attachEvent),
canUseViewport: i && !!window.screen,
isInWorker: !i
};
o.exports = a
}), __d("JSONRPC", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
return e.onmessage = function(e) {
this.ondata(e.data)
}, e.ondata = function(e) {
try {
var t = JSON.parse(e)
} catch (n) {
this.onerror({
type: "error",
error: n
})
}
t && this.onjson(t)
}, e.onjson = function(e) {
return "2.0" === e.jsonrpc ? this.onjsonrpc(e) : void 0
}, e.onjsonrpc = function(n) {
if (null == n.method) return void("result" in n || "error" in n ? this._handleCallback(n.id, n.error, n.result) : console.warn("unhandled message", n));
if ("function" != typeof t[n.method]) return void this.sendErrorMissingMethod(n.id, n.method);
try {
var r = t[n.method].apply(t, n.params);
null == r && (r = null), e.sendResult(n.id, r)
} catch (o) {
e.sendError(n.id, o)
}
}, e.sendResult = function(e, t) {
this.send(JSON.stringify({
jsonrpc: "2.0",
runtime: i.Runtime,
id: e,
ts: Date.now(),
result: t
}))
}, e.sendErrorMissingMethod = function(e, t) {
console.warn("Ignored missing method", t), this.sendErrorRaw(e, {
code: -32601,
message: "Method not found",
data: t
})
}, e.sendError = function(e, t) {
this.sendErrorRaw(e, {
code: -32e3,
message: t.message,
data: t
})
}, e.sendErrorRaw = function(e, t) {
this.send(JSON.stringify({
jsonrpc: "2.0",
runtime: i.Runtime,
id: e,
ts: Date.now(),
error: t
}))
}, e._outMessages = {}, e._handleCallback = function(t, n, r) {
var o = e._outMessages[t];
o && o.callback && o.callback(n, r), delete e._outMessages[t]
}, e.sendMethodCall = function(t, n, r) {
var o = i.MessageID++,
a = {
jsonrpc: "2.0",
runtime: i.Runtime,
id: o,
ts: Date.now(),
method: t,
params: n,
callback: r
};
e._outMessages[a.id] = a, this.send(JSON.stringify(a))
}, e
}
o.exports = i
}), __d("createJSONRPCWebSocket", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t = new WebSocket(e.url);
return t.methods = e.methods, a(t, t.methods), t.flush = function() {
if (this.readyState !== WebSocket.OPEN) throw Error("not open");
t._messageQueue.forEach(function(e) {
return this._sendForReal(e)
}.bind(this)), t._messageQueue.length = 0
}, t._isPaused = !0, t.unpause = function() {
if (this.readyState !== WebSocket.OPEN) throw Error("not open");
t._isPaused = !1
}, t.pause = function() {
t._isPaused = !0
}, t._sendForReal = t.send, t.send = function(e) {
return this.readyState !== WebSocket.OPEN || t._isPaused ? void t._messageQueue.push(e) : void t._sendForReal(e)
}, t._messageQueue = [], t.onerror = e.onerror, t.onopen = e.onopen, t
}
var a = t("JSONRPC");
o.exports = i
}), __d("RKDeviceEventEmitter", [], function(e, t, n, r, o) {
"use strict";
var i = t("EventEmitter"),
a = new i;
o.exports = a
}), __d("EventEmitter", [], function(e, t, n, r, o) {
function i() {
"use strict";
this.$EventEmitter_subscriber = new l
}
var a = t("EmitterSubscription"),
s = t("ErrorUtils"),
l = t("EventSubscriptionVendor"),
u = t("emptyFunction"),
c = t("invariant");
i.prototype.addListener = function(e, t, n) {
"use strict";
return this.$EventEmitter_subscriber.addSubscription(e, new a(this.$EventEmitter_subscriber, t, n))
}, i.prototype.once = function(e, t, n) {
"use strict";
var r = this;
return this.addListener(e, function() {
r.removeCurrentListener(), t.apply(n, arguments)
})
}, i.prototype.removeAllListeners = function(e) {
"use strict";
this.$EventEmitter_subscriber.removeAllSubscriptions(e)
}, i.prototype.removeCurrentListener = function() {
"use strict";
this.$EventEmitter_currentSubscription || c(0, "Not in an emitting cycle; there is no current subscription"), this.$EventEmitter_subscriber.removeSubscription(this.$EventEmitter_currentSubscription)
}, i.prototype.listeners = function(e) {
"use strict";
var t = this.$EventEmitter_subscriber.getSubscriptionsForType(e);
return t ? t.filter(u.thatReturnsTrue).map(function(e) {
return e.listener
}) : []
}, i.prototype.emit = function(e) {
"use strict";
var t = this.$EventEmitter_subscriber.getSubscriptionsForType(e);
if (t) {
for (var n = Object.keys(t), r = 0; r < n.length; r++) {
var o = n[r],
i = t[o];
i && (this.$EventEmitter_currentSubscription = i, s.applyWithGuard(i.listener, i.context, Array.prototype.slice.call(arguments, 1), null, "EventEmitter:" + e))
}
this.$EventEmitter_currentSubscription = null
}
}, o.exports = i
}), __d("EmitterSubscription", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
a.call(this, e), this.listener = t, this.context = n
}
var a = t("EventSubscription");
for (var s in a) a.hasOwnProperty(s) && (i[s] = a[s]);
var l = null === a ? null : a.prototype;
i.prototype = Object.create(l), i.prototype.constructor = i, i.__superConstructor__ = a, o.exports = i
}), __d("EventSubscription", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
this.subscriber = e
}
i.prototype.remove = function() {
this.subscriber.removeSubscription(this)
}, o.exports = i
}), __d("EventSubscriptionVendor", [], function(e, t, n, r, o) {
"use strict";
function i() {
this.$EventSubscriptionVendor_subscriptionsForType = {}, this.$EventSubscriptionVendor_currentSubscription = null
}
var a = t("invariant");
i.prototype.addSubscription = function(e, t) {
t.subscriber !== this && a(0, "The subscriber of the subscription is incorrectly set."), this.$EventSubscriptionVendor_subscriptionsForType[e] || (this.$EventSubscriptionVendor_subscriptionsForType[e] = []);
var n = this.$EventSubscriptionVendor_subscriptionsForType[e].length;
return this.$EventSubscriptionVendor_subscriptionsForType[e].push(t), t.eventType = e, t.key = n, t
}, i.prototype.removeAllSubscriptions = function(e) {
void 0 === e ? this.$EventSubscriptionVendor_subscriptionsForType = {} : delete this.$EventSubscriptionVendor_subscriptionsForType[e]
}, i.prototype.removeSubscription = function(e) {
var t = e.eventType,
n = e.key,
r = this.$EventSubscriptionVendor_subscriptionsForType[t];
r && delete r[n]
}, i.prototype.getSubscriptionsForType = function(e) {
return this.$EventSubscriptionVendor_subscriptionsForType[e]
}, o.exports = i
}), __d("RKAlertManager", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeModulesDeprecated").RKAlertManager;
o.exports = i
}), __d("NativeModulesDeprecated", [], function(e, t, n, r, o) {
"use strict";
o.exports = t("BatchedBridge").RemoteModulesDeprecated
}), __d("errorToString", [], function(e, t, n, r, o) {
"use strict";
var i = function(e, t) {
for (var n = "", r = e.stack.split("\n"), o = 0, i = [], a = 0, s = r.length; s > a; a++) {
var l = r[a].split("@"),
u = l.length > 1,
c = u ? l[0] + " " : "<no name>";
c.length > o && (o = c.length);
var d = "",
p = -1,
h = l[1] ? l[1] : l[0];
if ("[native code]" === h) d = "native code";
else {
var f = h.split(":");
if (d = f[f.length - 3], p = parseInt(f[f.length - 2], 10), d) {
var m = d.match(/([a-zA-Z_]+).includeRequire.runModule.bundle$/);
m && (d = m[1])
}
if (t) try {
var g = t.originalPositionFor({
line: p,
column: null
});
if (g) {
var _ = g.source.split("/");
d = _[_.length - 1], p = g.line
}
} catch (y) {}
}
i.push([c, d, p ? p : "?"])
}
for (var v = 0, S = i.length; S > v; v++) {
var w = i[v],
c = w[0];
n += c;
for (var b = 0, R = o - c.length; R > b; b++) n += " ";
n += " " + w[1] + ":" + w[2] + "\n"
}
return n
};
o.exports = i
}), __d("loadSourceMap", [], function(e, t, n, r, o) {
function i(t) {
if (void 0 !== s) return void t(s);
if (t && d.push(t), !p) {
var n = "http://localhost:8081" + e.SOURCE_MAPPING_URL;
p = new u, p.onreadystatechange = a, p.open("GET", n), p.send()
}
}
function a() {
if (4 === p.readyState) {
try {
200 !== p.status && c(0, "Non-OK http status code: " + p.status), s = new l(p.responseText)
} catch (e) {
console.warn("Failed to load source maps", e.message, e), s = null
}
d.forEach(function(e) {
return e(s)
})
}
}
var s, l = t("SourceMap").SourceMapConsumer,
u = t("xmlhttprequest").XMLHttpRequest,
c = t("invariant"),
d = [],
p = null;
o.exports = i
}), __d("SourceMap", [], function(e, t, n, r, o) {
function i() {
function e(t, n, r) {
if ("string" != typeof t) throw new TypeError("Expected string, got: " + t);
if (2 == arguments.length && (r = n), t in e.modules) throw new Error("Module already defined: " + t);
e.modules[t] = r
}
function t() {
this.modules = {}, this._currentModule = null
}
e.modules = {},
function() {
function n(e) {
for (var t = e.split("/"), n = 1; n < t.length;) ".." === t[n] ? t.splice(n - 1, 1) : "." === t[n] ? t.splice(n, 1) : n++;
return t.join("/")
}
function r(e, t) {
return e = e.trim(), t = t.trim(), /^\//.test(t) ? t : e.replace(/\/*$/, "/") + t
}
function o(e) {
var t = e.split("/");
return t.pop(), t.join("/")
}
t.prototype.require = function(e, t) {
if (Array.isArray(e)) {
var n = e.map(function(e) {
return this.lookup(e)
}, this);
return void(t && t.apply(null, n))
}
return this.lookup(e)
}, t.prototype.lookup = function(t) {
if (/^\./.test(t) && (t = n(r(o(this._currentModule), t))), t in this.modules) {
var i = this.modules[t];
return i
}
if (!(t in e.modules)) throw new Error("Module not defined: " + t);
var i = e.modules[t];
if ("function" == typeof i) {
var a = {},
s = this._currentModule;
this._currentModule = t, i(this.require.bind(this), a, {
id: t,
uri: ""
}), this._currentModule = s, i = a
}
return this.modules[t] = i, i
}
}(), e.Domain = t, e.globalDomain = new t;
var n = e.globalDomain.require.bind(e.globalDomain);
e("source-map/source-map-generator", ["require", "exports", "module", "source-map/base64-vlq", "source-map/util", "source-map/array-set"], function(e, t) {
function n(e) {
this._file = o.getArg(e, "file"), this._sourceRoot = o.getArg(e, "sourceRoot", null), this._sources = new i, this._names = new i, this._mappings = [], this._sourcesContents = null
}
var r = e("./base64-vlq"),
o = e("./util"),
i = e("./array-set").ArraySet;
n.prototype._version = 3, n.fromSourceMap = function(e) {
var t = e.sourceRoot,
r = new n({
file: e.file,
sourceRoot: t
});
return e.eachMapping(function(e) {
var n = {
generated: {
line: e.generatedLine,
column: e.generatedColumn
}
};
e.source && (n.source = e.source, t && (n.source = o.relative(t, n.source)), n.original = {
line: e.originalLine,
column: e.originalColumn
}, e.name && (n.name = e.name)), r.addMapping(n)
}), e.sources.forEach(function(t) {
var n = e.sourceContentFor(t);
n && r.setSourceContent(t, n)
}), r
}, n.prototype.addMapping = function(e) {
var t = o.getArg(e, "generated"),
n = o.getArg(e, "original", null),
r = o.getArg(e, "source", null),
i = o.getArg(e, "name", null);
this._validateMapping(t, n, r, i), r && !this._sources.has(r) && this._sources.add(r), i && !this._names.has(i) && this._names.add(i), this._mappings.push({
generatedLine: t.line,
generatedColumn: t.column,
originalLine: null != n && n.line,
originalColumn: null != n && n.column,
source: r,
name: i
})
}, n.prototype.setSourceContent = function(e, t) {
var n = e;
this._sourceRoot && (n = o.relative(this._sourceRoot, n)), null !== t ? (this._sourcesContents || (this._sourcesContents = {}), this._sourcesContents[o.toSetString(n)] = t) : (delete this._sourcesContents[o.toSetString(n)], 0 === Object.keys(this._sourcesContents).length && (this._sourcesContents = null))
}, n.prototype.applySourceMap = function(e, t) {
t || (t = e.file);
var n = this._sourceRoot;
n && (t = o.relative(n, t));
var r = new i,
a = new i;
this._mappings.forEach(function(i) {
if (i.source === t && i.originalLine) {
var s = e.originalPositionFor({
line: i.originalLine,
column: i.originalColumn
});
null !== s.source && (i.source = n ? o.relative(n, s.source) : s.source, i.originalLine = s.line, i.originalColumn = s.column, null !== s.name && null !== i.name && (i.name = s.name))
}
var l = i.source;
l && !r.has(l) && r.add(l);
var u = i.name;
u && !a.has(u) && a.add(u)
}, this), this._sources = r, this._names = a, e.sources.forEach(function(t) {
var r = e.sourceContentFor(t);
r && (n && (t = o.relative(n, t)), this.setSourceContent(t, r))
}, this)
}, n.prototype._validateMapping = function(e, t, n, r) {
if (!(e && "line" in e && "column" in e && e.line > 0 && e.column >= 0 && !t && !n && !r || e && "line" in e && "column" in e && t && "line" in t && "column" in t && e.line > 0 && e.column >= 0 && t.line > 0 && t.column >= 0 && n)) throw new Error("Invalid mapping: " + JSON.stringify({
generated: e,
source: n,
orginal: t,
name: r
}))
}, n.prototype._serializeMappings = function() {
var e, t = 0,
n = 1,
i = 0,
a = 0,
s = 0,
l = 0,
u = "";
this._mappings.sort(o.compareByGeneratedPositions);
for (var c = 0, d = this._mappings.length; d > c; c++) {
if (e = this._mappings[c], e.generatedLine !== n)
for (t = 0; e.generatedLine !== n;) u += ";", n++;
else if (c > 0) {
if (!o.compareByGeneratedPositions(e, this._mappings[c - 1])) continue;
u += ","
}
u += r.encode(e.generatedColumn - t), t = e.generatedColumn, e.source && (u += r.encode(this._sources.indexOf(e.source) - l), l = this._sources.indexOf(e.source), u += r.encode(e.originalLine - 1 - a), a = e.originalLine - 1, u += r.encode(e.originalColumn - i), i = e.originalColumn, e.name && (u += r.encode(this._names.indexOf(e.name) - s), s = this._names.indexOf(e.name)))
}
return u
}, n.prototype._generateSourcesContent = function(e, t) {
return e.map(function(e) {
if (!this._sourcesContents) return null;
t && (e = o.relative(t, e));
var n = o.toSetString(e);
return Object.prototype.hasOwnProperty.call(this._sourcesContents, n) ? this._sourcesContents[n] : null
}, this)
}, n.prototype.toJSON = function() {
var e = {
version: this._version,
file: this._file,
sources: this._sources.toArray(),
names: this._names.toArray(),
mappings: this._serializeMappings()
};
return this._sourceRoot && (e.sourceRoot = this._sourceRoot), this._sourcesContents && (e.sourcesContent = this._generateSourcesContent(e.sources, e.sourceRoot)), e
}, n.prototype.toString = function() {
return JSON.stringify(this)
}, t.SourceMapGenerator = n
}), e("source-map/base64-vlq", ["require", "exports", "module", "source-map/base64"], function(e, t) {
function n(e) {
return 0 > e ? (-e << 1) + 1 : (e << 1) + 0
}
function r(e) {
var t = 1 === (1 & e),
n = e >> 1;
return t ? -n : n
}
var o = e("./base64"),
i = 5,
a = 1 << i,
s = a - 1,
l = a;
t.encode = function(e) {
var t, r = "",
a = n(e);
do t = a & s, a >>>= i, a > 0 && (t |= l), r += o.encode(t); while (a > 0);
return r
}, t.decode = function(e) {
var t, n, a = 0,
u = e.length,
c = 0,
d = 0;
do {
if (a >= u) throw new Error("Expected more digits in base 64 VLQ value.");
n = o.decode(e.charAt(a++)), t = !!(n & l), n &= s, c += n << d, d += i
} while (t);
return {
value: r(c),
rest: e.slice(a)
}
}
}), e("source-map/base64", ["require", "exports", "module"], function(e, t) {
var n = {},
r = {};
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("").forEach(function(e, t) {
n[e] = t, r[t] = e
}), t.encode = function(e) {
if (e in r) return r[e];
throw new TypeError("Must be between 0 and 63: " + e)
}, t.decode = function(e) {
if (e in n) return n[e];
throw new TypeError("Not a valid base 64 digit: " + e)
}
}), e("source-map/util", ["require", "exports", "module"], function(e, t) {
function n(e, t, n) {
if (t in e) return e[t];
if (3 === arguments.length) return n;
throw new Error('"' + t + '" is a required argument.')
}
function r(e) {
var t = e.match(p);
return t ? {
scheme: t[1],
auth: t[3],
host: t[4],
port: t[6],
path: t[7]
} : null
}
function o(e) {
var t = e.scheme + "://";
return e.auth && (t += e.auth + "@"), e.host && (t += e.host), e.port && (t += ":" + e.port), e.path && (t += e.path), t
}
function i(e, t) {
var n;
return t.match(p) || t.match(h) ? t : "/" === t.charAt(0) && (n = r(e)) ? (n.path = t, o(n)) : e.replace(/\/$/, "") + "/" + t
}
function a(e) {
return "$" + e
}
function s(e) {
return e.substr(1)
}
function l(e, t) {
e = e.replace(/\/$/, "");
var n = r(e);
return "/" == t.charAt(0) && n && "/" == n.path ? t.slice(1) : 0 === t.indexOf(e + "/") ? t.substr(e.length + 1) : t
}
function u(e, t) {
var n = e || "",
r = t || "";
return (n > r) - (r > n)
}
function c(e, t, n) {
var r;
return (r = u(e.source, t.source)) ? r : (r = e.originalLine - t.originalLine) ? r : (r = e.originalColumn - t.originalColumn, r || n ? r : (r = u(e.name, t.name)) ? r : (r = e.generatedLine - t.generatedLine, r ? r : e.generatedColumn - t.generatedColumn))
}
function d(e, t, n) {
var r;
return (r = e.generatedLine - t.generatedLine) ? r : (r = e.generatedColumn - t.generatedColumn, r || n ? r : (r = u(e.source, t.source)) ? r : (r = e.originalLine - t.originalLine) ? r : (r = e.originalColumn - t.originalColumn, r ? r : u(e.name, t.name)))
}
t.getArg = n;
var p = /([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/,
h = /^data:.+\,.+/;
t.urlParse = r, t.urlGenerate = o, t.join = i, t.toSetString = a, t.fromSetString = s, t.relative = l, t.compareByOriginalPositions = c, t.compareByGeneratedPositions = d
}), e("source-map/array-set", ["require", "exports", "module", "source-map/util"], function(e, t) {
function n() {
this._array = [], this._set = {}
}
var r = e("./util");
n.fromArray = function(e, t) {
for (var r = new n, o = 0, i = e.length; i > o; o++) r.add(e[o], t);
return r
}, n.prototype.add = function(e, t) {
var n = this.has(e),
o = this._array.length;
(!n || t) && this._array.push(e), n || (this._set[r.toSetString(e)] = o)
}, n.prototype.has = function(e) {
return Object.prototype.hasOwnProperty.call(this._set, r.toSetString(e))
}, n.prototype.indexOf = function(e) {
if (this.has(e)) return this._set[r.toSetString(e)];
throw new Error('"' + e + '" is not in the set.')
}, n.prototype.at = function(e) {
if (e >= 0 && e < this._array.length) return this._array[e];
throw new Error("No element indexed by " + e)
}, n.prototype.toArray = function() {
return this._array.slice()
}, t.ArraySet = n
}), e("source-map/source-map-consumer", ["require", "exports", "module", "source-map/util", "source-map/binary-search", "source-map/array-set", "source-map/base64-vlq"], function(e, t) {
function n(e) {
var t = e;
"string" == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, "")));
var n = r.getArg(t, "version"),
o = r.getArg(t, "sources"),
a = r.getArg(t, "names", []),
s = r.getArg(t, "sourceRoot", null),
l = r.getArg(t, "sourcesContent", null),
u = r.getArg(t, "mappings"),
c = r.getArg(t, "file", null);
if (n != this._version) throw new Error("Unsupported version: " + n);
this._names = i.fromArray(a, !0), this._sources = i.fromArray(o, !0), this.sourceRoot = s, this.sourcesContent = l, this._mappings = u, this.file = c
}
var r = e("./util"),
o = e("./binary-search"),
i = e("./array-set").ArraySet,
a = e("./base64-vlq");
n.fromSourceMap = function(e) {
var t = Object.create(n.prototype);
return t._names = i.fromArray(e._names.toArray(), !0), t._sources = i.fromArray(e._sources.toArray(), !0), t.sourceRoot = e._sourceRoot, t.sourcesContent = e._generateSourcesContent(t._sources.toArray(), t.sourceRoot), t.file = e._file, t.__generatedMappings = e._mappings.slice().sort(r.compareByGeneratedPositions), t.__originalMappings = e._mappings.slice().sort(r.compareByOriginalPositions), t
}, n.prototype._version = 3, Object.defineProperty(n.prototype, "sources", {
get: function() {
return this._sources.toArray().map(function(e) {
return this.sourceRoot ? r.join(this.sourceRoot, e) : e
}, this)
}
}), n.prototype.__generatedMappings = null, Object.defineProperty(n.prototype, "_generatedMappings", {
get: function() {
return this.__generatedMappings || (this.__generatedMappings = [], this.__originalMappings = [], this._parseMappings(this._mappings, this.sourceRoot)), this.__generatedMappings
}
}), n.prototype.__originalMappings = null, Object.defineProperty(n.prototype, "_originalMappings", {
get: function() {
return this.__originalMappings || (this.__generatedMappings = [], this.__originalMappings = [], this._parseMappings(this._mappings, this.sourceRoot)), this.__originalMappings
}
}), n.prototype._parseMappings = function(e) {
for (var t, n, o = 1, i = 0, s = 0, l = 0, u = 0, c = 0, d = /^[,;]/, p = e; p.length > 0;)
if (";" === p.charAt(0)) o++, p = p.slice(1), i = 0;
else if ("," === p.charAt(0)) p = p.slice(1);
else {
if (t = {}, t.generatedLine = o, n = a.decode(p), t.generatedColumn = i + n.value, i = t.generatedColumn, p = n.rest, p.length > 0 && !d.test(p.charAt(0))) {
if (n = a.decode(p), t.source = this._sources.at(u + n.value), u += n.value, p = n.rest, 0 === p.length || d.test(p.charAt(0))) throw new Error("Found a source, but no line and column");
if (n = a.decode(p), t.originalLine = s + n.value, s = t.originalLine, t.originalLine += 1, p = n.rest, 0 === p.length || d.test(p.charAt(0))) throw new Error("Found a source and line, but no column");
n = a.decode(p), t.originalColumn = l + n.value, l = t.originalColumn, p = n.rest, p.length > 0 && !d.test(p.charAt(0)) && (n = a.decode(p), t.name = this._names.at(c + n.value), c += n.value, p = n.rest)
}
this.__generatedMappings.push(t), "number" == typeof t.originalLine && this.__originalMappings.push(t)
}
this.__originalMappings.sort(r.compareByOriginalPositions)
}, n.prototype._findMapping = function(e, t, n, r, i) {
if (e[n] <= 0) throw new TypeError("Line must be greater than or equal to 1, got " + e[n]);
if (e[r] < 0) throw new TypeError("Column must be greater than or equal to 0, got " + e[r]);
return o.search(e, t, i)
}, n.prototype.originalPositionFor = function(e) {
var t = {
generatedLine: r.getArg(e, "line"),
generatedColumn: r.getArg(e, "column")
},
n = this._findMapping(t, this._generatedMappings, "generatedLine", "generatedColumn", r.compareByGeneratedPositions);
if (n) {
var o = r.getArg(n, "source", null);
return o && this.sourceRoot && (o = r.join(this.sourceRoot, o)), {
source: o,
line: r.getArg(n, "originalLine", null),
column: r.getArg(n, "originalColumn", null),
name: r.getArg(n, "name", null)
}
}
return {
source: null,
line: null,
column: null,
name: null
}
}, n.prototype.sourceContentFor = function(e) {
if (!this.sourcesContent) return null;
if (this.sourceRoot && (e = r.relative(this.sourceRoot, e)), this._sources.has(e)) return this.sourcesContent[this._sources.indexOf(e)];
var t;
if (this.sourceRoot && (t = r.urlParse(this.sourceRoot))) {
var n = e.replace(/^file:\/\//, "");
if ("file" == t.scheme && this._sources.has(n)) return this.sourcesContent[this._sources.indexOf(n)];
if ((!t.path || "/" == t.path) && this._sources.has("/" + e)) return this.sourcesContent[this._sources.indexOf("/" + e)]
}
throw new Error('"' + e + '" is not in the SourceMap.')
}, n.prototype.generatedPositionFor = function(e) {
var t = {
source: r.getArg(e, "source"),
originalLine: r.getArg(e, "line"),
originalColumn: r.getArg(e, "column")
};
this.sourceRoot && (t.source = r.relative(this.sourceRoot, t.source));
var n = this._findMapping(t, this._originalMappings, "originalLine", "originalColumn", r.compareByOriginalPositions);
return n ? {
line: r.getArg(n, "generatedLine", null),
column: r.getArg(n, "generatedColumn", null)
} : {
line: null,
column: null
}
}, n.GENERATED_ORDER = 1, n.ORIGINAL_ORDER = 2, n.prototype.eachMapping = function(e, t, o) {
var i, a = t || null,
s = o || n.GENERATED_ORDER;
switch (s) {
case n.GENERATED_ORDER:
i = this._generatedMappings;
break;
case n.ORIGINAL_ORDER:
i = this._originalMappings;
break;
default:
throw new Error("Unknown order of iteration.")
}
var l = this.sourceRoot;
i.map(function(e) {
var t = e.source;
return t && l && (t = r.join(l, t)), {
source: t,
generatedLine: e.generatedLine,
generatedColumn: e.generatedColumn,
originalLine: e.originalLine,
originalColumn: e.originalColumn,
name: e.name
}
}).forEach(e, a)
}, t.SourceMapConsumer = n
}), e("source-map/binary-search", ["require", "exports", "module"], function(e, t) {
function n(e, t, r, o, i) {
var a = Math.floor((t - e) / 2) + e,
s = i(r, o[a], !0);
return 0 === s ? o[a] : s > 0 ? t - a > 1 ? n(a, t, r, o, i) : o[a] : a - e > 1 ? n(e, a, r, o, i) : 0 > e ? null : o[e]
}
t.search = function(e, t, r) {
return t.length > 0 ? n(-1, t.length, e, t, r) : null
}
}), e("source-map/source-node", ["require", "exports", "module", "source-map/source-map-generator", "source-map/util"], function(e, t) {
function n(e, t, n, r, o) {
this.children = [], this.sourceContents = {}, this.line = void 0 === e ? null : e, this.column = void 0 === t ? null : t, this.source = void 0 === n ? null : n, this.name = void 0 === o ? null : o, null != r && this.add(r)
}
var r = e("./source-map-generator").SourceMapGenerator,
o = e("./util");
n.fromStringWithSourceMap = function(e, t) {
function r(e, t) {
o.add(null === e || void 0 === e.source ? t : new n(e.originalLine, e.originalColumn, e.source, t, e.name))
}
var o = new n,
i = e.split("\n"),
a = 1,
s = 0,
l = null;
return t.eachMapping(function(e) {
if (null === l) {
for (; a < e.generatedLine;) o.add(i.shift() + "\n"), a++;
if (s < e.generatedColumn) {
var t = i[0];
o.add(t.substr(0, e.generatedColumn)), i[0] = t.substr(e.generatedColumn), s = e.generatedColumn
}
} else if (a < e.generatedLine) {
var n = "";
do n += i.shift() + "\n", a++, s = 0; while (a < e.generatedLine);
if (s < e.generatedColumn) {
var t = i[0];
n += t.substr(0, e.generatedColumn), i[0] = t.substr(e.generatedColumn), s = e.generatedColumn
}
r(l, n)
} else {
var t = i[0],
n = t.substr(0, e.generatedColumn - s);
i[0] = t.substr(e.generatedColumn - s), s = e.generatedColumn, r(l, n)
}
l = e
}, this), r(l, i.join("\n")), t.sources.forEach(function(e) {
var n = t.sourceContentFor(e);
n && o.setSourceContent(e, n)
}), o
}, n.prototype.add = function(e) {
if (Array.isArray(e)) e.forEach(function(e) {
this.add(e)
}, this);
else {
if (!(e instanceof n || "string" == typeof e)) throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + e);
e && this.children.push(e)
}
return this
}, n.prototype.prepend = function(e) {
if (Array.isArray(e))
for (var t = e.length - 1; t >= 0; t--) this.prepend(e[t]);
else {
if (!(e instanceof n || "string" == typeof e)) throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + e);
this.children.unshift(e)
}
return this
}, n.prototype.walk = function(e) {
for (var t, r = 0, o = this.children.length; o > r; r++) t = this.children[r], t instanceof n ? t.walk(e) : "" !== t && e(t, {
source: this.source,
line: this.line,
column: this.column,
name: this.name
})
}, n.prototype.join = function(e) {
var t, n, r = this.children.length;
if (r > 0) {
for (t = [], n = 0; r - 1 > n; n++) t.push(this.children[n]), t.push(e);
t.push(this.children[n]), this.children = t
}
return this
}, n.prototype.replaceRight = function(e, t) {
var r = this.children[this.children.length - 1];
return r instanceof n ? r.replaceRight(e, t) : "string" == typeof r ? this.children[this.children.length - 1] = r.replace(e, t) : this.children.push("".replace(e, t)), this
}, n.prototype.setSourceContent = function(e, t) {
this.sourceContents[o.toSetString(e)] = t
}, n.prototype.walkSourceContents = function(e) {
for (var t = 0, r = this.children.length; r > t; t++) this.children[t] instanceof n && this.children[t].walkSourceContents(e);
for (var i = Object.keys(this.sourceContents), t = 0, r = i.length; r > t; t++) e(o.fromSetString(i[t]), this.sourceContents[i[t]])
}, n.prototype.toString = function() {
var e = "";
return this.walk(function(t) {
e += t
}), e
}, n.prototype.toStringWithSourceMap = function(e) {
var t = {
code: "",
line: 1,
column: 0
},
n = new r(e),
o = !1,
i = null,
a = null,
s = null,
l = null;
return this.walk(function(e, r) {
t.code += e, null !== r.source && null !== r.line && null !== r.column ? ((i !== r.source || a !== r.line || s !== r.column || l !== r.name) && n.addMapping({
source: r.source,
original: {
line: r.line,
column: r.column
},
generated: {
line: t.line,
column: t.column
},
name: r.name
}), i = r.source, a = r.line, s = r.column, l = r.name, o = !0) : o && (n.addMapping({
generated: {
line: t.line,
column: t.column
}
}), i = null, o = !1), e.split("").forEach(function(e) {
"\n" === e ? (t.line++, t.column = 0) : t.column++
})
}), this.walkSourceContents(function(e, t) {
n.setSourceContent(e, t)
}), {
code: t.code,
map: n
}
}, t.SourceNode = n
}), this.sourceMap = {
SourceMapConsumer: n("source-map/source-map-consumer").SourceMapConsumer,
SourceMapGenerator: n("source-map/source-map-generator").SourceMapGenerator,
SourceNode: n("source-map/source-node").SourceNode
}
}
var a = {};
i.call(a), o.exports = a.sourceMap
}), __d("xmlhttprequest", [], function(e, t, n, r, o, i) {
"use strict";
i.XMLHttpRequest = t("RKXMLHttpRequest")
}), __d("RKXMLHttpRequest", [], function(e, t, n, r, o) {
"use strict";
function i() {
this.UNSENT = 0, this.OPENED = 1, this.HEADERS_RECEIVED = 2, this.LOADING = 3, this.DONE = 4, this.onreadystatechange = void 0, this.upload = void 0, this.readyState = this.UNSENT, this.$RKXMLHttpRequest_method = null, this.$RKXMLHttpRequest_url = null, this.$RKXMLHttpRequest_headers = {}, this.$RKXMLHttpRequest_sent = !1
}
var a = t("NativeModulesDeprecated").RKDataManager,
s = t("crc32");
i.prototype.getAllResponseHeaders = function() {
return null
}, i.prototype.setRequestHeader = function(e, t) {
this.$RKXMLHttpRequest_headers[e] = t
}, i.prototype.open = function(e, t, n) {
if (this.readyState !== this.UNSENT) throw new Error("Cannot open, already sending");
if (void 0 !== n && !n) throw new Error("Synchronous http requests are not supported");
this.$RKXMLHttpRequest_method = e, this.$RKXMLHttpRequest_url = t, this.$RKXMLHttpRequest_setReadyState(this.OPENED)
}, i.prototype.send = function(e) {
if (this.readyState !== this.OPENED) throw new Error("Request has not been opened");
if (this.$RKXMLHttpRequest_sent) throw new Error("Request has already been sent");
this.$RKXMLHttpRequest_sent = !0, a.queryData("http", JSON.stringify({
method: this.$RKXMLHttpRequest_method,
url: this.$RKXMLHttpRequest_url,
data: e,
headers: this.$RKXMLHttpRequest_headers
}), "h" + s(this.$RKXMLHttpRequest_method + "|" + this.$RKXMLHttpRequest_url + "|" + e), function(e) {
e = JSON.parse(e), this.$RKXMLHttpRequest_callback(e.status, e.responseHeaders, e.responseText)
}.bind(this))
}, i.prototype.abort = function() {
throw new Error("abort() is not supported")
}, i.prototype.$RKXMLHttpRequest_setReadyState = function(e) {
this.readyState = e, this.onreadystatechange && this.onreadystatechange(null)
}, i.prototype.$RKXMLHttpRequest_callback = function(e, t, n) {
this.status = e, this.responseHeaders = t, this.responseText = n, this.$RKXMLHttpRequest_setReadyState(this.DONE)
}, o.exports = i
}), __d("crc32", [], function(e, t, n, r, o) {
function i(e) {
var t = 0,
n = 0,
r = 0;
t = -1 ^ t;
for (var o = 0, i = e.length; i > o; o++) n = 255 & (t ^ e.charCodeAt(o)), r = "0x" + a.substr(9 * n, 8), t = t >>> 8 ^ r;
return -1 ^ t
}
var a = "00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D";
o.exports = i
}), __d("EventPluginHub", [], function(e, t, n, r, o) {
"use strict";
function i() {
var e = !f || !f.traverseTwoPhase || !f.traverseEnterLeave;
if (e) throw new Error("InstanceHandle not injected before use!")
}
var a = t("EventPluginRegistry"),
s = t("EventPluginUtils"),
l = t("accumulateInto"),
u = t("forEachAccumulated"),
c = t("invariant"),
d = {},
p = null,
h = function(e) {
if (e) {
var t = s.executeDispatch,
n = a.getPluginModuleForEvent(e);
n && n.executeDispatch && (t = n.executeDispatch), s.executeDispatchesInOrder(e, t), e.isPersistent() || e.constructor.release(e)
}
},
f = null,
m = {
injection: {
injectMount: s.injection.injectMount,
injectInstanceHandle: function(e) {
f = e, __DEV__ && i()
},
getInstanceHandle: function() {
return __DEV__ && i(), f
},
injectEventPluginOrder: a.injectEventPluginOrder,
injectEventPluginsByName: a.injectEventPluginsByName
},
eventNameDispatchConfigs: a.eventNameDispatchConfigs,
registrationNameModules: a.registrationNameModules,
putListener: function(e, t, n) {
n && "function" != typeof n && c(0, "Expected %s listener to be a function, instead got type %s", t, typeof n);
var r = d[t] || (d[t] = {});
r[e] = n
},
getListener: function(e, t) {
var n = d[t];
return n && n[e]
},
deleteListener: function(e, t) {
var n = d[t];
n && delete n[e]
},
deleteAllListeners: function(e) {
for (var t in d) delete d[t][e]
},
extractEvents: function(e, t, n, r) {
for (var o, i = a.plugins, s = 0, u = i.length; u > s; s++) {
var c = i[s];
if (c) {
var d = c.extractEvents(e, t, n, r);
d && (o = l(o, d))
}
}
return o
},
enqueueEvents: function(e) {
e && (p = l(p, e))
},
processEventQueue: function() {
var e = p;
p = null, u(e, h), p && c(0, "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.")
},
__purge: function() {
d = {}
},
__getListenerBank: function() {
return d
}
};
o.exports = m
}), __d("EventPluginRegistry", [], function(e, t, n, r, o) {
"use strict";
function i() {
if (u)
for (var e in c) {
var t = c[e],
n = u.indexOf(e);
if (n > -1 || l(0, "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.", e), !d.plugins[n]) {
t.extractEvents || l(0, "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.", e), d.plugins[n] = t;
var r = t.eventTypes;
for (var o in r) a(r[o], t, o) || l(0, "EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.", o, e)
}
}
}
function a(e, t, n) {
d.eventNameDispatchConfigs.hasOwnProperty(n) && l(0, "EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.", n), d.eventNameDispatchConfigs[n] = e;
var r = e.phasedRegistrationNames;
if (r) {
for (var o in r)
if (r.hasOwnProperty(o)) {
var i = r[o];
s(i, t, n)
}
return !0
}
return e.registrationName ? (s(e.registrationName, t, n), !0) : !1
}
function s(e, t, n) {
d.registrationNameModules[e] && l(0, "EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.", e), d.registrationNameModules[e] = t, d.registrationNameDependencies[e] = t.eventTypes[n].dependencies
}
var l = t("invariant"),
u = null,
c = {},
d = {
plugins: [],
eventNameDispatchConfigs: {},
registrationNameModules: {},
registrationNameDependencies: {},
injectEventPluginOrder: function(e) {
u && l(0, "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."), u = Array.prototype.slice.call(e), i()
},
injectEventPluginsByName: function(e) {
var t = !1;
for (var n in e)
if (e.hasOwnProperty(n)) {
var r = e[n];
c.hasOwnProperty(n) && c[n] === r || (c[n] && l(0, "EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.", n), c[n] = r, t = !0)
}
t && i()
},
getPluginModuleForEvent: function(e) {
var t = e.dispatchConfig;
if (t.registrationName) return d.registrationNameModules[t.registrationName] || null;
for (var n in t.phasedRegistrationNames)
if (t.phasedRegistrationNames.hasOwnProperty(n)) {
var r = d.registrationNameModules[t.phasedRegistrationNames[n]];
if (r) return r
}
return null
},
_resetEventPlugins: function() {
u = null;
for (var e in c) c.hasOwnProperty(e) && delete c[e];
d.plugins.length = 0;
var t = d.eventNameDispatchConfigs;
for (var n in t) t.hasOwnProperty(n) && delete t[n];
var r = d.registrationNameModules;
for (var o in r) r.hasOwnProperty(o) && delete r[o]
}
};
o.exports = d
}), __d("EventPluginUtils", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return e === v.topMouseUp || e === v.topTouchEnd || e === v.topTouchCancel
}
function a(e) {
return e === v.topMouseMove || e === v.topTouchMove
}
function s(e) {
return e === v.topMouseDown || e === v.topTouchStart
}
function l(e, t) {
var n = e._dispatchListeners,
r = e._dispatchIDs;
if (__DEV__ && m(e), Array.isArray(n))
for (var o = 0; o < n.length && !e.isPropagationStopped(); o++) t(e, n[o], r[o]);
else n && t(e, n, r)
}
function u(e, t, n) {
e.currentTarget = y.Mount.getNode(n);
var r = t(e, n);
return e.currentTarget = null, r
}
function c(e, t) {
l(e, t), e._dispatchListeners = null, e._dispatchIDs = null
}
function d(e) {
var t = e._dispatchListeners,
n = e._dispatchIDs;
if (__DEV__ && m(e), Array.isArray(t)) {
for (var r = 0; r < t.length && !e.isPropagationStopped(); r++)
if (t[r](e, n[r])) return n[r]
} else if (t && t(e, n)) return n;
return null
}
function p(e) {
var t = d(e);
return e._dispatchIDs = null, e._dispatchListeners = null, t
}
function h(e) {
__DEV__ && m(e);
var t = e._dispatchListeners,
n = e._dispatchIDs;
Array.isArray(t) && _(0, "executeDirectDispatch(...): Invalid `event`.");
var r = t ? t(e, n) : null;
return e._dispatchListeners = null, e._dispatchIDs = null, r
}
function f(e) {
return !!e._dispatchListeners
}
var m, g = t("EventConstants"),
_ = t("invariant"),
y = {
Mount: null,
injectMount: function(e) {
y.Mount = e, __DEV__ && (e && e.getNode || _(0, "EventPluginUtils.injection.injectMount(...): Injected Mount module is missing getNode."))
}
},
v = g.topLevelTypes;
__DEV__ && (m = function(e) {
var t = e._dispatchListeners,
n = e._dispatchIDs,
r = Array.isArray(t),
o = Array.isArray(n),
i = o ? n.length : n ? 1 : 0,
a = r ? t.length : t ? 1 : 0;
(o !== r || i !== a) && _(0, "EventPluginUtils: Invalid `event`.")
});
var S = {
isEndish: i,
isMoveish: a,
isStartish: s,
executeDirectDispatch: h,
executeDispatch: u,
executeDispatchesInOrder: c,
executeDispatchesInOrderStopAtTrue: p,
hasDispatches: f,
injection: y,
useTouchEvents: !1
};
o.exports = S
}), __d("EventConstants", [], function(e, t, n, r, o) {
"use strict";
var i = t("keyMirror"),
a = i({
bubbled: null,
captured: null
}),
s = i({
topBlur: null,
topChange: null,
topClick: null,
topCompositionEnd: null,
topCompositionStart: null,
topCompositionUpdate: null,
topContextMenu: null,
topCopy: null,
topCut: null,
topDoubleClick: null,
topDrag: null,
topDragEnd: null,
topDragEnter: null,
topDragExit: null,
topDragLeave: null,
topDragOver: null,
topDragStart: null,
topDrop: null,
topError: null,
topFocus: null,
topInput: null,
topKeyDown: null,
topKeyPress: null,
topKeyUp: null,
topLoad: null,
topMouseDown: null,
topMouseMove: null,
topMouseOut: null,
topMouseOver: null,
topMouseUp: null,
topPaste: null,
topReset: null,
topScroll: null,
topSelectionChange: null,
topSubmit: null,
topTextInput: null,
topTouchCancel: null,
topTouchEnd: null,
topTouchMove: null,
topTouchStart: null,
topWheel: null
}),
l = {
topLevelTypes: s,
PropagationPhases: a
};
o.exports = l
}), __d("accumulateInto", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
if (null == t && a(0, "accumulateInto(...): Accumulated items must not be null or undefined."), null == e) return t;
var n = Array.isArray(e),
r = Array.isArray(t);
return n && r ? (e.push.apply(e, t), e) : n ? (e.push(t), e) : r ? [e].concat(t) : [e, t]
}
var a = t("invariant");
o.exports = i
}), __d("forEachAccumulated", [], function(e, t, n, r, o) {
"use strict";
var i = function(e, t, n) {
Array.isArray(e) ? e.forEach(t, n) : e && t.call(n, e)
};
o.exports = i
}), __d("IOSDefaultEventPluginOrder", [], function(e, t, n, r, o) {
"use strict";
var i = ["ResponderEventPlugin", "IOSNativeBridgeEventPlugin"];
o.exports = i
}), __d("IOSNativeBridgeEventPlugin", [], function(e, t, n, r, o) {
"use strict";
var i = t("EventPropagators"),
a = t("NativeModulesDeprecated"),
s = t("SyntheticEvent"),
l = t("merge"),
u = t("warning"),
c = a.RKUIManager,
d = c.customBubblingEventTypes,
p = c.customDirectEventTypes,
h = {};
for (var f in d) h[f] = d[f];
for (var m in p) u(!d[m], "Event cannot be both direct and bubbling: %s", m), h[m] = p[m];
var g = {
eventTypes: l(d, p),
extractEvents: function(e, t, n, r) {
var o = d[e],
a = p[e],
l = s.getPooled(o || a, n, r);
if (o) i.accumulateTwoPhaseDispatches(l);
else {
if (!a) return null;
i.accumulateDirectDispatches(l)
}
return l
}
};
o.exports = g
}), __d("EventPropagators", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
var r = t.dispatchConfig.phasedRegistrationNames[n];
return S(e, r)
}
function a(e, t, n) {
if (__DEV__ && !e) throw new Error("Dispatching id must not be null");
var r = t ? v.bubbled : v.captured,
o = i(e, n, r);
o && (n._dispatchListeners = _(n._dispatchListeners, o), n._dispatchIDs = _(n._dispatchIDs, e))
}
function s(e) {
e && e.dispatchConfig.phasedRegistrationNames && g.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker, a, e)
}
function l(e) {
e && e.dispatchConfig.phasedRegistrationNames && g.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(e.dispatchMarker, a, e)
}
function u(e, t, n) {
if (n && n.dispatchConfig.registrationName) {
var r = n.dispatchConfig.registrationName,
o = S(e, r);
o && (n._dispatchListeners = _(n._dispatchListeners, o), n._dispatchIDs = _(n._dispatchIDs, e))
}
}
function c(e) {
e && e.dispatchConfig.registrationName && u(e.dispatchMarker, null, e)
}
function d(e) {
y(e, s)
}
function p(e) {
y(e, l)
}
function h(e, t, n, r) {
g.injection.getInstanceHandle().traverseEnterLeave(n, r, u, e, t)
}
function f(e) {
y(e, c)
}
var m = t("EventConstants"),
g = t("EventPluginHub"),
_ = t("accumulateInto"),
y = t("forEachAccumulated"),
v = m.PropagationPhases,
S = g.getListener,
w = {
accumulateTwoPhaseDispatches: d,
accumulateTwoPhaseDispatchesSkipTarget: p,
accumulateDirectDispatches: f,
accumulateEnterLeaveDispatches: h
};
o.exports = w
}), __d("SyntheticEvent", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
this.dispatchConfig = e, this.dispatchMarker = t, this.nativeEvent = n;
var r = this.constructor.Interface;
for (var o in r)
if (r.hasOwnProperty(o)) {
var i = r[o];
this[o] = i ? i(n) : n[o]
}
var a = null != n.defaultPrevented ? n.defaultPrevented : n.returnValue === !1;
this.isDefaultPrevented = a ? s.thatReturnsTrue : s.thatReturnsFalse, this.isPropagationStopped = s.thatReturnsFalse
}
var a = t("PooledClass"),
s = t("emptyFunction"),
l = t("getEventTarget"),
u = {
type: null,
target: l,
currentTarget: s.thatReturnsNull,
eventPhase: null,
bubbles: null,
cancelable: null,
timeStamp: function(e) {
return e.timeStamp || Date.now()
},
defaultPrevented: null,
isTrusted: null
};
Object.assign(i.prototype, {
preventDefault: function() {
this.defaultPrevented = !0;
var e = this.nativeEvent;
e.preventDefault ? e.preventDefault() : e.returnValue = !1, this.isDefaultPrevented = s.thatReturnsTrue
},
stopPropagation: function() {
var e = this.nativeEvent;
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0, this.isPropagationStopped = s.thatReturnsTrue
},
persist: function() {
this.isPersistent = s.thatReturnsTrue
},
isPersistent: s.thatReturnsFalse,
destructor: function() {
var e = this.constructor.Interface;
for (var t in e) this[t] = null;
this.dispatchConfig = null, this.dispatchMarker = null, this.nativeEvent = null
}
}), i.Interface = u, i.augmentClass = function(e, t) {
var n = this,
r = Object.create(n.prototype);
Object.assign(r, e.prototype), e.prototype = r, e.prototype.constructor = e, e.Interface = Object.assign({}, n.Interface, t), e.augmentClass = n.augmentClass, a.addPoolingTo(e, a.threeArgumentPooler)
}, a.addPoolingTo(i, a.threeArgumentPooler), o.exports = i
}), __d("getEventTarget", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t = e.target || e.srcElement || window;
return 3 === t.nodeType ? t.parentNode : t
}
o.exports = i
}), __d("merge", [], function(e, t, n, r, o) {
"use strict";
var i = function(e, t) {
return Object.assign({}, e, t)
};
o.exports = i
}), __d("NodeHandle", [], function(e, t, n, r, o) {
var i = {
injection: {
injectImplementation: function(e) {
i._Implementation = e
}
},
_Implementation: null,
getRootNodeID: function(e) {
return i._Implementation.getRootNodeID(e)
}
};
o.exports = i
}), __d("ReactDefaultBatchingStrategy", [], function(e, t, n, r, o) {
"use strict";
function i() {
this.reinitializeTransaction()
}
var a = t("ReactUpdates"),
s = t("Transaction"),
l = t("emptyFunction"),
u = {
initialize: l,
close: function() {
h.isBatchingUpdates = !1
}
},
c = {
initialize: l,
close: a.flushBatchedUpdates.bind(a)
},
d = [c, u];
Object.assign(i.prototype, s.Mixin, {
getTransactionWrappers: function() {
return d
}
});
var p = new i,
h = {
isBatchingUpdates: !1,
batchedUpdates: function(e, t, n) {
var r = h.isBatchingUpdates;
h.isBatchingUpdates = !0, r ? e(t, n) : p.perform(e, null, t, n)
}
};
o.exports = h
}), __d("ReactIOSComponentEnvironment", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeModulesDeprecated").RKUIManager,
a = t("ReactIOSDOMIDOperations"),
s = t("ReactIOSReconcileTransaction"),
l = t("ReactIOSTagHandles"),
u = t("ReactPerf"),
c = {
BackendIDOperations: a,
unmountIDFromEnvironment: function() {},
clearNode: function() {},
mountImageIntoNode: u.measure("ReactComponentBrowserEnvironment", "mountImageIntoNode", function(e, t) {
l.associateRootNodeIDWithMountedNodeHandle(e.rootNodeID, e.tag);
var n = [e.tag],
r = [0];
i.manageChildren(l.mostRecentMountedNodeHandleForRootNodeID(t), null, null, n, r, null)
}),
ReactReconcileTransaction: s
};
o.exports = c
}), __d("ReactIOSDOMIDOperations", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactIOSTagHandles"),
a = t("ReactMultiChildUpdateTypes"),
s = t("NativeModulesDeprecated").RKUIManager,
l = t("ReactPerf"),
u = function(e, t) {
if (e.length) {
for (var n = {}, r = 0; r < e.length; r++) {
var o = e[r],
l = i.mostRecentMountedNodeHandleForRootNodeID(o.parentID),
u = n[l] || (n[l] = {});
if (o.type === a.MOVE_EXISTING)(u.moveFromIndices || (u.moveFromIndices = [])).push(o.fromIndex), (u.moveToIndices || (u.moveToIndices = [])).push(o.toIndex);
else if (o.type === a.REMOVE_NODE)(u.removeAtIndices || (u.removeAtIndices = [])).push(o.fromIndex);
else if (o.type === a.INSERT_MARKUP) {
var c = t[o.markupIndex],
d = c.tag,
p = c.rootNodeID;
i.associateRootNodeIDWithMountedNodeHandle(p, d), (u.addAtIndices || (u.addAtIndices = [])).push(o.toIndex), (u.addChildTags || (u.addChildTags = [])).push(d)
}
}
for (var h in n) {
var f = +h,
m = n[f];
s.manageChildren(f, m.moveFromIndices, m.moveToIndices, m.addChildTags, m.addAtIndices, m.removeAtIndices)
}
}
},
c = {
dangerouslyProcessChildrenUpdates: l.measure("ReactDOMIDOperations", "dangerouslyProcessChildrenUpdates", u),
dangerouslyReplaceNodeWithMarkupByID: l.measure("ReactDOMIDOperations", "dangerouslyReplaceNodeWithMarkupByID", function(e, t) {
var n = i.mostRecentMountedNodeHandleForRootNodeID(e);
s.replaceExistingNonRootView(n, t.tag), i.associateRootNodeIDWithMountedNodeHandle(e, t.tag)
})
};
o.exports = c
}), __d("ReactIOSTagHandles", [], function(e, t, n, r, o) {
"use strict";
var i = t("invariant"),
a = t("warning"),
s = 1,
l = {
tagsStartAt: s,
tagCount: s,
allocateTag: function() {
for (; this.reactTagIsNativeTopRootID(l.tagCount);) l.tagCount++;
var e = l.tagCount;
return l.tagCount++, e
},
associateRootNodeIDWithMountedNodeHandle: function(e, t) {
a(e && t, "Root node or tag is null when associating"), l.tagToRootNodeID[t] = e, l.rootNodeIDToTag[e] = t
},
allocateRootNodeIDForTag: function(e) {
return this.reactTagIsNativeTopRootID(e) || i(0, "Expect a native root tag, instead got ", e), ".r[" + e + "]{TOP_LEVEL}"
},
reactTagIsNativeTopRootID: function(e) {
return e % 10 === 1
},
mostRecentMountedNodeHandleForRootNodeID: function(e) {
return l.rootNodeIDToTag[e]
},
tagToRootNodeID: [],
rootNodeIDToTag: {}
};
o.exports = l
}), __d("ReactMultiChildUpdateTypes", [], function(e, t, n, r, o) {
"use strict";
var i = t("keyMirror"),
a = i({
INSERT_MARKUP: null,
MOVE_EXISTING: null,
REMOVE_NODE: null,
TEXT_CONTENT: null
});
o.exports = a
}), __d("ReactIOSReconcileTransaction", [], function(e, t, n, r, o) {
"use strict";
function i() {
this.reinitializeTransaction(), this.reactMountReady = a.getPooled(null)
}
var a = t("CallbackQueue"),
s = t("PooledClass"),
l = t("Transaction"),
u = {
initialize: function() {
this.reactMountReady.reset()
},
close: function() {
this.reactMountReady.notifyAll()
}
},
c = [u],
d = {
getTransactionWrappers: function() {
return c
},
getReactMountReady: function() {
return this.reactMountReady
},
destructor: function() {
a.release(this.reactMountReady), this.reactMountReady = null
}
};
Object.assign(i.prototype, l.Mixin, i, d), s.addPoolingTo(i), o.exports = i
}), __d("ReactIOSComponentMixin", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactIOSTagHandles"),
a = {
getNativeNode: function() {
return i.rootNodeIDToTag[this._rootNodeID]
},
getNodeHandle: function() {
return i.rootNodeIDToTag[this._rootNodeID]
}
};
o.exports = a
}), __d("ReactIOSGlobalResponderHandler", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeModules").RKUIManager,
a = t("ReactIOSTagHandles"),
s = {
onChange: function(e, t) {
null !== t ? i.setJSResponder(a.mostRecentMountedNodeHandleForRootNodeID(t)) : i.clearJSResponder()
}
};
o.exports = s
}), __d("ReactIOSMount", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
return e + "[" + t + "]"
}
var a = t("NativeModulesDeprecated").RKUIManager,
s = t("ReactIOSTagHandles"),
l = t("instantiateReactComponent"),
u = t("invariant"),
c = {},
d = {
instanceCount: 0,
_instancesByContainerID: {},
renderComponent: function(e, t) {
var n = l(e);
if (!s.reactTagIsNativeTopRootID(t)) return void console.error("You cannot render into anything but a top root");
var r = s.allocateRootNodeIDForTag(t);
s.associateRootNodeIDWithMountedNodeHandle(r, t), c[r] = !0;
var o = i(r, d.instanceCount++);
d._instancesByContainerID[r] = n, n.mountComponentIntoNode(o, r)
},
unmountComponentAtNodeAndRemoveContainer: function(e) {
d.unmountComponentAtNode(e), a.removeRootView(e)
},
unmountComponentAtNode: function(e) {
var t = s.tagToRootNodeID[e];
c[t] || u(0, "We only currently support removing components from the root node");
var n = d._instancesByContainerID[t];
return n ? (d.unmountComponentFromNode(n, t), delete d._instancesByContainerID[t], delete c[t], !0) : (console.error("Tried to unmount a component that does not exist"), !1)
},
unmountComponentFromNode: function(e, t) {
e.unmountComponent();
var n = s.mostRecentMountedNodeHandleForRootNodeID(t);
a.removeSubviewsFromContainerWithID(n)
},
getNode: function(e) {
return e
}
};
o.exports = d
}), __d("ReactTextComponent", [], function(e, t, n, r, o) {
"use strict";
var i = null,
a = function() {
return i.apply(this, arguments)
};
a.inject = function(e) {
i = e
}, o.exports = a
}), __d("ResponderEventPlugin", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
var r = _(e) ? E.startShouldSetResponder : y(e) ? E.moveShouldSetResponder : E.scrollShouldSetResponder,
o = R ? p._getFirstCommonAncestorID(R, t) : t,
i = o === R,
a = h.getPooled(r, o, n);
a.touchHistory = f.touchHistory, i ? c.accumulateTwoPhaseDispatchesSkipTarget(a) : c.accumulateTwoPhaseDispatches(a);
var s = b(a);
if (a.isPersistent() || a.constructor.release(a), !s || s === R) return null;
var l, u = h.getPooled(E.responderGrant, s, n);
if (u.touchHistory = f.touchHistory, c.accumulateDirectDispatches(u), R) {
var d = h.getPooled(E.responderTerminationRequest, R, n);
d.touchHistory = f.touchHistory, c.accumulateDirectDispatches(d);
var g = !w(d) || S(d);
if (d.isPersistent() || d.constructor.release(d), g) {
var v = E.responderTerminate,
D = h.getPooled(v, R, n);
D.touchHistory = f.touchHistory, c.accumulateDirectDispatches(D), l = m(l, [u, D]), C(s)
} else {
var x = h.getPooled(E.responderReject, s, n);
x.touchHistory = f.touchHistory, c.accumulateDirectDispatches(x), l = m(l, x)
}
} else l = m(l, u), C(s);
return l
}
function a(e, t) {
return t && (e === l.topLevelTypes.topScroll || _(e) || y(e))
}
function s(e) {
var t = e.touches;
if (!t || 0 === t.length) return !0;
for (var n = 0; n < t.length; n++) {
var r = t[n],
o = r.target;
if (null !== o && void 0 !== o && 0 !== o) {
var i = p._getFirstCommonAncestorID(R, d.getRootNodeID(o));
if (i === R) return !1
}
}
return !0
}
var l = t("EventConstants"),
u = t("EventPluginUtils"),
c = t("EventPropagators"),
d = t("NodeHandle"),
p = t("ReactInstanceHandles"),
h = t("ResponderSyntheticEvent"),
f = t("ResponderTouchHistoryStore"),
m = t("accumulate"),
g = t("keyOf"),
_ = u.isStartish,
y = u.isMoveish,
v = u.isEndish,
S = u.executeDirectDispatch,
w = u.hasDispatches,
b = u.executeDispatchesInOrderStopAtTrue,
R = null,
C = function(e) {
var t = R;
R = e, null !== D.GlobalResponderHandler && D.GlobalResponderHandler.onChange(t, e)
},
E = {
startShouldSetResponder: {
phasedRegistrationNames: {
bubbled: g({
onStartShouldSetResponder: null
}),
captured: g({
onStartShouldSetResponderCapture: null
})
}
},
scrollShouldSetResponder: {
phasedRegistrationNames: {
bubbled: g({
onScrollShouldSetResponder: null
}),
captured: g({
onScrollShouldSetResponderCapture: null
})
}
},
moveShouldSetResponder: {
phasedRegistrationNames: {
bubbled: g({
onMoveShouldSetResponder: null
}),
captured: g({
onMoveShouldSetResponderCapture: null
})
}
},
responderStart: {
registrationName: g({
onResponderStart: null
})
},
responderMove: {
registrationName: g({
onResponderMove: null
})
},
responderEnd: {
registrationName: g({
onResponderEnd: null
})
},
responderRelease: {
registrationName: g({
onResponderRelease: null
})
},
responderTerminationRequest: {
registrationName: g({
onResponderTerminationRequest: null
})
},
responderGrant: {
registrationName: g({
onResponderGrant: null
})
},
responderReject: {
registrationName: g({
onResponderReject: null
})
},
responderTerminate: {
registrationName: g({
onResponderTerminate: null
})
}
},
D = {
getResponderID: function() {
return R
},
eventTypes: E,
extractEvents: function(e, t, n, r) {
f.recordTouchTrack(e, r);
var o = a(e, n) ? i(e, n, r) : null,
l = R && _(e),
u = R && y(e),
d = R && v(e),
p = l ? E.responderStart : u ? E.responderMove : d ? E.responderEnd : null;
if (p) {
var g = h.getPooled(p, R, r);
g.touchHistory = f.touchHistory, c.accumulateDirectDispatches(g), o = m(o, g)
}
var S = R && v(e) && s(r);
if (S) {
var w = h.getPooled(E.responderRelease, R, r);
w.touchHistory = f.touchHistory, c.accumulateDirectDispatches(w), o = m(o, w), C(null)
}
return o
},
GlobalResponderHandler: null,
injection: {
injectGlobalResponderHandler: function(e) {
D.GlobalResponderHandler = e
}
}
};
o.exports = D
}), __d("ResponderSyntheticEvent", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
a.call(this, e, t, n)
}
var a = t("SyntheticEvent"),
s = {
touchHistory: function() {
return null
}
};
a.augmentClass(i, s), o.exports = i
}), __d("ResponderTouchHistoryStore", [], function(e, t, n, r, o) {
"use strict";
var i = t("EventPluginUtils"),
a = t("invariant"),
s = i.isMoveish,
l = i.isStartish,
u = i.isEndish,
c = 20,
d = {
touchBank: [],
numberActiveTouches: 0,
indexOfSingleActiveTouch: -1,
mostRecentTimeStamp: 0
},
p = function(e) {
return {
touchActive: !0,
startTimeStamp: e.timeStamp,
startPageX: e.pageX,
startPageY: e.pageY,
currentPageX: e.pageX,
currentPageY: e.pageY,
currentTimeStamp: e.timeStamp,
previousPageX: e.pageX,
previousPageY: e.pageY,
previousTimeStamp: e.timeStamp
}
},
h = function(e, t) {
e.touchActive = !0, e.startTimeStamp = t.timeStamp, e.startPageX = t.pageX, e.startPageY = t.pageY, e.currentPageX = t.pageX, e.currentPageY = t.pageY, e.currentTimeStamp = t.timeStamp, e.previousPageX = t.pageX, e.previousPageY = t.pageY, e.previousTimeStamp = t.timeStamp
},
f = function(e) {
var t = e.identifier;
null == t && a(0, "Touch object is missing identifier"), t > c && console.warn("Touch identifier " + t + " is greater than maximum supported " + c + " which causes performance issues backfilling array locations for all of the indices.")
},
m = function(e) {
var t = d.touchBank,
n = e.identifier,
r = t[n];
__DEV__ && f(e), r ? h(r, e) : t[e.identifier] = p(e), d.mostRecentTimeStamp = e.timeStamp
},
g = function(e) {
var t = d.touchBank,
n = t[e.identifier];
__DEV__ && (f(e), n || a(0, "Touch data should have been recorded on start")), n.touchActive = !0, n.previousPageX = n.currentPageX, n.previousPageY = n.currentPageY, n.previousTimeStamp = n.currentTimeStamp, n.currentPageX = e.pageX, n.currentPageY = e.pageY, n.currentTimeStamp = e.timeStamp, d.mostRecentTimeStamp = e.timeStamp
},
_ = function(e) {
var t = d.touchBank,
n = t[e.identifier];
__DEV__ && (f(e), n || a(0, "Touch data should have been recorded on start")), n.previousPageX = n.currentPageX, n.previousPageY = n.currentPageY, n.previousTimeStamp = n.currentTimeStamp, n.currentPageX = e.pageX, n.currentPageY = e.pageY, n.currentTimeStamp = e.timeStamp, n.touchActive = !1, d.mostRecentTimeStamp = e.timeStamp
},
y = {
recordTouchTrack: function(e, t) {
var n = d.touchBank;
if (s(e)) t.changedTouches.forEach(g);
else if (l(e)) t.changedTouches.forEach(m), d.numberActiveTouches = t.touches.length, 1 === d.numberActiveTouches && (d.indexOfSingleActiveTouch = t.touches[0].identifier);
else if (u(e) && (t.changedTouches.forEach(_), d.numberActiveTouches = t.touches.length, 1 === d.numberActiveTouches)) {
for (var r = 0; r < n.length; r++) {
var o = n[r];
if (null != o && o.touchActive) {
d.indexOfSingleActiveTouch = r;
break
}
}
if (__DEV__) {
var i = n[d.indexOfSingleActiveTouch],
c = null != i && !!i.touchActive;
c || a(0, "Cannot find single active touch")
}
}
},
touchHistory: d
};
o.exports = y
}), __d("accumulate", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
if (null == t && a(0, "accumulate(...): Accumulated items must be not be null or undefined."), null == e) return t;
var n = Array.isArray(e),
r = Array.isArray(t);
return n ? e.concat(t) : r ? [e].concat(t) : [e, t]
}
var a = t("invariant");
o.exports = i
}), __d("RKRawText", [], function(e, t, n, r, o) {
"use strict";
var i = (t("ReactIOSViewAttributes"), t("createReactIOSNativeComponentClass")),
a = i({
validAttributes: {
text: !0
},
uiViewClassName: "RKRawText"
});
o.exports = a
}), __d("ReactIOSViewAttributes", [], function(e, t, n, r, o) {
"use strict";
var i = {};
i.UIView = {
pointerEvents: !0,
accessible: !0,
accessibilityLabel: !0,
testID: !0
}, i.RKView = i.UIView, o.exports = i
}), __d("createReactIOSNativeComponentClass", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactElement"),
a = t("ReactLegacyElement"),
s = t("ReactIOSNativeComponent"),
l = function(e) {
var t = function() {};
return t.displayName = e.uiViewClassName, t.prototype = new s(e), t.prototype.constructor = t, a.wrapFactory(i.createFactory(t))
};
o.exports = l
}), __d("ReactIOSNativeComponent", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeMethodsMixin"),
a = t("ReactComponent"),
s = t("ReactIOSComponentMixin"),
l = t("ReactIOSEventEmitter"),
u = t("ReactIOSStyleAttributes"),
c = t("ReactIOSTagHandles"),
d = t("ReactMultiChild"),
p = t("NativeModulesDeprecated").RKUIManager,
h = t("styleDiffer"),
f = t("deepFreezeAndThrowOnMutationInDev"),
m = t("diffRawProperties"),
g = t("flattenStyle"),
_ = t("warning"),
y = l.registrationNames,
v = l.putListener,
S = l.deleteAllListeners,
w = function(e) {
this.viewConfig = e, this.props = null, this.previousFlattenedStyle = null
},
b = function(e) {
var t = b._cache[e];
if (t) return t;
for (var n = [], r = 0; e > r; r++) n[r] = r;
return b._cache[e] = n
};
b._cache = {}, w.Mixin = {
unmountComponent: function() {
S(this._rootNodeID), a.Mixin.unmountComponent.call(this), this.unmountChildren()
},
initializeChildren: function(e, t, n) {
var r = this.mountChildren(e, n);
if (r.length) {
for (var o = b(r.length), i = [], a = 0; a < r.length; a++) {
var s = r[a],
l = s.tag,
u = s.rootNodeID;
_(s && s.rootNodeID && s.tag, "Mount image returned does not have required data"), c.associateRootNodeIDWithMountedNodeHandle(u, l), i[a] = s.tag
}
p.manageChildren(t, null, null, i, o, null)
}
},
computeUpdatedProperties: function(e, t, n) {
if (__DEV__)
for (var r in t) t.hasOwnProperty(r) && t[r] && n[r] && f(t[r]);
var o = m(null, e, t, n);
if (h(t.style, e.style)) {
var i = g(t.style);
o = m(o, this.previousFlattenedStyle, i, u), this.previousFlattenedStyle = i
}
return o
},
updateComponent: function(e, t) {
a.Mixin.updateComponent.call(this, e, t);
var n = this._currentElement,
r = this.computeUpdatedProperties(t.props, n.props, this.viewConfig.validAttributes);
r && p.updateView(c.mostRecentMountedNodeHandleForRootNodeID(this._rootNodeID), this.viewConfig.uiViewClassName, r), this._reconcileListenersUponUpdate(t.props, n.props), this.updateChildren(this.props.children, e)
},
_registerListenersUponCreation: function(e) {
for (var t in e)
if (y[t] && e[t]) {
var n = e[t];
v(this._rootNodeID, t, n)
}
},
_reconcileListenersUponUpdate: function(e, t) {
for (var n in t) y[n] && t[n] != e[n] && v(this._rootNodeID, n, t[n])
},
mountComponent: function(e, t, n) {
a.Mixin.mountComponent.call(this, e, t, n);
var r = c.allocateTag();
this.previousFlattenedStyle = {};
var o = this.computeUpdatedProperties({}, this.props, this.viewConfig.validAttributes);
return p.createView(r, this.viewConfig.uiViewClassName, o), this._registerListenersUponCreation(this.props), this.initializeChildren(this.props.children, r, t), {
rootNodeID: e,
tag: r
}
}
}, Object.assign(w.prototype, a.Mixin, d.Mixin, w.Mixin, i, s), o.exports = w
}), __d("NativeMethodsMixin", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeModules"),
a = t("NativeModulesDeprecated"),
s = i.RKUIManager,
l = a.RKUIManager,
u = t("TextInputState"),
c = t("flattenStyle"),
d = t("invariant"),
p = t("mergeFast"),
h = function(e, t) {
t || d(0, e + ' must be called with a valid animation ID returned from ReactIOSAnimation.createAnimation, received: "' + t + '"')
},
f = {
addAnimation: function(e, t) {
h("addAnimation", e), l.addAnimation(this.getNodeHandle(), e, t)
},
removeAnimation: function(e) {
h("removeAnimation", e), l.removeAnimation(this.getNodeHandle(), e)
},
measure: function(e) {
l.measure(this.getNodeHandle(), e)
},
measureLayout: function(e, t, n) {
s.measureLayout(this.getNodeHandle(), e, n, t)
},
setNativeProps: function(e) {
var t = !0;
for (var n in e)
if ("style" !== n) {
t = !1;
break
}
var r = c(e.style),
o = null;
o = t ? r : r ? p(e, r) : e, l.updateView(this.getNodeHandle(), this.viewConfig.uiViewClassName, o)
},
focus: function() {
u.focusTextInput(this.getNodeHandle())
},
blur: function() {
u.blurTextInput(this.getNodeHandle())
}
};
o.exports = f
}), __d("TextInputState", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeModulesDeprecated").RKUIManager,
a = {
_currentlyFocusedID: null,
currentlyFocusedField: function() {
return this._currentlyFocusedID
},
focusTextInput: function(e) {
this._currentlyFocusedID != e && null != e && (this._currentlyFocusedID = e, i.becomeFirstResponder(e))
},
blurTextInput: function(e) {
this._currentlyFocusedID == e && null != e && (this._currentlyFocusedID = null, i.resignFirstResponder(e))
}
};
o.exports = a
}), __d("flattenStyle", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return "number" == typeof e ? s.getStyleByID(e) : e
}
function a(e) {
if (!e) return void 0;
if (!Array.isArray(e)) return i(e);
for (var t = {}, n = 0; n < e.length; ++n) {
var r = a(e[n]);
r && l(t, r)
}
return t
}
var s = t("StyleSheetRegistry"),
l = t("mergeIntoFast");
o.exports = a
}), __d("StyleSheetRegistry", [], function(e, t, n, r, o) {
"use strict";
function i() {}
var a = {},
s = 1,
l = {};
i.registerStyle = function(e) {
var t = ++s;
return __DEV__ && Object.freeze(e), a[t] = e, t
}, i.getStyleByID = function(e) {
if (!e) return l;
var t = a[e];
return t ? t : (console.warn("Invalid style with id `" + e + "`. Skipping ..."), l)
}, o.exports = i
}), __d("mergeIntoFast", [], function(e, t, n, r, o) {
"use strict";
var i = function(e, t) {
for (var n in t) e[n] = t[n]
};
o.exports = i
}), __d("mergeFast", [], function(e, t, n, r, o) {
"use strict";
var i = function(e, t) {
var n = {};
for (var r in e) n[r] = e[r];
for (var o in t) n[o] = t[o];
return n
};
o.exports = i
}), __d("ReactIOSEventEmitter", [], function(e, t, n, r, o) {
"use strict";
var i = t("EventPluginHub"),
a = t("ReactEventEmitterMixin"),
s = t("ReactIOSTagHandles"),
l = t("NodeHandle"),
u = t("EventConstants"),
c = t("merge"),
d = t("warning"),
p = u.topLevelTypes,
h = {},
f = function(e, t) {
for (var n = [], r = 0; r < t.length; r++) n.push(e[t[r]]);
return n
},
m = function(e, t) {
for (var n = [], r = 0; r < t.length; r++) {
var o = t[r];
n.push(e[o]), e[o] = null
}
for (var i = 0, a = 0; a < e.length; a++) {
var s = e[a];
null !== s && (e[i++] = s)
}
return e.length = i, n
},
g = c(a, {
registrationNames: i.registrationNameModules,
putListener: i.putListener,
getListener: i.getListener,
deleteListener: i.deleteListener,
deleteAllListeners: i.deleteAllListeners,
_receiveRootNodeIDEvent: function(e, t, n) {
var r = n || h;
g.handleTopLevel(t, e, e, r)
},
receiveEvent: function(e, t, n) {
var r = s.tagToRootNodeID[e];
g._receiveRootNodeIDEvent(r, t, n)
},
receiveTouches: function(e, t, n) {
for (var r = e === p.topTouchEnd || e === p.topTouchCancel ? m(t, n) : f(t, n), o = 0; o < r.length; o++) {
var i = r[o];
i.changedTouches = r, i.touches = t;
var a = i,
u = null,
c = a.target;
null !== c && void 0 !== c && (c < s.tagsStartAt ? __DEV__ && d(!1, "A view is reporting that a touch occured on tag zero.") : u = l.getRootNodeID(c)), g._receiveRootNodeIDEvent(u, e, a)
}
}
});
o.exports = g
}), __d("ReactEventEmitterMixin", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
a.enqueueEvents(e), a.processEventQueue()
}
var a = t("EventPluginHub"),
s = {
handleTopLevel: function(e, t, n, r) {
var o = a.extractEvents(e, t, n, r);
i(o)
}
};
o.exports = s
}), __d("ReactIOSStyleAttributes", [], function(e, t, n, r, o) {
"use strict";
var i = t("TextStylePropTypes"),
a = t("ViewStylePropTypes"),
s = t("deepDiffer"),
l = t("keyMirror"),
u = t("matricesDiffer"),
c = t("merge"),
d = c(l(a), l(i));
d.transformMatrix = {
diff: u
}, d.shadowOffset = {
diff: s
}, o.exports = d
}), __d("TextStylePropTypes", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactPropTypes"),
a = t("ViewStylePropTypes"),
s = t("merge"),
l = s(a, {
fontFamily: i.string,
fontSize: i.number,
fontWeight: i.oneOf(["normal", "bold"]),
lineHeight: i.number,
color: i.string,
containerBackgroundColor: i.string,
textAlign: i.oneOf(["auto", "left", "right", "center", "justify"]),
writingDirection: i.oneOf(["auto", "ltr", "rtl"])
}),
u = Object.keys({
padding: null,
paddingTop: null,
paddingLeft: null,
paddingRight: null,
paddingBottom: null,
paddingVertical: null,
paddingHorizontal: null
});
for (var c in u) delete l[c];
o.exports = l
}), __d("ReactPropTypes", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
function t(t, n, r, o, i) {
if (o = o || b, null != n[r]) return e(n, r, o, i);
var a = S[i];
return t ? new Error("Required " + a + " `" + r + "` was not specified in " + ("`" + o + "`.")) : void 0
}
var n = t.bind(null, !1);
return n.isRequired = t.bind(null, !0), n
}
function a(e) {
function t(t, n, r, o) {
var i = t[n],
a = _(i);
if (a !== e) {
var s = S[o],
l = y(i);
return new Error("Invalid " + s + " `" + n + "` of type `" + l + "` " + ("supplied to `" + r + "`, expected `" + e + "`."))
}
}
return i(t)
}
function s() {
return i(w.thatReturns())
}
function l(e) {
function t(t, n, r, o) {
var i = t[n];
if (!Array.isArray(i)) {
var a = S[o],
s = _(i);
return new Error("Invalid " + a + " `" + n + "` of type " + ("`" + s + "` supplied to `" + r + "`, expected an array."))
}
for (var l = 0; l < i.length; l++) {
var u = e(i, l, r, o);
if (u instanceof Error) return u
}
}
return i(t)
}
function u() {
function e(e, t, n, r) {
if (!v.isValidElement(e[t])) {
var o = S[r];
return new Error("Invalid " + o + " `" + t + "` supplied to " + ("`" + n + "`, expected a React component."))
}
}
return i(e)
}
function c(e) {
function t(t, n, r, o) {
if (!(t[n] instanceof e)) {
var i = S[o],
a = e.name || b;
return new Error("Invalid " + i + " `" + n + "` supplied to " + ("`" + r + "`, expected instance of `" + a + "`."))
}
}
return i(t)
}
function d(e) {
function t(t, n, r, o) {
for (var i = t[n], a = 0; a < e.length; a++)
if (i === e[a]) return;
var s = S[o],
l = JSON.stringify(e);
return new Error("Invalid " + s + " `" + n + "` of value `" + i + "` " + ("supplied to `" + r + "`, expected one of " + l + "."))
}
return i(t)
}
function p(e) {
function t(t, n, r, o) {
var i = t[n],
a = _(i);
if ("object" !== a) {
var s = S[o];
return new Error("Invalid " + s + " `" + n + "` of type " + ("`" + a + "` supplied to `" + r + "`, expected an object."))
}
for (var l in i)
if (i.hasOwnProperty(l)) {
var u = e(i, l, r, o);
if (u instanceof Error) return u
}
}
return i(t)
}
function h(e) {
function t(t, n, r, o) {
for (var i = 0; i < e.length; i++) {
var a = e[i];
if (null == a(t, n, r, o)) return
}
var s = S[o];
return new Error("Invalid " + s + " `" + n + "` supplied to " + ("`" + r + "`."))
}
return i(t)
}
function f() {
function e(e, t, n, r) {
if (!g(e[t])) {
var o = S[r];
return new Error("Invalid " + o + " `" + t + "` supplied to " + ("`" + n + "`, expected a renderable prop."))
}
}
return i(e)
}
function m(e) {
function t(t, n, r, o) {
var i = t[n],
a = _(i);
if ("object" !== a) {
var s = S[o];
return new Error("Invalid " + s + " `" + n + "` of type `" + a + "` " + ("supplied to `" + r + "`, expected `object`."))
}
for (var l in e) {
var u = e[l];
if (u) {
var c = u(i, l, r, o);
if (c) return c
}
}
}
return i(t, "expected `object`")
}
function g(e) {
switch (typeof e) {
case "number":
case "string":
return !0;
case "boolean":
return !e;
case "object":
if (Array.isArray(e)) return e.every(g);
if (v.isValidElement(e)) return !0;
for (var t in e)
if (!g(e[t])) return !1;
return !0;
default:
return !1
}
}
function _(e) {
var t = typeof e;
return Array.isArray(e) ? "array" : e instanceof RegExp ? "object" : t
}
function y(e) {
var t = _(e);
if ("object" === t) {
if (e instanceof Date) return "date";
if (e instanceof RegExp) return "regexp"
}
return t
}
var v = t("ReactElement"),
S = t("ReactPropTypeLocationNames"),
w = t("emptyFunction"),
b = "<<anonymous>>",
R = {
array: a("array"),
bool: a("boolean"),
func: a("function"),
number: a("number"),
object: a("object"),
string: a("string"),
any: s(),
arrayOf: l,
component: u(),
instanceOf: c,
objectOf: p,
oneOf: d,
oneOfType: h,
renderable: f(),
shape: m
};
o.exports = R
}), __d("ViewStylePropTypes", [], function(e, t, n, r, o) {
"use strict";
var i = t("LayoutPropTypes"),
a = t("ReactPropTypes"),
s = t("merge"),
l = s(i, {
backgroundColor: a.string,
borderColor: a.string,
borderTopColor: a.string,
borderRightColor: a.string,
borderBottomColor: a.string,
borderLeftColor: a.string,
borderRadius: a.number,
opacity: a.number,
overflow: a.oneOf(["visible", "hidden"]),
shadowColor: a.string,
shadowOffset: a.shape({
h: a.number,
w: a.number
}),
shadowOpacity: a.number,
shadowRadius: a.number,
transformMatrix: a.arrayOf(a.number)
});
o.exports = l
}), __d("LayoutPropTypes", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactPropTypes"),
a = {
width: i.number,
height: i.number,
top: i.number,
left: i.number,
right: i.number,
bottom: i.number,
margin: i.number,
marginVertical: i.number,
marginHorizontal: i.number,
marginTop: i.number,
marginBottom: i.number,
marginLeft: i.number,
marginRight: i.number,
padding: i.number,
paddingVertical: i.number,
paddingHorizontal: i.number,
paddingTop: i.number,
paddingBottom: i.number,
paddingLeft: i.number,
paddingRight: i.number,
borderWidth: i.number,
borderTopWidth: i.number,
borderRightWidth: i.number,
borderBottomWidth: i.number,
borderLeftWidth: i.number,
position: i.oneOf(["absolute", "relative"]),
flexDirection: i.oneOf(["row", "column"]),
flexWrap: i.oneOf(["wrap", "nowrap"]),
justifyContent: i.oneOf(["flex-start", "flex-end", "center", "space-between", "space-around"]),
alignItems: i.oneOf(["flex-start", "flex-end", "center", "stretch"]),
alignSelf: i.oneOf(["auto", "flex-start", "flex-end", "center", "stretch"]),
flex: i.number
};
o.exports = a
}), __d("deepDiffer", [], function(e, t, n, r, o) {
"use strict";
var i = function(e, t) {
if (e === t) return !1;
if ("function" == typeof e && "function" == typeof t) return !1;
if ("object" != typeof e || null === e) return e !== t;
if ("object" != typeof t || null === t) return !0;
if (e.constructor !== t.constructor) return !0;
for (var n in e)
if (i(e[n], t[n])) return !0;
for (var r in t)
if (void 0 === e[r]) return !0;
return !1
};
o.exports = i
}), __d("matricesDiffer", [], function(e, t, n, r, o) {
"use strict";
var i = function(e, t) {
return e === t ? !1 : !e || !t || e[12] !== t[12] || e[13] !== t[13] || e[14] !== t[14] || e[5] !== t[5] || e[10] !== t[10] || e[1] !== t[1] || e[2] !== t[2] || e[3] !== t[3] || e[4] !== t[4] || e[6] !== t[6] || e[7] !== t[7] || e[8] !== t[8] || e[9] !== t[9] || e[11] !== t[11] || e[15] !== t[15]
};
o.exports = i
}), __d("ReactMultiChild", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
_.push({
parentID: e,
parentNode: null,
type: p.INSERT_MARKUP,
markupIndex: y.push(t) - 1,
textContent: null,
fromIndex: null,
toIndex: n
})
}
function a(e, t, n) {
_.push({
parentID: e,
parentNode: null,
type: p.MOVE_EXISTING,
markupIndex: null,
textContent: null,
fromIndex: t,
toIndex: n
})
}
function s(e, t) {
_.push({
parentID: e,
parentNode: null,
type: p.REMOVE_NODE,
markupIndex: null,
textContent: null,
fromIndex: t,
toIndex: null
})
}
function l(e, t) {
_.push({
parentID: e,
parentNode: null,
type: p.TEXT_CONTENT,
markupIndex: null,
textContent: t,
fromIndex: null,
toIndex: null
})
}
function u() {
_.length && (d.BackendIDOperations.dangerouslyProcessChildrenUpdates(_, y), c())
}
function c() {
_.length = 0, y.length = 0
}
var d = t("ReactComponent"),
p = t("ReactMultiChildUpdateTypes"),
h = t("flattenChildren"),
f = t("instantiateReactComponent"),
m = t("shouldUpdateReactComponent"),
g = 0,
_ = [],
y = [],
v = {
Mixin: {
mountChildren: function(e, t) {
var n = h(e),
r = [],
o = 0;
this._renderedChildren = n;
for (var i in n) {
var a = n[i];
if (n.hasOwnProperty(i)) {
var s = f(a, null);
n[i] = s;
var l = this._rootNodeID + i,
u = s.mountComponent(l, t, this._mountDepth + 1);
s._mountIndex = o, r.push(u), o++
}
}
return r
},
updateTextContent: function(e) {
g++;
var t = !0;
try {
var n = this._renderedChildren;
for (var r in n) n.hasOwnProperty(r) && this._unmountChildByName(n[r], r);
this.setTextContent(e), t = !1
} finally {
g--, g || (t ? c() : u())
}
},
updateChildren: function(e, t) {
g++;
var n = !0;
try {
this._updateChildren(e, t), n = !1
} finally {
g--, g || (n ? c() : u())
}
},
_updateChildren: function(e, t) {
var n = h(e),
r = this._renderedChildren;
if (n || r) {
var o, i = 0,
a = 0;
for (o in n)
if (n.hasOwnProperty(o)) {
var s = r && r[o],
l = s && s._currentElement,
u = n[o];
if (m(l, u)) this.moveChild(s, a, i), i = Math.max(s._mountIndex, i), s.receiveComponent(u, t), s._mountIndex = a;
else {
s && (i = Math.max(s._mountIndex, i), this._unmountChildByName(s, o));
var c = f(u, null);
this._mountChildByNameAtIndex(c, o, a, t)
}
a++
}
for (o in r) !r.hasOwnProperty(o) || n && n[o] || this._unmountChildByName(r[o], o)
}
},
unmountChildren: function() {
var e = this._renderedChildren;
for (var t in e) {
var n = e[t];
n.unmountComponent && n.unmountComponent()
}
this._renderedChildren = null
},
moveChild: function(e, t, n) {
e._mountIndex < n && a(this._rootNodeID, e._mountIndex, t)
},
createChild: function(e, t) {
i(this._rootNodeID, t, e._mountIndex)
},
removeChild: function(e) {
s(this._rootNodeID, e._mountIndex)
},
setTextContent: function(e) {
l(this._rootNodeID, e)
},
_mountChildByNameAtIndex: function(e, t, n, r) {
var o = this._rootNodeID + t,
i = e.mountComponent(o, r, this._mountDepth + 1);
e._mountIndex = n, this.createChild(e, i), this._renderedChildren = this._renderedChildren || {}, this._renderedChildren[t] = e
},
_unmountChildByName: function(e, t) {
this.removeChild(e), e._mountIndex = null, e.unmountComponent(), delete this._renderedChildren[t]
}
}
};
o.exports = v
}), __d("flattenChildren", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
var r = e,
o = !r.hasOwnProperty(n);
if (u(o, "flattenChildren(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.", n), o && null != t) {
var i, a = typeof t;
i = "string" === a ? s(t) : "number" === a ? s("" + t) : t, r[n] = i
}
}
function a(e) {
if (null == e) return e;
var t = {};
return l(e, i, t), t
}
var s = t("ReactTextComponent"),
l = t("traverseAllChildren"),
u = t("warning");
o.exports = a
}), __d("traverseAllChildren", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return m[e]
}
function a(e, t) {
return e && null != e.key ? l(e.key) : t.toString(36)
}
function s(e) {
return ("" + e).replace(g, i)
}
function l(e) {
return "$" + s(e)
}
function u(e, t, n) {
return null == e ? 0 : _(e, "", 0, t, n)
}
var c = t("ReactElement"),
d = t("ReactInstanceHandles"),
p = t("invariant"),
h = d.SEPARATOR,
f = ":",
m = {
"=": "=0",
".": "=1",
":": "=2"
},
g = /[=.:]/g,
_ = function(e, t, n, r, o) {
var i, s, u = 0;
if (Array.isArray(e))
for (var d = 0; d < e.length; d++) {
var m = e[d];
i = t + (t ? f : h) + a(m, d), s = n + u, u += _(m, i, s, r, o)
} else {
var g = typeof e,
y = "" === t,
v = y ? h + a(e, 0) : t;
if (null == e || "boolean" === g) r(o, null, v, n), u = 1;
else if ("string" === g || "number" === g || c.isValidElement(e)) r(o, e, v, n), u = 1;
else if ("object" === g) {
e && 1 === e.nodeType && p(0, "traverseAllChildren(...): Encountered an invalid child; DOM elements are not valid children of React components.");
for (var S in e) e.hasOwnProperty(S) && (i = t + (t ? f : h) + l(S) + f + a(e[S], 0), s = n + u, u += _(e[S], i, s, r, o))
}
}
return u
};
o.exports = u
}), __d("styleDiffer", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
return !a(e, t)
}
function a(e, t) {
if (!e) return !t;
if (!t) return !e;
if (typeof e != typeof t) return !1;
if ("number" == typeof e) return e === t;
if (Array.isArray(e)) {
if (!Array.isArray(t) || e.length !== t.length) return !1;
for (var n = 0; n < e.length; ++n)
if (!a(e[n], t[n])) return !1;
return !0
}
for (var r in e)
if (s(e[r], t[r])) return !1;
for (var r in t)
if (!e.hasOwnProperty(r)) return !1;
return !0
}
var s = t("deepDiffer");
o.exports = i
}), __d("deepFreezeAndThrowOnMutationInDev", [], function(e, t, n, r, o) {
function i(e) {
if (__DEV__) {
if ("object" != typeof e || null === e || Object.isFrozen(e) || Object.isSealed(e)) return;
for (var t in e) e.hasOwnProperty(t) && (e.__defineGetter__(t, s.bind(null, e[t])), e.__defineSetter__(t, a.bind(null, t)), i(e[t]));
Object.freeze(e), Object.seal(e)
}
}
function a(e, t) {
throw Error("You attempted to set the key `" + e + "` with the value `" + JSON.stringify(t) + "` on an object that is meant to be immutable and has been frozen.")
}
function s(e) {
return e
}
o.exports = i
}), __d("diffRawProperties", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n, r) {
var o, i, a, s, l;
for (var u in n) o = r[u], o && (a = t && t[u], i = n[u], a !== i && (s = "object" != typeof i || null === i, l = s || !a || o.diff && o.diff(a, i), l && (e = e || {}, e[u] = i)));
for (var u in t) o = r[u], o && (e && void 0 !== e[u] || (a = t[u], i = n && n[u], a !== i && (void 0 === i && (i = null), s = "object" != typeof i || null === i, l = s && a !== i || o.diff && o.diff(a, i), l && (e = e || {}, e[u] = i))));
return e
}
o.exports = i
}), __d("UniversalWorkerNodeHandle", [], function(e, t, n, r, o) {
var i = t("ReactIOSTagHandles"),
a = t("invariant"),
s = {
getRootNodeID: function(e) {
return (void 0 === e || null === e || 0 === e) && a(0, "No node handle defined"), i.tagToRootNodeID[e]
}
};
o.exports = s
}), __d("RKEventEmitter", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactIOSEventEmitter");
o.exports = i
}), __d("RKLog", [], function(e, t, n, r, o) {
"use strict";
function i() {}
var a = t("invariant");
i.logIfNoNativeHook = function() {
var e = Array.prototype.slice.call(arguments),
t = e.shift(),
n = {
log: !0,
info: !0,
warn: !0,
error: !0
};
return n[t] || a(0, 'Level "' + t + '" not one of ' + Object.keys(n)), "undefined" == typeof nativeLoggingHook && console[t].apply(console, e), !0
}, o.exports = i
}), __d("RKJSTimers", [], function(e, t, n, r, o) {
"use strict";
var i = t("JSTimersExecution"),
a = i;
o.exports = a
}), __d("deprecated", [], function(e, t, n, r, o) {
function i(e, t, n, r, o) {
var i = !1;
if (__DEV__) {
var s = function() {
return a(i, e + "." + t + " will be deprecated in a future version. " + ("Use " + e + "." + n + " instead.")), i = !0, o.apply(r, arguments)
};
return s.displayName = e + "_" + t, s
}
return o
}
var a = t("warning");
o.exports = i
}), __d("RKRenderingPerf", [], function(e, t, n, r, o) {
"use strict";
function i() {}
var a = t("DliteCatalystProfiler"),
s = t("ReactDefaultPerf"),
l = t("ReactPerf");
i.toggle = function() {
l.enableMeasure ? (s.stop(), s.printInclusive(), s.printWasted(), a.print(), a.reset()) : (s.start(), console.log("Render perfomance measurements started"), a.start(), console.log("Dlite perfomance measurements started"))
}, o.exports = i
}), __d("DliteCatalystProfiler", [], function(e, t, n, r, o) {
"use strict";
var i, a, s, l, u, c = t("DliteProfiler"),
d = t("GraphQLStore"),
p = t("GraphQLStoreChangeEmitter"),
h = t("GraphQLStoreQueryResolver"),
f = t("GraphQLStoreReader"),
m = t("ReactGraphQL"),
g = t("SubscriptionsHandler"),
_ = t("invariant"),
y = t("mapObject"),
v = t("performanceNow"),
S = [m.Mixin.getInitialState, m.Mixin.componentWillReceiveProps, m.Mixin._shouldComponentUpdate, m.Mixin.statics.getQueriesForRoute, d.getDiffQueries, d.handleUpdate, p.addListenerForIDs, p.broadcastChangeForID, p._processSubscribers, h.prototype.resolve, f.prototype.retrieveData],
w = ["React.setPropsInternal.onSuccess", "React.setPropsInternal.onSubscription"],
b = {
aggregateTime: 0,
callCount: 0
},
R = new g,
C = !1,
E = !1,
D = {
start: function() {
D.reset(), E = !0, __DEV__ || _(0, "DliteCatalystProfiler (DliteProfiler) requires `__DEV__`."), S.forEach(function(e) {
e && e.attachHandler || _(0, "DliteCatalystProfiler: Attempted to measure an invalid method."), e.attachHandler(D.measure)
}), w.forEach(function(e) {
c.attachAsyncHandler(e, {
onStart: D.startMeasurement.bind(D, e),
onStop: D.stopMeasurement.bind(D, e)
})
}), R.engage(), R.addSubscriptions(m.addListener("beginQueryParamChange", function(e, t) {
return C ? void console.warn("DliteCatalystProfiler: Began `setQueryParams(%o)` on `%s` while profiling. Results may be tainted.", t, e) : void(C = !0)
}), m.addListener("endQueryParamChange", function() {
C = !1
})), c.attachAsyncHandler("fetchRQL.processPending", {
onStart: function() {
l = v()
},
onStop: function() {
u || (u = v() - l, l = 0)
}
})
},
stop: function() {
E = !1, S.forEach(function(e) {
e.detachHandler(D.measure)
}), R.release()
},
measure: function(e, t) {
D.startMeasurement(e), t(), D.stopMeasurement(e)
},
startMeasurement: function(e) {
i[e] = i[e] || Object.assign({}, b), a.unshift(0), s.unshift(v())
},
stopMeasurement: function(e) {
var t = a.shift(),
n = s.shift(),
r = v() - n;
i[e].aggregateTime += r - t, i[e].callCount++, a[0] += r
},
getAggregateTimes: function() {
return y(i, function(e) {
return e.aggregateTime
})
},
reset: function() {
i = {}, a = [0], s = [0], l = 0, u = 0
},
getMeasurements: function() {
return Object.assign({}, i)
},
print: function(e) {
if (E) {
var t = {},
n = 1;
e && (n = e - u, console.info("Overall time: ", e), console.info("Fetch time: ", u), console.info("Estimated Dlite JS time: ", n)), Object.keys(i).sort(function(e, t) {
return i[t].aggregateTime - i[e].aggregateTime
}).forEach(function(r) {
t[r] = i[r], e && (t[r].percentage = Math.round(i[r].aggregateTime / n * 100))
}), console.table ? console.table(t) : console.log(t)
}
}
};
o.exports = D
}), __d("DliteProfiler", [], function(e, t, n, r, o) {
"use strict";
var i = t("emptyFunction"),
a = t("forEachObject"),
s = t("invariant"),
l = {},
u = {},
c = {
stop: i
},
d = {
instrumentMethods: function(e, t) {
a(t, function(t, n) {
e[n] = d.instrument(t, e[n])
})
},
instrument: function(e, t) {
if (__DEV__) {
var n = [],
r = function() {
var r = l,
o = arguments,
i = function() {
r = t.apply(this, o)
}.bind(this);
if (n.forEach(function(t) {
i = t.bind(this, e, i)
}, this), i(), r === l) throw new Error("DliteProfiler: Handler did not invoke original function.");
return r
};
return r.attachHandler = function(e) {
n.push(e)
}, r.detachHandler = function(e) {
var t = n.indexOf(e);
t >= 0 && n.splice(t, 1)
}, r.displayName = "(instrumented " + e + ")", r
}
return t.attachHandler = i, t.detachHandler = i, t
},
instrumentAsync: function(e) {
return __DEV__ ? (u[e] && u[e].onStart(), {
stop: function() {
u[e] && u[e].onStop()
}
}) : c
},
attachAsyncHandler: function(e, t) {
__DEV__ && (u.hasOwnProperty(e) && s(0, "DliteProfiler: Property with name `%s` already exists.", e), u[e] = t)
}
};
o.exports = d
}), __d("forEachObject", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
for (var r in e) a.call(e, r) && t.call(n, e[r], r, e)
}
var a = Object.prototype.hasOwnProperty;
o.exports = i
}), __d("GraphQLStore", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
return new T(B, U, q, H, N, e, E.broadcastChangeForID, t)
}
function a(e) {
var t = N[e.client_mutation_id];
u(t, C.ERROR)
}
function s(e, t, n) {
var r = v.getMutationType(e);
e = e[r], t instanceof _.Mutation || k(0, "must pass a mutation into handleMutationResult");
for (var o = b.getConfigs(r), a = i(n, L()), s = 0; s < o.length; s++) {
var l = o[s];
switch (l.handlerType) {
case w.NODE_DELETE_HANDLER:
a.handleNodeDeleteMutation(e, l.config);
break;
case w.RANGE_ADD_HANDLER:
a.handleRangeAddMutation(e, t, l.config, S.getRangeConfigForType(r));
break;
case w.RANGE_DELETE_HANDLER:
a.handleRangeDeleteMutation(e, l.config);
break;
default:
console.error('"%s" is not mapped to a mutation handler', l.handlerType)
}
}
a.handleMergeMutation(e, t, r)
}
function l(e) {
s(e.getOptimisticPayload(), e.getOptimisticPayloadQuery(), w.OPTIMISTIC_UPDATE)
}
function u(e, t) {
t in C || k(0, '"%s" is not a valid GraphQLStatusConstant.', t);
var n = U[e];
n || k(0, "Invalid dataID %s was passed to `setStatusForID`. Can only set status for queued node.", e), n.__status__ = t, E.broadcastChangeForID(e)
}
function c(e) {
var t = U[e];
t || k(0, "Invalid dataID %s was passed to `clearStatusForID`. Can only set status for queued node.", e), delete t.__status__, E.broadcastChangeForID(e)
}
function d() {
for (var e in U) U.hasOwnProperty(e) && delete U[e]
}
var p = t("ActionCollisionMap"),
h = t("ActionQueue"),
f = t("DiffQueryBuilder"),
m = (t("DliteLog"), t("DliteLogger")),
g = t("DliteProfiler"),
_ = t("GraphQL_EXPERIMENTAL"),
y = t("GraphQLConstants"),
v = t("GraphQLMutationDataHandler"),
S = t("GraphQLMutationProperties"),
w = t("GraphQLMutatorConstants"),
b = t("GraphQLMutatorHub"),
R = t("GraphQLQueryTracker"),
C = t("GraphQLStatusConstants"),
E = t("GraphQLStoreChangeEmitter"),
D = t("GraphQLStoreDataHandler"),
x = t("GraphQLStoreNodeRangeTracker"),
F = t("GraphQLStoreQueryPath"),
I = (t("GraphQLStoreRangeUtils"), t("GraphQLStoreReader")),
T = t("GraphQLStoreWriter"),
P = t("generateClientID"),
L = t("generateForceIndex"),
k = t("invariant"),
M = t("isEmpty"),
A = t("keyMirror"),
Q = t("mapObject"),
O = t("mixInEventEmitter"),
N = {},
G = {},
$ = {},
B = {},
U = {},
V = {},
q = new R,
H = new x,
j = y.NODE,
W = y.NODES,
K = y.VIEWER,
z = y.CUSTOM_ROOTCALLS,
Y = y.IDLESS_ROOTCALLS,
X = {
Events: A({
beginQuery: !0,
dataFromServer: !0,
endQuery: !0
}),
handleOptimisticMutation: function(e) {
h.appendToQueue(e), l(e)
},
handleServerMutation: function(e, t) {
var n = v.getMutationType(e),
r = e[n].client_mutation_id,
o = p.getKeyForClientMutationID(r);
if (o) {
var i = p.shiftActionForKey(o);
i.getClientMutationID() !== r && k(0, "action sent to server must be first in the list for its key");
var a = p.getFirstActionForKey(o);
a && a.rerunServerAction()
}
var u = h.getActionByID(r);
u && (h.removeFromQueue(r), d(), h.iterateOverQueue(l)), s(e, t, w.SERVER_UPDATE)
},
handleMutationError: function(e) {
var t = v.getMutationType(e);
e = e[t];
var n = e.client_mutation_id,
r = p.getKeyForClientMutationID(n);
r && (p.shiftActionForKey(r), p.iterateOverActionsForKey(r, function(e) {
h.removeFromQueue(e.getClientMutationID())
}), p.clearActionsForKey(r), d(), h.iterateOverQueue(l));
var o = b.getConfigs(t);
if (o) {
for (var i = 0; i < o.length; i++) {
var s = o[i];
switch (s.handlerType) {
case w.RANGE_ADD_HANDLER:
a(e, s.config)
}
}
var u = N[n];
G[u] = n
}
},
handleMutationRetry: function(e) {
var t = G[e];
t || k(0, "Can only retry mutations that encountered errors");
var n = h.getActionByID(t);
n || k(0, "Cannot retry a mutation that has not previously been tried"), delete G[e], c(e), n.rerunServerAction()
},
handleUpdate: function(e, t, n, r) {
t = t.getQuery();
var o, a = m.logClientEvent("GraphQLStore.handleUpdate:" + t.getDescription()),
s = t.rootCall().getName();
if (s === K) o = i(n, r), o.storeNodeWithID(t, e.viewer, y.VIEWER_CLIENT_ID, new F(t));
else {
if (!(s === j || s === W || s in z)) throw new Error("Unsupported graphQL root call: use viewer, username, group, node, or nodes");
for (var l in e) {
o = i(n, r);
var u = e[l];
if (null === u) o.deleteNodeWithID(l);
else {
var c = l;
if (s !== W && s !== j) {
var d = t.rootCall().getArgs();
if (1 !== d.length) throw new Error("Custom root calls must request with only one argument");
var p = d[0].getCallValue();
if (V[s] = V[s] || {}, c = V[s][p], !c) {
if (c = s in Y ? P() : u.id, !c) throw new Error("Root calls that has an id field must request for id");
V[s][p] = c
}
}
var h = new F(s === W ? new _.Query("node", [c]) : t);
o.storeNodeWithID(t, u, c, h)
}
}
}
a.stop()
},
buildFragmentQueryForDataID: function(e, t) {
if (D.isClientID(t)) {
var n = B[t] || U[t];
return n.__path__.getQueryForFragment(e)
}
return new F(new _.Query("node", [t])).getQueryForFragment(e)
},
resolveQueryFromStore: function(e) {
var t = X.getIDsFromQuery(e),
n = {};
for (var r in t) {
var o = X.getDeepNodeByID(t[r], e.getQuery());
void 0 !== o && (n[r] = o)
}
return n
},
canResolveQueriesFromStore: function(e) {
for (var t in e)
if (e.hasOwnProperty(t) && e[t] && X.getDiffQueries(e[t]).length) return !1;
return !0
},
getDiffQueries: function(e) {
var t = new f(B, q);
return t.getDiffQueries(e, X.getIDsFromQuery(e))
},
resolvePointersForQuery: function(e) {
return Q(X.getIDsFromQuery(e), D.createPointerWithID)
},
injectCachingConfig: function(e) {
$ = e
},
isValidNodeID: function(e) {
return B.hasOwnProperty(e) || U.hasOwnProperty(e)
},
isQueuedNodeID: function(e) {
return U.hasOwnProperty(e)
},
getDeepNodeFromData: function(e, t, n, r) {
var o = new I(B, U, n);
return o.retrieveData(e, t, void 0, r)
},
getDeepNodeByID: function(e, t, n) {
return X.getDeepNodeFromData(t, D.createPointerWithID(e), n)
},
__debug: {
nodeData: B,
queuedData: U
},
getTrackedQueryByID: function(e) {
return Array.isArray(e) || (e = [e]), q.getQueryForIDs(e)
},
getIDsFromQuery: function(e) {
e = e.getQuery();
var t = {},
n = e.rootCall(),
r = n.getName();
if (r === K) t.viewer = y.VIEWER_CLIENT_ID;
else if (r === j || r === W || r in z)
for (var o = n.getArgs(), i = 0; i < o.length; i++)
if (!(o[i] instanceof _.BatchCallVariable)) {
var a = o[i].getCallValue();
V[r] && V[r][a] && (a = V[r][a]), t[o[i].getCallValue()] = a
}
return M(t) && k(0, "Unsupported graphQL root call: use viewer, username, group, node, or nodes"), t
}
};
g.instrumentMethods(X, {
handleUpdate: "GraphQLStore.handleUpdate",
getDiffQueries: "GraphQLStore.getDiffQueries",
resolveQueryFromStore: "GraphQLStore.resolveQueryFromStore"
}), O(X, X.Events), o.exports = X
}), __d("ActionCollisionMap", [], function(e, t, n, r, o) {
"use strict";
var i = t("invariant"),
a = {},
s = {},
l = {
hasPendingActionForKey: function(e) {
return !(!a[e] || !a[e].length)
},
appendActionForKey: function(e, t) {
var n = t.getClientMutationID();
l.existsInMap(n) && i(0, "Cannot append an action that's already in the map"), s[n] = e;
var r = a[e] || [];
r.push(t), a[e] = r
},
getFirstActionForKey: function(e) {
var t = a[e];
return t && t.length ? t[0] : null
},
shiftActionForKey: function(e) {
var t = a[e];
t && t.length || i(0, "Cannot shift unless there are actions");
var n = t.shift();
return 0 === t.length && delete a[e], delete s[n.getClientMutationID()], n
},
iterateOverActionsForKey: function(e, t) {
var n = a[e] || [];
n.forEach(t)
},
clearActionsForKey: function(e) {
for (var t = a[e] || [], n = 0; n < t.length; n++) delete s[t[n].getClientMutationID()];
delete a[e]
},
getKeyForClientMutationID: function(e) {
return s[e] || null
},
existsInMap: function(e) {
return !!l.getKeyForClientMutationID(e)
}
};
o.exports = l
}), __d("ActionQueue", [], function(e, t, n, r, o) {
"use strict";
var i = t("invariant"),
a = [],
s = {},
l = {
appendToQueue: function(e) {
var t = e.getClientMutationID();
t in s && i(0, "Cannot add an action to the queue that was already added"), a.push(t), s[t] = e
},
removeFromQueue: function(e) {
e in s || i(0, "Cannot remove something not in the queue from the queue"), delete s[e];
var t = a.indexOf(e);
t >= 0 || i(0, "clientMutationID most occur somewhere in the queue"), a.splice(t, 1)
},
iterateOverQueue: function(e) {
for (var t = 0; t < a.length; t++) {
var n = s[a[t]];
e(n)
}
},
getQueueLength: function() {
return a.length
},
getActionByID: function(e) {
return s[e]
}
};
o.exports = l
}), __d("DiffQueryBuilder", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
this.$DiffQueryBuilder_store = e, this.$DiffQueryBuilder_queryTracker = t, this.$DiffQueryBuilder_rootFragments = null
}
var a = t("GraphQL_EXPERIMENTAL"),
s = t("GraphQLConstants"),
l = t("GraphQLRangeTracker"),
u = t("GraphQLStoreDataHandler"),
c = t("GraphQLStoreRangeUtils"),
d = [],
p = new a.QueryFragment("DiffQueryFragment", "UnknownConnection", [new a.Field("edges", [new a.Field("node", [new a.Field("id")])])]);
i.prototype.getDiffQueries = function(e, t) {
var n = e.getQuery(),
r = n.rootCall().getName(),
o = [];
for (var i in t) {
var s = t[i],
l = this.$DiffQueryBuilder_diffNode(n, s),
u = l.nodes;
null === u && (u = [n]);
for (var c = 0; c < u.length; c++) {
var d = u[c].getFragments(),
p = u[c].getOwnFields(),
h = null;
h = 1 === d.length && 0 === p.length ? d[0].getName() : u[c].getQueryName(), h = "diff_" + h, o.push(new a.QueryWithValues(new a.Query(r, "viewer" === r ? null : [i], p, d, null, h)))
}
}
if (this.$DiffQueryBuilder_rootFragments)
for (var f in this.$DiffQueryBuilder_rootFragments) o.push(new a.QueryWithValues(new a.Query("node", [f], null, this.$DiffQueryBuilder_rootFragments[f])));
return this.$DiffQueryBuilder_rootFragments = null, o
}, i.prototype.$DiffQueryBuilder_diffNode = function(e, t, n) {
var r = null,
o = null,
i = !1,
c = null,
h = null,
f = null,
m = null,
g = null,
_ = e.getOwnFields(),
y = e.getFragments(),
v = this.$DiffQueryBuilder_store[t];
if (!v) return {
nodes: null === v ? [] : [e],
trackedField: f
};
for (var S = this.$DiffQueryBuilder_getRangeInfo(e, v), w = S.diffCalls, b = S.filterCalls, R = S.requestedEdges, C = 0; C < _.length; C++) {
var E = null,
D = null,
x = _[C],
F = x.getFieldName();
if ("node" === F && n) E = d;
else if ("edges" === F) {
if (R) {
for (var I, T, P = x.getOwnField("node"), L = R.length > l.THRESHOLD, k = 0; k < R.length; k++) {
var M = R[k],
A = M.__dataID__;
if (!l.hasEdge(x, A)) {
var Q = M.node.__dataID__;
if (!u.isClientID(Q)) {
if (e.isFindable()) {
var O = this.$DiffQueryBuilder_diffNode(x, A, !0),
N = O.nodes,
G = O.trackedField;
N || (N = [x]), N.length && (r = r || [], r.push(e.shallowClone(N, [p], b.concat(new a.Call("find", Q))))), G && (T = T || [], T.push(new a.QueryFragment("DiffQueryBuilderTrackedQuery", "UnknownConnectionEdge", G.getOwnFields(), G.getFragments())))
}
var $ = this.$DiffQueryBuilder_getFragmentForNewQuery(P, Q);
$ && (I = I || [], I.push($)), L && l.trackEdge(x, A, t)
}
}
}(I || T) && (D = x.shallowClone(I ? [P.shallowClone(null, I)] : null, T))
}
E = w ? null : d
} else if ("page_info" === F) E = w ? null : d;
else {
var B = this.$DiffQueryBuilder_diffField(x, v);
E = B.fields, D = B.trackedField
}
"id" === F && (i = !!E, o = x, E = null), (c || E) && (c = c || _.slice(0, C), null === E ? c.push(x) : E.length > 0 && c.push.apply(c, E)), D && (m = m || [], m.push(D))
}
for (var U = 0; U < y.length; U++) {
var V = y[U],
q = this.$DiffQueryBuilder_diffNode(V, t),
H = q.nodes,
j = q.trackedField;
(h || H) && (h = h || y.slice(0, U), null === H ? h.push(V) : H.length > 0 && h.push.apply(h, H)), j && (g = g || [], g.push(j))
}
return c = c || _, h = h || y, 0 === h.length && (0 === c.length || i && 1 === c.length && c[0] === o) ? r = r || [] : c === _ && h === y ? w ? (r = r || [], r.push(e.shallowClone(_, y, w))) : r && r.push(e) : (r = r || [], r.push(w ? e.shallowClone(c, h, w) : e.shallowClone(c, h))), (m || g) && (f = e.shallowClone(m, g), e instanceof a.QueryFragment || t !== s.VIEWER_CLIENT_ID && u.isClientID(t) || this.$DiffQueryBuilder_queryTracker.addQueryForID(t, f)), {
nodes: r,
trackedField: f
}
}, i.prototype.$DiffQueryBuilder_diffField = function(e, t) {
var n, r, o = c.getStorageKeyForField(e, {}),
i = t[o];
if (void 0 === i) n = null;
else if (e.isPlural())
if (null === i || 0 === i.length) n = d;
else if (e.hasFields())
if ("node" === e.getInferredRootCallName()) n = d, r = this.$DiffQueryBuilder_getFragmentsForNewQuery(e, i);
else {
var a = i[0].__dataID__;
if (a && a in this.$DiffQueryBuilder_store) {
var s = this.$DiffQueryBuilder_diffNode(e, a);
n = s.nodes, r = s.trackedField
}
} else n = d;
else if (null !== i && e.hasFields()) {
var l = this.$DiffQueryBuilder_diffNode(e, i.__dataID__);
n = l.nodes, r = l.trackedField
} else n = d;
return {
fields: n,
trackedField: r
}
}, i.prototype.$DiffQueryBuilder_getFragmentsForNewQuery = function(e, t) {
for (var n = null, r = 0; r < t.length; r++) {
var o = t[r].__dataID__,
i = this.$DiffQueryBuilder_getFragmentForNewQuery(e, o);
i && (n = n || [], n.push(i))
}
return n ? e.shallowClone(null, n) : null
}, i.prototype.$DiffQueryBuilder_getFragmentForNewQuery = function(e, t) {
var n = this.$DiffQueryBuilder_diffNode(e, t),
r = n.nodes,
o = n.trackedField;
null === r && (r = [e]);
for (var i, s = 0; s < r.length; s++) i = new a.QueryFragment("DiffQueryBuilder", "Node", r[s].getOwnFields(), r[s].getFragments()), this.$DiffQueryBuilder_rootFragments = this.$DiffQueryBuilder_rootFragments || {}, this.$DiffQueryBuilder_rootFragments[t] = this.$DiffQueryBuilder_rootFragments[t] || [], this.$DiffQueryBuilder_rootFragments[t].push(i);
if (o || i) {
var l;
return l = o && i ? o.getFragments().concat(i) : o ? o.getFragments() : [i], new a.QueryFragment("DiffQueryBuilderTrackedQuery", "Node", o ? o.getOwnFields() : null, l)
}
return null
}, i.prototype.$DiffQueryBuilder_getRangeInfo = function(e, t) {
var n, r, o;
if (c.isRangeNode(e)) {
var i = e.getCalls();
if (t.__range__) {
var a = t.__range__.retrieveRangeInfoForQuery(i, {});
o = t.__filterCalls__ || [], a.diffCalls && a.diffCalls.length && (n = o.concat(a.diffCalls)), r = a.requestedEdges
} else i && i.length && (n = i)
}
return {
diffCalls: n,
filterCalls: o,
requestedEdges: r
}
}, o.exports = i
}), __d("GraphQL_EXPERIMENTAL", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
if (this.$GraphQLNode_fields = e || k, this.$GraphQLNode_fieldMap = L, this.$GraphQLNode_fragments = t && t.length > 0 ? t.filter(v) : k, this.$GraphQLNode_hasNestedVariables = !1, this.$GraphQLNode_numNestedFragmentsWithVariables = 0, e && e.length > 0) {
this.$GraphQLNode_fieldMap = {};
for (var n = 0; n < e.length; n++) {
var r = e[n],
o = r.getGeneratedAlias();
void 0 !== this.$GraphQLNode_fieldMap[o] && T(0, 'Field "%s" is already in fields with the same calls.', r.getFieldName()), this.$GraphQLNode_fieldMap[o] = r, (r.hasVariables() || r.$GraphQLNode_hasNestedVariables) && (this.$GraphQLNode_hasNestedVariables = !0), this.$GraphQLNode_numNestedFragmentsWithVariables += r.$GraphQLNode_numNestedFragmentsWithVariables
}
}
for (var i = 0; i < this.$GraphQLNode_fragments.length; i++)(this.$GraphQLNode_fragments[i].$GraphQLNode_hasNestedVariables || this.$GraphQLNode_fragments[i].$GraphQLNode_numNestedFragmentsWithVariables) && (this.$GraphQLNode_numNestedFragmentsWithVariables += 1)
}
function a(e, t, n) {
this.$GraphQLCallvNode_name = e, this.$GraphQLCallvNode_metadata = n || L, this.isVarArgs() && t && 1 === t.length && Array.isArray(t[0]) && (t = t[0]), this.$GraphQLCallvNode_args = t ? t.map(S) : k
}
function s(e) {
for (var t = [], n = 1, r = arguments.length; r > n; n++) t.push(arguments[n]);
a.call(this, e, t)
}
function l(e) {
this.$GraphQLCallValue_callValue = e + ""
}
function u(e, t) {
this.$GraphQLBatchCallVariable_sourceQueryID = e, this.$GraphQLBatchCallVariable_jsonPath = t
}
function c(e) {
this.$GraphQLCallVariable_callVariableName = e
}
function d(e, t, n, r, o, a, s) {
i.call(this, t, n), A.test(e) || T(0, '"%s" is not a valid field name', e), Q.test(o) || T(0, '"%s" is not a valid alias name', o), this.$GraphQLFieldNode_fieldName = e, this.$GraphQLFieldNode_calls = r || k, this.$GraphQLFieldNode_alias = o || null, this.$GraphQLFieldNode_condition = a || null, this.$GraphQLFieldNode_metadata = s || L, this.$GraphQLFieldNode_generatedAlias = null, this.$GraphQLFieldNode_generatedFieldName = null, this.$GraphQLFieldNode_hasVariables = this.$GraphQLFieldNode_calls.some(R)
}
function p(e, t, n, r, o) {
i.call(this, n, r), this.$GraphQLQueryFragment_name = e, this.$GraphQLQueryFragment_type = t, this.$GraphQLQueryFragment_metadata = o || L, this.$GraphQLQueryFragment_isDeferred = null, this.$GraphQLQueryFragment_deferredCopy = null
}
function h(e, t, n, r, o, s) {
i.call(this, n, r), this.$GraphQLQuery_rootCall = e, this.$GraphQLQuery_metadata = o || L;
var l = this.$GraphQLQuery_metadata.varargs ? {
varargs: this.$GraphQLQuery_metadata.varargs
} : null;
this.$GraphQLQuery_rootNode = new a(e, t, l), this.$GraphQLQuery_queryName = s, this.$GraphQLQuery_allFragmentNames = null, this.$GraphQLQuery_deferredFragmentNames = null, this.$GraphQLQuery_description = null
}
function f(e, t) {
this.$GraphQLQueryWithValues_query = e, this.$GraphQLQueryWithValues_values = t
}
function m(e, t, n, r, o) {
i.call(this, r, o), this.$GraphQLMutation_name = e, this.$GraphQLMutation_responseType = t, this.$GraphQLMutation_mutationCall = n
}
function g(e) {
var t = "";
return e.getCondition() && (t += e.getCondition() + "?"), t += e.getFieldName(), 0 !== e.getCalls().length && (t += "." + e.getCalls().join("."), t += " as " + e.getGeneratedAlias()), t
}
function _(e) {
var t = y(e);
if (0 === t.length) return "";
for (var n = [], r = 0; r < t.length; r++) {
var o = t[r];
n.push(Array.isArray(o) ? g(o[0]) + _(o) : o.toString())
}
return "{" + n.join(",") + "}"
}
function y(e) {
for (var t = null, n = 0; e.length > 0;) {
n++ < 1e4 || T(0, "Endless loop!");
for (var r = e.shift(), o = r.getFragments(), i = 0; i < o.length; i++) e.push(o[i]);
for (var a = r.getOwnFields(), s = 0; s < a.length; s++) {
var l = a[s],
u = l.getGeneratedAlias();
t = t || {}, t.hasOwnProperty(u) ? (Array.isArray(t[u]) || (t[u] = [t[u]]), t[u].push(l)) : t[u] = l
}
}
if (!t) return k;
for (var c = [], d = Object.keys(t).sort(), p = 0; p < d.length; p++) c.push(t[d[p]]);
return c
}
function v(e) {
return !!e
}
function S(e) {
var t = typeof e;
if (null === e ? e = new c("__null__") : ("string" === t || "number" === t || "boolean" === t) && (e = new l(e + "")), !(e instanceof l || e instanceof c || e instanceof u)) throw new TypeError("Unable to cast argument to GraphQL.Callv, got " + Object.prototype.toString.call(e));
return e
}
function w(e) {
for (var t = -1, n = e.length - 1; n >= 0; n--)
if (null !== e[n]) {
t = n;
break
}
return e.length = t + 1, e
}
function b(e) {
var t = e[0];
switch (t) {
case N.CALL_VALUE:
return l.fromJSON(e);
case N.CALL_VARIABLE:
return c.fromJSON(e);
case N.BATCH_VARIABLE:
return u.fromJSON(e);
default:
throw new Error("Unknown type")
}
}
function R(e) {
return e.getArgs().some(x)
}
function C(e) {
return e instanceof u
}
function E(e) {
return e.getRefParam()
}
function D(e) {
return e.getSourceQueryID()
}
function x(e) {
return e instanceof c
}
function F(e) {
return e.replace(/[)(}{><,.\\]/g, "\\$&")
}
var I = t("generateRQLFieldAlias"),
T = t("invariant"),
P = t("isEmpty"),
L = {},
k = [],
M = "skip",
A = /^[a-z_][a-z0-9_:\-]*$/,
Q = /^[\w-]+$/,
O = "ref_";
__DEV__ && (Object.freeze(L), Object.freeze(k));
var N = {
QUERY: 1,
FRAGMENT: 2,
FIELD: 3,
CALL: 4,
CALL_VALUE: 5,
CALL_VARIABLE: 6,
BATCH_VARIABLE: 7,
MUTATION: 8,
QUERY_WITH_VALUES: 9
},
G = 0;
i.prototype.getOwnFields = function() {
return this.$GraphQLNode_fields
}, i.prototype.getUnaliasedFields = function(e) {
return this.$GraphQLNode_collectFields(this.getOwnUnaliasedFields, e)
}, i.prototype.$GraphQLNode_collectFields = function(e, t, n) {
n || (n = []);
for (var r = e.call(this, t), o = 0; o < r.length; o++) n.push(r[o]);
for (var i = this.getFragments(), a = 0; a < i.length; a++) i[a].$GraphQLNode_collectFields(e, t, n);
return n
}, i.prototype.getOwnField = function(e) {
return this.$GraphQLNode_fieldMap[e] || null
}, i.prototype.hasFields = function() {
return this.$GraphQLNode_someFields(this.hasOwnFields, this.hasFields)
}, i.prototype.hasOwnFields = function() {
for (var e in this.$GraphQLNode_fieldMap) return !0;
return !1
}, i.prototype.hasOwnField = function(e) {
return this.$GraphQLNode_fieldMap.hasOwnProperty(e)
}, i.prototype.hasUnaliasedField = function(e) {
return this.$GraphQLNode_someFields(this.hasOwnUnaliasedField, this.hasUnaliasedField, e)
}, i.prototype.getOwnUnaliasedFields = function(e) {
for (var t = this.$GraphQLNode_fields, n = [], r = 0; r < t.length; r++) t[r].getFieldName() === e && n.push(t[r]);
return n
}, i.prototype.hasOwnUnaliasedField = function(e) {
return this.getOwnUnaliasedFields(e).length > 0
}, i.prototype.getFragments = function() {
return this.$GraphQLNode_fragments
}, i.prototype.hasNestedVariables = function() {
return this.$GraphQLNode_hasNestedVariables
}, i.prototype.getNumNestedFragmentsWithVariables = function() {
return this.$GraphQLNode_numNestedFragmentsWithVariables
}, i.prototype.equals = function(e) {
if (!e || this.$GraphQLNode_fields.length !== e.$GraphQLNode_fields.length || this.$GraphQLNode_fragments.length !== e.$GraphQLNode_fragments.length) return !1;
if (this !== e) {
for (var t = 0; t < this.$GraphQLNode_fields.length; t++)
if (!this.$GraphQLNode_fields[t].equals(e.$GraphQLNode_fields[t])) return !1;
for (var n = 0; n < this.$GraphQLNode_fragments.length; n++)
if (!this.$GraphQLNode_fragments[n].equals(e.$GraphQLNode_fragments[n])) return !1
}
return !0
}, i.prototype.$GraphQLNode_someFields = function(e, t, n) {
if (e.call(this, n)) return !0;
for (var r = 0; r < this.$GraphQLNode_fragments.length; r++)
if (t.call(this.$GraphQLNode_fragments[r], n)) return !0;
return !1
}, a.prototype.getName = function() {
return this.$GraphQLCallvNode_name
}, a.prototype.getArgs = function() {
return this.$GraphQLCallvNode_args
}, a.prototype.hasRefParam = function() {
return !P(this.getRefParams())
}, a.prototype.getRefParams = function() {
if (!this.$GraphQLCallvNode_refParams) {
var e = this.$GraphQLCallvNode_args.filter(C).map(E);
e.length <= 1 || T(0, "GraphQLQuery may have at most one BatchCallVariable root argument"), this.$GraphQLCallvNode_refParams = e.length ? e[0] : null
}
return this.$GraphQLCallvNode_refParams
}, a.prototype.getRefTarget = function() {
var e = this.getRefParams();
if (e) {
var t = Object.keys(e);
if (t.length) return e[t[0]].target
}
return null
}, a.prototype.getSourceQueryID = function() {
var e = this.$GraphQLCallvNode_args.filter(C).map(D);
return e.length < 2 || T(0, "GraphQLCallvNode.getSourceQueryID a query can only have one source query"), e.length ? e[0] : null
}, a.prototype.isVarArgs = function() {
return !!this.$GraphQLCallvNode_metadata.varargs
}, a.prototype.toString = function(e) {
var t = this.$GraphQLCallvNode_args.map(function(t) {
return t.toString(e)
});
return this.$GraphQLCallvNode_name + "(" + t.join(",") + ")"
}, a.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1],
o = t[2],
i = t[3];
return n !== N.CALL && T(0, "Expected call descriptor"), new a(r, o ? o.map(b) : null, i)
}, a.prototype.toJSON = function() {
return w([N.CALL, this.getName(), this.$GraphQLCallvNode_args.length ? this.$GraphQLCallvNode_args : null, this.$GraphQLCallvNode_metadata === L ? null : this.$GraphQLCallvNode_metadata])
}, a.prototype.equals = function(e) {
var t = this.getArgs(),
n = e.getArgs();
if (this.getName() !== e.getName() || t.length !== n.length) return !1;
for (var r = 0; r < t.length; r++)
if (!t[r].equals(n[r])) return !1;
return !0
};
for (var $ in a) a.hasOwnProperty($) && (s[$] = a[$]);
var B = null === a ? null : a.prototype;
s.prototype = Object.create(B), s.prototype.constructor = s, s.__superConstructor__ = a, l.prototype.getCallValue = function() {
return this.$GraphQLCallValue_callValue
}, l.prototype.equals = function(e) {
return e instanceof l && e.getCallValue() === this.getCallValue()
}, l.prototype.toString = function() {
return F(this.$GraphQLCallValue_callValue)
}, l.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1];
return n !== N.CALL_VALUE && T(0, "Expected value descriptor"), new l(r)
}, l.prototype.toJSON = function() {
return [N.CALL_VALUE, this.$GraphQLCallValue_callValue]
}, u.prototype.getSourceQueryID = function() {
return this.$GraphQLBatchCallVariable_sourceQueryID
}, u.prototype.getRefParam = function() {
if (!this.$GraphQLBatchCallVariable_refParam) {
var e = {};
e[O + this.$GraphQLBatchCallVariable_sourceQueryID] = {
query: this.$GraphQLBatchCallVariable_sourceQueryID,
target: this.$GraphQLBatchCallVariable_jsonPath,
fallback: M
}, this.$GraphQLBatchCallVariable_refParam = e
}
return this.$GraphQLBatchCallVariable_refParam
}, u.prototype.getJSONPath = function() {
return this.$GraphQLBatchCallVariable_jsonPath
}, u.prototype.equals = function(e) {
return e instanceof u && e.getSourceQueryID() == this.getSourceQueryID() && e.getJSONPath() == this.getJSONPath()
}, u.prototype.toString = function() {
return "<" + O + this.$GraphQLBatchCallVariable_sourceQueryID + ">"
}, u.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1],
o = t[2];
return n !== N.BATCH_VARIABLE && T(0, "Expected batch variable descriptor"), new u(r, o)
}, u.prototype.toJSON = function() {
return [N.BATCH_VARIABLE, this.$GraphQLBatchCallVariable_sourceQueryID, this.$GraphQLBatchCallVariable_jsonPath]
}, c.prototype.getCallVariableName = function() {
return this.$GraphQLCallVariable_callVariableName
}, c.prototype.equals = function(e) {
return e instanceof c && e.getCallVariableName() == this.getCallVariableName()
}, c.prototype.toString = function(e) {
var t = this.$GraphQLCallVariable_callVariableName;
return e && t in e ? F(e[t]) : "<" + t + ">"
}, c.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1];
return n !== N.CALL_VARIABLE && T(0, "Expected variable descriptor"), new c(r)
}, c.prototype.toJSON = function() {
return [N.CALL_VARIABLE, this.$GraphQLCallVariable_callVariableName]
};
for (var U in i) i.hasOwnProperty(U) && (d[U] = i[U]);
var V = null === i ? null : i.prototype;
d.prototype = Object.create(V), d.prototype.constructor = d, d.__superConstructor__ = i, d.prototype.getFieldName = function() {
return this.$GraphQLFieldNode_fieldName
}, d.prototype.getAlias = function() {
return this.$GraphQLFieldNode_alias
}, d.prototype.getNameForClient = function() {
return this.$GraphQLFieldNode_alias || this.$GraphQLFieldNode_fieldName
}, d.prototype.getCalls = function() {
return this.$GraphQLFieldNode_calls
}, d.prototype.getCall = function(e) {
for (var t = 0; t < this.$GraphQLFieldNode_calls.length; t++)
if (this.$GraphQLFieldNode_calls[t].getName() === e) return this.$GraphQLFieldNode_calls[t]
}, d.prototype.getCondition = function() {
return this.$GraphQLFieldNode_condition
}, d.prototype.getInferredRootCallName = function() {
return this.$GraphQLFieldNode_metadata.rootCall || null
}, d.prototype.getInferredPrimaryKey = function() {
return this.$GraphQLFieldNode_metadata.pk || null
}, d.prototype.getEdgesID = function() {
return this.$GraphQLFieldNode_metadata.edgesID
}, d.prototype.isPlural = function() {
return !!this.$GraphQLFieldNode_metadata.plural
}, d.prototype.isConnection = function() {
return !!this.$GraphQLFieldNode_metadata.connection
}, d.prototype.isFindable = function() {
return this.isConnection() && !this.$GraphQLFieldNode_metadata.nonFindable
}, d.prototype.isLimitable = function() {
return this.isConnection() && !this.$GraphQLFieldNode_metadata.nonLimitable
}, d.prototype.isGenerated = function() {
return !!this.$GraphQLFieldNode_metadata.generated
}, d.prototype.hasVariables = function() {
return this.$GraphQLFieldNode_hasVariables
}, d.prototype.shallowClone = function(e, t, n) {
return new d(this.$GraphQLFieldNode_fieldName, e, t, n || this.getCalls(), this.$GraphQLFieldNode_alias, this.$GraphQLFieldNode_condition, this.$GraphQLFieldNode_metadata)
}, d.prototype.getGeneratedAlias = function() {
return this.$GraphQLFieldNode_generatedAlias || (this.$GraphQLFieldNode_generatedAlias = I(this.getGeneratedFieldName())), this.$GraphQLFieldNode_generatedAlias
}, d.prototype.getGeneratedFieldName = function() {
if (!this.$GraphQLFieldNode_generatedFieldName) {
var e = this.getFieldName();
0 !== this.$GraphQLFieldNode_calls.length && (e += "." + this.$GraphQLFieldNode_calls.join(".")), this.$GraphQLFieldNode_generatedFieldName = e
}
return this.$GraphQLFieldNode_generatedFieldName
}, d.prototype.equals = function(e) {
if (!e || this.$GraphQLFieldNode_fieldName !== e.$GraphQLFieldNode_fieldName || this.$GraphQLFieldNode_alias !== e.$GraphQLFieldNode_alias) return !1;
var t = e.getCalls();
if (this.$GraphQLFieldNode_calls.length !== t.length) return !1;
for (var n = 0; n < this.$GraphQLFieldNode_calls.length; n++)
if (!this.$GraphQLFieldNode_calls[n].equals(t[n])) return !1;
return V.equals.call(this, e)
}, d.prototype.toString = function() {
return g(this) + _([this])
}, d.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1],
o = t[2],
i = t[3],
s = t[4],
l = t[5],
u = t[6],
c = t[7];
return n !== N.FIELD && T(0, "Expected field descriptor"), new d(r, o ? o.map(d.fromJSON) : null, i ? i.map(p.fromJSON) : null, s ? s.map(a.fromJSON) : null, l, u, c)
}, d.prototype.toJSON = function() {
var e = this.getFragments();
return w([N.FIELD, this.getFieldName(), this.hasOwnFields() ? this.getOwnFields() : null, e.length ? e : null, this.$GraphQLFieldNode_calls.length ? this.$GraphQLFieldNode_calls : null, this.getAlias(), this.$GraphQLFieldNode_condition, this.$GraphQLFieldNode_metadata === L ? null : this.$GraphQLFieldNode_metadata])
};
for (U in i) i.hasOwnProperty(U) && (p[U] = i[U]);
p.prototype = Object.create(V), p.prototype.constructor = p, p.__superConstructor__ = i, p.prototype.getName = function() {
return this.$GraphQLQueryFragment_name
}, p.prototype.type = function() {
return this.$GraphQLQueryFragment_type
}, p.prototype.getScope = function() {
return this.$GraphQLQueryFragment_metadata.scope || null
}, p.prototype.isDeferred = function() {
return !!this.$GraphQLQueryFragment_isDeferred
}, p.prototype.getDeferredFragmentNames = function() {
function e(n) {
n.isDeferred() && (t[n.getName()] = n.getName());
for (var r = n.getFragments(), o = 0; o < r.length; o++) e(r[o])
}
var t = {};
return e(this), t
}, p.prototype.isPlural = function() {
return !!this.$GraphQLQueryFragment_metadata.isPlural
}, p.prototype.defer = function() {
return this.$GraphQLQueryFragment_deferredCopy || (this.$GraphQLQueryFragment_deferredCopy = this.shallowClone(this.getOwnFields(), this.getFragments()), this.$GraphQLQueryFragment_deferredCopy.$GraphQLQueryFragment_isDeferred = !0), this.$GraphQLQueryFragment_deferredCopy
}, p.prototype.shallowClone = function(e, t) {
var n = new p(this.getName(), this.type(), e, t, this.$GraphQLQueryFragment_metadata);
return this.isDeferred() && (n.$GraphQLQueryFragment_isDeferred = !0), n
}, p.prototype.toString = function() {
return "QueryFragment " + this.getName() + " : " + this.type() + " " + _([this])
}, p.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1],
o = t[2],
i = t[3],
a = t[4],
s = t[5];
n !== N.FRAGMENT && T(0, "Expected fragment descriptor");
var l = new p(r, o, a ? a.map(d.fromJSON) : null, s ? s.map(p.fromJSON) : null);
return i && (l.$GraphQLQueryFragment_isDeferred = !0), l
}, p.prototype.toJSON = function() {
var e = this.getFragments();
return w([N.FRAGMENT, this.getName(), this.type(), this.isDeferred() ? 1 : 0, this.hasOwnFields() ? this.getOwnFields() : null, e.length ? e : null])
};
for (U in i) i.hasOwnProperty(U) && (h[U] = i[U]);
h.prototype = Object.create(V), h.prototype.constructor = h, h.__superConstructor__ = i, h.prototype.getID = function() {
return this.$GraphQLQuery_id || (this.$GraphQLQuery_id = "q" + G++), this.$GraphQLQuery_id
}, h.prototype.getQueryName = function() {
return this.$GraphQLQuery_queryName
}, h.prototype.getDescription = function() {
if (!this.$GraphQLQuery_description) {
var e = this.getID(),
t = this.getAllFragmentNames(!0);
t && (e = e + ":" + Object.keys(t).join(":")), this.$GraphQLQuery_description = e
}
return this.$GraphQLQuery_description
}, h.prototype.rootCall = function() {
return this.$GraphQLQuery_rootNode
}, h.prototype.getAllFragmentNames = function() {
return this.$GraphQLQuery_allFragmentNames || (this.$GraphQLQuery_allFragmentNames = this.$GraphQLQuery_getFragmentNames(!0)), this.$GraphQLQuery_allFragmentNames
}, h.prototype.getDeferredFragmentNames = function() {
return this.$GraphQLQuery_deferredFragmentNames || (this.$GraphQLQuery_deferredFragmentNames = this.$GraphQLQuery_getFragmentNames(!1)), this.$GraphQLQuery_deferredFragmentNames
}, h.prototype.isDeferred = function() {
return !!this.$GraphQLQuery_metadata.isDeferred
}, h.prototype.$GraphQLQuery_getFragmentNames = function(e) {
function t(r) {
var o;
r instanceof p && (e || r.isDeferred()) && (n = n || {}, o = r.getName(), n[o] = o);
for (var i = r.getOwnFields(), a = 0; a < i.length; a++) t(i[a]);
for (var s = r.getFragments(), l = 0; l < s.length; l++) t(s[l])
}
var n = null;
return t(this), n
}, h.prototype.shallowClone = function(e, t, n, r) {
var o = this.rootCall();
return new h(o.getName(), o.getArgs(), e, t, n ? Object.assign({}, this.$GraphQLQuery_metadata, n) : this.$GraphQLQuery_metadata, r || this.$GraphQLQuery_queryName)
}, h.prototype.shallowCloneWithSameID = function(e, t) {
var n = this.shallowClone(e, t);
return n.$GraphQLQuery_id = this.getID(), n
}, h.prototype.toString = function() {
return this.$GraphQLQuery_queryName ? "Query " + this.$GraphQLQuery_queryName + " {" + this.toStringWithoutName() + "}" : this.toStringWithoutName()
}, h.prototype.toStringWithoutName = function() {
return this.$GraphQLQuery_rootNode.toString() + _([this])
}, h.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1],
o = t[2],
i = t[3],
a = t[4],
s = t[5],
l = t[6];
return n !== N.QUERY && T(0, "Expected query descriptor"), new h(r, o ? o.map(b) : null, i ? i.map(d.fromJSON) : null, a ? a.map(p.fromJSON) : null, s, l)
}, h.prototype.toJSON = function() {
var e = this.rootCall(),
t = e.getArgs(),
n = this.getFragments();
return w([N.QUERY, e.getName(), t.length ? t : null, this.hasOwnFields() ? this.getOwnFields() : null, n.length ? n : null, this.$GraphQLQuery_metadata !== L ? this.$GraphQLQuery_metadata : null, this.$GraphQLQuery_queryName ? this.$GraphQLQuery_queryName : null])
}, f.prototype.getQuery = function() {
return this.$GraphQLQueryWithValues_query
}, f.prototype.getValues = function() {
return this.$GraphQLQueryWithValues_values
}, f.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1],
o = t[2];
return n !== N.QUERY_WITH_VALUES && T(0, "Expected query descriptor"), new f(h.fromJSON(r), o)
}, f.prototype.toJSON = function() {
return w([N.QUERY_WITH_VALUES, this.getQuery(), this.getValues()])
};
for (U in i) i.hasOwnProperty(U) && (m[U] = i[U]);
m.prototype = Object.create(V), m.prototype.constructor = m, m.__superConstructor__ = i, m.prototype.getName = function() {
return this.$GraphQLMutation_name
}, m.prototype.getResponseType = function() {
return this.$GraphQLMutation_responseType
}, m.prototype.getCall = function() {
return this.$GraphQLMutation_mutationCall
}, m.prototype.shallowClone = function(e, t) {
return new m(this.getName(), this.getResponseType(), this.getCall(), e, t)
}, m.prototype.toString = function() {
return "Mutation " + this.getName() + " : " + this.getResponseType() + " {" + this.getCall().toString() + _([this]) + "}"
}, m.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1],
o = t[2],
i = t[3],
s = t[4],
l = t[5];
return n !== N.MUTATION && T(0, "Expected mutation descriptor"), new m(r, o, a.fromJSON(i), s ? s.map(d.fromJSON) : null, l ? l.map(p.fromJSON) : null)
}, m.prototype.toJSON = function() {
var e = this.getFragments();
return w([N.MUTATION, this.getName(), this.getResponseType(), this.getCall(), this.hasOwnFields() ? this.getOwnFields() : null, e.length ? e : null])
};
var q = {
BatchCallVariable: u,
Call: s,
Callv: a,
CallValue: l,
CallVariable: c,
Field: d,
Mutation: m,
Query: h,
QueryFragment: p,
QueryWithValues: f
};
o.exports = q
}), __d("generateRQLFieldAlias", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t = e.indexOf(".");
return -1 === t ? e : s + e.substr(0, t) + a(e).toString(36)
}
var a = t("crc32"),
s = "_";
o.exports = i
}), __d("isEmpty", [], function(e, t, n, r, o) {
function i(e) {
if (Array.isArray(e)) return 0 === e.length;
if ("object" == typeof e) {
for (var t in e) return !1;
return !0
}
return !e
}
o.exports = i
}), __d("GraphQLConstants", [], function(e, t, n, r, o) {
"use strict";
var i = {
CHECKIN_SEARCH_QUERY: "checkin_search_query",
CLIENT_SESSION: "client_session",
CLIENT_SESSION_ID: "client_session_id",
CURSOR: "cursor",
EDGES: "edges",
ENTITY_SEARCH: "entities_named",
GROUP: "group_address",
NODE: "node",
NODES: "nodes",
PAGE_INFO: "page_info",
STORY: "story",
USERNAME: "username",
VIEWER: "viewer",
CUSTOM_ROOTCALLS: {},
IDLESS_ROOTCALLS: {},
RANGE_CALLS: {
after: !0,
before: !0,
client_session: !0,
find: !0,
first: !0,
last: !0,
surrounds: !0,
wrapper: !0
},
VIEWER_CLIENT_ID: "client:viewer",
DUMMY_CURSOR_ID: "client:cursor"
};
i.CUSTOM_ROOTCALLS[i.ENTITY_SEARCH] = !0, i.CUSTOM_ROOTCALLS[i.GROUP] = !0, i.CUSTOM_ROOTCALLS[i.STORY] = !0, i.CUSTOM_ROOTCALLS[i.USERNAME] = !0, i.CUSTOM_ROOTCALLS[i.CHECKIN_SEARCH_QUERY] = !0, i.IDLESS_ROOTCALLS[i.CHECKIN_SEARCH_QUERY] = !0, o.exports = i
}), __d("GraphQLRangeTracker", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
return e + "." + t
}
function a(e, t) {
return e + "." + t
}
function s(e) {
l.warn("GraphQLRangeTracker can only track `edges` fields with `EdgesID` fieldName: %s inferredRootCallName: %s inferredPrimaryKey: %s isPlural: %s isConnection: %s isFindable: %s isLimitable: %s isGenerated: %s", e.getFieldName(), e.getInferredRootCallName(), e.getInferredPrimaryKey(), e.isPlural(), e.isConnection(), e.isFindable(), e.isLimitable(), e.isGenerated())
}
var l = t("DliteLog"),
u = {},
c = {},
d = {
THRESHOLD: 10,
trackEdge: function(e, t, n) {
var r = e.getEdgesID();
if (!r) return void s(e);
var o = a(r, t);
u[o] = e;
var l = i(r, n);
c[l] = !0
},
hasEdge: function(e, t) {
var n = e.getEdgesID();
if (!n) return s(e), !1;
var r = a(n, t);
return u.hasOwnProperty(r) && u[r].equals(e)
},
isFieldTracked: function(e, t) {
var n = e.getEdgesID();
return n ? c.hasOwnProperty(i(n, t)) : (s(e), !1)
}
};
o.exports = d
}), __d("DliteLog", [], function(e, t, n, r, o) {
"use strict";
var i = t("DliteLogLevel"),
a = t("ex"),
s = t("keyMirror"),
l = t("mixInEventEmitter"),
u = {
Events: s({
loggedError: null
}),
warn: function() {
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]);
var r = new Error(a.apply(null, e));
r.type = i.WARNING, __DEV__ && console.warn.apply(console, e), this.emitAndHold(u.Events.loggedError, r)
}
};
l(u, u.Events), o.exports = u
}), __d("DliteLogLevel", [], function(e, t, n, r, o) {
"use strict";
var i = {
MUSTFIX: "mustfix",
WARNING: "warn"
};
o.exports = i
}), __d("ex", [], function(e, t, n, r, o) {
var i = t("eprintf"),
a = function() {
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]);
return e = e.map(function(e) {
return String(e)
}), e[0].split("%s").length !== e.length ? a("ex args number mismatch: %s", JSON.stringify(e)) : __DEV__ ? i.apply(null, e) : a._prefix + JSON.stringify(e) + a._suffix
};
a._prefix = "<![EX[", a._suffix = "]]>", o.exports = a
}), __d("eprintf", [], function(e, t, n, r, o) {
var i = function(e) {
var t = Array.prototype.slice.call(arguments).map(function(e) {
return String(e)
}),
n = e.split("%s").length - 1;
if (n !== t.length - 1) return i("eprintf args number mismatch: %s", JSON.stringify(t));
var r = 1;
return e.replace(/%s/g, function() {
return String(t[r++])
})
};
o.exports = i
}), __d("mixInEventEmitter", [], function(e, t, n, r, o) {
function i(e, t) {
t || d(0, "Must supply set of valid event types"), this.__eventEmitter && d(0, "An active emitter is already mixed in");
var n = e.prototype || e,
r = e.constructor;
r && r !== Object && r !== Function && d(0, "Mix EventEmitter into a class, not an instance"), n.hasOwnProperty(h) ? c(n.__types, t) : n.__types = n.__types ? c({}, n.__types, t) : t, c(n, f)
}
var a = t("EventEmitter"),
s = t("EventEmitterWithHolding"),
l = t("EventHolder"),
u = t("EventValidator"),
c = t("copyProperties"),
d = t("invariant"),
p = t("keyOf"),
h = p({
__types: !0
}),
f = {
emit: function(e, t, n, r, o, i, a) {
return this.__getEventEmitter().emit(e, t, n, r, o, i, a)
},
emitAndHold: function(e, t, n, r, o, i, a) {
return this.__getEventEmitter().emitAndHold(e, t, n, r, o, i, a)
},
addListener: function(e, t, n) {
return this.__getEventEmitter().addListener(e, t, n)
},
once: function(e, t, n) {
return this.__getEventEmitter().once(e, t, n)
},
addRetroactiveListener: function(e, t, n) {
return this.__getEventEmitter().addRetroactiveListener(e, t, n)
},
addListenerMap: function(e, t) {
return this.__getEventEmitter().addListenerMap(e, t)
},
addRetroactiveListenerMap: function(e, t) {
return this.__getEventEmitter().addListenerMap(e, t)
},
removeAllListeners: function() {
this.__getEventEmitter().removeAllListeners()
},
removeCurrentListener: function() {
this.__getEventEmitter().removeCurrentListener()
},
releaseHeldEventType: function(e) {
this.__getEventEmitter().releaseHeldEventType(e)
},
__getEventEmitter: function() {
if (!this.__eventEmitter) {
var e = new a;
e = u.addValidation(e, this.__types);
var t = new l;
this.__eventEmitter = new s(e, t)
}
return this.__eventEmitter
}
};
o.exports = i
}), __d("EventEmitterWithHolding", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
this.$EventEmitterWithHolding_emitter = e, this.$EventEmitterWithHolding_eventHolder = t, this.$EventEmitterWithHolding_currentEventToken = null, this.$EventEmitterWithHolding_emittingHeldEvents = !1
}
i.prototype.addListener = function(e, t, n) {
return this.$EventEmitterWithHolding_emitter.addListener(e, t, n)
}, i.prototype.once = function(e, t, n) {
return this.$EventEmitterWithHolding_emitter.once(e, t, n)
}, i.prototype.addRetroactiveListener = function(e, t, n) {
var r = this.$EventEmitterWithHolding_emitter.addListener(e, t, n);
return this.$EventEmitterWithHolding_emittingHeldEvents = !0, this.$EventEmitterWithHolding_eventHolder.emitToListener(e, t, n), this.$EventEmitterWithHolding_emittingHeldEvents = !1, r
}, i.prototype.removeAllListeners = function(e) {
this.$EventEmitterWithHolding_emitter.removeAllListeners(e)
}, i.prototype.removeCurrentListener = function() {
this.$EventEmitterWithHolding_emitter.removeCurrentListener()
}, i.prototype.listeners = function(e) {
return this.$EventEmitterWithHolding_emitter.listeners(e)
}, i.prototype.emit = function(e, t, n, r, o, i, a) {
this.$EventEmitterWithHolding_emitter.emit(e, t, n, r, o, i, a)
}, i.prototype.emitAndHold = function(e, t, n, r, o, i, a) {
this.$EventEmitterWithHolding_currentEventToken = this.$EventEmitterWithHolding_eventHolder.holdEvent(e, t, n, r, o, i, a), this.$EventEmitterWithHolding_emitter.emit(e, t, n, r, o, i, a), this.$EventEmitterWithHolding_currentEventToken = null
}, i.prototype.releaseCurrentEvent = function() {
null !== this.$EventEmitterWithHolding_currentEventToken ? this.$EventEmitterWithHolding_eventHolder.releaseEvent(this.$EventEmitterWithHolding_currentEventToken) : this.$EventEmitterWithHolding_emittingHeldEvents && this.$EventEmitterWithHolding_eventHolder.releaseCurrentEvent()
}, i.prototype.releaseHeldEventType = function(e) {
this.$EventEmitterWithHolding_eventHolder.releaseEventType(e)
}, o.exports = i
}), __d("EventHolder", [], function(e, t, n, r, o) {
"use strict";
function i() {
this.$EventHolder_heldEvents = {}, this.$EventHolder_currentEventKey = null
}
var a = t("invariant");
i.prototype.holdEvent = function(e, t, n, r, o, i, a) {
this.$EventHolder_heldEvents[e] = this.$EventHolder_heldEvents[e] || [];
var s = this.$EventHolder_heldEvents[e],
l = {
eventType: e,
index: s.length
};
return s.push([t, n, r, o, i, a]), l
}, i.prototype.emitToListener = function(e, t, n) {
var r = this.$EventHolder_heldEvents[e];
if (r) {
var o = this.$EventHolder_currentEventKey;
r.forEach(function(r, o) {
r && (this.$EventHolder_currentEventKey = {
eventType: e,
index: o
}, t.apply(n, r))
}.bind(this)), this.$EventHolder_currentEventKey = o
}
}, i.prototype.releaseCurrentEvent = function() {
null === this.$EventHolder_currentEventKey && a(0, "Not in an emitting cycle; there is no current event"), this.releaseEvent(this.$EventHolder_currentEventKey)
}, i.prototype.releaseEvent = function(e) {
delete this.$EventHolder_heldEvents[e.eventType][e.index]
}, i.prototype.releaseEventType = function(e) {
this.$EventHolder_heldEvents[e] = []
}, o.exports = i
}), __d("EventValidator", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
if (-1 === t.indexOf(e)) throw new TypeError(a(e, t))
}
function a(e, t) {
var n = 'Unknown event type "' + e + '". ';
return __DEV__ && (n += u(e, t)), n += "Known event types: " + t.join(", ") + "."
}
var s = t("copyProperties"),
l = {
addValidation: function(e, t) {
var n = Object.keys(t),
r = Object.create(e);
return s(r, {
emit: function(t, r, o, a, s, l, u) {
return i(t, n), e.emit.call(this, t, r, o, a, s, l, u)
}
}), r
}
};
if (__DEV__) var u = function(e, t) {
var n = c(e, t);
return h(n, e) ? 'Did you mean "' + n.type + '"? ' : ""
},
c = function(e, t) {
var n = t.map(d.bind(this, e));
return n.sort(p)[0]
},
d = function(e, t) {
return {
type: t,
distance: f(e, t)
}
},
p = function(e, t) {
return e.distance < t.distance ? -1 : e.distance > t.distance ? 1 : 0
},
h = function(e, t) {
return e.distance / t.length < .334
},
f = function(e, t) {
var n, r, o = [];
for (n = 0; n <= e.length; n++) o[n] = [n];
for (r = 1; r <= t.length; r++) o[0][r] = r;
for (n = 1; n <= e.length; n++)
for (r = 1; r <= t.length; r++) {
var i = e.charAt(n - 1) === t.charAt(r - 1) ? 0 : 1;
o[n][r] = Math.min(o[n - 1][r] + 1, o[n][r - 1] + 1, o[n - 1][r - 1] + i), n > 1 && r > 1 && e.charAt(n - 1) == t.charAt(r - 2) && e.charAt(n - 2) == t.charAt(r - 1) && (o[n][r] = Math.min(o[n][r], o[n - 2][r - 2] + i))
}
return o[e.length][t.length]
};
o.exports = l
}), __d("copyProperties", [], function(e, t, n, r, o) {
function i(e, t, n, r, o, i, a) {
if (e = e || {}, __DEV__ && a) throw new Error("Too many arguments passed to copyProperties");
for (var s, l = [t, n, r, o, i], u = 0; l[u];) {
s = l[u++];
for (var c in s) e[c] = s[c];
s.hasOwnProperty && s.hasOwnProperty("toString") && "undefined" != typeof s.toString && e.toString !== s.toString && (e.toString = s.toString)
}
return e
}
o.exports = i
}), __d("GraphQLStoreDataHandler", [], function(e, t, n, r, o) {
"use strict";
var i = {},
a = {
__dataID__: !0,
__masked__: !0,
__range__: !0,
__status__: !0
},
s = {
getID: function(e) {
return e.__dataID__
},
createPointerWithID: function(e) {
return {
__dataID__: e
}
},
isClientID: function(e) {
return "client:" === e.substring(0, 7)
},
isClientOnlyID: function(e) {
return this.isClientID(e) && !i[e]
},
updateClientServerIDMap: function(e, t) {
i[e] = t
},
getServerIDForClientID: function(e) {
return i[e] || null
},
isMetadataKey: function(e) {
return a[e] || !1
}
};
o.exports = s
}), __d("GraphQLStoreRangeUtils", [], function(e, t, n, r, o) {
var i = t("GraphQL_EXPERIMENTAL"),
a = t("GraphQLConstants"),
s = {},
l = {
isRangeClientID: function(e) {
return !!s[e]
},
getClientIDForRangeWithID: function(e, t, n) {
var r = e.getCalls().map(function(e) {
return e.toString(t)
}).join(","),
o = n + "_" + r,
i = s[o];
return i || (s[o] = {
dataID: n,
calls: e.getCalls(),
callValues: t
}), o
},
parseRangeClientID: function(e) {
return s[e] || null
},
isRangeNode: function(e) {
if (!(e instanceof i.Field && e.isLimitable())) return !1;
if (e.hasUnaliasedField(a.EDGES) || e.hasUnaliasedField(a.PAGE_INFO)) return !0;
var t = e.getCalls();
if (t.length)
for (var n = 0; n < t.length; n++)
if (t[n].getName() in a.RANGE_CALLS) return !0;
return !1
},
getStorageKeyForField: function(e, t) {
var n = e.getFieldName(),
r = e.getCalls();
return r.length && (l.isRangeNode(e) && (r = l.getFilterCalls(r)), r.length && (n += "." + r.map(function(e) {
return e.toString(t)
}).join("."))), n
},
getFilterCalls: function(e) {
for (var t = [], n = 0; n < e.length; n++) a.RANGE_CALLS[e[n].getName()] || t.push(e[n]);
return t
}
};
o.exports = l
}), __d("DliteLogger", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n, r, o) {
var i = m[t] = m[t] || 0,
s = {
type: e,
name: i ? t + " " + i : t,
depth: p,
startTime: n,
endTime: r,
insertOrder: h.length,
data: o || {}
};
return p++, h.push(s), m[t] ++, isNaN(s.endTime) || a(s), s
}
function a(e) {
f.push(e), _.emitAndHold(_.Events.completedEvent, e)
}
function s(e, t) {
if (__DEV__)
for (var n = 0; n < g.length; n++) {
var r = g[n];
if (-1 !== e.indexOf(r)) {
var o = (t ? "Starting event " : "Ending event ") + '"' + e + '" matches breakpoint "' + r + '"';
return void console.log(o)
}
}
}
var l = t("invariant"),
u = t("keyMirror"),
c = t("mixInEventEmitter"),
d = u({
CLIENT: null,
SERVER: null
}),
p = 0,
h = [],
f = [],
m = {},
g = [],
_ = {
Events: u({
completedEvent: null
}),
logClientEventRetroactive: function(e, t, n, r) {
s(e, !0), console.timeStamp && console.timeStamp(e);
var o = i(d.CLIENT, e, t, n, r);
return {
stop: function() {
isNaN(o.endTime) || l(0, "Cannot end `%s` more than once.", e), -1 !== h.indexOf(o) && p--, o.endTime = Date.now(), a(o), s(e, !1)
}
}
},
logClientEvent: function(e, t) {
return _.logClientEventRetroactive(e, Date.now(), 0 / 0, t)
},
breakOnClientEvent: function(e) {
g.push(e)
},
flushCompletedEvents: function() {
var e = f;
return p = 0, f = [], e
},
flush: function() {
var e = h.concat(f);
return p = 0, h = [], f = [], m = {}, e
}
};
c(_, _.Events), o.exports = _
}), __d("GraphQLMutationDataHandler", [], function(e, t, n, r, o) {
"use strict";
var i = t("invariant"),
a = {
getMutationType: function(e) {
return e && 1 === Object.keys(e).length || i(0, "malformed mutation result payload received"), Object.keys(e)[0]
}
};
o.exports = a
}), __d("GraphQLMutationProperties", [], function(e, t, n, r, o) {
"use strict";
var i = t("GraphQLMutatorConstants"),
a = t("invariant"),
s = t("rql"),
l = {},
u = {},
c = {};
u.actor_subscribe = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f0", "ActorSubscribeResponsePayload", [new e.Field("subscribee", [new e.Field("subscribers", null, null, null, null, null, {
connection: !0
}), new e.Field("subscribe_status"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.actor_unsubscribe = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f1", "ActorUnsubscribeResponsePayload", [new e.Field("unsubscribee", [new e.Field("subscribers", null, null, null, null, null, {
connection: !0
}), new e.Field("subscribe_status"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.comment_create = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f2", "CommentCreateResponsePayload", [new e.Field("feedback", [new e.Field("comments", null, null, null, null, null, {
connection: !0
}), new e.Field("top_level_comments", null, null, null, null, null, {
connection: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("comment", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("feedback_comment_edge", [new e.Field("cursor", null, null, null, null, null, {
requisite: !0
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
requisite: !0
}), new e.Field("source", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])])
}()
}, c.comment_create = {
"": i.PREPEND
}, u.undirected_story_create = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f3", "UndirectedStoryCreateResponsePayload", [new e.Field("story", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("feed_story_edge", [new e.Field("cursor", null, null, null, null, null, {
requisite: !0
}), new e.Field("node", null, null, null, null, null, {
requisite: !0
}), new e.Field("source")])])
}()
}, c.undirected_story_create = {
"environment(tablet_site)": i.PREPEND
}, u.story_delete = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f4", "StoryDeleteResponsePayload", [new e.Field("deleted_story_id")])
}()
}, u.comment_delete = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f5", "CommentDeleteResponsePayload", [new e.Field("feedback", [new e.Field("comments", null, null, null, null, null, {
connection: !0
}), new e.Field("top_level_comments", null, null, null, null, null, {
connection: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.comment_edit = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f6", "CommentEditResponsePayload", [new e.Field("comment", [new e.Field("body"), new e.Field("edit_history", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("attachments", null, null, null, null, null, {
plural: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.feedback_like = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f7", "FeedbackLikeResponsePayload", [new e.Field("feedback", [new e.Field("does_viewer_like"), new e.Field("likers", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("like_sentence"), new e.Field("viewer_likes_sentence"), new e.Field("viewer_does_not_like_sentence"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.feedback_unlike = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f8", "FeedbackUnlikeResponsePayload", [new e.Field("feedback", [new e.Field("does_viewer_like"), new e.Field("likers", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("like_sentence"), new e.Field("viewer_likes_sentence"), new e.Field("viewer_does_not_like_sentence"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.friend_remove = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f9", "FriendRemoveResponsePayload", [new e.Field("unfriended_user", [new e.Field("friends", null, null, null, null, null, {
connection: !0
}), new e.Field("friendship_status"), new e.Field("subscribe_status"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.viewer_friend_requests_mark_all_seen = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f10", "ViewerFriendRequestsMarkAllSeenResponsePayload", [new e.Field("viewer", [new e.Field("friending_possibilities", [new e.Field("unseen_count")], null, null, null, null, {
connection: !0
})])])
}()
}, u.friend_request_accept = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f11", "FriendRequestAcceptResponsePayload", [new e.Field("viewer", [new e.Field("friending_possibilities", null, null, null, null, null, {
connection: !0
})]), new e.Field("friend_requester", [new e.Field("friends", null, null, null, null, null, {
connection: !0
}), new e.Field("friendship_status"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.friend_request_cancel = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f12", "FriendRequestCancelResponsePayload", [new e.Field("cancelled_friend_requestee", [new e.Field("friendship_status"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.friend_request_delete = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f13", "FriendRequestDeleteResponsePayload", [new e.Field("friend_requester", [new e.Field("friendship_status"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.friend_request_send = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f14", "FriendRequestSendResponsePayload", [new e.Field("friend_requestees", [new e.Field("friendship_status"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
plural: !0
})])
}()
}, u.group_request_to_join = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f15", "GroupRequestToJoinResponsePayload", [new e.Field("group", [new e.Field("group_members", null, null, null, null, null, {
connection: !0
}), new e.Field("viewer_join_state"), new e.Field("viewer_subscription_level"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.group_leave = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f16", "GroupLeaveResponsePayload", [new e.Field("group", [new e.Field("group_members", null, null, null, null, null, {
connection: !0
}), new e.Field("viewer_join_state"), new e.Field("viewer_subscription_level"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.viewer_messages_mark_all_seen = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f17", "ViewerMessagesMarkAllSeenResponsePayload", [new e.Field("viewer", [new e.Field("message_threads", [new e.Field("unseen_count")], null, null, null, null, {
connection: !0
})])])
}()
}, u.message_thread_update_read_state = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f18", "MessageThreadUpdateReadStateResponsePayload", [new e.Field("thread", [new e.Field("messages", [new e.Field("unread_count")], null, null, null, null, {
connection: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("viewer", [new e.Field("message_threads", [new e.Field("unseen_count")], null, null, null, null, {
connection: !0
})])])
}()
}, u.notification_story_mark_read = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f19", "NotificationStoryMarkReadResponsePayload", [new e.Field("story", [new e.Field("seen_state"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.viewer_notifications_update_all_seen_state = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f20", "ViewerNotificationsUpdateAllSeenStateResponsePayload", [new e.Field("viewer", [new e.Field("notification_stories", [new e.Field("unseen_count")], null, null, null, null, {
connection: !0,
nonFindable: !0
})]), new e.Field("stories", [new e.Field("seen_state"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
plural: !0
})])
}()
}, u.feedback_subscribe = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f21", "FeedbackSubscribeResponsePayload", [new e.Field("feedback", [new e.Field("can_viewer_subscribe"), new e.Field("is_viewer_subscribed"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.feedback_unsubscribe = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f22", "FeedbackUnsubscribeResponsePayload", [new e.Field("feedback", [new e.Field("can_viewer_subscribe"), new e.Field("is_viewer_subscribed"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.message_send = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f23", "MessageSendResponsePayload", [new e.Field("thread", [new e.Field("messages", null, null, null, null, null, {
connection: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("message", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("thread_message_edge", [new e.Field("cursor", null, null, null, null, null, {
requisite: !0
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
requisite: !0
}), new e.Field("source", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])])
}()
}, c.message_send = {
"": i.APPEND
}, c.instagram_business_invite = {
"": i.PREPEND
}, c.instagram_user_role_create = {
"": i.PREPEND
}, c.instagram_ad_account_group_role_create = {
"": i.PREPEND
}, u.page_like = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f24", "PageLikeResponsePayload", [new e.Field("page", [new e.Field("does_viewer_like"), new e.Field("page_likers", null, null, null, null, null, {
connection: !0
}), new e.Field("subscribe_status"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.page_unlike = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f25", "PageUnlikeResponsePayload", [new e.Field("page", [new e.Field("does_viewer_like"), new e.Field("page_likers", null, null, null, null, null, {
connection: !0
}), new e.Field("subscribe_status"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.event_rsvp = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f26", "EventRsvpResponsePayload", [new e.Field("event", [new e.Field("can_view_members"), new e.Field("can_viewer_invite"), new e.Field("can_viewer_join"), new e.Field("can_viewer_post"), new e.Field("can_viewer_share"), new e.Field("event_declines", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("event_decline_stories", null, null, null, null, null, {
connection: !0
}), new e.Field("event_invitees", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("event_maybes", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("event_members", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("event_viewer_capability"), new e.Field("viewer_guest_status"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.event_invite = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f27", "EventInviteResponsePayload", [new e.Field("event", [new e.Field("event_invitees", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("invitee_candidates", null, null, null, null, null, {
connection: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.event_remove = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f28", "EventRemoveResponsePayload", [new e.Field("event", [new e.Field("can_view_members"), new e.Field("can_viewer_invite"), new e.Field("can_viewer_join"), new e.Field("can_viewer_post"), new e.Field("can_viewer_share"), new e.Field("event_declines", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("event_decline_stories", null, null, null, null, null, {
connection: !0
}), new e.Field("event_invitees", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("event_maybes", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("event_members", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("event_viewer_capability"), new e.Field("viewer_guest_status"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.story_take_negative_action = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f29", "StoryTakeNegativeActionResponsePayload", [new e.Field("negative_feedback_action", [new e.Field("already_completed"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.story_undo_negative_action = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f30", "StoryUndoNegativeActionResponsePayload", [new e.Field("negative_feedback_action", [new e.Field("already_completed"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_account_select_mobile_preference = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f31", "AdAccountSelectMobilePreferenceResponsePayload", [new e.Field("viewer", [new e.Field("ad_accounts", null, null, null, null, null, {
connection: !0
})])])
}()
}, u.ad_campaign_pause = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f32", "AdCampaignPauseResponsePayload", [new e.Field("ad_campaign_group", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("ad_campaign", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_campaign_activate = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f33", "AdCampaignActivateResponsePayload", [new e.Field("ad_campaign_group", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("ad_campaign", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_campaign_group_pause = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f34", "AdCampaignGroupPauseResponsePayload", [new e.Field("ad_campaign_group", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_campaign_group_activate = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f35", "AdCampaignGroupActivateResponsePayload", [new e.Field("ad_campaign_group", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.adgroup_pause = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f36", "AdgroupPauseResponsePayload", [new e.Field("ad_campaign_group", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("ad_campaign", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("adgroup", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.adgroup_activate = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f37", "AdgroupActivateResponsePayload", [new e.Field("ad_campaign_group", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("ad_campaign", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("adgroup", [new e.Field("delivery_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_account_edit_spend_limit = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f38", "AdAccountEditSpendLimitResponsePayload", [new e.Field("ad_account", [new e.Field("spend_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_account_remove_spend_limit = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f39", "AdAccountRemoveSpendLimitResponsePayload", [new e.Field("ad_account", [new e.Field("spend_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_account_reset_spend_limit = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f40", "AdAccountResetSpendLimitResponsePayload", [new e.Field("ad_account", [new e.Field("spend_info"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_account_notifications_update_seen_state = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f41", "AdAccountNotificationsUpdateSeenStateResponsePayload", [new e.Field("ad_account", [new e.Field("adalerts_and_tips", [new e.Field("unseen_count")], null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new e.Field("stories", [new e.Field("seen_state"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
plural: !0
})])
}()
}, u.ad_audience_create = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f42", "AdAudienceCreateResponsePayload", [new e.Field("ad_account_ad_audiences_edge", [new e.Field("cursor", null, null, null, null, null, {
generated: !0,
requisite: !0
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
generated: !0,
requisite: !0
})])])
}()
}, c.ad_audience_create = {
"": i.PREPEND
}, u.ad_audience_edit = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f43", "AdAudienceEditResponsePayload", [new e.Field("ad_audience", [new e.Field("name"), new e.Field("target_spec"), new e.Field("updated"), new e.Field("reach_estimate"), new e.Field("targeting_sentences", null, null, null, null, null, {
plural: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_campaign_edit = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f44", "AdCampaignEditResponsePayload", [new e.Field("ad_campaign", [new e.Field("name"), new e.Field("daily_budget"), new e.Field("lifetime_budget"), new e.Field("lifetime_target_spend"), new e.Field("time_range"), new e.Field("today_target_spend"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_campaign_group_create = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f45", "AdCampaignGroupCreateResponsePayload", [new e.Field("ad_account_ad_campaign_groups_edge", [new e.Field("cursor", null, null, null, null, null, {
generated: !0,
requisite: !0
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
generated: !0,
requisite: !0
})])])
}()
}, c.ad_campaign_group_create = {
"orderby(ad_activity_status,reverse_start_time).for_run_status(ALL_NOT_ARCHIVED_OR_DELETED)": i.PREPEND
}, u.ad_account_enable_notification = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f46", "AdAccountEnableNotificationResponsePayload", [new e.Field("ad_account", [new e.Field("notification_settings", [new e.Field("settings", [new e.Field("enabled")], null, null, null, null, {
plural: !0
})]), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_account_disable_notification = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f47", "AdAccountDisableNotificationResponsePayload", [new e.Field("ad_account", [new e.Field("notification_settings", [new e.Field("settings", [new e.Field("enabled")], null, null, null, null, {
plural: !0
})]), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.ad_account_mute_notifications = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f48", "AdAccountMuteNotificationsResponsePayload", [new e.Field("ad_account", [new e.Field("notification_settings", [new e.Field("muted_until")]), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.instagram_business_invite = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f49", "InstagramBusinessInviteResponsePayload", [new e.Field("instagram_business_role_set_edge", [new e.Field("cursor", null, null, null, null, null, {
generated: !0,
requisite: !0
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
generated: !0,
requisite: !0
})])])
}()
}, u.instagram_user_role_update = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f50", "InstagramUserRoleUpdateResponsePayload", [new e.Field("instagram_user_role", [new e.Field("user_permission_role"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.instagram_user_role_create = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f51", "InstagramUserRoleCreateResponsePayload", [new e.Field("instagram_role_set_instagram_user_role", [new e.Field("cursor", null, null, null, null, null, {
generated: !0,
requisite: !0
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
generated: !0,
requisite: !0
})])])
}()
}, u.instagram_user_role_delete = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f52", "InstagramUserRoleDeleteResponsePayload", [new e.Field("instagram_role_set", [new e.Field("instagram_user_roles", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.instagram_role_set_delete = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f53", "InstagramRoleSetDeleteResponsePayload", [new e.Field("instagram_business", [new e.Field("role_sets", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("instagram_users", [new e.Field("edges", [new e.Field("node", [new e.Field("assigned_user_roles", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
requisite: !0
}), new e.Field("cursor", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
plural: !0
}), new e.Field("page_info", [new e.Field("has_next_page", null, null, null, null, null, {
generated: !0,
requisite: !0
}), new e.Field("has_previous_page", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.instagram_ad_account_group_role_create = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f54", "InstagramAdAccountGroupRoleCreateResponsePayload", [new e.Field("instagram_role_set_ad_account_group_role_edge", [new e.Field("cursor", null, null, null, null, null, {
generated: !0,
requisite: !0
}), new e.Field("node", [new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
generated: !0,
requisite: !0
})])])
}()
}, u.instagram_ad_account_group_role_delete = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f55", "InstagramAdAccountGroupRoleDeleteResponsePayload", [new e.Field("instagram_role_set", [new e.Field("ad_account_group_roles", null, null, null, null, null, {
connection: !0,
nonFindable: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.group_pin_story = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f56", "GroupPinStoryResponsePayload", [new e.Field("group", [new e.Field("group_pinned_stories", null, null, null, null, null, {
connection: !0
}), new e.Field("group_stories", null, null, null, null, null, {
connection: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.group_unpin_story = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f57", "GroupUnpinStoryResponsePayload", [new e.Field("group", [new e.Field("group_pinned_stories", null, null, null, null, null, {
connection: !0
}), new e.Field("group_stories", null, null, null, null, null, {
connection: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.group_block = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f58", "GroupBlockResponsePayload", [new e.Field("group", [new e.Field("group_stories", null, null, null, null, null, {
connection: !0
}), new e.Field("group_members", null, null, null, null, null, {
connection: !0
}), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
}, u.support_dashboard_item_mark_as_read = function() {
return function() {
var e = s.__GraphQL;
return new e.QueryFragment("UnknownFile_f59", "SupportDashboardItemMarkAsReadResponsePayload", [new e.Field("support_dashboard_item", [new e.Field("is_unread"), new e.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
})])
}()
};
var d = {
getFatQueryForType: function(e) {
if (e in u || a(0, "Must have a fat query for the mutation type %s. Please see https://our.intern.facebook.com/intern/dex/graphql-mutations/mutations-in-dlite/.", e), !(e in l)) {
var t = u[e];
l[e] = t()
}
return l[e]
},
getRangeConfigForType: function(e) {
var t = c[e];
if (!t) return {};
for (var n in t) t[n] !== i.PREPEND && t[n] !== i.APPEND && a(0, "range config must map to either GraphQLMutatorConstants.APPEND/PREPEND");
return t
},
__getAllRangeConfigs: function() {
return c
}
};
o.exports = d
}), __d("GraphQLMutatorConstants", [], function(e, t, n, r, o) {
"use strict";
var i = {
APPEND: "append",
PREPEND: "prepend",
REMOVE: "remove",
NODE_DELETE_HANDLER: "node_delete",
RANGE_ADD_HANDLER: "range_add",
RANGE_DELETE_HANDLER: "range_delete",
HANDLER_TYPES: {},
OPTIMISTIC_UPDATE: "optimistic",
SERVER_UPDATE: "server",
POLLER_UPDATE: "poller",
UPDATE_TYPES: {},
RANGE_OPERATIONS: {}
};
i.HANDLER_TYPES[i.NODE_DELETE_HANDLER] = !0, i.HANDLER_TYPES[i.RANGE_ADD_HANDLER] = !0, i.HANDLER_TYPES[i.RANGE_DELETE_HANDLER] = !0, i.UPDATE_TYPES[i.OPTIMISTIC_UPDATE] = !0, i.UPDATE_TYPES[i.SERVER_UPDATE] = !0, i.UPDATE_TYPES[i.POLLER_UPDATE] = !0, i.RANGE_OPERATIONS[i.APPEND] = !0, i.RANGE_OPERATIONS[i.PREPEND] = !0, i.RANGE_OPERATIONS[i.REMOVE] = !0, o.exports = i
}), __d("rql", [], function(e, t, n, r, o) {
"use strict";
function i() {
throw new Error("rql transform failure!")
}
var a = t("GraphQL_EXPERIMENTAL");
i.__GraphQL = a, i.__var = i.__frag = function(e) {
return e
}, o.exports = i
}), __d("GraphQLMutatorHub", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
"string" != typeof e.deletedIDFieldName && c(0, "Node delete mutation config must have valid types on register")
}
function a(e) {
(e.sourceID && "string" != typeof e.sourceID || "string" != typeof e.connectionName || "string" != typeof e.edgeName) && c(0, "Range add mutation config must have valid types on register")
}
function s(e) {
Array.isArray(e.pathToConnection) && e.pathToConnection.length >= 2 && "string" == typeof e.deletedIDFieldName || c(0, "Range delete mutation config must have valid types on register")
}
function l(e, t, n) {
t in u.HANDLER_TYPES || c(0, "Cannot register invalid handler type"), void 0 === d[e] && (d[e] = []), d[e].push({
handlerType: t,
config: n
})
}
var u = t("GraphQLMutatorConstants"),
c = t("invariant"),
d = {},
p = {
registerForRangeAddMutationType: function(e, t) {
a(t), l(e, u.RANGE_ADD_HANDLER, t)
},
registerForRangeDeleteMutationType: function(e, t) {
s(t), l(e, u.RANGE_DELETE_HANDLER, t)
},
registerForNodeDeleteMutationType: function(e, t) {
i(t), l(e, u.NODE_DELETE_HANDLER, t)
},
getConfigs: function(e) {
return d[e] ? d[e] : []
}
};
o.exports = p
}), __d("GraphQLQueryTracker", [], function(e, t, n, r, o) {
"use strict";
function i() {
this.$GraphQLQueryTracker_trackedQueriesByID = {}
}
function a(e, t) {
return new l.Field("tracked_field", e, t)
}
function s(e) {
return new l.QueryFragment("FakeTrackedFragment", "FakeNode", e.getOwnFields(), e.getFragments())
}
var l = t("GraphQL_EXPERIMENTAL"),
u = t("GraphQLConstants"),
c = t("GraphQLStoreDataHandler");
i.prototype.addQueryForID = function(e, t) {
if (e === u.VIEWER_CLIENT_ID || !c.isClientID(e)) {
var n = this.$GraphQLQueryTracker_trackedQueriesByID;
if (n.hasOwnProperty(e)) {
if (t.getFieldName && "__type__" === t.getFieldName()) return
} else n[e] = [];
n[e].push(t)
}
}, i.prototype.getQueryForIDs = function(e) {
for (var t = null, n = this.$GraphQLQueryTracker_trackedQueriesByID, r = 0; r < e.length; r++) {
var o = e[r];
if (n.hasOwnProperty(o)) {
t = t || [];
for (var i = n[o], l = 0; l < i.length; l++) t.push(s(i[l]))
}
}
return t ? a(null, t) : null
}, o.exports = i
}), __d("GraphQLStatusConstants", [], function(e, t, n, r, o) {
"use strict";
var i = t("keyMirror"),
a = i({
ERROR: null
});
o.exports = a
}), __d("GraphQLStoreChangeEmitter", [], function(e, t, n, r, o) {
"use strict";
function i() {
m(a), f = null
}
function a() {
h.forEach(s)
}
function s(e, t) {
var n = e.subscribedIDs,
r = e.callback;
for (var o in f)
if (f.hasOwnProperty(o)) {
var i = f[o];
if (t > i) break;
if (n.indexOf(o) >= 0) {
c.applyWithGuard(r, null, null, null, "GraphQLStoreChangeEmitter");
break
}
}
}
function l(e) {
var t = d.parseRangeClientID(e);
return t ? t.dataID : e
}
var u = t("DliteProfiler"),
c = t("ErrorUtils"),
d = t("GraphQLStoreRangeUtils"),
p = t("setImmediate"),
h = [],
f = null,
m = function(e) {
return e()
},
g = {
addListenerForIDs: function(e, t) {
var n = e.map(l),
r = h.length;
return h.push({
subscribedIDs: n,
callback: t
}), {
remove: function() {
delete h[r]
}
}
},
broadcastChangeForID: function(e) {
null === f && (p(i), f = {}), f[l(e)] = h.length - 1
},
injectBatchingStrategy: function(e) {
m = e
},
_processSubscribers: a
};
u.instrumentMethods(g, {
addListenerForIDs: "GraphQLStoreChangeEmitter.addListenerForIDs",
broadcastChangeForID: "GraphQLStoreChangeEmitter.broadcastChangeForID",
_processSubscribers: "GraphQLStoreChangeEmitter.processSubscribers"
}), o.exports = g
}), __d("setImmediate", [], function(e, t, n, r, o) {
o.exports = e.setImmediate || t("ImmediateImplementation").setImmediate
}), __d("ImmediateImplementation", [], function(e, t, n, r, o, i) {
! function(e, t) {
"use strict";
function n(e) {
var n = e[0];
return e = Array.prototype.slice.call(e, 1), h[p] = function() {
n.apply(t, e)
}, m = m.next = {
handle: p++
}, m.handle
}
function r() {
for (var e, t; !g && (e = f.next);)
if (f = e, t = h[e.handle]) {
g = !0;
try {
t(), g = !1
} finally {
o(e.handle), g && (g = !1, f.next && d(r))
}
}
}
function o(e) {
delete h[e]
}
function a() {
if (e.postMessage && !e.importScripts) {
var t = !0,
n = function() {
t = !1, e.removeEventListener ? e.removeEventListener("message", n, !1) : e.detachEvent("onmessage", n)
};
if (e.addEventListener) e.addEventListener("message", n, !1);
else {
if (!e.attachEvent) return !1;
e.attachEvent("onmessage", n)
}
return e.postMessage("", "*"), t
}
}
function s() {
var t = "setImmediate$" + Math.random() + "$",
o = function(n) {
n.source === e && "string" == typeof n.data && 0 === n.data.indexOf(t) && r()
};
e.addEventListener ? e.addEventListener("message", o, !1) : e.attachEvent("onmessage", o), d = function() {
var r = n(arguments);
return e.postMessage(t + r, "*"), r
}
}
function l() {
var e = new MessageChannel;
e.port1.onmessage = r, d = function() {
var t = n(arguments);
return e.port2.postMessage(t), t
}
}
function u() {
var e = _.documentElement;
d = function() {
var t = n(arguments),
o = _.createElement("script");
return o.onreadystatechange = function() {
o.onreadystatechange = null, e.removeChild(o), o = null, r()
}, e.appendChild(o), t
}
}
function c() {
d = function() {
return setTimeout(r, 0), n(arguments)
}
}
var d, p = 1,
h = {},
f = {},
m = f,
g = !1,
_ = e.document;
a() ? s() : e.MessageChannel ? l() : _ && "onreadystatechange" in _.createElement("script") ? u() : c(), i.setImmediate = d, i.clearImmediate = o
}(Function("return this")())
}), __d("GraphQLStoreNodeRangeTracker", [], function(e, t, n, r, o) {
"use strict";
function i() {
this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID = {}
}
var a = Object.freeze([]);
i.prototype.addRangeIDForNodeID = function(e, t) {
this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[t] = this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[t] || {}, this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[t][e] = !0
}, i.prototype.getRangeIDsForNodeID = function(e) {
var t = this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[e];
return t ? Object.keys(t) : a
}, i.prototype.clearRangeIDsForNodeID = function(e) {
var t = this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[e];
t && delete this.$GraphQLStoreNodeRangeTracker_rangeIDsByNodeID[e]
}, o.exports = i
}), __d("GraphQLStoreQueryPath", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
this.$GraphQLStoreQueryPath_root = e, this.$GraphQLStoreQueryPath_fields = []
}
var a = t("GraphQL_EXPERIMENTAL"),
s = t("GraphQLConstants"),
l = t("GraphQLStoreDataHandler"),
u = t("invariant");
i.prunePathForDataID = function(e, t) {
return t && 1 === t.getLength() ? t : e === s.VIEWER_CLIENT_ID ? new i(new a.Query("viewer")) : l.isClientID(e) ? (t || u(0, "Cannot prune a path to a client ID without a current path"), t) : new i(new a.Query("node", [e]))
}, i.prototype.withField = function(e, t) {
var n = this.$GraphQLStoreQueryPath_fields[this.$GraphQLStoreQueryPath_fields.length - 1];
this.pushField(e);
var r = t();
return this.popField(), this.$GraphQLStoreQueryPath_fields[this.$GraphQLStoreQueryPath_fields.length - 1] !== n && u(0, "Popped unexpected field from currentPath"), r
}, i.prototype.pushField = function(e) {
return this.$GraphQLStoreQueryPath_fields.push(e), this
}, i.prototype.popField = function() {
this.$GraphQLStoreQueryPath_fields.length > 0 || u(0, "No fields to pop!"), this.$GraphQLStoreQueryPath_fields.pop()
}, i.prototype.getLength = function() {
return this.$GraphQLStoreQueryPath_fields.length + 1
}, i.prototype.clone = function() {
for (var e = new i(this.$GraphQLStoreQueryPath_root), t = 0; t < this.$GraphQLStoreQueryPath_fields.length; t++) e.pushField(this.$GraphQLStoreQueryPath_fields[t]);
return e
}, i.prototype.getQueryForFragment = function(e) {
var t = this.$GraphQLStoreQueryPath_fields;
if (0 === t.length) return new a.QueryWithValues(this.$GraphQLStoreQueryPath_root.shallowClone(this.$GraphQLStoreQueryPath_root.getOwnUnaliasedFields("id"), [e]));
var n = t[t.length - 1],
r = n.getInferredPrimaryKey();
n = r ? n.shallowClone(n.getOwnUnaliasedFields(r), [e]) : n.shallowClone(null, [e]);
for (var o = t.length - 2; o >= 0; o--) {
var i = t[o];
r = i.getInferredPrimaryKey(), n = i.shallowClone(r ? i.getOwnUnaliasedFields(r).concat(n) : [n])
}
return new a.QueryWithValues(this.$GraphQLStoreQueryPath_root.shallowClone(this.$GraphQLStoreQueryPath_root.getOwnUnaliasedFields("id").concat(n)))
}, i.prototype.getJSONPath = function() {
for (var e = ["$", "*"], t = 0; t < this.$GraphQLStoreQueryPath_fields.length; t++) {
var n = this.$GraphQLStoreQueryPath_fields[t],
r = n.getAlias() || n.getFieldName();
e.push(r), n.isPlural() && e.push("*")
}
return e.join(".")
}, i.prototype.toJSON = function() {
return [this.$GraphQLStoreQueryPath_root.shallowClone(), this.$GraphQLStoreQueryPath_fields.map(function(e) {
return e.shallowClone()
})]
}, i.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1],
o = new i(a.Query.fromJSON(n));
return o.$GraphQLStoreQueryPath_fields = r.map(a.Field.fromJSON), o
}, o.exports = i
}), __d("GraphQLStoreReader", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
this.$GraphQLStoreReader_store = e, this.$GraphQLStoreReader_queuedStore = t, this.$GraphQLStoreReader_fragmentFilter = n || h.thatReturnsTrue
}
function a(e, t) {
for (var n = {}, r = [], o = 0; o < e.length; o++) {
var i = e[o];
i.__dataID__ || (i = f(i), i.__dataID__ = "fakeEdge:" + o), n[i.__dataID__] = i, r.push(i)
}
var a = new c(n);
return a.addItems(t, {}, r, {
has_previous_page: !1,
has_next_page: !1
}), a
}
var s = t("DliteLog"),
l = t("DliteProfiler"),
u = t("GraphQLConstants"),
c = t("GraphQLRange"),
d = t("GraphQLStoreDataHandler"),
p = t("GraphQLStoreRangeUtils"),
h = t("emptyFunction"),
f = t("merge"),
m = u.CLIENT_SESSION_ID,
g = u.EDGES,
_ = u.NODE,
y = u.PAGE_INFO;
i.prototype.retrieveData = function(e, t, n, r) {
var o, i, s, l = t.__dataID__;
!l && t.__masked__ && (t = t.__masked__);
var u = l && l in this.$GraphQLStoreReader_queuedStore ? this.$GraphQLStoreReader_queuedStore[l] : {};
if (null === u) return null;
if (l && p.isRangeClientID(l)) {
var c = p.parseRangeClientID(l);
t = this.$GraphQLStoreReader_store[c.dataID], i = c.calls, o = !0
} else o = p.isRangeNode(e), l && (t = l in this.$GraphQLStoreReader_store ? this.$GraphQLStoreReader_store[l] : this.$GraphQLStoreReader_queuedStore[l]), o && (i = e.getCalls());
if (!t) return t;
if (o) {
if (0 === i.length) throw new Error("The field " + e.getFieldName() + " is a range node, and thus expected to have a first() or last() filter call.");
var d;
t.__range__ ? d = t.__range__ : !l && t[g] && (d = a(t[g], i)), d && (s = d.retrieveRangeInfoForQuery(i, {}, u))
}
var h;
if (__DEV__ && (h = {}), n = this.$GraphQLStoreReader_traverseNode(e, t, u, s, n, r, h), !n && r) n = r, t.__status__ !== r.__status__ && (n = this.$GraphQLStoreReader_createSink(n, r), n.__status__ = t.__status__);
else {
n = n || {};
var f = l && o && !p.isRangeClientID(l);
n.__dataID__ = f ? p.getClientIDForRangeWithID(e, {}, l) : l, n.__masked__ = l ? void 0 : t, n.__status__ = t.__status__
}
return n
}, i.prototype.$GraphQLStoreReader_traverseNode = function(e, t, n, r, o, i, a) {
for (var s = e.getOwnFields(), l = 0; l < s.length; l++) __DEV__ && v(s[l], a), o = this.$GraphQLStoreReader_retrieveSubfield(s[l], t, n, r, o, i);
for (var u = e.getFragments(), c = 0; c < u.length; c++) this.$GraphQLStoreReader_fragmentFilter(u[c]) && (o = this.$GraphQLStoreReader_traverseNode(u[c], t, n, r, o, i, a));
return o
}, i.prototype.$GraphQLStoreReader_retrieveSubfield = function(e, t, n, r, o, i) {
var a = e.getFieldName(),
l = e.getNameForClient(),
u = p.isRangeNode(e),
c = p.getStorageKeyForField(e, {}),
h = t[c],
f = n[c];
if (e.isGenerated()) return o;
if (a === m) {
var _ = r ? r.sessionID : null;
(o || !i || i[l] !== _) && (o = this.$GraphQLStoreReader_createSink(o, i), o[l] = _)
} else if (a === y) {
if (!r) return o;
var v = this.retrieveData(e, r.pageInfo, o && o[l], i && i[l]);
(o || !i || i[l] !== v) && (o = this.$GraphQLStoreReader_createSink(o, i), o[l] = v)
} else if (a === g && r) {
var S = this.$GraphQLStoreReader_retrieveRangeData(e, r, o && o[l], i && i[l]);
(o || !i || i[l] !== S && void 0 !== S) && (o = this.$GraphQLStoreReader_createSink(o, i), o[l] = S || [])
} else if (null === h)(o || !i || i[l] !== h) && (o = this.$GraphQLStoreReader_createSink(o, i), o[l] = h);
else if (void 0 === h && void 0 === f) !t.__dataID__ && t.hasOwnProperty(a) && s.warn("Data source has key '%s' but GraphQLStore expected '%s'.", a, c), i && i[l] !== h && (o = this.$GraphQLStoreReader_createSink(o, i), o[l] = h);
else if (Array.isArray(h)) {
for (var w = 0; w < h.length; w++) {
var b;
b = "object" == typeof h[w] ? this.retrieveData(e, h[w], o && o[l] && o[l][w], i && i[l] && i[l][w]) : h[w], i && i[l] === b || (o = this.$GraphQLStoreReader_createSink(o, i), o[l] = o[l] || [], o[l][w] = b)
}(o || !i) && (o = o || {}, o[l] = o[l] || i && i[l] || [])
} else if (e.hasFields()) {
var R = this.retrieveData(e, h || f, o && o[l], i && i[l]);
(o || !i || i[l] !== R) && (o = this.$GraphQLStoreReader_createSink(o, i), o[l] = R)
} else if (u) o = o || {}, o[l] = d.createPointerWithID(p.getClientIDForRangeWithID(e, {}, h.__dataID__));
else {
var C = void 0 !== f ? f : h;
(o || !i || i[l] !== C) && (o = this.$GraphQLStoreReader_createSink(o, i), o[l] = C)
}
return o
}, i.prototype.$GraphQLStoreReader_retrieveRangeData = function(e, t, n, r) {
for (var o = t.requestedEdges, i = 0, a = 0; a < o.length; a++) {
var l = o[a];
if (l) {
var u = l[_].__dataID__;
if (!u || null !== this.$GraphQLStoreReader_queuedStore[u] && (this.$GraphQLStoreReader_store[u] || this.$GraphQLStoreReader_queuedStore[u])) {
0 === l.__dataID__.indexOf("fakeEdge:") && delete l.__dataID__;
var c = this.retrieveData(e, l, n && n[i], r && r[i]);
(n || !r || r[i] !== c) && (n = n || r && r.slice(0) || [], n[i] = c), i++
} else s.warn("dataID %s has no data, but is still referenced in range", u)
} else s.warn("Received a null edge from the range")
}
return r ? (n ? n.length > i && (n = n.slice(0, i)) : r.length > i && (n = r.slice(0, i)), n) : n || []
}, i.prototype.$GraphQLStoreReader_createSink = function(e, t) {
return e && e !== t ? e : t ? Object.assign({}, t) : {}
}, l.instrumentMethods(i.prototype, {
retrieveData: "GraphQLStoreReader.retrieveData"
});
var v;
__DEV__ && (v = function(e, t) {
var n = e.getNameForClient(),
r = e.getGeneratedAlias(),
o = t[n];
o ? o !== r && console.error("`%s` is used as an alias twice. Please rename one of them.", n) : t[n] = r
}), o.exports = i
}), __d("GraphQLRange", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
for (var n = {}, r = 0; r < e.length; r++) {
var o = e[r].getName(),
i = e[r].getArgs();
if (i.length) {
var a = i[0] instanceof h.CallVariable ? t[i[0].getCallVariableName()] : i[0].getCallValue();
if (null === a) continue;
n[o] = a
}
}
return n.first ? (isNaN(n.first) && _(0, "Argument for first query must be a number"), n.first = +n.first) : n.last && (isNaN(n.last) && _(0, "Argument for last query must be a number"), n.last = +n.last), n.client_session && (isNaN(n.client_session) && _(0, "Argument for sessionID call must be a number"), n.client_session = +n.client_session), n
}
function a(e) {
return e.hasOwnProperty("surrounds") || e.hasOwnProperty("find")
}
function s(e) {
var t = e.hasOwnProperty("first"),
n = e.hasOwnProperty("last");
return (t || n) && !(t && n)
}
function l(e) {
void 0 === g.getID(e) && _(0, "GraphQLStore: `edge` must have a data id"), void 0 === e.node && _(0, "GraphQLStore: `edge` must have `node` field")
}
function u(e) {
e.forEach(l)
}
function c(e) {
this.$GraphQLRange_dataStore = e, this.reset()
}
function d(e, t) {
return e.map(function(e) {
return e.toString(t)
}).join(",")
}
var p = t("DliteLog"),
h = t("GraphQL_EXPERIMENTAL"),
f = t("GraphQLMutatorConstants"),
m = t("GraphQLSegment"),
g = t("GraphQLStoreDataHandler"),
_ = t("invariant"),
y = t("merge"),
v = {
start_cursor: void 0,
end_cursor: void 0,
has_next_page: !1,
has_previous_page: !1
},
S = 1e3;
c.prototype.setDataStore = function(e) {
this.$GraphQLRange_dataStore = e
}, c.prototype.reset = function() {
this.$GraphQLRange_orderedSegments = [new m, new m], this.$GraphQLRange_staticQueriesMap = {}, this.$GraphQLRange_hasFirst = !1, this.$GraphQLRange_hasLast = !1, this.$GraphQLRange_sessionID = S
}, c.prototype.$GraphQLRange_resetSegment = function(e) {
e >= 0 && e < this.$GraphQLRange_orderedSegments.length || _(0, "cannot reset non-existent segment"), this.$GraphQLRange_orderedSegments[e] = new m(this.$GraphQLRange_orderedSegments[e].getSessionID())
}, c.prototype.$GraphQLRange_getSegmentIndexByCursor = function(e) {
for (var t = 0; t < this.$GraphQLRange_orderedSegments.length; t++)
if (this.$GraphQLRange_orderedSegments[t].containsEdgeWithCursor(e)) return t;
return null
}, c.prototype.$GraphQLRange_getSegmentIndexByID = function(e) {
for (var t = 0; t < this.$GraphQLRange_orderedSegments.length; t++)
if (this.$GraphQLRange_orderedSegments[t].containsEdgeWithID(e)) return t;
return null
}, c.prototype.$GraphQLRange_addStaticEdges = function(e, t, n) {
for (var r = d(e, t), o = [], i = [], a = 0; a < n.length; a++) {
var s = n[a];
o.push(g.getID(s)), i.push(s.cursor)
}
this.$GraphQLRange_staticQueriesMap[r] = {
edgeIDs: o,
cursors: i
}
}, c.prototype.addItems = function(e, t, n, r) {
u(n);
var o, l, c = i(e, t);
return a(c) ? void this.$GraphQLRange_addStaticEdges(e, t, n) : s(c) ? null === c.before || null === c.after ? void console.error("GraphQLRange received null as a cursor.") : (this.$GraphQLRange_sessionID++, void(c.first ? c.before && !c.after ? r.has_next_page === !0 ? (0 === this.$GraphQLRange_getSegmentIndexByCursor(c.before) && this.$GraphQLRange_orderedSegments.unshift(new m(this.$GraphQLRange_sessionID)), this.$GraphQLRange_addAfterFirstItems(n, r.has_next_page, void 0, c.before, null)) : this.$GraphQLRange_addBeforeLastItems(n, r.has_previous_page, c.before, void 0, this.$GraphQLRange_sessionID) : (c.after || (l = 0, o = this.getFirstSegment().getCount(), o && (c.first > o || n.length > o) && !this.getFirstSegment().getFirstCursor() && this.$GraphQLRange_resetSegment(l)), this.$GraphQLRange_addAfterFirstItems(n, r.has_next_page, c.after, c.before, null)) : c.last && (c.after && !c.before ? r.has_previous_page === !0 ? (this.$GraphQLRange_getSegmentIndexByCursor(c.after) === this.$GraphQLRange_orderedSegments.length - 1 && this.$GraphQLRange_orderedSegments.push(new m(this.$GraphQLRange_sessionID)), this.$GraphQLRange_addBeforeLastItems(n, r.has_previous_page, void 0, c.after, null)) : this.$GraphQLRange_addAfterFirstItems(n, r.has_next_page, c.after, void 0, this.$GraphQLRange_sessionID) : (c.before || (l = this.$GraphQLRange_orderedSegments.length - 1, o = this.getLastSegment().getCount(), o && (c.last > o || n.length > o) && !this.getLastSegment().getLastCursor() && this.$GraphQLRange_resetSegment(l)), this.$GraphQLRange_addBeforeLastItems(n, r.has_previous_page, c.before, c.after, null))))) : void console.error("GraphQLRange currently only handles first(<count>), after(<cursor>).first(<count>), last(<count>), before(<cursor>).last(<count>), before(<cursor>).first(<count>), and after(<cursor>).last(<count>)")
}, c.prototype.getFirstSegment = function() {
return this.$GraphQLRange_orderedSegments[0]
}, c.prototype.getLastSegment = function() {
return this.$GraphQLRange_orderedSegments[this.$GraphQLRange_orderedSegments.length - 1]
}, c.prototype.$GraphQLRange_concatSegments = function(e) {
e + 1 < this.$GraphQLRange_orderedSegments.length && e >= 0 || _(0, "GraphQLRange cannot concat segments outside the range of orderedSegments");
var t = this.$GraphQLRange_orderedSegments[e],
n = this.$GraphQLRange_orderedSegments[e + 1];
t.concatSegment(n) ? this.$GraphQLRange_orderedSegments.splice(e + 1, 1) : console.error("GraphQLRange was unable to concat segment %d and segment %d", e, e + 1)
}, c.prototype.prependEdge = function(e) {
l(e), this.$GraphQLRange_sessionID++, this.$GraphQLRange_hasFirst = !0;
var t = this.getFirstSegment();
this.$GraphQLRange_removeEdgeIfApplicable(e, this.$GraphQLRange_sessionID), t.prependEdge(e, this.$GraphQLRange_sessionID)
}, c.prototype.appendEdge = function(e) {
l(e), this.$GraphQLRange_sessionID++, this.$GraphQLRange_hasLast = !0;
var t = this.getLastSegment();
this.$GraphQLRange_removeEdgeIfApplicable(e, this.$GraphQLRange_sessionID), t.appendEdge(e, this.$GraphQLRange_sessionID)
}, c.prototype.$GraphQLRange_removeEdgeIfApplicable = function(e, t) {
var n = g.getID(e),
r = this.$GraphQLRange_getSegmentIndexByID(n);
null != r && this.$GraphQLRange_orderedSegments[r].removeEdge(n, t)
}, c.prototype.$GraphQLRange_removeEdgesIfApplicable = function(e, t) {
for (var n = 0; n < e.length; n++) this.$GraphQLRange_removeEdgeIfApplicable(e[n], t ? t : S)
}, c.prototype.$GraphQLRange_addAfterFirstItems = function(e, t, n, r, o) {
var i, a, s;
if (void 0 !== n) {
if (a = this.$GraphQLRange_getSegmentIndexByCursor(n), null == a) return void console.error("GraphQLRange cannot find a segment that has the cursor: " + n);
if (i = this.$GraphQLRange_orderedSegments[a], s = i.getLastCursor(), s !== n && (e = this.$GraphQLRange_reconcileAfterFirstEdges(i, e, n), n = s, !e)) return
} else if (a = 0, i = this.$GraphQLRange_orderedSegments[a], s = i.getLastCursor(), void 0 !== s && (e = this.$GraphQLRange_reconcileAfterFirstEdges(i, e), n = s, !e)) return;
if (void 0 !== r) {
if (a === this.$GraphQLRange_orderedSegments.length - 1) return void console.error("GraphQLRange cannot add because there is no next segment");
if (this.$GraphQLRange_orderedSegments[a + 1].getFirstCursor() !== r) return void console.error("GraphQLRange cannot add because beforeCursor does not match first cursor of the next segment")
}
void 0 === n && (this.$GraphQLRange_hasFirst = !0), o = o || i.getSessionID(), this.$GraphQLRange_removeEdgesIfApplicable(e, o), i.addEdgesAfterCursor(e, n, o), t || (void 0 !== r ? this.$GraphQLRange_concatSegments(a) : (this.$GraphQLRange_hasLast = !0, this.$GraphQLRange_orderedSegments.splice(a + 1, this.$GraphQLRange_orderedSegments.length - 1 - a)))
}, c.prototype.$GraphQLRange_reconcileAfterFirstEdges = function(e, t, n) {
var r = e.getMetadataAfterCursor(t.length + 1, n),
o = r.edgeIDs;
if (o.length > t.length) return void 0;
for (var i = 0; i < o.length; i++)
if (o[i] !== g.getID(t[i])) return void p.warn("GraphQLRange cannot reconcile input because there is an id mismatch at index %s", i);
return t.slice(o.length)
}, c.prototype.$GraphQLRange_addBeforeLastItems = function(e, t, n, r, o) {
var i, a, s;
if (void 0 !== n) {
if (a = this.$GraphQLRange_getSegmentIndexByCursor(n), null == a) return void console.error("GraphQLRange cannot find a segment that has the cursor: " + n);
if (i = this.$GraphQLRange_orderedSegments[a], s = i.getFirstCursor(), s !== n && (e = this.$GraphQLRange_reconcileBeforeLastEdges(i, e, n), n = s, !e)) return
} else if (a = this.$GraphQLRange_orderedSegments.length - 1, i = this.$GraphQLRange_orderedSegments[a], s = i.getFirstCursor(), void 0 !== s && (e = this.$GraphQLRange_reconcileBeforeLastEdges(i, e, n), n = s, !e)) return;
if (void 0 !== r) {
if (0 === a) return void console.error("GraphQLRange cannot add because there is no previous segment");
if (this.$GraphQLRange_orderedSegments[a - 1].getLastCursor() !== r) return void console.error("GraphQLRange cannot add because afterCursor does not match last cursor of the previous segment")
}
void 0 === n && (this.$GraphQLRange_hasLast = !0), o = o || i.getSessionID(), this.$GraphQLRange_removeEdgesIfApplicable(e, o), i.addEdgesBeforeCursor(e, n, o), t || (void 0 !== r ? this.$GraphQLRange_concatSegments(a - 1) : (this.$GraphQLRange_hasFirst = !0, this.$GraphQLRange_orderedSegments.splice(0, a)))
}, c.prototype.$GraphQLRange_reconcileBeforeLastEdges = function(e, t, n) {
var r = e.getMetadataBeforeCursor(t.length + 1, n),
o = r.edgeIDs;
if (o.length > t.length) return void 0;
for (var i = 1; i <= o.length; i++)
if (o[o.length - i] !== g.getID(t[t.length - i])) return void p.warn("GraphQLRange cannot reconcile input because there is an id mismatch at index %s", i);
return t.slice(0, t.length - o.length)
}, c.prototype.removeEdgeWithID = function(e) {
var t = this.$GraphQLRange_getSegmentIndexByID(e);
null != t && this.$GraphQLRange_orderedSegments[t].removeEdge(e, S)
}, c.prototype.retrieveRangeInfoForQuery = function(e, t, n) {
var r = i(e, t);
return a(r) ? this.$GraphQLRange_retrieveRangeInfoForStaticCalls(e, t) : s(r) ? r.first && r.before || r.last && r.after ? (console.error("GraphQLRange does not currently handle retrieval for before(<cursor>).first(<count>) and after(<cursor>).last(<count>)"), {
requestedEdges: [],
diffCalls: [],
pageInfo: v,
sessionID: this.$GraphQLRange_sessionID
}) : r.first ? this.$GraphQLRange_retrieveRangeInfoForFirstQuery(e, t, n) : r.last ? this.$GraphQLRange_retrieveRangeInfoForLastQuery(e, t, n) : void 0 : (console.error("GraphQLRange currently only handles first(<count>), after(<cursor>).first(<count>), last(<count>), before(<cursor>).last(<count>), before(<cursor>).first(<count>), and after(<cursor>).last(<count>)"), {
requestedEdges: [],
diffCalls: [],
pageInfo: v,
sessionID: this.$GraphQLRange_sessionID
})
}, c.prototype.$GraphQLRange_getEdgeByID = function(e) {
return this.$GraphQLRange_dataStore[e]
}, c.prototype.$GraphQLRange_retrieveRangeInfoForStaticCalls = function(e, t) {
var n = d(e, t),
r = this.$GraphQLRange_staticQueriesMap[n];
if (r) {
var o = {
has_next_page: !0,
has_previous_page: !0
};
return o.start_cursor = r.cursors[0], o.end_cursor = r.cursors[r.cursors.length - 1], {
requestedEdges: r.edgeIDs.map(this.$GraphQLRange_getEdgeByID, this),
diffCalls: [],
pageInfo: o,
sessionID: this.$GraphQLRange_sessionID
}
}
return {
requestedEdges: [],
diffCalls: e,
pageInfo: v,
sessionID: this.$GraphQLRange_sessionID
}
}, c.prototype.$GraphQLRange_retrieveRangeInfoForFirstQuery = function(e, t, n) {
var r = [],
o = [];
n && (r = n[f.PREPEND] || [], o = n[f.REMOVE] || []);
var a, s, l = i(e, t),
u = l.first + o.length,
c = y(v);
c.sessionID = this.$GraphQLRange_sessionID;
var d = l.client_session ? l.client_session : null,
p = l.after;
if (void 0 !== p) {
if (s = this.$GraphQLRange_getSegmentIndexByCursor(p), null == s) return console.error("GraphQLRange cannot find a segment that has the cursor: " + p), {
requestedEdges: [],
diffCalls: [],
pageInfo: c,
sessionID: this.$GraphQLRange_sessionID
};
a = this.$GraphQLRange_orderedSegments[s]
} else {
var m = r.length;
if (u -= m, s = 0, a = this.$GraphQLRange_orderedSegments[s], d)
for (; s < this.$GraphQLRange_orderedSegments.length - 1 && a.getSessionID() > d;) s++, a = this.$GraphQLRange_orderedSegments[s]
}
var _ = a.getMetadataAfterCursor(u, p, d),
S = _.edgeIDs,
w = _.cursors,
b = [];
if (w.length && (c.start_cursor = w[0], c.end_cursor = w[w.length - 1]), (!this.$GraphQLRange_hasLast || s !== this.$GraphQLRange_orderedSegments.length - 1 || c.end_cursor && c.end_cursor !== a.getLastCursor(d)) && (c.has_next_page = !0, S.length < u)) {
u -= S.length;
var R = a.getLastCursor();
if (null === R) b.push(new h.Call("first", l.first));
else {
if (void 0 !== R && b.push(new h.Call("after", R)), s !== this.$GraphQLRange_orderedSegments.length - 1) {
var C = this.$GraphQLRange_orderedSegments[s + 1],
E = C.getFirstCursor();
void 0 !== E && b.push(new h.Call("before", E))
}
b.push(new h.Call("first", u))
}
}
var D = S.map(this.$GraphQLRange_getEdgeByID, this);
return l.after || (D = r.concat(D)), o.length && (D = D.filter(function(e) {
var t = g.getID(e);
return -1 == o.indexOf(t)
})), {
requestedEdges: D,
diffCalls: b,
pageInfo: c,
sessionID: this.$GraphQLRange_sessionID
}
}, c.prototype.$GraphQLRange_retrieveRangeInfoForLastQuery = function(e, t, n) {
var r = [],
o = [];
n && (r = n[f.APPEND] || [], o = n[f.REMOVE] || []);
var a, s, l = i(e, t),
u = l.last + o.length,
c = y(v);
c.sessionID = this.$GraphQLRange_sessionID;
var d = l.client_session ? l.client_session : null,
p = l.before;
if (void 0 !== p) {
if (s = this.$GraphQLRange_getSegmentIndexByCursor(p), null == s) return console.error("GraphQLRange cannot find a segment that has the cursor: " + p), {
requestedEdges: [],
diffCalls: [],
pageInfo: c,
sessionID: this.$GraphQLRange_sessionID
};
a = this.$GraphQLRange_orderedSegments[s]
} else {
var m = r.length;
if (u -= m, s = this.$GraphQLRange_orderedSegments.length - 1, a = this.$GraphQLRange_orderedSegments[s], d)
for (; s > 0 && a.getSessionID() > d;) s--, a = this.$GraphQLRange_orderedSegments[s]
}
var _ = a.getMetadataBeforeCursor(u, p, d),
S = _.edgeIDs,
w = _.cursors,
b = [];
if (w.length && (c.start_cursor = w[0], c.end_cursor = w[w.length - 1]), (!this.$GraphQLRange_hasFirst || 0 !== s || c.start_cursor && c.start_cursor !== a.getFirstCursor(d)) && (c.has_previous_page = !0, S.length < u)) {
u -= S.length;
var R = a.getFirstCursor();
if (null === R) b.push(new h.Call("last", l.last));
else {
if (void 0 !== R && b.push(new h.Call("before", R)), 0 !== s) {
var C = this.$GraphQLRange_orderedSegments[s - 1],
E = C.getLastCursor();
void 0 !== E && b.push(new h.Call("after", E))
}
b.push(new h.Call("last", u))
}
}
var D = S.map(this.$GraphQLRange_getEdgeByID, this);
return l.before || (D = D.concat(r)), o.length && (D = D.filter(function(e) {
var t = g.getID(e);
return -1 == o.indexOf(t)
})), {
requestedEdges: D,
diffCalls: b,
pageInfo: c,
sessionID: this.$GraphQLRange_sessionID
}
}, c.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1],
o = t[2],
i = t[3],
a = t[4],
s = new c;
return s.$GraphQLRange_hasFirst = n, s.$GraphQLRange_hasLast = r, s.$GraphQLRange_sessionID = o, s.$GraphQLRange_staticQueriesMap = i, s.$GraphQLRange_orderedSegments = a.map(function(e) {
return m.fromJSON(e)
}), s
}, c.prototype.toJSON = function() {
return [this.$GraphQLRange_hasFirst, this.$GraphQLRange_hasLast, this.$GraphQLRange_sessionID, this.$GraphQLRange_staticQueriesMap, this.$GraphQLRange_orderedSegments]
}, c.prototype.__debug = function() {
return {
dataStore: this.$GraphQLRange_dataStore,
orderedSegments: this.$GraphQLRange_orderedSegments
}
}, o.exports = c
}), __d("GraphQLSegment", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
this.$GraphQLSegment_indexToMetadataMap = {}, this.$GraphQLSegment_idToIndexMap = {}, this.$GraphQLSegment_cursorToIndexMap = {}, this.$GraphQLSegment_count = 0, this.$GraphQLSegment_minIndex = null, this.$GraphQLSegment_maxIndex = null, this.$GraphQLSegment_sessionID = e
}
var a = t("GraphQLConstants"),
s = t("GraphQLStoreDataHandler");
i.prototype.$GraphQLSegment_getIndexForCursor = function(e) {
return this.$GraphQLSegment_cursorToIndexMap[e]
}, i.prototype.$GraphQLSegment_getIndexForID = function(e) {
return this.$GraphQLSegment_idToIndexMap[e]
}, i.prototype.getFirstCursor = function(e) {
if (this.getLength())
for (var t = this.$GraphQLSegment_minIndex; t <= this.$GraphQLSegment_maxIndex; t++) {
var n = this.$GraphQLSegment_indexToMetadataMap[t];
if (this.$GraphQLSegment_edgeExistsAtSession(n, e)) return n.cursor
}
}, i.prototype.getLastCursor = function(e) {
if (this.getLength())
for (var t = this.$GraphQLSegment_maxIndex; t >= this.$GraphQLSegment_minIndex; t--) {
var n = this.$GraphQLSegment_indexToMetadataMap[t];
if (this.$GraphQLSegment_edgeExistsAtSession(n, e)) return n.cursor
}
}, i.prototype.$GraphQLSegment_getEdgeAtIndex = function(e) {
var t = this.$GraphQLSegment_indexToMetadataMap[e];
return t && !t.removalTime ? t : null
}, i.prototype.containsEdgeWithID = function(e) {
var t = this.$GraphQLSegment_getIndexForID(e);
return void 0 === t ? !1 : !!this.$GraphQLSegment_getEdgeAtIndex(t)
}, i.prototype.containsEdgeWithCursor = function(e) {
var t = this.$GraphQLSegment_getIndexForCursor(e);
return void 0 === t ? !1 : !!this.$GraphQLSegment_getEdgeAtIndex(t)
}, i.prototype.$GraphQLSegment_edgeExistsAtSession = function(e, t) {
return null == t ? !e.removalTime : e.cursor === a.DUMMY_CURSOR_ID ? !e.removalTime || e.removalTime > t : (!e.removalTime || e.removalTime > t) && (!e.insertionTime || e.insertionTime <= t)
}, i.prototype.getMetadataAfterCursor = function(e, t, n) {
if (!this.getLength()) return {
edgeIDs: [],
cursors: []
};
var r = this.$GraphQLSegment_minIndex;
if (t) {
var o = this.$GraphQLSegment_getIndexForCursor(t);
if (void 0 === o) return console.error("This segment does not have a cursor %s", t), {
edgeIDs: [],
cursors: []
};
r = o + 1
}
for (var i = 0, a = [], s = []; r <= this.$GraphQLSegment_maxIndex && e > i;) {
var l = this.$GraphQLSegment_indexToMetadataMap[r];
this.$GraphQLSegment_edgeExistsAtSession(l, n) && (a.push(l.edgeID), s.push(l.cursor), i++), r++
}
return {
edgeIDs: a,
cursors: s
}
}, i.prototype.getMetadataBeforeCursor = function(e, t, n) {
if (!this.getLength()) return {
edgeIDs: [],
cursors: []
};
var r = this.$GraphQLSegment_maxIndex;
if (t) {
var o = this.$GraphQLSegment_getIndexForCursor(t);
if (void 0 === o) return console.error("This segment does not have a cursor %s", t), {
edgeIDs: [],
cursors: []
};
r = o - 1
}
for (var i = 0, a = [], s = []; r >= this.$GraphQLSegment_minIndex && e > i;) {
var l = this.$GraphQLSegment_indexToMetadataMap[r];
this.$GraphQLSegment_edgeExistsAtSession(l, n) && (a.push(l.edgeID), s.push(l.cursor), i++), r--
}
return {
edgeIDs: a.reverse(),
cursors: s.reverse()
}
}, i.prototype.$GraphQLSegment_addEdgeAtIndex = function(e, t, n) {
if (0 === this.getLength()) this.$GraphQLSegment_minIndex = t, this.$GraphQLSegment_maxIndex = t;
else if (this.$GraphQLSegment_minIndex == t + 1) this.$GraphQLSegment_minIndex = t;
else {
if (this.$GraphQLSegment_maxIndex != t - 1) return void console.error("Attempted to add noncontiguous index to GraphQLSegment: " + t + " to (" + this.$GraphQLSegment_minIndex + ", " + this.$GraphQLSegment_maxIndex + ")");
this.$GraphQLSegment_maxIndex = t
}
var r = s.getID(e),
o = e.cursor,
i = this.$GraphQLSegment_getIndexForID(r);
return void 0 !== i && this.$GraphQLSegment_getEdgeAtIndex(i) ? void console.error("Attempted to add an ID already in GraphQLSegment: %s", r) : (this.$GraphQLSegment_indexToMetadataMap[t] = {
edgeID: r,
cursor: o,
insertionTime: n || null,
removalTime: null
}, this.$GraphQLSegment_idToIndexMap[r] = t, this.$GraphQLSegment_count++, void(o && (this.$GraphQLSegment_cursorToIndexMap[o] = t)))
}, i.prototype.prependEdge = function(e, t) {
this.$GraphQLSegment_addEdgeAtIndex(e, null !== this.$GraphQLSegment_minIndex ? this.$GraphQLSegment_minIndex - 1 : 0, t)
}, i.prototype.appendEdge = function(e, t) {
this.$GraphQLSegment_addEdgeAtIndex(e, null !== this.$GraphQLSegment_maxIndex ? this.$GraphQLSegment_maxIndex + 1 : 0, t)
}, i.prototype.removeEdge = function(e, t) {
var n = this.$GraphQLSegment_getIndexForID(e);
if (void 0 === n) return void console.error("Attempted to remove edge with ID that was never in GraphQLSegment: " + e);
var r = this.$GraphQLSegment_indexToMetadataMap[n];
return r.removalTime ? void console.error("Attempted to remove edge with ID that was already removed: " + e) : (r.removalTime = t, void this.$GraphQLSegment_count--)
}, i.prototype.addEdgesAfterCursor = function(e, t, n) {
var r = -1;
if (t && (r = this.$GraphQLSegment_getIndexForCursor(t), void 0 === r)) return void console.error("This segment does not have a cursor %s", t);
for (; null !== this.$GraphQLSegment_maxIndex && r < this.$GraphQLSegment_maxIndex;) {
var o = this.$GraphQLSegment_indexToMetadataMap[r + 1];
if (!o.removalTime) return void console.error("Attempted to do an overwrite to GraphQLSegment: last index is " + this.$GraphQLSegment_maxIndex + " trying to add edges before " + r);
r++
}
for (var i = r + 1, a = 0; a < e.length; a++) {
var s = e[a];
this.$GraphQLSegment_addEdgeAtIndex(s, i + a, n)
}
}, i.prototype.addEdgesBeforeCursor = function(e, t, n) {
var r = 1;
if (t && (r = this.$GraphQLSegment_getIndexForCursor(t), void 0 === r)) return void console.error("This segment does not have a cursor %s", t);
for (; null !== this.$GraphQLSegment_minIndex && r > this.$GraphQLSegment_minIndex;) {
var o = this.$GraphQLSegment_indexToMetadataMap[r - 1];
if (!o.removalTime) return void console.error("Attempted to do an overwrite to GraphQLSegment: first index is " + this.$GraphQLSegment_minIndex + " trying to add edges after " + r);
r--
}
for (var i = r - 1, a = 0; a < e.length; a++) {
var s = e[e.length - a - 1];
this.$GraphQLSegment_addEdgeAtIndex(s, i - a, n)
}
}, i.prototype.getLength = function() {
return null === this.$GraphQLSegment_minIndex && null === this.$GraphQLSegment_maxIndex ? 0 : this.$GraphQLSegment_maxIndex - this.$GraphQLSegment_minIndex + 1
}, i.prototype.getCount = function() {
return this.$GraphQLSegment_count
}, i.prototype.getSessionID = function() {
return this.$GraphQLSegment_sessionID
}, i.prototype.$GraphQLSegment_rollback = function(e, t, n) {
Object.assign(this.$GraphQLSegment_cursorToIndexMap, e), Object.assign(this.$GraphQLSegment_idToIndexMap, t), this.$GraphQLSegment_count = n.count, this.$GraphQLSegment_maxIndex = n.maxIndex, this.$GraphQLSegment_minIndex = n.minIndex
}, i.prototype.$GraphQLSegment_getCounterState = function() {
return {
count: this.$GraphQLSegment_count,
maxIndex: this.$GraphQLSegment_maxIndex,
minIndex: this.$GraphQLSegment_minIndex
}
}, i.prototype.concatSegment = function(e) {
if (!e.getLength()) return !0;
for (var t = {}, n = {}, r = this.$GraphQLSegment_getCounterState(), o = e.$GraphQLSegment_indexToMetadataMap, i = e.$GraphQLSegment_minIndex; i <= e.$GraphQLSegment_maxIndex; i++) {
var a;
this.getLength() ? a = this.$GraphQLSegment_maxIndex + 1 : (a = 0, this.$GraphQLSegment_minIndex = 0), this.$GraphQLSegment_maxIndex = a;
var s = o[i],
l = this.$GraphQLSegment_getIndexForID(s.edgeID);
if (void 0 !== l) {
var u = this.$GraphQLSegment_indexToMetadataMap[l];
if (u.removalTime && (!s.removalTime || u.removalTime < s.removalTime)) t[s.edgeID] = this.$GraphQLSegment_idToIndexMap[s.edgeID], this.$GraphQLSegment_idToIndexMap[s.edgeID] = a;
else if (!s.removalTime) return console.error("Attempt to concat an ID already in GraphQLSegment: %s", s.edgeID), this.$GraphQLSegment_rollback(n, t, r), !1
} else t[s.edgeID] = this.$GraphQLSegment_idToIndexMap[s.edgeID], this.$GraphQLSegment_idToIndexMap[s.edgeID] = a;
var c = this.$GraphQLSegment_getIndexForCursor(s.cursor);
if (void 0 !== c) {
var d = this.$GraphQLSegment_indexToMetadataMap[c];
if (d.removalTime && (!s.removalTime || d.removalTime < s.removalTime)) n[s.cursor] = this.$GraphQLSegment_cursorToIndexMap[s.cursor], this.$GraphQLSegment_cursorToIndexMap[s.cursor] = a;
else if (!s.removalTime) return console.error("Attempt to concat a cursor already in GraphQLSegment: %s", s.cursor), this.$GraphQLSegment_rollback(n, t, r), !1
} else s.cursor && (n[s.cursor] = this.$GraphQLSegment_cursorToIndexMap[s.cursor], this.$GraphQLSegment_cursorToIndexMap[s.cursor] = a);
s.removalTime || this.$GraphQLSegment_count++, this.$GraphQLSegment_indexToMetadataMap[a] = Object.assign({}, s)
}
return this.getSessionID() && (!e.getSessionID() || e.getSessionID() < this.getSessionID()) && (this.$GraphQLSegment_sessionID = e.getSessionID()), !0
}, i.prototype.toJSON = function() {
return [this.$GraphQLSegment_sessionID, this.$GraphQLSegment_indexToMetadataMap, this.$GraphQLSegment_idToIndexMap, this.$GraphQLSegment_cursorToIndexMap, this.$GraphQLSegment_minIndex, this.$GraphQLSegment_maxIndex, this.$GraphQLSegment_count]
}, i.fromJSON = function(e) {
var t = e,
n = t[0],
r = t[1],
o = t[2],
a = t[3],
s = t[4],
l = t[5],
u = t[6],
c = new i(n);
return c.$GraphQLSegment_indexToMetadataMap = r, c.$GraphQLSegment_idToIndexMap = o, c.$GraphQLSegment_cursorToIndexMap = a, c.$GraphQLSegment_minIndex = s, c.$GraphQLSegment_maxIndex = l, c.$GraphQLSegment_count = u, c
}, i.prototype.__debug = function() {
return {
metadata: this.$GraphQLSegment_indexToMetadataMap,
idToIndex: this.$GraphQLSegment_idToIndexMap,
cursorToIndex: this.$GraphQLSegment_cursorToIndexMap
}
}, o.exports = i
}), __d("GraphQLStoreWriter", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n, r, o, i, a, s) {
this.$GraphQLStoreWriter_nodeData = e, this.$GraphQLStoreWriter_queuedData = t, this.$GraphQLStoreWriter_queryTracker = n, this.$GraphQLStoreWriter_nodeRangeTracker = r, this.$GraphQLStoreWriter_mutationIDToClientNodeIDMap = o, this.$GraphQLStoreWriter_onChange = a, this.$GraphQLStoreWriter_forceIndex = s || null, !i || i in p.UPDATE_TYPES || S(0, "Invalid mutation update type %s passed into GraphQLStore", i), this.$GraphQLStoreWriter_shouldUpdateTrackedQueries = !i, this.$GraphQLStoreWriter_isOptimisticUpdate = i === p.OPTIMISTIC_UPDATE, this.$GraphQLStoreWriter_newlyAddedIDs = {}
}
function a(e) {
return e.split(".")[0]
}
function s(e, t) {
if (1 === e.length && e[0] === D) return d.VIEWER_CLIENT_ID;
for (var n = 0; n < e.length; n++) {
var r = e[n];
if (!t || !t.hasOwnProperty(r)) return null;
t = t[r]
}
return t && t.id && "string" == typeof t.id ? t.id : null
}
function l(e, t) {
for (var n in e)
if (n === t) return e[n];
return null
}
var u = t("DliteLog"),
c = t("GraphQL_EXPERIMENTAL"),
d = t("GraphQLConstants"),
p = t("GraphQLMutatorConstants"),
h = t("GraphQLRange"),
f = t("GraphQLRangeTracker"),
m = t("GraphQLStoreDataHandler"),
g = t("GraphQLStoreQueryPath"),
_ = t("GraphQLStoreRangeUtils"),
y = t("generateClientID"),
v = t("generateClientEdgeID"),
S = t("invariant"),
w = t("isEmpty"),
b = d.EDGES,
R = d.NODE,
C = d.NODES,
E = d.PAGE_INFO,
D = d.VIEWER,
x = {
error: !0,
client_mutation_id: !0
},
F = new c.Field(b, null, null, null, null, null, {
plural: !0
});
i.prototype.handleFieldMergeMutation = function(e, t) {
var n = Object.keys(e).filter(function(e) {
return !x[e]
});
1 !== n.length && S(0, "Simple mutations must have exactly one top-level payload field.");
var r, o = n[0];
o === D && (r = g.prunePathForDataID(d.VIEWER_CLIENT_ID));
var i = function(n) {
var a = n.getOwnField(o);
a && this.$GraphQLStoreWriter_storeField(t, a, e, {}, r), n.getFragments().forEach(i)
}.bind(this);
i(t)
}, i.prototype.handleMergeMutation = function(e, t) {
for (var n in e)
if (e.hasOwnProperty(n)) {
var r = e[n];
if ("object" == typeof r && ("id" in r || n === d.VIEWER || Array.isArray(r))) {
var o = {};
o[n] = r, this.handleFieldMergeMutation(o, t)
}
}
}, i.prototype.handleRangeAddMutation = function(e, t, n, r) {
var o = e[n.edgeName];
o.node || S(0, "newly added edge must have node field");
var i;
n.sourceID ? i = n.sourceID : (o.source.id || S(0, "add mutation without sourceID in the config must have an id in the source field of the new edge"), i = o.source.id);
var a = e.client_mutation_id,
s = this.$GraphQLStoreWriter_getRanges(i, n.connectionName),
u = o.node.id ? o.node.id : y();
o.node.__dataID__ = u, this.$GraphQLStoreWriter_isOptimisticUpdate ? o.node.id = u : this.$GraphQLStoreWriter_shouldUpdateTrackedQueries = !0, o.cursor = o.cursor || d.DUMMY_CURSOR_ID;
for (var c = 0; c < s.length; c++) {
var h = l(r, s[c].calls.toString());
if (h) {
var f = s[c].rangeID,
g = this.$GraphQLStoreWriter_nodeData[f].__path__.clone();
g.pushField(F);
var _ = v(f, u),
w = !1,
b = function(e) {
var t = e.getOwnField(n.edgeName);
t && (this.storeNodeWithID(t, o, _, g), w = !0), e.getFragments().forEach(b)
}.bind(this);
if (b(t), w || S(0, "Mutation query must include the relevant edge"), this.$GraphQLStoreWriter_isOptimisticUpdate) this.$GraphQLStoreWriter_handleOptimisticRangeUpdate(this.$GraphQLStoreWriter_queuedData[_], f, h);
else {
var R = this.$GraphQLStoreWriter_nodeData[_];
switch (h) {
case p.PREPEND:
s[c].range.prependEdge(R);
break;
case p.APPEND:
s[c].range.appendEdge(R);
break;
default:
console.error("Invalid GraphQLRange operation")
}
this.$GraphQLStoreWriter_nodeRangeTracker.addRangeIDForNodeID(f, u);
var C = this.$GraphQLStoreWriter_mutationIDToClientNodeIDMap[a];
C && (m.updateClientServerIDMap(C, R.node.__dataID__), delete this.$GraphQLStoreWriter_mutationIDToClientNodeIDMap[a])
}
}
}
this.$GraphQLStoreWriter_isOptimisticUpdate && (this.$GraphQLStoreWriter_mutationIDToClientNodeIDMap[a] = u), this.$GraphQLStoreWriter_onChange && this.$GraphQLStoreWriter_onChange(i)
}, i.prototype.handleRangeDeleteMutation = function(e, t) {
var n = e[t.deletedIDFieldName];
void 0 === n && S(0, "deleted id must be in the payload");
var r = t.pathToConnection.pop(),
o = s(t.pathToConnection, e);
if (t.pathToConnection.push(r), o)
for (var i = this.$GraphQLStoreWriter_getRanges(o, r), a = 0; a < i.length; a++) this.deleteNodeFromRangeWithID(n, i[a].rangeID)
}, i.prototype.handleNodeDeleteMutation = function(e, t) {
var n = e[t.deletedIDFieldName];
void 0 === n && S(0, "deleted id must be in the payload"), this.deleteNodeWithID(n)
}, i.prototype.deleteNodeFromRangeWithID = function(e, t) {
var n = v(t, e);
if (this.$GraphQLStoreWriter_isOptimisticUpdate) this.$GraphQLStoreWriter_handleOptimisticRangeUpdate(n, t, p.REMOVE);
else {
var r = this.$GraphQLStoreWriter_nodeData[t];
r.__range__.removeEdgeWithID(n)
}
this.$GraphQLStoreWriter_onChange && this.$GraphQLStoreWriter_onChange(t), this.deleteNodeWithID(n)
}, i.prototype.deleteNodeWithID = function(e) {
var t = this.$GraphQLStoreWriter_queuedData[e] || this.$GraphQLStoreWriter_nodeData[e];
if (null !== t) {
var n = this.$GraphQLStoreWriter_getNodeSink();
null !== n[e] && (n[e] = null, this.$GraphQLStoreWriter_nodeRangeTracker.getRangeIDsForNodeID(e).forEach(function(t) {
this.deleteNodeFromRangeWithID(e, t)
}.bind(this)), this.$GraphQLStoreWriter_isOptimisticUpdate || this.$GraphQLStoreWriter_nodeRangeTracker.clearRangeIDsForNodeID(e), this.$GraphQLStoreWriter_onChange && this.$GraphQLStoreWriter_onChange(e))
}
}, i.prototype.storeNodeWithID = function(e, t, n, r) {
r = g.prunePathForDataID(n, r);
var o = this.$GraphQLStoreWriter_getNodeSink();
o[n] || (o[n] = m.createPointerWithID(n), this.$GraphQLStoreWriter_shouldUpdateTrackedQueries || (this.$GraphQLStoreWriter_newlyAddedIDs[n] = !0)), m.isClientID(n) && !o[n].__path__ && (o[n].__path__ = r.clone()), this.$GraphQLStoreWriter_traverseNode(e, t, o[n], r), (this.$GraphQLStoreWriter_shouldUpdateTrackedQueries || this.$GraphQLStoreWriter_newlyAddedIDs[n]) && this.$GraphQLStoreWriter_queryTracker.addQueryForID(n, e)
}, i.prototype.$GraphQLStoreWriter_traverseNode = function(e, t, n, r, o) {
for (var i = e.getOwnFields(), a = 0; a < i.length; a++) {
var s = i[a];
r.withField(s, function() {
this.$GraphQLStoreWriter_storeField(o || e, s, t, n, r)
}.bind(this))
}
for (var l = e.getFragments(), u = 0; u < l.length; u++) this.$GraphQLStoreWriter_traverseNode(l[u], t, n, r, o || e)
}, i.prototype.$GraphQLStoreWriter_storeField = function(e, t, n, r, o) {
var i, a, s = r.__dataID__,
l = _.getStorageKeyForField(t, {}),
u = t.getGeneratedAlias();
if (i = n.hasOwnProperty(u) ? n[u] : n[t.getGeneratedFieldName()], Array.isArray(i))
if (l == b && _.isRangeNode(e)) {
var c = e.getCalls();
if (w(c)) return void console.error("The field %s is a range node, and thus expected to have a first() or last() filter call", e.getFieldName());
s || S(0, "Parent of edges must have an ID");
for (var p, m = f.isFieldTracked(t, s), g = 0; g < i.length; g++) {
var x = i[g],
F = x.node;
if (null === F) p = p || i.slice(0, g);
else {
var I = F.id || F.__dataID__ || y(),
T = v(s, I);
F.__dataID__ = I, x.__dataID__ = T, this.$GraphQLStoreWriter_nodeRangeTracker.addRangeIDForNodeID(s, I), this.storeNodeWithID(t, x, T, o), p && p.push(x), m && f.trackEdge(t, T, s)
}
}
i = p || i;
var P = !1,
L = this.$GraphQLStoreWriter_nodeData[s] || r,
k = this.$GraphQLStoreWriter_forceIndex && (void 0 === L.__forceIndex__ || this.$GraphQLStoreWriter_forceIndex > L.__forceIndex__);
!L.__range__ || k ? (r.__range__ = new h(this.$GraphQLStoreWriter_nodeData), r.__filterCalls__ = _.getFilterCalls(c), P = !0, k && (r.__forceIndex__ = this.$GraphQLStoreWriter_forceIndex)) : r.__range__ = L.__range__;
var M = n[E];
M || (M = {
has_previous_page: !1,
has_next_page: !1
}), r.__range__.addItems(c, {}, i, M), w(L) || w(i) || this.$GraphQLStoreWriter_onChange && this.$GraphQLStoreWriter_onChange(s)
} else {
if (l == C) throw new Error("Request edges instead of nodes, cursor field is required");
r[l] || (r[l] = [], s && this.$GraphQLStoreWriter_onChange && this.$GraphQLStoreWriter_onChange(s)), i.length < r[l].length && (r[l].length = i.length, s && this.$GraphQLStoreWriter_onChange && this.$GraphQLStoreWriter_onChange(s));
for (var A = 0; A < i.length; A++)
if ("object" != typeof i[A]) this.$GraphQLStoreWriter_writeData(r[l], A, i[A]);
else {
if (a = null, i[A].id) a = i[A].id;
else {
var Q = this.$GraphQLStoreWriter_nodeData[s] || r;
Q && Array.isArray(Q[l]) && Q[l][A] && (a = Q[l][A].__dataID__)
}
a || (a = y()), this.$GraphQLStoreWriter_writePointer(r[l], A, a), this.storeNodeWithID(t, i[A], a, o)
}
} else if (t.hasFields()) {
if (a = null, l == E) return;
if (void 0 === i || null === i) return void this.$GraphQLStoreWriter_writeData(r, l, i);
l === D ? a = d.VIEWER_CLIENT_ID : l == R ? a = i.__dataID__ || i.id || y() : (a = i.id, !a && s && (Q = this.$GraphQLStoreWriter_nodeData[s], Q && Q[l] ? a = Q[l].__dataID__ : r && r[l] && (a = r[l].__dataID__)), a || (a = y())), this.$GraphQLStoreWriter_writePointer(r, l, a), this.storeNodeWithID(t, i, a, o)
} else this.$GraphQLStoreWriter_writeData(r, l, i)
}, i.prototype.$GraphQLStoreWriter_handleOptimisticRangeUpdate = function(e, t, n) {
n in p.RANGE_OPERATIONS || S(0, "Invalid operation %s provided", n), n === p.REMOVE && "string" == typeof e || n !== p.REMOVE && "object" == typeof e || S(0, "Incorrect edge information provided");
var r = this.$GraphQLStoreWriter_queuedData;
t in r || (r[t] = {}), n in r[t] || (r[t][n] = []), n === p.PREPEND ? r[t][n].unshift(e) : r[t][n].push(e)
}, i.prototype.$GraphQLStoreWriter_getRanges = function(e, t) {
var n = this.$GraphQLStoreWriter_nodeData,
r = n[e],
o = [];
if (r)
for (var i in r) {
var s = a(i);
if (s === t) {
var l = n[r[i].__dataID__];
l && l.__range__ && l.__range__ instanceof h && l.__filterCalls__ ? o.push({
rangeID: l.__dataID__,
range: l.__range__,
calls: l.__filterCalls__
}) : u.warn("Found a field matching connectionName with no range")
}
}
return o
}, i.prototype.$GraphQLStoreWriter_writeData = function(e, t, n) {
e[t] !== n && (e[t] = n, e.__dataID__ && this.$GraphQLStoreWriter_onChange && this.$GraphQLStoreWriter_onChange(e.__dataID__))
}, i.prototype.$GraphQLStoreWriter_writePointer = function(e, t, n) {
e[t] && n === e[t].__dataID__ || (e[t] = m.createPointerWithID(n), e.__dataID__ && this.$GraphQLStoreWriter_onChange && this.$GraphQLStoreWriter_onChange(e.__dataID__))
}, i.prototype.$GraphQLStoreWriter_getNodeSink = function() {
return this.$GraphQLStoreWriter_isOptimisticUpdate ? this.$GraphQLStoreWriter_queuedData : this.$GraphQLStoreWriter_nodeData
}, o.exports = i
}), __d("generateClientID", [], function(e, t, n, r, o) {
"use strict";
function i() {
return u + l++
}
var a = t("crc32"),
s = t("performanceNow"),
l = 1,
u = "client:" + a("" + s());
o.exports = i
}), __d("generateClientEdgeID", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
return "client:" + e + ":" + t
}
o.exports = i
}), __d("generateForceIndex", [], function(e, t, n, r, o) {
"use strict";
function i() {
return a++
}
var a = 1;
o.exports = i
}), __d("GraphQLStoreQueryResolver", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
this.reset(), this.$GraphQLStoreQueryResolver_callback = e
}
function a(e) {
this.reset(), this.$GraphQLStorePluralQueryResolver_callback = e
}
function s(e) {
this.reset(), this.$GraphQLStoreSingleQueryResolver_callback = e
}
function l(e, t, n) {
var r, o = p.getDeepNodeFromData(e, t, function(t) {
return !t.getScope() || e.getScope() === t.getScope()
}, n);
return o && (r = u(o)), [o, r]
}
function u(e) {
function t(e) {
Array.isArray(e) ? r.push.apply(r, e) : r.push(e)
}
for (var n = {}, r = [e]; r.length;) {
var o = r.shift();
if (o && "object" == typeof o) {
var i = f.getID(o);
null != i && (n[i] = null), g(o, t)
}
}
return n
}
function c(e) {
var t = m.parseRangeClientID(e);
return t ? t.dataID : e
}
var d = t("DliteProfiler"),
p = t("GraphQLStore"),
h = t("GraphQLStoreChangeEmitter"),
f = t("GraphQLStoreDataHandler"),
m = t("GraphQLStoreRangeUtils"),
g = t("forEachObject"),
_ = t("invariant");
i.prototype.reset = function() {
this.$GraphQLStoreQueryResolver_callback = null, this.$GraphQLStoreQueryResolver_resolver && this.$GraphQLStoreQueryResolver_resolver.reset(), this.$GraphQLStoreQueryResolver_resolver = null, this.$GraphQLStoreQueryResolver_isPluralResolver = null
}, i.prototype.resolve = function(e, t) {
var n = null === this.$GraphQLStoreQueryResolver_isPluralResolver;
return n ? (this.$GraphQLStoreQueryResolver_isPluralResolver = e.isPlural(), this.$GraphQLStoreQueryResolver_resolver = this.$GraphQLStoreQueryResolver_isPluralResolver ? new a(this.$GraphQLStoreQueryResolver_callback) : new s(this.$GraphQLStoreQueryResolver_callback)) : this.$GraphQLStoreQueryResolver_isPluralResolver !== e.isPlural() && _(0, "GraphQLStoreQueryResolver: Expected a %s query fragment. Got a %s query fragment instead.", this.$GraphQLStoreQueryResolver_isPluralResolver ? "plural" : "single", e.isPlural() ? "plural" : "single"), this.$GraphQLStoreQueryResolver_resolver.resolve(e, t)
}, a.prototype.reset = function() {
this.$GraphQLStorePluralQueryResolver_resolvers ? (this.$GraphQLStorePluralQueryResolver_resolvers.forEach(function(e) {
return e.reset()
}), this.$GraphQLStorePluralQueryResolver_resolvers.length = 0) : this.$GraphQLStorePluralQueryResolver_resolvers = [], this.$GraphQLStorePluralQueryResolver_callback = null, this.$GraphQLStorePluralQueryResolver_results = []
}, a.prototype.resolve = function(e, t) {
null == t || Array.isArray(t) || _(0, "GraphQLStoreQueryResolver: Plural fragment can only resolve an array of pointers.");
for (var n, r = this.$GraphQLStorePluralQueryResolver_results, o = r.length, i = t ? t.length : 0, a = this.$GraphQLStorePluralQueryResolver_resolvers; a.length < i;) a.push(new s(this.$GraphQLStorePluralQueryResolver_callback));
for (; a.length > i;) a.pop().reset();
o !== i && (n = []);
for (var l = 0; i > l; l++) {
var u = a[l].resolve(e, t[l]);
(n || l >= o || u !== r[l]) && (n = n || r.slice(0, l), n.push(u))
}
return n && (this.$GraphQLStorePluralQueryResolver_results = n), this.$GraphQLStorePluralQueryResolver_results
}, s.prototype.reset = function() {
this.$GraphQLStoreSingleQueryResolver_subscription && (this.$GraphQLStoreSingleQueryResolver_subscription.remove(), this.$GraphQLStoreSingleQueryResolver_subscription = null), this.$GraphQLStoreSingleQueryResolver_queryFragment = null, this.$GraphQLStoreSingleQueryResolver_callback = null, this.$GraphQLStoreSingleQueryResolver_isDirty = !1, this.$GraphQLStoreSingleQueryResolver_resultID = null, this.$GraphQLStoreSingleQueryResolver_result = null
}, s.prototype.resolve = function(e, t) {
Array.isArray(t) && _(0, "GraphQLStoreQueryResolver: Singular fragment cannot resolve an array of pointers.");
var n, r, o, i = this.$GraphQLStoreSingleQueryResolver_resultID,
a = this.$GraphQLStoreSingleQueryResolver_result,
s = this.$GraphQLStoreSingleQueryResolver_queryFragment;
if (t) {
if (r = f.getID(t), null != i && null != r && c(i) === c(r))
if (this.$GraphQLStoreSingleQueryResolver_isDirty || i != r || s !== e) {
var u = l(e, t, a);
o = u[0], n = u[1]
} else o = a;
else {
var d = l(e, t),
p = d[0],
m = d[1];
null != r && (n = m), o = p
}
this.$GraphQLStoreSingleQueryResolver_isDirty = !1
} else o = t;
return a !== o && (this.$GraphQLStoreSingleQueryResolver_subscription && (this.$GraphQLStoreSingleQueryResolver_subscription.remove(), this.$GraphQLStoreSingleQueryResolver_subscription = null), n && (this.$GraphQLStoreSingleQueryResolver_subscription = h.addListenerForIDs(Object.keys(n), this.$GraphQLStoreSingleQueryResolver_handleChange.bind(this))), this.$GraphQLStoreSingleQueryResolver_resultID = r, this.$GraphQLStoreSingleQueryResolver_result = o), this.$GraphQLStoreSingleQueryResolver_queryFragment = e, this.$GraphQLStoreSingleQueryResolver_result
}, s.prototype.$GraphQLStoreSingleQueryResolver_handleChange = function() {
this.$GraphQLStoreSingleQueryResolver_isDirty || (this.$GraphQLStoreSingleQueryResolver_isDirty = !0, this.$GraphQLStoreSingleQueryResolver_callback())
}, d.instrumentMethods(i.prototype, {
resolve: "GraphQLStoreQueryResolver.resolve"
}), o.exports = i
}), __d("ReactGraphQL", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
C(e.queries, function(n, r) {
var o = e.getQuery(r);
o && t(o, r)
})
}
function a(e, t) {
return e + "." + t
}
var s = t("DliteDebugger"),
l = t("DliteProfiler"),
u = t("DliteReactQueryParamCache"),
c = t("DliteRoute"),
d = t("DliteRouteQueryCache"),
p = t("ErrorUtils"),
h = t("GraphQLDeferredQueryTracker"),
f = t("GraphQLQueryRunner"),
m = t("GraphQLStore"),
g = t("GraphQLStoreChangeEmitter"),
_ = t("GraphQLStoreDataHandler"),
y = t("GraphQLStoreQueryResolver"),
v = t("Map"),
S = t("React"),
w = t("ReactGraphQLComparators"),
b = t("ReactGraphQLQueryBuilder"),
R = t("ReactUpdates"),
C = t("forEachObject"),
E = t("invariant"),
D = t("mapObject"),
x = t("mixInEventEmitter");
g.injectBatchingStrategy(R.batchedUpdates);
var F = {},
I = Object.freeze({}),
T = {
Mixin: {
statics: {
getQueriesForRoute: function(e) {
var t = this,
n = d.get(t, e);
if (n) return n;
var r = D(t.queries, function(n, r) {
if (e.hasQuery(r)) {
var o = t.getQuery(r);
return e.getQuery(r, o)
}
return null
});
return d.set(t, e, r), r
},
getQuery: function(e, t) {
var n = this;
return b.get(n, e, t)
}
},
mixins: [w.Mixin],
setQueryParams: function(e) {
var t, n = this._unresolvedQueryParams || this._resolvableQueryParams || this.queryParams;
for (var r in e)
if (n[r] !== e[r]) {
t = Object.assign({}, n, e);
break
}
if (t) {
__DEV__ && T.emit("beginQueryParamChange", this.constructor.displayName, t), this._abortPendingQueryParamsRun(), t = this._processQueryParams(this.context.route, t);
var o;
i(this.constructor, function(e, n) {
var r = this.props[n];
if (r) {
var i = e.getQueryFragment(this.context.route, t);
i && (o = o || {}, o[n] = m.buildFragmentQueryForDataID(i, _.getID(r)))
}
}.bind(this)), o && (this._pendingQueryParamsRun = f.run(o, {
onSuccess: p.guard(function() {
this._unresolvedQueryParams = null, this._resolvableQueryParams = t, this._pendingQueryParamsRun = null;
var e = l.instrumentAsync("React.setPropsInternal.onSuccess");
this._setPropsInternal(F, e.stop), __DEV__ && T.emit("endQueryParamChange", this.constructor.displayName, t)
}.bind(this), "ReactGraphQL:setQueryParams")
})), this._unresolvedQueryParams = t
}
},
hasQueryData: function(e, t) {
if (!f.hasPendingQueries()) return !0;
var n = e.getQueryFragment(this.context.route),
r = _.getID(t),
o = m.buildFragmentQueryForDataID(n, r),
i = !h.isQueryPending(o);
if (!i) {
var s = n.getName(),
l = a(r, s);
this._deferredQuerySubscriptions || (this._deferredQuerySubscriptions = {}), this._deferredQuerySubscriptions.hasOwnProperty(l) || (this._deferredQuerySubscriptions[l] = h.addListenerForFragment(r, s, this._handleDeferredQueryResolution))
}
return i
},
contextTypes: {
route: S.PropTypes.instanceOf(c).isRequired
},
getInitialState: function() {
return this.constructor.queries || E(0, "ReactGraphQL.Mixin: %s must provide a valid object for queries.", this.constructor.displayName), __DEV__ && (Object.keys(this.constructor.queries).length || console.warn("ReactGraphQL.Mixin is unnecessary for %s if no queries are defined.", this.constructor.displayName)), this._unresolvedQueryParams = null, this._resolvableQueryParams = null, this._pendingQueryParamsRun = null, this.queryParams = this._getInitialQueryParams(), this._queryFragments = null, this._updateQueryFragments(this.context.route, this.queryParams), this._queryResolvers = null, this._processQueryProps(this.context.route, this.queryParams, this.props), this._originalShouldComponentUpdate = this.shouldComponentUpdate, this.shouldComponentUpdate = this._shouldComponentUpdate, {}
},
componentWillReceiveProps: function(e, t) {
var n = this._resolvableQueryParams || this.queryParams;
this._updateQueryFragments(t.route, n), this._processQueryProps(t.route, n, e), this._resolvableQueryParams && (this.queryParams = this._resolvableQueryParams, this._resolvableQueryParams = null, u.set(this, this.queryParams))
},
_shouldComponentUpdate: function(e, t, n) {
return this._hasStaleQueryData ? (this._hasStaleQueryData = !1, !0) : this._hasNewDeferredData ? (this._hasNewDeferredData = !1, !0) : this._originalShouldComponentUpdate && this._originalShouldComponentUpdate.apply(this, arguments) ? !0 : this._originalShouldComponentUpdate ? !this.areDlitePropsEqualTo(e) || !this.isDliteContextEqualTo(n) : !this.arePropsEqualTo(e) || !this.isStateEqualTo(t) || !this.isContextEqualTo(n)
},
componentWillMount: function() {
__DEV__ && s.installIntoComponent(this)
},
componentWillUnmount: function() {
this._queryResolvers.forEach(function(e) {
return e.reset()
}), this._queryResolvers = null, this._deferredQuerySubscriptions && (C(this._deferredQuerySubscriptions, function(e) {
e && e.remove()
}), this._deferredQuerySubscriptions = null), this._unresolvedQueryParams = null, this._resolvableQueryParams = null, this._abortPendingQueryParamsRun()
},
_processQueryProps: function(e, t, n) {
var r = !this._queryResolvers;
r && (this._queryResolvers = new v, i(this.constructor, function(e, t) {
var n = new y(this._handleQueryPropChange);
this._queryResolvers.set(t, n)
}.bind(this))), this._queryResolvers.forEach(function(e, t) {
var o, i = this._queryFragments && this._queryFragments[t];
if (i) {
var a = n[t];
o = e.resolve(i, a), r || this.props[t] === o || (this._hasStaleQueryData = !0)
} else o = null;
n[t] = o
}.bind(this))
},
_handleQueryPropChange: function() {
var e = l.instrumentAsync("React.setPropsInternal.onSubscription");
this._setPropsInternal(F, e.stop)
},
_handleDeferredQueryResolution: function(e, t) {
var n = a(e, t);
if (this._deferredQuerySubscriptions && this._deferredQuerySubscriptions.hasOwnProperty(n)) {
var r = l.instrumentAsync("React.setPropsInternal.onSubscription");
this._hasNewDeferredData = !0, this._deferredQuerySubscriptions[n].remove(), delete this._deferredQuerySubscriptions[n], this._setPropsInternal(F, r.stop)
}
},
_abortPendingQueryParamsRun: function() {
this._pendingQueryParamsRun && (this._pendingQueryParamsRun.abort(), this._pendingQueryParamsRun = null)
},
_updateQueryFragments: function(e, t) {
this._queryFragments && this.queryParams === t && this.context.route.getCacheKey() === e.getCacheKey() || (t = this._processQueryParams(e, t), this._queryFragments = null, i(this.constructor, function(n, r) {
var o = n.getQueryFragment(e, t);
o && (this._queryFragments = this._queryFragments || {}, this._queryFragments[r] = o)
}.bind(this)))
},
_getInitialQueryParams: function() {
var e = this.constructor.queryParams,
t = u.get(this);
if (!t && e) {
var n;
for (var r in e) r in this.props && (n = n || Object.assign({}, e), n[r] = this.props[r]);
t = n || e
}
return t || I
},
_processQueryParams: function(e, t) {
var n = this.constructor.processQueryParams;
if (n)
if (__DEV__) {
var r = Object.freeze(Object.assign({}, t)),
o = n(e, r);
o !== r && (t = o)
} else t = n(e, t);
return t
}
}
};
x(T, {
beginQueryParamChange: !0,
endQueryParamChange: !0
}), l.instrumentMethods(T.Mixin.statics, {
getQueriesForRoute: "ReactGraphQL.getQueriesForRoute"
}), l.instrumentMethods(T.Mixin, {
getInitialState: "ReactGraphQL.getInitialState",
componentWillReceiveProps: "ReactGraphQL.componentWillReceiveProps",
_shouldComponentUpdate: "ReactGraphQL.shouldComponentUpdate"
}), o.exports = T
}), __d("DliteDebugger", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
var n = e.constructor.getQuery(t).getQueryFragment(e.context.route, e.queryParams);
if (n instanceof p.QueryFragment) {
var r = f.getID(e.props[t]);
n = h.buildFragmentQueryForDataID(n, r)
}
return n
}
function a(e) {
var t = e.constructor,
n = g(t.queries, function(t, n) {
return e.props[n]
});
return m(n, function(e) {
return e && Object.keys(e).some(function(e) {
return !e.startsWith("__")
})
})
}
function s(e) {
var t = a(e);
t && (t.component = e.constructor.displayName);
var n;
return e._renderedComponent ? n = s(e._renderedComponent) : e._renderedChildren && (n = Object.keys(e._renderedChildren).map(function(t) {
return s(e._renderedChildren[t])
}).filter(function(e) {
return e
})), Array.isArray(n) && (1 === n.length ? n = n[0] : n.length || (n = null)), t && n && (t.children = n), t || n
}
function l(e, t) {
var n = e.props[t];
return !!(n && "object" == typeof n && !Array.isArray(n) && f.getID(n) && e.constructor.getQuery && e.constructor.getQuery(t))
}
function u(e, t) {
var n = {};
for (var r in e.props) l(e, r) && (n[r] = t(e, r));
return n
}
function c(e, t) {
var n = i(e, t).getQuery(),
r = s(e),
o = r[t];
console.log(t, o, _ + encodeURIComponent(n))
}
function d(e, t, n) {
Object.defineProperty(e, t, {
configurable: !0,
enumerable: !0,
get: n
})
}
var p = t("GraphQL_EXPERIMENTAL"),
h = t("GraphQLStore"),
f = t("GraphQLStoreDataHandler"),
m = t("filterObject"),
g = t("mapObject"),
_ = "https://our.intern.facebook.com/intern/graphiql?query=",
y = {
getQueries: function(e) {
return u(e, i)
},
getProps: function(e) {
return s(e)
},
logProps: function(e) {
Object.keys(e.props).filter(function(t) {
return l(e, t)
}).forEach(function(t) {
return c(e, t)
})
},
installIntoComponent: function(e) {
d(e, "debugQueries", function() {
return g(y.getQueries(e), function(e) {
return e.getQuery().toString()
})
}), d(e, "debugProps", function() {
return g(y.getProps(e), function(e) {
return JSON.stringify(e, null, " ")
})
}), d(e, "debugConsole", function() {
return y.logProps(e), "Info logged to console..."
})
}
};
o.exports = y
}), __d("filterObject", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
if (!e) return null;
var r = {};
for (var o in e) e.hasOwnProperty(o) && t.call(n, e[o], o) && (r[o] = e[o]);
return r
}
o.exports = i
}), __d("DliteReactQueryParamCache", [], function(e, t, n, r, o) {
"use strict";
var i = t("createComponentCacheKey"),
a = t("emptyFunction"),
s = a,
l = {
injectStorageStrategy: function(e) {
s = e
},
set: function(e, t) {
var n = s();
if (n) {
var r = i(e);
n.addQueryParams(t, r)
}
},
get: function(e) {
var t = s(),
n = null;
if (t && t.hasQueryParams()) {
var r = i(e);
n = t.copyQueryParams(r)
}
return n
}
};
o.exports = l
}), __d("createComponentCacheKey", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return e.displayName || u(0, "Cannot create cache key for component without `displayName`."), e.displayName
}
function a(e) {
var t = e._rootNodeID,
n = l.getReactRootIDFromNodeID(t);
return t.substr(n.length)
}
function s(e) {
e._rootNodeID || u(0, "Cannot create cache key for component unless it is mounting or mounted.");
var t = [];
do {
var n = i(e.constructor),
r = a(e);
t.unshift("(" + n + ")" + r), e = e._owner
} while (e);
return t.join(":")
}
var l = t("ReactInstanceHandles"),
u = t("invariant");
o.exports = s
}), __d("DliteRoute", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
this.$DliteRoute_data = t || this.constructor.parse(e) || this.constructor.__defaultData, this.$DliteRoute_uri = e, this.$DliteRoute_cacheKey = null
}
function a(e) {
return (e + "").replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1")
}
var s = t("DliteRouteInitialData"),
l = t("DliteRouteRegExps"),
u = t("DliteRouter"),
c = t("GraphQL_EXPERIMENTAL"),
d = t("ReactGraphQLQueryBuilder"),
p = t("XControllerURIBuilder"),
h = t("invariant"),
f = t("mapObject"),
m = t("merge"),
g = t("stableStringify"),
_ = {
viewer: !0
};
i.create = function(e) {
e.name && "string" == typeof e.name || h(0, "Route spec must have a `name` property of type string"), e.path && "string" == typeof e.path || h(0, "Route spec must have a `path` property of type string"), e.path.match("^/") || h(0, "Route `path` must begin with a slash"), "/" === e.path || e.path.match("[^/]$") || h(0, "Route `path` must not end with a slash");
var t = function() {
function e() {
null !== i && i.apply(this, arguments)
}
for (var t in i) i.hasOwnProperty(t) && (e[t] = i[t]);
var n = null === i ? null : i.prototype;
return e.prototype = Object.create(n), e.prototype.constructor = e, e.__superConstructor__ = i, e
}();
return t.__name = e.name, t.__path = e.path, t.__paramDefinitions = e.paramDefinitions, t.__queries = e.queries, t.__renderTitle = e.renderTitle, t.__component = e.component, t.__defaultData = e.defaultData, t
}, i.getName = function() {
return this.__name
}, i.register = function() {
this.$DliteRoute_routeRegistered || (u.addRoute(this), this.$DliteRoute_routeRegistered = !0)
}, i.getURIBuilder = function() {
return this.register(), new p(this.__path, this.__paramDefinitions)
}, i.getSortKey = function() {
var e = this.$DliteRoute_getRegexAndCaptureNames();
return e.regexString
}, i.parse = function(e) {
var t = e.getDomain();
if (t && t !== s.domain) return null;
var n = this.$DliteRoute_getRegexAndCaptureNames(),
r = n.regex,
o = n.captureNames,
i = e.getPath(),
a = r.exec(i);
if (!a) return null;
for (var l = m(e.getQueryData()), u = 1; u < a.length; u++) l[o[u - 1]] = a[u];
return l
}, i.prototype.getName = function() {
return this.constructor.__name
}, i.prototype.getData = function() {
return this.$DliteRoute_data
}, i.prototype.getQuery = function(e, t) {
var n = this.$DliteRoute_data[e],
r = this.constructor.__queries,
o = r && r[e];
if (!o && "viewer" === e) {
var i = t && [t.getQueryFragment(this)];
return new c.QueryWithValues(new c.Query("viewer", null, null, i, null, this.getName()))
}
if (!o) return null;
if (!_.hasOwnProperty(e)) {
var a = this.constructor.__paramDefinitions;
if (null == n && a.hasOwnProperty(e) && !a[e].required) return null;
null == n && h(0, 'Required param "%s" for %s is %s. Check your URI.', e, this.getName(), null === n ? "null" : "undefined")
}
return new c.QueryWithValues(o(n, t, d.getQueryInterpreter(this)))
}, i.prototype.getQueries = function() {
return f(this.constructor.__queries, function(e, t) {
return this.getQuery(t)
}.bind(this))
}, i.prototype.hasQuery = function(e) {
var t = this.constructor.__queries;
return "viewer" === e || !(!t || !t[e])
}, i.prototype.getURI = function() {
return this.$DliteRoute_uri
}, i.prototype.getCacheKey = function() {
return this.$DliteRoute_cacheKey || (this.$DliteRoute_cacheKey = g({
route: this.getName(),
args: this.getData()
})), this.$DliteRoute_cacheKey
}, i.prototype.isA = function(e) {
return this.getName() === e
}, i.prototype.renderTitle = function(e) {
var t = this.constructor.__renderTitle;
return t && t(e)
}, i.prototype.getComponent = function() {
return this.constructor.__component
}, i.$DliteRoute_getRegexAndCaptureNames = function() {
if (!this.$DliteRoute_regex) {
if (this.$DliteRoute_captureNames = [], "/" === this.__path) this.$DliteRoute_regexString = "^/$";
else {
var e = this.__path.slice(1).split("/"),
t = e.map(function(e) {
if (l.PATH_COMPONENT.test(e)) return "/" + a(e);
var t = "?" == e[1],
n = e.slice(t ? 2 : 1, -1),
r = this.__paramDefinitions[n],
o = l.COMPONENT_VALUE[r.type],
i = "(" + o + ")";
return this.$DliteRoute_captureNames.push(n), t ? "(?:/" + i + ")?" : "/" + i
}.bind(this), this);
this.$DliteRoute_regexString = "^" + t.join("") + "/?$"
}
this.$DliteRoute_regex = new RegExp(this.$DliteRoute_regexString)
}
return {
regex: this.$DliteRoute_regex,
regexString: this.$DliteRoute_regexString,
captureNames: this.$DliteRoute_captureNames
}
}, o.exports = i
}), __d("DliteRouteInitialData", [], function(e, t, n, r, o) {
"use strict";
var i = {
domain: "www.facebook.com"
};
o.exports = i
}), __d("DliteRouteRegExps", [], function(e, t, n, r, o) {
var i = {
PATH_COMPONENT: /^[^\/{}]+$/,
COMPONENT_VALUE: {
Float: "-?(?:\\.\\d+|\\d+(?:\\.\\d+)?)",
Int: "-?\\d+",
Path: ".+?",
String: "[^/]+"
}
};
o.exports = i
}), __d("DliteRouter", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
var r = e.getSortKey(),
o = n - t;
if (0 === o) return t;
var a = t + o / 2 | 0;
return s(r, u[a].getSortKey()) <= 0 ? i(e, t, a) : i(e, a + 1, n)
}
function a(e) {
for (var t = [], n = 0, r = 0, o = 0; n < e.length; n++) switch (e.charAt(n)) {
case "/":
o || (n - r > 0 && t.push(e.slice(r, n)), "?" === e.charAt(n + 1) && n++, r = n + 1);
break;
case "(":
o++ || (n - r > 0 && t.push(e.slice(r, n)), r = n);
break;
case ")":
--o || ("?" === e.charAt(n + 1) && n++, t.push(e.slice(r, n + 1)), r = n + 1)
}
return t
}
function s(e, t) {
e = a(e), t = a(t);
for (var n = 0; n < Math.min(e.length, t.length); n++) {
var r = e[n],
o = t[n],
i = l(r) - l(o);
if (i) return i;
var s = r.toLowerCase(),
u = o.toLowerCase();
if (s !== u) return u > s ? -1 : 1;
if (r !== o) return o > r ? -1 : 1
}
return e.length - t.length
}
function l(e) {
return "<<vanity>>" == e ? 3 : (e = e.replace(/\\\./, "x"), /[.+*?\[\](){}=!|:]/.test(e) ? -1 !== e.indexOf("\\d") ? 1 : 2 : 0)
}
var u = [],
c = {
addRoute: function(e) {
var t = i(e, 0, u.length);
u[t] !== e && u.splice(t, 0, e)
},
__getRoutes: function() {
return u
},
getRoute: function(e) {
for (var t = 0; t < u.length; t++) {
var n = u[t],
r = n.parse(e);
if (null !== r) return new n(e, r)
}
return null
},
orderExpressions: s
};
o.exports = c
}), __d("ReactGraphQLQueryBuilder", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
this.$ReactGraphQLQueryBuilder_queryFunction = e, this.$ReactGraphQLQueryBuilder_initialParams = t, this.$ReactGraphQLQueryBuilder_deferred = !1, this.$ReactGraphQLQueryBuilder_deepQueryFragmentCacheKey = null
}
function a(e, t) {
return e.getCacheKey() + ":" + p(t)
}
var s, l = t("GraphQL_EXPERIMENTAL"),
u = t("invariant"),
c = t("keyOf"),
d = t("mapObject"),
p = t("stableStringify"),
h = {};
i.get = function(e, t, n) {
e.displayName || u(0, "Cannot create cache key for component without `displayName`.");
var r = e.displayName + ":" + t;
if (n) {
var o = i.$ReactGraphQLQueryBuilder_getValueKey();
n = d(n, function(e) {
return "object" == typeof e && o in e ? e[o] : e
}), r += ":" + p(n)
}
if (!h[r]) {
e.queries.hasOwnProperty(t) || u(0, "ReactGraphQL.Mixin.getQuery: %s does not have a query defined for %s.", e.displayName, t);
var a = e.queries[t],
s = e.queryParams || {},
l = n ? Object.assign({}, s, n) : s;
h[r] = a ? new i(a, l) : null
}
return h[r]
}, i.getQueryInterpreter = function(e) {
function t() {
throw new Error("ReactGraphQL transform failed! Did you forget to run arc build?")
}
var n = i.$ReactGraphQLQueryBuilder_getValueKey();
return t.__GraphQL = l, t.__frag = function(t) {
return t instanceof i && (t = t.getQueryFragment(e)), t
}, t.__var = function(e) {
var t = typeof e;
if ("undefined" === t) throw new TypeError("Variables must not be undefined (they can be null, though)");
return "object" === t && e.hasOwnProperty(n) ? e.$ReactGraphQLQueryBuilder_value : e
}, t
}, i.$ReactGraphQLQueryBuilder_getValueKey = function() {
return s || (s = c({
$ReactGraphQLQueryBuilder_value: null
})), s
}, i.prototype.defer = function() {
return this.$ReactGraphQLQueryBuilder_deferredBuilder || (this.$ReactGraphQLQueryBuilder_deferredBuilder = new i(this.$ReactGraphQLQueryBuilder_queryFunction, this.$ReactGraphQLQueryBuilder_initialParams), this.$ReactGraphQLQueryBuilder_deferredBuilder.$ReactGraphQLQueryBuilder_deferred = !0), this.$ReactGraphQLQueryBuilder_deferredBuilder
}, i.prototype.getQueryFragment = function(e, t) {
t = t || this.$ReactGraphQLQueryBuilder_initialParams;
var n = a(e, t);
if (n !== this.$ReactGraphQLQueryBuilder_deepQueryFragmentCacheKey) {
var r = i.getQueryInterpreter(e),
o = d(this.$ReactGraphQLQueryBuilder_initialParams, function(e, n) {
return {
$ReactGraphQLQueryBuilder_value: t[n]
}
}),
s = this.$ReactGraphQLQueryBuilder_queryFunction(e, r, o);
s && this.$ReactGraphQLQueryBuilder_deferred && (s = s.defer()), this.$ReactGraphQLQueryBuilder_deepQueryFragment = s, this.$ReactGraphQLQueryBuilder_deepQueryFragmentCacheKey = n
}
return this.$ReactGraphQLQueryBuilder_deepQueryFragment
}, i.prototype["if"] = function(e) {
return e.$ReactGraphQLQueryBuilder_value ? this : null
}, i.prototype.unless = function(e) {
return e.$ReactGraphQLQueryBuilder_value ? null : this
}, o.exports = i
}), __d("stableStringify", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return null !== e && "[object Object]" === Object.prototype.toString.call(e)
}
function a(e) {
var t = Object.keys(e);
if (t.length) {
var n = [];
t.sort();
for (var r = 0; r < t.length; r++) {
var o = t[r],
s = e[o];
s = i(s) || Array.isArray(s) ? a(s) : JSON.stringify(s), n.push(o + ":" + s)
}
return Array.isArray(e) ? "[" + n.join(",") + "]" : "{" + n.join(",") + "}"
}
return JSON.stringify(e)
}
o.exports = a
}), __d("XControllerURIBuilder", [], function(e, t, n, r, o) {
function i(e, t) {
"use strict";
this.$XControllerURIBuilder_path = e, this.$XControllerURIBuilder_paramDefinitions = t, this.$XControllerURIBuilder_params = {}
}
var a = t("URI"),
s = t("invariant");
i.prototype.setInt = function(e, t) {
"use strict";
return this.__setParam(e, "Int", t)
}, i.prototype.setFloat = function(e, t) {
"use strict";
return this.__setParam(e, "Float", t)
}, i.prototype.setString = function(e, t) {
"use strict";
return this.__setParam(e, "String", t)
}, i.prototype.setExists = function(e, t) {
"use strict";
return t === !1 && (t = void 0), this.__setParam(e, "Exists", t)
}, i.prototype.setBool = function(e, t) {
"use strict";
return this.__setParam(e, "Bool", t)
}, i.prototype.setEnum = function(e, t) {
"use strict";
return this.__setParam(e, "Enum", t)
}, i.prototype.setIntVector = function(e, t) {
"use strict";
return this.__setParam(e, "IntVector", t)
}, i.prototype.setFloatVector = function(e, t) {
"use strict";
return this.__setParam(e, "FloatVector", t)
}, i.prototype.setStringVector = function(e, t) {
"use strict";
return this.__setParam(e, "StringVector", t)
}, i.prototype.setEnumVector = function(e, t) {
"use strict";
return this.__setParam(e, "EnumVector", t)
}, i.prototype.setIntToIntMap = function(e, t) {
"use strict";
return this.__setParam(e, "IntToIntMap", t)
}, i.prototype.setIntToFloatMap = function(e, t) {
"use strict";
return this.__setParam(e, "IntToFloatMap", t)
}, i.prototype.setIntToStringMap = function(e, t) {
"use strict";
return this.__setParam(e, "IntToStringMap", t)
}, i.prototype.setIntToBoolMap = function(e, t) {
"use strict";
return this.__setParam(e, "IntToBoolMap", t)
}, i.prototype.setStringToIntMap = function(e, t) {
"use strict";
return this.__setParam(e, "StringToIntMap", t)
}, i.prototype.setStringToFloatMap = function(e, t) {
"use strict";
return this.__setParam(e, "StringToFloatMap", t)
}, i.prototype.setStringToStringMap = function(e, t) {
"use strict";
return this.__setParam(e, "StringToStringMap", t)
}, i.prototype.setStringToBoolMap = function(e, t) {
"use strict";
return this.__setParam(e, "StringToBoolMap", t)
}, i.prototype.setHackType = function(e, t) {
"use strict";
return this.__setParam(e, "HackType", t)
}, i.prototype.__validateRequiredParamsExistence = function() {
"use strict";
for (var e in this.$XControllerURIBuilder_paramDefinitions) this.$XControllerURIBuilder_paramDefinitions[e].required && !this.$XControllerURIBuilder_params.hasOwnProperty(e) && s(0, "Missing required parameter: %s", e)
}, i.prototype.__setParam = function(e, t, n) {
"use strict";
e in this.$XControllerURIBuilder_paramDefinitions || s(0, 'Attempting to set invalid param "%s". Make sure the param is defined in the controller\'s getParamDefinition() method.', e);
var r = this.$XControllerURIBuilder_paramDefinitions[e].type;
return r !== t && s(0, 'Attempting to set param "%s" as %s, but it is defined in the controller\'s getParamDefinition() method as %s.', e, t, r), this.__setParamInt(e, n), this
}, i.prototype.__setParamInt = function(e, t) {
"use strict";
this.$XControllerURIBuilder_params[e] = t
}, i.prototype.getURI = function() {
"use strict";
this.__validateRequiredParamsExistence();
for (var e = {}, t = "", n = new RegExp(/^\{(\?)?(\*)?(.+?)\}$/), r = this.$XControllerURIBuilder_path.split("/"), o = !1, i = 0; i < r.length; i++) {
var l = r[i];
if ("" !== l) {
var u = n.exec(l);
if (u) {
var c = "?" === u[1],
d = ("*" === u[2], u[3]),
p = this.$XControllerURIBuilder_paramDefinitions[d];
if (p || s(0, 'Found unknown token "%s" in path "%s". Ensure it is defined in getParamDefinition().', d, this.$XControllerURIBuilder_path), c && o) continue;
var h = this.$XControllerURIBuilder_params[d];
if (null == h && c) {
o = !0;
continue
}
null == h && s(0, "Missing required template parameter: %s", d), t += "/" + h, e[d] = !0
} else t += "/" + l
}
}
"/" === this.$XControllerURIBuilder_path.slice(-1) && (t += "/");
var f = new a(t);
for (p in this.$XControllerURIBuilder_params)
if (h = this.$XControllerURIBuilder_params[p], !e[p] && null != h) {
var m = this.$XControllerURIBuilder_paramDefinitions[p];
f.addQueryData(p, m && "Exists" === m.type ? null : h)
}
return f
}, i.create = function(e, t) {
return i.bind(null, e, t)
}, o.exports = i
}), __d("URI", [], function(e, t, n, r, o) {
function i(e) {
"use strict";
return this instanceof i ? void s.call(this, e || "", a) : new i(e || window.location.href)
}
var a = t("PHPQuerySerializer"),
s = t("URIBase"),
l = t("isFacebookURI"),
u = t("unqualifyURI"),
c = t("areSameOrigin"),
d = t("copyProperties"),
p = t("goURI");
for (var h in s) s.hasOwnProperty(h) && (i[h] = s[h]);
var f = null === s ? null : s.prototype;
i.prototype = Object.create(f), i.prototype.constructor = i, i.__superConstructor__ = s, i.prototype.setPath = function(e) {
"use strict";
return this.path = e, f.setPath.call(this, e)
}, i.prototype.getPath = function() {
"use strict";
var e = f.getPath.call(this);
return e ? e.replace(/^\/+/, "/") : e
}, i.prototype.setProtocol = function(e) {
"use strict";
return this.protocol = e, f.setProtocol.call(this, e)
}, i.prototype.setDomain = function(e) {
"use strict";
return this.domain = e, f.setDomain.call(this, e)
}, i.prototype.setPort = function(e) {
"use strict";
return this.port = e, f.setPort.call(this, e)
}, i.prototype.setFragment = function(e) {
"use strict";
return this.fragment = e, f.setFragment.call(this, e)
}, i.prototype.valueOf = function() {
"use strict";
return this.toString()
}, i.prototype.isFacebookURI = function() {
"use strict";
if (__DEV__) throw new Error("URI.prototype.isFacebookURI is deprecated, use isFacebookURI mirco-module instead");
return l(this)
}, i.prototype.isLinkshimURI = function() {
"use strict";
return !l(this) || "/l.php" !== this.getPath() && 0 !== this.getPath().indexOf("/si/ajax/l/") && 0 !== this.getPath().indexOf("/l/") && 0 !== this.getPath().indexOf("l/") ? !1 : !0
}, i.prototype.getRegisteredDomain = function() {
"use strict";
if (!this.getDomain()) return "";
if (!l(this)) return null;
var e = this.getDomain().split("."),
t = e.indexOf("facebook");
return e.slice(t).join(".")
}, i.prototype.getUnqualifiedURI = function() {
"use strict";
var e = new i(this);
return u(e), e
}, i.prototype.getQualifiedURI = function() {
"use strict";
return new i(this).$URI_qualify()
}, i.prototype.$URI_qualify = function() {
"use strict";
if (!this.getDomain()) {
var e = i();
this.setProtocol(e.getProtocol()).setDomain(e.getDomain()).setPort(e.getPort())
}
return this
}, i.prototype.isSameOrigin = function(e) {
"use strict";
var t = e || window.location.href;
return t instanceof i || (t = new i(t.toString())), c(this, t)
}, i.prototype.go = function(e) {
"use strict";
p(this, e)
}, i.prototype.setSubdomain = function(e) {
"use strict";
var t = this.$URI_qualify().getDomain().split(".");
return t.length <= 2 ? t.unshift(e) : t[0] = e, this.setDomain(t.join("."))
}, i.prototype.getSubdomain = function() {
"use strict";
if (!this.getDomain()) return "";
var e = this.getDomain().split(".");
return e.length <= 2 ? "" : e[0]
}, i.isValidURI = function(e) {
"use strict";
return s.isValidURI(e, a)
}, d(i, {
getRequestURI: function(t, n) {
t = void 0 === t || t;
var r = e.PageTransitions;
return t && r && r.isInitialized() ? r.getCurrentURI(!!n).getQualifiedURI() : new i(window.location.href)
},
getMostRecentURI: function() {
var t = e.PageTransitions;
return t && t.isInitialized() ? t.getMostRecentURI().getQualifiedURI() : new i(window.location.href)
},
getNextURI: function() {
var t = e.PageTransitions;
return t && t.isInitialized() ? t._next_uri.getQualifiedURI() : new i(window.location.href)
},
expression: /(((\w+):\/\/)([^\/:]*)(:(\d+))?)?([^#?]*)(\?([^#]*))?(#(.*))?/,
arrayQueryExpression: /^(\w+)((?:\[\w*\])+)=?(.*)/,
encodeComponent: function(e) {
return encodeURIComponent(e).replace(/%5D/g, "]").replace(/%5B/g, "[")
},
decodeComponent: function(e) {
return decodeURIComponent(e.replace(/\+/g, " "))
}
}), __DEV__ && i.prototype.__defineGetter__ && i.prototype._defineSetter__ && (i.prototype.__defineGetter__("path", function() {
return console.warn("URI: Do not access the path property directly use getPath(). Fix URI.prototype."), this.path
}), i.prototype.__defineSetter__("path", function(e) {
this.path = e
}), i.prototype.__defineGetter__("protocol", function() {
return console.warn("URI: Do not access the protocol property directly use getProtocol(). Fix URI.prototype."), this.protocol
}), i.prototype.__defineSetter__("protocol", function(e) {
this.protocol = e
}), i.prototype.__defineGetter__("domain", function() {
return console.warn("URI: Do not access the domain property directly use getDomain(). Fix URI.prototype."), this.domain
}), i.prototype.__defineSetter__("domain", function(e) {
this.domain = e
}), i.prototype.__defineGetter__("port", function() {
return console.warn("URI: Do not access the port property directly use getPort(). Fix URI.prototype."), this.port
}), i.prototype.__defineSetter__("port", function(e) {
this.port = e
}), i.prototype.__defineGetter__("fragment", function() {
return console.warn("URI: Do not access the fragment property directly use getFragment(). Fix URI.prototype."), this.fragment
}), i.prototype.__defineSetter__("fragment", function(e) {
this.fragment = e
})), o.exports = i
}), __d("PHPQuerySerializer", [], function(e, t, n, r, o) {
function i(e) {
return a(e, null)
}
function a(e, t) {
t = t || "";
var n = [];
if (null === e || void 0 === e) n.push(s(t));
else if ("object" == typeof e) {
("nodeName" in e || "nodeType" in e) && c(0, "PHPQuerySerializer serializing a DOM element, not good ...");
for (var r in e) e.hasOwnProperty(r) && void 0 !== e[r] && n.push(a(e[r], t ? t + "[" + r + "]" : r))
} else n.push(s(t) + "=" + s(e));
return n.join("&")
}
function s(e) {
return encodeURIComponent(e).replace(/%5D/g, "]").replace(/%5B/g, "[")
}
function l(e) {
if (!e) return {};
var t = {};
e = e.replace(/%5B/gi, "[").replace(/%5D/gi, "]"), e = e.split("&");
for (var n = Object.prototype.hasOwnProperty, r = 0, o = e.length; o > r; r++) {
var i = e[r].match(d);
if (i) {
var a = i[2].split(/\]\[|\[|\]/).slice(0, -1),
s = i[1],
l = u(i[3] || "");
a[0] = s;
for (var c = t, p = 0; p < a.length - 1; p++)
if (a[p]) {
if (!n.call(c, a[p])) {
var h = a[p + 1] && !a[p + 1].match(/^\d{1,3}$/) ? {} : [];
if (c[a[p]] = h, c[a[p]] !== h) return t
}
c = c[a[p]]
} else c.push(a[p + 1] && !a[p + 1].match(/^\d{1,3}$/) ? {} : []), c = c[c.length - 1];
c instanceof Array && "" === a[a.length - 1] ? c.push(l) : c[a[a.length - 1]] = l
} else {
var f = e[r].split("=");
t[u(f[0])] = void 0 === f[1] ? null : u(f[1])
}
}
return t
}
function u(e) {
return decodeURIComponent(e.replace(/\+/g, " "))
}
var c = t("invariant"),
d = /^([-_\w]+)((?:\[[-_\w]*\])+)=?(.*)/,
p = {
serialize: i,
encodeComponent: s,
deserialize: l,
decodeComponent: u
};
o.exports = p
}), __d("URIBase", [], function(e, t, n, r, o) {
function i(e, t, n, r) {
if (!t) return !0;
if (t instanceof a) return e.setProtocol(t.getProtocol()), e.setDomain(t.getDomain()), e.setPort(t.getPort()), e.setPath(t.getPath()), e.setQueryData(r.deserialize(r.serialize(t.getQueryData()))), e.setFragment(t.getFragment()), !0;
t = t.toString().trim();
var o = s.parse(t) || {};
if (!n && !l.isAllowed(o.scheme)) return !1;
if (e.setProtocol(o.scheme || ""), !n && p.test(o.host)) return !1;
if (e.setDomain(o.host || ""), e.setPort(o.port || ""), e.setPath(o.path || ""), n) e.setQueryData(r.deserialize(o.query) || {});
else try {
e.setQueryData(r.deserialize(o.query) || {})
} catch (i) {
return !1
}
if (e.setFragment(o.fragment || ""), null !== o.userinfo) {
if (n) throw new Error(c("URI.parse: invalid URI (userinfo is not allowed in a URI): %s", e.toString()));
return !1
}
if (!e.getDomain() && -1 !== e.getPath().indexOf("\\")) {
if (n) throw new Error(c("URI.parse: invalid URI (no domain but multiple back-slashes): %s", e.toString()));
return !1
}
if (!e.getProtocol() && h.test(t)) {
if (n) throw new Error(c("URI.parse: invalid URI (unsafe protocol-relative URLs): %s", e.toString()));
return !1
}
return !0
}
function a(e, t) {
"use strict";
t || d(0, "no serializer set"), this.$URIBase_serializer = t, this.$URIBase_protocol = "", this.$URIBase_domain = "", this.$URIBase_port = "", this.$URIBase_path = "", this.$URIBase_fragment = "", this.$URIBase_queryData = {}, i(this, e, !0, t)
}
var s = t("URIRFC3986"),
l = t("URISchemes"),
u = t("copyProperties"),
c = t("ex"),
d = t("invariant"),
p = new RegExp("[\\x00-\\x2c\\x2f\\x3b-\\x40\\x5c\\x5e\\x60\\x7b-\\x7f\\uFDD0-\\uFDEF\\uFFF0-\\uFFFF\\u2047\\u2048\\uFE56\\uFE5F\\uFF03\\uFF0F\\uFF1F]"),
h = new RegExp("^(?:[^/]*:|[\\x00-\\x1f]*/[\\x00-\\x1f]*/)");
a.prototype.setProtocol = function(e) {
"use strict";
return l.isAllowed(e) || d(0, '"%s" is not a valid protocol for a URI.', e), this.$URIBase_protocol = e, this
}, a.prototype.getProtocol = function() {
"use strict";
return this.$URIBase_protocol
}, a.prototype.setSecure = function(e) {
"use strict";
return this.setProtocol(e ? "https" : "http")
}, a.prototype.isSecure = function() {
"use strict";
return "https" === this.getProtocol()
}, a.prototype.setDomain = function(e) {
"use strict";
if (p.test(e)) throw new Error(c("URI.setDomain: unsafe domain specified: %s for url %s", e, this.toString()));
return this.$URIBase_domain = e, this
}, a.prototype.getDomain = function() {
"use strict";
return this.$URIBase_domain
}, a.prototype.setPort = function(e) {
"use strict";
return this.$URIBase_port = e, this
}, a.prototype.getPort = function() {
"use strict";
return this.$URIBase_port
}, a.prototype.setPath = function(e) {
"use strict";
return __DEV__ && e && "/" !== e.charAt(0) && console.warn('Path does not begin with a "/" which means this URI will likely be malformed. Ensure any string passed to .setPath() leads with "/"'), this.$URIBase_path = e, this
}, a.prototype.getPath = function() {
"use strict";
return this.$URIBase_path
}, a.prototype.addQueryData = function(e, t) {
"use strict";
return "[object Object]" === Object.prototype.toString.call(e) ? u(this.$URIBase_queryData, e) : this.$URIBase_queryData[e] = t, this
}, a.prototype.setQueryData = function(e) {
"use strict";
return this.$URIBase_queryData = e, this
}, a.prototype.getQueryData = function() {
"use strict";
return this.$URIBase_queryData
}, a.prototype.removeQueryData = function(e) {
"use strict";
Array.isArray(e) || (e = [e]);
for (var t = 0, n = e.length; n > t; ++t) delete this.$URIBase_queryData[e[t]];
return this
}, a.prototype.setFragment = function(e) {
"use strict";
return this.$URIBase_fragment = e, this
}, a.prototype.getFragment = function() {
"use strict";
return this.$URIBase_fragment
}, a.prototype.isEmpty = function() {
"use strict";
return !(this.getPath() || this.getProtocol() || this.getDomain() || this.getPort() || Object.keys(this.getQueryData()).length > 0 || this.getFragment())
}, a.prototype.toString = function() {
"use strict";
var e = "";
this.$URIBase_protocol && (e += this.$URIBase_protocol + "://"), this.$URIBase_domain && (e += this.$URIBase_domain), this.$URIBase_port && (e += ":" + this.$URIBase_port), this.$URIBase_path ? e += this.$URIBase_path : e && (e += "/");
var t = this.$URIBase_serializer.serialize(this.$URIBase_queryData);
return t && (e += "?" + t), this.$URIBase_fragment && (e += "#" + this.$URIBase_fragment), e
}, a.prototype.getOrigin = function() {
"use strict";
return this.$URIBase_protocol + "://" + this.$URIBase_domain + (this.$URIBase_port ? ":" + this.$URIBase_port : "")
}, a.isValidURI = function(e, t) {
return i(new a(null, t), e, !1, t)
}, o.exports = a
}), __d("URIRFC3986", [], function(e, t, n, r, o) {
var i = new RegExp("^([^:/?#]+:)?(//([^\\\\/?#@]*@)?(\\[[A-Fa-f0-9:.]+\\]|[^\\/?#:]*)(:[0-9]*)?)?([^?#]*)(\\?[^#]*)?(#.*)?"),
a = {
parse: function(e) {
if ("" === e.trim()) return null;
var t = e.match(i),
n = {};
return n.uri = t[0] ? t[0] : null, n.scheme = t[1] ? t[1].substr(0, t[1].length - 1) : null, n.authority = t[2] ? t[2].substr(2) : null, n.userinfo = t[3] ? t[3].substr(0, t[3].length - 1) : null, n.host = t[2] ? t[4] : null, n.port = t[5] ? t[5].substr(1) ? parseInt(t[5].substr(1), 10) : null : null, n.path = t[6] ? t[6] : null, n.query = t[7] ? t[7].substr(1) : null, n.fragment = t[8] ? t[8].substr(1) : null, n.isGenericURI = null === n.authority && !!n.scheme, n
}
};
o.exports = a
}), __d("URISchemes", [], function(e, t, n, r, o) {
var i = t("createObjectFrom"),
a = i(["fb", "fbcf", "fbconnect", "fb-messenger", "fbrpc", "file", "ftp", "http", "https", "mailto", "ms-app", "itms", "itms-apps", "itms-services", "market", "svn+ssh", "fbstaging", "tel", "sms"]),
s = {
isAllowed: function(e) {
return e ? a.hasOwnProperty(e.toLowerCase()) : !0
}
};
o.exports = s
}), __d("createObjectFrom", [], function(e, t, n, r, o) {
function i(e, t) {
if (__DEV__ && !Array.isArray(e)) throw new TypeError("Must pass an array of keys.");
var n = {},
r = Array.isArray(t);
"undefined" == typeof t && (t = !0);
for (var o = e.length; o--;) n[e[o]] = r ? t[o] : t;
return n
}
o.exports = i
}), __d("isFacebookURI", [], function(e, t, n, r, o) {
function i(e) {
return a || (a = new RegExp("(^|\\.)facebook\\.com$", "i")), e.isEmpty() && "#" !== e.toString() ? !1 : e.getDomain() || e.getProtocol() ? -1 !== s.indexOf(e.getProtocol()) && a.test(e.getDomain()) : !0
}
var a = null,
s = ["http", "https"];
i.setRegex = function(e) {
a = e
}, o.exports = i
}), __d("unqualifyURI", [], function(e, t, n, r, o) {
function i(e) {
e.setProtocol(null).setDomain(null).setPort(null)
}
o.exports = i
}), __d("areSameOrigin", [], function(e, t, n, r, o) {
function i(e, t) {
return e.isEmpty() || t.isEmpty() ? !1 : e.getProtocol() && e.getProtocol() != t.getProtocol() ? !1 : e.getDomain() && e.getDomain() != t.getDomain() ? !1 : e.getPort() && e.getPort() != t.getPort() ? !1 : !0
}
o.exports = i
}), __d("goURI", [], function(e, t, n, r, o) {
"use strict";
function i() {
throw new Error("goURI() behavior is undefined in Catalyst")
}
t("URISchemes");
o.exports = i
}), __d("DliteRouteQueryCache", [], function(e, t, n, r, o) {
"use strict";
var i = {
get: function(e, t) {
var n = t.getCacheKey();
if (e.__queryCache) {
var r = e.__queryCache[n];
if (r) return r
}
return null
},
set: function(e, t, n) {
var r = t.getCacheKey();
e.__queryCache || (e.__queryCache = {}), e.__queryCache[r] = n
}
};
o.exports = i
}), __d("GraphQLDeferredQueryTracker", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
_ || (m(a), _ = {}), _.hasOwnProperty(e) || (_[e] = {}), _[e].hasOwnProperty(t) || (_[e][t] = null)
}
function a() {
h(_, function(e, t) {
h(e, function(e, n) {
for (var r = 0; r < g.length; r++)
if (g[r]) {
var o = g[r],
i = o.callback,
a = o.dataID,
s = o.fragmentName;
a === t && s === n && c.applyWithGuard(i, null, [t, n], null, "GraphQLDeferredQueryTracker")
}
})
}), _ = null
}
function s(e, t) {
var n = t.getQuery().rootCall().getRefTarget();
if (!n) return {};
var r = {},
o = n.split(".");
return l(r, e, o, 1), r
}
function l(e, t, n, r) {
if (r === n.length && "string" == typeof t) return void(e[t] = t);
if (!(r >= n.length || !t || "object" != typeof t || Array.isArray(t))) {
var o = n[r];
"*" === o ? h(t, function(t) {
l(e, t, n, r + 1)
}) : t.hasOwnProperty(o) && l(e, t[o], n, r + 1)
}
}
function u(e) {
return e.getQuery().rootCall().getSourceQueryID()
}
var c = t("ErrorUtils"),
d = t("GraphQLStore"),
p = t("Map"),
h = t("forEachObject"),
f = t("isEmpty"),
m = t("setImmediate"),
g = [],
_ = null,
y = new p,
v = new p,
S = new p,
w = {
addListenerForFragment: function(e, t, n) {
var r = g.length;
return g.push({
callback: n,
dataID: e,
fragmentName: t
}), {
remove: function() {
delete g[r]
}
}
},
recordQuery: function(e) {
var t = u(e);
if (t) {
var n = v.get(t) || [];
n.push(e), v.set(t, n)
} else {
var r = e.getQuery().getDeferredFragmentNames();
if (r) {
var o = d.getIDsFromQuery(e);
h(o, function(e) {
var t = y.get(e) || {};
Object.assign(t, r), y.set(e, t)
})
}
}
},
resolveQuery: function(e, t) {
var n, r, o = e.getQuery(),
a = u(e),
l = o.getDeferredFragmentNames();
if (l && (r = o.rootCall().hasRefParam() ? S.get(o.getID()) || {} : d.getIDsFromQuery(e), h(r, function(e) {
var t = y.get(e) || {};
h(l, function(n) {
delete t[n], i(e, n)
}), f(t) ? y.delete(e) : y.set(e, t)
})), a) n = v.get(a) || [], n = n.filter(function(t) {
return t !== e
}), n.length ? v.set(a, n) : v.delete(a), S.delete(o.getID());
else if (t) {
n = v.get(o.getID()) || [];
for (var c = 0; c < n.length; c++) {
var p = n[c],
m = p.getQuery(),
g = m.getAllFragmentNames(),
_ = s(t, p);
S.set(m.getID(), _), h(_, function(e) {
var t = y.get(e) || {};
Object.assign(t, g), y.set(e, t)
})
}
}
},
isQueryPending: function(e) {
var t = e.getQuery().getAllFragmentNames(),
n = d.getIDsFromQuery(e);
for (var r in n)
if (n.hasOwnProperty(r) && y.has(n[r])) {
var o = y.get(n[r]);
for (var i in t)
if (t.hasOwnProperty(i) && o.hasOwnProperty(i)) return !0
}
return !1
},
reset: function() {
y = new p, S = new p, v = new p, g = []
}
};
o.exports = w
}), __d("Map", [], function(e, t, n, r, o) {
var i = t("guid"),
a = t("isNode"),
s = t("toIterator"),
l = t("_shouldPolyfillES6Collection");
o.exports = function(e, t) {
function n(e) {
"use strict";
if (!d(this)) throw new TypeError("Wrong map object type.");
if (c(this), null != e)
for (var t, n = s(e); !(t = n.next()).done;) {
if (!d(t.value)) throw new TypeError("Expected iterable items to be pair objects.");
this.set(t.value[0], t.value[1])
}
}
function r(e, t) {
"use strict";
if (!d(e) || !e._mapData) throw new TypeError("Object is not a map.");
if (-1 === [g, y, _].indexOf(t)) throw new Error("Invalid iteration kind.");
this._map = e, this._nextIndex = 0, this._kind = t
}
function o(e, t) {
if (d(t)) {
var n = b(t);
return e._objectIndex[n]
}
var r = v + t;
return "string" == typeof t ? e._stringIndex[r] : e._otherIndex[r]
}
function u(e, t, n) {
var r = null == n;
if (d(t)) {
var o = b(t);
r ? delete e._objectIndex[o] : e._objectIndex[o] = n
} else {
var i = v + t;
"string" == typeof t ? r ? delete e._stringIndex[i] : e._stringIndex[i] = n : r ? delete e._otherIndex[i] : e._otherIndex[i] = n
}
}
function c(e) {
return e._mapData = [], e._objectIndex = {}, e._stringIndex = {}, e._otherIndex = {}, __DEV__ && w ? void(e.hasOwnProperty(m) ? e[m] = 0 : (Object.defineProperty(e, m, {
value: 0,
writable: !0
}), Object.defineProperty(e, "size", {
set: function() {
throw console.error("PLEASE FIX ME: You are changing the map size property which should not be writable and will break in production."), new Error("The map size property is not writable.")
},
get: function() {
return e[m]
}
}))) : void(e.size = 0)
}
function d(e) {
return null != e && ("object" == typeof e || "function" == typeof e)
}
function p(e, t) {
return {
value: e,
done: t
}
}
function h(e) {
return w ? Object.isExtensible(e) : !0
}
function f(e) {
var t;
switch (e.nodeType) {
case 1:
t = e.uniqueID;
break;
case 9:
t = e.documentElement.uniqueID;
break;
default:
return null
}
return t ? S + t : null
}
if (!l("Map")) return e.Map;
var m, g = "key",
_ = "value",
y = "key+value",
v = "$map_";
__DEV__ && (m = "$size" + i());
var S = "IE_HASH_";
n.prototype.clear = function() {
"use strict";
c(this)
}, n.prototype.has = function(e) {
"use strict";
var t = o(this, e);
return !(null == t || !this._mapData[t])
}, n.prototype.set = function(e, t) {
"use strict";
var n = o(this, e);
return null != n && this._mapData[n] ? this._mapData[n][1] = t : (n = this._mapData.push([e, t]) - 1, u(this, e, n), __DEV__ ? this[m] += 1 : this.size += 1), this
}, n.prototype.get = function(e) {
"use strict";
var n = o(this, e);
return null == n ? t : this._mapData[n][1]
}, n.prototype["delete"] = function(e) {
"use strict";
var n = o(this, e);
return null != n && this._mapData[n] ? (u(this, e, t), this._mapData[n] = t, __DEV__ ? this[m] -= 1 : this.size -= 1, !0) : !1
}, n.prototype.entries = function() {
"use strict";
return new r(this, y)
}, n.prototype.keys = function() {
"use strict";
return new r(this, g)
}, n.prototype.values = function() {
"use strict";
return new r(this, _)
}, n.prototype.forEach = function(e, n) {
"use strict";
if ("function" != typeof e) throw new TypeError("Callback must be callable.");
for (var r = e.bind(n || t), o = this._mapData, i = 0; i < o.length; i++) {
var a = o[i];
null != a && r(a[1], a[0], this)
}
}, n.prototype[s.ITERATOR_SYMBOL] = n.prototype.entries, r.prototype.next = function() {
"use strict";
if (!this instanceof n) throw new TypeError("Expected to be called on a MapIterator.");
var e = this._map,
r = this._nextIndex,
o = this._kind;
if (null == e) return p(t, !0);
for (var i = e._mapData; r < i.length;) {
var a = i[r];
if (r += 1, this._nextIndex = r, a) {
if (o === g) return p(a[0], !1);
if (o === _) return p(a[1], !1);
if (o) return p(a, !1)
}
}
return this._map = t, p(t, !0)
}, r.prototype[s.ITERATOR_SYMBOL] = function() {
return this
};
var w = function() {
try {
return Object.defineProperty({}, "x", {}), !0
} catch (e) {
return !1
}
}(),
b = function() {
var e = Object.prototype.propertyIsEnumerable,
t = i(),
n = 0;
return function(r) {
if (r[t]) return r[t];
if (!w && r.propertyIsEnumerable && r.propertyIsEnumerable[t]) return r.propertyIsEnumerable[t];
if (!w && a(r) && f(r)) return f(r);
if (!w && r[t]) return r[t];
if (h(r)) {
if (n += 1, w) Object.defineProperty(r, t, {
enumerable: !1,
writable: !1,
configurable: !1,
value: n
});
else if (r.propertyIsEnumerable) r.propertyIsEnumerable = function() {
return e.apply(this, arguments)
}, r.propertyIsEnumerable[t] = n;
else {
if (!a(r)) throw new Error("Unable to set a non-enumerable property on object.");
r[t] = n
}
return n
}
throw new Error("Non-extensible objects are not allowed as keys.")
}
}();
return n
}(Function("return this")())
}), __d("guid", [], function(e, t, n, r, o) {
function i() {
return "f" + (Math.random() * (1 << 30)).toString(16).replace(".", "")
}
o.exports = i
}), __d("isNode", [], function(e, t, n, r, o) {
function i(e) {
return !(!e || !("function" == typeof Node ? e instanceof Node : "object" == typeof e && "number" == typeof e.nodeType && "string" == typeof e.nodeName))
}
o.exports = i
}), __d("toIterator", [], function(e, t, n, r, o) {
var i = "key",
a = "value",
s = "key+value",
l = "function" == typeof Symbol ? Symbol.iterator : "@@iterator",
u = function() {
return Array.prototype[l] && String.prototype[l] ? function(e) {
return e[l]()
} : function() {
function e(e, t) {
"use strict";
if (!Array.isArray(e)) throw new TypeError("Object is not an Array");
this.$ArrayIterator_iteratedObject = e, this.$ArrayIterator_kind = t, this.$ArrayIterator_nextIndex = 0
}
function t(e) {
"use strict";
if ("string" != typeof e) throw new TypeError("Object is not a string");
this.$StringIterator_iteratedString = e, this.$StringIterator_nextIndex = 0
}
function n(e, t) {
return {
value: e,
done: t
}
}
return e.prototype.next = function() {
"use strict";
if (!this instanceof e) throw new TypeError("Object is not an ArrayIterator");
if (null == this.$ArrayIterator_iteratedObject) return n(void 0, !0);
var t = this.$ArrayIterator_iteratedObject,
r = this.$ArrayIterator_iteratedObject.length,
o = this.$ArrayIterator_nextIndex,
l = this.$ArrayIterator_kind;
return o >= r ? (this.$ArrayIterator_iteratedObject = void 0, n(void 0, !0)) : (this.$ArrayIterator_nextIndex = o + 1, l === i ? n(o, !1) : l === a ? n(t[o], !1) : l === s ? n([o, t[o]], !1) : void 0)
}, e.prototype["@@iterator"] = function() {
"use strict";
return this
}, t.prototype.next = function() {
"use strict";
if (!this instanceof t) throw new TypeError("Object is not a StringIterator");
if (null == this.$StringIterator_iteratedString) return n(void 0, !0);
var e = this.$StringIterator_nextIndex,
r = this.$StringIterator_iteratedString,
o = r.length;
if (e >= o) return this.$StringIterator_iteratedString = void 0, n(void 0, !0);
var i, a = r.charCodeAt(e);
if (55296 > a || a > 56319 || e + 1 === o) i = r[e];
else {
var s = r.charCodeAt(e + 1);
i = 56320 > s || s > 57343 ? r[e] : r[e] + r[e + 1]
}
return this.$StringIterator_nextIndex = e + i.length, n(i, !1)
}, t.prototype["@@iterator"] = function() {
"use strict";
return this
},
function(n, r) {
return "string" == typeof n ? new t(n) : Array.isArray(n) ? new e(n, r || a) : n[l]()
}
}()
}();
Object.assign(u, {
KIND_KEY: i,
KIND_VALUE: a,
KIND_KEY_VAL: s,
ITERATOR_SYMBOL: l
}), o.exports = u
}), __d("_shouldPolyfillES6Collection", [], function(e, t, n, r, o) {
function i(t) {
var n = e[t];
if (null == n) return !0;
var r = n.prototype;
return null == n || "function" != typeof n || "function" != typeof r.clear || 0 !== (new n).size || "function" != typeof r.keys || "function" != typeof r.forEach || s(n) || !a(n)
}
function a(e) {
function t() {
"use strict";
null !== e && e.apply(this, arguments)
}
for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
var r = null === e ? null : e.prototype;
t.prototype = Object.create(r), t.prototype.constructor = t, t.__superConstructor__ = e;
try {
var o = new t([]);
return o.size, o instanceof e
} catch (i) {
return !1
}
}
function s(e) {
try {
e()
} catch (t) {
return !1
}
return !0
}
o.exports = i
}), __d("GraphQLQueryRunner", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return !!e
}
function a(e) {
var t = [],
n = e.getQuery().rootCall();
return P.every(function(r) {
var o = r.query;
if (w(o.getQuery().rootCall(), n)) {
var i = I(e, o);
i !== e && (t.push(r.promise), e = i)
}
return null !== e
}), {
query: e,
dependencies: t
}
}
function s(e) {
var t = e.getOwnFields();
return 1 !== t.length || "id" !== t[0].getFieldName() ? !0 : e.getFragments().some(s)
}
function l(e) {
var t = e.getQuery();
return "node" === t.rootCall().getName() && !s(t)
}
function u(e) {
return e.getQuery().isDeferred()
}
function c(e, t, n, r) {
var o = t.onBlockingRequest,
i = t.onResolvable,
s = t.onSuccess,
c = t.onFailure,
d = 0;
g.await(function() {
var t = [];
e.forEach(function(e) {
F(e).forEach(function(e) {
l(e) || (u(e) || d++, t.push(e))
})
});
var f = r === p.FETCH_MODE_REFETCH ? E() : null,
m = function(e) {
if (u(e) || d--, !d) try {
i()
} catch (t) {
T(t)
}
},
g = function(e, t) {
return e.map(r === p.FETCH_MODE_CLIENT || r === p.FETCH_MODE_REFETCH ? function(e) {
var n = a(e);
return n.query && n.dependencies.push(L.add(n.query, R(n.query), t, f)), v.all(n.dependencies).then(function() {
return m(e)
})
} : function(e) {
return L.add(e, new S, t, null).then(function() {
return m(e)
})
})
};
if (t.length) {
var _ = u(t[0]) ? [] : t.splice(0, 1),
y = g(_, []),
w = g(t, y);
v.all(y.concat(w)).done(function() {
n.stop(), s()
}, function(e) {
n.stop(), c(e), h.warn(e)
}), x(d ? o : i)
} else x(i), x(s)
})
}
function d(e) {
var t = e.onBlockingRequest,
n = e.onResolvable,
r = e.onSuccess,
o = e.onFailure,
i = !1;
return {
abort: function() {
i = !0
},
abortableCallbacks: D({
onBlockingRequest: t,
onResolvable: n,
onSuccess: r,
onFailure: o
}, function(e) {
return function() {
return e && !i ? e.apply(null, arguments) : void 0
}
})
}
}
var p = t("DliteFetchModeConstants"),
h = t("DliteLog"),
f = t("DliteLogger"),
m = t("DliteProfiler"),
g = t("DliteTaskScheduler"),
_ = t("GraphQLDeferredQueryTracker"),
y = t("GraphQLStore"),
v = t("Promise"),
S = t("PublicPromise"),
w = t("containsQueryRootCall"),
b = t("extendArray"),
R = t("fetchRQL"),
C = t("forEachObject"),
E = t("generateForceIndex"),
D = t("mapObject"),
x = t("setImmediate"),
F = t("splitDeferredQueries"),
I = t("subtractQuery"),
T = t("throwImmediate"),
P = [],
L = {
run: function(e, t, n) {
var r = d(t),
o = r.abort,
i = r.abortableCallbacks;
y.emit(y.Events.beginQuery);
var a = f.logClientEvent("GraphQLQueryRunner.run");
n = n || p.FETCH_MODE_CLIENT;
var s = [];
return n === p.FETCH_MODE_CLIENT ? C(e, function(e) {
e && b(s, y.getDiffQueries(e))
}) : C(e, function(e) {
e && s.push(e)
}), c(s, i, a, n), y.emit(y.Events.endQuery), {
abort: o
}
},
forceFetch: function(e, t) {
var n = d(t),
r = n.abort,
o = n.abortableCallbacks;
y.emit(y.Events.beginQuery);
var i = f.logClientEvent("GraphQLQueryRunner.forceFetch"),
a = [];
C(e, function(e) {
e && b(a, y.getDiffQueries(e))
}), 0 === a.length && (x(o.onResolvable), o.onBlockingRequest = function() {});
var s = [];
return C(e, function(e) {
e && s.push(e)
}), c(s, o, i, p.FETCH_MODE_REFETCH), y.emit(y.Events.endQuery), {
abort: r
}
},
add: function(e, t, n, r) {
_.recordQuery(e);
var o = P.length,
i = v.all(n).finally(function() {
return t.then(function(t) {
return g.await(function() {
var n = t.response;
y.emit(y.Events.dataFromServer, n), y.handleUpdate(n, e, null, r), _.resolveQuery(e, n), delete P[o]
})
}, function(t) {
throw _.resolveQuery(e), delete P[o], t
})
});
return P[o] = {
fetchPromise: t,
id: e.getQuery().getID(),
promise: i,
query: e
}, i
},
resetPending: function() {
P = [], _.reset()
},
resolveQueryByID: function(e, t) {
var n = P.find(function(t) {
return t && t.id === e
});
n && n.fetchPromise.resolve && n.fetchPromise.resolve(t)
},
rejectQueryByID: function(e, t) {
var n = P.find(function(t) {
return t && t.id === e
});
n && n.fetchPromise.reject && n.fetchPromise.reject(new Error(t))
},
hasPendingQueries: function() {
return P.some(i)
},
hasPendingQuery: function(e) {
return _.isQueryPending(e)
}
};
m.instrumentMethods(L, {
hasPendingQuery: "GraphQLQueryRunner.hasPendingQuery"
}), o.exports = L
}), __d("DliteFetchModeConstants", [], function(e, t, n, r, o) {
"use strict";
var i = t("keyMirror"),
a = i({
FETCH_MODE_CLIENT: null,
FETCH_MODE_PRELOAD: null,
FETCH_MODE_REFETCH: null
});
o.exports = a
}), __d("DliteTaskScheduler", [], function(e, t, n, r, o) {
"use strict";
function i() {
p || (d.length ? (p = !0, u.resolve().done(function() {
var e = a(d.shift());
l ? l(e) : e()
})) : p = !1)
}
function a(e) {
var t = !1;
return function() {
t && c(0, "DliteTaskScheduler: Tasks can only be executed once."), t = !0, s(e), p = !1, i()
}
}
function s(e) {
var t = d;
d = [];
try {
e()
} finally {
Array.prototype.unshift.apply(t, d), d = t
}
}
var l, u = t("Promise"),
c = t("invariant"),
d = [],
p = !1,
h = {
injectScheduler: function(e) {
l = e
},
await: function() {
var e = arguments,
t = new u(function(t) {
function n(o) {
d.push(function() {
var i = e[r++](o);
r < e.length ? n(i) : t(i)
})
}
var r = 0;
n()
});
return i(), t
}
};
o.exports = h
}), __d("Promise", [], function(e, t, n, r, o) {
var i = t("ES6Promise"),
a = i.prototype,
s = t("invariant"),
l = (t("setImmediate"), t("throwImmediate"));
a.finally = function(e) {
return this.then(e, e)
}, a.done = function(e, t) {
this.then(e, t).then(null, l)
}, i.allObject = function(e) {
Array.isArray(e) && s(0, "expected an object, got an array instead");
var t = Object.keys(e);
return i.all(t.map(function(t) {
return e[t]
})).then(function(e) {
var n = {};
return e.forEach(function(e, r) {
n[t[r]] = e
}), n
})
}, o.exports = i
}), __d("ES6Promise", [], function(e, t, n, r, o) {
o.exports = function(e, n) {
"use strict";
function r(e) {
var t = e[f];
if (!t && (e[f] = t = {}, Object.defineProperty)) try {
Object.defineProperty(e, f, {
value: t
})
} catch (n) {}
return t
}
function o(e) {
return e
}
function i(e) {
throw e
}
function a(e) {
var t = r(this);
t.state = d, t.fulfillReactions = [], t.rejectReactions = [];
var n = s(this),
o = n.reject;
try {
e(n.resolve, o)
} catch (i) {
o(i)
}
}
function s(e) {
var t = !1;
return {
resolve: function(n) {
if (!t) {
if (t = !0, n === e) return l(e, h, new TypeError("Cannot resolve promise with itself"));
if (!n || "object" != typeof n || "function" != typeof n.then) return l(e, p, n);
var r = s(e),
o = r.reject;
try {
n.then(r.resolve, o)
} catch (i) {
o(i)
}
}
},
reject: function(n) {
t || (t = !0, l(e, h, n))
}
}
}
function l(e, t, o) {
var i = r(e);
if (i.state !== d) throw new Error("Settling a " + i.state + " promise");
var a;
t === p ? a = i.fulfillReactions : t === h && (a = i.rejectReactions), i.result = o, i.fulfillReactions = n, i.rejectReactions = n, i.state = t;
var s = a.length;
s && c(function() {
for (var e = 0; s > e; ++e) a[e](i.result)
})
}
function u(e, t, n, r) {
var o = arguments.length > 3;
return function(i) {
try {
i = n(o ? r : i)
} catch (a) {
return void t(a)
}
e(i)
}
}
var c = t("setImmediate"),
d = "pending",
p = "fulfilled",
h = "rejected",
f = "__slots$" + Math.random().toString(36).slice(2);
a.all = function(e) {
var t = this;
return new t(function(n, r) {
var o = [],
i = 0;
e.forEach(function(e, a) {
++i, t.resolve(e).then(function(e) {
o.hasOwnProperty(a) || (o[a] = e, --i || n(o))
}, r)
}), i || n(o)
})
}, a.race = function(e) {
var t = this;
return new t(function(n, r) {
e.forEach(function(e) {
t.resolve(e).then(n, r)
})
})
}, a.resolve = function(e) {
return e instanceof a && e.constructor === this ? e : new this(function(t) {
t(e)
})
}, a.reject = function(e) {
return new this(function(t, n) {
n(e)
})
};
var m = a.prototype;
return m.then = function(e, t) {
var a, s, l = new this.constructor(function(e, t) {
a = e, s = t
});
if ("function" != typeof a) throw new TypeError("Uncallable Promise resolve function");
if ("function" != typeof s) throw new TypeError("Uncallable Promise reject function");
(e === n || null === e) && (e = o), (t === n || null === t) && (t = i);
var f = r(this),
m = f.state;
return m === d ? (f.fulfillReactions.push(u(a, s, e)), f.rejectReactions.push(u(a, s, t))) : (m === p || m === h) && c(u(a, s, m === p ? e : t, f.result)), l
}, m["catch"] = function(e) {
return this.then(n, e)
}, m.toString = function() {
return "[object Promise]"
}, a
}(Function("return this")())
}), __d("throwImmediate", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
throw e
}
function a(e) {
s(i, e)
}
var s = t("setImmediate");
o.exports = a
}), __d("PublicPromise", [], function(e, t, n, r, o) {
function i() {
"use strict";
this.$PublicPromise_aborted = !1, this.$PublicPromise_settled = !1, this.$PublicPromise_promise = new a(function(e, t) {
this.$PublicPromise_resolve = e, this.$PublicPromise_reject = t
}.bind(this))
}
var a = t("Promise");
i.prototype.getPromise = function() {
"use strict";
return this.$PublicPromise_promise
}, i.prototype.resolve = function(e) {
"use strict";
this.$PublicPromise_aborted || (this.$PublicPromise_settled = !0, this.$PublicPromise_resolve(e))
}, i.prototype.reject = function(e) {
"use strict";
this.$PublicPromise_aborted || (this.$PublicPromise_settled = !0, this.$PublicPromise_reject(e))
}, i.prototype.then = function() {
"use strict";
return a.prototype.then.apply(this.$PublicPromise_promise, arguments)
}, i.prototype.done = function() {
"use strict";
return a.prototype.done.apply(this.$PublicPromise_promise, arguments)
}, i.prototype.abort = function() {
"use strict";
this.$PublicPromise_aborted = !0
}, i.prototype.isSettled = function() {
"use strict";
return this.$PublicPromise_settled
}, i.prototype.isAborted = function() {
"use strict";
return this.$PublicPromise_aborted
}, o.exports = i
}), __d("containsQueryRootCall", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
if (e.getName() !== t.getName() && !a(e, t)) return !1;
var n = e.getArgs();
return t.getArgs().every(function(e) {
for (var t = 0; t < n.length; t++)
if (e.equals(n[t])) return !0;
return !1
})
}
function a(e, t) {
return "nodes" === e.getName() && "node" === t.getName()
}
o.exports = i
}), __d("extendArray", [], function(e, t, n, r, o) {
function i(e, t) {
return Array.prototype.push.apply(e, t), e
}
o.exports = i
}), __d("fetchRQL", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
h.length || (h = [], p(a));
var t = new u;
return h.push({
query: e,
promise: t
}), t.getPromise()
}
function a() {
var e = l.instrumentAsync("fetchRQL.processPending");
d(h.map(s.bind(null, e.stop))), h.length = 0
}
function s(e, t) {
var n = t.query,
r = t.promise;
return new c(n.getQuery().getID(), n, function(t, n) {
n ? (e(), r.resolve({
error: t,
response: n
})) : r.reject(t)
})
}
var l = t("DliteProfiler"),
u = t("PublicPromise"),
c = t("RQLRequest"),
d = t("fetchBatchedRQL"),
p = t("setImmediate"),
h = [];
o.exports = i
}), __d("RQLRequest", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
this.$RQLRequest_name = e, this.$RQLRequest_query = t, this.$RQLRequest_callback = n
}
i.prototype.getName = function() {
return this.$RQLRequest_name
}, i.prototype.getQuery = function() {
return this.$RQLRequest_query
}, i.prototype.getCallback = function() {
return this.$RQLRequest_callback
}, o.exports = i
}), __d("fetchBatchedRQL", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t, n = {};
e.forEach(function(e) {
var r = e.getQuery().getQuery();
t = t || r.getQueryName(), n[e.getName()] = {
q: r.toString(),
ref_params: r.rootCall().getRefParams()
}
});
var r = {
access_token: u.accessToken,
pretty: !!__DEV__,
flush: 1,
method: "GET",
batch_name: t,
queries: JSON.stringify(n)
},
o = {};
e.forEach(function(e) {
o[e.getName()] = e.getCallback()
}), a(r, o)
}
function a(e, t) {
function n() {
return a <= u.retryDelays.length
}
function r() {
var e = u.retryDelays[a - 1],
t = Date.now() - l;
setTimeout(p.guard(o, "fetchBatchedRQL:retryRequest"), e - t)
}
function o() {
a++, l = Date.now();
var o = new _(u.graphBatchURI).setMethod("POST").setTransportBuilder(b).setTimeout(u.fetchTimeout).setRequestHeader("Content-Type", "application/x-www-form-urlencoded").setErrorHandler(function(e) {
n() && -1 !== C.indexOf(e.errorCode) ? (c.warn("HTTP error for fetchBatchedRQL, retrying. %s %s %s", e.errorType || "", e.errorCode || "", e.errorMsg || ""), r()) : w(t, function(t) {
t(y(e), null)
})
}).setTimeoutHandler(function() {
n() ? (c.warn("HTTP timeout for fetchBatchedRQL, retrying."), r()) : w(t, function(e) {
e(new m, null)
})
}),
d = 0,
p = function(e, n, r, o) {
i && (i.stop(), i = null);
var a;
try {
a = JSON.parse(e)
} catch (s) {
throw new f(S("JSON.parse(...) failed on: %s\nLengths: %s\nResponse:\n%s", e, JSON.stringify(o.lengths), o.rawText))
}
if (r) {
if (a.error) throw y({
errorType: a.error.type,
errorCode: a.error.code,
errorMsg: a.error.message
});
(void 0 === a.successful_results || void 0 === a.skipped_results) && R(0, "fetchBatchedRQL(...): Result count is undefined, successful_results: %s skipped_results: %s", a.successful_results, a.skipped_results);
var l = a.successful_results + a.skipped_results;
l !== d && R(0, "fetchBatchedRQL(...): Expected a total of %s responses, parsed %s total responses.", l, d)
} else w(a, function(e, n) {
var r = null;
e.error && (r = new h(e.error));
var o = e.response;
o && d++, t[n](r, o)
})
};
E(o, e, v(p, s))
}
var i = d.logClientEvent("fetchBatchedRQL"),
a = 0,
l = 0;
o()
}
function s(e) {
return e.trim()
}
function l(e, t, n) {
e.setResponseHandler(n).setData(t).send()
}
var u = t("DliteAPIConfig"),
c = t("DliteLog"),
d = t("DliteLogger"),
p = t("ErrorUtils"),
h = t("GraphQLCodedError"),
f = t("RQLError"),
m = t("RQLTimeoutError"),
g = t("XHRHttpError"),
_ = t("XHRRequest"),
y = t("createRQLError"),
v = t("createChunkedResponseParser"),
S = t("ex"),
w = t("forEachObject"),
b = t("getCrossOriginTransport"),
R = t("invariant"),
C = [g.HTTP_TRANSPORT_ERROR, g.HTTP_SERVER_ERROR],
E = l;
__DEV__ && (i.mockSendRequest = function(e) {
E = e
}, i.unmockSendRequest = function() {
E = l
}), o.exports = i
}), __d("DliteAPIConfig", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeModules").DliteAPIConfig;
o.exports = i
}), __d("GraphQLCodedError", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
this.name = "GraphQLCodedError", this.code = e.code, this.summary = e.summary, this.userMessage = e.description, this.debugInfo = e.debug_info, this.message = a(this.name + "(" + this.code + "): %s description: %s debug_info: %s", this.summary, this.userMessage, this.debugInfo), Error.captureStackTrace ? Error.captureStackTrace(this) : this.stack = (new Error).stack
}
var a = t("ex");
for (var s in Error) Error.hasOwnProperty(s) && (i[s] = Error[s]);
var l = null === Error ? null : Error.prototype;
i.prototype = Object.create(l), i.prototype.constructor = i, i.__superConstructor__ = Error, o.exports = i
}), __d("RQLError", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
this.name = "RQLError", this.message = e, this.type = "mustfix", Error.captureStackTrace ? Error.captureStackTrace(this) : this.stack = (new Error).stack, __DEV__ && (this.message += " -- Check your console.log or slog!")
}
for (var a in Error) Error.hasOwnProperty(a) && (i[a] = Error[a]);
var s = null === Error ? null : Error.prototype;
i.prototype = Object.create(s), i.prototype.constructor = i, i.__superConstructor__ = Error, o.exports = i
}), __d("RQLTimeoutError", [], function(e, t, n, r, o) {
"use strict";
function i() {
this.name = "RQLTimeoutError", this.message = "Request timed out", this.type = "warn"
}
var a = t("RQLError");
for (var s in a) a.hasOwnProperty(s) && (i[s] = a[s]);
var l = null === a ? null : a.prototype;
i.prototype = Object.create(l), i.prototype.constructor = i, i.__superConstructor__ = a, o.exports = i
}), __d("XHRHttpError", [], function(e, t, n, r, o) {
function i(e, t) {
if (0 === t) {
var n = e.getProtocol();
return "file" === n || "ftp" === n ? null : u
}
return t >= 100 && 200 > t ? s : t >= 200 && 300 > t ? null : t >= 400 && 500 > t ? a : t >= 500 && 600 > t ? l : t >= 12001 && 12156 > t ? u : c
}
var a = "HTTP_CLIENT_ERROR",
s = "HTTP_PROXY_ERROR",
l = "HTTP_SERVER_ERROR",
u = "HTTP_TRANSPORT_ERROR",
c = "HTTP_UNKNOWN_ERROR";
o.exports = {
getErrorCode: i,
HTTP_CLIENT_ERROR: a,
HTTP_PROXY_ERROR: s,
HTTP_SERVER_ERROR: l,
HTTP_TRANSPORT_ERROR: u,
HTTP_UNKNOWN_ERROR: c
}
}), __d("XHRRequest", [], function(e, t, n, r, o) {
function i(e) {
"use strict";
this.setURI(e), this.setMethod("POST"), this.setIsAsynchronous(!0), this.setTransportBuilder(u), this.setDataSerializer(d), this.$XHRRequest_onreadystatechange = this.$XHRRequest_onreadystatechange.bind(this)
}
var a = t("ErrorUtils"),
s = t("URI"),
l = t("XHRHttpError"),
u = t("getSameOriginTransport"),
c = t("invariant"),
d = t("xhrSimpleDataSerializer"),
p = {
errorCode: null,
errorMsg: null,
errorType: null
},
h = {
loadedBytes: null,
totalBytes: null
};
i.prototype.setURI = function(e) {
"use strict";
return this.$XHRRequest_uri = new s(e), this
}, i.prototype.getURI = function() {
"use strict";
return this.$XHRRequest_uri
}, i.prototype.setMethod = function(e) {
"use strict";
return this.$XHRRequest_method = e, this
}, i.prototype.getMethod = function() {
"use strict";
return this.$XHRRequest_method
}, i.prototype.setData = function(e) {
"use strict";
return this.$XHRRequest_data = e, this
}, i.prototype.getData = function() {
"use strict";
return this.$XHRRequest_data
}, i.prototype.setRawData = function(e) {
"use strict";
return this.$XHRRequest_rawData = e, this
}, i.prototype.setRequestHeader = function(e, t) {
"use strict";
return this.$XHRRequest_headers || (this.$XHRRequest_headers = {}), this.$XHRRequest_headers[e] = t, this
}, i.prototype.setTimeout = function(e) {
"use strict";
return this.$XHRRequest_timeout = e, this
}, i.prototype.setResponseHandler = function(e) {
"use strict";
return this.$XHRRequest_responseHandler = e, this
}, i.prototype.setErrorHandler = function(e) {
"use strict";
return this.$XHRRequest_errorHandler = e, this
}, i.prototype.setAbortHandler = function(e) {
"use strict";
return this.$XHRRequest_abortHandler = e, this
}, i.prototype.setTimeoutHandler = function(e) {
"use strict";
return this.$XHRRequest_timeoutHandler = e, this
}, i.prototype.setUploadProgressHandler = function(e) {
"use strict";
return this.$XHRRequest_uploadProgressHandler = e, this
}, i.prototype.setIsAsynchronous = function(e) {
"use strict";
return this.$XHRRequest_isAsynchronous = e, this
}, i.prototype.setTransportBuilder = function(e) {
"use strict";
return this.$XHRRequest_transportBuilder = e, this
}, i.prototype.setDataSerializer = function(e) {
"use strict";
return this.$XHRRequest_dataSerializer = e, this
}, i.prototype.send = function() {
"use strict";
var e = this.$XHRRequest_timeout,
t = this.$XHRRequest_transportBuilder(),
n = this.getURI();
this.$XHRRequest_pendingTransport = t;
var r;
if ("POST" !== this.$XHRRequest_method && this.$XHRRequest_rawData && c(0, "Must send raw data on post. Data: %s URI: %s", this.$XHRRequest_rawData, n), "GET" === this.$XHRRequest_method || this.$XHRRequest_rawData ? (n.addQueryData(this.$XHRRequest_data), r = this.$XHRRequest_rawData) : r = this.$XHRRequest_dataSerializer(this.$XHRRequest_data), t.onreadystatechange = this.$XHRRequest_onreadystatechange, t.upload && this.$XHRRequest_uploadProgressHandler && (t.upload.onprogress = this.$XHRRequest_onuploadprogress.bind(this)), e && (this.$XHRRequest_timeoutTimer = setTimeout(this.$XHRRequest_ontimeout.bind(this), e)), t.open(this.$XHRRequest_method, n.toString(), this.$XHRRequest_isAsynchronous), this.$XHRRequest_headers)
for (var o in this.$XHRRequest_headers) t.setRequestHeader(o, this.$XHRRequest_headers[o]);
t.send(r), this.$XHRRequest_isAsynchronous || t.onreadystatechange(null, !0)
}, i.prototype.abort = function() {
"use strict";
this.$XHRRequest_abort(), this.$XHRRequest_abortHandler && a.applyWithGuard(this.$XHRRequest_abortHandler, null, null, null, "XHRRequest:_abortHandler")
}, i.prototype.$XHRRequest_abort = function() {
"use strict";
var e = this.$XHRRequest_pendingTransport;
e && (e.onreadystatechange = null, e.abort()), this.$XHRRequest_cleanup()
}, i.prototype.$XHRRequest_ontimeout = function() {
"use strict";
this.$XHRRequest_abort(), this.$XHRRequest_timeoutHandler && a.applyWithGuard(this.$XHRRequest_timeoutHandler, null, null, null, "XHRRequest:_abortHandler")
}, i.prototype.$XHRRequest_onreadystatechange = function(e, t) {
"use strict";
if (this.$XHRRequest_isAsynchronous || t === !0) {
var n = this.$XHRRequest_pendingTransport,
r = n,
o = r.readyState;
if (o >= 2) {
var i = 4 === o,
s = this.getURI(),
u = l.getErrorCode(s, n.status),
c = this.$XHRRequest_responseHandler;
if (null !== u) i && (p.errorCode = u, p.errorMsg = n.responseText, p.errorType = "HTTP", this.$XHRRequest_errorHandler && a.applyWithGuard(this.$XHRRequest_errorHandler, null, [p], null, "XHRRequest:_errorHandler"));
else if (c) {
var d = null;
c.includeHeaders && (d = n.getAllResponseHeaders()), (i || c.parseStreaming && 3 === o) && a.applyWithGuard(c, null, [n.responseText, d, i], null, "XHRRequest:handler")
}
i && this.$XHRRequest_cleanup()
}
}
}, i.prototype.$XHRRequest_onuploadprogress = function(e) {
"use strict";
h.loadedBytes = e.loaded, h.totalBytes = e.total, this.$XHRRequest_uploadProgressHandler && a.applyWithGuard(this.$XHRRequest_uploadProgressHandler, null, [h], null, "XHRRequest:_uploadProgressHandler")
}, i.prototype.$XHRRequest_cleanup = function() {
"use strict";
clearTimeout(this.$XHRRequest_timeoutTimer), delete this.$XHRRequest_pendingTransport
}, o.exports = i
}), __d("getSameOriginTransport", [], function(e, t, n, r, o) {
"use strict";
function i() {
return new a
}
var a = t("RKXMLHttpRequest");
o.exports = i
}), __d("xhrSimpleDataSerializer", [], function(e, t, n, r, o) {
function i(e) {
var t, n = [];
for (t in e) n.push(encodeURIComponent(t) + "=" + encodeURIComponent(e[t]));
return n.join("&")
}
o.exports = i
}), __d("createRQLError", [], function(e, t, n, r, o) {
function i(e, t) {
var n = e.errorCode === a.HTTP_CLIENT_ERROR,
r = e.errorCode === a.HTTP_TRANSPORT_ERROR;
return t = t || c("HTTP error: %s %s: %s", e.errorType, e.errorCode, e.errorMsg), r ? new u(t) : n && /OAuthException/.test(e.errorMsg || "") ? new l(t) : new s(t)
}
var a = t("XHRHttpError"),
s = t("RQLError"),
l = t("RQLOAuthError"),
u = t("RQLTransportError"),
c = t("ex");
o.exports = i
}), __d("RQLOAuthError", [], function(e, t, n, r, o) {
"use strict";
function i() {
this.message = "OAuth Exception", this.name = "RQLOAuthError", this.type = "mustfix"
}
var a = t("RQLError");
for (var s in a) a.hasOwnProperty(s) && (i[s] = a[s]);
var l = null === a ? null : a.prototype;
i.prototype = Object.create(l), i.prototype.constructor = i, i.__superConstructor__ = a, o.exports = i
}), __d("RQLTransportError", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
this.name = "RQLTransportError", this.message = e, this.type = "warn"
}
var a = t("RQLError");
for (var s in a) a.hasOwnProperty(s) && (i[s] = a[s]);
var l = null === a ? null : a.prototype;
i.prototype = Object.create(l), i.prototype.constructor = i, i.__superConstructor__ = a, o.exports = i
}), __d("createChunkedResponseParser", [], function(e, t, n, r, o) {
function i(e, t) {
var n = 0,
r = {
lengths: [],
rawText: ""
},
o = function(o, i, u) {
if (r.rawText = o, r.lengths.push(o.length), t && (o = t(o), null != o && "string" != typeof o && a(0, "createChunkedResponseParser: Filtered response must be a ?string")), o)
for (var c = o.length; c > n;) {
var d = o.indexOf(s, n);
if (0 > d) {
if (!u) break;
d = c
}
var p = o.slice(n, d);
n += p.length + l, e(p, i, u && n >= c, r)
} else u && e("", i, !0, r)
};
return o.parseStreaming = !0, o
}
var a = t("invariant"),
s = "\r\n",
l = 2;
o.exports = i
}), __d("getCrossOriginTransport", [], function(e, t, n, r, o) {
"use strict";
function i() {
return new a
}
var a = t("RKXMLHttpRequest");
o.exports = i
}), __d("splitDeferredQueries", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t = e.getQuery(),
n = t.getID(),
r = null,
o = a(t),
i = o.required,
u = o.deferredFields,
c = o.deferredFragments,
p = o.deferredQueries;
r = i === t ? [e] : i ? [new d.QueryWithValues(i)] : [];
for (var h = 0; h < u.length; h++) r.push(l(t, u[h], null));
for (var f = 0; f < c.length; f++) c[f].hasFields() && r.push(l(t, null, c[f]));
for (var m = 0; m < p.length; m++) r.push(s(n, p[m]));
return r
}
function a(e) {
var t, n, r = null,
o = null,
i = null,
s = null,
l = null,
p = null,
f = u(e),
m = e.getOwnFields();
for (t = 0; t < m.length; t++) {
var g = m[t];
for (p = a(g), (r || p.required !== g) && (r = r || m.slice(0, t), p.required && r.push(p.required)), n = 0; n < p.deferredFields.length; n++) i = i || [], i.push(g.shallowClone([p.deferredFields[n]], null));
for (n = 0; n < p.deferredFragments.length; n++) i = i || [], i.push(g.shallowClone(null, [p.deferredFragments[n]]));
for (n = 0; n < p.deferredQueries.length; n++) l = l || [], l.push(p.deferredQueries[n])
}
if (e instanceof d.Field && l)
for (t = 0; t < l.length; t++) l[t].path.unshift(c(e));
var _ = e.getFragments();
for (t = 0; t < _.length; t++) {
var y = _[t];
if (y.isDeferred()) {
if (f) {
var v = e.getInferredPrimaryKey();
l = l || [], l.push({
rootCallName: f,
path: [c(e), v],
fields: e.getOwnUnaliasedFields(v),
fragments: [y.shallowClone(y.getOwnFields(), y.getFragments())]
})
} else s = s || [], s.push(y);
o = o || _.slice(0, t)
} else {
for (p = a(y), (o || p.required !== y) && (o = o || _.slice(0, t), p.required && o.push(p.required)), n = 0; n < p.deferredFields.length; n++) s = s || [], s.push(y.shallowClone([p.deferredFields[n]], null));
for (n = 0; n < p.deferredFragments.length; n++) f ? (l = l || [], l.push({
rootCallName: f,
path: [c(e), e.getInferredPrimaryKey()],
fields: h,
fragments: [y.shallowClone(null, [p.deferredFragments[n]])]
})) : (s = s || [], s.push(y.shallowClone(null, [p.deferredFragments[n]])));
for (n = 0; n < p.deferredQueries.length; n++) l = l || [], l.push(p.deferredQueries[n])
}
}
var S;
return S = r || o ? 0 === (r || m).length && 0 === (o || _).length ? null : e instanceof d.Query ? e.shallowCloneWithSameID(r || m, o || _) : e.shallowClone(r || m, o || _) : e, {
required: S,
deferredFields: i || h,
deferredFragments: s || h,
deferredQueries: l || h
}
}
function s(e, t) {
return new d.QueryWithValues(new d.Query(t.rootCallName, [new d.BatchCallVariable(e, "$.*." + t.path.join("."))], t.fields, t.fragments, {
isDeferred: !0
}, null))
}
function l(e, t, n) {
var r = e.getOwnUnaliasedFields("id"),
o = null;
if (n) {
var i = Object.keys(n.getDeferredFragmentNames());
1 !== i.length && p(0, "Only one fragment should be returned"), o = i[0]
}
return o = o || e.getQueryName() + "_defer", new d.QueryWithValues(e.shallowClone(t ? r.concat(t) : r, n ? [n] : null, {
isDeferred: !0
}, o))
}
function u(e) {
return e instanceof d.Field ? e.getInferredRootCallName() : null
}
function c(e) {
return (e.getAlias() || e.getFieldName()) + (e.isPlural() ? ".*" : "")
}
var d = t("GraphQL_EXPERIMENTAL"),
p = t("invariant"),
h = [];
o.exports = i
}), __d("subtractQuery", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
var n = e.getQuery(),
r = t.getQuery(),
o = a(n, [r]);
return o === n ? e : o ? new f.QueryWithValues(o) : null
}
function a(e, t) {
var n, r = e.getOwnFields(),
o = s(r, function(e) {
return "id" === e.getFieldName() ? (n = e, e) : l(e, t)
});
o && 1 === o.length && o[0] === n && (o = null);
var i = e.getFragments(),
u = s(i, function(e) {
return a(e, t)
});
return r === o && i === u ? e : o && 0 !== o.length || u && 0 !== u.length ? e.shallowClone(o, u) : null
}
function s(e, t) {
if (0 === e.length) return e;
var n = null;
return e.forEach(function(r, o) {
var i = t(r);
i !== r && (n = n || e.slice(0, o)), null !== n && null !== i && n.push(i)
}), n ? 0 === n.length ? null : n : e
}
function l(e, t) {
var n = e.getFieldName();
if (e.hasOwnFields() || e.getFragments().length) {
var r;
if (t.forEach(function(t) {
u(t, n, function(t) {
d(e, t) && (r = r || [], r.push(t))
})
}), r) return a(e, r)
} else {
var o = t.some(function(t) {
return c(t, n, function(t) {
return d(e, t)
})
});
if (o) return null
}
return e
}
function u(e, t, n) {
c(e, t, function() {
n.apply(this, arguments)
})
}
function c(e, t, n) {
for (var r, o = [e]; r = o.shift();) {
if (r.getOwnUnaliasedFields(t).some(n)) return !0;
m.apply(o, r.getFragments())
}
return !1
}
function d(e, t) {
var n = e.getCalls(),
r = t.getCalls(),
o = n.length;
if (o !== r.length) return !1;
if (o)
for (var i = e.isConnection() ? p : h, a = 0; o > a; a++) {
var s = n[a],
l = r[a];
if (s.getName() !== l.getName() || !i(s, l)) return !1
}
return !0
}
function p(e, t) {
var n = e.getName();
return "first" === n || "last" === n ? e.getArgs()[0] <= t.getArgs()[0] : h(e, t)
}
function h(e, t) {
var n = e.getArgs(),
r = t.getArgs(),
o = n.length;
if (o !== r.length) return !1;
for (var i = 0; o > i; i++)
if (!n[i].equals(r[i])) return !1;
return !0
}
var f = t("GraphQL_EXPERIMENTAL"),
m = Array.prototype.push;
o.exports = i
}), __d("ReactGraphQLComparators", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n, r) {
var o;
for (o in t)
if (!(r && !r.hasOwnProperty(o) || !t.hasOwnProperty(o) || n.hasOwnProperty(o) && e(t[o], n[o], o))) return !1;
for (o in n)
if ((!r || r.hasOwnProperty(o)) && n.hasOwnProperty(o) && !t.hasOwnProperty(o)) return !1;
return !0
}
function a(e, t) {
return e === t && (null === e || "object" != typeof e)
}
function s(e, t, n) {
return n in l ? e === t : a(e, t)
}
var l = {
route: !0
},
u = {
Mixin: {
isStateEqualTo: function(e) {
return i(a, this.state, e)
},
isContextEqualTo: function(e) {
return i(s, this.context, e)
},
isDliteContextEqualTo: function(e) {
return i(s, this.context, e, l)
},
arePropsEqualTo: function(e) {
return i(this._isPropEqual, this.props, e)
},
areDlitePropsEqualTo: function(e) {
return i(this._isPropEqual, this.props, e, this.constructor.queries)
},
_isPropEqual: function(e, t, n) {
return this.constructor.queries.hasOwnProperty(n) ? e === t : a(e, t)
}
}
};
o.exports = u
}), __d("SubscriptionsHandler", [], function(e, t, n, r, o) {
function i(e) {
return e.remove || e.reset || e.unsubscribe
}
function a(e) {
var t = i(e);
t.call(e)
}
function s() {
"use strict";
this._subscriptions = []
}
var l = t("invariant");
s.prototype.addSubscriptions = function() {
"use strict";
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]);
e.forEach(function(e) {
var t = i(e);
t || l(0, "Subscription requires release function")
}), this._subscriptions ? this._subscriptions = this._subscriptions.concat(e) : e.forEach(a)
}, s.prototype.engage = function() {
"use strict";
this._subscriptions = this._subscriptions || []
}, s.prototype.release = function() {
"use strict";
this._subscriptions && (this._subscriptions.forEach(a), this._subscriptions = null)
}, o.exports = s
}), __d("ReactDefaultPerf", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return Math.floor(100 * e) / 100
}
function a(e, t, n) {
e[t] = (e[t] || 0) + n
}
var s = t("DOMProperty"),
l = t("ReactDefaultPerfAnalysis"),
u = t("ReactMount"),
c = t("ReactPerf"),
d = t("performanceNow"),
p = {
_allMeasurements: [],
_mountStack: [0],
_injected: !1,
start: function() {
p._injected || c.injection.injectMeasure(p.measure), p._allMeasurements.length = 0, c.enableMeasure = !0
},
stop: function() {
c.enableMeasure = !1
},
getLastMeasurements: function() {
return p._allMeasurements
},
printExclusive: function(e) {
e = e || p._allMeasurements;
var t = l.getExclusiveSummary(e);
console.table(t.map(function(e) {
return {
"Component class name": e.componentName,
"Total inclusive time (ms)": i(e.inclusive),
"Exclusive mount time (ms)": i(e.exclusive),
"Exclusive render time (ms)": i(e.render),
"Mount time per instance (ms)": i(e.exclusive / e.count),
"Render time per instance (ms)": i(e.render / e.count),
Instances: e.count
}
}))
},
printInclusive: function(e) {
e = e || p._allMeasurements;
var t = l.getInclusiveSummary(e);
console.table(t.map(function(e) {
return {
"Owner > component": e.componentName,
"Inclusive time (ms)": i(e.time),
Instances: e.count
}
})), console.log("Total time:", l.getTotalTime(e).toFixed(2) + " ms")
},
getMeasurementsSummaryMap: function(e) {
var t = l.getInclusiveSummary(e, !0);
return t.map(function(e) {
return {
"Owner > component": e.componentName,
"Wasted time (ms)": e.time,
Instances: e.count
}
})
},
printWasted: function(e) {
e = e || p._allMeasurements, console.table(p.getMeasurementsSummaryMap(e)), console.log("Total time:", l.getTotalTime(e).toFixed(2) + " ms")
},
printDOM: function(e) {
e = e || p._allMeasurements;
var t = l.getDOMSummary(e);
console.table(t.map(function(e) {
var t = {};
return t[s.ID_ATTRIBUTE_NAME] = e.id, t.type = e.type, t.args = JSON.stringify(e.args), t
})), console.log("Total time:", l.getTotalTime(e).toFixed(2) + " ms")
},
_recordWrite: function(e, t, n, r) {
var o = p._allMeasurements[p._allMeasurements.length - 1].writes;
o[e] = o[e] || [], o[e].push({
type: t,
time: n,
args: r
})
},
measure: function(e, t, n) {
return function() {
for (var r = [], o = 0, i = arguments.length; i > o; o++) r.push(arguments[o]);
var s, l, c;
if ("_renderNewRootComponent" === t || "flushBatchedUpdates" === t) return p._allMeasurements.push({
exclusive: {},
inclusive: {},
render: {},
counts: {},
writes: {},
displayNames: {},
totalTime: 0
}), c = d(), l = n.apply(this, r), p._allMeasurements[p._allMeasurements.length - 1].totalTime = d() - c, l;
if ("ReactDOMIDOperations" === e || "ReactComponentBrowserEnvironment" === e) {
if (c = d(), l = n.apply(this, r), s = d() - c, "mountImageIntoNode" === t) {
var h = u.getID(r[1]);
p._recordWrite(h, t, s, r[0])
} else "dangerouslyProcessChildrenUpdates" === t ? r[0].forEach(function(e) {
var t = {};
null !== e.fromIndex && (t.fromIndex = e.fromIndex), null !== e.toIndex && (t.toIndex = e.toIndex), null !== e.textContent && (t.textContent = e.textContent), null !== e.markupIndex && (t.markup = r[1][e.markupIndex]), p._recordWrite(e.parentID, e.type, s, t)
}) : p._recordWrite(r[0], t, s, Array.prototype.slice.call(r, 1));
return l
}
if ("ReactCompositeComponent" !== e || "mountComponent" !== t && "updateComponent" !== t && "_renderValidatedComponent" !== t) return n.apply(this, r);
var f = "mountComponent" === t ? r[0] : this._rootNodeID,
m = "_renderValidatedComponent" === t,
g = "mountComponent" === t,
_ = p._mountStack,
y = p._allMeasurements[p._allMeasurements.length - 1];
if (m ? a(y.counts, f, 1) : g && _.push(0), c = d(), l = n.apply(this, r), s = d() - c, m) a(y.render, f, s);
else if (g) {
var v = _.pop();
_[_.length - 1] += s, a(y.exclusive, f, s - v), a(y.inclusive, f, s)
} else a(y.inclusive, f, s);
return y.displayNames[f] = {
current: this.constructor.displayName,
owner: this._owner ? this._owner.constructor.displayName : "<root>"
}, l
}
}
};
o.exports = p
}), __d("DOMProperty", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
return (e & t) === t
}
var a = t("invariant"),
s = {
MUST_USE_ATTRIBUTE: 1,
MUST_USE_PROPERTY: 2,
HAS_SIDE_EFFECTS: 4,
HAS_BOOLEAN_VALUE: 8,
HAS_NUMERIC_VALUE: 16,
HAS_POSITIVE_NUMERIC_VALUE: 48,
HAS_OVERLOADED_BOOLEAN_VALUE: 64,
injectDOMPropertyConfig: function(e) {
var t = e.Properties || {},
n = e.DOMAttributeNames || {},
r = e.DOMPropertyNames || {},
o = e.DOMMutationMethods || {};
e.isCustomAttribute && u._isCustomAttributeFunctions.push(e.isCustomAttribute);
for (var l in t) {
u.isStandardName.hasOwnProperty(l) && a(0, "injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.", l), u.isStandardName[l] = !0;
var c = l.toLowerCase();
if (u.getPossibleStandardName[c] = l, n.hasOwnProperty(l)) {
var d = n[l];
u.getPossibleStandardName[d] = l, u.getAttributeName[l] = d
} else u.getAttributeName[l] = c;
u.getPropertyName[l] = r.hasOwnProperty(l) ? r[l] : l, u.getMutationMethod[l] = o.hasOwnProperty(l) ? o[l] : null;
var p = t[l];
u.mustUseAttribute[l] = i(p, s.MUST_USE_ATTRIBUTE), u.mustUseProperty[l] = i(p, s.MUST_USE_PROPERTY), u.hasSideEffects[l] = i(p, s.HAS_SIDE_EFFECTS), u.hasBooleanValue[l] = i(p, s.HAS_BOOLEAN_VALUE), u.hasNumericValue[l] = i(p, s.HAS_NUMERIC_VALUE), u.hasPositiveNumericValue[l] = i(p, s.HAS_POSITIVE_NUMERIC_VALUE), u.hasOverloadedBooleanValue[l] = i(p, s.HAS_OVERLOADED_BOOLEAN_VALUE), u.mustUseAttribute[l] && u.mustUseProperty[l] && a(0, "DOMProperty: Cannot require using both attribute and property: %s", l), !u.mustUseProperty[l] && u.hasSideEffects[l] && a(0, "DOMProperty: Properties that have side effects must use property: %s", l), !!u.hasBooleanValue[l] + !!u.hasNumericValue[l] + !!u.hasOverloadedBooleanValue[l] <= 1 || a(0, "DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s", l)
}
}
},
l = {},
u = {
ID_ATTRIBUTE_NAME: "data-reactid",
isStandardName: {},
getPossibleStandardName: {},
getAttributeName: {},
getPropertyName: {},
getMutationMethod: {},
mustUseAttribute: {},
mustUseProperty: {},
hasSideEffects: {},
hasBooleanValue: {},
hasNumericValue: {},
hasPositiveNumericValue: {},
hasOverloadedBooleanValue: {},
_isCustomAttributeFunctions: [],
isCustomAttribute: function(e) {
for (var t = 0; t < u._isCustomAttributeFunctions.length; t++) {
var n = u._isCustomAttributeFunctions[t];
if (n(e)) return !0
}
return !1
},
getDefaultValueForProperty: function(e, t) {
var n, r = l[e];
return r || (l[e] = r = {}), t in r || (n = document.createElement(e), r[t] = n[t]), r[t]
},
injection: s
};
o.exports = u
}), __d("ReactDefaultPerfAnalysis", [], function(e, t, n, r, o) {
function i(e) {
for (var t = 0, n = 0; n < e.length; n++) {
var r = e[n];
t += r.totalTime
}
return t
}
function a(e) {
for (var t = [], n = 0; n < e.length; n++) {
var r, o = e[n];
for (r in o.writes) o.writes[r].forEach(function(e) {
t.push({
id: r,
type: d[e.type] || e.type,
args: e.args
})
})
}
return t
}
function s(e) {
for (var t, n = {}, r = 0; r < e.length; r++) {
var o = e[r],
i = Object.assign({}, o.exclusive, o.inclusive);
for (var a in i) t = o.displayNames[a].current, n[t] = n[t] || {
componentName: t,
inclusive: 0,
exclusive: 0,
render: 0,
count: 0
}, o.render[a] && (n[t].render += o.render[a]), o.exclusive[a] && (n[t].exclusive += o.exclusive[a]), o.inclusive[a] && (n[t].inclusive += o.inclusive[a]), o.counts[a] && (n[t].count += o.counts[a])
}
var s = [];
for (t in n) n[t].exclusive >= c && s.push(n[t]);
return s.sort(function(e, t) {
return t.exclusive - e.exclusive
}), s
}
function l(e, t) {
for (var n, r = {}, o = 0; o < e.length; o++) {
var i, a = e[o],
s = Object.assign({}, a.exclusive, a.inclusive);
t && (i = u(a));
for (var l in s)
if (!t || i[l]) {
var d = a.displayNames[l];
n = d.owner + " > " + d.current, r[n] = r[n] || {
componentName: n,
time: 0,
count: 0
}, a.inclusive[l] && (r[n].time += a.inclusive[l]), a.counts[l] && (r[n].count += a.counts[l])
}
}
var p = [];
for (n in r) r[n].time >= c && p.push(r[n]);
return p.sort(function(e, t) {
return t.time - e.time
}), p
}
function u(e) {
var t = {},
n = Object.keys(e.writes),
r = Object.assign({}, e.exclusive, e.inclusive);
for (var o in r) {
for (var i = !1, a = 0; a < n.length; a++)
if (0 === n[a].indexOf(o)) {
i = !0;
break
}!i && e.counts[o] > 0 && (t[o] = !0)
}
return t
}
var c = 1.2,
d = {
mountImageIntoNode: "set innerHTML",
INSERT_MARKUP: "set innerHTML",
MOVE_EXISTING: "move",
REMOVE_NODE: "remove",
TEXT_CONTENT: "set textContent",
updatePropertyByID: "update attribute",
deletePropertyByID: "delete attribute",
updateStylesByID: "update styles",
updateInnerHTMLByID: "set innerHTML",
dangerouslyReplaceNodeWithMarkupByID: "replace"
},
p = {
getExclusiveSummary: s,
getInclusiveSummary: l,
getDOMSummary: a,
getTotalTime: i
};
o.exports = p
}), __d("ReactMount", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t = R(e);
return t && G.getID(t)
}
function a(e) {
var t = s(e);
if (t)
if (P.hasOwnProperty(t)) {
var n = P[t];
n !== e && (c(n, t) && E(0, "ReactMount: Two valid but unequal nodes with the same `%s`: %s", T, t), P[t] = e)
} else P[t] = e;
return t
}
function s(e) {
return e && e.getAttribute && e.getAttribute(T) || ""
}
function l(e, t) {
var n = s(e);
n !== t && delete P[n], e.setAttribute(T, t), P[t] = e
}
function u(e) {
return P.hasOwnProperty(e) && c(P[e], e) || (P[e] = G.findReactNodeByID(e)), P[e]
}
function c(e, t) {
if (e) {
s(e) !== t && E(0, "ReactMount: Unexpected modification of `%s`", T);
var n = G.findReactContainerForID(t);
if (n && w(n, e)) return !0
}
return !1
}
function d(e) {
delete P[e]
}
function p(e) {
var t = P[e];
return t && c(t, e) ? void(N = t) : !1
}
function h(e) {
N = null, v.traverseAncestors(e, p);
var t = N;
return N = null, t
}
var f = t("DOMProperty"),
m = t("ReactBrowserEventEmitter"),
g = t("ReactCurrentOwner"),
_ = t("ReactElement"),
y = t("ReactLegacyElement"),
v = t("ReactInstanceHandles"),
S = t("ReactPerf"),
w = t("containsNode"),
b = t("deprecated"),
R = t("getReactRootElementInContainer"),
C = t("instantiateReactComponent"),
E = t("invariant"),
D = t("shouldUpdateReactComponent"),
x = t("warning"),
F = y.wrapCreateElement(_.createElement),
I = v.SEPARATOR,
T = f.ID_ATTRIBUTE_NAME,
P = {},
L = 1,
k = 9,
M = {},
A = {};
if (__DEV__) var Q = {};
var O = [],
N = null,
G = {
_instancesByReactRootID: M,
scrollMonitor: function(e, t) {
t()
},
_updateRootComponent: function(e, t, n, r) {
var o = t.props;
return G.scrollMonitor(n, function() {
e.replaceProps(o, r)
}), __DEV__ && (Q[i(n)] = R(n)), e
},
_registerComponent: function(e, t) {
(!t || t.nodeType !== L && t.nodeType !== k) && E(0, "_registerComponent(...): Target container is not a DOM element."), m.ensureScrollValueMonitoring();
var n = G.registerContainer(t);
return M[n] = e, n
},
_renderNewRootComponent: S.measure("ReactMount", "_renderNewRootComponent", function(e, t, n) {
x(null == g.current, "_renderNewRootComponent(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.");
var r = C(e, null),
o = G._registerComponent(r, t);
return r.mountComponentIntoNode(o, t, n), __DEV__ && (Q[o] = R(t)), r
}),
render: function(e, t, n) {
_.isValidElement(e) || E(0, "renderComponent(): Invalid component element.%s", "string" == typeof e ? " Instead of passing an element string, make sure to instantiate it by passing it to React.createElement." : y.isValidFactory(e) ? " Instead of passing a component class, make sure to instantiate it by passing it to React.createElement." : "undefined" != typeof e.props ? " This may be caused by unintentionally loading two independent copies of React." : "");
var r = M[i(t)];
if (r) {
var o = r._currentElement;
if (D(o, e)) return G._updateRootComponent(r, e, t, n);
G.unmountComponentAtNode(t)
}
var a = R(t),
s = a && G.isRenderedByReact(a),
l = s && !r,
u = G._renderNewRootComponent(e, t, l);
return n && n.call(u), u
},
constructAndRenderComponent: function(e, t, n) {
var r = F(e, t);
return G.render(r, n)
},
constructAndRenderComponentByID: function(e, t, n) {
var r = document.getElementById(n);
return r || E(0, 'Tried to get element with id of "%s" but it is not present on the page.', n), G.constructAndRenderComponent(e, t, r)
},
registerContainer: function(e) {
var t = i(e);
return t && (t = v.getReactRootIDFromNodeID(t)), t || (t = v.createReactRootID()), A[t] = e, t
},
unmountComponentAtNode: function(e) {
x(null == g.current, "unmountComponentAtNode(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.");
var t = i(e),
n = M[t];
return n ? (G.unmountComponentFromNode(n, e), delete M[t], delete A[t], __DEV__ && delete Q[t], !0) : !1
},
unmountComponentFromNode: function(e, t) {
for (e.unmountComponent(), t.nodeType === k && (t = t.documentElement); t.lastChild;) t.removeChild(t.lastChild)
},
findReactContainerForID: function(e) {
var t = v.getReactRootIDFromNodeID(e),
n = A[t];
if (__DEV__) {
var r = Q[t];
if (r && r.parentNode !== n) {
s(r) !== t && E(0, "ReactMount: Root element ID differed from reactRootID.");
var o = n.firstChild;
o && t === s(o) ? Q[t] = o : console.warn("ReactMount: Root element has been removed from its original container. New container:", r.parentNode)
}
}
return n
},
findReactNodeByID: function(e) {
var t = G.findReactContainerForID(e);
return G.findComponentRoot(t, e)
},
isRenderedByReact: function(e) {
if (1 !== e.nodeType) return !1;
var t = G.getID(e);
return t ? t.charAt(0) === I : !1
},
getFirstReactDOM: function(e) {
for (var t = e; t && t.parentNode !== t;) {
if (G.isRenderedByReact(t)) return t;
t = t.parentNode
}
return null
},
findComponentRoot: function(e, t) {
var n = O,
r = 0,
o = h(t) || e;
for (n[0] = o.firstChild, n.length = 1; r < n.length;) {
for (var i, a = n[r++]; a;) {
var s = G.getID(a);
s ? t === s ? i = a : v.isAncestorIDOf(s, t) && (n.length = r = 0, n.push(a.firstChild)) : n.push(a.firstChild), a = a.nextSibling
}
if (i) return n.length = 0, i
}
n.length = 0, E(0, "findComponentRoot(..., %s): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.", t, G.getID(e))
},
getReactRootID: i,
getID: a,
setID: l,
getNode: u,
purgeID: d
};
G.renderComponent = b("ReactMount", "renderComponent", "render", this, G.render), o.exports = G
}), __d("ReactBrowserEventEmitter", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return Object.prototype.hasOwnProperty.call(e, g) || (e[g] = f++, p[e[g]] = {}), p[e[g]]
}
var a = t("EventConstants"),
s = t("EventPluginHub"),
l = t("EventPluginRegistry"),
u = t("ReactEventEmitterMixin"),
c = t("ViewportMetrics"),
d = t("isEventSupported"),
p = {},
h = !1,
f = 0,
m = {
topBlur: "blur",
topChange: "change",
topClick: "click",
topCompositionEnd: "compositionend",
topCompositionStart: "compositionstart",
topCompositionUpdate: "compositionupdate",
topContextMenu: "contextmenu",
topCopy: "copy",
topCut: "cut",
topDoubleClick: "dblclick",
topDrag: "drag",
topDragEnd: "dragend",
topDragEnter: "dragenter",
topDragExit: "dragexit",
topDragLeave: "dragleave",
topDragOver: "dragover",
topDragStart: "dragstart",
topDrop: "drop",
topFocus: "focus",
topInput: "input",
topKeyDown: "keydown",
topKeyPress: "keypress",
topKeyUp: "keyup",
topMouseDown: "mousedown",
topMouseMove: "mousemove",
topMouseOut: "mouseout",
topMouseOver: "mouseover",
topMouseUp: "mouseup",
topPaste: "paste",
topScroll: "scroll",
topSelectionChange: "selectionchange",
topTextInput: "textInput",
topTouchCancel: "touchcancel",
topTouchEnd: "touchend",
topTouchMove: "touchmove",
topTouchStart: "touchstart",
topWheel: "wheel"
},
g = "_reactListenersID" + String(Math.random()).slice(2),
_ = Object.assign({}, u, {
ReactEventListener: null,
injection: {
injectReactEventListener: function(e) {
e.setHandleTopLevel(_.handleTopLevel), _.ReactEventListener = e
}
},
setEnabled: function(e) {
_.ReactEventListener && _.ReactEventListener.setEnabled(e)
},
isEnabled: function() {
return !(!_.ReactEventListener || !_.ReactEventListener.isEnabled())
},
listenTo: function(e, t) {
for (var n = t, r = i(n), o = l.registrationNameDependencies[e], s = a.topLevelTypes, u = 0, c = o.length; c > u; u++) {
var p = o[u];
r.hasOwnProperty(p) && r[p] || (p === s.topWheel ? d("wheel") ? _.ReactEventListener.trapBubbledEvent(s.topWheel, "wheel", n) : d("mousewheel") ? _.ReactEventListener.trapBubbledEvent(s.topWheel, "mousewheel", n) : _.ReactEventListener.trapBubbledEvent(s.topWheel, "DOMMouseScroll", n) : p === s.topScroll ? d("scroll", !0) ? _.ReactEventListener.trapCapturedEvent(s.topScroll, "scroll", n) : _.ReactEventListener.trapBubbledEvent(s.topScroll, "scroll", _.ReactEventListener.WINDOW_HANDLE) : p === s.topFocus || p === s.topBlur ? (d("focus", !0) ? (_.ReactEventListener.trapCapturedEvent(s.topFocus, "focus", n), _.ReactEventListener.trapCapturedEvent(s.topBlur, "blur", n)) : d("focusin") && (_.ReactEventListener.trapBubbledEvent(s.topFocus, "focusin", n), _.ReactEventListener.trapBubbledEvent(s.topBlur, "focusout", n)), r[s.topBlur] = !0, r[s.topFocus] = !0) : m.hasOwnProperty(p) && _.ReactEventListener.trapBubbledEvent(p, m[p], n), r[p] = !0)
}
},
trapBubbledEvent: function(e, t, n) {
return _.ReactEventListener.trapBubbledEvent(e, t, n)
},
trapCapturedEvent: function(e, t, n) {
return _.ReactEventListener.trapCapturedEvent(e, t, n)
},
ensureScrollValueMonitoring: function() {
if (!h) {
var e = c.refreshScrollValues;
_.ReactEventListener.monitorScrollValue(e), h = !0
}
},
eventNameDispatchConfigs: s.eventNameDispatchConfigs,
registrationNameModules: s.registrationNameModules,
putListener: s.putListener,
getListener: s.getListener,
deleteListener: s.deleteListener,
deleteAllListeners: s.deleteAllListeners
});
o.exports = _
}), __d("ViewportMetrics", [], function(e, t, n, r, o) {
"use strict";
var i = t("getUnboundedScrollPosition"),
a = {
currentScrollLeft: 0,
currentScrollTop: 0,
refreshScrollValues: function() {
var e = i(window);
a.currentScrollLeft = e.x, a.currentScrollTop = e.y
}
};
o.exports = a
}), __d("getUnboundedScrollPosition", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return e === window ? {
x: window.pageXOffset || document.documentElement.scrollLeft,
y: window.pageYOffset || document.documentElement.scrollTop
} : {
x: e.scrollLeft,
y: e.scrollTop
}
}
o.exports = i
}), __d("isEventSupported", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
if (!s.canUseDOM || t && !("addEventListener" in document)) return !1;
var n = "on" + e,
r = n in document;
if (!r) {
var o = document.createElement("div");
o.setAttribute(n, "return;"), r = "function" == typeof o[n]
}
return !r && a && "wheel" === e && (r = document.implementation.hasFeature("Events.wheel", "3.0")), r
}
var a, s = t("ExecutionEnvironment");
s.canUseDOM && (a = document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0), o.exports = i
}), __d("containsNode", [], function(e, t, n, r, o) {
function i(e, t) {
return e && t ? e === t ? !0 : a(e) ? !1 : a(t) ? i(e, t.parentNode) : e.contains ? e.contains(t) : e.compareDocumentPosition ? !!(16 & e.compareDocumentPosition(t)) : !1 : !1
}
var a = t("isTextNode");
o.exports = i
}), __d("isTextNode", [], function(e, t, n, r, o) {
function i(e) {
return a(e) && 3 == e.nodeType
}
var a = t("isNode");
o.exports = i
}), __d("getReactRootElementInContainer", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return e ? e.nodeType === a ? e.documentElement : e.firstChild : null
}
var a = 9;
o.exports = i
}), __d("GroupsFeedApp", [], function(e, t, n, r, o) {
"use strict";
var i = t("DliteLoadingComponent"),
a = t("GroupRoute"),
s = t("React"),
l = t("THGroupView"),
u = t("View");
t("THRoutingConfig").initialize();
var c = s.createClass({
displayName: "GroupsFeedApp",
render: function() {
var e = s.createElement(u, {
style: {
paddingTop: this.props.topInset
}
}, l.getFakeStoryView());
return s.createElement(i, {
component: l,
route: new a(null, {
group: this.props.group
}),
loadingView: e,
refetchRoute: !0,
passProps: this.props
})
}
});
o.exports = c
}), __d("DliteLoadingComponent", [], function(e, t, n, r, o) {
"use strict";
var i, a = t("Dlite"),
s = t("FBSpinner"),
l = t("React"),
u = t("StyleSheet"),
c = t("StyleSheetPropType"),
d = t("TimerMixin"),
p = t("View"),
h = t("merge"),
f = t("performanceNow"),
m = 250,
g = u.create({
spinner: {
alignItems: "center",
paddingTop: 200
}
}),
_ = l.createClass({
displayName: "DliteLoadingComponent",
mixins: [d],
propTypes: {
loadingView: l.PropTypes.component,
delayLoad: l.PropTypes.bool,
refetchRoute: l.PropTypes.bool,
onDataReady: l.PropTypes.func,
passProps: l.PropTypes.object,
style: c,
navigator: l.PropTypes.object,
navigationOperations: l.PropTypes.object
},
getInitialState: function() {
return {
dataReady: !1
}
},
getDefaultProps: function() {
return {
loadingView: l.createElement(p, {
style: g.spinner
}, l.createElement(s, null)),
delayLoad: !1,
refetchRoute: !1
}
},
shouldComponentUpdate: function(e, t) {
return t.dataReady !== this.state.dataReady || e.style !== this.props.style || e.passProps !== this.props.passProps
},
componentWillReceiveProps: function(e) {
this.props.route !== e.route && (this.setState({
dataReady: !1
}), this._loadData(e))
},
componentWillMount: function() {
this._loadData(this.props)
},
_runQueries: function(e) {
var t = e.component,
n = {
refetch: e.refetchRoute
};
i = f(), a.createAndExecuteQueries(t, e.route, n, {
onResolvable: e.refetchRoute ? this._onReceive.bind(this, e) : null,
onSuccess: this._onReceive.bind(this, e),
onFailure: function(t) {
return console.error("Error running query for " + e.route.getName() + ": ", t)
}
})
},
_onReceive: function(e) {
var t = e.route;
this.isMounted() && t === this.props.route ? this.setState({
dataReady: !0
}, this.props.onDataReady) : console.info("_loadData finished, but route has changed.", "initialRoute", t, "currentRoute", this.props.route)
},
_loadData: function(e) {
e.delayLoad ? this.setTimeout(this._runQueries.bind(this, e), m) : this._runQueries(e)
},
_forceUpdate: function(e) {
a.createAndExecuteQueries(this.props.component, this.props.route, {
refetch: !0
}, e)
},
getComponent: function() {
return this._component
},
render: function() {
var e = this.props.component,
t = h({
navigator: this.props.navigationOperations || this.props.navigator,
forceUpdate: this._forceUpdate
}, this.props.passProps),
n = function(e) {
this._component = e
}.bind(this),
r = this.state.dataReady ? a.createComponent(e, this.props.route, t, n) : this.props.loadingView;
return l.createElement(p, {
style: this.props.style
}, r)
}
});
o.exports = _
}), __d("Dlite", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
return f(t, function(t, n) {
var r = e + "." + n;
return function() {
var e = a.logClientEvent(r),
n = t.apply(this, arguments);
return e.stop(), n
}
})
}
var a = t("DliteLogger"),
s = t("DliteRouter"),
l = t("DliteRoutingWrapper"),
u = t("GraphQLQueryRunner"),
c = t("GraphQLStore"),
d = t("React"),
p = t("extendArray"),
h = t("forEachObject"),
f = t("mapObject"),
m = t("splitDeferredQueries"),
g = {
createAndExecuteQueries: function(e, t, n, r) {
var o = g.createQueries(e, t);
return n.refetch ? u.forceFetch(o, r) : u.run(o, r)
},
createQueries: function(e, t) {
return e.getQueriesForRoute(t)
},
createComponent: function(e, t, n, r) {
return s.addRoute(t.constructor), Object.assign(n, f(g.createQueries(e, t), function(e) {
if (e) {
var t = c.resolvePointersForQuery(e),
n = Object.keys(t)[0];
return t[n]
}
return null
})), d.createElement(l, {
route: t,
onRef: r,
childFactory: function() {
return d.createElement(e, Object.assign({}, n))
}
})
},
createDeferredQueries: function(e, t) {
var n = [];
return h(e.getQueriesForRoute(t), function(e) {
e && p(n, m(e))
}), n
},
insertQueryResponses: function(e, t) {
h(e, function(e, n) {
c.handleUpdate(t[n], e)
})
}
};
o.exports = i("Dlite", g)
}), __d("DliteRoutingWrapper", [], function(e, t, n, r, o) {
"use strict";
var i = t("DliteRoute"),
a = t("DliteRouteProvider"),
s = t("React"),
l = t("cloneWithProps"),
u = s.PropTypes,
c = s.createClass({
displayName: "DliteRoutingWrapper",
mixins: [a.Mixin],
propTypes: {
route: u.instanceOf(i).isRequired,
childFactory: u.func.isRequired,
onRef: u.func
},
componentDidMount: function() {
this.props.onRef && this.props.onRef(this.refs.root)
},
componentWillUnmount: function() {
this.props.onRef && this.props.onRef(null)
},
getDliteRoute: function() {
return this.props.route
},
getWrappedComponent: function() {
return this.refs.root
},
render: function() {
return l(this.props.childFactory(), {
ref: "root"
})
}
});
o.exports = c
}), __d("DliteRouteProvider", [], function(e, t, n, r, o) {
"use strict";
var i = t("DliteRoute"),
a = t("React"),
s = t("invariant"),
l = a.PropTypes,
u = {
Mixin: {
childContextTypes: {
route: l.instanceOf(i).isRequired
},
getChildContext: function() {
return "function" != typeof this.getDliteRoute && s(0, "DliteRouteProvider mixin requires getDliteRoute to be implemented"), {
route: this.getDliteRoute()
}
}
}
};
o.exports = u
}), __d("cloneWithProps", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
__DEV__ && u(!e.ref, "You are calling cloneWithProps() on a child with a ref. This is dangerous because you're creating a new child which will not be added as a ref to its parent.");
var n = s.mergeProps(t, e.props);
return !n.hasOwnProperty(c) && e.props.hasOwnProperty(c) && (n.children = e.props.children), a.createElement(e.type, n)
}
var a = t("ReactElement"),
s = t("ReactPropTransferer"),
l = t("keyOf"),
u = t("warning"),
c = l({
children: null
});
o.exports = i
}), __d("FBSpinner", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeMethodsMixin"),
a = t("React"),
s = t("ReactIOSViewAttributes"),
l = t("StyleSheet"),
u = t("View"),
c = t("createReactIOSNativeComponentClass"),
d = t("keyMirror"),
p = d({
large: null,
small: null
}),
h = a.createClass({
displayName: "FBSpinner",
propTypes: {
size: a.PropTypes.oneOf(Object.keys(p))
},
statics: {
LARGE: p.large,
SMALL: p.small
},
mixins: [i],
viewConfig: {
uiViewClassName: "FBActivityIndicatorView",
validAttributes: s.UIView
},
getDefaultProps: function() {
return {
size: p.small
}
},
render: function() {
return a.createElement(u, {
style: [f.container, this.props.style]
}, a.createElement(g, {
style: [m[this.props.size], f.transparent]
}))
}
}),
f = l.create({
container: {
alignItems: "center",
justifyContent: "center"
},
transparent: {
backgroundColor: "transparent"
},
sizeSmall: {
height: 20,
width: 20
},
sizeLarge: {
height: 36,
width: 36
}
}),
m = {};
m[p.large] = f.sizeLarge, m[p.small] = f.sizeSmall;
var g = c({
validAttributes: s.UIView,
uiViewClassName: "FBActivityIndicatorView"
});
o.exports = h
}), __d("StyleSheet", [], function(e, t, n, r, o) {
"use strict";
function i() {}
var a = t("ImageStylePropTypes"),
s = t("ReactPropTypeLocations"),
l = t("StyleSheetRegistry"),
u = t("TextStylePropTypes"),
c = t("ViewStylePropTypes"),
d = t("invariant"),
p = {},
h = function(e, t, n, r) {
d(0, e + "\n" + (n || "<<unknown>>") + ": " + JSON.stringify(t, null, " ") + (r || ""))
};
i.create = function(e) {
var t = {};
for (var n in e) i.validateStyle(n, e), t[n] = l.registerStyle(e[n]);
return t
}, i.validateStyleProp = function(e, t, n) {
if (__DEV__) {
if (void 0 === p[e]) {
var r = '"' + e + '" is not a valid style property.',
o = "\nValid style props: " + JSON.stringify(Object.keys(p), null, " ");
h(r, t, n, o)
}
var i = p[e](t, e, n, s.prop);
i && h(i.message, t, n)
}
}, i.validateStyle = function(e, t) {
if (__DEV__)
for (var n in t[e]) i.validateStyleProp(n, t[e], "StyleSheet " + e)
}, i.addValidStylePropTypes = function(e) {
for (var t in e) void 0 !== p[t] && p[t] !== e[t] && d(0, 'Attemped to redefine existing style prop type "' + t + '".'), p[t] = e[t]
}, i.addValidStylePropTypes(a), i.addValidStylePropTypes(u), i.addValidStylePropTypes(c), o.exports = i
}), __d("ImageStylePropTypes", [], function(e, t, n, r, o) {
"use strict";
var i = t("ImageResizeMode"),
a = t("LayoutPropTypes"),
s = t("ReactPropTypes"),
l = t("merge"),
u = l(a, {
resizeMode: s.oneOf(Object.keys(i)),
backgroundColor: s.string,
borderColor: s.string,
borderWidth: s.number,
borderRadius: s.number,
opacity: s.number
}),
c = Object.keys({
padding: null,
paddingTop: null,
paddingLeft: null,
paddingRight: null,
paddingBottom: null,
paddingVertical: null,
paddingHorizontal: null
});
for (var d in c) delete u[d];
o.exports = u
}), __d("ImageResizeMode", [], function(e, t, n, r, o) {
"use strict";
var i = t("keyMirror"),
a = i({
contain: null,
cover: null,
stretch: null
});
o.exports = a
}), __d("View", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeMethodsMixin"),
a = t("NativeModules"),
s = t("ReactPropTypes"),
l = t("React"),
u = t("ReactIOSViewAttributes"),
c = t("StyleSheetPropType"),
d = t("ViewStylePropTypes"),
p = a.RKUIManager.StyleConstants,
h = t("createReactIOSNativeComponentClass"),
f = {
height: 0
},
m = c(d),
g = l.createClass({
displayName: "View",
mixins: [i],
viewConfig: {
uiViewClassName: "RKView",
validAttributes: u.RKView
},
propTypes: {
style: m,
notActuallyTapDontUseMe: s.func,
accessible: s.bool,
testID: s.string,
onTouchStart: s.func,
onTouchMove: s.func,
onTouchEnd: s.func,
onResponderGrant: s.func,
onResponderReject: s.func,
onResponderMove: s.func,
onResponderRelease: s.func,
onResponderTerminate: s.func,
onResponderTerminationRequest: s.func,
onMoveShouldSetResponder: s.func,
onStartShouldSetResponder: s.func,
onStartShouldSetResponderCapture: s.func,
onFocus: s.func,
onBlur: s.func,
pointerEvents: s.oneOf([p.PointerEventsValues.boxNone, p.PointerEventsValues.none, p.PointerEventsValues.boxOnly, p.PointerEventsValues.unspecified])
},
render: function() {
return l.createElement(_, Object.assign({}, this.props))
}
}),
_ = h({
validAttributes: u.RKView,
uiViewClassName: "RKView"
}),
y = _;
__DEV__ && (y = g), y.PointerEvents = p.PointerEventsValues, y.dummyView = function() {
return l.createElement(y, {
style: f
})
}, y.stylePropType = m, o.exports = y
}), __d("StyleSheetPropType", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t = a(e);
return function(e, n, r, o) {
var i = e;
return e[n] && (i = {}, i[n] = s(e[n])), t(i, n, r, o)
}
}
var a = t("createStrictShapeTypeChecker"),
s = t("flattenStyle");
o.exports = i
}), __d("createStrictShapeTypeChecker", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
function t(t, n, r, o, i) {
if (!n[r]) return void(t && s(0, "Required object `" + r + "` was not specified in " + ("`" + o + "`.")));
var u = n[r],
c = typeof u,
d = a[i];
"object" !== c && s(0, "Invalid " + d + " `" + r + "` of type `" + c + "` " + ("supplied to `" + o + "`, expected `object`."));
var p = l(n[r], e);
for (var h in p) {
var f = e[h];
f || s(0, "Invalid props." + r + " key `" + h + "` supplied to `" + o + "`.\nBad object: " + JSON.stringify(n[r], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(e), null, " "));
var m = f(u, h, o, i);
if (m) return s(0, m.message + "\nBad object: " + JSON.stringify(n[r], null, " ")), m
}
}
var n = t.bind(null, !1);
return n.isRequired = t.bind(null, !0), n
}
var a = t("ReactPropTypeLocationNames"),
s = t("invariant"),
l = t("merge");
o.exports = i
}), __d("TimerMixin", [], function(e, t, n, r, o) {
"use strict";
var i = function(e, t, n) {
return function(r, o) {
var i = e(function() {
t.call(this, i), r.apply(this, arguments)
}.bind(this), o);
return this[n] ? this[n].push(i) : this[n] = [i], i
}
},
a = function(e, t) {
return function(n) {
if (this[t]) {
var r = this[t].indexOf(n); - 1 !== r && this[t].splice(r, 1)
}
e(n)
}
},
s = "TimerMixin_timeouts",
l = a(clearTimeout, s),
u = i(setTimeout, l, s),
c = "TimerMixin_intervals",
d = a(clearInterval, c),
p = i(setInterval, function() {}, c),
h = "TimerMixin_immediates",
f = a(clearImmediate, h),
m = i(setImmediate, f, h),
g = "TimerMixin_rafs",
_ = a(cancelAnimationFrame, g),
y = i(requestAnimationFrame, _, g),
v = {
componentWillUnmount: function() {
this[s] && this[s].forEach(this.clearTimeout.bind(this)), this[c] && this[c].forEach(this.clearInterval.bind(this)), this[h] && this[h].forEach(this.clearImmediate.bind(this)), this[g] && this[g].forEach(this.cancelAnimationFrame.bind(this))
},
setTimeout: u,
clearTimeout: l,
setInterval: p,
clearInterval: d,
setImmediate: m,
clearImmediate: f,
requestAnimationFrame: y,
cancelAnimationFrame: _
};
o.exports = v
}), __d("GroupRoute", [], function(e, t, n, r, o) {
"use strict";
var i = t("DliteRoute"),
a = i.create({
name: "GroupRoute",
path: "/{group}",
paramDefinitions: {
group: {
type: "String",
required: !0
}
},
queries: {
group: function(e, t, n) {
return function(e, t) {
var r = n.__GraphQL;
return new r.Query("node", [n.__var(e)], [new r.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], [n.__frag(t)], null, "UnknownFile_group")
}(e, t)
}
}
});
o.exports = a
}), __d("THGroupView", [], function(e, t, n, r, o) {
"use strict";
var i = t("AnimationMixin"),
a = t("FBSpinner"),
s = t("FeedbackPoller"),
l = t("GraphQL_EXPERIMENTAL"),
u = t("GraphQLStore"),
c = t("Image"),
d = t("ImmutableMap"),
p = t("NativeModules"),
h = t("React"),
f = t("ReactGraphQL"),
m = t("RKDeviceEventEmitter"),
g = t("RKDimensions"),
_ = t("RKNativeAppEventEmitter"),
y = t("StyleSheet"),
v = t("Subscribable"),
S = t("TableView"),
w = t("Text"),
b = t("THColors"),
R = t("THDockedInputContainer"),
C = t("THFeedbackView"),
E = t("THFeedUnitView"),
D = t("TimerMixin"),
x = t("TouchableHighlight"),
F = t("View"),
I = (t("deepDiffer"), t("fbt")),
T = t("fetchRQL"),
P = t("format"),
L = t("invariant"),
k = t("isEmpty"),
M = t("ix"),
A = t("merge"),
Q = t("rql"),
O = t("uniqueKey"),
N = "docked_reply_container",
G = p.RKUIManager,
$ = p.RKTreehouseManager,
B = 70,
U = 36,
V = "gk_catalyst_th_live_update",
q = "th_group_comment_tti",
H = h.createClass({
displayName: "THGroupView",
propTypes: {
navigator: h.PropTypes.object,
topInset: h.PropTypes.number,
bottomInset: h.PropTypes.number
},
getDefaultProps: function() {
return {
topInset: 0,
bottomInset: 0
}
},
mixins: [f.Mixin, v.Mixin, i, D],
statics: {
queryParams: {
count: 5
},
queries: {
viewer: function(e, t) {
return function(e, n, r) {
var o = t.__GraphQL;
return new o.QueryFragment("UnknownFile_viewer", "Viewer", [new o.Field("__configs__", [new o.Field("edges", [new o.Field("node", [new o.Field("name"), new o.Field("enabled")])], null, null, null, null, {
plural: !0,
edgesID: "UnknownFile_viewer_1"
})], null, [new o.Callv("named", [t.__var(n)], {
varargs: 1
})], null, null, {
connection: !0,
nonLimitable: !0,
nonFindable: !0
})], [t.__frag(e), t.__frag(r)], {
scope: "UnknownFile_viewer"
})
}(E.getQuery("viewer"), V, C.getQuery("viewerOptimisticPrefetch"))
},
group: function(e, t, n) {
return function(e, n, r, o) {
var i = t.__GraphQL;
return new i.QueryFragment("UnknownFile_group", "Group", [new i.Field("id"), new i.Field("group_stories", [new i.Field("edges", [new i.Field("cursor", null, null, null, null, null, {
requisite: !0
}), new i.Field("node", [new i.Field("id", null, null, null, null, null, {
requisite: !0
}), new i.Field("feedback", [new i.Field("id", null, null, null, null, null, {
requisite: !0
}), new i.Field("top_level_comments", [new i.Field("last_view_time"), new i.Field("unread_count")], null, null, "top_level_comment_counts", null, {
connection: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id"
}), new i.Field("creation_time")], [t.__frag(n)], null, null, null, {
rootCall: "node",
pk: "id",
requisite: !0
})], null, null, null, null, {
plural: !0,
edgesID: "UnknownFile_group_1"
}), new i.Field("page_info", [new i.Field("has_next_page", null, null, null, null, null, {
requisite: !0
}), new i.Field("has_previous_page", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
requisite: !0
})], null, [new i.Callv("first", [t.__var(e)])], null, null, {
connection: !0
}), new i.Field("group_pinned_stories", [new i.Field("count"), new i.Field("edges", [new i.Field("node", [new i.Field("id", null, null, null, null, null, {
requisite: !0
})], [t.__frag(r)], null, null, null, {
rootCall: "node",
pk: "id",
requisite: !0
}), new i.Field("cursor", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
plural: !0,
edgesID: "UnknownFile_group_2"
}), new i.Field("page_info", [new i.Field("has_next_page", null, null, null, null, null, {
generated: !0,
requisite: !0
}), new i.Field("has_previous_page", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
generated: !0,
requisite: !0
})], null, [new i.Callv("first", ["1"])], null, null, {
connection: !0
}), new i.Field("visibility"), new i.Field("viewer_join_state")], [t.__frag(o)], {
scope: "UnknownFile_group"
})
}(n.count, E.getQuery("story"), E.getQuery("story"), E.getQuery("group"))
}
},
navItemTitle: function() {
return "Group"
},
getFakeStoryView: function() {
var e = g.get("window").width;
return h.createElement(F, {
style: W.backdrop
}, h.createElement(F, {
style: W.divider
}), h.createElement(F, {
style: W.grayPadding
}), h.createElement(F, {
style: W.divider
}), h.createElement(F, {
style: W.fakeStoryCell
}, h.createElement(F, {
style: W.fakeStoryHeader
}, h.createElement(F, {
style: W.fakeStoryProfilePicture
}), h.createElement(F, null, h.createElement(F, {
style: [W.fakeStoryTextBlock, {
width: 120,
marginBottom: 10
}]
}), h.createElement(F, {
style: [W.fakeStoryTextBlock, {
width: 100
}]
}))), h.createElement(F, {
style: [W.fakeStoryTextBlock, {
width: e - 60,
marginTop: 8
}]
}), h.createElement(F, {
style: [W.fakeStoryTextBlock, {
width: e - 70
}]
}), h.createElement(F, {
style: [W.fakeStoryTextBlock, {
width: e - 90
}]
}), h.createElement(F, {
style: [W.fakeStoryTextBlock, {
width: e - 70
}]
}), h.createElement(F, {
style: [W.fakeStoryTextBlock, {
width: e - 90
}]
}), h.createElement(F, {
style: [W.fakeStoryTextBlock, {
width: e - 60
}]
})))
}
},
getInitialState: function() {
return {
sectionData: d.create({
pinnedPostSection: d.create({}),
storiesSection: d.create({})
}),
submitCallback: null,
abortCallback: null,
keyboardHeight: 0,
tappedFeedUnitHandle: null,
tappedUnitKey: null,
permalinkContentInsets: null,
pinnedPostIsDisplayed: !1,
prevVisibleIndex: {
start: 0,
end: 0
},
rowAnimationType: "none",
initialInsertionComplete: !1,
contentInsets: {
top: this.props.topInset,
bottom: this.props.bottomInset
},
olderPostsDividerKey: null
}
},
viewForHeaderInSection: function() {
return F.dummyView()
},
getAdjacentKeys: function(e, t) {
var n, r, o = {};
for (var i in t) {
if (r) return o[i] = i, o;
i === e && (n && (o[n] = n), r = !0), n = i
}
return o
},
clearPermalinkMode: function() {
if (this.refs[N].enableScrollResponderAutoInsets(!0), this.state.tappedUnitKey in this.state.sectionData.storiesSection) {
var e = this.state.sectionData.storiesSection,
t = this.getAdjacentKeys(this.state.tappedUnitKey, e);
t[this.state.tappedUnitKey] = this.state.tappedUnitKey;
var n = {};
for (var r in t) n[r] = A(e[r], {
hideSeparator: !1,
hideAll: !1
});
this.setState({
sectionData: d.set(this.state.sectionData, {
storiesSection: d.set(e, n)
})
})
}
this.setState({
tappedFeedUnitHandle: null,
permalinkContentInsets: null,
tappedUnitKey: null
})
},
permalinkInsetsError: function(e) {
console.error("Error calculating insets for the permalink mode: ", e)
},
onSetInsetFailure: function() {
console.error("Unable to set contentInsets when focusing story")
},
viewForTableFooter: function() {
return this.props.group && "CLOSED" === this.props.group.visibility && "MEMBER" !== this.props.group.viewer_join_state ? h.createElement(F, {
style: W.nonMemberView
}, h.createElement(c, {
style: W.lockIcon,
source: M("thLockIcon")
}), h.createElement(F, {
style: W.nonMemberTextContainer
}, h.createElement(w, {
style: W.nonMemberText
}, I({
type: "text",
texts: ["Only members can see posts"],
desc: "Explanation for why no group stories are shown"
})))) : this.props.group && this.props.group.group_stories && !this.props.group.group_stories.page_info.has_next_page ? h.createElement(F, {
style: W.tailLoadingIndicator
}, h.createElement(c, {
style: W.endDot,
source: M("newsfeedEnd")
})) : 0 === d.size(this.state.sectionData.storiesSection) ? H.getFakeStoryView() : h.createElement(F, {
style: W.tailLoadingIndicator
}, h.createElement(a, null))
},
cellForRowAtIndexPath: function(e, t) {
var n, r, o, i;
if ("pinnedPostSection" === e) {
var a = this.state.sectionData.pinnedPostSection[t];
n = a.isBeingDisplayed ? h.createElement(E, {
onInputRequested: this.handleInputRequested,
story: a.node,
group: this.props.group,
viewer: this.props.viewer,
navigator: this.props.navigator,
key: t,
context: {
isGroupStream: !0
},
canCommentInline: !1
}) : h.createElement(x, {
style: W.wrapper,
onPress: this.openPinnedPost
}, h.createElement(F, {
style: W.pinnedPostCell,
onPress: this.viewPinnedPost
}, h.createElement(w, {
style: W.pinnedPostText
}, I({
type: "text",
texts: ["Show Pinned Post"],
desc: "Button to see the pinned post of a group"
}))))
} else if ("storiesSection" === e) {
var a = this.state.sectionData.storiesSection[t];
a.hideAll ? o = W.hide : a.hideSeparator && (r = W.hide), a.node.id === this.state.olderPostsDividerKey && (i = h.createElement(F, {
style: [W.olderPostsHeader, r]
}, h.createElement(w, {
style: W.olderPostsText
}, I({
type: "text",
texts: ["OLDER POSTS"],
desc: "Header for older group posts"
})))), n = h.createElement(E, {
onInputRequested: this.handleInputRequested,
story: a.node,
group: this.props.group,
viewer: this.props.viewer,
navigator: this.props.navigator,
key: t,
context: {
isGroupStream: !0
},
canCommentInline: !1
})
}
return h.createElement(F, {
style: [W.backdrop, o]
}, h.createElement(F, {
style: [W.divider, r]
}), h.createElement(F, {
style: [W.grayPadding, r]
}), i, h.createElement(F, {
style: [W.divider, r]
}), n)
},
isStoryUnread: function(e) {
var t = e.node.feedback.top_level_comment_counts;
if (!t) return !1;
var n = t.last_view_time ? e.node.creation_time > t.last_view_time : !1;
return n || t.unread_count > 0
},
handleInputRequested: function(e, t, n) {
this.setState({
submitCallback: t,
abortCallback: n,
tappedFeedUnitHandle: e.tappedFeedUnitHandle,
tappedUnitKey: O(e.tappedFeedUnitID)
}), this.refs[N].initiateDockedInput(e), $ && $.logEventWithDuration && this.requestAnimationFrame(function() {
var t = ((new Date).getTime() - e.tappedTime) / 1e3;
$.logEventWithDuration(q, t)
})
},
handleDidDock: function() {
this.enablePermalinkMode()
},
enablePermalinkMode: function() {
this.state.tappedFeedUnitHandle && (this.refs[N].enableScrollResponderAutoInsets(!1), G.measureLayout(this.state.tappedFeedUnitHandle, this.refs[N].getScrollResponder().getNativeNode(), this.permalinkInsetsError, this.handleMeasureLayoutForPermalink))
},
handleMeasureLayoutForPermalink: function(e, t, n, r) {
var o = this.refs[N];
G.getScrollViewContentSize(o.getScrollResponder().getNativeNode(), function(e) {
var n = o.getBarHeight() - o.getInitialBarHeight(),
i = this.state.keyboardHeight + n + r,
a = i + t - e.height,
s = g.get("modalFullscreenView").height,
l = B - t,
u = s - i - B;
if (u > 0 && (l += u), this.state.tappedFeedUnitHandle && !this.state.permalinkContentInsets) this.requestAnimationFrame(this.enablePermalinkMode);
else if (this.state.tappedUnitKey in this.state.sectionData.storiesSection) {
var c = this.state.sectionData.storiesSection,
p = this.getAdjacentKeys(this.state.tappedUnitKey, c),
h = {};
for (var f in p) c[f].node || L(0, "Adjacent keys must have corresponding nodes."), h[f] = A(c[f], {
hideSeparator: !1,
hideAll: !0
});
h[this.state.tappedUnitKey] = A(c[this.state.tappedUnitKey], {
hideSeparator: !0,
hideAll: !1
}), this.setState({
sectionData: d.set(this.state.sectionData, {
storiesSection: d.set(c, h)
})
})
}
this.setState({
permalinkContentInsets: {
top: l,
bottom: a
}
})
}.bind(this), this.onSetInsetFailure)
},
reloadFeedViewForGroup: function(e) {
this.props.group.id === e && this.props.forceUpdate({})
},
cancelComment: function() {
this.clearPermalinkMode(), this.refs[N].cancelDockedInput()
},
handleDockedReplyBarHeightChange: function() {
this.enablePermalinkMode()
},
handleConfirmedNewPost: function() {
var e = this.props.group.group_stories.edges[0].cursor,
t = H.getQueriesForRoute(this.context.route),
n = t.group.getQuery().getUnaliasedFields("group_stories")[0],
r = new l.QueryFragment("GroupStoriesFragment", "GroupStoriesConnection", n.getOwnFields(), n.getFragments()),
o = new l.QueryWithValues(function(e, t, n, r) {
var o = Q.__GraphQL;
return new o.Query("node", [Q.__var(e)], [new o.Field("group_stories", null, [Q.__frag(r)], [new o.Callv("before", [Q.__var(t)]), new o.Callv("first", [Q.__var(n)])], null, null, {
connection: !0
}), new o.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, "UnknownFile_q0")
}(this.props.group.id, e, this.queryParams.count, r), {});
T(o).then(function(e) {
if (e.errors && e.errors.length) console.error("Error from fetching new story: ", e.errors[0]);
else {
var t = e.response;
u.handleUpdate(t, o);
var n = t[this.props.group.id],
r = Object.keys(n),
i = n[r[0]].edges.length;
this.setQueryParams({
count: this.queryParams.count + i
})
}
}.bind(this))
},
handleVisibleCellsChange: function(e) {
var t = d.indexOfKey(this.state.sectionData[e.end.section], e.end.row);
this._updateFeedbackPollerForRange(e), t >= this.queryParams.count - 4 && this.setQueryParams({
count: this.queryParams.count + 5
}), this.state.tappedFeedUnitHandle && this.enablePermalinkMode()
},
_updateFeedbackPollerForRange: function(e) {
var t = d.indexOfKey(this.state.sectionData[e.start.section], e.start.row),
n = d.indexOfKey(this.state.sectionData[e.end.section], e.end.row),
r = function(e, r, o) {
var i = o >= t && n >= o;
return i ? s.register(e.node.feedback.id) : s.unregister(e.node.feedback.id), e
},
o = Math.min(this.state.prevVisibleIndex.start, t),
i = Math.max(this.state.prevVisibleIndex.end, n),
a = d.size(this.state.sectionData.storiesSection);
i >= a && (i = a - 1);
var l = i - o + 1;
o >= 0 && l > 0 && a >= o + l ? d.mapRange(this.state.sectionData.storiesSection, r, o, l) : console.error(P("invalid visible polling range. start: {0}, length: {1}, size: {2}", o, l, a)), this.state.prevVisibleIndex.start = t, this.state.prevVisibleIndex.end = n
},
handleKeyboardWillShow: function(e) {
var t = g.get("modalFullscreenView").height - e.endCoordinates.screenY;
t !== this.state.keyboardHeight && this.setState({
keyboardHeight: t
})
},
updateScrollInsets: function(e) {
this.setState({
contentInsets: e
})
},
componentWillMount: function() {
this.addListenerOn(_, "handleConfirmedNewPost", this.handleConfirmedNewPost), this.addListenerOn(_, "updateScrollInsets", this.updateScrollInsets), this.addListenerOn(_, "reloadFeedViewForGroup", this.reloadFeedViewForGroup), this.addListenerOn(_, "cancelComment", this.cancelComment), this.addListenerOn(m, "keyboardWillShow", this.handleKeyboardWillShow), this._setupGroupStories(this.props)
},
componentWillReceiveProps: function(e) {
this._setupGroupStories(e)
},
componentDidUpdate: function() {
this.props.group && $ && $.groupViewComponentDidUpdate && $.groupViewComponentDidUpdate(this.props.group.id)
},
componentDidMount: function() {
if (this.props.group) {
var e = this.refs[N].getScrollResponder();
e.setNativeProps({
contentOffset: {
y: -this.props.topInset
}
}), $ && this.requestAnimationFrame(function() {
$.groupViewComponentDidUpdate && $.groupViewComponentDidUpdate(this.props.group.id), $.logEventEnded && ($.logEventEnded(this.props.groupProfileLoadTTI), $.logEventEnded(this.props.groupPostNotifTTI))
}.bind(this))
}
},
componentWillUnmount: function() {
var e = d.size(this.state.sectionData.storiesSection),
t = this.state.prevVisibleIndex.start,
n = this.state.prevVisibleIndex.end - t + 1;
t >= 0 && n > 0 && e >= t + n ? d.forEachRange(this.state.sectionData.storiesSection, function(e) {
s.unregister(e.node.feedback.id)
}, t, n) : console.error(P("invalid unmount polling range. start: {0}, length: {1}, size: {2}", t, n, e))
},
enablePollerIfNeeded: function(e) {
var t = e.viewer && e.viewer.__configs__ && e.viewer.__configs__.edges;
if (t) {
var n = t.filter(function(e) {
return e.node.name === V
});
k(n) || s.enablePoller(n[0].node.enabled)
}
},
_setupGroupStories: function(e) {
if (this.enablePollerIfNeeded(e), e.group && e.group.group_stories) {
for (var t, n = e.group.group_stories.edges, r = {}, o = this.state.olderPostsDividerKey, i = 0; i < n.length; i++) {
var a = {
node: n[i].node
},
s = O(a.node.id);
this.state.tappedUnitKey ? s === this.state.tappedUnitKey ? (t && (r[t].hideAll = !0), a.hideSeparator = !0) : t === this.state.tappedUnitKey && (a.hideAll = !0) : (a.hideAll = !1, a.hideSeparator = !1), null === o && t && this.isStoryUnread(r[t]) && !this.isStoryUnread(a) && (o = a.node.id), a.local_id = s, r[s] = a, t = s
}
this.setState({
olderPostsDividerKey: o
});
var l = {};
if (e.group.group_pinned_stories && e.group.group_pinned_stories.count > 0 && ("MEMBER" === e.group.viewer_join_state || "OPEN" === e.group.visibility)) {
var u = {
node: e.group.group_pinned_stories.edges[0].node
},
c = O(u.id);
u.local_id = c, l[c] = u, u.isBeingDisplayed = this.state.pinnedPostIsDisplayed
}
this.state.initialInsertionComplete || this.requestAnimationFrame(function() {
this.setState({
rowAnimationType: "fade"
})
}.bind(this)), this.setState(k(l) ? {
initialInsertionComplete: !0,
sectionData: d.create({
storiesSection: d.create(r)
})
} : {
initialInsertionComplete: !0,
sectionData: d.create({
pinnedPostSection: d.create(l),
storiesSection: d.create(r)
})
})
}
},
openPinnedPost: function() {
var e = {},
t = Object.keys(this.state.sectionData.pinnedPostSection)[0],
n = this.state.sectionData.pinnedPostSection[t];
e[n.local_id] = A(this.state.sectionData.pinnedPostSection[t], {
isBeingDisplayed: !0
}), this.setState({
sectionData: d.create({
pinnedPostSection: d.create(e),
storiesSection: this.state.sectionData.storiesSection
}),
pinnedPostIsDisplayed: !0
})
},
handleDockedCommentSubmit: function(e, t) {
this.clearPermalinkMode(), this.state.submitCallback(e, t)
},
handleDockedCommentAbort: function(e) {
this.clearPermalinkMode(), this.state.abortCallback && this.state.abortCallback(e)
},
render: function() {
if (!this.props.group) return h.createElement(F, null);
var e = this.state.contentInsets;
null !== this.state.permalinkContentInsets && (e = this.state.permalinkContentInsets);
var t = h.createElement(S, {
rowAnimationType: this.state.rowAnimationType,
contentInset: e,
scrollIndicatorInsets: e,
showsVerticalScrollIndicator: !1,
tableFooter: this.viewForTableFooter(),
shouldUpdateHeaders: S.HeaderUpdate.never,
shouldUpdateRows: S.RowUpdate.whenRowDataChanges,
minRenderAhead: 10,
maxRenderAhead: 110,
minRenderBehind: 10,
maxRenderBehind: 100,
throttleVisibleCellsChangeMS: 50,
sectionData: this.state.sectionData,
viewForHeaderInSection: this.viewForHeaderInSection,
cellForRowAtIndexPath: this.cellForRowAtIndexPath,
onVisibleCellsChange: this.handleVisibleCellsChange,
style: W.tableViewStyle
});
return h.createElement(R, {
ref: N,
groupID: this.props.group.id,
scrollResponder: t,
onDockedCommentSubmit: this.handleDockedCommentSubmit,
onDockedCommentAbort: this.handleDockedCommentAbort,
onDidDock: this.handleDidDock,
onHeightChange: this.handleDockedReplyBarHeightChange
})
}
}),
j = {
position: "absolute",
top: 0,
left: 0,
width: g.get("window").width
},
W = y.create({
backdrop: {
backgroundColor: b.backgroundColor
},
divider: {
height: .5,
backgroundColor: b.borderColor
},
endDot: {
width: 10,
height: 10
},
fakeStoryCell: {
justifyContent: "space-between",
alignItems: "flex-start",
paddingLeft: 16,
height: 140,
marginBottom: 30,
marginTop: 20,
backgroundColor: b.backgroundColor
},
fakeStoryHeader: {
flexDirection: "row",
alignItems: "center"
},
fakeStoryProfilePicture: {
width: U,
height: U,
borderRadius: U / 2,
marginRight: 12,
backgroundColor: b.fakeStoryTextBlock
},
fakeStoryTextBlock: {
height: 5,
backgroundColor: b.fakeStoryTextBlock
},
grayPadding: {
height: 11,
backgroundColor: b.backgroundWash
},
hide: {
opacity: 0
},
lockIcon: {
height: 30,
width: 30
},
nonMemberText: {
fontSize: 17,
color: b.feedbackFadedText
},
nonMemberTextContainer: {
paddingTop: 10
},
nonMemberView: {
backgroundColor: b.backgroundWash,
alignItems: "center",
paddingTop: 46
},
olderPostsHeader: {
alignItems: "center",
backgroundColor: b.backgroundWash,
flexDirection: "row",
height: 24,
paddingLeft: 16
},
olderPostsText: {
color: b.feedbackFadedText,
fontSize: 12
},
pinnedPostArrow: {
width: 8,
height: 14,
marginRight: 16
},
pinnedPostCell: {
height: 44,
alignItems: "center",
flexDirection: "row",
justifyContent: "space-between",
backgroundColor: "white"
},
pinnedPostText: {
fontSize: 15,
marginLeft: 16
},
tableViewStyle: {
backgroundColor: b.backgroundWash
},
tailLoadingIndicator: A(j, {
backgroundColor: b.backgroundWash,
paddingTop: 0,
height: 52,
justifyContent: "center",
alignItems: "center"
})
});
o.exports = H
}), __d("AnimationMixin", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeModulesDeprecated"),
a = t("ReactIOSAnimation"),
s = t("invariant"),
l = t("warning"),
u = i.RKUIManager,
c = {
AnimationTypes: a.Types,
AnimationProperties: a.Properties,
getInitialState: function() {
return {
_currentAnimationsByNodeHandle: {}
}
},
_ensureBookkeepingSetup: function(e) {
this.state._currentAnimationsByNodeHandle[e] || (this.state._currentAnimationsByNodeHandle[e] = [])
},
startAnimation: function(e, t, n) {
var r = 0;
"number" == typeof t ? r = t : (t instanceof Object && void 0 !== t.type && void 0 !== t.property || s(0, "Animation definitions must specify a type of animation and a property to animate."), r = a.createAnimation(t.type, t)), this.refs[e] || s(0, "Invalid refKey " + e + " for anim:\n" + JSON.stringify(t) + "\nvalid refs: " + JSON.stringify(Object.keys(this.refs)));
var o = this.refs[e].getNodeHandle();
this.startAnimationWithNodeHandle(o, r, n)
},
startAnimationWithNodeHandle: function(e, t, n) {
this._ensureBookkeepingSetup(e);
var r = this.state._currentAnimationsByNodeHandle[e],
o = r.length;
r.push(t);
var i = function(t) {
if (this.isMounted()) {
r[o] = 0;
for (var i = !0, a = 0; a < r.length; a++)
if (r[a]) {
i = !1;
break
}
i && (this.state._currentAnimationsByNodeHandle[e] = void 0), n && n(t)
}
}.bind(this);
u.addAnimation(e, t, i)
},
startAnimations: function(e, t) {
var n = 0,
r = 0,
o = e.length,
i = function(e) {
e && ++r, ++n === o && t && t(r === o)
};
e.forEach(function(e) {
l(null != e.ref || null != e.nodeHandle && !e.ref != !e.nodeHandle, "Animations must be specified with either ref xor nodeHandle"), e.ref ? this.startAnimation(e.ref, e.anim, i) : e.nodeHandle && this.startAnimationWithNodeHandle(e.nodeHandle, e.anim, i)
}.bind(this))
},
stopNodeHandleAnimations: function(e) {
if (this.state._currentAnimationsByNodeHandle[e]) {
for (var t = this.state._currentAnimationsByNodeHandle[e], n = 0; n < t.length; n++) {
var r = t[n];
r && u.removeAnimation(+e, r)
}
this.state._currentAnimationsByNodeHandle[e] = void 0
}
},
stopAnimations: function(e) {
this.refs[e] || s(0, "invalid ref"), this.stopNodeHandleAnimations(this.refs[e].getNodeHandle())
},
stopAllAnimations: function() {
for (var e in this.state._currentAnimationsByNodeHandle) this.stopNodeHandleAnimations(e)
},
animateToFrame: function(e, t, n, r, o) {
var i = {
x: t.left + t.width / 2,
y: t.top + t.height / 2,
w: t.width,
h: t.height
};
t = void 0;
var r = r || [0, 0],
s = a.createAnimation(n, {
property: a.Properties.position,
toValue: [i.x, i.y],
velocity: r
}),
l = a.createAnimation(n, {
property: a.Properties.size,
toValue: [i.w, i.h]
});
this.startAnimation(e, s, o), this.startAnimation(e, l)
},
componentWillUnmount: function() {
this.stopAllAnimations()
}
};
o.exports = c
}), __d("ReactIOSAnimation", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactPropTypes"),
a = t("NativeModules").RKAnimationManager,
s = t("createStrictShapeTypeChecker"),
l = t("getObjectValues"),
u = t("invariant"),
c = t("merge"),
d = a.Types,
p = a.Properties,
h = {
bounds: p.bounds,
opacity: p.opacity,
position: p.position,
positionX: p.positionX,
positionY: p.positionY,
zPosition: p.zPosition,
rotation: p.rotation,
rotationX: p.rotationX,
rotationY: p.rotationY,
scaleX: p.scaleX,
scaleXY: p.scaleXY,
scaleY: p.scaleY,
shadowColor: p.shadowColor,
shadowOffset: p.shadowOffset,
shadowOpacity: p.shadowOpacity,
shadowRadius: p.shadowRadius,
size: p.size,
subscaleXY: p.subscaleXY,
subtranslationX: p.subtranslationX,
subtranslationXY: p.subtranslationXY,
subtranslationY: p.subtranslationY,
subtranslationZ: p.subtranslationZ,
translationX: p.translationX,
translationXY: p.translationXY,
translationY: p.translationY,
translationZ: p.translationZ
},
f = {
decay: d.decay,
easeIn: d.easeIn,
easeInEaseOut: d.easeInEaseOut,
easeOut: d.easeOut,
linear: d.linear,
spring: d.spring
},
m = {
Types: f,
Properties: h,
attributeChecker: s({
type: i.oneOf(l(f)),
property: i.oneOf(l(h)),
fromValue: i.any,
toValue: i.any,
duration: i.any,
velocity: i.any,
deceleration: i.any,
springBounciness: i.any,
dynamicsFriction: i.any,
dynamicsMass: i.any,
dynamicsTension: i.any
}),
lastUsedTag: 0,
allocateTagForAnimation: function() {
return ++this.lastUsedTag
},
createAnimation: function(e, t) {
var n = this.allocateTagForAnimation();
return __DEV__ && (m.attributeChecker({
attrs: t
}, "attrs", "ReactIOSAnimation.createAnimation"), m.attributeChecker({
attrs: {
type: e
}
}, "attrs", "ReactIOSAnimation.createAnimation")), a.createAnimationInternal(n, e, t), n
},
createSpringAnimation: function(e) {
return this.createAnimation(this.Types.spring, e)
},
createDecayAnimation: function(e) {
return this.createAnimation(this.Types.decay, e)
},
createLinearAnimation: function(e) {
return this.createAnimation(this.Types.linear, e)
},
createEaseInAnimation: function(e) {
return this.createAnimation(this.Types.easeIn, e)
},
createEaseOutAnimation: function(e) {
return this.createAnimation(this.Types.easeOut, e)
},
createEaseInEaseOutAnimation: function(e) {
return this.createAnimation(this.Types.easeInEaseOut, e)
}
};
if (__DEV__) {
var g = c(a.Properties, a.Properties);
for (var _ in g) m.Properties[_] !== a.Properties[_] && u(0, "ReactIOSAnimation doesn't copy property " + _ + " correctly");
var y = c(a.Types, a.Types);
for (var _ in y) m.Types[_] !== a.Types[_] && u(0, "ReactIOSAnimation doesn't copy type " + _ + " correctly")
}
o.exports = m
}), __d("getObjectValues", [], function(e, t, n, r, o) {
function i(e) {
var t = [];
for (var n in e) t.push(e[n]);
return t
}
o.exports = i
}), __d("FeedbackPoller", [], function(e, t, n, r, o) {
"use strict";
function i() {
if (g(b) || !C) return s(), void(R = null);
var e = function(e, t, n) {
t ? console.error("Error from feedback poller: ", t) : f.handleUpdate(n, e, h.POLLER_UPDATE)
},
t = [];
for (var n in b) {
var r = u(n),
o = l(n, r),
i = new d.QueryWithValues(o, {});
t.push(new m(n, i, c.guard(e.bind(null, i), "FeedbackPoller:handleResponse")))
}
t.length > 0 && _(t), a()
}
function a() {
C && (R = setTimeout(c.guard(i, "FeedbackPoller:schedule"), w))
}
function s() {
R = null, b = {}, clearTimeout(R)
}
function l(e, t) {
var n = b[e],
r = null;
return t && t !== S && (r = function(e, t, n) {
var r = y.__GraphQL;
return new r.QueryFragment("UnknownFile_f0", "Node", [new r.Field("top_level_comments", null, [y.__frag(n)], [new r.Callv("before", [y.__var(e)]), new r.Callv("first", [y.__var(t)])], null, null, {
connection: !0
}), new r.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})])
}(t, v, n)),
function(e, t) {
var n = y.__GraphQL;
return new n.Query("node", [y.__var(e)], [new n.Field("likers", [new n.Field("count")], null, null, null, null, {
connection: !0,
nonFindable: !0
}), new n.Field("does_viewer_like"), new n.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], [y.__frag(t)], null, "UnknownFile_q0")
}(e, r)
}
function u(e) {
var t = function(e) {
var t = y.__GraphQL;
return new t.Query("node", [y.__var(e)], [new t.Field("top_level_comments", [new t.Field("edges", [new t.Field("cursor", null, null, null, null, null, {
requisite: !0
}), new t.Field("node", [new t.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
rootCall: "node",
pk: "id",
generated: !0,
requisite: !0
})], null, null, null, null, {
plural: !0
}), new t.Field("page_info", [new t.Field("has_next_page", null, null, null, null, null, {
generated: !0,
requisite: !0
}), new t.Field("has_previous_page", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, null, null, {
generated: !0,
requisite: !0
})], null, [new t.Callv("first", ["1"])], null, null, {
connection: !0
}), new t.Field("id", null, null, null, null, null, {
generated: !0,
requisite: !0
})], null, null, "UnknownFile_q0")
}(e),
n = f.resolveQueryFromStore(new d.QueryWithValues(t, {}));
return n && n[e] && n[e].top_level_comments && n[e].top_level_comments.edges[0] && n[e].top_level_comments.edges[0].cursor
}
var c = t("ErrorUtils"),
d = t("GraphQL_EXPERIMENTAL"),
p = t("GraphQLConstants"),
h = t("GraphQLMutatorConstants"),
f = t("GraphQLStore"),
m = t("RQLRequest"),
g = t("isEmpty"),
_ = t("fetchBatchedRQL"),
y = t("rql"),
v = 10,
S = p.DUMMY_CURSOR_ID,
w = 15e3,
b = {},
R = null,
C = !1,
E = {
enablePoller: function(e) {
C !== e && (C = e, C || s())
},
register: function(e) {
if (C && e) {
if (!b[e]) {
var t = f.getTrackedQueryByID(e),
n = t.getUnaliasedFields("top_level_comments");
n = n.filter(function(e) {
return "top_level_comment_counts" !== e.getAlias()
}, n);
var r = n.map(function(e) {
return new d.QueryFragment("FeedbackPollerFragment", "CommentsConnection", e.getOwnFields(), e.getFragments())
});
b[e] = new d.QueryFragment("FeedbackPoller", "CommentsConnection", null, r)
}
R || a()
}
},
unregister: function(e) {
e && delete b[e]
}
};
o.exports = E
}), __d("Image", [], function(e, t, n, r, o) {
"use strict";
var i = t("EdgeInsetsPropType"),
a = t("NativeMethodsMixin"),
s = t("NativeModulesDeprecated"),
l = t("ReactPropTypes"),
u = t("ImageResizeMode"),
c = t("ImageStylePropTypes"),
d = t("React"),
p = t("ReactIOSViewAttributes"),
h = t("StyleSheet"),
f = t("StyleSheetPropType"),
m = t("createReactIOSNativeComponentClass"),
g = t("flattenStyle"),
_ = t("insetsDiffer"),
y = t("merge"),
v = l.shape({
uri: l.string.isRequired,
isStatic: l.bool,
width: l.number,
height: l.number
}),
S = d.createClass({
displayName: "Image",
propTypes: {
source: v.isRequired,
accessible: l.bool,
accessibilityLabel: l.string,
capInsets: i,
style: f(c),
testID: l.string,
notActuallyTapDontUseMe: l.func
},
statics: {
CONTAIN: u.contain,
COVER: u.cover,
STRETCH: u.stretch,
SourcePropType: v
},
mixins: [a],
viewConfig: {
uiViewClassName: "UIView",
validAttributes: p.UIView
},
render: function() {
var e, t = g([w.base, this.props.style]),
n = this.props.source.isStatic || this.props.source.isStored ? R : C,
r = s.RKUIManager.UIView.ContentMode;
e = t.resizeMode === u.stretch ? r.ScaleToFill : t.resizeMode === u.contain ? r.ScaleAspectFit : r.ScaleAspectFill;
var o = y(this.props, {
style: t,
resizeMode: e
});
return this.props.source.isStored ? o.imageTag = this.props.source.uri : o.src = this.props.source.uri, d.createElement(n, Object.assign({}, o))
}
}),
w = h.create({
base: {
overflow: "hidden"
}
}),
b = y(p.UIView, {
accessible: !0,
accessibilityLabel: !0,
capInsets: {
diff: _
},
imageTag: !0,
resizeMode: !0,
src: !0,
testID: l.string
}),
R = m({
validAttributes: b,
uiViewClassName: "RKStaticImage"
}),
C = m({
validAttributes: y(b, {
defaultImageSrc: !0
}),
uiViewClassName: "RKNetworkImageView"
});
o.exports = S
}), __d("EdgeInsetsPropType", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactPropTypes"),
a = t("createStrictShapeTypeChecker"),
s = t("insetsDiffer"),
l = a({
top: i.number,
left: i.number,
bottom: i.number,
right: i.number
});
l.differ = s, o.exports = l
}), __d("insetsDiffer", [], function(e, t, n, r, o) {
"use strict";
var i = {
top: void 0,
left: void 0,
right: void 0,
bottom: void 0
},
a = function(e, t) {
return e = e || i, t = t || i, e !== t && (e.top !== t.top || e.left !== t.left || e.right !== t.right || e.bottom !== t.bottom)
};
o.exports = a
}), __d("ImmutableMap", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t = isNaN(+e) || e.substring && "." === e.substring(0, 1),
n = e === _ || e === y || e === g;
return !n && "string" == typeof e && "" !== e && t
}
function a(e, t, n) {
"number" == typeof e && "number" == typeof t && t >= 0 && e >= 0 && n >= e + t || h(0, "ImmutableMap: `mapRange` and `forEachRange` expect non-negative start and length arguments within the bounds of the instance. start: " + e + ", length: " + t + ", actualLen: " + n)
}
function s(e) {
return e instanceof p && e.hasOwnProperty(g)
}
function l(e) {
s(e) || h(0, "ImmutableMap: Attempted to operate on object that is not ImmutableMap")
}
function u(e) {
return e === g || e === _ || e === y
}
function c(e, t, n, r) {
var o = {
enumerable: !1,
configurable: !0,
writable: !0,
value: t
},
i = {
enumerable: !1,
configurable: !0,
writable: !0,
value: n
},
a = {
enumerable: !1,
configurable: !0,
writable: !0,
value: r
};
Object.defineProperty(e, g, o), Object.defineProperty(e, _, i), Object.defineProperty(e, y, a)
}
function d() {}
var p = t("Immutable"),
h = t("invariant"),
f = t("keyOf"),
m = f({
_DONT_EVER_TYPE_THIS_SECRET_KEY: null
}),
g = "__size_DoNotEverTouchThis",
_ = "__keyByIndexDoNotEverTouchThis",
y = "__indexByKeyDoNotEverTouchThis";
d.create = function() {
var e = new p(p[m]),
t = d.mergeAndValidateAllPropertiesInto(e, arguments);
return c(e, t, [], []), e[_].areComputed = !1, __DEV__ && d.customDeepFreezeRootNode(e), e
}, d.mergeAndValidateAllPropertiesInto = function(e, t) {
for (var n = t.length, r = 0, o = 0; n > o; o++) {
var a = t[o];
for (var l in a)
if (!(!a.hasOwnProperty(l) || s(a) && u(l))) {
e.hasOwnProperty(l) || (i(l) || h(0, "ImmutableMap: Key must be truthy string not number-like."), r++);
var c = a[l];
void 0 === c && h(0, "undefined ImmutableMap value"), e[l] = c
}
}
return r
}, d.customDeepFreezeRootNode = function(e) {
l(e), Object.freeze(e);
for (var t in e) e.hasOwnProperty(t) && !u(t) && p.recurseDeepFreeze(e[t]);
Object.seal(e)
}, d.set = function(e, t) {
return l(e), t instanceof p || "object" == typeof t && void 0 !== t && !Array.isArray(t) || h(0, "Invalid ImmutableMap.set argument `put`"), d.create(e, t)
}, d.fromArray = function(e, t) {
var n = Array.isArray(e),
r = "function" == typeof t;
n || h(0, "fromArray: First argument must be an array."), r || h(0, "fromArray: Requires keyExtractor to be function");
var o = new p(p[m]),
a = [],
s = {};
c(o, e.length, a, s);
for (var l = 0; l < e.length; l++) {
var u = e[l],
f = t(u, l);
o.hasOwnProperty(f) && h(0, "Duplicate key in array passed to fromArray %s", f), i(f) || h(0, "invalid key for ImmutableMap", f), o[f] = u, a[l] = "" + f, s[f] = l
}
return a.areComputed = !0, __DEV__ && d.customDeepFreezeRootNode(o), o
}, d.size = function(e) {
return l(e), d.$ImmutableMap_computePositionsIfNeeded(e), e[g]
}, d.has = function(e, t) {
return i(t) || h(0, "invalid key for ImmutableMap", t), l(e), e.hasOwnProperty(t)
}, d.get = function(e, t) {
return i(t) || h(0, "invalid key for ImmutableMap", t), e.hasOwnProperty(t) ? e[t] : void 0
}, d.map = function(e, t, n) {
return l(e), d.$ImmutableMap_computePositionsIfNeeded(e), d.mapRange(e, t, 0, e[g], n)
}, d.mapRange = function(e, t, n, r, o) {
l(e), d.$ImmutableMap_computePositionsIfNeeded(e);
var i = {},
s = 0;
a(n, r, d.size(e));
var u = n + r - 1;
for (var c in e)
if (e.hasOwnProperty(c)) {
if (s >= n) {
if (s > u) break;
i[c] = t.call(o, e[c], c, s)
}
s++
}
return d.create(i)
}, d.filter = function(e, t, n) {
return d.filterRange(e, t, 0, d.size(e), n)
}, d.filterRange = function(e, t, n, r, o) {
var i = {};
return d.forEachRange(e, function(e, n, r) {
t.call(o, e, n, r) && (i[n] = e)
}, n, r), d.create(i)
}, d.forEach = function(e, t, n) {
d.forEachRange(e, t, 0, d.size(e), n)
}, d.forEachRange = function(e, t, n, r, o) {
l(e), a(n, r, d.size(e));
var i = 0,
s = n + r - 1;
for (var u in e)
if (e.hasOwnProperty(u)) {
if (i >= n) {
if (i > s) break;
t.call(o, e[u], u, i)
}
i++
}
}, d.mapKeyRange = function(e, t, n, r, o) {
var i = d.indexOfKey(e, n),
a = d.indexOfKey(e, r);
(null == i || null == a) && h(0, "mapKeyRange must be given keys that are present."), a >= i || h(0, "ImmutableMap.mapKeyRange(...): `endKey` must be >= `startIndex`.");
var s = a - i + 1;
return d.mapRange(e, t, i, s, o)
}, d.forEachKeyRange = function(e, t, n, r, o) {
var i = d.indexOfKey(e, n),
a = d.indexOfKey(e, r);
(null == i || null == a) && h(0, "forEachKeyRange must be given keys that are present."), a >= i || h(0, "ImmutableMap.forEachKeyRange(...): `endKey` must not come before `startIndex`.");
var s = a - i + 1;
d.forEachRange(e, t, i, s, o)
}, d.keyAtIndex = function(e, t) {
d.$ImmutableMap_computePositionsIfNeeded(e);
var n = e[_][t];
return n ? n : void 0
}, d.valueAtIndex = function(e, t) {
var n = d.keyAtIndex(e, t);
return void 0 !== n ? e[n] : void 0
}, d.keyAfter = function(e, t) {
return d.nthKeyAfter(e, t, 1)
}, d.keyBefore = function(e, t) {
return d.nthKeyBefore(e, t, 1)
}, d.nthKeyAfter = function(e, t, n) {
var r = d.indexOfKey(e, t);
return void 0 === r && h(0, "ImmutableMap.nthKeyAfter: The key `%s` does not exist in this instance.", t), d.keyAtIndex(e, r + n)
}, d.nthKeyBefore = function(e, t, n) {
return d.nthKeyAfter(e, t, -n)
}, d.indexOfKey = function(e, t) {
i(t) || h(0, "invalid key for ImmutableMap", t), d.$ImmutableMap_computePositionsIfNeeded(e);
var n = e[y][t];
return void 0 === n ? void 0 : n
}, d.$ImmutableMap_computePositionsIfNeeded = function(e) {
e[_].areComputed === !1 && d.$ImmutableMap_computePositionsFromDictionary(e)
}, d.$ImmutableMap_computePositionsFromDictionary = function(e) {
var t = e[_],
n = e[y],
r = 0;
for (var o in e) e.hasOwnProperty(o) && (t[r] = o, n[o] = r, r++);
e[_].areComputed = !0
}, o.exports = d
}), __d("Immutable", [], function(e, t, n, r, o) {
function i(e) {
"use strict";
e !== i[u] && a(0, "Only certain classes should create instances of `Immutable`.You probably want something like ImmutableObject.create.")
}
var a = t("invariant"),
s = t("isNode"),
l = t("keyOf"),
u = l({
_DONT_EVER_TYPE_THIS_SECRET_KEY: null
});
i.mergeAllPropertiesInto = function(e, t) {
"use strict";
for (var n = t.length, r = 0; n > r; r++) Object.assign(e, t[r])
}, i.deepFreezeRootNode = function(e) {
"use strict";
if (!s(e)) {
Object.freeze(e);
for (var t in e) e.hasOwnProperty(t) && i.recurseDeepFreeze(e[t]);
Object.seal(e)
}
}, i.recurseDeepFreeze = function(e) {
"use strict";
if (!s(e) && i.shouldRecurseFreeze(e)) {
Object.freeze(e);
for (var t in e) e.hasOwnProperty(t) && i.recurseDeepFreeze(e[t]);
Object.seal(e)
}
}, i.shouldRecurseFreeze = function(e) {
"use strict";
return "object" == typeof e && !(e instanceof i) && null !== e
}, i._DONT_EVER_TYPE_THIS_SECRET_KEY = Math.random(), o.exports = i
}), __d("RKDimensions", [], function(e, t, n, r, o) {
"use strict";
function i() {}
var a = t("NativeModules"),
s = t("invariant"),
l = t("mergeInto"),
u = a.RKUIManager.RKDimensions;
i.set = function(e) {
return l(u, e), !0
}, i.get = function(e) {
return u[e] || s(0, "No dimension set for key " + e), u[e]
}, o.exports = i
}), __d("mergeInto", [], function(e, t, n, r, o) {
"use strict";
o.exports = Object.assign
}), __d("RKNativeAppEventEmitter", [], function(e, t, n, r, o) {
"use strict";
var i = t("EventEmitter"),
a = new i;
o.exports = a
}), __d("Subscribable", [], function(e, t, n, r, o) {
"use strict";
var i = {
Mixin: {
componentWillMount: function() {
this._subscriptions = []
},
componentWillUnmount: function() {
this._subscriptions.forEach(function(e) {
return e.remove()
}), this._subscriptions = null
},
addListenerOn: function(e, t, n, r) {
this._subscriptions.push(e.addListener(t, n, r))
}
}
};
o.exports = i
}), __d("TableView", [], function(e, t, n, r, o) {
"use strict";
var i = t("ImmutableMap"),
a = t("React"),
s = t("ReactIOSViewAttributes"),
l = t("NativeModules").RKUIManager.RKTableView.Constants,
u = t("ScrollResponder"),
c = t("ScrollViewPropTypes"),
d = t("StyleSheet"),
p = t("TableLogic"),
h = t("TableViewMixin"),
f = t("View"),
m = t("createReactIOSNativeComponentClass"),
g = t("insetsDiffer"),
_ = t("invariant"),
y = t("merge"),
v = t("pointsDiffer"),
S = a.PropTypes,
w = h.Cell,
b = "container_ref",
R = {
none: l.UITableViewRowAnimation.None,
fade: l.UITableViewRowAnimation.Fade,
right: l.UITableViewRowAnimation.Right,
left: l.UITableViewRowAnimation.Left,
top: l.UITableViewRowAnimation.Top,
bottom: l.UITableViewRowAnimation.Bottom,
middle: l.UITableViewRowAnimation.Middle,
automatic: l.UITableViewRowAnimation.Automatic
},
C = a.PropTypes.oneOf(Object.keys(R)),
E = a.createClass({
displayName: "TableView",
statics: {
rowAnimationPropType: C,
RowAnimationTypes: R
},
propTypes: y(c, {
tableHeader: S.renderable,
tableFooter: S.renderable,
sectionData: S.object.isRequired,
cellForRowAtIndexPath: S.func.isRequired,
viewForHeaderInSection: S.func.isRequired,
onFocus: S.func,
rowAnimationType: S.string,
fillerBGColor: S.string,
throttleVisibleCellsChangeMS: S.number,
onPullToRefresh: S.func,
onScrollAnimationEnd: S.func,
maxRenderAhead: S.number,
minRenderAhead: S.number,
maxRenderBehind: S.number,
minRenderBehind: S.number,
throttleVisibleCellsthrottleVisibleCellsChangeMS: S.number,
shouldUpdateHeaders: S.oneOf([h.HeaderUpdate.always, h.HeaderUpdate.never, h.HeaderUpdate.whenSectionDataChanges]),
shouldUpdateRows: S.oneOf([h.RowUpdate.always, h.RowUpdate.never, h.RowUpdate.whenRowDataChanges]),
maxExpandBy: S.number
}),
mixins: [h.Mixin, u.Mixin],
getInitialState: function() {
return y(this.tableViewMixinGetInitialState(), this.scrollResponderMixinGetInitialState())
},
setNativeProps: function(e) {
this.refs[b].setNativeProps(e)
},
handleVisibleCellsChange: function(e) {
var t = e.nativeEvent,
n = i.keyAtIndex(this.props.sectionData, t.startSection),
r = i.keyAtIndex(this.props.sectionData, t.endSection),
o = this.props.sectionData[n],
a = this.props.sectionData[r];
this.tableViewMixinPrepareVisibleRangeForMutation(), this.state.visibleRange.start.section = n, this.state.visibleRange.start.row = i.keyAtIndex(o, t.startRow), this.state.visibleRange.end.section = r, this.state.visibleRange.end.row = i.keyAtIndex(a, t.endRow), h.validRange(this.state.visibleRange) || _(0, "Bad range on change"), this.tableViewMixinHandleVisibleRangeChange(t.throttleIgnored, this.state.visibleRange)
},
wrapCellContent: function(e) {
return a.createElement(w, null, e)
},
render: function() {
this.tableViewMixinValidateProperties(this.props), p.validateWindowingProperties(this.props);
var e = this.state.renderRange,
t = this.props.sectionData,
n = null === e ? null : this.tableViewMixinRenderChildren(),
r = null === e ? 0 : i.indexOfKey(t, e.start.section),
o = null === e ? 0 : i.indexOfKey(t[e.start.section], e.start.row),
s = this.props.ContainerContructor || x;
return a.createElement(s, {
ref: b,
onFocus: this.props.onFocus,
style: [D.container, this.props.style],
rowAnimationType: R[this.props.rowAnimationType],
contentInset: this.props.contentInset,
contentOffset: this.props.contentOffset,
automaticallyAdjustContentInsets: this.props.automaticallyAdjustContentInsets,
scrollIndicatorInsets: this.props.scrollIndicatorInsets,
throttleScrollCallbackMS: this.props.throttleScrollCallbackMS,
onScroll: this.scrollResponderHandleScroll,
scrollEnabled: this.props.scrollEnabled,
showsHorizontalScrollIndicator: this.props.showsHorizontalScrollIndicator,
showsVerticalScrollIndicator: this.props.showsVerticalScrollIndicator,
fillerBGColor: this.props.fillerBGColor,
throttleVisibleCellsChangeMS: h.getThrottleCallbackMS(this.props),
onVisibleCellsChange: this.handleVisibleCellsChange,
windowStartSection: r,
onPullToRefresh: this.props.onPullToRefresh,
windowStartRow: o,
onTouchStart: this.scrollResponderHandleTouchStart,
onTouchEnd: this.scrollResponderHandleTouchEnd,
onScrollAnimationEnd: this.props.onScrollAnimationEnd,
onScrollBeginDrag: this.scrollResponderHandleScrollBeginDrag,
onScrollEndDrag: this.scrollResponderHandleScrollEndDrag,
onMomentumScrollBegin: this.scrollResponderHandleMomentumScrollBegin,
onMomentumScrollEnd: this.scrollResponderHandleMomentumScrollEnd,
onStartShouldSetResponder: this.scrollResponderHandleStartShouldSetResponder,
onStartShouldSetResponderCapture: this.scrollResponderHandleStartShouldSetResponderCapture,
onScrollShouldSetResponder: this.scrollResponderHandleScrollShouldSetResponder,
onResponderGrant: this.scrollResponderHandleResponderGrant,
onResponderRelease: this.scrollResponderHandleResponderRelease,
onResponderReject: this.scrollResponderHandleResponderReject
}, this.props.tableHeader || f.dummyView(), this.props.tableFooter || f.dummyView(), n)
}
}),
D = d.create({
container: {
flex: 1
}
});
E.HeaderUpdate = h.HeaderUpdate, E.RowUpdate = h.RowUpdate;
var x = m({
validAttributes: y(s.UIView, {
rowAnimationType: !0,
automaticallyAdjustContentInsets: !0,
contentInset: {
diff: g
},
contentOffset: {
diff: v
},
scrollIndicatorInsets: {
diff: g
},
scrollEnabled: !0,
showsHorizontalScrollIndicator: !0,
showsVerticalScrollIndicator: !0,
windowStartSection: !0,
windowStartRow: !0,
throttleScrollCallbackMS: !0,
throttleVisibleCellsChangeMS: !0,
fillerBGColor: !0
}),
uiViewClassName: "RKTableView"
});
o.exports = E
}), __d("ScrollResponder", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeModules"),
a = t("NativeModulesDeprecated"),
s = t("RKDeviceEventEmitter"),
l = t("Subscribable"),
u = t("TextInputState"),
c = i.RKUIManager,
d = a.RKUIManager,
p = c.RKScrollView.Constants,
h = t("warning"),
f = 16,
m = {
mixins: [l.Mixin],
statics: p,
scrollResponderMixinGetInitialState: function() {
return {
isTouching: !1,
lastMomentumScrollBeginTime: 0,
lastMomentumScrollEndTime: 0,
observedScrollSinceBecomingResponder: !1,
becameResponderWhileAnimating: !1
}
},
scrollResponderHandleScrollShouldSetResponder: function() {
return this.state.isTouching
},
scrollResponderHandleStartShouldSetResponder: function() {
return !1
},
scrollResponderHandleStartShouldSetResponderCapture: function(e) {
var t = u.currentlyFocusedField();
return this.props.keyboardShouldPersistTaps || null == t || e.target == t ? this.scrollResponderIsAnimating() : !0
},
scrollResponderHandleResponderReject: function() {
h(!1, "ScrollView doesn't take rejection well - scrolls anyway")
},
scrollResponderHandleTerminationRequest: function() {
return !this.state.observedScrollSinceBecomingResponder
},
scrollResponderHandleTouchEnd: function(e) {
var t = e.nativeEvent;
this.state.isTouching = 0 !== t.touches.length, this.props.onTouchEnd && this.props.onTouchEnd(e)
},
scrollResponderHandleResponderRelease: function(e) {
this.props.onResponderRelease && this.props.onResponderRelease(e);
var t = u.currentlyFocusedField();
this.props.keyboardShouldPersistTaps || null == t || e.target == t || this.state.observedScrollSinceBecomingResponder || this.state.becameResponderWhileAnimating || (this.props.onScrollResponderKeyboardDismissed && this.props.onScrollResponderKeyboardDismissed(e), u.blurTextInput(t))
},
scrollResponderHandleScroll: function(e) {
this.state.observedScrollSinceBecomingResponder = !0, this.props.onScroll && this.props.onScroll(e)
},
scrollResponderHandleResponderGrant: function(e) {
this.state.observedScrollSinceBecomingResponder = !1, this.props.onResponderGrant && this.props.onResponderGrant(e), this.state.becameResponderWhileAnimating = this.scrollResponderIsAnimating()
},
scrollResponderHandleScrollBeginDrag: function(e) {
this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e)
},
scrollResponderHandleScrollEndDrag: function(e) {
this.props.onScrollEndDrag && this.props.onScrollEndDrag(e)
},
scrollResponderHandleMomentumScrollBegin: function(e) {
this.state.lastMomentumScrollBeginTime = Date.now(), this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e)
},
scrollResponderHandleMomentumScrollEnd: function(e) {
this.state.lastMomentumScrollEndTime = Date.now(), this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e)
},
scrollResponderHandleTouchStart: function(e) {
this.state.isTouching = !0, this.props.onTouchStart && this.props.onTouchStart(e)
},
scrollResponderHandleTouchMove: function(e) {
this.props.onTouchMove && this.props.onTouchMove(e)
},
scrollResponderIsAnimating: function() {
var e = Date.now(),
t = e - this.state.lastMomentumScrollEndTime,
n = f > t || this.state.lastMomentumScrollEndTime < this.state.lastMomentumScrollBeginTime;
return n
},
scrollResponderScrollTo: function(e, t) {
d.scrollTo(this.getNodeHandle(), e, t)
},
scrollResponderZoomTo: function(e) {
d.zoomToRect(this.getNodeHandle(), e)
},
scrollResponderScrollNativeHandleToKeyboard: function(e, t) {
this.additionalScrollOffset = t || 0, c.measureLayout(e, this.getNodeHandle(), this.scrollResponderTextInputFocusError, this.scrollResponderInputMeasureAndScrollToKeyboard)
},
scrollResponderInputMeasureAndScrollToKeyboard: function(e, t, n, r) {
if (this.keyboardWillOpenTo) {
var o = t - this.keyboardWillOpenTo.endCoordinates.screenY + r + this.additionalScrollOffset;
this.scrollResponderScrollTo(0, o)
}
this.additionalOffset = 0
},
scrollResponderTextInputFocusError: function(e) {
console.error("Error measuring text field: ", e)
},
componentWillMount: function() {
this.keyboardWillOpenTo = null, this.additionalScrollOffset = 0, this.addListenerOn(s, "keyboardWillShow", this.scrollResponderKeyboardWillShow), this.addListenerOn(s, "keyboardWillHide", this.scrollResponderKeyboardWillHide), this.addListenerOn(s, "keyboardDidShow", this.scrollResponderKeyboardDidShow), this.addListenerOn(s, "keyboardDidHide", this.scrollResponderKeyboardDidHide)
},
scrollResponderKeyboardWillShow: function(e) {
this.keyboardWillOpenTo = e, this.props.onKeyboardWillShow && this.props.onKeyboardWillShow(e)
},
scrollResponderKeyboardWillHide: function(e) {
this.keyboardWillOpenTo = null, this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(e)
},
scrollResponderKeyboardDidShow: function() {
this.keyboardWillOpenTo = null, this.props.onKeyboardDidShow && this.props.onKeyboardDidShow()
},
scrollResponderKeyboardDidHide: function() {
this.keyboardWillOpenTo = null, this.props.onKeyboardDidHide && this.props.onKeyboardDidHide()
}
},
g = {
Mixin: m
};
o.exports = g
}), __d("ScrollViewPropTypes", [], function(e, t, n, r, o) {
"use strict";
var i = t("EdgeInsetsPropType"),
a = t("PointPropType"),
s = t("ReactPropTypes"),
l = t("StyleSheetPropType"),
u = t("ViewStylePropTypes"),
c = t("nativePropType"),
d = {
automaticallyAdjustContentInsets: c(s.bool),
contentInset: c(i),
contentOffset: c(a),
onScroll: s.func,
onScrollAnimationEnd: s.func,
scrollEnabled: c(s.bool),
scrollIndicatorInsets: c(i),
showsHorizontalScrollIndicator: c(s.bool),
showsVerticalScrollIndicator: c(s.bool),
style: l(u),
throttleScrollCallbackMS: c(s.number)
};
o.exports = d
}), __d("PointPropType", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactPropTypes"),
a = t("createStrictShapeTypeChecker"),
s = t("pointsDiffer"),
l = a({
x: i.number,
y: i.number
});
l.differ = s, o.exports = l
}), __d("pointsDiffer", [], function(e, t, n, r, o) {
"use strict";
var i = {
x: void 0,
y: void 0
},
a = function(e, t) {
return e = e || i, t = t || i, e !== t && (e.x !== t.x || e.y !== t.y)
};
o.exports = a
}), __d("nativePropType", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return e.isNative = !0, e
}
o.exports = i
}), __d("TableLogic", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return h in e ? e.maxRenderAhead : a(e) + v
}
function a(e) {
return f in e ? e.minRenderAhead : y
}
function s(e) {
return m in e ? e.maxRenderBehind : l(e) + v
}
function l(e) {
return g in e ? e.minRenderBehind : y
}
var u = t("ImmutableMap"),
c = t("invariant"),
d = t("keyMirror"),
p = t("keyOf"),
h = p({
maxRenderAhead: null
}),
f = p({
minRenderAhead: null
}),
m = p({
maxRenderBehind: null
}),
g = p({
minRenderBehind: null
}),
_ = !1,
y = 6,
v = 4,
S = d({
moveForward: null,
moveBackward: null,
moveNone: null
}),
w = {
section: null,
row: null
},
b = function() {
return {
start: {
section: null,
row: null
},
end: {
section: null,
row: null
}
}
},
R = {
section: null,
row: null
},
C = {
section: null,
row: null
},
E = {
section: null,
row: null
},
D = {
section: null,
row: null
},
x = b(),
F = b(),
I = b(),
T = function(e, t) {
if (e === t) return !1;
var n = null === e && null !== t || null !== e && null === t;
return n || e.start.section !== t.start.section || e.end.section !== t.end.section || e.start.row !== t.start.row || e.end.row !== t.end.row
},
P = function(e) {
if (!e || 0 === u.size(e)) return null;
var t = u.keyAtIndex(e, 0),
n = u.valueAtIndex(e, 0),
r = n && u.keyAtIndex(n, 0) || null;
return r ? {
start: {
section: t,
row: r
},
end: {
section: t,
row: r
}
} : null
},
L = function(e, t, n, r) {
return e === n && t === r
},
k = {
section: null,
row: null
},
M = {
section: null,
row: null
},
A = function(e, t, n, r) {
return k.section = t, k.row = n, G(e, r.start, k, r.end, M), M.section === t && M.row === n
},
Q = function(e, t, n, r, o) {
if (L(t, n, r, o)) return !1;
var i = u.indexOfKey(e, t),
a = u.indexOfKey(e, r);
if ((void 0 === i || void 0 === a) && c(0, "Bad sections"), i === a) {
var s = u.indexOfKey(e[t], n),
l = u.indexOfKey(e[r], o);
return (void 0 === s || void 0 === l) && c(0, "Bad rows %s-%s", n, o), l > s
}
return a > i
},
O = function(e, t, n, r, o) {
return L(t, n, r, o) ? !1 : !Q(e, t, n, r, o)
},
N = function(e, t, n) {
return O(e, t.section, t.row, n.section, n.row) ? S.moveBackward : Q(e, t.section, t.row, n.section, n.row) ? S.moveForward : S.moveNone
},
G = function(e, t, n, r, o) {
var i = n.row,
a = n.section;
t.section && t.row && n.section && n.row && r.section && r.row || c(0, "Invalid clamp args"), O(e, a, i, r.section, r.row) ? (o.section = r.section, o.row = r.row) : Q(e, a, i, t.section, t.row) ? (o.section = t.section, o.row = t.row) : (o.section = a, o.row = i)
},
$ = function(e, t, n, r) {
var o = e[t];
o || c(0, "No rows found for section %s", t);
var i = !!n;
if (i && u.indexOfKey(o, n) > 0) return r.section = t, r.row = u.keyBefore(o, n), !0;
if (!i || 0 === u.indexOfKey(o, n)) {
var a = u.keyBefore(e, t),
s = a && u.size(e[a]);
if (a && s) {
var l = e[a];
return r.section = a, r.row = u.keyAtIndex(l, s - 1), !0
}
return !1
}
},
B = function(e, t, n, r) {
var o = e[t],
i = o ? u.size(o) : 0,
a = !!n;
if (a && u.indexOfKey(o, n) < i - 1) return r.section = t, r.row = u.keyAtIndex(o, u.indexOfKey(o, n) + 1), !0;
var s = u.keyAfter(e, t);
return s && u.size(e[s]) > 0 ? (r.section = s, r.row = u.keyAtIndex(e[s], 0), !0) : !1
},
U = function(e, t, n, r) {
for (var o = Math.abs(n), i = o / n == 1, a = i ? B : $, s = t.section, l = t.row, u = 0; o > u && a(e, s, l, w); u++) s = w.section, l = w.row;
r.section = s, r.row = l
},
V = function(e, t, n, r) {
var o = N(e, t, n);
return o === S.moveNone ? !1 : o === S.moveForward ? B(e, t.section, t.row, r) : o === S.moveBackward ? $(e, t.section, t.row, r) : void 0
},
q = function(e, t) {
e.start.section = t.start.section, e.start.row = t.start.row, e.end.section = t.end.section, e.end.row = t.end.row
},
H = function(e, t, n, r, o, i) {
try {
return _ && c(0, "resource pool already locked"), _ = !0, it(e, t, n, r, o, i)
} catch (a) {
throw a
} finally {
_ = !1
}
},
j = function(e, t, n, r, o) {
var i = t ? t : P(e);
if (!i) return !1;
var a = r;
q(o, i);
for (var s = !0, l = !0; a > 0 && (s || l);) {
if (l) {
var u = V(e, o.end, n.end, o.end);
u ? a-- : l = !1
}
if (a > 0 && s) {
var c = V(e, o.start, n.start, o.start);
c ? a-- : s = !1
}
}
return !0
},
W = function(e) {
i(e) > a(e) && a(e) > 0 && s(e) > l(e) && l(e) > 0 || c(0, "Maximum over-render amount must be greater than the minimum both being greater than zero.")
},
K = function(e) {
e.result.start.section = null, e.result.start.row = null, e.result.end.section = null, e.result.end.row = null, e.resultSpansR1 = !1, e.resultSpansR2 = !1
},
z = function(e, t, n, r, o) {
e.result.start.section = t, e.result.start.row = n, e.result.end.section = t, e.result.end.row = n, e.resultSpansR1 = r, e.resultSpansR2 = o
},
Y = function(e, t, n, r, o) {
e.result.end.section = t, e.result.end.row = n, e.resultSpansR1 = e.resultSpansR1 || r, e.resultSpansR2 = e.resultSpansR2 || o
},
X = !1,
J = !0,
Z = function(e, t, n, r) {
for (var o = u.indexOfKey(e, t.start.section), i = u.indexOfKey(e, t.end.section), a = o; i >= a; a++)
for (var s = u.keyAtIndex(e, a), l = e[s], c = a === o ? u.indexOfKey(l, t.start.row) : 0, d = a === i ? u.indexOfKey(l, t.end.row) : u.size(l) - 1, p = c; d >= p; p++) {
var h = u.keyAtIndex(l, p),
f = r ? n.call(r, s, h) : n(s, h);
if (f === X) return
}
},
et = {
result: null,
haveFoundItem: !1,
nextSectionData: null,
outerRange: null,
innerRange: null
},
tt = {
section: null,
row: null
},
nt = function(e, t, n, r, o) {
return et.result = o, K(et), et.traverseSectionData = n, et.nextSectionData = r, et.r1 = e, et.r2 = t, Z(n, e, rt, et), et.resultSpansR1 && et.resultSpansR2
},
rt = function(e, t) {
var n = this,
r = n.resultSpansR1 && n.resultSpansR2,
o = n.resultSpansR1,
i = n.resultSpansR2,
a = !o && !i,
s = !u.has(n.nextSectionData, e) || !u.has(n.nextSectionData[e], t);
if (s) return r ? X : (K(n), J);
var l = A(n.traverseSectionData, e, t, n.r1),
c = A(n.traverseSectionData, e, t, n.r2);
if (a) return (l || c) && z(n, e, t, l, c), J;
var d = ot(n.nextSectionData, e, t, n.result.end.section, n.result.end.row);
return d ? (Y(n, e, t, l, c), J) : r ? X : (l || c ? z(n, e, t, l, c) : K(n), J)
},
ot = function(e, t, n, r, o) {
return B(e, r, o, tt), tt.section === t && tt.row === n
},
it = function(e, t, n, r, o, d) {
var p = t.sectionData,
h = e.sectionData,
f = l(t),
m = s(t),
g = a(t),
_ = i(t);
if (e.sectionData && u.size(e.sectionData) || !n || c(0, "You lie. That could not have happened."), !t.sectionData) return !1;
var y = e.sectionData !== t.sectionData,
v = !y,
S = null,
w = null;
if (y ? (S = r && nt(r, r, h, p, I) ? I : P(p), w = n && r && nt(n, r, h, p, F) ? F : P(p)) : v && (S = r || P(p), w = n || P(p)), !w || !S) return !1;
U(p, S.start, -1 * f, R);
var b = m - f;
return U(p, R, -1 * b, C), U(p, S.end, g, E), b = _ - g, U(p, E, b, D), G(p, C, w.start, R, x.start), G(p, E, w.end, D, x.end), q(o, x), d && q(d, w), !0
},
at = {
copyRangeInto: q,
stepTowardsTargetRange: j,
clampPath: G,
validateWindowingProperties: W,
nextRenderRange: H,
rangesDiffer: T
};
o.exports = at
}), __d("TableViewMixin", [], function(e, t, n, r, o) {
"use strict";
var i = t("ImmutableMap"),
a = t("ReactIOSViewAttributes"),
s = t("StaticContainer.react"),
l = t("TableLogic"),
u = t("createReactIOSNativeComponentClass"),
c = t("invariant"),
d = t("keyMirror"),
p = t("keyOf"),
h = t("NativeModulesDeprecated").RKUIManager,
f = t("React"),
m = t("ReactIOSTagHandles"),
g = 16,
_ = 1,
y = p({
throttleVisibleCellsChangeMS: null
}),
v = {
start: {
section: null,
row: null
},
end: {
section: null,
row: null
}
},
S = {
start: {
section: null,
row: null
},
end: {
section: null,
row: null
}
},
w = {
start: {
section: null,
row: null
},
end: {
section: null,
row: null
}
},
b = {},
R = u({
validAttributes: a.UIView,
uiViewClassName: "RKTableViewCell"
});
b.Cell = R, b.validRange = function(e) {
return e.start.section && e.start.row && e.end.section && e.end.row
}, b.getThrottleCallbackMS = function(e) {
return y in e ? e.throttleVisibleCellsChangeMS : g
}, b.getShouldUpdateHeaders = function(e) {
return e.shouldUpdateHeaders || C.never
}, b.getShouldUpdateRows = function(e) {
return e.shouldUpdateRows || E.never
}, b.getMaxExpandBy = function(e) {
return e.maxExpandBy || _
}, b.Mixin = {
componentWillReceiveProps: function(e) {
var t = l.nextRenderRange(this.props, e, this.state.renderRange, this.state.visibleRange, v, S);
if (t) {
var n;
this.state.hasEverRenderedRows ? (l.stepTowardsTargetRange(e.sectionData, S, v, b.getMaxExpandBy(e), w), n = w) : (n = v, this.state.hasEverRenderedRows = !0), this.tableViewMixinPrepareRenderRangeForMutation(n), l.copyRangeInto(this.state.renderRange, n)
} else this.state.renderRange = null
},
shouldComponentUpdate: function(e, t) {
return t !== this.state || this.props.sectionData !== e.sectionData || this.props.contentInset !== e.contentInset || this.props.scrollIndicatorInsets !== e.scrollIndicatorInsets || e.throttleScrollCallbackMS !== this.props.throttleScrollCallbackMS || e.throttleVisibleCellsChangeMS !== this.props.throttleVisibleCellsChangeMS || b.getShouldUpdateHeaders(e) === C.always || b.getShouldUpdateRows(e) === E.always
},
tableViewMixinGetInitialState: function() {
var e = l.nextRenderRange(this.props, this.props, null, null, v),
t = e ? {
start: {
section: v.start.section,
row: v.start.row
},
end: {
section: v.end.section,
row: v.end.row
}
} : null;
return {
renderRange: t,
hasEverRenderedRows: !!t,
visibleRange: null,
__currentRenderSection: null,
__reuseBufferCount: 0,
__reusedChildBuffer: []
}
},
scrollToTop: function() {
h.scrollTo(m.rootNodeIDToTag[this._rootNodeID], 0, 0)
},
tableViewMixinPrepareVisibleRangeForMutation: function() {
null === this.state.visibleRange && (this.state.visibleRange = {
start: {},
end: {}
})
},
tableViewMixinPrepareRenderRangeForMutation: function(e) {
null !== e && null === this.state.renderRange ? this.state.renderRange = {
start: {},
end: {}
} : null === e && null !== this.state.renderRange && (this.state.renderRange = null)
},
tableViewMixinCachedViewForHeaderInSection: function(e) {
var t = "header_" + e,
n = this.refs && this.refs[t],
r = b.getShouldUpdateHeaders(this.props),
o = this.props.sectionData[e];
if (n) {
var i = r === C.always || r === C.whenSectionDataChanges && o !== n.props.rowData;
if (!i) return n.props.shouldUpdate = !1, n.props.rowData = o, n._currentElement
}
var a = this.props.viewForHeaderInSection(e);
return a || c(0, "Requires header content at [%s]", e), a ? f.createElement(s, {
rowData: o,
ref: t,
key: t,
shouldUpdate: !0
}, a) : null
},
cachedCellForRowAtIndexPath: function(e, t) {
var n = "row_" + e + "_" + t,
r = this.props.sectionData[e][t],
o = b.getShouldUpdateRows(this.props),
i = this.refs && this.refs[n];
if (i) {
var a = o === E.always || o === E.whenRowDataChanges && r !== i.props.rowData;
if (!a) return i.props.shouldUpdate = !1, i.props.rowData = r, i._currentElement
}
var l = this.props.cellForRowAtIndexPath(e, t);
return l || c(0, "Requires row content at [%s,%s]", e, t), l.constructor == R.componentConstructor && c(0, "Row must not be wrapped in RKTableViewCell at [%s,%s]", e, t), f.createElement(s, {
rowData: r,
ref: n,
key: n,
shouldUpdate: !0
}, this.wrapCellContent(l))
},
tableViewMixinHandleVisibleRangeChange: function(e, t) {
var n;
l.nextRenderRange(this.props, this.props, this.state.renderRange, t, v, S);
var r = l.rangesDiffer(v, this.state.renderRange);
r && (e ? n = v : (l.stepTowardsTargetRange(this.props.sectionData, S, v, b.getMaxExpandBy(this.props), w), n = w), this.tableViewMixinPrepareRenderRangeForMutation(n), l.copyRangeInto(this.state.renderRange, n), b.validRange(this.state.renderRange) || c(0, "Bad rendered range"), this.forceUpdate()), this.props.onVisibleCellsChange && this.props.onVisibleCellsChange(t)
},
tableViewMixinRenderRowData: function(e, t) {
var n = this.state.__currentRenderSection,
r = this.cachedCellForRowAtIndexPath(this.state.__currentRenderSection, t);
r || c(0, "Cell required for index path %s %s", n, t), this.state.__reusedChildBuffer[this.state.__reuseBufferCount++] = r
},
tableViewMixinRenderSectionData: function(e, t) {
var n = this.state.renderRange,
r = this.tableViewMixinCachedViewForHeaderInSection(t);
this.state.__reusedChildBuffer[this.state.__reuseBufferCount++] = r, r || c(0, "Must have header component for section %s", t), this.state.__currentRenderSection = t;
var o = i.size(e);
if (e && o) {
var a = t === n.start.section ? n.start.row : i.keyAtIndex(e, 0),
s = t === n.end.section ? n.end.row : i.keyAtIndex(e, o - 1);
(null === a || null === s) && c(0, "Section has length yet rendering range that assumes only has headers"), a && s || !a && !s || c(0, "Either we know both the start/end row key or we have no rows"), i.forEachKeyRange(e, this.tableViewMixinRenderRowData, a, s)
} else(t === n.start.section ? null === n.start.row : t === n.end.section ? null === n.end.row : t !== n.start.section && t !== n.end.section) || c(0, "Start row should not be specified if there are no rows in the starting section, or no end rows if in the ending section.")
},
tableViewMixinRenderChildren: function() {
this.state.__reuseBufferCount = 0;
var e = this.state.renderRange;
return e.start.section && e.end.section && i.forEachKeyRange(this.props.sectionData, this.tableViewMixinRenderSectionData, e.start.section, e.end.section), this.state.__reusedChildBuffer.length = this.state.__reuseBufferCount, this.state.__reusedChildBuffer
},
tableViewMixinValidateProperties: function(e) {
e.sectionData || c(0, "Needs `sectionData=ImmutableMap`"), e.cellForRowAtIndexPath && e.viewForHeaderInSection || c(0, "Must provide `cellForRowAtIndexPath` and `viewForHeaderInSection`"), e.shouldUpdateHeaders && !C[e.shouldUpdateHeaders] && c(0, "invalid shouldUpdateHeaders"), e.shouldUpdateRows && !E[e.shouldUpdateRows] && c(0, "invalid shouldUpdateRows")
}
};
var C = b.HeaderUpdate = d({
always: null,
never: null,
whenSectionDataChanges: null
}),
E = b.RowUpdate = d({
always: null,
never: null,
whenRowDataChanges: null
});
o.exports = b
}), __d("StaticContainer.react", [], function(e, t, n, r, o) {
var i = t("React"),
a = t("onlyChild"),
s = i.createClass({
displayName: "StaticContainer",
shouldComponentUpdate: function(e) {
return e.shouldUpdate
},
render: function() {
return a(this.props.children)
}
});
o.exports = s
}), __d("onlyChild", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return a.isValidElement(e) || s(0, "onlyChild must be passed a children with exactly one child."), e
}
var a = t("ReactElement"),
s = t("invariant");
o.exports = i
}), __d("Text", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeMethodsMixin"),
a = t("React"),
s = t("ReactIOSViewAttributes"),
l = t("StyleSheetPropType"),
u = t("TextStylePropTypes"),
c = t("Touchable"),
d = t("createReactIOSNativeComponentClass"),
p = t("merge"),
h = {
validAttributes: p(s.UIView, {
accessible: !0,
containerBackgroundColor: !0,
isHighlighted: !0,
color: !0,
fontFamily: !0,
fontSize: !0,
fontWeight: !0,
lineHeight: !0,
textAlign: !0,
numberOfLines: !0,
testID: !0
}),
uiViewClassName: "RKText"
},
f = d(h),
m = l(u),
g = {
top: 20,
left: 20,
right: 20,
bottom: 30
},
_ = a.createClass({
displayName: "Text",
mixins: [c.Mixin, i],
statics: {
stylePropType: m
},
propTypes: {
onPress: a.PropTypes.func,
suppressHighlighting: a.PropTypes.bool,
style: l(u)
},
viewConfig: h,
getInitialState: function() {
return p(this.touchableGetInitialState(), {
isHighlighted: !1
})
},
onStartShouldSetResponder: function() {
var e = this.props.onStartShouldSetResponder && this.props.onStartShouldSetResponder();
return e || !!this.props.onPress
},
handleResponderTerminationRequest: function() {
var e = this.touchableHandleResponderTerminationRequest();
return e && this.props.onResponderTerminationRequest && (e = this.props.onResponderTerminationRequest()), e
},
handleResponderGrant: function(e, t) {
this.touchableHandleResponderGrant(e, t), this.props.onResponderGrant && this.props.onResponderGrant.apply(this, arguments)
},
handleResponderMove: function(e) {
this.touchableHandleResponderMove(e), this.props.onResponderMove && this.props.onResponderMove.apply(this, arguments)
},
handleResponderRelease: function(e) {
this.touchableHandleResponderRelease(e), this.props.onResponderRelease && this.props.onResponderRelease.apply(this, arguments)
},
handleResponderTerminate: function(e) {
this.touchableHandleResponderTerminate(e), this.props.onResponderTerminate && this.props.onResponderTerminate.apply(this, arguments)
},
touchableHandleActivePressIn: function() {
!this.props.suppressHighlighting && this.props.onPress && this.setState({
isHighlighted: !0
})
},
touchableHandleActivePressOut: function() {
!this.props.suppressHighlighting && this.props.onPress && this.setState({
isHighlighted: !1
})
},
touchableHandlePress: function() {
this.props.onPress && this.props.onPress()
},
touchableGetPressRectOffset: function() {
return g
},
render: function() {
var e = {};
for (var t in this.props) e[t] = this.props[t];
return e.ref = this.getNodeHandle(), e.accessible !== !1 && (e.accessible = !0), e.isHighlighted = this.state.isHighlighted, e.onStartShouldSetResponder = this.onStartShouldSetResponder, e.onResponderTerminationRequest = this.handleResponderTerminationRequest, e.onResponderGrant = this.handleResponderGrant, e.onResponderMove = this.handleResponderMove, e.onResponderRelease = this.handleResponderRelease, e.onResponderTerminate = this.handleResponderTerminate, a.createElement(f, Object.assign({}, e))
}
});
o.exports = _
}), __d("Touchable", [], function(e, t, n, r, o) {
"use strict";
var i = t("BoundingDimensions"),
a = t("Position"),
s = t("TouchEventUtils"),
l = t("invariant"),
u = t("keyMirror"),
c = t("queryLayoutByID"),
d = u({
NOT_RESPONDER: null,
RESPONDER_INACTIVE_PRESS_IN: null,
RESPONDER_INACTIVE_PRESS_OUT: null,
RESPONDER_ACTIVE_PRESS_IN: null,
RESPONDER_ACTIVE_PRESS_OUT: null,
RESPONDER_ACTIVE_LONG_PRESS_IN: null,
RESPONDER_ACTIVE_LONG_PRESS_OUT: null,
ERROR: null
}),
p = {
RESPONDER_ACTIVE_PRESS_OUT: !0,
RESPONDER_ACTIVE_PRESS_IN: !0
},
h = {
RESPONDER_INACTIVE_PRESS_IN: !0,
RESPONDER_ACTIVE_PRESS_IN: !0,
RESPONDER_ACTIVE_LONG_PRESS_IN: !0
},
f = {
RESPONDER_ACTIVE_LONG_PRESS_IN: !0
},
m = u({
DELAY: null,
RESPONDER_GRANT: null,
RESPONDER_RELEASE: null,
RESPONDER_TERMINATED: null,
ENTER_PRESS_RECT: null,
LEAVE_PRESS_RECT: null,
LONG_PRESS_DETECTED: null
}),
g = {
NOT_RESPONDER: {
DELAY: d.ERROR,
RESPONDER_GRANT: d.RESPONDER_INACTIVE_PRESS_IN,
RESPONDER_RELEASE: d.ERROR,
RESPONDER_TERMINATED: d.ERROR,
ENTER_PRESS_RECT: d.ERROR,
LEAVE_PRESS_RECT: d.ERROR,
LONG_PRESS_DETECTED: d.ERROR
},
RESPONDER_INACTIVE_PRESS_IN: {
DELAY: d.RESPONDER_ACTIVE_PRESS_IN,
RESPONDER_GRANT: d.ERROR,
RESPONDER_RELEASE: d.NOT_RESPONDER,
RESPONDER_TERMINATED: d.NOT_RESPONDER,
ENTER_PRESS_RECT: d.RESPONDER_INACTIVE_PRESS_IN,
LEAVE_PRESS_RECT: d.RESPONDER_INACTIVE_PRESS_OUT,
LONG_PRESS_DETECTED: d.ERROR
},
RESPONDER_INACTIVE_PRESS_OUT: {
DELAY: d.RESPONDER_ACTIVE_PRESS_OUT,
RESPONDER_GRANT: d.ERROR,
RESPONDER_RELEASE: d.NOT_RESPONDER,
RESPONDER_TERMINATED: d.NOT_RESPONDER,
ENTER_PRESS_RECT: d.RESPONDER_INACTIVE_PRESS_IN,
LEAVE_PRESS_RECT: d.RESPONDER_INACTIVE_PRESS_OUT,
LONG_PRESS_DETECTED: d.ERROR
},
RESPONDER_ACTIVE_PRESS_IN: {
DELAY: d.ERROR,
RESPONDER_GRANT: d.ERROR,
RESPONDER_RELEASE: d.NOT_RESPONDER,
RESPONDER_TERMINATED: d.NOT_RESPONDER,
ENTER_PRESS_RECT: d.RESPONDER_ACTIVE_PRESS_IN,
LEAVE_PRESS_RECT: d.RESPONDER_ACTIVE_PRESS_OUT,
LONG_PRESS_DETECTED: d.RESPONDER_ACTIVE_LONG_PRESS_IN
},
RESPONDER_ACTIVE_PRESS_OUT: {
DELAY: d.ERROR,
RESPONDER_GRANT: d.ERROR,
RESPONDER_RELEASE: d.NOT_RESPONDER,
RESPONDER_TERMINATED: d.NOT_RESPONDER,
ENTER_PRESS_RECT: d.RESPONDER_ACTIVE_PRESS_IN,
LEAVE_PRESS_RECT: d.RESPONDER_ACTIVE_PRESS_OUT,
LONG_PRESS_DETECTED: d.ERROR
},
RESPONDER_ACTIVE_LONG_PRESS_IN: {
DELAY: d.ERROR,
RESPONDER_GRANT: d.ERROR,
RESPONDER_RELEASE: d.NOT_RESPONDER,
RESPONDER_TERMINATED: d.NOT_RESPONDER,
ENTER_PRESS_RECT: d.RESPONDER_ACTIVE_LONG_PRESS_IN,
LEAVE_PRESS_RECT: d.RESPONDER_ACTIVE_LONG_PRESS_OUT,
LONG_PRESS_DETECTED: d.RESPONDER_ACTIVE_LONG_PRESS_IN
},
RESPONDER_ACTIVE_LONG_PRESS_OUT: {
DELAY: d.ERROR,
RESPONDER_GRANT: d.ERROR,
RESPONDER_RELEASE: d.NOT_RESPONDER,
RESPONDER_TERMINATED: d.NOT_RESPONDER,
ENTER_PRESS_RECT: d.RESPONDER_ACTIVE_LONG_PRESS_IN,
LEAVE_PRESS_RECT: d.RESPONDER_ACTIVE_LONG_PRESS_OUT,
LONG_PRESS_DETECTED: d.ERROR
},
error: {
DELAY: d.NOT_RESPONDER,
RESPONDER_GRANT: d.RESPONDER_INACTIVE_PRESS_IN,
RESPONDER_RELEASE: d.NOT_RESPONDER,
RESPONDER_TERMINATED: d.NOT_RESPONDER,
ENTER_PRESS_RECT: d.NOT_RESPONDER,
LEAVE_PRESS_RECT: d.NOT_RESPONDER,
LONG_PRESS_DETECTED: d.NOT_RESPONDER
}
},
_ = 130,
y = 20,
v = 500,
S = 10,
w = {
touchableGetInitialState: function() {
return {
touchable: {
touchState: void 0,
responderID: null
}
}
},
touchableHandleResponderTerminationRequest: function() {
return !0
},
touchableHandleStartShouldSetResponder: function() {
return !0
},
touchableLongPressCancelsPress: function() {
return !0
},
touchableHandleResponderGrant: function(e, t) {
e.persist(), this.state.touchable.touchState = d.NOT_RESPONDER, this.state.touchable.responderID = t, this._receiveSignal(m.RESPONDER_GRANT, e);
var n = void 0 !== this.touchableGetHighlightDelayMS ? this.touchableGetHighlightDelayMS() : _;
0 !== n ? this.touchableDelayTimeout = setTimeout(this._handleDelay.bind(this, e), n) : this._handleDelay(e), this.longPressDelayTimeout = setTimeout(this._handleLongDelay.bind(this, e), v - n)
},
touchableHandleResponderRelease: function(e) {
this._receiveSignal(m.RESPONDER_RELEASE, e)
},
touchableHandleResponderTerminate: function(e) {
this._receiveSignal(m.RESPONDER_TERMINATED, e)
},
touchableHandleResponderMove: function(e) {
if (this.state.touchable.touchState !== d.RESPONDER_INACTIVE_PRESS_IN && this.state.touchable.positionOnActivate) {
var t = this.state.touchable.positionOnActivate,
n = this.state.touchable.dimensionsOnActivate,
r = this.touchableGetPressRectOffset ? this.touchableGetPressRectOffset() : null,
o = null != r.left ? r.left : y,
i = null != r.top ? r.top : y,
a = null != r.right ? r.right : y,
l = null != r.bottom ? r.bottom : y,
u = s.extractSingleTouch(e.nativeEvent),
c = u && u.pageX,
p = u && u.pageY;
if (this.pressInLocation) {
var h = this._getDistanceBetweenPoints(c, p, this.pressInLocation.pageX, this.pressInLocation.pageY);
h > S && this._cancelLongPressDelayTimeout()
}
var f = c > t.left - o && p > t.top - i && c < t.left + n.width + a && p < t.top + n.height + l;
f ? this._receiveSignal(m.ENTER_PRESS_RECT, e) : this._receiveSignal(m.LEAVE_PRESS_RECT, e)
}
},
_remeasureMetricsOnActivation: function() {
c(this.state.touchable.responderID, null, this._handleQueryLayout)
},
_handleQueryLayout: function(e, t, n, r, o, s) {
this.state.touchable.positionOnActivate && a.release(this.state.touchable.positionOnActivate), this.state.touchable.dimensionsOnActivate && i.release(this.state.touchable.dimensionsOnActivate), this.state.touchable.positionOnActivate = a.getPooled(o, s), this.state.touchable.dimensionsOnActivate = i.getPooled(n, r)
},
_handleDelay: function(e) {
this.touchableDelayTimeout = null, this._receiveSignal(m.DELAY, e)
},
_handleLongDelay: function(e) {
this.longPressDelayTimeout = null, this._receiveSignal(m.LONG_PRESS_DETECTED, e)
},
_receiveSignal: function(e, t) {
var n = this.state.touchable.touchState;
g[n] && g[n][e] || l(0, "You have supplied either an unrecognized signal or current state %s", n);
var r = g[n][e];
r === d.ERROR && l(0, "Some assumptions about the state machine were violated. This is the fault of Touchable.js. This case has been modeled and caught as an error transition."), n !== r && (this._performSideEffectsForTransition(n, r, e, t), this.state.touchable.touchState = r)
},
_cancelLongPressDelayTimeout: function() {
this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout), this.longPressDelayTimeout = null
},
_isHighlight: function(e) {
return e === d.RESPONDER_ACTIVE_PRESS_IN || e === d.RESPONDER_ACTIVE_LONG_PRESS_IN
},
_savePressInLocation: function(e) {
var t = s.extractSingleTouch(e.nativeEvent),
n = t && t.pageX,
r = t && t.pageY;
this.pressInLocation = {
pageX: n,
pageY: r
}
},
_getDistanceBetweenPoints: function(e, t, n, r) {
var o = e - n,
i = t - r;
return Math.sqrt(o * o + i * i)
},
_performSideEffectsForTransition: function(e, t, n, r) {
var o = this._isHighlight(e),
i = this._isHighlight(t),
a = n === m.RESPONDER_TERMINATED || n === m.RESPONDER_RELEASE;
if (a && this._cancelLongPressDelayTimeout(), !p[e] && p[t] && this._remeasureMetricsOnActivation(), h[e] && n === m.LONG_PRESS_DETECTED && this.touchableHandleLongPress && this.touchableHandleLongPress(), i && !o ? (this._savePressInLocation(r), this.touchableHandleActivePressIn && this.touchableHandleActivePressIn()) : !i && o && this.touchableHandleActivePressOut && this.touchableHandleActivePressOut(), h[e] && n === m.RESPONDER_RELEASE) {
var s = !!this.touchableHandleLongPress,
l = f[e] && (!s || !this.touchableLongPressCancelsPress()),
u = !f[e] || l;
u && this.touchableHandlePress && this.touchableHandlePress(r)
}
this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout), this.touchableDelayTimeout = null
}
},
b = {
Mixin: w
};
o.exports = b
}), __d("BoundingDimensions", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
this.width = e, this.height = t
}
var a = t("PooledClass"),
s = a.twoArgumentPooler;
i.getPooledFromElement = function(e) {
return i.getPooled(e.offsetWidth, e.offsetHeight)
}, a.addPoolingTo(i, s), o.exports = i
}), __d("Position", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
this.left = e, this.top = t
}
var a = t("PooledClass"),
s = a.twoArgumentPooler;
a.addPoolingTo(i, s), o.exports = i
}), __d("TouchEventUtils", [], function(e, t, n, r, o) {
var i = {
extractSingleTouch: function(e) {
var t = e.touches,
n = e.changedTouches,
r = t && t.length > 0,
o = n && n.length > 0;
return !r && o ? n[0] : r ? t[0] : e
}
};
o.exports = i
}), __d("queryLayoutByID", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactIOSTagHandles"),
a = t("NativeModulesDeprecated").RKUIManager,
s = function(e, t, n) {
a.measure(i.rootNodeIDToTag[e], n)
};
o.exports = s
}), __d("THColors", [], function(e, t, n, r, o) {
"use strict";
var i = {
backgroundColor: "#ffffff",
backgroundWash: "#f5f6f7",
borderColor: "#e4e7e7",
buttonColor: "#eeeeee",
darkerDivider: "#cacdce",
divider: "#e1e4e5",
fadedText: "#d3d6db",
fakeStoryTextBlock: "#ecebec",
feedbackFadedText: "#adb2bb",
feedbackText: "#898f9c",
groupsAccent: "#2891f7",
lightBackgroundWash: "#f5f6f7",
lightBlue: "#2ea2ff",
mediumGray: "#333333",
reportedText: "#6a7180",
timestamp: "#b9b9b9",
unlikedGray: "#b9b9b9"
};
o.exports = i
}), __d("THDockedInputContainer", [], function(e, t, n, r, o) {
"use strict";
var i = t("AnimationMixin"),
a = t("cloneWithProps"),
s = t("DocumentContent"),
l = t("NativeModulesDeprecated"),
u = t("React"),
c = t("ReactIOSAnimation"),
d = t("RKDimensions"),
p = t("StyleSheet"),
h = t("Subscribable"),
f = t("THColors"),
m = t("THInputBarView"),
g = t("View"),
_ = t("keyMirror"),
y = t("logError"),
v = "scroll_responder",
S = "comment_input",
w = "comment_input_wash",
b = l.RKUIManager,
R = {
property: c.Properties.translationY,
toValue: 280,
velocity: 20
},
C = {
property: c.Properties.translationY,
dynamicsTension: 0,
toValue: 0,
velocity: 100
},
E = {
property: c.Properties.opacity,
toValue: 0,
duration: .3
},
D = {
property: c.Properties.opacity,
toValue: .5,
duration: .3
},
x = {
property: c.Properties.opacity,
toValue: 1,
duration: .3
},
F = u.createClass({
displayName: "THDockedInputContainer",
propTypes: {
scrollResponder: u.PropTypes.object.isRequired,
onDockedCommentSubmit: u.PropTypes.func,
onDockedCommentAbort: u.PropTypes.func,
onDidDock: u.PropTypes.func,
groupID: u.PropTypes.string
},
statics: {
Mode: _({
partialWash: !0,
fullHide: !0
}),
contentPaddingHorizontal: 16
},
mixins: [h.Mixin, i],
getInitialState: function() {
return {
initialText: new s,
getTappedNodeHandle: null,
recentKeyboardMovement: null,
inputWashTop: 0
}
},
handleDockAnimateOutComplete: function() {
this.refs[w].setNativeProps({
style: {
opacity: 0
}
}), this.startAnimation(w, c.createLinearAnimation(C))
},
handleKeyboardWillHide: function(e) {
if (this.state.recentKeyboardMovement = e, this.state.getTappedNodeHandle) {
var t = [{
ref: w,
anim: c.createEaseOutAnimation(R)
}, {
ref: w,
anim: c.createLinearAnimation(E)
}],
n = this.state.getTappedNodeHandle();
n && (this.refs[v].scrollResponderScrollNativeHandleToKeyboard(n, this.state.mode === F.Mode.partialWash ? this.refs[S].getBarHeight() : 0), t.push({
nodeHandle: n,
anim: c.createLinearAnimation(x)
})), this.startAnimations(t, this.handleDockAnimateOutComplete, y), this.state.getTappedNodeHandle = null
}
},
handleKeyboardDidShow: function() {
this.state.getTappedNodeHandle && (this.refs[v].setNativeProps({
scrollEnabled: !0
}), this.props.onDidDock && this.props.onDidDock(), this.startAnimations([{
ref: w,
anim: c.createLinearAnimation(x)
}, {
nodeHandle: this.state.getTappedNodeHandle(),
anim: c.createLinearAnimation(this.state.mode === F.Mode.partialWash ? D : E)
}]))
},
handleKeyboardWillShow: function(e) {
if (this.state.getTappedNodeHandle) {
var t = this.getBarHeight();
this.refs[v].scrollResponderScrollNativeHandleToKeyboard(this.state.getTappedNodeHandle(), this.state.mode === F.Mode.partialWash ? t : 0), this.state.recentKeyboardMovement = e, this.updateDockedInputLocation(t)
}
},
getInitialBarHeight: function() {
return this.refs[S].getInitialBarHeight()
},
getBarHeight: function() {
return this.refs[S].getBarHeight()
},
handleInputBarHeightChange: function(e) {
this.updateDockedInputLocation(e), this.props.onHeightChange && this.props.onHeightChange(e)
},
updateDockedInputLocation: function(e) {
var t = this.state.recentKeyboardMovement.endCoordinates.screenY - e;
this.setState({
inputWashTop: t
})
},
enableScrollResponderAutoInsets: function(e) {
this.refs[v].setNativeProps({
automaticallyAdjustContentInsets: e
})
},
initiateDockedInput: function(e) {
var t = e.getTappedNodeHandle,
n = e.mode,
r = e.initialText,
o = e.comparisonTextForCanPost;
this.setState({
getTappedNodeHandle: t,
mode: n,
initialText: r,
text: r,
comparisonTextForCanPost: o
}), this.refs[v].setNativeProps({
scrollEnabled: !1
}), this.refs[S].focusInput()
},
componentDidMount: function() {
b.setMainScrollViewTag(this.refs[v].getNodeHandle())
},
componentDidUnmount: function() {
b.setMainScrollViewTag(0)
},
handleTextChange: function(e) {
this.setState({
text: e
})
},
getScrollResponder: function() {
return this.refs[v]
},
cancelDockedInput: function() {
this.refs[S].blurInput()
},
render: function() {
var e = a(this.props.scrollResponder, {
ref: v,
onKeyboardWillShow: this.handleKeyboardWillShow,
onKeyboardDidShow: this.handleKeyboardDidShow,
onKeyboardWillHide: this.handleKeyboardWillHide,
onScrollResponderKeyboardDismissed: this.props.onDockedCommentAbort.bind(null, {
text: this.state.text,
getTappedNodeHandle: this.state.getTappedNodeHandle,
initialText: this.state.initialText
})
});
return u.createElement(g, {
style: I.container
}, e, u.createElement(g, {
style: [I.inputWash, {
top: this.state.inputWashTop
}],
ref: w
}, u.createElement(m, {
canComment: !0,
canCommentInline: !0,
ref: S,
groupID: this.props.groupID,
initialText: this.state.initialText,
comparisonTextForCanPost: this.state.comparisonTextForCanPost,
onTextChange: this.handleTextChange,
onHeightChange: this.handleInputBarHeightChange,
onInlineCommentSubmit: this.props.onDockedCommentSubmit,
paddingHorizontal: F.contentPaddingHorizontal
})))
}
}),
I = p.create({
container: {
height: d.get("window").height,
width: d.get("window").width,
backgroundColor: f.backgroundWash
},
inputWash: {
height: 600,
opacity: 0,
position: "absolute",
backgroundColor: f.backgroundColor,
right: 0,
left: 0
}
});
o.exports = F
}), __d("DocumentContent", [], function(e, t, n, r, o) {
function i(e, t) {
return t.length !== l(e) && p(0, "Length of block array must match number of blocks in text."), t
}
function a(e, t) {
return t.length != e.length && p(0, "Length of inline style array must match text length."), t
}
function s(e, t) {
return t.length !== e.length && p(0, "Length of entity array must match text length."), t
}
function l(e, t) {
return null != t && (e = e.substr(0, t)), e.split(h).length
}
function u(e, t, n, r) {
"use strict";
this.$DocumentContent_version = 1, this.$DocumentContent_text = e || "", this.$DocumentContent_inlines = t ? a(this.$DocumentContent_text, t) : d(this.$DocumentContent_text.length, m.NONE), this.$DocumentContent_blocks = n ? i(this.$DocumentContent_text, n) : d(l(this.$DocumentContent_text), f.UNSTYLED), this.$DocumentContent_entities = r ? s(this.$DocumentContent_text, r) : d(this.$DocumentContent_text.length, null), this.$DocumentContent_undoStack = [], this.$DocumentContent_redoStack = []
}
var c = t("DocumentCharacters"),
d = t("fillArray"),
p = t("invariant"),
h = c.BLOCK_DELIMITER,
f = t("ComposedBlockType"),
m = t("ComposedInlineStyle");
u.prototype.bumpVersion = function() {
"use strict";
this.$DocumentContent_version++
}, u.prototype.getVersion = function() {
"use strict";
return "v" + this.$DocumentContent_version
}, u.prototype.getText = function() {
"use strict";
return this.$DocumentContent_text
}, u.prototype.getInlineStyles = function() {
"use strict";
return this.$DocumentContent_inlines
}, u.prototype.getBlockStyles = function() {
"use strict";
return this.$DocumentContent_blocks
}, u.prototype.getBlockStylesAroundRange = function(e, t) {
"use strict";
var n = l(this.$DocumentContent_text, e) - 1,
r = l(this.$DocumentContent_text, t);
return this.$DocumentContent_blocks.slice(n, r)
}, u.prototype.getEntities = function() {
"use strict";
return this.$DocumentContent_entities
}, u.prototype.getFragment = function(e, t) {
"use strict";
return {
text: this.$DocumentContent_text.slice(e, t),
inlines: this.$DocumentContent_inlines.slice(e, t),
blocks: this.getBlockStylesAroundRange(e, t),
entities: this.$DocumentContent_entities.slice(e, t)
}
}, u.prototype.getData = function() {
"use strict";
return {
text: this.$DocumentContent_text,
inlines: this.$DocumentContent_inlines,
blocks: this.$DocumentContent_blocks,
entities: this.$DocumentContent_entities
}
}, u.prototype.update = function(e, t, n, r) {
"use strict";
s(e, r), a(e, t), i(e, n), this.$DocumentContent_text = e, this.$DocumentContent_inlines = t, this.$DocumentContent_blocks = n, this.$DocumentContent_entities = r, this.$DocumentContent_version++
}, u.prototype.addForwardTransaction = function(e) {
"use strict";
this.$DocumentContent_undoStack.push(e), this.$DocumentContent_redoStack.length = 0
}, u.prototype.getUndoDiffs = function() {
"use strict";
if (this.$DocumentContent_undoStack.length > 0) {
var e = this.$DocumentContent_undoStack.pop();
return this.$DocumentContent_redoStack.push(e), e
}
return []
}, u.prototype.getRedoDiffs = function() {
"use strict";
if (this.$DocumentContent_redoStack.length > 0) {
var e = this.$DocumentContent_redoStack.pop();
return this.$DocumentContent_undoStack.push(e), e
}
return []
}, o.exports = u
}), __d("DocumentCharacters", [], function(e, t, n, r, o) {
var i = {
BLOCK_DELIMITER: "\r",
SOFT_NEWLINE: "\n",
PHOTO: "📷",
VIDEO: "📹"
};
o.exports = i
}), __d("fillArray", [], function(e, t, n, r, o) {
function i(e, t) {
for (var n = new Array(e), r = 0; e > r; r++) n[r] = t;
return n
}
o.exports = i
}), __d("ComposedBlockType", [], function(e, t, n, r, o) {
"use strict";
var i = {
UNSTYLED: 0,
PARAGRAPH: 1,
UNORDERED_LIST_ITEM: 2,
ORDERED_LIST_ITEM: 3,
BLOCKQUOTE: 4,
HEADER_ONE: 5,
HEADER_TWO: 6,
CODE: 7,
MEDIA: 8
};
o.exports = i
}), __d("ComposedInlineStyle", [], function(e, t, n, r, o) {
"use strict";
var i = {
NONE: 0,
BOLD: 1,
ITALIC: 2,
UNDERLINE: 4,
CODE: 8
};
o.exports = i
}), __d("THInputBarView", [], function(e, t, n, r, o) {
"use strict";
var i = t("DocumentContent"),
a = t("DocumentSelectionState"),
s = t("FIGColors"),
l = t("FBStickerInputView"),
u = t("Image"),
c = t("MentionsInput.react"),
d = t("MentionsInputTypeaheadView.react"),
p = t("NativeModulesDeprecated"),
h = t("React"),
f = t("StyleSheet"),
m = t("TimerMixin"),
g = t("Text"),
_ = t("THColors"),
y = t("THSounds"),
v = t("TouchableBounce"),
S = t("TouchableHighlight"),
w = t("TouchableWithoutFeedback"),
b = t("View"),
R = t("clamp"),
C = t("copyDocumentContent"),
E = t("documentContentsAreEqual"),
D = t("fbt"),
x = t("getMentionsSearchSource"),
F = t("getTextWithEntitiesFromDocument"),
I = t("ix"),
T = p.RKTreehouseManager,
P = "stickerInputView",
L = "keyboardInputView",
k = "inputRow",
M = "inputField",
A = 35,
Q = 100,
O = 6,
N = .5,
G = 13,
$ = 14,
B = function(e) {
return e + 2 * O + N
},
U = D({
type: "text",
texts: ["Write a comment..."],
desc: "Placeholder text for comment input"
}),
V = D({
type: "text",
texts: ["Post"],
desc: "Post a comment"
}),
q = h.createClass({
displayName: "THInputBarView",
mixins: [m],
propTypes: {
canCommentInline: h.PropTypes.bool,
onNonInlineCommentRequested: h.PropTypes.func,
onInlineCommentSubmit: h.PropTypes.func,
initialText: h.PropTypes.instanceOf(i),
comparisonTextForCanPost: h.PropTypes.instanceOf(i),
hidePostButton: h.PropTypes.bool,
groupID: h.PropTypes.string,
paddingHorizontal: h.PropTypes.number
},
focusInput: function() {
this.refs[M].focus()
},
blurInput: function() {
this.refs[M].blur()
},
getDefaultProps: function() {
return {
initialText: new i,
hidePostButton: !1,
comparisonTextForCanPost: null
}
},
getInitialState: function() {
return {
documentContent: C(this.props.initialText),
selectionState: new a(0, 0),
submittingComment: !1,
inputFieldHeight: A,
mentionsSource: this.props.canCommentInline && x(this.props.groupID),
inputView: L
}
},
getInitialBarHeight: function() {
return B(A)
},
getBarHeight: function() {
return B(this.state.inputFieldHeight)
},
handleChange: function(e) {
if (e) {
var t = e.nativeEvent.contentSize,
n = R(A, t.height, Q);
this.state.inputFieldHeight !== n && (this.state.documentContent.bumpVersion(), this.setState({
inputFieldHeight: n
}), this.props.onHeightChange && this.props.onHeightChange(B(n)))
}
this.props.onTextChange && this.props.onTextChange(this.state.documentContent)
},
handleActiveInputPress: function() {
this.props.canCommentInline && this.setState({
inputView: L
})
},
handleInactiveInputPress: function() {
this.props.onNonInlineCommentRequested && this.props.onNonInlineCommentRequested(function() {
return this.isMounted() && this.refs[k].getNodeHandle()
}.bind(this))
},
handleCommentSubmit: function() {
T && T.playSound(y.commentCompleted), this.setState({
submittingComment: !0
}), this.refs[M] && this.blurInput(), this.props.onInlineCommentSubmit && this.requestAnimationFrame(function() {
var e = F(this.state.documentContent);
e ? this.props.onInlineCommentSubmit(e) : console.error("Should not be submitting empty comment.")
}.bind(this))
},
handleStickerKeyboardSwitch: function() {
this.setState(this.state.inputView === L ? {
inputView: P
} : {
inputView: L
})
},
handleStickerCommentSubmit: function(e) {
T && T.playSound(y.commentCompleted), this.setState({
submittingComment: !0
}), this.refs[M] && this.blurInput();
var t = e.nativeEvent.stickerFBID,
n = F(this.state.documentContent);
if (n && t) {
var r = {
id: t.toString()
};
this.props.onInlineCommentSubmit(n, r)
} else console.error("Should not be submitting invalid sticker.")
},
componentWillReceiveProps: function(e) {
var t = this.props.initialText;
this.props = e, e.initialText !== t && this.resetCommentField()
},
resetCommentField: function() {
var e = this.props.initialText || new i;
this.state.documentContent.update(e.getText(), e.getInlineStyles().slice(0), e.getBlockStyles().slice(0), e.getEntities().slice(0)), this.setState({
submittingComment: !1
})
},
renderStickerButton: function() {
var e;
e = I(this.state.inputView === P ? "thSmileGlyphSelected" : "thSmileGlyphNormal");
var t = h.createElement(u, {
source: e,
style: H.icon
});
return h.createElement(S, {
onPress: this.handleStickerKeyboardSwitch,
activeOpacity: 1
}, h.createElement(b, {
style: H.stickerButton
}, t))
},
render: function() {
var e = !this.state.submittingComment && this.state.documentContent.getText().trim() && !E(this.props.comparisonTextForCanPost, this.state.documentContent),
t = null,
n = null;
switch (this.state.inputView) {
case L:
t = null;
break;
case P:
t = h.createElement(l, {
onStickerSelect: this.handleStickerCommentSubmit
}), n = h.createElement(w, {
onPress: this.handleActiveInputPress
}, h.createElement(b, {
style: H.inputFieldOverlay
}));
break;
default:
t = null
}
var r = null,
o = null;
this.props.hidePostButton || (r = e ? h.createElement(v, {
onPress: this.handleCommentSubmit
}, h.createElement(b, {
style: H.postButton
}, h.createElement(g, {
style: H.activePostButtonText
}, V))) : h.createElement(b, {
style: H.postButton
}, h.createElement(g, {
style: H.inactivePostButtonText
}, V)), o = e ? null : this.renderStickerButton());
var i, a, s, u;
this.props.canCommentInline ? (i = _.darkerDivider, a = $, s = this.state.inputFieldHeight, u = b.PointerEvents.unspecified) : (i = _.divider, a = G, s = A, u = b.PointerEvents.boxOnly);
var p = [H.commentBox, {
height: s,
fontSize: a
}],
f = this.state.documentContent.getText() || this.props.canCommentInline ? null : U,
m = h.createElement(c, {
ref: M,
documentContent: this.state.documentContent,
placeholder: f,
placeholderTextColor: _.feedbackFadedText,
selectionState: this.state.selectionState,
mentionsSource: this.state.mentionsSource || void 0,
typeaheadView: d,
textInputStyle: p,
onInputFocus: this.resetCommentField,
multiline: !0,
onChange: this.handleChange,
inputView: t
});
return h.createElement(b, {
ref: k
}, h.createElement(b, {
key: "divReply",
style: [H.divider, {
backgroundColor: i
}]
}), h.createElement(b, {
style: [H.buttonsContainer, {
paddingHorizontal: this.props.paddingHorizontal
}]
}, h.createElement(S, {
activeOpacity: 1,
style: H.touchableInputWrapper,
onPress: this.handleInactiveInputPress
}, h.createElement(b, {
pointerEvents: u
}, m)), n, r, o))
}
}),
H = f.create({
touchableInputWrapper: {
flex: 1
},
activePostButtonText: {
fontSize: 15,
fontWeight: "bold",
color: _.groupsAccent
},
buttonsContainer: {
paddingTop: O,
paddingBottom: O,
flexDirection: "row",
alignItems: "flex-end",
marginHorizontal: -4
},
commentBox: {
backgroundColor: _.backgroundColor,
color: s.mediumText
},
divider: {
height: N
},
inactivePostButtonText: {
fontSize: 15,
fontWeight: "bold",
color: _.fadedText
},
postButton: {
backgroundColor: _.backgroundColor,
justifyContent: "center",
alignItems: "center",
height: A,
paddingLeft: 10,
paddingBottom: 6,
paddingRight: 4
},
stickerButton: {
backgroundColor: _.backgroundColor,
justifyContent: "center",
alignItems: "center",
height: A,
paddingLeft: 4,
paddingBottom: 4,
paddingRight: 4
},
inputFieldOverlay: {
position: "absolute",
height: A,
left: 0,
right: 0
},
icon: {
width: 20,
height: 20
}
});
o.exports = q
}), __d("DocumentSelectionState", [], function(e, t, n, r, o) {
function i(e, t) {
"use strict";
this.$DocumentSelectionState_anchorOffset = e, this.$DocumentSelectionState_focusOffset = t, this.$DocumentSelectionState_hasFocus = !1
}
var a = t("mixInEventEmitter");
i.prototype.update = function(e, t) {
"use strict";
(this.$DocumentSelectionState_anchorOffset !== e || this.$DocumentSelectionState_focusOffset !== t) && (this.$DocumentSelectionState_anchorOffset = e, this.$DocumentSelectionState_focusOffset = t, this.emit("update"))
}, i.prototype.constrainLength = function(e) {
"use strict";
this.update(Math.min(this.$DocumentSelectionState_anchorOffset, e), Math.min(this.$DocumentSelectionState_focusOffset, e))
}, i.prototype.focus = function() {
"use strict";
this.$DocumentSelectionState_hasFocus || (this.$DocumentSelectionState_hasFocus = !0, this.emit("focus"))
}, i.prototype.blur = function() {
"use strict";
this.$DocumentSelectionState_hasFocus && (this.$DocumentSelectionState_hasFocus = !1, this.emit("blur"))
}, i.prototype.hasFocus = function() {
"use strict";
return this.$DocumentSelectionState_hasFocus
}, i.prototype.isCollapsed = function() {
"use strict";
return this.$DocumentSelectionState_anchorOffset === this.$DocumentSelectionState_focusOffset
}, i.prototype.isBackward = function() {
"use strict";
return this.$DocumentSelectionState_anchorOffset > this.$DocumentSelectionState_focusOffset
}, i.prototype.getAnchorOffset = function() {
"use strict";
return this.$DocumentSelectionState_hasFocus ? this.$DocumentSelectionState_anchorOffset : null
}, i.prototype.getFocusOffset = function() {
"use strict";
return this.$DocumentSelectionState_hasFocus ? this.$DocumentSelectionState_focusOffset : null
}, i.prototype.getStartOffset = function() {
"use strict";
return this.$DocumentSelectionState_hasFocus ? Math.min(this.$DocumentSelectionState_anchorOffset, this.$DocumentSelectionState_focusOffset) : null
}, i.prototype.getEndOffset = function() {
"use strict";
return this.$DocumentSelectionState_hasFocus ? Math.max(this.$DocumentSelectionState_anchorOffset, this.$DocumentSelectionState_focusOffset) : null
}, i.prototype.overlaps = function(e, t) {
"use strict";
return this.hasFocus() && this.getStartOffset() <= t && e <= this.getEndOffset()
}, a(i, {
blur: !0,
focus: !0,
update: !0
}), o.exports = i
}), __d("FIGColors", [], function(e, t, n, r, o) {
"use strict";
var i = t("rgbToHex"),
a = t("hsvToHex"),
s = {
accentBlue: i(88, 144, 255),
attachmentBorder: "#cccccc",
backgroundWash: i(233, 234, 237),
blueGreyText: i(55, 62, 77),
darkText: i(20, 24, 35),
facebookBlue: i(59, 89, 152),
green: i(70, 168, 0),
lightDivider: i(200, 203, 208),
lightGreyWash: i(246, 247, 248),
lightText: i(173, 178, 187),
linkText: i(78, 105, 162),
mediumText: i(106, 113, 128),
mobileWash: i(211, 214, 219),
modalNavigationBarTint: i(246, 247, 248),
navigationBarTint: a(156, 172, 128),
red: i(218, 41, 41),
selectedBlue: i(118, 165, 249),
separator: i(242, 242, 242),
tabBar: i(71, 124, 230)
};
s.opaqueNavigationBarTint = s.facebookBlue, o.exports = s
}), __d("rgbToHex", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t = Math.round(e).toString(16);
return 1 === t.length ? "0" + t : t
}
function a(e, t, n) {
return "#" + i(e) + i(t) + i(n)
}
o.exports = a
}), __d("hsvToHex", [], function(e, t, n, r, o) {
"use strict";
function i(e, t, n) {
e /= 255, t /= 255, n /= 255;
var r = Math.floor(6 * e),
o = 6 * e - r,
i = n * (1 - t),
s = n * (1 - o * t),
l = n * (1 - (1 - o) * t);
switch (n *= 255, l *= 255, i *= 255, s *= 255, r % 6) {
case 0:
return a(n, l, i);
case 1:
return a(s, n, i);
case 2:
return a(i, n, l);
case 3:
return a(i, s, n);
case 4:
return a(l, i, n);
case 5:
return a(n, i, s)
}
}
var a = t("rgbToHex");
o.exports = i
}), __d("FBStickerInputView", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeMethodsMixin"),
a = t("React"),
s = t("ReactIOSViewAttributes"),
l = t("StyleSheet"),
u = (t("View"), t("createReactIOSNativeComponentClass")),
c = a.createClass({
displayName: "FBStickerInputView",
propTypes: {
onStickerSelect: a.PropTypes.func
},
mixins: [i],
viewConfig: {
uiViewClassName: "UIView",
validAttributes: s.UIView
},
onStickerSelect: function(e) {
this.props.onStickerSelect && this.props.onStickerSelect(e)
},
render: function() {
return a.createElement(p, {
style: d.inputViewStyle,
onStickerSelect: this.onStickerSelect
})
}
}),
d = l.create({
inputViewStyle: {
position: "absolute"
}
}),
p = u({
validAttributes: s.UIView,
uiViewClassName: "RKStickerInputView"
});
o.exports = c
}), __d("MentionsInput.react", [], function(e, t, n, r, o) {
"use strict";
var i = t("AbstractMentionsTextEditor.react"),
a = t("DocumentCharacters"),
s = t("DocumentCompositeDecorator"),
l = t("DocumentContent"),
u = t("DocumentDecorator"),
c = t("ComposedEntityType"),
d = t("DocumentSelectionState"),
p = t("DocumentView"),
h = t("MentionSpan"),
f = t("MentionSpan"),
m = t("MentionsTextEditorMixin"),
g = t("ReactPropTypes"),
_ = t("React"),
y = t("MentionSpan"),
v = t("View"),
S = t("cx"),
w = t("emptyFunction"),
b = t("getDefaultKeyBinding"),
R = t("getEntityMatcher"),
C = t("getHashtagMatches"),
E = w.thatReturns(""),
D = w.thatReturns(""),
x = c.MENTION,
F = new s([new u(R(function(e) {
var t = e.getData();
return e.getType() === x && t && t.isWeak
}), y), new u(R(function(e) {
return e.getType() === x
}), f), new u(C, h)]),
I = _.createClass({
displayName: "MentionsInput",
mixins: [m],
propTypes: {
documentContent: g.instanceOf(l).isRequired,
selectionState: g.instanceOf(d).isRequired,
mentionsSource: g.object,
typeaheadView: g.func.isRequired,
typeaheadViewProps: g.object,
spellCheck: g.bool,
placeholder: g.string,
placeholderTextColor: g.string,
className: g.string,
autoflip: g.bool,
handleReturn: g.func,
handleDroppedFiles: g.func,
handlePastedFiles: g.func,
onAddMention: g.func,
onShowMentions: g.func,
onChange: g.func,
onInputFocus: g.func,
onInputBlur: g.func,
onFile: g.func,
inputView: g.renderable
},
focus: function() {
this.refs.textEditor.focus()
},
blur: function() {
this.refs.textEditor.blur()
},
_onReturn: function(e) {
this.props.handleReturn && this.props.handleReturn(e) || this.onCharacters(a.BLOCK_DELIMITER)
},
_onBlur: function(e) {
this.onBlur(e), this.props.onInputBlur && this.props.onInputBlur(e)
},
_onFocus: function(e) {
this.onFocus(e), this.props.onInputFocus && this.props.onInputFocus(e)
},
_onClick: function() {
this.refs.textEditor.focus()
},
_onTextInput: function(e) {
var t = e.nativeEvent,
n = t.range.start,
r = t.range.end,
o = t.text;
0 === o.length && r - n === 1 && this.props.selectionState.isCollapsed() && this.props.selectionState.getStartOffset() === n + 1 ? this.onBackspace() : this.onAlter(n, t.previousText, o)
},
_getStateForDocument: function(e) {
return {
documentView: new p(e, F)
}
},
componentWillReceiveProps: function(e) {
this.props.documentContent !== e.documentContent && this.setState(this._getStateForDocument(e.documentContent))
},
getInitialState: function() {
return this._getStateForDocument(this.props.documentContent)
},
render: function() {
return _.createElement(v, {
style: this.props.style,
className: S("uiMentionsInput/root"),
onClick: this._onClick,
onFocus: this._onFocus
}, _.createElement(i, {
ref: "textEditor",
className: S("public/uiMentionsInput/input"),
documentView: this.state.documentView,
placeholder: this.props.placeholder,
placeholderTextColor: this.props.placeholderTextColor,
autoFocus: this.props.autoFocus,
selectionState: this.props.selectionState,
mentionsSource: this.props.mentionsSource,
typeaheadView: this.props.typeaheadView,
typeaheadViewProps: this.props.typeaheadViewProps,
keyBindingFn: b,
blockStyleFn: E,
inlineStyleFn: D,
inputView: this.props.inputView,
textInputStyle: this.props.textInputStyle,
spellCheck: this.props.spellCheck,
autoflip: this.props.autoflip,
onShowMentions: this.onShowMentions,
onAddMention: this.onAddMention,
onCharacters: this.onCharacters,
onAlter: this.onAlter,
onCut: this.onCut,
onPasteFragment: this.onPasteFragment,
onDelete: this.onDelete,
onDropFiles: this.onDropFiles,
onDropSelection: this.onDropSelection,
onDropText: this.onDropText,
onKeyCommand: this.onKeyCommand,
onPasteFiles: this.onPasteFiles,
onSelect: this.onSelect,
onTextInput: this._onTextInput,
onReturn: this._onReturn,
onBlur: this._onBlur,
onFocus: this._onFocus,
onChange: this.props.onChange,
handleDroppedFiles: this.props.handleDroppedFiles,
handlePastedFiles: this.props.handlePastedFiles
}))
}
});
o.exports = I
}), __d("AbstractMentionsTextEditor.react", [], function(e, t, n, r, o) {
"use strict";
var i, a, s = t("AbstractTextEditor.react"),
l = t("AbstractTextEditorProps"),
u = t("ModalFullscreenView"),
c = t("getMentionableRect"),
d = t("Locale"),
p = t("ReactPropTypes"),
h = t("React"),
f = t("TimerMixin"),
m = t("TypeaheadNavigation"),
g = t("View"),
_ = t("copyProperties"),
y = d.isRTL(),
v = 20,
S = 5,
w = h.createClass({
displayName: "AbstractMentionsTextEditor",
mixins: [f],
propTypes: _({}, l.propTypes, {
autoflip: p.bool,
mentionsSource: p.object,
excludedEntries: p.object,
onShowMentions: p.func.isRequired,
onAddMention: p.func.isRequired,
typeaheadView: p.func.isRequired,
typeaheadViewProps: p.object,
inputView: p.renderable
}),
getDefaultProps: l.getDefaultProps,
componentWillMount: function() {
var e = function() {
this.setTimeout(this._searchIfCollapsed, 0)
}.bind(this);
this._listeners = [this.props.selectionState.addListener("focus", e), this.props.selectionState.addListener("update", e)]
},
componentWillUnmount: function() {
this._listeners.forEach(function(e) {
e.remove()
}), this._listeners = null
},
getInitialState: function() {
return {
contextualBounds: null,
highlightedMentionable: null,
mentionableEntries: null
}
},
_onShowMentions: function(e, t) {
var n = e && e.length;
if (n || this.state.mentionableEntries) {
var r = n ? e.slice(0, v) : null;
if (r) {
var o = this.props.typeaheadViewProps;
o && o.mentionSortFn && r.sort(o.mentionSortFn), this.props.onShowMentions(r, t)
}
this.setState({
contextualBounds: n ? c(t, y) : null,
highlightedMentionable: n ? e[0] : null,
mentionableEntries: r
})
}
},
_onBlur: function(e) {
this.setState(this.getInitialState()), this.props.onBlur(e)
},
_onFocus: function(e) {
this.props.mentionsSource && this.props.mentionsSource.bootstrap(), this.props.onFocus(e)
},
_onReturn: function(e) {
this.state.highlightedMentionable && !e.nativeEvent.getModifiers().any ? this._onMentionSelect(this.state.highlightedMentionable, e) : this.props.onReturn(e)
},
_onTab: function(e) {
this.state.highlightedMentionable ? (e.preventDefault(), this._onMentionSelect(this.state.highlightedMentionable, e)) : this.props.onTab && this.props.onTab(e)
},
_onEscape: function(e) {
this.state.highlightedMentionable ? this.setState(this.getInitialState()) : this.props.onEscape && this.props.onEscape(e)
},
_onUpArrow: function(e) {
this.state.mentionableEntries ? (e.preventDefault(), m.moveUp(this.state.mentionableEntries, this.state.highlightedMentionable, this._onMentionHighlight)) : this.props.onUpArrow && this.props.onUpArrow(e)
},
_onDownArrow: function(e) {
this.state.mentionableEntries ? (e.preventDefault(), m.moveDown(this.state.mentionableEntries, this.state.highlightedMentionable, this._onMentionHighlight)) : this.props.onDownArrow && this.props.onDownArrow(e)
},
_onMentionHighlight: function(e) {
this.setState({
highlightedMentionable: e
})
},
_onMentionSelect: function(e, t) {
this.props.onAddMention(e, t), this.setState(this.getInitialState())
},
_searchIfCollapsed: function() {
var e = this.props.selectionState;
e.hasFocus() && e.isCollapsed() && this.props.mentionsSource && this.props.mentionsSource.search(this.props.documentView.getContent(), e.getStartOffset(), this._onShowMentions)
},
focus: function() {
this.refs.abstractTextEditor.focus()
},
blur: function() {
this.refs.abstractTextEditor.blur()
},
renderLayers: function() {
var e = this.state.mentionableEntries,
t = this.props.selectionState,
n = this.props.typeaheadView,
r = t.isCollapsed() && t.hasFocus() && e && e.length,
o = {};
return this.props.autoflip && (o.ContextualLayerAutoFlip = i, o.ContextualLayerUpdateOnScroll = a), {
entries: h.createElement(u, {
shown: r,
contextRef: "container",
contextBounds: this.state.contextualBounds,
offsetY: S,
position: "above",
behaviors: o
}, h.createElement(n, {
viewProps: this.props.typeaheadViewProps,
highlightedEntry: this.state.highlightedMentionable,
entries: e || [],
onSelect: this._onMentionSelect,
onHighlight: this._onMentionHighlight
}))
}
},
render: function() {
return h.createElement(g, {
ref: "container",
className: this.props.className,
tabIndex: "-2"
}, this.transferPropsTo(h.createElement(s, {
ref: "abstractTextEditor",
autoFocus: this.props.autoFocus,
inputView: this.props.inputView,
onBlur: this._onBlur,
onFocus: this._onFocus,
onReturn: this._onReturn,
onTab: this._onTab,
onEscape: this._onEscape,
onDownArrow: this._onDownArrow,
onUpArrow: this._onUpArrow,
onChange: this.props.onChange,
textInputStyle: this.props.textInputStyle
})), this.renderLayers())
}
});
o.exports = w
}), __d("AbstractTextEditor.react", [], function(e, t, n, r, o) {
function i(e) {
return function(t) {
var n = this._handler && this._handler[e];
n && n.call(this, t)
}
}
function a(e) {
switch (e) {
case _.EDIT:
return m;
case _.COMPOSITE:
return h;
case _.DRAG:
return g;
case _.CUT:
case _.RENDER:
return null
}
}
var s = t("AbstractTextEditorProps"),
l = t("ExecutionEnvironment"),
u = t("React"),
c = t("StyleSheet"),
d = t("Text"),
p = t("TextEditorBlock.react"),
h = t("TextEditorCompositionHandler"),
f = t("TextEditorCompositionState"),
m = t("TextEditorEditHandler"),
g = t("TextEditorDragHandler"),
_ = t("TextEditorModes"),
y = t("TextInput"),
v = t("View"),
S = t("cx"),
w = t("extendArray"),
b = t("requestAnimationFrame"),
R = (t("ComposedInlineStyle"), "b"),
C = "d",
E = "l",
D = e.MutationObserver || e.WebKitMutationObserver,
x = u.createClass({
displayName: "AbstractTextEditor",
propTypes: s.propTypes,
getDefaultProps: s.getDefaultProps,
_onBlur: i("onBlur"),
_onFocus: i("onFocus"),
_onSelect: i("onSelect"),
_onKeyDown: i("onKeyDown"),
_onKeyUp: i("onKeyUp"),
_onKeyPress: i("onKeyPress"),
_onMouseDown: i("onMouseDown"),
_onMouseUp: i("onMouseUp"),
_onCharacterData: i("onCharacterData"),
_onCompositionStart: i("onCompositionStart"),
_onCompositionEnd: i("onCompositionEnd"),
_onDragStart: i("onDragStart"),
_onDragOver: i("onDragOver"),
_onDragEnd: i("onDragEnd"),
_onDrop: i("onDrop"),
_onCut: i("onCut"),
_onCopy: i("onCopy"),
_onPaste: i("onPaste"),
_onBeforeInput: i("onBeforeInput"),
_onTextInput: function(e) {
this.props.onTextInput && this.props.onTextInput(e)
},
_renderContents: function() {
function e(e, t) {
var n = e + (t ? t.charCodeAt(0) : 0),
r = n;
return f.hasOwnProperty(r) ? r += "-" + f[r] ++ : f[r] = 0, h[r] = !0, r
}
function t(t, n, r, i) {
o = [];
var a = this.props.BlockComponent || p,
d = s.substr(n, r - n),
h = e(R, d);
c.push(u.createElement(a, {
key: h,
offsetKey: t,
text: d,
blockProps: this.props.blockProps,
blockStyleFn: this.props.blockStyleFn,
style: i,
direction: l[c.length]
}, o))
}
function n(t, n, r, l) {
if (l) {
i = [];
var c = this.props.documentView.getEntities()[n],
d = s.substr(n, r - n),
p = e(C, d);
o.push(u.createElement(l, {
key: p,
offsetKey: t,
decoratorProps: this.props.decoratorProps,
documentView: a,
selectionState: this.props.selectionState,
entityKey: c,
text: d
}, i))
} else i = o
}
function r(t, n, r) {
var o = s.substr(n, r - n),
a = e(E, o);
i.push(u.createElement(d, {
key: a
}, o))
}
var o, i, a = this.props.documentView,
s = a.getText(),
l = a.getBlockDirections(),
c = [],
h = {},
f = {};
return this.props.documentView.iterate(t.bind(this), n.bind(this), r.bind(this)), c
},
_attachMutationObserver: function() {
if (D) {
var e = [],
t = function() {
e.length && (this._onCharacterData(e), e.length = 0)
}.bind(this);
this._mutationObserver = new D(function(n) {
this._guardAgainstRender || (0 === e.length && b(t), w(e, n))
}.bind(this)), this._mutationObserver && this._mutationObserver.observe(this.refs.editorContainer.getDOMNode(), {
characterDataOldValue: !0,
characterData: !0,
subtree: !0
})
}
},
_disconnectMutationObserver: function() {
this._mutationObserver && (this._mutationObserver.disconnect(), this._mutationObserver = null)
},
_renderPlaceholder: function() {
var e = this.props.placeholder && !this.props.documentView.getText();
return e ? u.createElement(AbstractTextEditorPlaceholder, {
text: this.props.placeholder,
selectionState: this.props.selectionState,
compositionState: this._compositionState
}) : void 0
},
render: function() {
return u.createElement(v, {
className: S("AbstractTextEditor/root")
}, u.createElement(v, {
className: S("AbstractTextEditor/editorContainer"),
ref: "editorContainer"
}, u.createElement(y, {
multiline: !0,
lineHeight: 1,
autoFocus: this.props.autoFocus,
style: [F.textBox, this.props.textInputStyle],
ref: "editor",
role: "textbox",
className: S("public/AbstractTextEditor/content"),
placeholder: this.props.placeholder,
placeholderTextColor: this.props.placeholderTextColor,
onBlur: this._onBlur,
onFocus: this._onFocus,
onSelect: this._onSelect,
onMouseUp: this._onMouseUp,
onKeyDown: this._onKeyDown,
onKeyUp: this._onKeyUp,
onKeyPress: this._onKeyPress,
onCut: this._onCut,
onCopy: this._onCopy,
onPaste: this._onPaste,
onDragStart: this._onDragStart,
onDragOver: this._onDragOver,
onDragEnd: this._onDragEnd,
onDrop: this._onDrop,
onCompositionStart: this._onCompositionStart,
onCompositionEnd: this._onCompositionEnd,
onBeforeInput: this._onBeforeInput,
onTextInput: this._onTextInput,
onChange: this.props.onChange,
selectionState: this.props.selectionState,
spellCheck: this.props.spellCheck,
contentEditable: !this.props.disabled,
inputView: this.props.inputView
}, this._renderContents())))
},
focus: function() {
var e = this.props.selectionState.hasFocus();
if (!e) {
if (!this.refs.editor.getDOMNode) return void this.refs.editor.focus();
var t = this.props.documentView.getText().length;
this.props.selectionState.update(t, t), this.forceUpdate()
}
},
blur: function() {
this.refs.editor.getDOMNode ? this.refs.editor.getDOMNode().blur() : this.refs.editor.blur()
},
componentDidMount: function() {
this._renderedVersion = null, this._clonedEditor = null, this._guardAgainstRender = !1, this._handler = m;
var e = this.props.documentView.getBlockDirections();
this._renderedDirections = e.join(""), l.canUseDOM && this._attachMutationObserver()
},
shouldComponentUpdate: function(e) {
var t = e.documentView.getBlockDirections();
return !this._guardAgainstRender && (e.documentView.getVersion() !== this._renderedVersion || t.join("") !== this._renderedDirections || this.props.disabled !== e.disabled || this.props.inputView !== e.inputView)
},
componentWillUpdate: function() {
this.setMode(_.RENDER)
},
componentDidUpdate: function() {
this.exitCurrentMode(), this._renderedVersion = this.props.documentView.getVersion();
var e = this.props.documentView.getBlockDirections();
this._renderedDirections = e.join("")
},
componentWillMount: function() {
this._compositionState = new f(!1), this._selectionListener = this.props.selectionState.addListener("focus", this.focus)
},
componentWillUnmount: function() {
this._disconnectMutationObserver(), this._selectionListener && (this._selectionListener.remove(), this._selectionListener = null)
},
expectDuplicateMutation: function() {
this._renderedVersion = this.props.documentView.getVersion()
},
resetRenderedVersion: function() {
this._renderedVersion = null, this._renderedDirections = null
},
setMode: function(e) {
this._handler = a(e)
},
exitCurrentMode: function() {
this.setMode(_.EDIT)
},
captureEditorDOM: function() {
this._clonedEditor = this.refs.editor.getDOMNode().cloneNode(!0)
},
restoreEditorDOM: function() {
var e = this.refs.editorContainer.getDOMNode();
e.innerHTML = "", e.appendChild(this._clonedEditor), this.focus(), this._clonedEditor = null
},
setRenderGuard: function() {
this._guardAgainstRender = !0
},
removeRenderGuard: function() {
this._guardAgainstRender = !1
}
}),
F = c.create({
textBox: {
backgroundColor: "transparent",
fontSize: 14,
height: 30
}
});
o.exports = x
}), __d("AbstractTextEditorProps", [], function(e, t, n, r, o) {
var i = t("DocumentSelectionState"),
a = t("DocumentView"),
s = t("ReactPropTypes"),
l = {
propTypes: {
documentView: s.instanceOf(a).isRequired,
selectionState: s.instanceOf(i).isRequired,
placeholder: s.string,
blockStyleFn: s.func.isRequired,
inlineStyleFn: s.func.isRequired,
keyBindingFn: s.func.isRequired,
spellCheck: s.bool,
onReturn: s.func.isRequired,
onEscape: s.func,
onTab: s.func,
onUpArrow: s.func,
onDownArrow: s.func,
onCharacters: s.func.isRequired,
onAlter: s.func.isRequired,
onCut: s.func.isRequired,
onPasteFragment: s.func.isRequired,
onPasteFiles: s.func,
onDelete: s.func.isRequired,
onDropSelection: s.func.isRequired,
onDropText: s.func.isRequired,
onDropFiles: s.func,
onSelect: s.func.isRequired,
onBlur: s.func.isRequired,
onFocus: s.func.isRequired,
inputView: s.renderable
},
getDefaultProps: function() {
return {
spellCheck: !1
}
}
};
o.exports = l
}), __d("DocumentView", [], function(e, t, n, r, o) {
function i(e, t) {
"use strict";
this.$DocumentView_content = e, this.$DocumentView_decorator = t, this.$DocumentView_currentFingerprint = [], this.$DocumentView_iteratedVersion = null, this.$DocumentView_blockDirections = [], this.$DocumentView_iterator = new a(this.$DocumentView_content, this.$DocumentView_decorator), this.$DocumentView_offsets = new s(this.$DocumentView_iterator)
}
var a = t("DocumentIterator"),
s = t("DocumentOffsetCache"),
l = t("UnicodeBidi"),
u = t("createArrayFrom"),
c = t("emptyFunction");
i.prototype.getContent = function() {
"use strict";
return this.$DocumentView_content
}, i.prototype.getText = function() {
"use strict";
return this.$DocumentView_content.getText()
}, i.prototype.getEntities = function() {
"use strict";
return this.$DocumentView_content.getEntities()
}, i.prototype.getFragment = function(e, t) {
"use strict";
return this.$DocumentView_content.getFragment(e, t)
}, i.prototype.getVersion = function() {
"use strict";
return this.$DocumentView_content.getVersion()
}, i.prototype.getBlockDirections = function() {
"use strict";
return this.$DocumentView_fillCaches(), this.$DocumentView_blockDirections
}, i.prototype.getFingerprint = function() {
"use strict";
return this.$DocumentView_fillCaches(), this.$DocumentView_currentFingerprint.join(":")
}, i.prototype.getOffset = function(e) {
"use strict";
return this.$DocumentView_fillCaches(), this.$DocumentView_offsets.getOffset(e)
}, i.prototype.getKey = function(e) {
"use strict";
return this.$DocumentView_fillCaches(), this.$DocumentView_offsets.getKey(e)
}, i.prototype.iterate = function(e, t, n) {
"use strict";
function r(t, n) {
a.nextBlock(t), d(t, n), e(a.getCurrentKey(), t, n, u[l++])
}
function o(e, n, r) {
var o = null;
a.nextDecoration(e), null !== r && (c("D", r, n - e), o = s.getComponentForKey(r)), t(a.getCurrentKey(), e, n, o)
}
function i(e, t, r) {
a.nextLeaf(e), c("L", r), n(a.getCurrentKey(), e, t, r)
}
this.$DocumentView_iteratedVersion = this.getVersion(), this.$DocumentView_currentFingerprint.length = 0, this.$DocumentView_blockDirections.length = 0, this.$DocumentView_offsets.reset();
var a = this.$DocumentView_offsets,
s = this.$DocumentView_decorator,
l = 0,
u = this.$DocumentView_content.getBlockStyles(),
c = this.$DocumentView_recordFingerprint.bind(this),
d = this.$DocumentView_recordBlockDirection.bind(this);
this.$DocumentView_iterator.process(r, o, i)
}, i.prototype.$DocumentView_fillCaches = function() {
"use strict";
this.$DocumentView_iteratedVersion !== this.getVersion() && this.iterate(c, c, c)
}, i.prototype.$DocumentView_recordFingerprint = function() {
"use strict";
this.$DocumentView_currentFingerprint.push(u(arguments).join("-"))
}, i.prototype.$DocumentView_recordBlockDirection = function(e, t) {
"use strict";
var n = this.$DocumentView_content.getText().slice(e, t),
r = this.$DocumentView_blockDirections,
o = l.getDirection(n, r[r.length - 1]);
this.$DocumentView_blockDirections.push(o)
}, o.exports = i
}), __d("DocumentIterator", [], function(e, t, n, r, o) {
function i(e, t) {
"use strict";
this.$DocumentIterator_content = e, this.$DocumentIterator_decorator = t
}
var a = t("DocumentCharacters"),
s = a.BLOCK_DELIMITER;
i.prototype.process = function(e, t, n) {
"use strict";
this.$DocumentIterator_blockFn = e, this.$DocumentIterator_decorationFn = t, this.$DocumentIterator_inlineFn = n, this.$DocumentIterator_text = this.$DocumentIterator_content.getText(), this.$DocumentIterator_inlines = this.$DocumentIterator_content.getInlineStyles(), this.$DocumentIterator_decorations = this.$DocumentIterator_decorator.getDecorations(this.$DocumentIterator_content), this.$DocumentIterator_processDocument()
}, i.prototype.$DocumentIterator_processDocument = function() {
"use strict";
for (var e, t = this.$DocumentIterator_text.split(s), n = 0, r = 0; r < t.length; r++) e = n + t[r].length, this.$DocumentIterator_processBlock(n, e), n = e + s.length
}, i.prototype.$DocumentIterator_processBlock = function(e, t) {
"use strict";
this.$DocumentIterator_blockFn.call(null, e, t), this.$DocumentIterator_iterateSequence(this.$DocumentIterator_decorations, e, t, this.$DocumentIterator_processDecoration.bind(this))
}, i.prototype.$DocumentIterator_processDecoration = function(e, t, n) {
"use strict";
this.$DocumentIterator_decorationFn.call(null, e, t, n), this.$DocumentIterator_iterateSequence(this.$DocumentIterator_inlines, e, t, this.$DocumentIterator_processInline.bind(this))
}, i.prototype.$DocumentIterator_processInline = function(e, t, n) {
"use strict";
this.$DocumentIterator_inlineFn.call(null, e, t, n)
}, i.prototype.$DocumentIterator_iterateSequence = function(e, t, n, r) {
"use strict";
for (var o = t, i = t; n > i; i++) e[i] !== e[i + 1] && (r(o, i + 1, e[o]), o = i + 1);
t === n ? r(t, n, null) : o !== n && r(o, n, e[o])
}, o.exports = i
}), __d("DocumentOffsetCache", [], function(e, t, n, r, o) {
function i(e) {
return 0 > e ? 0 : e
}
function a() {
"use strict";
this.reset()
}
a.prototype.reset = function() {
"use strict";
this.$DocumentOffsetCache_block = -1, this.$DocumentOffsetCache_decoration = -1, this.$DocumentOffsetCache_leaf = -1, this.$DocumentOffsetCache_cachedOffsets = {}
}, a.prototype.nextBlock = function(e) {
"use strict";
this.$DocumentOffsetCache_block++, this.$DocumentOffsetCache_decoration = -1, this.$DocumentOffsetCache_leaf = -1, this.$DocumentOffsetCache_recordOffset(e)
}, a.prototype.nextDecoration = function(e) {
"use strict";
this.$DocumentOffsetCache_decoration++, this.$DocumentOffsetCache_leaf = -1, this.$DocumentOffsetCache_recordOffset(e)
}, a.prototype.nextLeaf = function(e) {
"use strict";
this.$DocumentOffsetCache_leaf++, this.$DocumentOffsetCache_recordOffset(e)
}, a.prototype.getCurrentKey = function() {
"use strict";
return i(this.$DocumentOffsetCache_block) + "." + i(this.$DocumentOffsetCache_decoration) + "." + i(this.$DocumentOffsetCache_leaf)
}, a.prototype.getOffset = function(e) {
"use strict";
return this.$DocumentOffsetCache_cachedOffsets[e]
}, a.prototype.getKey = function(e) {
"use strict";
var t = null,
n = null;
for (var r in this.$DocumentOffsetCache_cachedOffsets) {
var o = this.$DocumentOffsetCache_cachedOffsets[r],
i = e - o;
if (!(0 > i)) {
if (0 === i) return r;
(t > i || null === t) && (t = i, n = r)
}
}
return n
}, a.prototype.$DocumentOffsetCache_recordOffset = function(e) {
"use strict";
this.$DocumentOffsetCache_cachedOffsets[this.getCurrentKey()] = e
}, o.exports = a
}), __d("UnicodeBidi", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t = m.exec(e);
if (!t) return d.NEUTRAL;
var n = g.exec(t[0]);
return n ? d.RTL : d.LTR
}
function a(e, t) {
if (t = t || d.NEUTRAL, !e.length) return t;
var n = i(e);
return n === d.NEUTRAL ? t : n
}
function s(e, t) {
return t && d.isStrong(t) || (t = c.getDirection()), a(e, t)
}
function l(e, t) {
return s(e, t) === d.LTR
}
function u(e, t) {
return s(e, t) === d.RTL
}
var c = t("Locale"),
d = t("UnicodeBidiDirection"),
p = {
L: "A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-퟿-﬜︀-﹯﻽-￿",
R: "־׀׃׆א-תװ-ײ׳-״߀-߉ߊ-ߪߴ-ߵߺࠀ-ࠕࠚࠤࠨ࠰-࠾ࡀ-ࡘ࡞‏יִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﭏ",
AL: "؈؋؍؛؜؞-؟ؠ-ؿـف-ي٭ٮ-ٯٱ-ۓ۔ەۥ-ۦۮ-ۯۺ-ۼ۽-۾ۿ܀-܍܏ܐܒ-ܯݍ-ޥޱࢠࢢ-ࢬﭐ-ﮱ﮲-﯁ﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ﷼ﹰ-ﹴﹶ-ﻼ"
},
h = p.L + p.R + p.AL,
f = p.R + p.AL,
m = new RegExp("[" + h + "]"),
g = new RegExp("[" + f + "]"),
_ = {
firstStrongCharDir: i,
resolveBlockDir: a,
getDirection: s,
isDirectionLTR: l,
isDirectionRTL: u
};
o.exports = _
}), __d("Locale", [], function(e, t, n, r, o) {
function i() {
return u.canUseDOM ? void 0 === s && (s = "rtl" === l.get(document.body, "direction")) : s = !1, s
}
function a() {
return i() ? c.RTL : c.LTR
}
var s, l = t("Style"),
u = t("ExecutionEnvironment"),
c = t("UnicodeBidiDirection"),
d = {
isRTL: i,
getDirection: a
};
o.exports = d
}), __d("Style", [], function(e, t, n, r, o) {
"use strict";
o.exports = {}
}), __d("UnicodeBidiDirection", [], function(e, t, n, r, o) {
"use strict";
var i = t("keyMirror"),
a = i({
NEUTRAL: !0,
LTR: !0,
RTL: !0
});
a.isStrong = function(e) {
return e === a.LTR || e === a.RTL
}, o.exports = a
}), __d("createArrayFrom", [], function(e, t, n, r, o) {
function i(e) {
return !!e && ("object" == typeof e || "function" == typeof e) && "length" in e && !("setInterval" in e) && "number" != typeof e.nodeType && (Array.isArray(e) || "callee" in e || "item" in e)
}
function a(e) {
return i(e) ? Array.isArray(e) ? e.slice() : s(e) : [e]
}
var s = t("toArray");
o.exports = a
}), __d("toArray", [], function(e, t, n, r, o) {
function i(e) {
var t = e.length;
if ((Array.isArray(e) || "object" != typeof e && "function" != typeof e) && a(0, "toArray: Array-like object expected"), "number" != typeof t && a(0, "toArray: Object needs a length property"), 0 === t || t - 1 in e || a(0, "toArray: Object should have keys for indices"), e.hasOwnProperty) try {
return Array.prototype.slice.call(e)
} catch (n) {}
for (var r = Array(t), o = 0; t > o; o++) r[o] = e[o];
return r
}
var a = t("invariant");
o.exports = i
}), __d("TextEditorBlock.react", [], function(e, t, n, r, o) {
var i = t("UnicodeBidiDirection"),
a = t("ReactPropTypes"),
s = t("React"),
l = t("Text"),
u = (t("cx"), t("joinClasses"), t("mergeInto")),
c = i.LTR,
d = i.RTL,
p = s.createClass({
displayName: "TextEditorBlock",
propTypes: {
offsetKey: a.string.isRequired,
text: a.string.isRequired,
blockProps: a.object,
blockStyleFn: a.func.isRequired,
style: a.number,
direction: a.string.isRequired
},
render: function() {
var e = this.props.direction === d,
t = this.props.direction === c,
n = e ? "right" : t ? "left" : "auto",
r = e ? "rtl" : t ? "ltr" : "auto",
o = {
style: [this.props.style, {
writingDirection: r,
textAlign: n
}]
};
return u(o, this.props.blockProps), s.createElement(l, Object.assign({}, o), this.props.children)
}
});
o.exports = p
}), __d("cx", [], function(e, t, n, r, o) {
function i(e) {
return "object" == typeof e ? Object.keys(e).filter(function(t) {
return e[t]
}).join(" ") : Array.prototype.join.call(arguments, " ")
}
o.exports = i
}), __d("TextEditorCompositionHandler", [], function(e, t, n, r, o) {
var i = t("Keys"),
a = t("isSelectionAtLeafStart"),
s = {
onBeforeInput: function(e) {
this._textInputData = (this._textInputData || "") + e.data
},
onCompositionStart: function() {
this._compositionState.continueSession()
},
onCompositionEnd: function() {
this._compositionState.pauseSession(), setTimeout(s.resolveComposition.bind(this), 0)
},
onKeyDown: function(e) {
(e.which === i.RIGHT || e.which === i.LEFT) && e.preventDefault()
},
onKeyPress: function(e) {
e.which === i.RETURN && e.preventDefault()
},
resolveComposition: function() {
if (!this._compositionState.inCompositionSession()) {
var e = this._textInputData;
this._textInputData = "", this._compositionState.terminateSession();
var t = !e || a(this.props.documentView, this.props.selectionState);
t && this.restoreEditorDOM(), this.exitCurrentMode(), this.removeRenderGuard(), e ? this.props.onCharacters(e) : t && (this.resetRenderedVersion(), this.forceUpdate())
}
}
};
o.exports = s
}), __d("Keys", [], function(e, t, n, r, o) {
o.exports = {
BACKSPACE: 8,
TAB: 9,
RETURN: 13,
ALT: 18,
ESC: 27,
SPACE: 32,
PAGE_UP: 33,
PAGE_DOWN: 34,
END: 35,
HOME: 36,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
DELETE: 46,
COMMA: 188
}
}), __d("isSelectionAtLeafStart", [], function(e, t, n, r, o) {
function i(e, t) {
var n = t.getStartOffset(),
r = e.getKey(n);
return e.getOffset(r) === n
}
o.exports = i
}), __d("TextEditorCompositionState", [], function(e, t, n, r, o) {
function i(e) {
"use strict";
this.$TextEditorCompositionState_composing = e
}
var a = t("mixInEventEmitter");
i.prototype.startSession = function() {
"use strict";
this.$TextEditorCompositionState_composing = !0, this.emit("change")
}, i.prototype.continueSession = function() {
"use strict";
this.$TextEditorCompositionState_composing = !0
}, i.prototype.pauseSession = function() {
"use strict";
this.$TextEditorCompositionState_composing = !1
}, i.prototype.terminateSession = function() {
"use strict";
this.$TextEditorCompositionState_composing = !1, this.emit("change")
}, i.prototype.inCompositionSession = function() {
"use strict";
return this.$TextEditorCompositionState_composing
}, a(i, {
change: !0
}), o.exports = i
}), __d("TextEditorEditHandler", [], function(e, t, n, r, o) {
function i(e) {
return w && (e == v || e == S)
}
function a(e, t) {
var n = e.selectionState;
if (!n.isCollapsed()) {
var r = n.getStartOffset(),
o = n.getEndOffset();
t(e.documentView.getFragment(r, o), r, o)
}
}
var s = t("DataTransfer"),
l = t("DocumentCharacters"),
u = t("Keys"),
c = t("TextEditorModes"),
d = t("TextEditorPasteHandler"),
p = t("UserAgent"),
h = t("findAncestorOffsetKey"),
f = t("getChangedCharactersFromMutation"),
m = t("getDocumentSelection"),
g = t("isSelectionAtLeafStart"),
_ = l.BLOCK_DELIMITER,
y = l.SOFT_NEWLINE,
v = "'",
S = "/",
w = !!p.firefox(),
b = {
onBeforeInput: function(e) {
var t = e.data;
if (t) {
var n = this.props.documentView,
r = this.props.selectionState;
if (r.isCollapsed() && !g(n, r)) {
var o = n.getFingerprint();
if (this.props.onCharacters(t), !i(t) && o === n.getFingerprint()) return void this.expectDuplicateMutation()
} else this.props.onCharacters(t);
e.preventDefault()
}
},
onKeyDown: function(e) {
var t = e.nativeEvent.keyCode;
switch (t) {
case u.RETURN:
return e.preventDefault(), void this.props.onReturn(e);
case u.ESC:
return e.preventDefault(), void(this.props.onEscape && this.props.onEscape(e));
case u.TAB:
return void(this.props.onTab && this.props.onTab(e));
case u.UP:
return void(this.props.onUpArrow && this.props.onUpArrow(e));
case u.DOWN:
return void(this.props.onDownArrow && this.props.onDownArrow(e))
}
var n = this.props.keyBindingFn.call(null, e);
n && (e.preventDefault(), this.props.onKeyCommand(n))
},
normalizeAndHandleSelect: function(e, t, n, r, o) {
null !== e && null !== t && (t += this.props.documentView.getOffset(e)), null !== n && null !== r && (r += this.props.documentView.getOffset(n)), t && o && this.resetRenderedVersion(), this.props.onSelect(t, r, !!o)
},
onSelect: function() {
m(this.refs.editorContainer.getDOMNode().firstChild, b.normalizeAndHandleSelect.bind(this))
},
onBlur: function(e) {
this.props.onBlur(e)
},
onFocus: function(e) {
this.props.onFocus(e)
},
onCharacterData: function(e) {
var t = f(e);
if (t) {
var n = h(t.node),
r = this.props.documentView.getOffset(n);
this.props.onAlter(r + t.offset, t.oldText, t.newText)
}
},
onDragStart: function() {
this._internalDrag = !0, this.setMode(c.DRAG)
},
onDragOver: function(e) {
this._internalDrag = !1, this.setMode(c.DRAG), e.preventDefault()
},
onCompositionStart: function() {
this.setRenderGuard(), this.captureEditorDOM(), this.setMode(c.COMPOSITE), this._compositionState.startSession()
},
onCut: function(e) {
return this.props.selectionState.isCollapsed() ? void e.preventDefault() : (this.setRenderGuard(), this.captureEditorDOM(), void a(this.props, function(e, t, n) {
this._clipboard = e, this.setMode(c.CUT), setTimeout(function() {
this.restoreEditorDOM(), this.removeRenderGuard(), this.exitCurrentMode(), this.props.onCut(t, n)
}.bind(this), 0)
}.bind(this)))
},
onCopy: function() {
a(this.props, function(e) {
this._clipboard = e
}.bind(this))
},
onPaste: function(e) {
e.preventDefault();
var t = new s(e.clipboardData);
if (!t.isRichText()) {
var n = t.getFiles();
if (n.length > 0) return void(this.props.onPasteFiles && this.props.onPasteFiles(n))
}
var r = t.getText();
if (r && (r = r.replace(new RegExp(y, "g"), _)), this._clipboard && r === this._clipboard.text) return void this.props.onPasteFragment(this._clipboard);
var o = t.getHTML();
if (o) {
var i = d.processHTML(o);
if (i) return void this.props.onPasteFragment(i)
}
this._clipboard = null, this.props.onPasteFragment(d.processText(r))
}
};
o.exports = b
}), __d("DataTransfer", [], function(e, t, n, r, o) {
function i(e) {
return "file" == e.kind ? e.getAsFile() : void 0
}
function a(e) {
"use strict";
this.data = e, this.types = e.types ? l(e.types) : []
}
var s = t("PhotosMimeType"),
l = t("createArrayFrom"),
u = t("emptyFunction"),
c = new RegExp("\r\n", "g"),
d = "\n",
p = {
"text/rtf": 1,
"text/html": 1
};
a.prototype.isRichText = function() {
"use strict";
return this.types.some(function(e) {
return p[e]
})
}, a.prototype.getText = function() {
"use strict";
var e;
return this.data.getData && (this.types.length ? -1 != this.types.indexOf("text/plain") && (e = this.data.getData("text/plain")) : e = this.data.getData("Text")), e ? e.replace(c, d) : null
}, a.prototype.getHTML = function() {
"use strict";
if (this.data.getData) {
if (!this.types.length) return this.data.getData("Text");
if (-1 != this.types.indexOf("text/html")) return this.data.getData("text/html")
}
}, a.prototype.isImage = function() {
"use strict";
var e = this.types.some(function(e) {
return -1 != e.indexOf("application/x-moz-file")
});
if (e) return !0;
for (var t = this.getFiles(), n = 0; n < t.length; n++) {
var r = t[n].type;
if (!s(r).isImage()) return !1
}
return !0
}, a.prototype.getCount = function() {
"use strict";
return this.data.hasOwnProperty("items") ? this.data.items.length : this.data.hasOwnProperty("mozItemCount") ? this.data.mozItemCount : this.data.files ? this.data.files.length : null
}, a.prototype.getFiles = function() {
"use strict";
return this.data.items ? Array.prototype.slice.call(this.data.items).map(i).filter(u.thatReturnsArgument) : this.data.files ? Array.prototype.slice.call(this.data.files) : []
}, a.prototype.hasFiles = function() {
"use strict";
return this.getFiles().length > 0
}, o.exports = a
}), __d("PhotosMimeType", [], function(e, t, n, r, o) {
function i(e) {
"use strict";
return this instanceof i == !1 ? new i(e) : void(this.$PhotosMimeType_parts = e.split("/"))
}
i.prototype.isImage = function() {
"use strict";
return "image" === this.$PhotosMimeType_parts[0]
}, i.prototype.isJpeg = function() {
"use strict";
return this.isImage() && ("jpeg" === this.$PhotosMimeType_parts[1] || "pjpeg" === this.$PhotosMimeType_parts[1])
}, o.exports = i
}), __d("TextEditorModes", [], function(e, t, n, r, o) {
var i = {
EDIT: 0,
COMPOSITE: 1,
DRAG: 2,
RENDER: 3,
CUT: 4
};
o.exports = i
}), __d("TextEditorPasteHandler", [], function(e, t, n, r, o) {
function i() {
return {
text: "",
inlines: [],
blocks: []
}
}
function a() {
return {
text: y,
inlines: [d.NONE],
blocks: []
}
}
function s() {
return {
text: _,
inlines: [d.NONE],
blocks: []
}
}
function l(e) {
return {
text: m,
inlines: [d.NONE],
blocks: [e]
}
}
var u = t("DocumentCharacters"),
c = t("ComposedBlockType"),
d = t("ComposedInlineStyle"),
p = t("arrayContains"),
h = t("fillArray"),
f = t("getSafeBodyFromHTML"),
m = u.BLOCK_DELIMITER,
g = "&nbsp;",
_ = u.SOFT_NEWLINE,
y = " ",
v = c.UNSTYLED,
S = ["p", "h1", "h2", "h3", "li", "blockquote"],
w = {
strong: d.BOLD,
b: d.BOLD,
em: d.ITALIC,
i: d.ITALIC,
u: d.UNDERLINE
},
b = {
processBlockTag: function(e, t) {
switch (e) {
case "h1":
return c.HEADER_ONE;
case "h2":
return c.HEADER_TWO;
case "li":
return "ol" === t ? c.ORDERED_LIST_ITEM : c.UNORDERED_LIST_ITEM;
case "blockquote":
return c.BLOCKQUOTE;
default:
return c.UNSTYLED
}
},
processInlineTag: function(e, t) {
var n = w[e],
r = !!(t & n);
return n && !r && (t += n), t
},
joinChunks: function(e, t) {
return e.text.slice(-1) === m && t.text.slice(0, 1) === m && (e.text = e.text.slice(0, -1), e.inlines.pop(), e.blocks.pop()), e.text.slice(-1) !== m || t.text !== y && t.text !== _ ? {
text: e.text + t.text,
inlines: e.inlines.concat(t.inlines),
blocks: e.blocks.concat(t.blocks)
} : e
},
genFragment: function(e, t, n, r, o) {
var u = e.nodeName.toLowerCase(),
c = !1;
if ("#text" === u) {
var d = e.textContent;
return "" === d.trim() ? a() : {
text: d,
inlines: h(d.length, t),
blocks: []
}
}
if ("br" === u) return s();
var f, m = i();
for (t = this.processInlineTag(u, t), ("ul" === u || "ol" === u) && (n = u), !r && p(o, u) && (m = l(this.processBlockTag(u, n)), r = !0, c = !0), e = e.firstChild; e;) f = this.genFragment(e, t, n, r, o), m = this.joinChunks(m, f), e = e.nextSibling;
return c && (m = this.joinChunks(m, l(v))), m
},
containsSemanticBlockMarkup: function(e) {
return S.some(function(t) {
return -1 !== e.indexOf("<" + t)
})
},
processHTML: function(e) {
e = e.trim().split(m).join("").split(_).join(y).split(g).join(y);
var t = f(e);
if (!t) return null;
var n = this.containsSemanticBlockMarkup(e) ? S : ["div"],
r = this.genFragment(t, 0, "ul", !1, n);
return 0 === r.text.indexOf(m) && (r = {
text: r.text.slice(1),
inlines: r.inlines.slice(1),
blocks: r.blocks
}), r.text.slice(-1) === m && (r.text = r.text.slice(0, -1), r.inlines = r.inlines.slice(0, -1), r.blocks.pop()), 0 === r.blocks.length && r.blocks.push(v), r.text.split(m).length === r.blocks.length + 1 && r.blocks.unshift(v), r
},
processText: function(e) {
return {
text: e,
inlines: h(e.length, d.NONE),
blocks: h(e.split(m).length, v)
}
}
};
o.exports = b
}), __d("arrayContains", [], function(e, t, n, r, o) {
function i(e, t) {
return -1 != e.indexOf(t)
}
o.exports = i
}), __d("getSafeBodyFromHTML", [], function(e, t, n, r, o) {
function i(e) {
var t, n = null;
return document.implementation && document.implementation.createHTMLDocument && (t = document.implementation.createHTMLDocument("foo"), t.documentElement.innerHTML = e, n = t.getElementsByTagName("body")[0]), n
}
o.exports = i
}), __d("UserAgent", [], function(e, t, n, r, o) {
function i() {
if (!w && (w = !0, "undefined" != typeof navigator)) {
var e = navigator.userAgent,
t = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),
n = /(Mac OS X)|(Windows)|(Linux)/.exec(e);
if (_ = /\b(iPhone|iP[ao]d)/.exec(e), y = /\b(iP[ao]d)/.exec(e), m = /Android/i.exec(e), v = /FBAN\/\w+;/i.exec(e), S = /Mobile/i.exec(e), g = !!/Win64/.exec(e), t) {
a = t[1] ? parseFloat(t[1]) : t[5] ? parseFloat(t[5]) : 0 / 0, a && document && document.documentMode && (a = document.documentMode);
var r = /(?:Trident\/(\d+.\d+))/.exec(e);
d = r ? parseFloat(r[1]) + 4 : a, s = t[2] ? parseFloat(t[2]) : 0 / 0, l = t[3] ? parseFloat(t[3]) : 0 / 0, u = t[4] ? parseFloat(t[4]) : 0 / 0, u ? (t = /(?:Chrome\/(\d+\.\d+))/.exec(e), c = t && t[1] ? parseFloat(t[1]) : 0 / 0) : c = 0 / 0
} else a = s = l = c = u = 0 / 0;
if (n) {
if (n[1]) {
var o = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);
p = o ? parseFloat(o[1].replace("_", ".")) : !0
} else p = !1;
h = !!n[2], f = !!n[3]
} else p = h = f = !1
}
}
var a, s, l, u, c, d, p, h, f, m, g, _, y, v, S, w = !1,
b = {
ie: function() {
return i() || a
},
ieCompatibilityMode: function() {
return i() || d > a
},
ie64: function() {
return b.ie() && g
},
firefox: function() {
return i() || s
},
opera: function() {
return i() || l
},
webkit: function() {
return i() || u
},
safari: function() {
return b.webkit()
},
chrome: function() {
return i() || c
},
windows: function() {
return i() || h
},
osx: function() {
return i() || p
},
linux: function() {
return i() || f
},
iphone: function() {
return i() || _
},
mobile: function() {
return i() || _ || y || m || S
},
nativeApp: function() {
return i() || v
},
android: function() {
return i() || m
},
ipad: function() {
return i() || y
}
};
o.exports = b
}), __d("findAncestorOffsetKey", [], function(e, t, n, r, o) {
function i(e) {
for (; e && e !== document.documentElement;) {
var t = a(e);
if (null != t) return t;
e = e.parentNode
}
return null
}
var a = t("getSelectionOffsetKeyForNode");
o.exports = i
}), __d("getSelectionOffsetKeyForNode", [], function(e, t, n, r, o) {
function i(e) {
return e.getAttribute && e.getAttribute("data-offset-key")
}
o.exports = i
}), __d("getChangedCharactersFromMutation", [], function(e, t, n, r, o) {
function i(e, t) {
var n, r = Math.min(e.length, t.length),
o = r,
i = r;
for (n = 0; r > n; n++)
if (e.charAt(n) !== t.charAt(n)) {
o = n;
break
}
for (n = 0; r > n; n++)
if (e.charAt(e.length - n - 1) !== t.charAt(t.length - n - 1)) {
i = n;
break
}
return {
prefix: o,
suffix: i
}
}
function a(e, t, n) {
for (var r = 0; n > r; r++) t.charAt(e.prefix - 1).match(/^\s?$/) ? e.suffix-- : e.prefix--
}
function s(e, t) {
return e.substr(t.prefix, e.length - t.prefix - t.suffix)
}
function l(e) {
var t, n;
if (3 === e.length) t = e[1], n = e[2];
else {
if (2 !== e.length) return;
t = e[0], n = e[1]
}
if (t.target === n.target) {
var r = t.oldValue,
o = n.oldValue,
l = n.target.data;
if (l !== r && l.length > o.length && r.length > o.length) {
var u = i(r, o),
c = i(l, o),
d = u.prefix < c.prefix ? u : c,
p = r.length - d.prefix - d.suffix,
h = r.length - o.length;
return a(d, r, h - p), {
node: n.target,
offset: d.prefix,
oldText: s(r, d),
newText: s(l, d)
}
}
}
}
o.exports = l
}), __d("getDocumentSelection", [], function(e, t, n, r, o) {
function i(e) {
for (; e.firstChild && m(e.firstChild);) e = e.firstChild;
return e
}
function a(e) {
for (; e.lastChild && m(e.lastChild);) e = e.lastChild;
return e
}
function s(e, t) {
var n = document.selection,
r = n.createRange(),
o = r.text,
i = l(e, r, _),
a = i;
null !== i && o.length > 0 && (a = l(e, r, y)), i && a ? t(i.key, i.offset, a.key, a.offset) : t(null, null, null, null)
}
function l(e, t, n) {
for (var r = t.duplicate(), o = function(e) {
return r.moveToElementText(e), u(r, t, n)
}; e && e.childNodes;) {
var i = h(e.childNodes, o);
if (-1 === i) break;
e = e.childNodes[i];
var a = m(e);
if (null !== a) return r.moveToElementText(e), r.setEndPoint("EndTo" + n, t), {
key: a,
offset: r.text.length
}
}
return null
}
function u(e, t, n) {
return 1 == e.compareEndPoints("StartTo" + n, t) ? 1 : -1 == e.compareEndPoints("EndTo" + n, t) ? -1 : 0
}
function c(e, t, n) {
var r = f(t);
if (null == r && e !== t && g(0, "Unknown node in selection range."), 0 === n) return {
key: r || m(i(t)),
offset: 0
};
var o, s, l = t.childNodes[n - 1];
if (m(l)) {
var u = a(l);
o = m(u), s = u.textContent.length
} else o = r, s = l.textContent.length;
return {
key: o,
offset: s
}
}
function d(t, n) {
var r = e.getSelection();
if (0 === r.rangeCount) return void n(null, null, null, null);
var o = r.anchorNode,
i = r.focusNode,
a = r.anchorOffset,
s = r.focusOffset,
l = o.nodeType === Node.TEXT_NODE,
u = i.nodeType === Node.TEXT_NODE;
if (l && u) return void n(f(o), a, f(i), s);
var d = null,
p = null;
l ? (d = {
key: f(o),
offset: a
}, p = c(t, i, s)) : u ? (p = {
key: f(i),
offset: s
}, d = c(t, o, a)) : (d = c(t, o, a), p = c(t, i, s)), n(d.key, d.offset, p.key, p.offset, !0)
}
function p(e, t) {
document.selection ? s(e, t) : d(e, t)
}
var h = t("binarySearch"),
f = t("findAncestorOffsetKey"),
m = t("getSelectionOffsetKeyForNode"),
g = t("invariant"),
_ = "Start",
y = "End";
o.exports = p
}), __d("binarySearch", [], function(e, t, n, r, o) {
function i(e, t) {
if (__DEV__ && "number" != typeof e.length) throw new TypeError("binarySearch() must be passed array-like object.");
for (var n = 0, r = e.length - 1; r >= n;) {
var o = Math.floor((r + n) / 2),
i = t(e[o], o);
if (0 === i) return o;
i > 0 ? r = o - 1 : n = o + 1
}
return -1
}
o.exports = i
}), __d("TextEditorDragHandler", [], function(e, t, n, r, o) {
function i(e, t) {
var n, r;
if (document.caretRangeFromPoint) {
var o = document.caretRangeFromPoint(t.x, t.y);
n = o.startContainer, r = o.startOffset
} else t.rangeParent && (n = t.rangeParent, r = t.rangeOffset);
if (n) {
var i = document.createRange();
i.setStart(e, 0), i.setEnd(n, r);
var a = i.toString().length;
return i.detach(), a
}
}
var a = t("DataTransfer"),
s = {
onDragEnd: function() {
this.exitCurrentMode()
},
onDrop: function(e) {
var t = new a(e.nativeEvent.dataTransfer),
n = i(this.refs.editorContainer.getDOMNode(), e.nativeEvent);
if (null != n) {
var r = t.getFiles();
this.props.onDropFiles && r.length > 0 ? this.props.onDropFiles(n, r) : this._internalDrag ? this.props.onDropSelection(n) : this.props.onDropText(n, t.getText())
}
e.preventDefault(), this.exitCurrentMode()
}
};
o.exports = s
}), __d("TextInput", [], function(e, t, n, r, o) {
"use strict";
var i = t("DocumentSelectionState"),
a = t("NativeMethodsMixin"),
s = t("NativeModulesDeprecated"),
l = t("ReactPropTypes"),
u = t("React"),
c = t("ReactChildren"),
d = t("ReactIOSViewAttributes"),
p = t("StyleSheet"),
h = t("Text"),
f = t("TextInputState"),
m = t("TimerMixin"),
g = t("TouchableWithoutFeedback"),
_ = t("createReactIOSNativeComponentClass"),
y = t("invariant"),
v = t("merge"),
S = s.RKUIManager.UIText.AutocapitalizationType,
w = {
none: S.None,
sentences: S.Sentences,
words: S.Words,
characters: S.AllCharacters
},
b = v(d.UIView, {
autoCorrect: !0,
autoCapitalize: !0,
color: !0,
editable: !0,
fontSize: !0,
fontWeight: !0,
keyboardType: !0,
mostRecentEventCounter: !0,
placeholder: !0,
placeholderTextColor: !0,
text: !0
}),
R = v(b, {
caretHidden: !0,
enabled: !0
}),
C = u.createClass({
displayName: "TextInput",
propTypes: {
autoCapitalize: l.oneOf(Object.keys(w)),
autoCorrect: l.bool,
autoFocus: l.bool,
editable: l.bool,
keyboardType: l.oneOf(["default", "numeric"]),
multiline: l.bool,
onBlur: l.func,
onFocus: l.func,
onChange: l.func,
onEndEditing: l.func,
onSubmitEditing: l.func,
placeholder: l.string,
placeholderTextColor: l.string,
selectionState: l.instanceOf(i),
color: l.string,
value: l.string,
style: h.stylePropType,
inputView: l.renderable
},
mixins: [a, m],
viewConfig: {
uiViewClassName: "RKTextField",
validAttributes: R
},
getInitialState: function() {
return {
contentSize: {
width: 0,
height: 0
},
mostRecentEventCounter: 0
}
},
onFocus: function(e) {
this.props.onFocus && this.props.onFocus(e)
},
handleOnPress: function() {
this.focus()
},
componentDidMount: function() {
this.props.autoFocus && this.requestAnimationFrame(this.focus)
},
isFocused: function() {
return f.currentlyFocusedField() === this.getNativeNode()
},
onChange: function(e) {
this.props.onChange && this.props.onChange(e)
},
onBlur: function(e) {
this.blur(), this.props.onBlur && this.props.onBlur(e)
},
onSelectionChange: function(e) {
if (this.props.selectionState) {
var t = e.nativeEvent.selection;
this.props.selectionState.update(t.start, t.end)
}
this.props.onSelectionChange && this.props.onSelectionChange(e)
},
onTextInput: function(e) {
this.props.onTextInput && this.props.onTextInput(e);
var t = e.nativeEvent.eventCounter;
t > this.state.mostRecentEventCounter && this.setState({
mostRecentEventCounter: t
})
},
render: function() {
var e;
if (this.props.multiline) {
this.props.onSubmitEditing && console.error("onSubmitEditing event is not supported with the multiline property");
var t = this.props.children,
n = 0;
c.forEach(t, function() {
return ++n
}), this.props.value && n && y(0, "Cannot specify both value and children."), n > 1 && (t = u.createElement(h, null, t)), this.props.inputView && (t = [t, this.props.inputView]), e = u.createElement(D, {
style: [E.input, this.props.style],
children: t,
mostRecentEventCounter: this.state.mostRecentEventCounter,
editable: this.props.editable,
onFocus: this.onFocus,
onBlur: this.onBlur,
onChange: this.onChange,
onEndEditing: this.props.onEndEditing,
onSelectionChange: this.onSelectionChange,
onTextInput: this.onTextInput,
placeholder: this.props.placeholder,
placeholderTextColor: this.props.placeholderTextColor,
text: this.props.value,
autoCapitalize: w[this.props.autoCapitalize],
autoCorrect: this.props.autoCorrect
})
} else e = u.createElement(x, {
style: [E.input, this.props.style],
enabled: this.props.editable,
keyboardType: this.props.keyboardType,
onFocus: this.onFocus,
onBlur: this.onBlur,
onChange: this.onChange,
onEndEditing: this.props.onEndEditing,
onSelectionChange: this.onSelectionChange,
onSubmitEditing: this.props.onSubmitEditing,
onTextInput: this.onTextInput,
placeholder: this.props.placeholder,
text: this.props.value,
autoCapitalize: w[this.props.autoCapitalize],
autoCorrect: this.props.autoCorrect
});
return u.createElement(g, {
onPress: this.handleOnPress
}, e)
}
}),
E = p.create({
input: {
alignSelf: "stretch"
}
}),
D = _({
validAttributes: b,
uiViewClassName: "RKTextView"
}),
x = _({
validAttributes: R,
uiViewClassName: "RKTextField"
});
o.exports = C
}), __d("ReactChildren", [], function(e, t, n, r, o) {
"use strict";
function i(e, t) {
this.forEachFunction = e, this.forEachContext = t
}
function a(e, t, n, r) {
var o = e;
o.forEachFunction.call(o.forEachContext, t, r)
}
function s(e, t, n) {
if (null == e) return e;
var r = i.getPooled(t, n);
f(e, a, r), i.release(r)
}
function l(e, t, n) {
this.mapResult = e, this.mapFunction = t, this.mapContext = n
}
function u(e, t, n, r) {
var o = e,
i = o.mapResult,
a = !i.hasOwnProperty(n);
if (m(a, "ReactChildren.map(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.", n), a) {
var s = o.mapFunction.call(o.mapContext, t, r);
i[n] = s
}
}
function c(e, t, n) {
if (null == e) return e;
var r = {},
o = l.getPooled(r, t, n);
return f(e, u, o), l.release(o), r
}
function d() {
return null
}
function p(e) {
return f(e, d, null)
}
var h = t("PooledClass"),
f = t("traverseAllChildren"),
m = t("warning"),
g = h.twoArgumentPooler,
_ = h.threeArgumentPooler;
h.addPoolingTo(i, g), h.addPoolingTo(l, _);
var y = {
forEach: s,
map: c,
count: p
};
o.exports = y
}), __d("TouchableWithoutFeedback", [], function(e, t, n, r, o) {
"use strict";
var i = t("React"),
a = t("Touchable"),
s = (t("View"), t("copyProperties")),
l = t("onlyChild"),
u = {
top: 20,
left: 20,
right: 20,
bottom: 30
},
c = i.createClass({
displayName: "TouchableWithoutFeedback",
mixins: [a.Mixin],
propTypes: {
onPress: i.PropTypes.func,
onPressIn: i.PropTypes.func,
onPressOut: i.PropTypes.func,
onLongPress: i.PropTypes.func
},
getInitialState: function() {
return this.touchableGetInitialState()
},
touchableHandlePress: function(e) {
this.props.onPress && this.props.onPress(e)
},
touchableHandleActivePressIn: function() {
this.props.onPressIn && this.props.onPressIn()
},
touchableHandleActivePressOut: function() {
this.props.onPressOut && this.props.onPressOut()
},
touchableHandleLongPress: function() {
this.props.onLongPress && this.props.onLongPress()
},
touchableGetPressRectOffset: function() {
return u
},
touchableGetHighlightDelayMS: function() {
return 0
},
render: function() {
var e = l(this.props.children);
return s(e.props, {
accessible: !0,
testID: this.props.testID,
onStartShouldSetResponder: this.touchableHandleStartShouldSetResponder,
onResponderTerminationRequest: this.touchableHandleResponderTerminationRequest,
onResponderGrant: this.touchableHandleResponderGrant,
onResponderMove: this.touchableHandleResponderMove,
onResponderRelease: this.touchableHandleResponderRelease,
onResponderTerminate: this.touchableHandleResponderTerminate
}), e
}
});
o.exports = c
}), __d("requestAnimationFrame", [], function(e, t, n, r, o) {
var i = t("emptyFunction"),
a = t("nativeRequestAnimationFrame"),
s = 0,
l = a || function(t) {
var n = Date.now(),
r = Math.max(0, 16 - (n - s));
return s = n + r, e.setTimeout(function() {
t(Date.now())
}, r)
};
l(i), o.exports = l
}), __d("nativeRequestAnimationFrame", [], function(e, t, n, r, o) {
var i = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame;
o.exports = i
}), __d("ModalFullscreenView", [], function(e, t, n, r, o) {
"use strict";
var i = t("NativeModulesDeprecated"),
a = t("React"),
s = t("ReactIOSViewAttributes"),
l = t("RKDimensions"),
u = t("StyleSheet"),
c = t("createReactIOSNativeComponentClass"),
d = c({
validAttributes: s.UIView,
uiViewClassName: "RKModalFullscreenView"
}),
p = u.create({
modalContainer: {
backgroundColor: "transparent",
position: "absolute",
left: 0,
top: 0,
right: 0,
bottom: 0
}
}),
h = a.createClass({
displayName: "ModalFullscreenView",
statics: {
width: l.get("modalFullscreenView").width,
height: l.get("modalFullscreenView").height,
style: p.modalContainer
},
getInitialState: function() {
return {
isOpen: !1
}
},
open: function() {
this.state.isOpen || (this.setState({
isOpen: !0
}), i.RKModalFullscreenViewManager.open())
},
close: function() {
this.state.isOpen && (this.setState({
isOpen: !1
}), i.RKModalFullscreenViewManager.close())
},
render: function() {
var e = {
position: "absolute",
left: 0,
top: 0,
width: l.get("modalFullscreenView").width,
height: l.get("modalFullscreenView").height
};
return a.createElement(d, {
style: e,
onStartShouldSetResponder: this._shouldSetResponder
}, this.props.children)
},
_shouldSetResponder: function() {
return !0
}
});
o.exports = h
}), __d("getMentionableRect", [], function(e, t, n, r, o) {
"use strict";
o.exports = function() {
return null
}
}), __d("TypeaheadNavigation", [], function(e, t, n, r, o) {
var i = {
moveUp: function(e, t, n) {
var r = e.indexOf(t),
o = -1 == r ? e.length - 1 : r - 1;
n(-1 == o ? null : e[o])
},
moveDown: function(e, t, n) {
var r = e.indexOf(t) + 1;
n(r == e.length ? null : e[r])
}
};
o.exports = i
}), __d("DocumentCompositeDecorator", [], function(e, t, n, r, o) {
function i(e) {
"use strict";
this.$DocumentCompositeDecorator_decorators = e.slice(), this.$DocumentCompositeDecorator_componentMap = {}
}
function a(e, t, n) {
for (var r = t; n > r; r++)
if (null != e[r]) return !1;
return !0
}
function s(e, t, n, r) {
for (var o = t; n > o; o++) e[o] = r
}
var l = t("fillArray");
i.prototype.getDecorations = function(e) {
"use strict";
var t = l(e.getText().length, null),
n = 0,
r = this.$DocumentCompositeDecorator_componentMap;
return this.$DocumentCompositeDecorator_decorators.forEach(function(o) {
var i = o.getStrategy(),
l = o.getComponent();
i(e, function(e, o) {
a(t, e, o) && (r[n] = l, s(t, e, o, n), n++)
})
}), t
}, i.prototype.getComponentForKey = function(e) {
"use strict";
return this.$DocumentCompositeDecorator_componentMap[e]
}, o.exports = i
}), __d("DocumentDecorator", [], function(e, t, n, r, o) {
function i(e, t) {
"use strict";
this.$DocumentDecorator_strategy = e, this.$DocumentDecorator_component = t
}
i.prototype.getStrategy = function() {
"use strict";
return this.$DocumentDecorator_strategy
}, i.prototype.getComponent = function() {
"use strict";
return this.$DocumentDecorator_component
}, o.exports = i
}), __d("ComposedEntityType", [], function(e, t, n, r, o) {
"use strict";
var i = {
MENTION: 0,
LINK: 1,
IMAGE: 2,
VIDEO: 3
};
o.exports = i
}), __d("MentionSpan", [], function(e, t, n, r, o) {
"use strict";
var i = t("React"),
a = t("StyleSheet"),
s = t("Text"),
l = i.createClass({
displayName: "MentionSpan",
render: function() {
return i.createElement(s, {
style: u.text
}, this.props.children)
}
}),
u = a.create({
text: {
backgroundColor: "#ccddff"
}
});
o.exports = l
}), __d("MentionsTextEditorMixin", [], function(e, t, n, r, o) {
function i(e, t, n) {
for (var r = n; r <= t.length; r++) e.substr(-r) == t.substr(0, r) && (n = r);
return n
}
function a(e) {
var t = "user" === e.getType().toLowerCase() ? c.SEGMENTED : c.IMMUTABLE,
n = e.getAuxiliaryData();
return l.create(u.MENTION, t, {
id: e.getUniqueID(),
isWeak: n && "non_member" === n.renderType
})
}
var s = t("BaseTextEditorMixin"),
l = t("DocumentEntity"),
u = t("ComposedEntityType"),
c = t("ComposedEntityMutability"),
d = t("DocumentModifier"),
p = t("getCurrentInlineStyle"),
h = t("merge"),
f = {
onShowMentions: function(e, t) {
this._mentionOffset = t, this.props.onShowMentions && this.props.onShowMentions(e, t)
},
onAddMention: function(e, t) {
var n = this.props.selectionState,
r = n.getStartOffset(),
o = r - i(this.props.documentContent.getText().substr(0, r), e.getTitle(), this._mentionOffset);
d.replaceText(this.props.documentContent, e.getTitle(), p(this.props.documentContent, n), a(e), o, r, this.updateDocumentAndCollapseSelection), this.props.onAddMention && this.props.onAddMention(e, t)
}
},
m = h(s, f);
o.exports = m
}), __d("BaseTextEditorMixin", [], function(e, t, n, r, o) {
var i = t("DocumentCharacters"),
a = t("DocumentCommands"),
s = t("DocumentModifier"),
l = t("DocumentRemovableWord"),
u = t("emptyFunction"),
c = t("getActiveElement"),
d = t("getCurrentInlineStyle"),
p = t("getCurrentInlineStyleForOffset"),
h = t("getTextContentFromFiles"),
f = i.BLOCK_DELIMITER,
m = i.SOFT_NEWLINE,
g = {
getHandlerForCommand: function(e) {
switch (e) {
case a.UNDO:
return this.undo;
case a.REDO:
return this.redo;
case a.DELETE:
return this.onDelete;
case a.DELETE_WORD:
return this.onDeleteWord;
case a.DELETE_TO_END_OF_BLOCK:
return this.onDeleteToEndOfBlock;
case a.BACKSPACE:
return this.onBackspace;
case a.BACKSPACE_WORD:
return this.onBackspaceWord;
case a.BACKSPACE_TO_END_OF_BLOCK:
return this.onBackspaceToEndOfBlock;
case a.INSERT_BLOCK_DELIMITER:
return this.onInsertNewline;
case a.TRANSPOSE_CHARACTERS:
return this.onTransposeCharacters;
case a.MOVE_SELECTION_TO_START_OF_BLOCK:
return this.moveSelectionToStartOfBlock;
case a.MOVE_SELECTION_TO_END_OF_BLOCK:
return this.moveSelectionToEndOfBlock;
default:
return u
}
},
componentWillReceiveProps: function(e) {
var t = e.documentContent,
n = this.props.documentContent;
if (t && n != t) this.props.selectionState.update(0, 0);
else {
var r = n.getText().length;
this.props.selectionState.constrainLength(r)
}
},
onFocus: function() {
this.props.selectionState.focus()
},
onBlur: function() {
e.getSelection && c() === document.body && e.getSelection().removeAllRanges(), this.props.selectionState.blur()
},
onSelect: function(e, t, n) {
if (!this._blockSelectEvents) {
var r = this.props.selectionState;
null === e ? (r.update(0, 0), r.blur()) : n ? this.updateDocument(e, t) : r.update(e, t)
}
},
updateDocument: function(e, t) {
this.props.selectionState.update(e, t), this._blockSelectEvents = !0, this.forceUpdate(function() {
this.props.onChange && this.props.onChange(), this._blockSelectEvents = !1
}.bind(this))
},
updateDocumentAndCollapseSelection: function(e, t) {
this.updateDocument(t, t)
},
undo: function() {
s.undo(this.props.documentContent, this.updateDocument)
},
redo: function() {
s.redo(this.props.documentContent, this.updateDocument)
},
onKeyCommand: function(e) {
var t = this.getHandlerForCommand(e);
t()
},
onCut: function(e, t) {
s.removeRange(this.props.documentContent, e, t, this.updateDocument)
},
onPasteFragment: function(e) {
var t = this.props.selectionState;
s.insertFragment(this.props.documentContent, e, t.getStartOffset(), t.getEndOffset(), this.updateDocumentAndCollapseSelection)
},
_removeTextWithStrategy: function(e) {
var t = this.props.selectionState,
n = t.getEndOffset();
if (t.isCollapsed()) {
var r = e(n);
if (r) {
var o = 0 > r;
return void s.removeRange(this.props.documentContent, o ? n + r : n, o ? n : n + r, this.updateDocumentAndCollapseSelection)
}
}
this._removeRange()
},
onDelete: function() {
var e = this.props.selectionState;
e.isCollapsed() ? s.removeCharacterForward(this.props.documentContent, e.getAnchorOffset(), this.updateDocumentAndCollapseSelection) : this._removeRange()
},
onDeleteWord: function() {
var e = this.props.selectionState.getStartOffset(),
t = this.props.documentContent;
return e < t.getText().length && t.getEntities()[e] ? void this.onDelete() : void this._removeTextWithStrategy(function(e) {
var t = this.props.documentContent.getText(),
n = l.getForward(t.slice(e));
return n ? n.length : null
}.bind(this))
},
onDeleteToEndOfBlock: function() {
this._removeTextWithStrategy(function(e) {
var t = this.props.documentContent.getText(),
n = t.indexOf(f, e);
return -1 === n ? n = t.length : n === e && n++, n - e
}.bind(this))
},
onBackspace: function() {
var e = this.props.selectionState;
e.isCollapsed() ? s.removeCharacterBackward(this.props.documentContent, e.getAnchorOffset(), this.updateDocumentAndCollapseSelection) : this._removeRange()
},
onBackspaceWord: function() {
var e = this.props.selectionState.getStartOffset(),
t = this.props.documentContent;
return e > 0 && t.getEntities()[e - 1] ? void this.onBackspace() : void this._removeTextWithStrategy(function(e) {
var t = this.props.documentContent.getText(),
n = l.getBackward(t.slice(0, e));
return n ? -n.length : null
}.bind(this))
},
onBackspaceToEndOfBlock: function() {
this._removeTextWithStrategy(function(e) {
var t = this.props.documentContent.getText(),
n = t.slice(0, e).lastIndexOf(f);
return -1 === n ? n = 0 : e - 1 > n && n++, n - e
}.bind(this))
},
moveSelectionToStartOfBlock: function() {
this._moveSelectionToBlockEndpoint(!0)
},
moveSelectionToEndOfBlock: function() {
this._moveSelectionToBlockEndpoint(!1)
},
_moveSelectionToBlockEndpoint: function(e) {
for (var t = this.props.documentContent, n = this.props.selectionState.getStartOffset(), r = t.getText(), o = e ? r.substr(0, n).split("").reverse().join("") : r.substr(n), i = o.length, a = 0; a < o.length; a++)
if (o[a] === f || o[a] === m) {
i = a;
break
}
if (i > 0) {
var s = e ? n - i : n + i;
t.bumpVersion(), this.updateDocument(s, s)
}
},
_removeRange: function() {
var e = this.props.selectionState;
s.removeRange(this.props.documentContent, e.getStartOffset(), e.getEndOffset(), this.updateDocumentAndCollapseSelection)
},
onReturn: function(e) {
e.shiftKey ? this.onInsertSoftNewline() : this.onInsertNewline()
},
onInsertSoftNewline: function() {
this.onCharacters(m)
},
onInsertNewline: function() {
this.onCharacters(f)
},
onTransposeCharacters: function() {
var e = this.props.selectionState,
t = e.getStartOffset(),
n = this.props.documentContent.getText();
e.isCollapsed() && 0 !== t && t !== n.length && s.moveText(this.props.documentContent, t - 1, t, t + 1, this.updateDocumentAndCollapseSelection)
},
onCharacters: function(e) {
var t, n = this.props.selectionState;
t = null != this.state.inlineStyleOverride ? this.state.inlineStyleOverride : d(this.props.documentContent, n), s.replaceText(this.props.documentContent, e, t, null, n.getStartOffset(), n.getEndOffset(), this.updateDocumentAndCollapseSelection)
},
onAlter: function(e, t, n) {
var r = this.props.selectionState.getEndOffset(),
o = e,
i = e + t.length;
s.replaceText(this.props.documentContent, n, p(this.props.documentContent, o), null, o, i, function() {
r !== o + n.length && (r += n.length - t.length), this.updateDocument(r, r)
}.bind(this))
},
onDropSelection: function(e) {
var t = this.props.selectionState;
s.moveText(this.props.documentContent, t.getStartOffset(), t.getEndOffset(), e, this.updateDocument)
},
onDropText: function(e, t) {
this._insertTextAtOffset(e, t)
},
onDropFiles: function(e, t) {
this.props.handleDroppedFiles && this.props.handleDroppedFiles(e, t) || h(t, function(t) {
t && this._insertTextAtOffset(e, t)
}.bind(this))
},
onPasteFiles: function(e) {
if (!this.props.handlePastedFiles || !this.props.handlePastedFiles(e)) {
var t = this.props.selectionState.getStartOffset();
h(e, function(e) {
e && this._insertTextAtOffset(t, e)
}.bind(this))
}
},
_insertTextAtOffset: function(e, t) {
var n = this.props.documentContent;
s.replaceText(n, t, p(n, e), null, e, e, this.updateDocument)
}
};
o.exports = g
}), __d("DocumentCommands", [], function(e, t, n, r, o) {
var i = t("keyMirror"),
a = i({
UNDO: !0,
REDO: !0,
DELETE: !0,
DELETE_WORD: !0,
DELETE_TO_END_OF_BLOCK: !0,
BACKSPACE: !0,
BACKSPACE_WORD: !0,
BACKSPACE_TO_END_OF_BLOCK: !0,
BOLD: !0,
ITALIC: !0,
UNDERLINE: !0,
CODE: !0,
INSERT_BLOCK_DELIMITER: !0,
TRANSPOSE_CHARACTERS: !0,
MOVE_SELECTION_TO_START_OF_BLOCK: !0,
MOVE_SELECTION_TO_END_OF_BLOCK: !0
});
o.exports = a
}), __d("DocumentModifier", [], function(e, t, n, r, o) {
function i() {
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]);
return Array.prototype.concat.apply(C, e)
}
function a(e, t) {
return null != t && (e = e.substr(0, t)), e.split(S).length
}
function s(e, t, n) {
t = t.filter(_.thatReturnsArgument), t.length && (e.addForwardTransaction(t), l(e, t, !0, n))
}
function l(e, t, n, r) {
if (t.length) {
for (var o, i, a, s = e.getData(), l = 0; l < t.length; l++) n ? (o = t[l], i = o.from, a = o.to) : (o = t[t.length - 1 - l], i = o.to, a = o.from), u(s, i, a);
e.update(s.text, s.inlines, s.blocks, s.entities), r(a.start, a.end)
}
}
function u(e, t, n) {
var r = t.start,
o = t.end,
i = e.text.slice(0, r),
s = e.text.slice(o);
if (void 0 !== t.text && void 0 !== n.text && (e.text = i + n.text + s), void 0 !== t.inlines && void 0 !== n.inlines) {
var l = e.inlines.slice(0, r),
u = e.inlines.slice(o);
e.inlines = l.concat(n.inlines, u)
}
if (void 0 !== t.blocks && void 0 !== n.blocks) {
var c = a(i) - 1,
d = e.blocks.slice(0, c),
p = e.blocks.slice(c + t.blocks.length);
e.blocks = d.concat(n.blocks, p)
}
if (void 0 !== t.entities && void 0 !== n.entities) {
var h = e.entities.slice(0, r),
f = e.entities.slice(o);
e.entities = h.concat(n.entities, f)
}
}
function c(e, t, n, r) {
var o = v(e, t, n),
i = m.removeText(e, o.start, o.end);
s(e, [i], r)
}
var d = t("ComposedBlockType"),
p = t("ComposedEntityMutability"),
h = t("DocumentCharacters"),
f = t("DocumentEntity"),
m = t("DocumentModifierDiffs"),
g = t("DocumentRemovalDirection"),
_ = t("emptyFunction"),
y = t("fillArray"),
v = t("getCharacterRemovalRange"),
S = h.BLOCK_DELIMITER,
w = p.MUTABLE,
b = g.FORWARD,
R = g.BACKWARD,
C = [],
E = {
insertFragment: function(e, t, n, r, o) {
var a = t.entities,
l = !0,
u = e.getEntities(),
c = u[n - 1],
d = u[r];
if (c && c === d) {
var p = f.get(c);
p.getMutability() === w && void 0 === a && (a = y(t.text.length, c), l = !1)
}
var h = null;
l && (h = m.removeEntities(e, n, r));
var g = m.removeText(e, n, r),
_ = e.getBlockStylesAroundRange(n, n)[0],
v = m.insertText(e, n, t.text, t.inlines, a || y(t.text.length, null), [_].concat(t.blocks.slice(1))),
S = i(h, g, v);
s(e, S, o)
},
applyEntity: function(e, t, n, r, o) {
var a = m.removeEntities(e, n, r),
l = null;
null !== t && (l = m.setEntity(e, n, r, t));
var u = i(a, l);
s(e, u, o)
},
removeCharacterBackward: function(e, t, n) {
t > 0 && c(e, t, R, n)
},
removeCharacterForward: function(e, t, n) {
t < e.getText().length && c(e, t, b, n)
},
removeRange: function(e, t, n, r) {
var o = m.removeEntities(e, t, n),
a = m.removeText(e, t, n);
s(e, i(o, a), r)
},
moveText: function(e, t, n, r, o) {
var a = m.removeEntities(e, t, n),
l = m.removeText(e, t, n),
u = null;
l && (u = m.insertText(e, r, l.from.text, l.from.inlines, y(l.from.text.length, null), l.from.blocks), r > t && l && m.shiftDiff(u, -l.from.text.length));
var c = i(a, l, u);
s(e, c, o)
},
replaceText: function(e, t, n, r, o, i, s) {
var l = e.getBlockStylesAroundRange(o, o)[0],
u = {
text: t,
inlines: y(t.length, n),
entities: r ? y(t.length, r) : void 0,
blocks: y(a(t), l)
};
E.insertFragment(e, u, o, i, s)
},
resetBlock: function(e, t, n) {
var r, o = e.getText(),
a = o.slice(0, t).lastIndexOf(S);
r = -1 === a ? 0 : a + 1;
var l = o.indexOf(S, r); - 1 === l && (l = o.length);
var u = m.removeEntities(e, r, l),
c = m.removeText(e, r, l),
p = m.setBlockStyle(e, r, r, d.UNSTYLED);
s(e, i(u, c, p), n)
},
applyBlockStyle: function(e, t, n, r, o) {
s(e, [m.setBlockStyle(e, n, r, t)], o)
},
applyInlineStyle: function(e, t, n, r, o) {
s(e, [m.addInlineStyle(e, n, r, t)], o)
},
removeInlineStyle: function(e, t, n, r, o) {
s(e, [m.removeInlineStyle(e, n, r, t)], o)
},
undo: function(e, t) {
l(e, e.getUndoDiffs(), !1, t)
},
redo: function(e, t) {
l(e, e.getRedoDiffs(), !0, t)
}
};
o.exports = E
}), __d("ComposedEntityMutability", [], function(e, t, n, r, o) {
"use strict";
var i = {
MUTABLE: 0,
IMMUTABLE: 1,
SEGMENTED: 2
};
o.exports = i
}), __d("DocumentEntity", [], function(e, t, n, r, o) {
var i = t("DocumentEntityInstance"),
a = t("invariant"),
s = {},
l = 0,
u = {
create: function(e, t, n) {
return u.add(new i(e, t, n))
},
add: function(e) {
return s[++l] = e, l.toString()
},
get: function(e) {
var t = s[e];
return t || a(0, "Unknown DocumentEntity key."), t
}
};
o.exports = u
}), __d("DocumentEntityInstance", [], function(e, t, n, r, o) {
function i(e, t, n) {
"use strict";
l(d, e) || c(0, "Invalid DocumentEntityType."), l(p, t) || c(0, "Invalid ComposedEntityMutability type."), this.$DocumentEntityInstance_type = e, this.$DocumentEntityInstance_mutability = t, this.$DocumentEntityInstance_data = n
}
var a = t("ComposedEntityMutability"),
s = t("ComposedEntityType"),
l = t("arrayContains"),
u = t("getObjectValues"),
c = t("invariant"),
d = u(s),
p = u(a);
i.prototype.getType = function() {
"use strict";
return this.$DocumentEntityInstance_type
}, i.prototype.getMutability = function() {
"use strict";
return this.$DocumentEntityInstance_mutability
}, i.prototype.getData = function() {
"use strict";
return this.$DocumentEntityInstance_data
}, i.prototype.replaceData = function(e) {
"use strict";
this.$DocumentEntityInstance_data = e
}, o.exports = i
}), __d("DocumentModifierDiffs", [], function(e, t, n, r, o) {
function i(e, t, n) {
var r = e.getEntities().slice(t, n),
o = {};
return r.forEach(function(e) {
e && (o[e] = !0)
}), Object.keys(o)
}
var a = t("fillArray"),
s = t("flattenArray"),
l = t("getDocumentEntityRemovalDiffs"),
u = [],
c = {
removeText: function(e, t, n) {
if (t === n) return null;
var r = e.getBlockStylesAroundRange(t, n);
return {
from: {
text: e.getText().slice(t, n),
entities: e.getEntities().slice(t, n),
inlines: e.getInlineStyles().slice(t, n),
blocks: r,
start: t,
end: n
},
to: {
text: "",
inlines: u,
entities: u,
blocks: r.slice(0, 1),
start: t,
end: t
}
}
},
insertText: function(e, t, n, r, o, i) {
if (0 === n.length) return null;
var a = e.getBlockStylesAroundRange(t, t);
return {
from: {
text: "",
inlines: u,
entities: u,
blocks: a,
start: t,
end: t
},
to: {
text: n,
inlines: r,
entities: o,
blocks: a.concat(i.slice(1)),
start: t,
end: t + n.length
}
}
},
removeEntities: function(e, t, n) {
if (t === n) {
var r = e.getEntities(),
o = r[t - 1];
o && o === r[t] && t--
}
var a = i(e, t, n);
return s(a.map(function(r) {
return l(e, r, t, n)
}))
},
setEntity: function(e, t, n, r) {
for (var o = e.getEntities().slice(t, n), i = !1, s = 0; s < o.length; s++)
if (o[s] !== r) {
i = !0;
break
}
return i ? {
from: {
entities: o,
start: t,
end: n
},
to: {
entities: a(n - t, r),
start: t,
end: n
}
} : null
},
setBlockStyle: function(e, t, n, r) {
var o = e.getBlockStylesAroundRange(t, n);
return {
from: {
blocks: o,
start: t,
end: n
},
to: {
blocks: a(o.length, r),
start: t,
end: n
}
}
},
removeInlineStyle: function(e, t, n, r) {
return this._changeInlineStyle(e, t, n, r, !1)
},
addInlineStyle: function(e, t, n, r) {
return this._changeInlineStyle(e, t, n, r, !0)
},
_changeInlineStyle: function(e, t, n, r, o) {
var i = !1,
a = e.getInlineStyles().slice(t, n),
s = a.map(function(e) {
var t = o ? e | r : e & ~r;
return i || t === e || (i = !0), t
});
return i ? {
from: {
inlines: a,
start: t,
end: n
},
to: {
inlines: s,
start: t,
end: n
}
} : void 0
},
shiftDiff: function(e, t) {
e.from.start += t, e.from.end += t, e.to.start += t, e.to.end += t
}
};
o.exports = c
}), __d("flattenArray", [], function(e, t, n, r, o) {
function i(e) {
for (var t = e.slice(), n = []; t.length;) {
var r = t.pop();
Array.isArray(r) ? Array.prototype.push.apply(t, r) : n.push(r)
}
return n.reverse()
}
o.exports = i
}), __d("getDocumentEntityRemovalDiffs", [], function(e, t, n, r, o) {
function i(e, t, n, r) {
var o = s.get(t),
i = d(e, t),
l = o.getMutability();
return i = i.filter(function(e) {
return u(n, r, e.start, e.end)
}), i.map(l === p ? function(t) {
return a(e, Math.max(t.start, n), Math.min(t.end, r))
} : function(t) {
return a(e, t.start, t.end)
})
}
function a(e, t, n) {
var r = e.getEntities().slice(t, n);
return {
from: {
entities: r,
start: t,
end: n
},
to: {
entities: c(r.length, null),
start: t,
end: n
}
}
}
var s = t("DocumentEntity"),
l = t("ComposedEntityMutability"),
u = t("checkRangeOverlap"),
c = t("fillArray"),
d = t("getRangesForDocumentEntity"),
p = l.MUTABLE;
o.exports = i
}), __d("checkRangeOverlap", [], function(e, t, n, r, o) {
function i(e, t, n, r) {
return t >= e && r >= n || a(0, "Start of range must be before or equal to end of range."), r > e && t > n
}
var a = t("invariant");
o.exports = i
}), __d("getRangesForDocumentEntity", [], function(e, t, n, r, o) {
function i(e, t) {
var n = [];
return a(e.getEntities(), function(e) {
return e === t
}, function(e, t) {
n.push({
start: e,
end: t
})
}), n.length || s(0, "Entity key not found in this range."), n
}
var a = t("findRanges"),
s = t("invariant");
o.exports = i
}), __d("findRanges", [], function(e, t, n, r, o) {
function i(e, t, n) {
for (var r, o = 0, i = 0, a = 0; a < e.length; a++) i++, r = e[a], r !== e[a + 1] && (t(r) && n(o, i), o = i)
}
o.exports = i
}), __d("DocumentRemovalDirection", [], function(e, t, n, r, o) {
var i = {
BACKWARD: 0,
FORWARD: 1
};
o.exports = i
}), __d("getCharacterRemovalRange", [], function(e, t, n, r, o) {
function i(e, t, n) {
var r = e.getText(),
o = t - (n === f ? 1 : 0),
i = r.charCodeAt(o),
s = o,
u = o + 1;
if (c.isCodeUnitInSurrogateRange(i)) {
var _;
n === f ? (s--, _ = r.charCodeAt(s)) : (u++, _ = r.charCodeAt(u)), c.isCodeUnitInSurrogateRange(_) || h(0, "Cursor position cannot be between two units of a surrogate pair via normal browser interaction.")
}
var y = e.getEntities()[s];
if (!y) return {
start: s,
end: u
};
var v = a.get(y),
S = v.getMutability();
if (S === m) return {
start: s,
end: u
};
var w = p(e, y).filter(function(e) {
return d(s, u, e.start, e.end)
});
1 != w.length && h(0, "There should only be one entity range within this removal range.");
var b = w[0];
return S === g ? b : l.getRemovalRange(s, u, e.getText().slice(b.start, b.end), b.start, n)
}
var a = t("DocumentEntity"),
s = t("ComposedEntityMutability"),
l = t("DocumentEntitySegments"),
u = t("DocumentRemovalDirection"),
c = t("UnicodeUtils"),
d = t("checkRangeOverlap"),
p = t("getRangesForDocumentEntity"),
h = t("invariant"),
f = u.BACKWARD,
m = s.MUTABLE,
g = s.IMMUTABLE;
o.exports = i
}), __d("DocumentEntitySegments", [], function(e, t, n, r, o) {
var i = t("DocumentRemovalDirection"),
a = (t("invariant"), i.FORWARD),
s = {
getRemovalRange: function(e, t, n, r, o) {
var i = n.split(" ");
i = i.map(function(e, t) {
if (o === a) {
if (t > 0) return " " + e
} else if (t < i.length - 1) return e + " ";
return e
});
for (var s, l, u = r, c = 0; c < i.length; c++) {
if (l = i[c], s = u + l.length, s > e && t > u) return i.length > 1 && (o === a ? 0 === c && s++ : c === i.length - 1 && u--), {
start: u,
end: s
};
u = s
}
}
};
o.exports = s
}), __d("UnicodeUtils", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
return e >= h && f >= e
}
function a(e) {
return m.test(e)
}
function s(e, t) {
return 1 + i(e.charCodeAt(t))
}
function l(e) {
if (!a(e)) return e.length;
for (var t = 0, n = 0; n < e.length; n += s(e, n)) t++;
return t
}
function u(e, t, n) {
if (t = t || 0, n = void 0 === n ? 1 / 0 : n || 0, !a(e)) return e.substr(t, n);
var r = e.length;
if (0 >= r || t > r || 0 >= n) return "";
var o = 0;
if (t > 0) {
for (; t > 0 && r > o; t--) o += s(e, o);
if (o >= r) return ""
} else if (0 > t) {
for (o = r; 0 > t && o > 0; t++) o -= s(e, o - 1);
0 > o && (o = 0)
}
var i = r;
if (r > n)
for (i = o; n > 0 && r > i; n--) i += s(e, i);
return e.substring(o, i)
}
function c(e, t, n) {
t = t || 0, n = void 0 === n ? 1 / 0 : n || 0, 0 > t && (t = 0), 0 > n && (n = 0);
var r = Math.abs(n - t);
return t = n > t ? t : n, u(e, t, r)
}
function d(e) {
for (var t = [], n = 0; n < e.length; n += s(e, n)) {
var r = p.codePointAt.call(e, n);
t.push(r)
}
return t
}
var p = t("ES6StringUtils"),
h = 55296,
f = 57343,
m = /[\uD800-\uDFFF]/,
g = {
isCodeUnitInSurrogateRange: i,
strlen: l,
substr: u,
substring: c,
getCodePoints: d
};
o.exports = g
}), __d("ES6StringUtils", [], function(e, t, n, r, o) {
var i = {
fromCodePoint: function() {
for (var e = [], t = 0, n = arguments.length; n > t; t++) e.push(arguments[t]);
if (String.fromCodePoint) return String.fromCodePoint.apply(this, e);
for (var r = [], o = 0; o < e.length; o++) {
var i = Number(e[o]);
if (!isFinite(i) || 0 > i || i > 1114111 || Math.floor(i) != i) throw RangeError("Invalid code point: " + e[o]);
65536 > i ? r.push(String.fromCharCode(i)) : (i -= 65536, r.push(String.fromCharCode((i >> 10) + 55296), String.fromCharCode(i % 1024 + 56320)))
}
return r.join("")
},
codePointAt: function(e) {
"use strict";
if (String.prototype.codePointAt) return String.prototype.codePointAt.call(this, e);
if (null === this || void 0 === this) throw TypeError("Invalid context: " + this);
var t = String(this),
n = t.length;
if (e = e ? Number(e) : 0, e != e && (e = 0), 0 > e || e >= n) return void 0;
var r = t.charCodeAt(e);
if (r >= 55296 && 56319 >= r && n > e + 1) {
var o = t.charCodeAt(e + 1);
if (o >= 56320 && 57343 >= o) return 1024 * (r - 55296) + o - 56320 + 65536
}
return r
}
};
o.exports = i
}), __d("DocumentRemovableWord", [], function(e, t, n, r, o) {
function i(e, t) {
var n = t ? p.exec(e) : c.exec(e);
return n ? n[0] : null
}
var a = t("TokenizeUtil"),
s = a.getPunctuation();
s = s.replace("'", "").slice(1, -1);
var l = "\\s" + s,
u = "^([" + l + "]*[^" + l + "]+|[" + l + "]+)",
c = new RegExp(u),
d = "([^" + l + "]+[" + l + "]*|[" + l + "]+)$",
p = new RegExp(d),
h = {
getBackward: function(e) {
return i(e, !0)
},
getForward: function(e) {
return i(e, !1)
}
};
o.exports = h
}), __d("TokenizeUtil", [], function(e, t, n, r, o) {
function i() {
return "[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]"
}
function a(e) {
return e ? e.replace(f, " ") : ""
}
function s(e) {
e = e.toLowerCase();
for (var t = "", n = "", r = e.length; r--;) n = e.charAt(r), t = (m[n] || n) + t;
return t.replace(p, " ")
}
function l(e) {
for (var t = [], n = h.exec(e); n;) n = n[0], t.push(n), n = h.exec(e);
return t
}
function u(e, t) {
if (!S.hasOwnProperty(e)) {
var n = s(e),
r = a(n);
S[e] = {
value: e,
flatValue: n,
tokens: l(r),
isPrefixQuery: r && " " != r[r.length - 1]
}
}
return t && "undefined" == typeof S[e].sortedTokens && (S[e].sortedTokens = S[e].tokens.slice(), S[e].sortedTokens.sort(function(e, t) {
return t.length - e.length
})), S[e]
}
function c(e, t, n) {
var r = u(t, "prefix" == e),
o = "prefix" == e ? r.sortedTokens : r.tokens,
i = u(n).tokens,
a = {},
s = r.isPrefixQuery && "query" == e ? o.length - 1 : null,
l = function(t, n) {
for (var r = 0; r < i.length; ++r) {
var o = i[r];
if (!a[r] && (o == t || ("query" == e && n === s || "prefix" == e) && 0 === o.indexOf(t))) return a[r] = !0
}
return !1
};
return Boolean(o.length && o.every(l))
}
var d = t("repeatString"),
p = /[ ]+/g,
h = /[^ ]+/g,
f = new RegExp(i(), "g"),
m = {},
g = {
a: "а à á â ã ä å ā",
b: "б",
c: "ц ç č",
d: "д ð ď đ",
e: "э е è é ê ë ě ē",
f: "ф",
g: "г ğ ģ",
h: "х ħ",
i: "и ì í î ï ı ī",
j: "й",
k: "к ĸ ķ",
l: "л ľ ĺ ŀ ł ļ",
m: "м",
n: "н ñ ň ʼn ŋ ņ",
o: "о ø ö õ ô ó ò",
p: "п",
r: "р ř ŕ",
s: "с ş š ſ",
t: "т ť ŧ þ",
u: "у ю ü û ú ù ů ū",
v: "в",
y: "ы ÿ ý",
z: "з ž",
ae: "æ",
oe: "œ",
ts: "ц",
ch: "ч",
ij: "ij",
sh: "ш",
ss: "ß",
ya: "я"
};
for (var _ in g)
for (var y = g[_].split(" "), v = 0; v < y.length; v++) m[y[v]] = _;
var S = {},
w = {
flatten: s,
parse: u,
getPunctuation: i,
isExactMatch: c.bind(null, "exact"),
isQueryMatch: c.bind(null, "query"),
isPrefixMatch: c.bind(null, "prefix"),
tokenize: l
};
__DEV__ && (w.generateFlattenInfo = function() {
var e = {},
t = "",
n = "";
for (var r in m) {
e[r] = m[r];
var o = r.toUpperCase();
/[A-Z]/.test(o) || (e[o] = e[r])
}
for (var i in e) {
var a = i.charCodeAt(0).toString(16),
s = "\\u" + d("0", 4 - a.length) + a;
t += s, n += e[i]
}
return {
map: e,
input: t,
output: n
}
}), o.exports = w
}), __d("repeatString", [], function(e, t, n, r, o) {
function i(e, t) {
if (1 === t) return e;
t >= 0 || a(0, "Can not repeat by negative number: %s", t);
for (var n = ""; t;) 1 & t && (n += e), (t >>= 1) && (e += e);
return n
}
var a = t("invariant");
o.exports = i
}), __d("getActiveElement", [], function(e, t, n, r, o) {
function i() {
try {
return document.activeElement || document.body
} catch (e) {
return document.body
}
}
o.exports = i
}), __d("getCurrentInlineStyle", [], function(e, t, n, r, o) {
function i(e, t) {
if (!t.hasFocus()) return a;
var n = t.getStartOffset();
return t.isCollapsed() ? s(e, n) : e.getInlineStyles()[n] || a
}
var a = t("ComposedInlineStyle").NONE,
s = t("getCurrentInlineStyleForOffset");
o.exports = i
}), __d("getCurrentInlineStyleForOffset", [], function(e, t, n, r, o) {
function i(e, t) {
var n = e.getText().length,
r = e.getInlineStyles();
return 0 === t ? t = 0 : t === n + 1 ? t = n - 1 : t -= 1, r[t] || a
}
var a = t("ComposedInlineStyle").NONE;
o.exports = i
}), __d("getTextContentFromFiles", [], function(e, t, n, r, o) {
function i(e, t) {
var n = 0,
r = [];
e.forEach(function(o) {
a(o, function(o) {
n++, o && r.push(o), n == e.length && t(r.join(l))
})
})
}
function a(t, n) {
if (!e.FileReader || t.type && !(t.type in c)) return void n("");
if ("" === t.type && u.test(t.name)) return void n(t.name.replace(u, ""));
var r = new FileReader;
r.onload = function() {
n(r.result)
}, r.onerror = function() {
n("")
}, r.readAsText(t)
}
var s = t("DocumentCharacters"),
l = s.BLOCK_DELIMITER,
u = /\.textClipping$/,
c = {
"text/plain": !0,
"text/html": !0,
"text/rtf": !0
};
o.exports = i
}), __d("getDefaultKeyBinding", [], function(e, t, n, r, o) {
function i(e) {
return e.ctrlKey && !e.altKey
}
function a(e) {
return m ? e.metaKey && !e.altKey : i(e)
}
function s(e) {
return m ? e.altKey : i(e)
}
function l(e) {
return a(e) ? e.shiftKey ? p.REDO : p.UNDO : void 0
}
function u(e) {
return g && e.shiftKey ? null : s(e) ? p.DELETE_WORD : p.DELETE
}
function c(e) {
return a(e) && m ? p.BACKSPACE_TO_END_OF_BLOCK : s(e) ? p.BACKSPACE_WORD : p.BACKSPACE
}
function d(e) {
switch (e.keyCode) {
case 66:
return a(e) ? p.BOLD : null;
case 68:
return i(e) ? p.DELETE : null;
case 72:
return i(e) ? p.BACKSPACE : null;
case 73:
return a(e) ? p.ITALIC : null;
case 74:
return a(e) ? p.CODE : null;
case 75:
return i(e) ? p.DELETE_TO_END_OF_BLOCK : null;
case 79:
return i(e) ? p.INSERT_BLOCK_DELIMITER : null;
case 84:
return i(e) ? p.TRANSPOSE_CHARACTERS : null;
case 85:
return a(e) ? p.UNDERLINE : null;
case 90:
return l(e) || null;
case h.DELETE:
return u(e);
case h.BACKSPACE:
return c(e);
case h.LEFT:
return y && a(e) ? p.MOVE_SELECTION_TO_START_OF_BLOCK : null;
case h.RIGHT:
return y && a(e) ? p.MOVE_SELECTION_TO_END_OF_BLOCK : null;
default:
return null
}
}
var p = t("DocumentCommands"),
h = t("Keys"),
f = t("UserAgent"),
m = f.osx(),
g = f.windows(),
_ = f.firefox(),
y = m && _ && 29 > _;
o.exports = d
}), __d("getEntityMatcher", [], function(e, t, n, r, o) {
function i(e, t) {
return t = t || a.get,
function(n, r) {
s(n.getEntities(), function(n) {
return null !== n && e(t(n))
}, r)
}
}
var a = t("DocumentEntity"),
s = t("findRanges");
o.exports = i
}), __d("getHashtagMatches", [], function(e, t, n, r, o) {
function i(e, t) {
for (var n, r, o, i, a = e.getText(); null !== (n = s.exec(a));) r = n.index + n[1].length, o = n[2], i = n[3], t(r, r + o.length + i.length)
}
var a = t("getHashtagRegex"),
s = a();
o.exports = i
}), __d("getHashtagRegex", [], function(e, t, n, r, o) {
function i() {
var e = "À-ÖØ-öø-ÿĀ-ɏɓ-ɔɖ-ɗəɛɣɨɯɲʉʋʻ̀-ͯḀ-ỿ",
t = "Ѐ-ӿԀ-ԧⷠ-ⷿꙀ-֑ꚟ-ֿׁ-ׂׄ-ׇׅא-תװ-״﬒-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﭏؐ-ؚؠ-ٟٮ-ۓە-ۜ۞-۪ۨ-ۯۺ-ۼۿݐ-ݿࢠࢢ-ࢬࣤ-ࣾﭐ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼ‌-‌ก-ฺเ-๎ᄀ-ᇿ㄰-ㆅꥠ-꥿가-힯ힰ-퟿ᄀ-ᅵ",
n = String.fromCharCode,
r = "ァ-ヺー-ヾヲ-゚0-9A-Za-zぁ-ゖ゙-ゞ㐀-䶿一-鿿" + n(173824) + "-" + n(177983) + n(177984) + "-" + n(178207) + n(194560) + "-" + n(195103) + "〃々〻",
o = e + t + r,
i = "A-Za-zªµºÀ-ÖØ-öø-Ɂɐ-ˁˆ-ˑˠ-ˤˮͺΆΈ-ΊΌΎ-ΡΣ-ώϐ-ϵϷ-ҁҊ-ӎӐ-ӹԀ-ԏԱ-Ֆՙա-ևא-תװ-ײء-غـ-يٮ-ٯٱ-ۓەۥ-ۦۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ݭހ-ޥޱऄ-हऽॐक़-ॡॽঅ-ঌএ-ঐও-নপ-রলশ-হঽৎড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽૐૠ-ૡଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽଡ଼-ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹఅ-ఌఎ-ఐఒ-నప-ళవ-హౠ-ౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠ-ೡഅ-ഌഎ-ഐഒ-നപ-ഹൠ-ൡඅ-ඖක-නඳ-රලව-ෆก-ะา-ำเ-ๆກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆໜ-ໝༀཀ-ཇཉ-ཪྈ-ྋက-အဣ-ဧဩ-ဪၐ-ၕႠ-Ⴥა-ჺჼᄀ-ᅙᅟ-ᆢᆨ-ᇹሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦩᧁ-ᧇᨀ-ᨖᴀ-ᶿḀ-ẛẠ-ỹἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₔℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℱℳ-ℹℼ-ℿⅅ-ⅉⰀ-Ⱞⰰ-ⱞⲀ-ⳤⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〆〱-〵〻-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄬㄱ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-龻ꀀ-ꒌꠀ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢ가-힣豈-鶴侮-頻並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",
a = "̀-ͯ҃-֑҆-ֹֻ-ֽֿׁ-ׂׄ-ׇׅؐ-ًؕ-ٰٞۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ްँ-ः़ा-्॑-॔ॢ-ॣঁ-ঃ়া-ৄে-ৈো-্ৗৢ-ৣਁ-ਃ਼ਾ-ੂੇ-ੈੋ-੍ੰ-ੱઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣଁ-ଃ଼ା-ୃେ-ୈୋ-୍ୖ-ୗஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕ-ౖಂ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕ-ೖം-ഃാ-ൃെ-ൈൊ-്ൗං-ඃ්ා-ුූෘ-ෟෲ-ෳัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-༹༙༵༷༾-༿ཱ-྄྆-྇ྐ-ྗྙ-ྼ࿆ာ-ဲံ-္ၖ-ၙ፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈ-ᧉᨗ-ᨛ᷀-᷃⃐-⃥⃜⃡-⃫〪-゙〯-゚ꠂ꠆ꠋꠣ-ꠧﬞ︀-️︠-︣",
s = "0-9٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉០-៩᠐-᠙᥆-᥏᧐-᧙0-9",
l = i + a + o,
u = s + "_",
c = l + u,
d = "[" + l + "]",
p = "[" + c + "]",
h = "^|$|[^&" + c + "]",
f = "[#\\uFF03]",
m = "(" + h + ")(" + f + ")(" + p + "*" + d + p + "*)";
return new RegExp(m, "ig")
}
o.exports = i
}), __d("MentionsInputTypeaheadView.react", [], function(e, t, n, r, o) {
"use strict";
var i = t("Image"),
a = t("ReactPropTypes"),
s = t("React"),
l = t("RKDimensions"),
u = t("ScrollView"),
c = t("StyleSheet"),
d = t("TouchableHighlight"),
p = t("TypeaheadViewItem"),
h = t("View"),
f = t("Text"),
m = t("cssVar"),
g = l.get("window").height - 320,
_ = g / 55,
y = 34,
v = s.createClass({
displayName: "MentionsInputTypeaheadViewItem",
mixins: [p.Mixin],
propTypes: p.propTypes,
render: function() {
var e = this.props.entry,
t = e.getPhoto() ? s.createElement(i, {
style: R.profilePicture,
source: {
uri: e.getPhoto()
}
}) : null,
n = null;
return e.getSubtitle() && (n = s.createElement(f, null, e.getSubtitle())), s.createElement(d, {
onPress: this._onSelect
}, s.createElement(h, {
style: R.row
}, t, s.createElement(h, null, s.createElement(f, {
style: R.titleText
}, e.getTitle()), n)))
}
}),
S = s.createClass({
displayName: "MentionsInputTypeaheadView",
propTypes: {
highlightedEntry: a.object,
entries: a.array.isRequired,
onSelect: a.func.isRequired,
onHighlight: a.func,
onRenderHighlight: a.func
},
_renderItem: function(e, t) {
var n = e === this.props.highlightedEntry;
return [0 !== t && s.createElement(h, {
style: R.divider
}), s.createElement(v, {
key: e.getUniqueID(),
entry: e,
highlighted: n,
onSelect: this.props.onSelect,
onHighlight: this.props.onHighlight,
onRenderHighlight: this.props.onRenderHighlight
})]
},
_renderSectionHeader: function(e) {
return s.createElement(h, {
key: e,
style: R.sectionHeader
}, s.createElement(f, {
style: R.sectionHeaderText
}, e))
},
render: function() {
if (this.props.entries.length) {
var e = [],
t = [];
this.props.entries.forEach(function(n) {
n.getAuxiliaryData().isMemberOfGroup ? (0 === e.length && e.push(this._renderSectionHeader("Members")), e.push(this._renderItem(n, e.length - 1))) : (0 === t.length && t.push(this._renderSectionHeader("Others")), t.push(this._renderItem(n, t.length - 1)))
}.bind(this));
var n = this.props.entries.length > _ && {
height: g
};
return s.createElement(h, {
style: R.container,
pointerEvents: h.PointerEvents.boxNone
}, s.createElement(u, {
keyboardShouldPersistTaps: !0,
style: [R.content, n]
}, e, t), this._renderSectionHeader())
}
return s.createElement(h, {
style: R.container
})
}
}),
w = m("fbui-bluegray-5"),
b = m("fbui-bluegray-10"),
R = c.create({
container: {
width: l.get("window").width,
top: 0,
left: 0
},
content: {
backgroundColor: "white"
},
row: {
backgroundColor: "white",
flexDirection: "row",
alignItems: "center"
},
sectionHeader: {
borderTopColor: b,
borderTopWidth: 1,
borderBottomColor: b,
borderBottomWidth: 1,
backgroundColor: w,
padding: 5,
paddingLeft: 9
},
sectionHeaderText: {
fontSize: 12,
fontWeight: "bold"
},
divider: {
height: 1,
marginLeft: 44,
backgroundColor: w
},
titleText: {
fontSize: 17
},
profilePicture: {
width: y,
height: y,
marginVertical: 6,
marginHorizontal: 9,
borderRadius: y / 2
}
});
o.exports = S
}), __d("ScrollView", [], function(e, t, n, r, o) {
"use strict";
var i = t("ArrayOfPropType"),
a = t("React"),
s = t("ReactIOSViewAttributes"),
l = t("ReactIOSTagHandles"),
u = t("NativeModules").RKUIManager.RKScrollView,
c = u.Constants,
d = t("NativeModulesDeprecated").RKUIManager,
p = t("ScrollResponder"),
h = t("ScrollViewPropTypes"),
f = t("StyleSheetPropType"),
m = t("StyleSheet"),
g = t("View"),
_ = t("ViewStylePropTypes"),
y = t("createReactIOSNativeComponentClass"),
v = t("flattenStyle"),
S = t("invariant"),
w = t("merge"),
b = t("nativePropType"),
R = t("validAttributesFromPropTypes"),
C = a.PropTypes,
E = "ScrollView",
D = "InnerScrollView",
x = w(h, {
alwaysBounceHorizontal: b(C.bool),
alwaysBounceVertical: b(C.bool),
bounces: b(C.bool),
bouncesZoom: b(C.bool),
canCancelContentTouches: b(C.bool),
centerContent: b(C.bool),
decelerationRate: b(C.number),
directionalLockEnabled: b(C.bool),
horizontal: C.bool,
indicatorStyle: b(C.oneOf([c.IndicatorStyle.Default, c.IndicatorStyle.Black, c.IndicatorStyle.White])),
innerStyle: f(_),
keyboardDismissMode: b(C.oneOf([c.KeyboardDismissMode.None, c.KeyboardDismissMode.Interactive, c.KeyboardDismissMode.OnDrag])),
keyboardShouldPersistTaps: b(C.bool),
maximumZoomScale: b(C.number),
minimumZoomScale: b(C.number),
pagingEnabled: b(C.bool),
scrollsToTop: b(C.bool),
stickyHeaderIndices: b(i(C.number)),
zoomScale: b(C.number)
}),
F = a.createClass({
displayName: "ScrollView",
statics: {
PropTypes: x
},
propTypes: x,
mixins: [p.Mixin],
getInitialState: function() {
return this.scrollResponderMixinGetInitialState()
},
setNativeProps: function(e) {
this.refs[E].setNativeProps(e)
},
getInnerViewNode: function() {
return this.refs[D].getNodeHandle()
},
scrollTo: function(e, t) {
d.scrollTo(l.rootNodeIDToTag[this._rootNodeID], t, e)
},
render: function() {
var e = [this.props.horizontal && I.innerHorizontal, this.props.innerStyle];
if (__DEV__ && this.props.style) {
var t = v(this.props.style),
n = ["alignItems", "justifyContent"].filter(function(e) {
return void 0 !== t[e]
});
0 !== n.length && S(0, "ScrollView child layout (" + JSON.stringify(n) + ") must by applied through the innerStyle prop.")
}
var r = a.createElement(g, {
ref: D,
style: e
}, this.props.children),
o = w(this.props, {
style: [I.base, this.props.style],
onTouchStart: this.scrollResponderHandleTouchStart,
onTouchMove: this.scrollResponderHandleTouchMove,
onTouchEnd: this.scrollResponderHandleTouchEnd,
onScrollBeginDrag: this.scrollResponderHandleScrollBeginDrag,
onScrollEndDrag: this.scrollResponderHandleScrollEndDrag,
onMomentumScrollBegin: this.scrollResponderHandleMomentumScrollBegin,
onMomentumScrollEnd: this.scrollResponderHandleMomentumScrollEnd,
onStartShouldSetResponder: this.scrollResponderHandleStartShouldSetResponder,
onStartShouldSetResponderCapture: this.scrollResponderHandleStartShouldSetResponderCapture,
onScrollShouldSetResponder: this.scrollResponderHandleScrollShouldSetResponder,
onScroll: this.scrollResponderHandleScroll,
onResponderGrant: this.scrollResponderHandleResponderGrant,
onResponderTerminationRequest: this.scrollResponderHandleTerminationRequest,
onResponderTerminate: this.scrollResponderHandleTerminate,
onResponderRelease: this.scrollResponderHandleResponderRelease,
onResponderReject: this.scrollResponderHandleResponderReject
});
return a.createElement(u, Object.assign({}, o, {
ref: E
}), r)
}
}),
I = m.create({
base: {
flex: 1
},
innerHorizontal: {
alignSelf: "flex-start",
flexDirection: "row"
}
}),
u = y({
validAttributes: w(s.UIView, R(F.propTypes)),
uiViewClassName: "RKScrollView"
});
o.exports = F
}), __d("ArrayOfPropType", [], function(e, t, n, r, o) {
"use strict";
var i = t("ReactPropTypes"),
a = t("deepDiffer"),
s = function(e, t) {
var n = i.arrayOf(e);
return n.differ = t ? t : a, n
};
o.exports = s
}), __d("validAttributesFromPropTypes", [], function(e, t, n, r, o) {
"use strict";
function i(e) {
var t = {};
for (var n in e) {
var r = e[n];
if (r && r.isNative) {
var o = r.differ;
t[n] = o ? {
diff: o
} : !0
}
}
return t
}
o.exports = i
}), __d("TouchableHighlight", [], function(e, t, n, r, o) {
"use strict";
var i = t("AnimationMixin"),
a = t("NativeMethodsMixin"),
s = t("React"),
l = t("ReactIOSViewAttributes"),
u = t("ReactIOSAnimation"),
c = t("Touchable"),
d = t("View"),
p = t("cloneWithProps"),
h = t("keyOf"),
f = t("merge"),
m = t("onlyChild"),
g = {
top: 20,
left: 20,
right: 20,
bottom: 30
},
_ = h({
childRef: null
}),
y = h({
underlayRef: null
}),
v = {
style: {
backgroundColor: "transparent"
}
},
S = {
activeOpacity: .8,
animationVelocity: 1,
underlayColor: "#000000"
},
w = s.createClass({
displayName: "TouchableHighlight",
propTypes: {
onPress: s.PropTypes.func.isRequired,
activeOpacity: s.PropTypes.number,
animationVelocity: s.PropTypes.number,
style: d.stylePropType,
underlayColor: s.PropTypes.string
},
mixins: [i, a, c.Mixin],
getDefaultProps: function() {
return S
},
computeSyntheticState: function(e) {
return {
activeProps: {
style: {
opacity: e.activeOpacity
}
},
activeUnderlayProps: {
style: {
backgroundColor: e.underlayColor
}
},
pressAnim: {
property: u.Properties.opacity,
fromValue: e.activeOpacity,
toValue: 1,
velocity: e.animationVelocity
},
pressOutAnim: {
property: u.Properties.opacity,
toValue: 1,
velocity: e.animationVelocity
},
underlayStyle: [v.style, e.style]
}
},
getInitialState: function() {
return f(this.touchableGetInitialState(), this.computeSyntheticState(this.props))
},
componentWillReceiveProps: function(e) {
(e.activeOpacity !== this.props.activeOpacity || e.animationVelocity !== this.props.activeVelocity || e.underlayColor !== this.props.underlayColor || e.style !== this.props.style) && this.setState(this.computeSyntheticState(e))
},
viewConfig: {
uiViewClassName: "RKView",
validAttributes: l.RKView
},
touchableHandleActivePressIn: function() {
this.stopAllAnimations(), this._showUnderlay(), this.refs[_].setNativeProps(this.state.activeProps)
},
touchableHandleActivePressOut: function() {
this.stopAllAnimations();
var e = u.createSpringAnimation(this.state.pressOutAnim);
this.startAnimation(_, e, this._hideUnderlay)
},
touchableHandlePress: function() {
this.stopAllAnimations(), this._showUnderlay();
var e = u.createSpringAnimation(this.state.pressAnim);
this.startAnimation(_, e, this._hideUnderlay), this.props.onPress && this.props.onPress()
},
touchableGetPressRectOffset: function() {
return g
},
_showUnderlay: function() {
this.refs[y].setNativeProps(this.state.activeUnderlayProps)
},
_hideUnderlay: function() {
this.refs[y] && this.refs[y].setNativeProps(v)
},
render: function() {
return s.createElement(d, {
ref: y,
style: this.state.underlayStyle,
onStartShouldSetResponder: this.touchableHandleStartShouldSetResponder,
onResponderTerminationRequest: this.touchableHandleResponderTerminationRequest,
onResponderGrant: this.touchableHandleResponderGrant,
onResponderMove: this.touchableHandleResponderMove,
onResponderRelease: this.touchableHandleResponderRelease,
onResponderTerminate: this.touchableHandleResponderTerminate
}, p(m(this.props.children), {
ref: _,
accessible: !0,
testID: this.props.testID
}))
}
});
o.exports = w
}), __d("TypeaheadViewItem", [], function(e, t, n, r, o) {
var i = t("React"),
a = t("SearchableEntry"),
s = {
entry: i.PropTypes.instanceOf(a).isRequired,
highlighted: i.PropTypes.bool,
selected: i.PropTypes.bool,
onSelect: i.PropTypes.func.isRequired,
onHighlight: i.PropTypes.func,
onRenderHighlight: i.PropTypes.func
},
l = {
_onSelect: function(e) {
this.props.onSelect(this.props.entry, e)
},
_onHighlight: function(e) {
this.props.onHighlight && this.props.onHighlight(this.props.entry, e)
},
shouldComponentUpdate: function(e) {
return this.props.entry.getUniqueID() !== e.entry.getUniqueID() || this.props.highlighted !== e.highlighted || this.props.selected !== e.selected
},
componentDidMount: function() {
this.props.highlighted && this.props.onRenderHighlight && this.props.onRenderHighlight(this.getDOMNode())
},
componentDidUpdate: function() {
this.props.highlighted && this.props.onRenderHighlight && this.props.onRenderHighlight(this.getDOMNode())
}
};
o.exports = {
propTypes: s,
Mixin: l
}
}), __d("SearchableEntry", [], function(e, t, n, r, o) {
function i(e) {
switch (typeof e) {
case "string":
return e;
case "object":
return "";
default:
return ""
}
}
function a(e) {
"use strict";
(!e.uniqueID || "string" != typeof e.uniqueID && "number" != typeof e.uniqueID) && s(0, "SearchableEntry must include a valid unique ID value, %s provided.", e.uniqueID), e.title && "string" == typeof e.title || s(0, "SearchableEntry must include a valid title string, %s provided.", e.title), this.$SearchableEntry_uniqueID = e.uniqueID + "", this.$SearchableEntry_title = e.title, this.$SearchableEntry_order = e.order || 0, this.$SearchableEntry_subtitle = i(e.subtitle), this.$Searchabl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment