UNPKG

crowdstart.js

Version:

Ecommerce SDK for JavaScript and client for Crowdstart.

1,117 lines 96 kB
(function (global) { var process = { title: 'browser', browser: true, env: {}, argv: [], nextTick: function (fn) { setTimeout(fn, 0) }, cwd: function () { return '/' }, chdir: function () { } }; // Require module function require(file, cb) { if ({}.hasOwnProperty.call(require.cache, file)) return require.cache[file]; // Handle async require if (typeof cb == 'function') { require.load(file, cb); return } var resolved = require.resolve(file); if (!resolved) throw new Error('Failed to resolve module ' + file); var module$ = { id: file, require: require, filename: file, exports: {}, loaded: false, parent: null, children: [] }; var dirname = file.slice(0, file.lastIndexOf('/') + 1); require.cache[file] = module$.exports; resolved.call(module$.exports, module$, module$.exports, dirname, file); module$.loaded = true; return require.cache[file] = module$.exports } require.modules = {}; require.cache = {}; require.resolve = function (file) { return {}.hasOwnProperty.call(require.modules, file) ? require.modules[file] : void 0 }; // define normal static module require.define = function (file, fn) { require.modules[file] = fn }; require.waiting = {}; // define async module require.async = function (url, fn) { require.modules[url] = fn; var cb; while (cb = require.waiting[url].shift()) cb(require(url)) }; // Load module async module require.load = function (url, cb) { var script = document.createElement('script'), existing = document.getElementsByTagName('script')[0], callbacks = require.waiting[url] = require.waiting[url] || []; // We'll be called when async module is defined. callbacks.push(cb); // Load module script.type = 'text/javascript'; script.async = true; script.src = url; existing.parentNode.insertBefore(script, existing) }; // source: src/api.coffee require.define('./api', function (module, exports, __dirname, __filename) { var Api, isFunction, isString, newError, ref, statusOk; ref = require('./utils'), isFunction = ref.isFunction, isString = ref.isString, newError = ref.newError, statusOk = ref.statusOk; module.exports = Api = function () { Api.BLUEPRINTS = {}; Api.CLIENT = null; function Api(opts) { var blueprints, client, debug, endpoint, k, key, v; if (opts == null) { opts = {} } if (!(this instanceof Api)) { return new Api(opts) } endpoint = opts.endpoint, debug = opts.debug, key = opts.key, client = opts.client, blueprints = opts.blueprints; this.debug = debug; if (blueprints == null) { blueprints = this.constructor.BLUEPRINTS } if (client) { this.client = client } else { this.client = new this.constructor.CLIENT({ debug: debug, endpoint: endpoint, key: key }) } for (k in blueprints) { v = blueprints[k]; this.addBlueprints(k, v) } } Api.prototype.addBlueprints = function (api, blueprints) { var bp, fn, name; if (this[api] == null) { this[api] = {} } fn = function (_this) { return function (name, bp) { var method; if (isFunction(bp)) { return _this[api][name] = function () { return bp.apply(_this, arguments) } } if (bp.expects == null) { bp.expects = statusOk } if (bp.method == null) { bp.method = 'POST' } method = function (data, cb) { return _this.client.request(bp, data).then(function (res) { var ref1, ref2; if (((ref1 = res.data) != null ? ref1.error : void 0) != null) { throw newError(data, res) } if (!bp.expects(res)) { throw newError(data, res) } if (bp.process != null) { bp.process.call(_this, res) } return (ref2 = res.data) != null ? ref2 : res.body }).callback(cb) }; return _this[api][name] = method } }(this); for (name in blueprints) { bp = blueprints[name]; fn(name, bp) } }; Api.prototype.setKey = function (key) { return this.client.setKey(key) }; Api.prototype.setUserKey = function (key) { return this.client.setUserKey(key) }; Api.prototype.deleteUserKey = function () { return this.client.deleteUserKey() }; Api.prototype.setStore = function (id) { this.storeId = id; return this.client.setStore(id) }; return Api }() }); // source: src/utils.coffee require.define('./utils', function (module, exports, __dirname, __filename) { exports.isFunction = function (fn) { return typeof fn === 'function' }; exports.isString = function (s) { return typeof s === 'string' }; exports.statusOk = function (res) { return res.status === 200 }; exports.statusCreated = function (res) { return res.status === 201 }; exports.statusNoContent = function (res) { return res.status === 204 }; exports.newError = function (data, res) { var err, message, ref, ref1, ref2, ref3, ref4; if (res == null) { res = {} } message = (ref = res != null ? (ref1 = res.data) != null ? (ref2 = ref1.error) != null ? ref2.message : void 0 : void 0 : void 0) != null ? ref : 'Request failed'; err = new Error(message); err.message = message; err.req = data; err.data = res.data; err.responseText = res.data; err.status = res.status; err.type = (ref3 = res.data) != null ? (ref4 = ref3.error) != null ? ref4.type : void 0 : void 0; return err }; exports.updateQuery = function (url, key, value) { var hash, re, separator; re = new RegExp('([?&])' + key + '=.*?(&|#|$)(.*)', 'gi'); if (re.test(url)) { if (value != null) { return url.replace(re, '$1' + key + '=' + value + '$2$3') } else { hash = url.split('#'); url = hash[0].replace(re, '$1$3').replace(/(&|\?)$/, ''); if (hash[1] != null) { url += '#' + hash[1] } return url } } else { if (value != null) { separator = url.indexOf('?') !== -1 ? '&' : '?'; hash = url.split('#'); url = hash[0] + separator + key + '=' + value; if (hash[1] != null) { url += '#' + hash[1] } return url } else { return url } } } }); // source: src/client/xhr.coffee require.define('./client/xhr', function (module, exports, __dirname, __filename) { var Xhr, XhrClient, cookie, isFunction, newError, ref, updateQuery; Xhr = require('xhr-promise-es6/lib'); Xhr.Promise = require('broken/lib'); cookie = require('js-cookie/src/js.cookie'); ref = require('./utils'), isFunction = ref.isFunction, newError = ref.newError, updateQuery = ref.updateQuery; module.exports = XhrClient = function () { XhrClient.prototype.sessionName = 'crwdst'; function XhrClient(opts) { if (opts == null) { opts = {} } if (!(this instanceof XhrClient)) { return new XhrClient(opts) } this.endpoint = 'https://api.crowdstart.com'; this.key = opts.key, this.debug = opts.debug; if (opts.endpoint) { this.setEndpoint(opts.endpoint) } this.getUserKey() } XhrClient.prototype.setEndpoint = function (endpoint) { return this.endpoint = endpoint.replace(/\/$/, '') }; XhrClient.prototype.setStore = function (id) { return this.storeId = id }; XhrClient.prototype.setKey = function (key) { return this.key = key }; XhrClient.prototype.getKey = function () { return this.userKey || this.key || this.constructor.KEY }; XhrClient.prototype.getUserKey = function () { var session; if ((session = cookie.getJSON(this.sessionName)) != null) { if (session.userKey != null) { this.userKey = session.userKey } } return this.userKey }; XhrClient.prototype.setUserKey = function (key) { cookie.set(this.sessionName, { userKey: key }, { expires: 7 * 24 * 3600 * 1000 }); return this.userKey = key }; XhrClient.prototype.deleteUserKey = function () { cookie.set(this.sessionName, { userKey: null }, { expires: 7 * 24 * 3600 * 1000 }); return this.userKey }; XhrClient.prototype.getUrl = function (url, data, key) { if (isFunction(url)) { url = url.call(this, data) } return updateQuery(this.endpoint + url, 'token', key) }; XhrClient.prototype.request = function (blueprint, data, key) { var opts; if (key == null) { key = this.getKey() } opts = { url: this.getUrl(blueprint.url, data, key), method: blueprint.method, data: JSON.stringify(data) }; if (this.debug) { void 0; void 0 } return new Xhr().send(opts).then(function (res) { if (this.debug) { void 0; void 0 } res.data = res.responseText; return res })['catch'](function (res) { var err, error, ref1; try { res.data = (ref1 = res.responseText) != null ? ref1 : JSON.parse(res.xhr.responseText) } catch (error) { err = error } err = newError(data, res); if (this.debug) { void 0; void 0; void 0 } throw err }) }; return XhrClient }() }); // source: node_modules/xhr-promise-es6/lib/index.js require.define('xhr-promise-es6/lib', function (module, exports, __dirname, __filename) { /* * Copyright 2015 Scott Brady * MIT License * https://github.com/scottbrady/xhr-promise/blob/master/LICENSE */ var ParseHeaders, XMLHttpRequestPromise, objectAssign; ParseHeaders = require('parse-headers/parse-headers'); objectAssign = require('object-assign'); /* * Module to wrap an XMLHttpRequest in a promise. */ module.exports = XMLHttpRequestPromise = function () { function XMLHttpRequestPromise() { } XMLHttpRequestPromise.DEFAULT_CONTENT_TYPE = 'application/x-www-form-urlencoded; charset=UTF-8'; XMLHttpRequestPromise.Promise = global.Promise; /* * XMLHttpRequestPromise.send(options) -> Promise * - options (Object): URL, method, data, etc. * * Create the XHR object and wire up event handlers to use a promise. */ XMLHttpRequestPromise.prototype.send = function (options) { var defaults; if (options == null) { options = {} } defaults = { method: 'GET', data: null, headers: {}, async: true, username: null, password: null }; options = objectAssign({}, defaults, options); return new this.constructor.Promise(function (_this) { return function (resolve, reject) { var e, header, ref, value, xhr; if (!XMLHttpRequest) { _this._handleError('browser', reject, null, "browser doesn't support XMLHttpRequest"); return } if (typeof options.url !== 'string' || options.url.length === 0) { _this._handleError('url', reject, null, 'URL is a required parameter'); return } _this._xhr = xhr = new XMLHttpRequest; xhr.onload = function () { var responseText; _this._detachWindowUnload(); try { responseText = _this._getResponseText() } catch (_error) { _this._handleError('parse', reject, null, 'invalid JSON response'); return } return resolve({ url: _this._getResponseUrl(), status: xhr.status, statusText: xhr.statusText, responseText: responseText, headers: _this._getHeaders(), xhr: xhr }) }; xhr.onerror = function () { return _this._handleError('error', reject) }; xhr.ontimeout = function () { return _this._handleError('timeout', reject) }; xhr.onabort = function () { return _this._handleError('abort', reject) }; _this._attachWindowUnload(); xhr.open(options.method, options.url, options.async, options.username, options.password); if (options.data != null && !options.headers['Content-Type']) { options.headers['Content-Type'] = _this.constructor.DEFAULT_CONTENT_TYPE } ref = options.headers; for (header in ref) { value = ref[header]; xhr.setRequestHeader(header, value) } try { return xhr.send(options.data) } catch (_error) { e = _error; return _this._handleError('send', reject, null, e.toString()) } } }(this)) }; /* * XMLHttpRequestPromise.getXHR() -> XMLHttpRequest */ XMLHttpRequestPromise.prototype.getXHR = function () { return this._xhr }; /* * XMLHttpRequestPromise._attachWindowUnload() * * Fix for IE 9 and IE 10 * Internet Explorer freezes when you close a webpage during an XHR request * https://support.microsoft.com/kb/2856746 * */ XMLHttpRequestPromise.prototype._attachWindowUnload = function () { this._unloadHandler = this._handleWindowUnload.bind(this); if (window.attachEvent) { return window.attachEvent('onunload', this._unloadHandler) } }; /* * XMLHttpRequestPromise._detachWindowUnload() */ XMLHttpRequestPromise.prototype._detachWindowUnload = function () { if (window.detachEvent) { return window.detachEvent('onunload', this._unloadHandler) } }; /* * XMLHttpRequestPromise._getHeaders() -> Object */ XMLHttpRequestPromise.prototype._getHeaders = function () { return ParseHeaders(this._xhr.getAllResponseHeaders()) }; /* * XMLHttpRequestPromise._getResponseText() -> Mixed * * Parses response text JSON if present. */ XMLHttpRequestPromise.prototype._getResponseText = function () { var responseText; responseText = typeof this._xhr.responseText === 'string' ? this._xhr.responseText : ''; switch (this._xhr.getResponseHeader('Content-Type')) { case 'application/json': case 'text/javascript': responseText = JSON.parse(responseText + '') } return responseText }; /* * XMLHttpRequestPromise._getResponseUrl() -> String * * Actual response URL after following redirects. */ XMLHttpRequestPromise.prototype._getResponseUrl = function () { if (this._xhr.responseURL != null) { return this._xhr.responseURL } if (/^X-Request-URL:/m.test(this._xhr.getAllResponseHeaders())) { return this._xhr.getResponseHeader('X-Request-URL') } return '' }; /* * XMLHttpRequestPromise._handleError(reason, reject, status, statusText) * - reason (String) * - reject (Function) * - status (String) * - statusText (String) */ XMLHttpRequestPromise.prototype._handleError = function (reason, reject, status, statusText) { this._detachWindowUnload(); return reject({ reason: reason, status: status || this._xhr.status, statusText: statusText || this._xhr.statusText, xhr: this._xhr }) }; /* * XMLHttpRequestPromise._handleWindowUnload() */ XMLHttpRequestPromise.prototype._handleWindowUnload = function () { return this._xhr.abort() }; return XMLHttpRequestPromise }() }); // source: node_modules/parse-headers/parse-headers.js require.define('parse-headers/parse-headers', function (module, exports, __dirname, __filename) { var trim = require('trim'), forEach = require('for-each'), isArray = function (arg) { return Object.prototype.toString.call(arg) === '[object Array]' }; module.exports = function (headers) { if (!headers) return {}; var result = {}; forEach(trim(headers).split('\n'), function (row) { var index = row.indexOf(':'), key = trim(row.slice(0, index)).toLowerCase(), value = trim(row.slice(index + 1)); if (typeof result[key] === 'undefined') { result[key] = value } else if (isArray(result[key])) { result[key].push(value) } else { result[key] = [ result[key], value ] } }); return result } }); // source: node_modules/trim/index.js require.define('trim', function (module, exports, __dirname, __filename) { exports = module.exports = trim; function trim(str) { return str.replace(/^\s*|\s*$/g, '') } exports.left = function (str) { return str.replace(/^\s*/, '') }; exports.right = function (str) { return str.replace(/\s*$/, '') } }); // source: node_modules/for-each/index.js require.define('for-each', function (module, exports, __dirname, __filename) { var isFunction = require('is-function'); module.exports = forEach; var toString = Object.prototype.toString; var hasOwnProperty = Object.prototype.hasOwnProperty; function forEach(list, iterator, context) { if (!isFunction(iterator)) { throw new TypeError('iterator must be a function') } if (arguments.length < 3) { context = this } if (toString.call(list) === '[object Array]') forEachArray(list, iterator, context); else if (typeof list === 'string') forEachString(list, iterator, context); else forEachObject(list, iterator, context) } function forEachArray(array, iterator, context) { for (var i = 0, len = array.length; i < len; i++) { if (hasOwnProperty.call(array, i)) { iterator.call(context, array[i], i, array) } } } function forEachString(string, iterator, context) { for (var i = 0, len = string.length; i < len; i++) { // no such thing as a sparse string. iterator.call(context, string.charAt(i), i, string) } } function forEachObject(object, iterator, context) { for (var k in object) { if (hasOwnProperty.call(object, k)) { iterator.call(context, object[k], k, object) } } } }); // source: node_modules/is-function/index.js require.define('is-function', function (module, exports, __dirname, __filename) { module.exports = isFunction; var toString = Object.prototype.toString; function isFunction(fn) { var string = toString.call(fn); return string === '[object Function]' || typeof fn === 'function' && string !== '[object RegExp]' || typeof window !== 'undefined' && (fn === window.setTimeout || fn === window.alert || fn === window.confirm || fn === window.prompt) } ; }); // source: node_modules/object-assign/index.js require.define('object-assign', function (module, exports, __dirname, __filename) { /* eslint-disable no-unused-vars */ 'use strict'; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined') } return Object(val) } module.exports = Object.assign || function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key] } } if (Object.getOwnPropertySymbols) { symbols = Object.getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]] } } } } return to } }); // source: node_modules/broken/lib/index.js require.define('broken/lib', function (module, exports, __dirname, __filename) { // Generated by CoffeeScript 1.10.0 var Promise, PromiseInspection; Promise = require('zousan/zousan-min'); Promise.suppressUncaughtRejectionError = true; PromiseInspection = function () { function PromiseInspection(arg) { this.state = arg.state, this.value = arg.value, this.reason = arg.reason } PromiseInspection.prototype.isFulfilled = function () { return this.state === 'fulfilled' }; PromiseInspection.prototype.isRejected = function () { return this.state === 'rejected' }; return PromiseInspection }(); Promise.reflect = function (promise) { return new Promise(function (resolve, reject) { return promise.then(function (value) { return resolve(new PromiseInspection({ state: 'fulfilled', value: value })) })['catch'](function (err) { return resolve(new PromiseInspection({ state: 'rejected', reason: err })) }) }) }; Promise.settle = function (promises) { return Promise.all(promises.map(Promise.reflect)) }; Promise.prototype.callback = function (cb) { if (typeof cb === 'function') { this.then(function (value) { return cb(null, value) }); this['catch'](function (error) { return cb(error, null) }) } return this }; module.exports = Promise //# sourceMappingURL=index.js.map }); // source: node_modules/zousan/zousan-min.js require.define('zousan/zousan-min', function (module, exports, __dirname, __filename) { !function (t) { 'use strict'; function e(t) { if (t) { var e = this; t(function (t) { e.resolve(t) }, function (t) { e.reject(t) }) } } function n(t, e) { if ('function' == typeof t.y) try { var n = t.y.call(i, e); t.p.resolve(n) } catch (o) { t.p.reject(o) } else t.p.resolve(e) } function o(t, e) { if ('function' == typeof t.n) try { var n = t.n.call(i, e); t.p.resolve(n) } catch (o) { t.p.reject(o) } else t.p.reject(e) } var r, i, c = 'fulfilled', u = 'rejected', s = 'undefined', f = function () { function t() { for (; e.length - n;) e[n](), n++, n == o && (e.splice(0, o), n = 0) } var e = [], n = 0, o = 1024, r = function () { if (typeof MutationObserver !== s) { var e = document.createElement('div'), n = new MutationObserver(t); return n.observe(e, { attributes: !0 }), function () { e.setAttribute('a', 0) } } return typeof setImmediate !== s ? function () { setImmediate(t) } : function () { setTimeout(t, 0) } }(); return function (t) { e.push(t), e.length - n == 1 && r() } }(); e.prototype = { resolve: function (t) { if (this.state === r) { if (t === this) return this.reject(new TypeError('Attempt to resolve promise with self')); var e = this; if (t && ('function' == typeof t || 'object' == typeof t)) try { var o = !0, i = t.then; if ('function' == typeof i) return void i.call(t, function (t) { o && (o = !1, e.resolve(t)) }, function (t) { o && (o = !1, e.reject(t)) }) } catch (u) { return void (o && this.reject(u)) } this.state = c, this.v = t, e.c && f(function () { for (var o = 0, r = e.c.length; r > o; o++) n(e.c[o], t) }) } }, reject: function (t) { if (this.state === r) { this.state = u, this.v = t; var n = this.c; n ? f(function () { for (var e = 0, r = n.length; r > e; e++) o(n[e], t) }) : e.suppressUncaughtRejectionError || void 0 } }, then: function (t, i) { var u = new e, s = { y: t, n: i, p: u }; if (this.state === r) this.c ? this.c.push(s) : this.c = [s]; else { var l = this.state, a = this.v; f(function () { l === c ? n(s, a) : o(s, a) }) } return u }, 'catch': function (t) { return this.then(null, t) }, 'finally': function (t) { return this.then(t, t) }, timeout: function (t, n) { n = n || 'Timeout'; var o = this; return new e(function (e, r) { setTimeout(function () { r(Error(n)) }, t), o.then(function (t) { e(t) }, function (t) { r(t) }) }) } }, e.resolve = function (t) { var n = new e; return n.resolve(t), n }, e.reject = function (t) { var n = new e; return n.reject(t), n }, e.all = function (t) { function n(n, c) { 'function' != typeof n.then && (n = e.resolve(n)), n.then(function (e) { o[c] = e, r++, r == t.length && i.resolve(o) }, function (t) { i.reject(t) }) } for (var o = [], r = 0, i = new e, c = 0; c < t.length; c++) n(t[c], c); return t.length || i.resolve(o), i }, typeof module != s && module.exports && (module.exports = e), t.Zousan = e, e.soon = f }('undefined' != typeof global ? global : this) }); // source: node_modules/js-cookie/src/js.cookie.js require.define('js-cookie/src/js.cookie', function (module, exports, __dirname, __filename) { /*! * JavaScript Cookie v2.1.0 * https://github.com/js-cookie/js-cookie * * Copyright 2006, 2015 Klaus Hartl & Fagner Brack * Released under the MIT license */ (function (factory) { if (typeof define === 'function' && define.amd) { define(factory) } else if (typeof exports === 'object') { module.exports = factory() } else { var _OldCookies = window.Cookies; var api = window.Cookies = factory(); api.noConflict = function () { window.Cookies = _OldCookies; return api } } }(function () { function extend() { var i = 0; var result = {}; for (; i < arguments.length; i++) { var attributes = arguments[i]; for (var key in attributes) { result[key] = attributes[key] } } return result } function init(converter) { function api(key, value, attributes) { var result; // Write if (arguments.length > 1) { attributes = extend({ path: '/' }, api.defaults, attributes); if (typeof attributes.expires === 'number') { var expires = new Date; expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 86400000); attributes.expires = expires } try { result = JSON.stringify(value); if (/^[\{\[]/.test(result)) { value = result } } catch (e) { } if (!converter.write) { value = encodeURIComponent(String(value)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent) } else { value = converter.write(value, key) } key = encodeURIComponent(String(key)); key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent); key = key.replace(/[\(\)]/g, escape); return document.cookie = [ key, '=', value, attributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE attributes.path && '; path=' + attributes.path, attributes.domain && '; domain=' + attributes.domain, attributes.secure ? '; secure' : '' ].join('') } // Read if (!key) { result = {} } // To prevent the for loop in the first place assign an empty array // in case there are no cookies at all. Also prevents odd result when // calling "get()" var cookies = document.cookie ? document.cookie.split('; ') : []; var rdecode = /(%[0-9A-Z]{2})+/g; var i = 0; for (; i < cookies.length; i++) { var parts = cookies[i].split('='); var name = parts[0].replace(rdecode, decodeURIComponent); var cookie = parts.slice(1).join('='); if (cookie.charAt(0) === '"') { cookie = cookie.slice(1, -1) } try { cookie = converter.read ? converter.read(cookie, name) : converter(cookie, name) || cookie.replace(rdecode, decodeURIComponent); if (this.json) { try { cookie = JSON.parse(cookie) } catch (e) { } } if (key === name) { result = cookie; break } if (!key) { result[name] = cookie } } catch (e) { } } return result } api.get = api.set = api; api.getJSON = function () { return api.apply({ json: true }, [].slice.call(arguments)) }; api.defaults = {}; api.remove = function (key, attributes) { api(key, '', extend(attributes, { expires: -1 })) }; api.withConverter = init; return api } return init(function () { }) })) }); // source: src/blueprints/browser.coffee require.define('./blueprints/browser', function (module, exports, __dirname, __filename) { var blueprints, byId, createBlueprint, fn, i, isFunction, len, model, models, ref, ref1, statusCreated, statusNoContent, statusOk, storePrefixed, userModels; ref = require('./utils'), isFunction = ref.isFunction, statusCreated = ref.statusCreated, statusNoContent = ref.statusNoContent, statusOk = ref.statusOk; ref1 = require('./blueprints/url'), byId = ref1.byId, storePrefixed = ref1.storePrefixed; createBlueprint = function (name) { var endpoint; endpoint = '/' + name; return { list: { url: endpoint, method: 'GET' }, get: { url: byId(name), method: 'GET' } } }; blueprints = { account: { get: { url: '/account', method: 'GET' }, update: { url: '/account', method: 'PATCH' }, exists: { url: function (x) { var ref2, ref3, ref4; return '/account/exists/' + ((ref2 = (ref3 = (ref4 = x.email) != null ? ref4 : x.username) != null ? ref3 : x.id) != null ? ref2 : x) }, method: 'GET', process: function (res) { return res.data.exists } }, create: { url: '/account/create', expects: statusCreated }, enable: { url: function (x) { var ref2; return '/account/enable/' + ((ref2 = x.tokenId) != null ? ref2 : x) } }, login: { url: '/account/login', process: function (res) { this.setUserKey(res.data.token); return res } }, logout: function () { return this.deleteUserKey() }, reset: { url: '/account/reset' }, confirm: { url: function (x) { var ref2; return '/account/confirm/' + ((ref2 = x.tokenId) != null ? ref2 : x) } } }, checkout: { authorize: { url: storePrefixed('/checkout/authorize') }, capture: { url: storePrefixed(function (x) { var ref2; return '/checkout/capture/' + ((ref2 = x.orderId) != null ? ref2 : x) }) }, charge: { url: storePrefixed('/checkout/charge') }, paypal: { url: storePrefixed('/checkout/paypal') } }, referrer: { create: { url: '/referrer', expects: statusCreated } } }; models = [ 'collection', 'coupon', 'product', 'variant' ]; userModels = [ 'order', 'subscription' ]; fn = function (model) { return blueprints[model] = createBlueprint(model) }; for (i = 0, len = models.length; i < len; i++) { model = models[i]; fn(model) } module.exports = blueprints }); // source: src/blueprints/url.coffee require.define('./blueprints/url', function (module, exports, __dirname, __filename) { var isFunction, sp; isFunction = require('./utils').isFunction; exports.storePrefixed = sp = function (u) { return function (x) { var url; if (isFunction(u)) { url = u(x) } else { url = u } if (this.storeId != null) { return '/store/' + this.storeId + url } else { return url } } }; exports.byId = function (name) { switch (name) { case 'coupon': return sp(function (x) { var ref; return '/coupon/' + ((ref = x.code) != null ? ref : x) }); case 'collection': return sp(function (x) { var ref; return '/collection/' + ((ref = x.slug) != null ? ref : x) }); case 'product': return sp(function (x) { var ref, ref1; return '/product/' + ((ref = (ref1 = x.id) != null ? ref1 : x.slug) != null ? ref : x) }); case 'variant': return sp(function (x) { var ref, ref1; return '/variant/' + ((ref = (ref1 = x.id) != null ? ref1 : x.sku) != null ? ref : x) }); default: return function (x) { var ref; return '/' + name + '/' + ((ref = x.id) != null ? ref : x) } } } }); // source: src/browser.coffee require.define('./browser', function (module, exports, __dirname, __filename) { var Api, Client; if (global.Crowdstart == null) { global.Crowdstart = {} } Api = require('./api'); Client = require('./client/xhr'); Api.CLIENT = Client; Api.BLUEPRINTS = require('./blueprints/browser'); Crowdstart.Api = Api; Crowdstart.Client = Client; module.exports = Crowdstart }); require('./browser') }.call(this, this))//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwaS5jb2ZmZWUiLCJ1dGlscy5jb2ZmZWUiLCJjbGllbnQveGhyLmNvZmZlZSIsIm5vZGVfbW9kdWxlcy94aHItcHJvbWlzZS1lczYvbGliL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL3BhcnNlLWhlYWRlcnMvcGFyc2UtaGVhZGVycy5qcyIsIm5vZGVfbW9kdWxlcy90cmltL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL2Zvci1lYWNoL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL2lzLWZ1bmN0aW9uL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL29iamVjdC1hc3NpZ24vaW5kZXguanMiLCJub2RlX21vZHVsZXMvYnJva2VuL2xpYi9pbmRleC5qcyIsIm5vZGVfbW9kdWxlcy96b3VzYW4vem91c2FuLW1pbi5qcyIsIm5vZGVfbW9kdWxlcy9qcy1jb29raWUvc3JjL2pzLmNvb2tpZS5qcyIsImJsdWVwcmludHMvYnJvd3Nlci5jb2ZmZWUiLCJibHVlcHJpbnRzL3VybC5jb2ZmZWUiLCJicm93c2VyLmNvZmZlZSJdLCJuYW1lcyI6WyJBcGkiLCJpc0Z1bmN0aW9uIiwiaXNTdHJpbmciLCJuZXdFcnJvciIsInJlZiIsInN0YXR1c09rIiwicmVxdWlyZSIsIm1vZ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