{"version":3,"sources":["jsdelivr-header.js","/npm/shopify-api@0.2.3/lib/shopify.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACCA,IAAI,UAAY,CACd,MAAO,QAAQ,qBACf,YAAa,QAAQ,2BACrB,MAAO,QAAQ,sBAGjB,SAAS,QAAQ,GACf,KAAM,gBAAgB,SACpB,OAAO,IAAI,QAAQ,GAGrB,EAAU,GAAW,CAAC,EAEtB,KAAK,KAAO,CACV,KAAM,EAAQ,MAAQ,KACtB,KAAM,EAAQ,MAAQ,QAAQ,aAC9B,KAAM,EAAQ,MAAQ,QAAQ,aAC9B,QAAS,EAAQ,SAAW,QAAQ,iBAGtC,KAAK,gBACP,CAEA,QAAQ,aAAe,KACvB,QAAQ,aAAe,IACvB,QAAQ,gBAAkB,KAE1B,QAAQ,UAAU,eAAiB,WACjC,IAAK,IAAI,KAAQ,UACf,KAAK,GAAQ,IAAI,UAAU,GAAM,KAErC,EAEA,QAAQ,UAAU,aAAe,SAAS,EAAK,GAC7C,KAAK,KAAK,GAAO,CACnB,EAEA,QAAQ,UAAU,YAAc,SAAS,GACvC,OAAO,KAAK,KAAK,EACnB,EAEA,QAAQ,UAAU,QAAU,SAAS,EAAK,GACpC,GAAO,GACT,KAAK,aAAa,OAAQ,EAAM,IAAM,EAE1C,EAEA,QAAQ,UAAU,QAAU,SAAS,EAAM,GACzC,KAAK,aAAa,OAAQ,GACtB,GACF,KAAK,QAAQ,EAEjB,EAEA,QAAQ,UAAU,QAAU,SAAS,GACnC,KAAK,aAAa,OAAQ,EAC5B,EAEA,QAAQ,UAAU,WAAa,SAAS,GACtC,KAAK,aACH,UACY,OAAZ,EAAmB,QAAQ,gBAAkB,EAEjD,EAEA,OAAO,QAAU","file":"/npm/shopify-api@0.2.3/lib/shopify.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/shopify-api@0.2.3/lib/shopify.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\r\n * node-shopify-api\r\n *\r\n * Copyright (c) 2014 Chris Talkington, contributors.\r\n * Licensed under the MIT license.\r\n * https://github.com/ctalkington/node-shopify-api/blob/master/LICENSE-MIT\r\n */\r\nvar resources = {\r\n  asset: require('./resources/asset'),\r\n  assetLegacy: require('./resources/assetLegacy'),\r\n  theme: require('./resources/theme')\r\n};\r\n\r\nfunction Shopify(options) {\r\n  if (!(this instanceof Shopify)) {\r\n    return new Shopify(options);\r\n  }\r\n\r\n  options = options || {};\r\n\r\n  this._api = {\r\n    auth: options.auth || null,\r\n    host: options.host || Shopify.DEFAULT_HOST,\r\n    port: options.port || Shopify.DEFAULT_PORT,\r\n    timeout: options.timeout || Shopify.DEFAULT_TIMEOUT\r\n  };\r\n\r\n  this._initResources();\r\n}\r\n\r\nShopify.DEFAULT_HOST = null;\r\nShopify.DEFAULT_PORT = 443;\r\nShopify.DEFAULT_TIMEOUT = 120000;\r\n\r\nShopify.prototype._initResources = function() {\r\n  for (var name in resources) {\r\n    this[name] = new resources[name](this);\r\n  }\r\n};\r\n\r\nShopify.prototype._setApiField = function(key, value) {\r\n  this._api[key] = value;\r\n};\r\n\r\nShopify.prototype.getApiField = function(key) {\r\n  return this._api[key];\r\n};\r\n\r\nShopify.prototype.setAuth = function(key, passwd) {\r\n  if (key && passwd) {\r\n    this._setApiField('auth', key + ':' + passwd);\r\n  }\r\n};\r\n\r\nShopify.prototype.setHost = function(host, port) {\r\n  this._setApiField('host', host);\r\n  if (port) {\r\n    this.setPort(port);\r\n  }\r\n};\r\n\r\nShopify.prototype.setPort = function(port) {\r\n  this._setApiField('port', port);\r\n};\r\n\r\nShopify.prototype.setTimeout = function(timeout) {\r\n  this._setApiField(\r\n    'timeout',\r\n    timeout === null ? Shopify.DEFAULT_TIMEOUT : timeout\r\n  );\r\n};\r\n\r\nmodule.exports = Shopify;"]}