@plattar/plattar-api
Version:
Module for interfacing with the Plattar API (https://www.plattar.com)
1 lines • 70.7 kB
JavaScript
"use strict";function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e))}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e)}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_setPrototypeOf(t,e)}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}(function(f){if((typeof exports==="undefined"?"undefined":_typeof(exports))==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Plattar=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r}()({1:[function(require,module,exports){"use strict";var Server=require("./server/plattar-server.js");var Util=require("./util/plattar-util.js");var Project=require("./types/application.js");var Scene=require("./types/scene/scene.js");var SceneAnnotation=require("./types/scene/scene-annotation.js");var SceneAudio=require("./types/scene/scene-audio.js");var SceneButton=require("./types/scene/scene-button.js");var SceneCamera=require("./types/scene/scene-camera.js");var SceneCarousel=require("./types/scene/scene-carousel.js");var SceneImage=require("./types/scene/scene-image.js");var SceneModel=require("./types/scene/scene-model.js");var ScenePanorama=require("./types/scene/scene-panorama.js");var ScenePoller=require("./types/scene/scene-poller.js");var SceneProduct=require("./types/scene/scene-product.js");var SceneShadow=require("./types/scene/scene-shadow.js");var SceneVideo=require("./types/scene/scene-video.js");var SceneVolumetric=require("./types/scene/scene-volumetric.js");var SceneYoutube=require("./types/scene/scene-youtube.js");var SceneScript=require("./types/scene/scene-script.js");var SceneGallery=require("./types/scene/scene-gallery.js");var SceneGalleryImage=require("./types/scene/scene-gallery-image.js");var Page=require("./types/page/page.js");var CardButton=require("./types/page/card-button.js");var CardHTML=require("./types/page/card-html.js");var CardIFrame=require("./types/page/card-iframe.js");var CardImage=require("./types/page/card-image.js");var CardMap=require("./types/page/card-map.js");var CardParagraph=require("./types/page/card-paragraph.js");var CardRow=require("./types/page/card-row.js");var CardSlider=require("./types/page/card-slider.js");var CardTitle=require("./types/page/card-title.js");var CardVideo=require("./types/page/card-video.js");var CardYoutube=require("./types/page/card-youtube.js");var Product=require("./types/product/product.js");var ProductVariation=require("./types/product/product-variation.js");var ProductAnnotation=require("./types/product/product-annotation.js");var FileAudio=require("./types/file/file-audio.js");var FileVideo=require("./types/file/file-video.js");var FileModel=require("./types/file/file-model.js");var FileImage=require("./types/file/file-image.js");var FileScript=require("./types/file/file-script.js");var ScriptEvent=require("./types/misc/script-event.js");var Tag=require("./types/misc/tag.js");var ApplicationBuild=require("./types/misc/application-build.js");var AsyncJob=require("./types/misc/async-job.js");var AssetLibrary=require("./types/misc/asset-library.js");var TriggerImage=require("./types/trigger/trigger-image.js");var Brief=require("./types/content-pipeline/brief.js");var CommentBrief=require("./types/content-pipeline/comment-brief.js");var CommentQuote=require("./types/content-pipeline/comment-quote.js");var CommentSolution=require("./types/content-pipeline/comment-solution.js");var PipelineUser=require("./types/content-pipeline/pipeline-user.js");var Quote=require("./types/content-pipeline/quote.js");var Rating=require("./types/content-pipeline/rating.js");var Solution=require("./types/content-pipeline/solution.js");var Folder=require("./types/content-pipeline/folder.js");var SceneObject=require("./types/scene/scene-base.js");var CardObject=require("./types/page/card-base.js");var ProductObject=require("./types/product/product-base.js");var FileObject=require("./types/file/file-base.js");var Version=require("./version");Server.create();console.log("using @plattar/plattar-api v"+Version);module.exports={Server:Server,Util:Util,Project:Project,Scene:Scene,SceneAnnotation:SceneAnnotation,SceneAudio:SceneAudio,SceneButton:SceneButton,SceneCamera:SceneCamera,SceneCarousel:SceneCarousel,SceneImage:SceneImage,SceneModel:SceneModel,ScenePanorama:ScenePanorama,ScenePoller:ScenePoller,SceneProduct:SceneProduct,SceneShadow:SceneShadow,SceneVideo:SceneVideo,SceneVolumetric:SceneVolumetric,SceneYoutube:SceneYoutube,SceneScript:SceneScript,SceneGallery:SceneGallery,SceneGalleryImage:SceneGalleryImage,Page:Page,CardButton:CardButton,CardHTML:CardHTML,CardIFrame:CardIFrame,CardImage:CardImage,CardMap:CardMap,CardParagraph:CardParagraph,CardRow:CardRow,CardSlider:CardSlider,CardTitle:CardTitle,CardVideo:CardVideo,CardYoutube:CardYoutube,Product:Product,ProductVariation:ProductVariation,ProductAnnotation:ProductAnnotation,FileAudio:FileAudio,FileVideo:FileVideo,FileModel:FileModel,FileImage:FileImage,FileScript:FileScript,FileObject:FileObject,ScriptEvent:ScriptEvent,Tag:Tag,ApplicationBuild:ApplicationBuild,AsyncJob:AsyncJob,AssetLibrary:AssetLibrary,TriggerImage:TriggerImage,Brief:Brief,CommentBrief:CommentBrief,CommentQuote:CommentQuote,CommentSolution:CommentSolution,PipelineUser:PipelineUser,Quote:Quote,Rating:Rating,Solution:Solution,Folder:Folder,SceneObject:SceneObject,CardObject:CardObject,ProductObject:ProductObject,version:Version}},{"./server/plattar-server.js":5,"./types/application.js":6,"./types/content-pipeline/brief.js":7,"./types/content-pipeline/comment-brief.js":8,"./types/content-pipeline/comment-quote.js":9,"./types/content-pipeline/comment-solution.js":10,"./types/content-pipeline/folder.js":11,"./types/content-pipeline/pipeline-user.js":12,"./types/content-pipeline/quote.js":13,"./types/content-pipeline/rating.js":14,"./types/content-pipeline/solution.js":15,"./types/file/file-audio.js":16,"./types/file/file-base.js":17,"./types/file/file-image.js":18,"./types/file/file-model.js":19,"./types/file/file-script.js":20,"./types/file/file-video.js":21,"./types/misc/application-build.js":25,"./types/misc/asset-library.js":26,"./types/misc/async-job.js":27,"./types/misc/script-event.js":28,"./types/misc/tag.js":29,"./types/page/card-base.js":30,"./types/page/card-button.js":31,"./types/page/card-html.js":32,"./types/page/card-iframe.js":33,"./types/page/card-image.js":34,"./types/page/card-map.js":35,"./types/page/card-paragraph.js":36,"./types/page/card-row.js":37,"./types/page/card-slider.js":38,"./types/page/card-title.js":39,"./types/page/card-video.js":40,"./types/page/card-youtube.js":41,"./types/page/page.js":42,"./types/product/product-annotation.js":43,"./types/product/product-base.js":44,"./types/product/product-variation.js":45,"./types/product/product.js":46,"./types/scene/scene-annotation.js":47,"./types/scene/scene-audio.js":48,"./types/scene/scene-base.js":49,"./types/scene/scene-button.js":50,"./types/scene/scene-camera.js":51,"./types/scene/scene-carousel.js":52,"./types/scene/scene-gallery-image.js":53,"./types/scene/scene-gallery.js":54,"./types/scene/scene-image.js":55,"./types/scene/scene-model.js":56,"./types/scene/scene-panorama.js":57,"./types/scene/scene-poller.js":58,"./types/scene/scene-product.js":59,"./types/scene/scene-script.js":60,"./types/scene/scene-shadow.js":61,"./types/scene/scene-video.js":62,"./types/scene/scene-volumetric.js":63,"./types/scene/scene-youtube.js":64,"./types/scene/scene.js":65,"./types/trigger/trigger-image.js":66,"./util/plattar-util.js":67,"./version":68}],2:[function(require,module,exports){(function(global){(function(){"use strict";var getGlobal=function getGlobal(){if(typeof self!=="undefined"){return self}if(typeof window!=="undefined"){return window}if(typeof global!=="undefined"){return global}throw new Error("unable to locate global object")};var globalObject=getGlobal();module.exports=exports=globalObject.fetch;if(globalObject.fetch){exports["default"]=globalObject.fetch.bind(globalObject)}exports.Headers=globalObject.Headers;exports.Request=globalObject.Request;exports.Response=globalObject.Response}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],3:[function(require,module,exports){var process=module.exports={};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){cachedSetTimeout=setTimeout}else{cachedSetTimeout=defaultSetTimout}}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeof clearTimeout==="function"){cachedClearTimeout=clearTimeout}else{cachedClearTimeout=defaultClearTimeout}}catch(e){cachedClearTimeout=defaultClearTimeout}})();function runTimeout(fun){if(cachedSetTimeout===setTimeout){return setTimeout(fun,0)}if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0)}try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout){return clearTimeout(marker)}if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker)}try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue)}};function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.prependListener=noop;process.prependOnceListener=noop;process.listeners=function(name){return[]};process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},{}],4:[function(require,module,exports){var fetch=require("node-fetch");var PlattarQuery=function(){function PlattarQuery(target,server){_classCallCheck(this,PlattarQuery);if(!target){throw new Error("PlattarQuery cannot be created as target object cannot be null")}if(!server){throw new Error("PlattarQuery cannot be created as server object cannot be null")}this._target=target;this._server=server;this._params=[];this._getIncludeQuery=[]}return _createClass(PlattarQuery,[{key:"target",get:function get(){return this._target}},{key:"server",get:function get(){return this._server}},{key:"getCookie",value:function getCookie(cname){try{var name=cname+"=";var decodedCookie=decodeURIComponent(document.cookie);var ca=decodedCookie.split(";");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1)}if(c.indexOf(name)==0){return c.substring(name.length,c.length)}}}catch(error){}return""}},{key:"_get",value:function _get(opt){var _this=this;return new Promise(function(resolve,reject){var target=_this.target;var server=_this.server;if(!target.id){reject(new Error("PlattarQuery."+target.type()+".get() - object id is missing"));return}var options=opt||{cache:true};if(options.cache===true){var cached=PlattarQuery._GetGlobalCachedObject(target);if(cached){resolve(cached);return}}var origin=server.originLocation.api_read;var auth=server.authToken;var headers={cookie:"laravel_session="+_this.getCookie("laravel_session")};Object.assign(headers,auth);var reqopts={method:"GET",headers:headers};var includeQuery=_this._IncludeQuery;var params=_this._ParamFor("get");var endpoint=origin+target.type()+"/"+target.id;if(includeQuery){endpoint=endpoint+"?include="+includeQuery}if(params){var appender=includeQuery?"&":"?";params.forEach(function(param){endpoint=endpoint+appender+param.key+"="+param.value;appender="&"})}fetch(endpoint,reqopts).then(function(res){if(res.ok){try{return res.json()}catch(err){return new Error("PlattarQuery."+target.type()+".get("+target.id+") - critical error occured, cannot proceed")}}return new Error("PlattarQuery."+target.type()+".get("+target.id+") - unexpected error occured, cannot proceed. error message is "+res.statusText)}).then(function(json){if(json instanceof Error){reject(json)}else{var PlattarUtil=require("../util/plattar-util.js");PlattarUtil.reconstruct(target,json,options);resolve(target)}})})}},{key:"_update",value:function _update(){var _this2=this;return new Promise(function(resolve,reject){var target=_this2.target;var server=_this2.server;if(!target.id){reject(new Error("PlattarQuery."+target.type()+".update() - object id is missing"));return}var origin=server.originLocation.api_write;var auth=server.authToken;var headers={Accept:"application/json","Content-Type":"application/json",cookie:"laravel_session="+_this2.getCookie("laravel_session")};Object.assign(headers,auth);var reqopts={method:"PATCH",headers:headers,body:JSON.stringify({data:{id:target.id,attributes:target.attributes},meta:target.meta||{}})};var params=_this2._ParamFor("update");var endpoint=origin+target.type()+"/"+target.id;if(params){var appender="?";params.forEach(function(param){endpoint=endpoint+appender+param.key+"="+param.value;appender="&"})}fetch(endpoint,reqopts).then(function(res){if(res.ok){try{return res.json()}catch(err){return new Error("PlattarQuery."+target.type()+".update("+target.id+") - critical error occured, cannot proceed")}}return new Error("PlattarQuery."+target.type()+".update("+target.id+") - unexpected error occured, cannot proceed. error message is "+res.statusText)}).then(function(json){if(json instanceof Error){reject(json)}else{if(json.data){var PlattarUtil=require("../util/plattar-util.js");PlattarUtil.reconstruct(target,json,{cache:true})}resolve(target)}})})}},{key:"_create",value:function _create(){var _this3=this;return new Promise(function(resolve,reject){var target=_this3.target;var server=_this3.server;var origin=server.originLocation.api_write;var auth=server.authToken;var headers={Accept:"application/json","Content-Type":"application/json",cookie:"laravel_session="+_this3.getCookie("laravel_session")};Object.assign(headers,auth);var reqopts={method:"POST",headers:headers,body:JSON.stringify({data:{attributes:target.attributes},meta:target.meta||{}})};var params=_this3._ParamFor("create");var endpoint=origin+target.type();if(params){var appender="?";params.forEach(function(param){endpoint=endpoint+appender+param.key+"="+param.value;appender="&"})}fetch(endpoint,reqopts).then(function(res){if(res.ok){try{return res.json()}catch(err){return new Error("PlattarQuery."+target.type()+".create() - critical error occured, cannot proceed")}}return new Error("PlattarQuery."+target.type()+".create() - unexpected error occured, cannot proceed. error message is "+res.statusText)}).then(function(json){if(json instanceof Error){reject(json)}else{if(json.data){target._id=json.data.id;var PlattarUtil=require("../util/plattar-util.js");PlattarUtil.reconstruct(target,json,{cache:true})}resolve(target)}})})}},{key:"_delete",value:function _delete(){var _this4=this;return new Promise(function(resolve,reject){var target=_this4.target;var server=_this4.server;if(!target.id){reject(new Error("PlattarQuery."+target.type()+".delete() - object id is missing"));return}var origin=server.originLocation.api_write;var auth=server.authToken;var headers={Accept:"application/json","Content-Type":"application/json",cookie:"laravel_session="+_this4.getCookie("laravel_session")};Object.assign(headers,auth);var reqopts={method:"DELETE",headers:headers,body:JSON.stringify({data:{id:target.id,attributes:target.attributes},meta:target.meta||{}})};var params=_this4._ParamFor("delete");var endpoint=origin+target.type()+"/"+target.id;if(params){var appender="?";params.forEach(function(param){endpoint=endpoint+appender+param.key+"="+param.value;appender="&"})}fetch(endpoint,reqopts).then(function(res){if(res.ok){try{return res.json()}catch(err){return new Error("PlattarQuery."+target.type()+".delete() - critical error occured, cannot proceed")}}return new Error("PlattarQuery."+target.type()+".delete() - unexpected error occured, cannot proceed. error message is "+res.statusText)}).then(function(json){if(json instanceof Error){reject(json)}else{if(json.data){target._id=json.data.id;var PlattarUtil=require("../util/plattar-util.js");PlattarUtil.reconstruct(target,json,{cache:true})}resolve(target)}})})}},{key:"_addParameter",value:function _addParameter(key,value,type){type=type||"all";this._params.push({key:key,value:value,type:type.toLowerCase()})}},{key:"_include",value:function _include(args){var _this5=this;if(!args||args.length<=0){return this}var PlattarUtil=require("../util/plattar-util.js");args.forEach(function(obj){if(Array.isArray(obj)){obj.forEach(function(strObject){if(typeof strObject==="string"||strObject instanceof String){_this5._getIncludeQuery.push(strObject)}else{throw new Error("PlattarQuery."+_this5.target.type()+".include(...args) - argument of Array must only include Strings")}})}else if(PlattarUtil.isPlattarObject(obj)){var type=obj.type();if(Array.isArray(type)){_this5._include(type)}else{_this5._getIncludeQuery.push(type)}}else{throw new Error("PlattarQuery."+_this5.target.type()+".include(...args) - argument must be of type PlattarObject or Array but was type="+_typeof(obj)+" value="+obj)}});return this}},{key:"_ParamFor",value:function _ParamFor(type){type=type||"all";var list=this._params.filter(function(objcheck){return objcheck.type===type||objcheck.type==="all"});if(list.length>0){return list}return undefined}},{key:"_IncludeQuery",get:function get(){if(this._getIncludeQuery.length<=0){return undefined}return"".concat(this._getIncludeQuery.map(function(item){return"".concat(item)}).join(","))}}])}();PlattarQuery._GlobalObjectCache={};PlattarQuery._InvalidateGlobalCache=function(){PlattarQuery._GlobalObjectCache={}};PlattarQuery._HasGlobalCachedObject=function(obj){return PlattarQuery._GlobalObjectCache.hasOwnProperty(obj.id)};PlattarQuery._GetGlobalCachedObject=function(obj){return PlattarQuery._HasGlobalCachedObject(obj)?PlattarQuery._GlobalObjectCache[obj.id]:undefined};PlattarQuery._SetGlobalCachedObject=function(obj){};PlattarQuery._DeleteGlobalCachedObject=function(obj){if(PlattarQuery._HasGlobalCachedObject(obj)){delete PlattarQuery._GlobalObjectCache[obj.id]}};module.exports=PlattarQuery},{"../util/plattar-util.js":67,"node-fetch":2}],5:[function(require,module,exports){(function(process){(function(){var fetch=require("node-fetch");var PlattarServer=function(){function PlattarServer(){_classCallCheck(this,PlattarServer);this._authToken={};this._serverLocation=this.prod}return _createClass(PlattarServer,[{key:"prod",get:function get(){return PlattarServer.match("prod")}},{key:"isProd",get:function get(){return this._serverLocation.type==="production"}},{key:"review",get:function get(){return PlattarServer.match("review")}},{key:"isReview",get:function get(){return this._serverLocation.type==="review"}},{key:"staging",get:function get(){return PlattarServer.match("staging")}},{key:"isStaging",get:function get(){return this._serverLocation.type==="staging"}},{key:"dev",get:function get(){return PlattarServer.match("dev")}},{key:"isDev",get:function get(){return this._serverLocation.type==="dev"}},{key:"authToken",get:function get(){return this._authToken}},{key:"originLocation",get:function get(){return this._serverLocation}},{key:"auth",value:function auth(token,opt){var _this6=this;var copt=opt||{validate:false};return new Promise(function(resolve,reject){var server=_this6.originLocation.api_write;if(!server){reject(new Error("Plattar.auth(token) - cannot authenticate as server not set via Plattar.origin(server)"));return}if(!token){reject(new Error("Plattar.auth(token) - token variable is undefined"));return}if(!copt.validate){_this6._authToken={"plattar-auth-token":token};resolve(_this6);return}var endpoint=server+"plattaruser/xauth/validate";var options={method:"GET",headers:{"plattar-auth-token":token}};fetch(endpoint,options).then(function(res){if(res.ok){_this6._authToken={"plattar-auth-token":token};resolve(_this6)}else{reject(new Error("Plattar.auth(token) - failed to validate authentication token at "+endpoint))}})})}},{key:"origin",value:function origin(server,opt){var _this7=this;var copt=opt||{validate:false};return new Promise(function(resolve,reject){if(!server){reject(new Error("Plattar.origin(server) - server variable is undefined"));return}if(!copt.validate){_this7._serverLocation=server;resolve(_this7);return}var endpoint=server.api_read+"ping";var options={method:"GET"};fetch(endpoint,options).then(function(res){if(res.ok){_this7._serverLocation=server;resolve(_this7)}else{reject(new Error("Plattar.origin(server) - failed to ping server at "+endpoint))}})})}}])}();PlattarServer.match=function(serverName){switch(serverName.toLowerCase()){case"staging.plattar.space":case"cdn-staging.plattar.space":case"staging":return{base:"https://staging.plattar.space/",api_read:"https://api.plattar.space/v3/",api_write:"https://api.plattar.space/v3/",cdn:"https://cdn-staging.plattar.space/",cdn_image:"https://images.plattar.space/",analytics:"https://c.plattar.space/api/v2/analytics",type:"staging"};case"app.plattar.com":case"cdn.plattar.com":case"prod":case"production":return{base:"https://app.plattar.com/",api_read:"https://api.plattar.com/v3/",api_write:"https://api.plattar.com/v3/",cdn:"https://cdn.plattar.com/",cdn_image:"https://images.plattar.com/",analytics:"https://c.plattar.space/api/v2/analytics",type:"production"};case"review.plattar.com":case"review":case"qa":return{base:"https://review.plattar.com/",api_read:"https://review-api.plattar.com/v3/",api_write:"https://review-api.plattar.com/v3/",cdn:"https://cdn.plattar.com/",cdn_image:"https://images.plattar.com/",analytics:"https://c.plattar.space/api/v2/analytics",type:"review"};case"dev":case"developer":case"development":case"local":case"localhost":default:return{base:"https://localhost/",api_read:"https://localhost:3000/v3/",api_write:"https://localhost:3000/v3/",cdn:"https://cdn-dev.plattar.space/",cdn_image:"https://images-dev.plattar.space/",analytics:"https://localhost:3000/api/v2/analytics/",type:"dev"}}};PlattarServer.create=function(origin,auth){var newServer=new PlattarServer;if(origin){newServer.origin(origin)}if(auth){newServer.auth(auth)}PlattarServer._default=newServer;return newServer};PlattarServer.disableTLS=function(){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0"};PlattarServer["default"]=function(){return PlattarServer._default};PlattarServer.location=function(){return PlattarServer["default"]().originLocation};module.exports=PlattarServer}).call(this)}).call(this,require("_process"))},{_process:3,"node-fetch":2}],6:[function(require,module,exports){var PlattarBase=require("./interfaces/plattar-base.js");var Application=function(_PlattarBase){function Application(){_classCallCheck(this,Application);return _callSuper(this,Application,arguments)}_inherits(Application,_PlattarBase);return _createClass(Application,null,[{key:"type",value:function type(){return"application"}}])}(PlattarBase);module.exports=Application},{"./interfaces/plattar-base.js":22}],7:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base");var Brief=function(_PlattarBase2){function Brief(){_classCallCheck(this,Brief);return _callSuper(this,Brief,arguments)}_inherits(Brief,_PlattarBase2);return _createClass(Brief,null,[{key:"type",value:function type(){return"brief"}}])}(PlattarBase);module.exports=Brief},{"../interfaces/plattar-base":22}],8:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base");var CommentBrief=function(_PlattarBase3){function CommentBrief(){_classCallCheck(this,CommentBrief);return _callSuper(this,CommentBrief,arguments)}_inherits(CommentBrief,_PlattarBase3);return _createClass(CommentBrief,null,[{key:"type",value:function type(){return"commentbrief"}}])}(PlattarBase);module.exports=CommentBrief},{"../interfaces/plattar-base":22}],9:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base");var CommentQuote=function(_PlattarBase4){function CommentQuote(){_classCallCheck(this,CommentQuote);return _callSuper(this,CommentQuote,arguments)}_inherits(CommentQuote,_PlattarBase4);return _createClass(CommentQuote,null,[{key:"type",value:function type(){return"commentquote"}}])}(PlattarBase);module.exports=CommentQuote},{"../interfaces/plattar-base":22}],10:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base");var CommentSolution=function(_PlattarBase5){function CommentSolution(){_classCallCheck(this,CommentSolution);return _callSuper(this,CommentSolution,arguments)}_inherits(CommentSolution,_PlattarBase5);return _createClass(CommentSolution,null,[{key:"type",value:function type(){return"commentsolution"}}])}(PlattarBase);module.exports=CommentSolution},{"../interfaces/plattar-base":22}],11:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base");var Folder=function(_PlattarBase6){function Folder(){_classCallCheck(this,Folder);return _callSuper(this,Folder,arguments)}_inherits(Folder,_PlattarBase6);return _createClass(Folder,null,[{key:"type",value:function type(){return"folder"}}])}(PlattarBase);module.exports=Folder},{"../interfaces/plattar-base":22}],12:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base");var PipelineUser=function(_PlattarBase7){function PipelineUser(){_classCallCheck(this,PipelineUser);return _callSuper(this,PipelineUser,arguments)}_inherits(PipelineUser,_PlattarBase7);return _createClass(PipelineUser,null,[{key:"type",value:function type(){return"pipelineuser"}}])}(PlattarBase);module.exports=PipelineUser},{"../interfaces/plattar-base":22}],13:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base");var Quote=function(_PlattarBase8){function Quote(){_classCallCheck(this,Quote);return _callSuper(this,Quote,arguments)}_inherits(Quote,_PlattarBase8);return _createClass(Quote,null,[{key:"type",value:function type(){return"quote"}}])}(PlattarBase);module.exports=Quote},{"../interfaces/plattar-base":22}],14:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base");var Rating=function(_PlattarBase9){function Rating(){_classCallCheck(this,Rating);return _callSuper(this,Rating,arguments)}_inherits(Rating,_PlattarBase9);return _createClass(Rating,null,[{key:"type",value:function type(){return"rating"}}])}(PlattarBase);module.exports=Rating},{"../interfaces/plattar-base":22}],15:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base");var Solution=function(_PlattarBase10){function Solution(){_classCallCheck(this,Solution);return _callSuper(this,Solution,arguments)}_inherits(Solution,_PlattarBase10);return _createClass(Solution,null,[{key:"type",value:function type(){return"solution"}}])}(PlattarBase);module.exports=Solution},{"../interfaces/plattar-base":22}],16:[function(require,module,exports){var FileBase=require("./file-base.js");var FileAudio=function(_FileBase){function FileAudio(){_classCallCheck(this,FileAudio);return _callSuper(this,FileAudio,arguments)}_inherits(FileAudio,_FileBase);return _createClass(FileAudio,null,[{key:"type",value:function type(){return"fileaudio"}}])}(FileBase);module.exports=FileAudio},{"./file-base.js":17}],17:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base.js");var Server=require("../../server/plattar-server.js");var FileBase=function(_PlattarBase11){function FileBase(id,server){var _this8;_classCallCheck(this,FileBase);_this8=_callSuper(this,FileBase,[id,server||Server["default"]()]);if(_this8.constructor===FileBase){throw new Error("FileBase is abstract and cannot be created")}return _this8}_inherits(FileBase,_PlattarBase11);return _createClass(FileBase,[{key:"sourcePath",get:function get(){if(!this.attributes.path){return null}return this.path+this.attributes.original_filename}},{key:"backupPath",get:function get(){if(!this.attributes.path){return null}return this.path+this.attributes.original_upload}},{key:"path",get:function get(){if(!this.attributes.path){return null}return this._query.server.originLocation.cdn+this.attributes.path}}],[{key:"type",value:function type(){var FileAudio=require("./file-audio.js");var FileVideo=require("./file-video.js");var FileModel=require("./file-model.js");var FileImage=require("./file-image.js");return[FileAudio,FileVideo,FileModel,FileImage]}}])}(PlattarBase);module.exports=FileBase},{"../../server/plattar-server.js":5,"../interfaces/plattar-base.js":22,"./file-audio.js":16,"./file-image.js":18,"./file-model.js":19,"./file-video.js":21}],18:[function(require,module,exports){var FileBase=require("./file-base.js");var FileImage=function(_FileBase2){function FileImage(){_classCallCheck(this,FileImage);return _callSuper(this,FileImage,arguments)}_inherits(FileImage,_FileBase2);return _createClass(FileImage,null,[{key:"type",value:function type(){return"fileimage"}}])}(FileBase);module.exports=FileImage},{"./file-base.js":17}],19:[function(require,module,exports){var FileBase=require("./file-base.js");var FileModel=function(_FileBase3){function FileModel(){_classCallCheck(this,FileModel);return _callSuper(this,FileModel,arguments)}_inherits(FileModel,_FileBase3);return _createClass(FileModel,null,[{key:"type",value:function type(){return"filemodel"}}])}(FileBase);module.exports=FileModel},{"./file-base.js":17}],20:[function(require,module,exports){var FileBase=require("./file-base.js");var FileScript=function(_FileBase4){function FileScript(){_classCallCheck(this,FileScript);return _callSuper(this,FileScript,arguments)}_inherits(FileScript,_FileBase4);return _createClass(FileScript,null,[{key:"type",value:function type(){return"filescript"}}])}(FileBase);module.exports=FileScript},{"./file-base.js":17}],21:[function(require,module,exports){var FileBase=require("./file-base.js");var FileVideo=function(_FileBase5){function FileVideo(){_classCallCheck(this,FileVideo);return _callSuper(this,FileVideo,arguments)}_inherits(FileVideo,_FileBase5);return _createClass(FileVideo,null,[{key:"type",value:function type(){return"filevideo"}}])}(FileBase);module.exports=FileVideo},{"./file-base.js":17}],22:[function(require,module,exports){var PlattarObject=require("./plattar-object.js");var Server=require("../../server/plattar-server.js");var PlattarBase=function(_PlattarObject){function PlattarBase(id,server){var _this9;_classCallCheck(this,PlattarBase);_this9=_callSuper(this,PlattarBase,[id,server||Server["default"]()]);if(_this9.constructor===PlattarBase){throw new Error("PlattarBase is abstract and cannot be created")}return _this9}_inherits(PlattarBase,_PlattarObject);return _createClass(PlattarBase)}(PlattarObject);module.exports=PlattarBase},{"../../server/plattar-server.js":5,"./plattar-object.js":24}],23:[function(require,module,exports){var PlattarObjectRelations=function(){function PlattarObjectRelations(parent){_classCallCheck(this,PlattarObjectRelations);this._parent=parent;this._relatedObjects={}}return _createClass(PlattarObjectRelations,[{key:"parent",get:function get(){return this._parent}},{key:"_put",value:function _put(obj){if(!obj){return this}var PlattarUtil=require("../../util/plattar-util.js");if(!PlattarUtil.isPlattarObject(obj)){throw new Error("PlattarObjectRelations._put(PlattarObject) - argument must be type of PlattarObject")}if(!this._relatedObjects.hasOwnProperty(obj.type())){this._relatedObjects[obj.type()]=[]}this._relatedObjects[obj.type()].push(obj)}},{key:"filter",value:function filter(obj,id){var _this10=this;if(!obj){return[]}var PlattarUtil=require("../../util/plattar-util.js");if(!PlattarUtil.isPlattarObject(obj)){throw new Error("PlattarObjectRelations.filter(PlattarObject) - argument must be type of PlattarObject")}var type=obj.type();if(Array.isArray(type)){var compiledList=[];type.forEach(function(inObject){var retArray=_this10.filter(inObject,id);if(retArray.length>0){compiledList=compiledList.concat(retArray)}});return compiledList}if(!this._relatedObjects.hasOwnProperty(type)){return[]}var list=this._relatedObjects[type];if(!id){return list}return list.filter(function(objcheck){return objcheck.id===id})}},{key:"find",value:function find(obj){var id=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;if(id===undefined){return undefined}var list=this.filter(obj,id);if(list.length<=0){return undefined}return list[0]}}])}();module.exports=PlattarObjectRelations},{"../../util/plattar-util.js":67}],24:[function(require,module,exports){var PlattarQuery=require("../../server/plattar-query.js");var PlattarObjectRelations=require("./plattar-object-relations.js");var PlattarObject=function(){function PlattarObject(id,server){_classCallCheck(this,PlattarObject);if(this.constructor===PlattarObject){throw new Error("PlattarObject is abstract and cannot be created")}this._id=id;this._attributes={};this._meta={};this._query=new PlattarQuery(this,server);this._relationships=new PlattarObjectRelations(this)}return _createClass(PlattarObject,[{key:"invalidate",value:function invalidate(){return PlattarQuery._DeleteGlobalCachedObject(this)}},{key:"_cache",value:function _cache(){return PlattarQuery._SetGlobalCachedObject(this)}},{key:"id",get:function get(){return this._id}},{key:"attributes",get:function get(){return this._attributes}},{key:"meta",get:function get(){return this._meta}},{key:"overrideAttributes",set:function set(attributes){this._attributes=Object.assign({},attributes)}},{key:"relationships",get:function get(){return this._relationships}},{key:"get",value:function get(opt){return this._query._get(opt)}},{key:"update",value:function update(){return this._query._update()}},{key:"create",value:function create(){return this._query._create()}},{key:"delete",value:function _delete(){return this._query._delete()}},{key:"type",value:function type(){return this.constructor.type()}},{key:"include",value:function include(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key]}this._query._include(args);return this}},{key:"addParameter",value:function addParameter(key,value,type){this._query._addParameter(key,value,type);return this}}],[{key:"type",value:function type(){throw new Error("PlattarObject.type() - not implemented")}},{key:"include",value:function include(){var _this11=this;for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2]}if(!args||args.length<=0){return[]}var includes=[this.type()];args.forEach(function(obj){if(Array.isArray(obj)){obj.forEach(function(strObject){if(typeof strObject==="string"||strObject instanceof String){includes.push("".concat(_this11.type(),".").concat(strObject))}else{throw new Error("PlattarObject."+_this11.type()+".include(...args) - argument of Array must only include Strings")}})}else if(obj.prototype instanceof PlattarObject){includes.push("".concat(_this11.type(),".").concat(obj.type()))}else{throw new Error("PlattarObject."+_this11.type()+".include(...args) - argument must be of type PlattarObject or Array but was type="+_typeof(obj)+" value="+obj)}});return includes}}])}();module.exports=PlattarObject},{"../../server/plattar-query.js":4,"./plattar-object-relations.js":23}],25:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base.js");var ApplicationBuild=function(_PlattarBase12){function ApplicationBuild(){_classCallCheck(this,ApplicationBuild);return _callSuper(this,ApplicationBuild,arguments)}_inherits(ApplicationBuild,_PlattarBase12);return _createClass(ApplicationBuild,null,[{key:"type",value:function type(){return"applicationbuild"}}])}(PlattarBase);module.exports=ApplicationBuild},{"../interfaces/plattar-base.js":22}],26:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base.js");var AssetLibrary=function(_PlattarBase13){function AssetLibrary(){_classCallCheck(this,AssetLibrary);return _callSuper(this,AssetLibrary,arguments)}_inherits(AssetLibrary,_PlattarBase13);return _createClass(AssetLibrary,null,[{key:"type",value:function type(){return"assetlibrary"}}])}(PlattarBase);module.exports=AssetLibrary},{"../interfaces/plattar-base.js":22}],27:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base.js");var AsyncJob=function(_PlattarBase14){function AsyncJob(){_classCallCheck(this,AsyncJob);return _callSuper(this,AsyncJob,arguments)}_inherits(AsyncJob,_PlattarBase14);return _createClass(AsyncJob,[{key:"accessKey",set:function set(code){this.addParameter("access_key",code,"update")}}],[{key:"type",value:function type(){return"asyncjob"}}])}(PlattarBase);module.exports=AsyncJob},{"../interfaces/plattar-base.js":22}],28:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base.js");var ScriptEvent=function(_PlattarBase15){function ScriptEvent(){_classCallCheck(this,ScriptEvent);return _callSuper(this,ScriptEvent,arguments)}_inherits(ScriptEvent,_PlattarBase15);return _createClass(ScriptEvent,null,[{key:"type",value:function type(){return"scriptevent"}}])}(PlattarBase);module.exports=ScriptEvent},{"../interfaces/plattar-base.js":22}],29:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base.js");var Tag=function(_PlattarBase16){function Tag(){_classCallCheck(this,Tag);return _callSuper(this,Tag,arguments)}_inherits(Tag,_PlattarBase16);return _createClass(Tag,null,[{key:"type",value:function type(){return"tag"}}])}(PlattarBase);module.exports=Tag},{"../interfaces/plattar-base.js":22}],30:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base.js");var Server=require("../../server/plattar-server.js");var CardBase=function(_PlattarBase17){function CardBase(id,server){var _this12;_classCallCheck(this,CardBase);_this12=_callSuper(this,CardBase,[id,server||Server["default"]()]);if(_this12.constructor===CardBase){throw new Error("CardBase is abstract and cannot be created")}return _this12}_inherits(CardBase,_PlattarBase17);return _createClass(CardBase,null,[{key:"type",value:function type(){var CardButton=require("./card-button.js");var CardHTML=require("./card-html.js");var CardIFrame=require("./card-iframe.js");var CardImage=require("./card-image.js");var CardMap=require("./card-map.js");var CardParagraph=require("./card-paragraph.js");var CardRow=require("./card-row.js");var CardSlider=require("./card-slider.js");var CardTitle=require("./card-title.js");var CardVideo=require("./card-video.js");var CardYoutube=require("./card-youtube.js");return[CardButton,CardHTML,CardIFrame,CardImage,CardMap,CardParagraph,CardRow,CardSlider,CardTitle,CardVideo,CardYoutube]}}])}(PlattarBase);module.exports=CardBase},{"../../server/plattar-server.js":5,"../interfaces/plattar-base.js":22,"./card-button.js":31,"./card-html.js":32,"./card-iframe.js":33,"./card-image.js":34,"./card-map.js":35,"./card-paragraph.js":36,"./card-row.js":37,"./card-slider.js":38,"./card-title.js":39,"./card-video.js":40,"./card-youtube.js":41}],31:[function(require,module,exports){var CardBase=require("./card-base.js");var CardButton=function(_CardBase){function CardButton(){_classCallCheck(this,CardButton);return _callSuper(this,CardButton,arguments)}_inherits(CardButton,_CardBase);return _createClass(CardButton,null,[{key:"type",value:function type(){return"cardbutton"}}])}(CardBase);module.exports=CardButton},{"./card-base.js":30}],32:[function(require,module,exports){var CardBase=require("./card-base.js");var CardHTML=function(_CardBase2){function CardHTML(){_classCallCheck(this,CardHTML);return _callSuper(this,CardHTML,arguments)}_inherits(CardHTML,_CardBase2);return _createClass(CardHTML,null,[{key:"type",value:function type(){return"cardhtml"}}])}(CardBase);module.exports=CardHTML},{"./card-base.js":30}],33:[function(require,module,exports){var CardBase=require("./card-base.js");var CardIFrame=function(_CardBase3){function CardIFrame(){_classCallCheck(this,CardIFrame);return _callSuper(this,CardIFrame,arguments)}_inherits(CardIFrame,_CardBase3);return _createClass(CardIFrame,null,[{key:"type",value:function type(){return"cardiframe"}}])}(CardBase);module.exports=CardIFrame},{"./card-base.js":30}],34:[function(require,module,exports){var CardBase=require("./card-base.js");var CardImage=function(_CardBase4){function CardImage(){_classCallCheck(this,CardImage);return _callSuper(this,CardImage,arguments)}_inherits(CardImage,_CardBase4);return _createClass(CardImage,null,[{key:"type",value:function type(){return"cardimage"}}])}(CardBase);module.exports=CardImage},{"./card-base.js":30}],35:[function(require,module,exports){var CardBase=require("./card-base.js");var CardMap=function(_CardBase5){function CardMap(){_classCallCheck(this,CardMap);return _callSuper(this,CardMap,arguments)}_inherits(CardMap,_CardBase5);return _createClass(CardMap,null,[{key:"type",value:function type(){return"cardmap"}}])}(CardBase);module.exports=CardMap},{"./card-base.js":30}],36:[function(require,module,exports){var CardBase=require("./card-base.js");var CardParagraph=function(_CardBase6){function CardParagraph(){_classCallCheck(this,CardParagraph);return _callSuper(this,CardParagraph,arguments)}_inherits(CardParagraph,_CardBase6);return _createClass(CardParagraph,null,[{key:"type",value:function type(){return"cardparagraph"}}])}(CardBase);module.exports=CardParagraph},{"./card-base.js":30}],37:[function(require,module,exports){var CardBase=require("./card-base.js");var CardRow=function(_CardBase7){function CardRow(){_classCallCheck(this,CardRow);return _callSuper(this,CardRow,arguments)}_inherits(CardRow,_CardBase7);return _createClass(CardRow,null,[{key:"type",value:function type(){return"cardrow"}}])}(CardBase);module.exports=CardRow},{"./card-base.js":30}],38:[function(require,module,exports){var CardBase=require("./card-base.js");var CardSlider=function(_CardBase8){function CardSlider(){_classCallCheck(this,CardSlider);return _callSuper(this,CardSlider,arguments)}_inherits(CardSlider,_CardBase8);return _createClass(CardSlider,null,[{key:"type",value:function type(){return"cardslider"}}])}(CardBase);module.exports=CardSlider},{"./card-base.js":30}],39:[function(require,module,exports){var CardBase=require("./card-base.js");var CardTitle=function(_CardBase9){function CardTitle(){_classCallCheck(this,CardTitle);return _callSuper(this,CardTitle,arguments)}_inherits(CardTitle,_CardBase9);return _createClass(CardTitle,null,[{key:"type",value:function type(){return"cardtitle"}}])}(CardBase);module.exports=CardTitle},{"./card-base.js":30}],40:[function(require,module,exports){var CardBase=require("./card-base.js");var CardVideo=function(_CardBase10){function CardVideo(){_classCallCheck(this,CardVideo);return _callSuper(this,CardVideo,arguments)}_inherits(CardVideo,_CardBase10);return _createClass(CardVideo,null,[{key:"type",value:function type(){return"cardvideo"}}])}(CardBase);module.exports=CardVideo},{"./card-base.js":30}],41:[function(require,module,exports){var CardBase=require("./card-base.js");var CardYoutube=function(_CardBase11){function CardYoutube(){_classCallCheck(this,CardYoutube);return _callSuper(this,CardYoutube,arguments)}_inherits(CardYoutube,_CardBase11);return _createClass(CardYoutube,null,[{key:"type",value:function type(){return"cardyoutube"}}])}(CardBase);module.exports=CardYoutube},{"./card-base.js":30}],42:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base.js");var Page=function(_PlattarBase18){function Page(){_classCallCheck(this,Page);return _callSuper(this,Page,arguments)}_inherits(Page,_PlattarBase18);return _createClass(Page,null,[{key:"type",value:function type(){return"page"}}])}(PlattarBase);module.exports=Page},{"../interfaces/plattar-base.js":22}],43:[function(require,module,exports){var ProductBase=require("./product-base.js");var ProductAnnotation=function(_ProductBase){function ProductAnnotation(){_classCallCheck(this,ProductAnnotation);return _callSuper(this,ProductAnnotation,arguments)}_inherits(ProductAnnotation,_ProductBase);return _createClass(ProductAnnotation,null,[{key:"type",value:function type(){return"productannotation"}}])}(ProductBase);module.exports=ProductAnnotation},{"./product-base.js":44}],44:[function(require,module,exports){var PlattarBase=require("../interfaces/plattar-base.js");var Server=require("../../server/plattar-server.js");var ProductBase=function(_PlattarBase19){function ProductBase(id,server){var _this13;_classCallCheck(this,ProductBase);_this13=_callSuper(this,Produ