!function(t,n){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=n():"function"==typeofdefine&&define.amd?define(n):t.VueResource=n()}(this,function(){"use strict";functiont(t){this.state=Z,this.value=void0,this.deferred=[];varn=this;try{t(function(t){n.resolve(t)},function(t){n.reject(t)})}catch(e){n.reject(e)}}functionn(t,n){tinstanceofnt?this.promise=t:this.promise=newnt(t.bind(n)),this.context=n}functione(t){rt=t.util,ot=t.config.debug||!t.config.silent}functiono(t){"undefined"!=typeofconsole&&ot&&console.warn("[VueResource warn]: "+t)}functionr(t){"undefined"!=typeofconsole&&console.error(t)}functioni(t,n){returnrt.nextTick(t,n)}functionu(t){returnt.replace(/^\s*|\s*$/g,"")}functions(t){return"string"==typeoft}functionc(t){returnt===!0||t===!1}functiona(t){return"function"==typeoft}functionf(t){returnnull!==t&&"object"==typeoft}functionh(t){returnf(t)&&Object.getPrototypeOf(t)==Object.prototype}functionp(t){return"undefined"!=typeofFormData&&tinstanceofFormData}functionl(t,e,o){varr=n.resolve(t);returnarguments.length<2?r:r.then(e,o)}functiond(t,n,e){returne=e||{},a(e)&&(e=e.call(n)),v(t.bind({$vm:n,$options:e}),t,{$options:e})}functionm(t,n){vare,o;if("number"==typeoft.length)for(e=0;e<t.length;e++)n.call(t[e],t[e],e);elseif(f(t))for(oint)t.hasOwnProperty(o)&&n.call(t[o],t[o],o);returnt}functionv(t){varn=it.slice.call(arguments,1);returnn.forEach(function(n){g(t,n,!0)}),t}functiony(t){varn=it.slice.call(arguments,1);returnn.forEach(function(n){for(vareinn)void0===t[e]&&(t[e]=n[e])}),t}functionb(t){varn=it.slice.call(arguments,1);returnn.forEach(function(n){g(t,n)}),t}functiong(t,n,e){for(varoinn)e&&(h(n[o])||ut(n[o]))?(h(n[o])&&!h(t[o])&&(t[o]={}),ut(n[o])&&!ut(t[o])&&(t[o]=[]),g(t[o],n[o],e)):void0!==n[o]&&(t[o]=n[o])}functionw(t,n){vare=n(t);returns(t.root)&&!e.match(/^(https?:)?\//)&&(e=t.root+"/"+e),e}functionT(t,n){vare=Object.keys(R.options.params),o={},r=n(t);returnm(t.params,function(t,n){e.indexOf(n)===-1&&(o[n]=t)}),o=R.params(o),o&&(r+=(r.indexOf("?")==-1?"?":"&")+o),r}functionj(t,n,e){varo=E(t),r=o.expand(n);returne&&e.push.apply(e,o.vars),r}functionE(t){varn=["+","#",".","/",";","?","&"],e=[];return{vars:e,expand:function(o){returnt.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(t,r,i){if(r){varu=null,s=[];if(n.indexOf(r.charAt(0))!==-1&&(u=r.charAt(0),r=r.substr(1)),r.split(/,/g).forEach(function(t){varn=/([^:\*]*)(?::(\d+)|(\*))?/.exec(t);s.push.apply(s,x(o,u,n[1],n[2]||n[3])),e.push(n[1])}),u&&"+"!==u){varc=",";return"?"===u?c="&":"#"!==u&&(c=u),(0!==s.length?u:"")+s.join(c)}returns.join(",")}return$(i)})}}}functionx(t,n,e,o){varr=t[e],i=[];if(O(r)&&""!==r)if("string"==typeofr||"number"==typeofr||"boolean"==typeofr)r=r.toString(),o&&"*"!==o&&(r=r.substring(0,parseInt(o,10))),i.push(C(n,r,P(n)?e:null));elseif("*"===o)Array.isArray(r)?r.filter(O).forEach(function(t){i.push(C(n,t,P(n)?e:null))}):Object.keys(r).forEach(function(t){O(r[t])&&i.push(C(n,r[t],t))});else{varu=[];Array.isArray(r)?r.filter(O).forEach(function(t){u.push(C(n,t))}):Object.keys(r).forEach(function(t){O(r[t])&&(u.push(encodeURIComponent(t)),u.push(C(n,r[t].toString())))}),P(n)?i.push(encodeURIComponent(e)+"="+u.join(",")):0!==u.length&&i.push(u.join(","))}else";"===n?i.push(encodeURIComponent(e)):""!==r||"&"!==n&&"?"!==n?""===r&&i.push(""):i.push(encodeURIComponent(e)+"=");returni}functionO(t){returnvoid0!==t&&null!==t}functionP(t){return";"===t||"&"===t||"?"===t}functionC(t,n,e){returnn="+"===t||"#"===t?$(n):encodeURIComponent(n),e?encodeURIComponent(e)+"="+n:n}function$(t){returnt.split(/(%[0-9A-Fa-f]{2})/g).map(function(t){return/%[0-9A-Fa-f]/.test(t)||(t=encodeURI(t)),t}).join("")}functionU(t){varn=[],e=j(t.url,t.params,n);returnn.forEach(function(n){deletet.params[n]}),e}functionR(t,n){vare,o=this||{},r=t;returns(t)&&(r={url:t,params:n}),r=v({},R.options,o.$options,r),R.transforms.forEach(function(t){e=A(t,e,o.$vm)}),e(r)}functionA(t,n,e){returnfunction(o){returnt.call(e,o,n)}}functionS(t,n,e){varo,r=ut(n),i=h(n);m(n,function(n,u){o=f(n)||ut(n),e&&(u=e+"["+(i||o?u:"")+"]"),!e&&r?t.add(n.name,n.value):o?S(t,n,u):t.add(u,n)})}functionk(t){returnnewn(function(n){vare=newXDomainRequest,o=function(o){varr=t.respondWith(e.responseText,{status:e.status,statusText:e.statusText});n(r)};t.abort=function(){returne.abort()},e.open(t.method,t.getUrl(),!0),e.timeout=0,e.onload=o,e.onerror=o,e.ontimeout=function(){},e.onprogress=function(){},e.send(t.getBody())})}functionH(t,n){!c(t.crossOrigin)&&I(t)&&(t.crossOrigin=!0),t.crossOrigin&&(ht||(t.client=k),deletet.emulateHTTP),n()}functionI(t){varn=R.parse(R(t));returnn.protocol!==ft.protocol||n.host!==ft.host}functionL(t,n){t.emulateJSON&&h(t.body)&&(t.body=R.params(t.body),t.headers["Content-Type"]="application/x-www-form-urlencoded"),p(t.body)&&deletet.headers["Content-Type"],h(t.body)&&(t.body=JSON.stringify(t.body)),n(function(t){varn=t.headers["Content-Type"];if(s(n)&&0===n.indexOf("application/json"))try{t.data=t.json()}catch(e){t.data=null}elset.data=t.text()})}functionq(t){returnnewn(function(n){vare,o,r=t.jsonp||"callback",i="_jsonp"+Math.random().toString(36).substr(2),u=null;e=function(e){varr=0;"load"===e.type&&null!==u?r=200:"error"===e.type&&(r=404),n(t.respondWith(u,{status:r})),deletewindow[i],document.body.removeChild(o)},t.params[r]=i,window[i]=function(t){u=JSON.stringify(t)},o=document.createElement("script"),o.src=t.getUrl(),o.type="text/javascript",o.async=!0,o.onload=e,o.onerror=e,document.body.appendChild(o)})}functionN(t,n){"JSONP"==t.method&&(t.client=q),n(function(n){"JSONP"==t.method&&(n.data=n.json())})}functionD(t,n){a(t.before)&&t.before.call(this,t),n()}functionJ(t,n){t.emulateHTTP&&/^(PUT|PATCH|DELETE)$/i.test(t.method)&&(t.headers["X-HTTP-Method-Override"]=t.method,t.method="POST"),n()}functionM(t,n){t.method=t.method.toUpperCase(),t.headers=st({},V.headers.common,t.crossOrigin?{}:V.headers.custom,V.headers[t.method.toLowerCase()],t.headers),n()}functionX(t,n){vare;t.timeout&&(e=setTimeout(function(){t.abort()},t.timeout)),n(function(t){clearTimeout(e)})}functionW(t){returnnewn(function(n){vare=newXMLHttpRequest,o=function(o){varr=t.respondWith("response"ine?e.response:e.responseText,{status:1223===e.status?204:e.status,statusText:1223===e.status?"No Content":u(e.statusText),headers:B(e.getAllResponseHeaders())});n(r)};t.abort=function(){returne.abort()},e.open(t.method,t.getUrl(),!0),e.timeout=0,e.onload=o,e.onerror=o,t.progress&&("GET"===t.method?e.addEventListener("progress",t.progress):/^(POST|PUT)$/i.test(t.method)&&e.upload.addEventListener("progress",t.progress)),t.credentials===!0&&(e.withCredentials=!0),m(t.headers||{},function(t,n){e.setRequestHeader(n,t)}),e.send(t.getBody())})}functionB(t){varn,e,o,r={};returnm(u(t).split("\n"),function(t){o=t.indexOf(":"),e=u(t.slice(0,o)),n=u(t.slice(o+1)),r[e]?ut(r[e])?r[e].push(n):r[e]=[r[e],n]:r[e]=n}),r}functionF(t){functione(e){returnnewn(function(n){functions(){r=i.pop(),a(r)?r.call(t,e,c):(o("Invalid interceptor of type "+typeofr+", must be a function"),c())}functionc(e){if(a(e))u.unshift(e);elseif(f(e))returnu.forEach(function(n){e=l(e,function(e){returnn.call(t,e)||e})}),voidl(e,n);s()}s()},t)}varr,i=[G],u=[];returnf(t)||(t=null),e.use=function(t){i.push(t)},e}functionG(t,n){vare=t.client||W;n(e(t))}functionV(t){vare=this||{},o=F(e.$vm);returny(t||{},e.$options,V.options),V.interceptors.forEach(function(t){o.use(t)}),o(newdt(t)).then(function(t){returnt.ok?t:n.reject(t)},function(t){returntinstanceofError&&r(t),n.reject(t)})}function_(t,n,e,o){varr=this||{},i={};returne=st({},_.actions,e),m(e,function(e,u){e=v({url:t,params:n||{}},o,e),i[u]=function(){return(r.$http||V)(z(e,arguments))}}),i}functionz(t,n){vare,o=st({},t),r={};switch(n.length){case2:r=n[0],e=n[1];break;case1:/^(POST|PUT|PATCH)$/i.test(o.method)?e=n[0]:r=n[0];break;case0:break;default:throw"Expected up to 4 arguments [params, body], got "+n.length+" arguments"}returno.body=e,o.params=st({},o.params,r),o}functionK(t){K.installed||(e(t),t.url=R,t.http=V,t.resource=_,t.Promise=n,Object.defineProperties(t.prototype,{$url:{get:function(){returnd(t.url,this,this.$options.url)}},$http:{get:function(){returnd(t.http,this,this.$options.http)}},$resource:{get:function(){returnt.resource.bind(this)}},$promise:{get:function(){varn=this;returnfunction(e){returnnewt.Promise(e,n)}}}}))}varQ=0,Y=1,Z=2;t.reject=function(n){returnnewt(function(t,e){e(n)})},t.resolve=function(n){returnnewt(function(t,e){t(n)})},t.all=function(n){returnnewt(function(e,o){functionr(t){returnfunction(o){u[t]=o,i+=1,i===n.length&&e(u)}}vari=0,u=[];0===n.length&&e(u);for(vars=0;s<n.length;s+=1)t.resolve(n[s]).then(r(s),o)})},t.race=function(n){returnnewt(function(e,o){for(varr=0;r<n.length;r+=1)t.resolve(n[r]).then(e,o)})};vartt=t.prototype;tt.resolve=function(t){varn=this;if(n.state===Z){if(t===n)thrownewTypeError("Promise settled with itself.");vare=!1;try{varo=t&&t.then;if(null!==t&&"object"==typeoft&&"function"==typeofo)returnvoido.call(t,function(t){e||n.resolve(t),e=!0},function(t){e||n.reject(t),e=!0})}catch(r){returnvoid(e||n.reject(r))}n.state=Q,n.value=t,n.notify()}},tt.reject=function(t){varn=this;if(n.state===Z){if(t===n)thrownewTypeError("Promise settled with itself.");n.state=Y,n.value=t,n.notify()}},tt.notify=function(){vart=this;i(function(){if(t.state!==Z)for(;t.deferred.length;){varn=t.deferred.shift(),e=n[0],o=n[1],r=n[2],i=n[3];try{t.state===Q?r("function"==typeofe?e.call(void0,t.value):t.value):t.state===Y&&("function"==typeofo?r(o.call(void0,t.value)):i(t.value))}catch(u){i(u)}}})},tt.then=function(n,e){varo=this;returnnewt(function(t,r){o.deferred.push([n,e,t,r]),o.notify()})},tt["catch"]=function(t){returnthis.then(void0,t)};varnt=window.Promise||t;n.all=function(t,e){returnnewn(nt.all(t),e)},n.resolve=function(t,e){returnnewn(nt.resolve(t),e)},n.reject=function(t,e){returnnewn(nt.reject(t),e)},n.race=function(t,e){returnnewn(nt.race(t),e)};varet=n.prototype;et.bind=function(t){returnthis.context=t,this},et.then=function(t,e){returnt&&t.bind&&this.context&&(t=t.bind(this.context)),e&&e.bind&&this.context&&(e=e.bind(this.context)),newn(this.promise.then(t,e),this.context)},et["catch"]=function(t){returnt&&t.bind&&this.context&&(t=t.bind(this.context)),newn(this.promise["catch"](t),this.context)},et["finally"]=function(t){returnthis.then(function(n){returnt.call(this),n},function(n){returnt.call(this),nt.reject(n)})};varot=!1,rt={},it=[],ut=Array.isArray,st=Object.assign||b,ct=document.documentMode,at=document.createElement("a");R.options={url:"",root:null,params:{}},R.transforms=[U,T,w],R.params=function(t){varn=[],e=encodeURIComponent;returnn.add=function(t,n){a(n)&&(n=n()),null===n&&(n=""),this.push(e(t)+"="+e(n))},S(n,t),n.join("&").replace(/%20/g,"+")},R.parse=function(t){returnct&&(at.href=t,t=at.href),at.href=t,{href:at.href,protocol:at.protocol?at.protocol.replace(/:$/,""):"",port:at.port,host:at.host,hostname:at.hostname,pathname:"/"===at.pathname.charAt(0)?at.pathname:"/"+at.pathname,search:at.search?at.search.replace(/^\?/,""):"",hash:at.hash?at.hash.replace(/^#/,""):""}};varft=R.parse(location.href),ht="withCredentials"innewXMLHttpRequest,pt=function(t,n){if(!(tinstanceofn))thrownewTypeError("Cannot call a class as a function")},lt=function(){functiont(n,e){varo=e.url,r=e.headers,i=e.status,u=e.statusText;pt(this,t),this.url=o,this.body=n,this.headers=r||{},this.status=i||0,this.statusText=u||"",this.ok=i>=200&&i<300}returnt.prototype.text=function(){returnthis.body},t.prototype.blob=function(){returnnewBlob([this.body])},t.prototype.json=function(){returnJSON.parse(this.body)},t}(),dt=function(){functiont(n){pt(this,t),this.method="GET",this.body=null,this.params={},this.headers={},st(this,n)}returnt.prototype.getUrl=function(){returnR(this)},t.prototype.getBody=function(){returnthis.body},t.prototype.respondWith=function(t,n){returnnewlt(t,st(n||{},{url:this.getUrl()}))},t}(),mt={"X-Requested-With":"XMLHttpRequest"},vt={Accept:"application/json, text/plain, */*"},yt={"Content-Type":"application/json;charset=utf-8"};returnV.options={},V.headers={put:yt,post:yt,patch:yt,"delete":yt,custom:mt,common:vt},V.interceptors=[D,X,J,L,N,M,H],["get","delete","head","jsonp"].forEach(function(t){V[t]=function(n,e){returnthis(st(e||{},{url:n,method:t}))}}),["post","put","patch"].forEach(function(t){V[t]=function(n,e,o){returnthis(st(o||{},{url:n,method:t,body:e}))}}),_.actions={get:{method:"GET"},save:{method:"POST"},query:{method:"GET"},update:{method:"PUT"},remove:{method:"DELETE"},"delete":{method:"DELETE"}},"undefined"!=typeofwindow&&window.Vue&&window.Vue.use(K),K});