@widgetic/editor 3.10.55 → 3.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/core.js CHANGED
@@ -1 +1 @@
1
- !function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=120)}({10:function(t,e){var n,i,r,o,s=function(t,e){return function(){return t.apply(e,arguments)}},u=[].slice;r=new $.Deferred,o=r.promise(),n=function(){function t(){this._getFontList=s(this._getFontList,this),this.loadFontList=s(this.loadFontList,this),this.loadGoogleFont=s(this.loadGoogleFont,this),this.loadFontLoader()}return t.prototype.fontList={},t.prototype.loadFontLoader=function(){var t,e;return e=document.createElement("script"),e.src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.16/webfont.js",e.type="text/javascript",e.async="true",e.onload=function(){return r.resolve()},t=document.getElementsByTagName("script")[0],t.parentNode.insertBefore(e,t)},t.prototype.load=function(t,e,n){return null==t&&(t={}),null==e&&(e=window),o.then(function(){var r;return r=t.families[0],n||(n=t.source||"google"),null!=e.fontDefs&&null!=e.fontDefs[r]?e.fontDefs[r]:(e.fontDefs||(e.fontDefs={}),e.fontDefs[r]="local"===n?(new $.Deferred).resolve().promise():i.loadGoogleFont(t,e))})},t.prototype.loadGoogleFont=function(t,e){var n;return n=new $.Deferred,WebFont.load({google:t,context:e,fontactive:function(t){return function(){return t.resolve(arguments)}}(n),fontinactive:function(t){return function(){return t.resolve(arguments)}}(n),timeout:600}),n.promise()},t.prototype.loadFontList=function(){var t;return null!=this.fontListRdy?this.fontListRdy:(t=Blogvio.Aye.defer(),this._getFontList().then(function(e){return function(){var n,i;return t.resolve($.extend.apply($,[{}].concat(u.call(function(){var t,e;t=this.fontList,e=[];for(n in t)i=t[n],e.push(i);return e}.call(e)))))}}(this)),this.fontListRdy=t.promise)},t.prototype._getFontList=function(){var t,e;return t=new $.Deferred,e=function(e,n){var i;if(e){for(i in n)n[i],n[i].source=e;this.fontList[e]=n}else this.fontList=$.extend({},this.fontList,n);if(null!=this.fontList.google&&null!=this.fontList.local)return t.resolve()},$.getJSON("/fonts-list").then(e.bind(this,null)),$.getJSON("/fonts.json").then(e.bind(this,"local")),t.promise()},t}(),t.exports=i=new n},105:function(t,e,n){var i,r,o,s,u=function(t,e){return function(){return t.apply(e,arguments)}},a=function(t,e){function n(){this.constructor=t}for(var i in e)p.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty;o=window.require("spine/model"),r=window.require("spine/utils/helper"),r.isArray,s=["order","metadata","composition_id","_isDemoContent"],i=function(t){function e(t){var n,i;if(null==t&&(t={}),this.attrMeta=u(this.attrMeta,this),this.editedMeta=u(this.editedMeta,this),this._metadata=u(this._metadata,this),!t.composition_id)throw new Error("Content must be associated to a composition.");this.composition_id=t.composition_id,this._meta=t._meta;for(n in i=this.meta().attributes)null==t[n]&&null!=i[n]&&(t[n]=i[n].options.default);e.__super__.constructor.call(this,t),this.id||(this.id=this.cid)}return a(e,t),e.records=[],e.irecords={},e.crecords={},e.configure("Content"),e.comparator=function(t,e){return(t.order||t.id)-(e.order||e.id)},e.prototype.meta=function(){return this._meta||(this._meta=this.composition().contentMeta())},e.prototype.composition=function(){return n(44).find(this.composition_id)},e.prototype.attributes=function(){var t,e,n,i,r,o,u,a;for(e=s.slice(0),o=function(){var e,n;e=this.meta().attributes,n=[];for(t in e)u=e[t],n.push(t);return n}.call(this),e.push.apply(e,o),a={},n=0,r=e.length;n<r;n++)(i=e[n])in this&&("function"==typeof this[i]?a[i]=this[i]():a[i]=this[i]);return this.id&&(a.id=this.id),this._meta&&(a._meta=this._meta),a},e.prototype._metadata=function(t,e,n){return null==n&&(n={}),null==t?this.metadata||(this.metadata={}):null==e?this._metadata()[t]:this._metadata()[t]===e?this._metadata()[t]:(this._metadata()[t]=e,n.attribute="metadata",this.updateAttribute("metadata",this.metadata,n))},e.prototype.editedMeta=function(t,e){var n;if(null==t)return this._metadata("edited")||[];if(t&&null==e)return 1+this.editedMeta().indexOf(t);if(t&&null!=e)return n=this.editedMeta().concat(t).filter(function(n){return function(n){return e||n!==t}}()),this._metadata("edited",n)},e.prototype.attrMeta=function(t,e,n){var i;return null==t?this._metadata("attr_meta")||{}:null!=t&&null==e?this.attrMeta()[t]:null!=t&&null!=e?((i=this.attrMeta())[t]=e,this._metadata("attr_meta",i,n)):void 0},e.prototype.toJSON=function(){var t;return t=e.__super__.toJSON.apply(this,arguments),delete t._meta,t},e}(o),t.exports=i},120:function(t,e,n){var i=function(t){return function(e,n,i){i.exports=t}};window.require.define({"core/models/content":i(n(105)),"core/models/composition":i(n(44)),"core/models/widget":i(n(37)),"core/models/skin":i(n(45)),"core/models/user":i(n(122)),"core/widget":i(n(123)),"core/controller/overlay":i(n(124)),"core/controller/font-loader":i(n(10))})},121:function(t,e){var n;n={enabled:!0,app_id:"528495b81d8a0c3130000000_5zjgq5bllucc4ok88404occgcgsckswcc40g8ggs08ckswc4kw",redirect_uri:"http://local.blogvio.com/connect/blogvio.html",disable:function(t){if(!this.enabled)return t();this.enabled=!1;try{return t()}catch(t){throw t}finally{this.enabled=!0}}},t.exports=n},122:function(t,e,n){var i,r,o,s=function(t,e){function n(){this.constructor=t}for(var i in e)u.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;r=window.require("spine/model"),i=n(36),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.extend(i),e.configure("User","loggedIn","email","max_allowed_hosts","hosts","name","lastname","username","subscription"),e}(r),t.exports=o},123:function(t,e){var n,i,r,o=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;i=window.require("spine/controller"),n=window.require("spine/controller/container"),r=function(t){function e(t,n,i){e.__super__.constructor.apply(this,arguments),this.VERSION&&this.el.attr("data-version",this.VERSION),this.style=$("<style>"),null!=n&&this.setSkin(n),null!=i&&this.setContent(i),this.append(this.style)}return o(e,t),e.prototype.className="blogvio-widget",e.include(n),e.prototype.setSkin=function(t){return this.stopListening(this.skin),this.stopListening(t),this.skin=t,null!=this.skin.bind&&this.listenTo(this.skin,"update",function(t){return function(){return t.changeSkin.apply(t,arguments)}}(this)),this.changeSkin(t),this},e.prototype.changeSkin=function(t){return this},e.prototype.setContent=function(t){var e,n,i;for(null==t&&(t=[]),this.content=t,this.clearContent(),e=0,i=t.length;e<i;e++)n=t[e],this.addContent(n);return this},e.prototype.addContent=function(t){return this},e.prototype.clearContent=function(){return this},e.prototype.resize=function(t,e){},e}(i),t.exports=r},124:function(t,e){var n,i,r=function(t,e){return function(){return t.apply(e,arguments)}},o=function(t,e){function n(){this.constructor=t}for(var i in e)s.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;n=window.require("spine/controller"),i=function(t){function e(t){if(null==t&&(t={}),this._hide=r(this._hide,this),this._show=r(this._show,this),!t.parent)throw new Error("The parent option is missing!");if(!t.events)throw new Error("The events option is missing!");e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className="overlay",e.prototype.delegateEvents=function(t){var e,n,i,r,o,s;null==t&&(t=this.events),this.eventsDelegated=!0,o=[];for(n in t)r=t[n],this.parent[r]&&(i=n.match(this.eventSplitter),e=i[1],s=i[2],r=function(t){return function(e){return function(){var n;return(n=t.parent)[e].apply(n,arguments),!0}}}(this)(r)),""===s?o.push(this.el.bind(e,r)):o.push(this.el.on(e,s,r));return o},e.prototype.append=function(t){return t.el&&(t=t.el),this.el.append(t)},e.prototype.preload=function(){return this._createPopup()},e.prototype.toggle=function(){return this._createPopup().then(function(t){return function(){return t.popup.visible?t._hide():t._show()}}(this))},e.prototype.show=function(){return this._createPopup().then(this._show)},e.prototype.hide=function(){return this._createPopup().then(this._hide)},e.prototype.style=function(t){if(t&&(this.styleCache=t),this.popup)return this.popup.style(this.styleCache)},e.prototype.release=function(){return e.__super__.release.apply(this,arguments),this.eventsDelegated=!1,this.popupPromise=null,this.popup.release(),this},e.prototype._show=function(){return this.popup.show().then(function(t){return function(){return t.el.trigger("overlay-shown")}}(this))},e.prototype._hide=function(){return this.popup.hide().then(function(t){return function(){return t.el.trigger("overlay-hidden")}}(this))},e.prototype._createPopup=function(){return this.popupPromise?this.popupPromise:this.popupPromise=Blogvio.UI.popup.new({type:"overlay"}).then(function(t){return function(e){if(t.popup=e,t.style(),t.popup.append(t.el),!t.eventsDelegated)return t.delegateEvents()}}(this)).fail(function(t){return console.error(t.stack)})},e}(n),t.exports=i},36:function(t,e,n){var i,r,o,s,u,a,p,c,h,l,d=function(t,e){return function(){return t.apply(e,arguments)}},f=function(t,e){function n(){this.constructor=t}for(var i in e)y.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},y={}.hasOwnProperty;i=n(121),h=Widgetic.JSON.stringify,u=window.require("spine/utils/helper"),l=function(t,e){var n;return null==e&&(e=!0),n=(t.className||t.constructor.className).toLowerCase()+"s",e&&t.id&&!/^c\-[\d]+/.test(t.id)&&(n+="/"+encodeURIComponent(t.id)),n},r=function(){function t(){}return t.prototype.request=function(){var t;return i.enabled?Widgetic.api.apply(Widgetic,arguments):(t=Widgetic.Aye.defer(),t.reject("Widgetic API is disabled."),t.promise)},t}(),c=function(t){function e(t){this.record=t,this.failedWithData=d(this.failedWithData,this),this.recordResponse=d(this.recordResponse,this),this.model=this.record.constructor}return f(e,t),e.prototype.reload=function(t){return this.request(l(this.record)).then(this.recordResponse(t),this.failedReload(t))},e.prototype.create=function(t){return this.request(l(this.record,!1),"POST",h(this.record)).then(this.recordResponse(t),this.failedWithData(t))},e.prototype.update=function(t){var e;return e=/^c\-[\d]+/.test(this.record.id),this.request(l(this.record,!e),e?"POST":"PUT",h(this.record)).then(this.recordResponse(t),this.failedWithData(t))},e.prototype.destroy=function(t){return this.request(l(this.record),"DELETE").then(this.recordResponse(t),this.failedWithData(t))},e.prototype.recordResponse=function(t){return null==t&&(t={}),function(e){return function(n){var r;return(n=!u.isBlank(n)&&e.model.fromJSON(n))&&i.disable(function(){return n.id&&e.record.id!==n.id&&e.record.changeID(n.id),e.record.updateAttributes({id:n.id},{fromApi:!0})}),e.record.trigger("apiSuccess",n),null!=(r=t.done)&&r.apply(e.record,arguments),e.record}}(this)},e.prototype.failedWithData=function(t){return null==t&&(t={}),function(e){return function(n){var i;throw e.record.trigger("apiError",n),null!=(i=t.fail)&&i.apply(e.record,arguments),n}}(this)},e}(r),o=function(t){function e(t){this.model=t,this.failResponse=d(this.failResponse,this),this.recordsResponse=d(this.recordsResponse,this)}return f(e,t),e.prototype.find=function(t,e){return null==e&&(e={}),this.request(l(new this.model({id:t})),null,e).then(this.recordsResponse,this.failResponse)},e.prototype.all=function(t){return null==t&&(t={}),this.request(l(this.model),!1,t).then(this.recordsResponse,this.failResponse)},e.prototype.fetch=function(t,e){var n;return null==t&&(t={}),null==e&&(e={}),(n=t.id)&&delete t.id,(n?this.find(n,t):this.all(t)).then(function(t){return function(n){return t.model.refresh(n,e)}}(this))},e.prototype.recordsResponse=function(t){return this.model.trigger("apiSuccess"),t},e.prototype.failResponse=function(t){throw this.model.trigger("apiError",null,t),new Error(t.message)},e}(r),a={ajax:function(){return new c(this)}},s={ajax:function(){return new o(this)}},p={extended:function(){return this.extend(s),this.include(a)},ajaxFetch:function(){var t;return(t=this.ajax()).fetch.apply(t,arguments)},ajaxChange:function(t,e,n){if(null==n&&(n={}),!1!==n.ajax)return t.ajax()[e](n)}},t.exports=p},37:function(t,e,n){var i,r,o,s,u,a,p=function(t,e){function n(){this.constructor=t}for(var i in e)c.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;r=window.require("spine/model"),o=n(45),i=n(36),u=function(t){return t.hasAllSkins?(o.refresh(t.skins),t):o.ajaxFetch({widget_id:t.id}).then(function(e){return o.refresh(e),t.updateAttribute("hasAllSkins",!0),t})},a=function(t,e){var n,i,r;for(i=0,r=e.length;i<r;i++)if(n=e[i],!t[n])return!1;return!0},s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return p(e,t),e.extend(i),e.configure("Widget","name","module","category","slug","skinMeta","contentMeta","skins","content","css","js","width","height","hasAllSkins"),e.current=null,e.load=function(t,n){var i,r,o,s,p;r=null!=n?n.fields:void 0,o=Blogvio.Aye.defer(),s=Blogvio.Aye.defer(),s.promise.then(u).fail(o.reject).then(o.resolve);try{if(p=e.find(t),r&&!a(p,r))throw new Error("Widget["+t+"] does not have all required fields: "+r);s.resolve(p)}catch(e){i=e,console.warn(i),this.ajax().fetch({id:t}).then(function(t){return t[0]}).then(s.resolve).fail(s.reject)}return o.promise},e.prototype.getSkins=function(){return o.findAllByAttribute("widget_id",this.id)},e}(r),t.exports=s},44:function(t,e,n){var i,r,o,s,u,a,p,c=function(t,e){return function(){return t.apply(e,arguments)}},h=function(t,e){function n(){this.constructor=t}for(var i in e)l.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=window.require("spine/model"),i=n(36),u=n(45),a=n(37),o=n(105),p=function(t){return a.load(t.widget_id).then(function(){return t})},r=function(t){function e(t){null==t&&(t={}),this._onContentChange=c(this._onContentChange,this),this._metadata=c(this._metadata,this),this.listen=c(this.listen,this),this.bulkContent=c(this.bulkContent,this),this.maxFreeErrorMsg=c(this.maxFreeErrorMsg,this),this.maxErrorMsg=c(this.maxErrorMsg,this),this.minErrorMsg=c(this.minErrorMsg,this),this.opts=c(this.opts,this),t.name||(t.name="Untitled Composition"),t.width||(t.width=500),t.height||(t.height=500),e.__super__.constructor.call(this,t)}return h(e,t),e.extend(i),e.configure("Composition","name","content","bulk_content","skin_id","widget_id","width","height","widget_category","user_id","metadata"),e.fetch(e.ajaxFetch),e.prototype.opts=function(){var t,e,n,i;return this._opts||(this._opts={min:null!=(e=null!=(n=this.contentMeta().options)?n.min:void 0)&&e||1,max:null!=(t=null!=(i=this.contentMeta().options)?i.max:void 0)&&t||999})},e.prototype.minErrorMsg=function(){return this.contentMeta().options.notification.min||"Please add at least one item!"},e.prototype.maxErrorMsg=function(){return this.contentMeta().options.notification.max||"You reached the maximum number of items!"},e.prototype.maxFreeErrorMsg=function(){return"Upgrade to add more items, and get more features!"},e.prototype.toJSON=function(){var t,n;return n=e.__super__.toJSON.apply(this,arguments),n.content||(n.content=this.getContent()),this.contentMeta().bulkEditor&&(n.bulk_content="function"==typeof(t=this.bulkContent()).toJSON?t.toJSON():void 0),n},e.prototype.changeID=function(t){var n;return n=this.id,e.__super__.changeID.apply(this,arguments),o.findAllByAttribute("composition_id",n).forEach(function(t){return function(e){return e.updateAttribute("composition_id",t.id,{attribute:"composition_id"})}}(this))},e.prototype.validateLength=function(t){var e,n,i,r;return null==t&&(t={}),r=this.hasEnoughContent(),e=!r&&(this.maxContentReached()?"max":"min"),n="function"==typeof this[i=e+"ErrorMsg"]?this[i]():void 0,{valid:r,error:e,errorMsg:n}},e.prototype.getWidget=function(){if(!this.widget_id)throw new Error("This composition is missing the widget_id.");try{return n(37).find(this.widget_id)}catch(t){throw t,new Error("The widget "+this.widget_id+" is not loaded")}},e.prototype.setWidgetId=function(t){return this.widget_id=t,this.save({ajax:!1}),this},e.prototype.getSkin=function(){try{return u.find(this.skin_id)}catch(t){return t,!1}},e.prototype.getContent=function(t){return null==t&&(t=function(t){return!t._isDemoContent}),o.findAllByAttribute("composition_id",this.id).filter(t).sort(function(t,e){return t.order-e.order})},e.prototype.contentMeta=function(){var t;return t=this.getWidget(),null!=t?t.contentMeta:void 0},e.prototype.bulkContent=function(){var t,e,n,i,r,s;if(null!=this._bkc)return this._bkc;for(t=this.contentMeta(),n={},s=t.bulkEditor.attributes,i=0,r=s.length;i<r;i++)e=s[i],n[e]=t.attributes[e];return t=$.extend({},t,{attributes:n}),this.bulk_content=$.extend(this.bulk_content||{},{_meta:t,composition_id:1}),this._bkc=o.refresh(this.bulk_content)[0]},e.prototype.maxContentReached=function(t){return null==t&&(t=this.opts().max),this.getContent().length>=t},e.prototype.hasEnoughContent=function(){var t;return this.opts().min<=(t=this.getContent().length)&&t<=this.opts().max},e.prototype.persist=function(){var t;return this._stopListen(),t=this.isPersisted()?this.ajax().update():this.ajax().create(),t.then(this.listen)},e.prototype.isPersisted=function(){return"c"!==this.id.slice(0,1)},e.prototype.listen=function(){return this._stopListen(),this.listenTo(o,"change",this._onContentChange),this},e.prototype._stopListen=function(){return this.stopListening(o,"change",this._onContentChange),this},e.prototype.embed=function(){return"<span>&lt;script async src=&quot;http://blogvio.com/embedder.js&quot;</span><br/> <span>data-blogvio-composition=&quot;"+this.id+"&quot;</span><br/> <span>data-width=&quot;"+this.width+"&quot; data-height=&quot;"+this.height+"&quot;&gt;&lt;/script&gt;</span>"},e.prototype._metadata=function(t,e,n){return null==n&&(n={}),null==t?this.metadata||(this.metadata={}):null==e?this._metadata()[t]:(this._metadata()[t]=e,n.attribute="metadata",this.updateAttribute("metadata",this.metadata,n))},e.load=function(t){var n,i;n=Blogvio.Aye.defer(),i=Blogvio.Aye.defer(),i.promise.then(p).then(function(t){return t._stopListen()}).then(function(t){return t.listen(),t}).fail(n.reject).then(n.resolve);try{i.resolve(e.find(t))}catch(e){e,this.ajax().fetch({id:t}).then(function(t){return t[0]}).then(i.resolve).fail(i.reject)}return n.promise},e.prototype._onContentChange=function(t,e,n){return this.updateAttribute("content",this.getContent(),{ajax:!1})},e}(s),r.bind("destroy",function(t){var e;try{return e=u.find(t.skin_id),null!=e?e.used():void 0}catch(t){}}),t.exports=r},45:function(t,e,n){var i,r,o,s,u,a=function(t,e){function n(){this.constructor=t}for(var i in e)p.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty,c=[].slice;o=window.require("spine/model"),i=n(36),r=window.require("spine/utils/helper"),r.isArray,u=["name","user_id","uses","metas","widget_id"],s=function(t){function e(t){null==t&&(t={}),t.name||(t.name="Untitled Theme"),t.uses||(t.uses=0),t.metas||(t.metas={}),e.__super__.constructor.call(this,t)}return a(e,t),e.extend(i),e.configure("Skin"),e.change(i.ajaxChange),e.meta=function(t){return n(37).find(t).skinMeta},e.prototype.attributes=function(){var t,n,i,r,o,s,a,p,h,l,d;t=u.slice(0);try{if(!(l=this.constructor.meta(this.widget_id).tabs))throw new Error("Widget["+this.widget_id+"].tabs is not loaded.");a=function(){var t;t=[];for(h in l)n=l[h],t.push($.extend({},n));return t}(),s=$.extend.apply($,[{}].concat(c.call(a))),t.push.apply(t,function(){var t;t=[];for(r in s)d=s[r],t.push(r);return t}())}catch(n){t=Object.keys(this),Object.getPrototypeOf(this)instanceof e&&(t=$.extend([],t,Object.keys(Object.getPrototypeOf(this))))}for(p={},i=0,o=t.length;i<o;i++)(r=t[i])in this&&"function"!=typeof this[r]&&(p[r]=this[r]);return this.id&&(p.id=this.id),p},e.prototype.used=function(t){return null==t&&(t=-1),this.updateAttribute("uses",Math.max((this.uses>>0)+t,0),{used:!0})},e.prototype.updateAttributes=function(t,n){return null==n&&(n={}),n.ajax=!1,e.__super__.updateAttributes.apply(this,arguments)},e.prototype.changeID=function(t){var i,r,o;return i=n(44),o=this.id,e.__super__.changeID.apply(this,arguments),r=i.findAllByAttribute("skin_id",o),r.forEach(function(t){return function(e){return e.updateAttribute("skin_id",t.id)}}(this)),this.used(r.length)},e.prototype.freeze=function(){return this.original=this.attributes(),this.original.id=null,delete this.original.uses,delete this.original.id},e.prototype.reset=function(){return this.updateAttributes(this.original,{ajax:!1})},e.prototype.isPersisted=function(){return!!this.id&&"c"!==this.id.slice(0,1)},e.prototype.isPreset=function(){return!this.user_id},e.prototype.persist=function(){return this.isPersisted()?this.ajax().update():this.ajax().create()},e}(o),t.exports=s}});
1
+ !function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=124)}({10:function(t,e){var n,i,o,r,s=function(t,e){return function(){return t.apply(e,arguments)}},u=[].slice;o=new $.Deferred,r=o.promise(),n=function(){function t(){this._getFontList=s(this._getFontList,this),this.loadFontList=s(this.loadFontList,this),this.loadGoogleFont=s(this.loadGoogleFont,this),this.loadFontLoader()}return t.prototype.fontList={},t.prototype.loadFontLoader=function(){var t,e;return(e=document.createElement("script")).src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.16/webfont.js",e.type="text/javascript",e.async="true",e.onload=function(){return o.resolve()},(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t)},t.prototype.load=function(t,e,n){return null==t&&(t={}),null==e&&(e=window),r.then(function(){var o;return o=t.families[0],n||(n=t.source||"google"),null!=e.fontDefs&&null!=e.fontDefs[o]?e.fontDefs[o]:(e.fontDefs||(e.fontDefs={}),e.fontDefs[o]="local"===n?(new $.Deferred).resolve().promise():i.loadGoogleFont(t,e))})},t.prototype.loadGoogleFont=function(t,e){var n;return n=new $.Deferred,WebFont.load({google:t,context:e,fontactive:function(t){return function(){return t.resolve(arguments)}}(n),fontinactive:function(t){return function(){return t.resolve(arguments)}}(n),timeout:600}),n.promise()},t.prototype.loadFontList=function(){var t;return null!=this.fontListRdy?this.fontListRdy:(t=Blogvio.Aye.defer(),this._getFontList().then(function(e){return function(){var n,i;return t.resolve($.extend.apply($,[{}].concat(u.call(function(){var t,e;for(n in e=[],t=this.fontList)i=t[n],e.push(i);return e}.call(e)))))}}(this)),this.fontListRdy=t.promise)},t.prototype._getFontList=function(){var t,e;return t=new $.Deferred,e=function(e,n){var i;if(e){for(i in n)n[i],n[i].source=e;this.fontList[e]=n}else this.fontList=$.extend({},this.fontList,n);if(null!=this.fontList.google&&null!=this.fontList.local)return t.resolve()},$.getJSON("/fonts-list").then(e.bind(this,null)),$.getJSON("/fonts.json").then(e.bind(this,"local")),t.promise()},t}(),t.exports=i=new n},105:function(t,e,n){var i,o,r,s=function(t,e){return function(){return t.apply(e,arguments)}},u={}.hasOwnProperty;o=window.require("spine/model"),window.require("spine/utils/helper").isArray,r=["order","metadata","composition_id","_isDemoContent"],i=function(t){function e(t){var n,i;if(null==t&&(t={}),this.attrMeta=s(this.attrMeta,this),this.editedMeta=s(this.editedMeta,this),this._metadata=s(this._metadata,this),!t.composition_id)throw new Error("Content must be associated to a composition.");for(n in this.composition_id=t.composition_id,this._meta=t._meta,i=this.meta().attributes)null==t[n]&&null!=i[n]&&(t[n]=i[n].options.default);e.__super__.constructor.call(this,t),this.id||(this.id=this.cid)}return function(t,e){for(var n in e)u.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,o),e.records=[],e.irecords={},e.crecords={},e.configure("Content"),e.comparator=function(t,e){return(t.order||t.id)-(e.order||e.id)},e.prototype.meta=function(){return this._meta||(this._meta=this.composition().contentMeta())},e.prototype.composition=function(){return n(44).find(this.composition_id)},e.prototype.attributes=function(){var t,e,n,i,o,s,u;for(e=r.slice(0),s=function(){var e,n;for(t in n=[],e=this.meta().attributes)e[t],n.push(t);return n}.call(this),e.push.apply(e,s),u={},n=0,o=e.length;n<o;n++)(i=e[n])in this&&("function"==typeof this[i]?u[i]=this[i]():u[i]=this[i]);return this.id&&(u.id=this.id),this._meta&&(u._meta=this._meta),u},e.prototype._metadata=function(t,e,n){return null==n&&(n={}),null==t?this.metadata||(this.metadata={}):null==e?this._metadata()[t]:this._metadata()[t]===e?this._metadata()[t]:(this._metadata()[t]=e,n.attribute="metadata",this.updateAttribute("metadata",this.metadata,n))},e.prototype.editedMeta=function(t,e){var n;return null==t?this._metadata("edited")||[]:t&&null==e?1+this.editedMeta().indexOf(t):t&&null!=e?(n=this.editedMeta().concat(t).filter(function(n){return e||n!==t}),this._metadata("edited",n)):void 0},e.prototype.attrMeta=function(t,e,n){var i;return null==t?this._metadata("attr_meta")||{}:null!=t&&null==e?this.attrMeta()[t]:null!=t&&null!=e?((i=this.attrMeta())[t]=e,this._metadata("attr_meta",i,n)):void 0},e.prototype.toJSON=function(){var t;return delete(t=e.__super__.toJSON.apply(this,arguments))._meta,t},e}(),t.exports=i},124:function(t,e,n){var i=function(t){return function(e,n,i){i.exports=t}};window.require.define({"core/models/content":i(n(105)),"core/models/composition":i(n(44)),"core/models/widget":i(n(38)),"core/models/skin":i(n(45)),"core/models/user":i(n(126)),"core/widget":i(n(127)),"core/controller/overlay":i(n(128)),"core/controller/font-loader":i(n(10))})},125:function(t,e){var n;n={enabled:!0,app_id:"528495b81d8a0c3130000000_5zjgq5bllucc4ok88404occgcgsckswcc40g8ggs08ckswc4kw",redirect_uri:"http://local.blogvio.com/connect/blogvio.html",disable:function(t){if(!this.enabled)return t();this.enabled=!1;try{return t()}catch(t){throw t}finally{this.enabled=!0}}},t.exports=n},126:function(t,e,n){var i,o,r,s={}.hasOwnProperty;o=window.require("spine/model"),i=n(37),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var n in e)s.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,o),e.extend(i),e.configure("User","loggedIn","email","max_allowed_hosts","hosts","name","lastname","username","subscription"),e}(),t.exports=r},127:function(t,e){var n,i,o,r={}.hasOwnProperty;i=window.require("spine/controller"),n=window.require("spine/controller/container"),o=function(t){function e(t,n,i){e.__super__.constructor.apply(this,arguments),this.VERSION&&this.el.attr("data-version",this.VERSION),this.style=$("<style>"),null!=n&&this.setSkin(n),null!=i&&this.setContent(i),this.append(this.style)}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,i),e.prototype.className="blogvio-widget",e.include(n),e.prototype.setSkin=function(t){return this.stopListening(this.skin),this.stopListening(t),this.skin=t,null!=this.skin.bind&&this.listenTo(this.skin,"update",function(t){return function(){return t.changeSkin.apply(t,arguments)}}(this)),this.changeSkin(t),this},e.prototype.changeSkin=function(t){return this},e.prototype.setContent=function(t){var e,n,i;for(null==t&&(t=[]),this.content=t,this.clearContent(),e=0,i=t.length;e<i;e++)n=t[e],this.addContent(n);return this},e.prototype.addContent=function(t){return this},e.prototype.clearContent=function(){return this},e.prototype.resize=function(t,e){},e}(),t.exports=o},128:function(t,e){var n,i,o=function(t,e){return function(){return t.apply(e,arguments)}},r={}.hasOwnProperty;n=window.require("spine/controller"),i=function(t){function e(t){if(null==t&&(t={}),this._hide=o(this._hide,this),this._show=o(this._show,this),!t.parent)throw new Error("The parent option is missing!");if(!t.events)throw new Error("The events option is missing!");e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,n),e.prototype.className="overlay",e.prototype.delegateEvents=function(t){var e,n,i,o,r,s;for(n in null==t&&(t=this.events),this.eventsDelegated=!0,r=[],t)o=t[n],this.parent[o]&&(e=(i=n.match(this.eventSplitter))[1],s=i[2],o=function(t){return function(e){return function(){var n;return(n=t.parent)[e].apply(n,arguments),!0}}}(this)(o)),""===s?r.push(this.el.bind(e,o)):r.push(this.el.on(e,s,o));return r},e.prototype.append=function(t){return t.el&&(t=t.el),this.el.append(t)},e.prototype.preload=function(){return this._createPopup()},e.prototype.toggle=function(){return this._createPopup().then(function(t){return function(){return t.popup.visible?t._hide():t._show()}}(this))},e.prototype.show=function(){return this._createPopup().then(this._show)},e.prototype.hide=function(){return this._createPopup().then(this._hide)},e.prototype.style=function(t){if(t&&(this.styleCache=t),this.popup)return this.popup.style(this.styleCache)},e.prototype.release=function(){return e.__super__.release.apply(this,arguments),this.eventsDelegated=!1,this.popupPromise=null,this.popup.release(),this},e.prototype._show=function(){return this.popup.show().then(function(t){return function(){return t.el.trigger("overlay-shown")}}(this))},e.prototype._hide=function(){return this.popup.hide().then(function(t){return function(){return t.el.trigger("overlay-hidden")}}(this))},e.prototype._createPopup=function(){return this.popupPromise?this.popupPromise:this.popupPromise=Blogvio.UI.popup.new({type:"overlay"}).then(function(t){return function(e){if(t.popup=e,t.style(),t.popup.append(t.el),!t.eventsDelegated)return t.delegateEvents()}}(this)).fail(function(t){return console.error(t.stack)})},e}(),t.exports=i},37:function(t,e,n){var i,o,r,s,u,a,p,c,h,l,d=function(t,e){return function(){return t.apply(e,arguments)}},f=function(t,e){for(var n in e)y.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t},y={}.hasOwnProperty;i=n(125),h=Widgetic.JSON.stringify,u=window.require("spine/utils/helper"),l=function(t,e){var n;return null==e&&(e=!0),n=(t.className||t.constructor.className).toLowerCase()+"s",e&&t.id&&!/^c\-[\d]+/.test(t.id)&&(n+="/"+encodeURIComponent(t.id)),n},o=function(){function t(){}return t.prototype.request=function(){var t;return i.enabled?Widgetic.api.apply(Widgetic,arguments):((t=Widgetic.Aye.defer()).reject("Widgetic API is disabled."),t.promise)},t}(),c=function(t){function e(t){this.record=t,this.failedWithData=d(this.failedWithData,this),this.recordResponse=d(this.recordResponse,this),this.model=this.record.constructor}return f(e,o),e.prototype.reload=function(t){return this.request(l(this.record)).then(this.recordResponse(t),this.failedReload(t))},e.prototype.create=function(t){return this.request(l(this.record,!1),"POST",h(this.record)).then(this.recordResponse(t),this.failedWithData(t))},e.prototype.update=function(t){var e;return e=/^c\-[\d]+/.test(this.record.id),this.request(l(this.record,!e),e?"POST":"PUT",h(this.record)).then(this.recordResponse(t),this.failedWithData(t))},e.prototype.destroy=function(t){return this.request(l(this.record),"DELETE").then(this.recordResponse(t),this.failedWithData(t))},e.prototype.recordResponse=function(t){return null==t&&(t={}),function(e){return function(n){var o;return(n=!u.isBlank(n)&&e.model.fromJSON(n))&&i.disable(function(){return n.id&&e.record.id!==n.id&&e.record.changeID(n.id),e.record.updateAttributes({id:n.id},{fromApi:!0})}),e.record.trigger("apiSuccess",n),null!=(o=t.done)&&o.apply(e.record,arguments),e.record}}(this)},e.prototype.failedWithData=function(t){return null==t&&(t={}),function(e){return function(n){var i;throw e.record.trigger("apiError",n),null!=(i=t.fail)&&i.apply(e.record,arguments),n}}(this)},e}(),r=function(t){function e(t){this.model=t,this.failResponse=d(this.failResponse,this),this.recordsResponse=d(this.recordsResponse,this)}return f(e,o),e.prototype.find=function(t,e){return null==e&&(e={}),this.request(l(new this.model({id:t})),null,e).then(this.recordsResponse,this.failResponse)},e.prototype.all=function(t){return null==t&&(t={}),this.request(l(this.model),!1,t).then(this.recordsResponse,this.failResponse)},e.prototype.fetch=function(t,e){var n;return null==t&&(t={}),null==e&&(e={}),(n=t.id)&&delete t.id,(n?this.find(n,t):this.all(t)).then(function(t){return function(n){return t.model.refresh(n,e)}}(this))},e.prototype.recordsResponse=function(t){return this.model.trigger("apiSuccess"),t},e.prototype.failResponse=function(t){throw this.model.trigger("apiError",null,t),new Error(t.message)},e}(),a={ajax:function(){return new c(this)}},s={ajax:function(){return new r(this)}},p={extended:function(){return this.extend(s),this.include(a)},ajaxFetch:function(){var t;return(t=this.ajax()).fetch.apply(t,arguments)},ajaxChange:function(t,e,n){if(null==n&&(n={}),!1!==n.ajax)return t.ajax()[e](n)}},t.exports=p},38:function(t,e,n){var i,o,r,s,u,a,p={}.hasOwnProperty;o=window.require("spine/model"),r=n(45),i=n(37),u=function(t){return t.hasAllSkins?(r.refresh(t.skins),t):r.ajaxFetch({widget_id:t.id}).then(function(e){return r.refresh(e),t.updateAttribute("hasAllSkins",!0),t})},a=function(t,e){var n,i;for(n=0,i=e.length;n<i;n++)if(!t[e[n]])return!1;return!0},s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return function(t,e){for(var n in e)p.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,o),e.extend(i),e.configure("Widget","name","module","category","slug","skinMeta","contentMeta","skins","content","css","js","width","height","hasAllSkins"),e.current=null,e.load=function(t,n){var i,o,r,s,p;o=null!=n?n.fields:void 0,r=Blogvio.Aye.defer(),(s=Blogvio.Aye.defer()).promise.then(u).fail(r.reject).then(r.resolve);try{if(p=e.find(t),o&&!a(p,o))throw new Error("Widget["+t+"] does not have all required fields: "+o);s.resolve(p)}catch(e){i=e,console.warn(i),this.ajax().fetch({id:t}).then(function(t){return t[0]}).then(s.resolve).fail(s.reject)}return r.promise},e.prototype.getSkins=function(){return r.findAllByAttribute("widget_id",this.id)},e}(),t.exports=s},44:function(t,e,n){var i,o,r,s,u,a,p,c=function(t,e){return function(){return t.apply(e,arguments)}},h={}.hasOwnProperty;s=window.require("spine/model"),i=n(37),u=n(45),a=n(38),r=n(105),p=function(t){return a.load(t.widget_id).then(function(){return t})},(o=function(t){function e(t){null==t&&(t={}),this._onContentChange=c(this._onContentChange,this),this._metadata=c(this._metadata,this),this.listen=c(this.listen,this),this.bulkContent=c(this.bulkContent,this),this.maxFreeErrorMsg=c(this.maxFreeErrorMsg,this),this.maxErrorMsg=c(this.maxErrorMsg,this),this.minErrorMsg=c(this.minErrorMsg,this),this.opts=c(this.opts,this),t.name||(t.name="Untitled Composition"),t.width||(t.width=500),t.height||(t.height=500),e.__super__.constructor.call(this,t)}return function(t,e){for(var n in e)h.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,s),e.extend(i),e.configure("Composition","name","content","bulk_content","skin_id","widget_id","width","height","widget_category","user_id","metadata"),e.fetch(e.ajaxFetch),e.prototype.opts=function(){var t,e,n,i;return this._opts||(this._opts={min:null!=(e=null!=(n=this.contentMeta().options)?n.min:void 0)&&e||1,max:null!=(t=null!=(i=this.contentMeta().options)?i.max:void 0)&&t||999})},e.prototype.minErrorMsg=function(){return this.contentMeta().options.notification.min||"Please add at least one item!"},e.prototype.maxErrorMsg=function(){return this.contentMeta().options.notification.max||"You reached the maximum number of items!"},e.prototype.maxFreeErrorMsg=function(){return"Upgrade to add more items, and get more features!"},e.prototype.toJSON=function(){var t,n;return(n=e.__super__.toJSON.apply(this,arguments)).content||(n.content=this.getContent()),this.contentMeta().bulkEditor&&(n.bulk_content="function"==typeof(t=this.bulkContent()).toJSON?t.toJSON():void 0),n},e.prototype.changeID=function(t){var n;return n=this.id,e.__super__.changeID.apply(this,arguments),r.findAllByAttribute("composition_id",n).forEach(function(t){return function(e){return e.updateAttribute("composition_id",t.id,{attribute:"composition_id"})}}(this))},e.prototype.validateLength=function(t){var e,n,i;return null==t&&(t={}),{valid:i=this.hasEnoughContent(),error:e=!i&&(this.maxContentReached()?"max":"min"),errorMsg:"function"==typeof this[n=e+"ErrorMsg"]?this[n]():void 0}},e.prototype.getWidget=function(){if(!this.widget_id)throw new Error("This composition is missing the widget_id.");try{return n(38).find(this.widget_id)}catch(t){throw t,new Error("The widget "+this.widget_id+" is not loaded")}},e.prototype.setWidgetId=function(t){return this.widget_id=t,this.save({ajax:!1}),this},e.prototype.getSkin=function(){try{return u.find(this.skin_id)}catch(t){return t,!1}},e.prototype.getContent=function(t){return null==t&&(t=function(t){return!t._isDemoContent}),r.findAllByAttribute("composition_id",this.id).filter(t).sort(function(t,e){return t.order-e.order})},e.prototype.contentMeta=function(){var t;return null!=(t=this.getWidget())?t.contentMeta:void 0},e.prototype.bulkContent=function(){var t,e,n,i,o,s;if(null!=this._bkc)return this._bkc;for(n={},i=0,o=(s=(t=this.contentMeta()).bulkEditor.attributes).length;i<o;i++)n[e=s[i]]=t.attributes[e];return t=$.extend({},t,{attributes:n}),this.bulk_content=$.extend(this.bulk_content||{},{_meta:t,composition_id:1}),this._bkc=r.refresh(this.bulk_content)[0]},e.prototype.maxContentReached=function(t){return null==t&&(t=this.opts().max),this.getContent().length>=t},e.prototype.hasEnoughContent=function(){var t;return this.opts().min<=(t=this.getContent().length)&&t<=this.opts().max},e.prototype.persist=function(){return this._stopListen(),(this.isPersisted()?this.ajax().update():this.ajax().create()).then(this.listen)},e.prototype.isPersisted=function(){return"c"!==this.id.slice(0,1)},e.prototype.listen=function(){return this._stopListen(),this.listenTo(r,"change",this._onContentChange),this},e.prototype._stopListen=function(){return this.stopListening(r,"change",this._onContentChange),this},e.prototype.embed=function(){return"<span>&lt;script async src=&quot;http://blogvio.com/embedder.js&quot;</span><br/> <span>data-blogvio-composition=&quot;"+this.id+"&quot;</span><br/> <span>data-width=&quot;"+this.width+"&quot; data-height=&quot;"+this.height+"&quot;&gt;&lt;/script&gt;</span>"},e.prototype._metadata=function(t,e,n){return null==n&&(n={}),null==t?this.metadata||(this.metadata={}):null==e?this._metadata()[t]:(this._metadata()[t]=e,n.attribute="metadata",this.updateAttribute("metadata",this.metadata,n))},e.load=function(t){var n,i;n=Blogvio.Aye.defer(),(i=Blogvio.Aye.defer()).promise.then(p).then(function(t){return t._stopListen()}).then(function(t){return t.listen(),t}).fail(n.reject).then(n.resolve);try{i.resolve(e.find(t))}catch(e){e,this.ajax().fetch({id:t}).then(function(t){return t[0]}).then(i.resolve).fail(i.reject)}return n.promise},e.prototype._onContentChange=function(t,e,n){return this.updateAttribute("content",this.getContent(),{ajax:!1})},e}()).bind("destroy",function(t){var e;try{return null!=(e=u.find(t.skin_id))?e.used():void 0}catch(t){}}),t.exports=o},45:function(t,e,n){var i,o,r,s,u={}.hasOwnProperty,a=[].slice;o=window.require("spine/model"),i=n(37),window.require("spine/utils/helper").isArray,s=["name","user_id","uses","metas","widget_id"],r=function(t){function e(t){null==t&&(t={}),t.name||(t.name="Untitled Theme"),t.uses||(t.uses=0),t.metas||(t.metas={}),e.__super__.constructor.call(this,t)}return function(t,e){for(var n in e)u.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,o),e.extend(i),e.configure("Skin"),e.change(i.ajaxChange),e.meta=function(t){return n(38).find(t).skinMeta},e.prototype.attributes=function(){var t,n,i,o,r,u,p,c,h,l;t=s.slice(0);try{if(!(l=this.constructor.meta(this.widget_id).tabs))throw new Error("Widget["+this.widget_id+"].tabs is not loaded.");p=function(){var t;for(h in t=[],l)n=l[h],t.push($.extend({},n));return t}(),u=$.extend.apply($,[{}].concat(a.call(p))),t.push.apply(t,function(){var t;for(o in t=[],u)u[o],t.push(o);return t}())}catch(n){t=Object.keys(this),Object.getPrototypeOf(this)instanceof e&&(t=$.extend([],t,Object.keys(Object.getPrototypeOf(this))))}for(c={},i=0,r=t.length;i<r;i++)(o=t[i])in this&&"function"!=typeof this[o]&&(c[o]=this[o]);return this.id&&(c.id=this.id),c},e.prototype.used=function(t){return null==t&&(t=-1),this.updateAttribute("uses",Math.max((this.uses>>0)+t,0),{used:!0})},e.prototype.updateAttributes=function(t,n){return null==n&&(n={}),n.ajax=!1,e.__super__.updateAttributes.apply(this,arguments)},e.prototype.changeID=function(t){var i,o,r;return i=n(44),r=this.id,e.__super__.changeID.apply(this,arguments),(o=i.findAllByAttribute("skin_id",r)).forEach(function(t){return function(e){return e.updateAttribute("skin_id",t.id)}}(this)),this.used(o.length)},e.prototype.freeze=function(){return this.original=this.attributes(),this.original.id=null,delete this.original.uses,delete this.original.id},e.prototype.reset=function(){return this.updateAttributes(this.original,{ajax:!1})},e.prototype.isPersisted=function(){return!!this.id&&"c"!==this.id.slice(0,1)},e.prototype.isPreset=function(){return!this.user_id},e.prototype.persist=function(){return this.isPersisted()?this.ajax().update():this.ajax().create()},e}(),t.exports=r}});
@@ -60,29 +60,29 @@
60
60
  /******/ __webpack_require__.p = "";
61
61
  /******/
62
62
  /******/ // Load entry module and return exports
63
- /******/ return __webpack_require__(__webpack_require__.s = 175);
63
+ /******/ return __webpack_require__(__webpack_require__.s = 199);
64
64
  /******/ })
65
65
  /************************************************************************/
66
66
  /******/ ({
67
67
 
68
- /***/ 175:
68
+ /***/ 199:
69
69
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
70
70
 
71
71
  "use strict";
72
72
  Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
73
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_Core_embed_controller__ = __webpack_require__(176);
73
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_Core_embed_controller__ = __webpack_require__(200);
74
74
 
75
75
 
76
76
  window.EmbedController = __WEBPACK_IMPORTED_MODULE_0_Core_embed_controller__["a" /* default */];
77
77
 
78
78
  /***/ }),
79
79
 
80
- /***/ 176:
80
+ /***/ 200:
81
81
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
82
82
 
83
83
  "use strict";
84
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(177);
85
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_pyrsmk_toast__ = __webpack_require__(178);
84
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__api__ = __webpack_require__(201);
85
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_pyrsmk_toast__ = __webpack_require__(202);
86
86
  /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_pyrsmk_toast___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_pyrsmk_toast__);
87
87
  var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
88
88
 
@@ -444,7 +444,7 @@ var EmbedController = function () {
444
444
 
445
445
  /***/ }),
446
446
 
447
- /***/ 177:
447
+ /***/ 201:
448
448
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
449
449
 
450
450
  "use strict";
@@ -650,7 +650,7 @@ var EmbedApi = function () {
650
650
 
651
651
  /***/ }),
652
652
 
653
- /***/ 178:
653
+ /***/ 202:
654
654
  /***/ (function(module, exports, __webpack_require__) {
655
655
 
656
656
  var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {