require=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);throw new Error("Cannot find module '"+s+"'")}var l=n[s]={exports:{}};t[s][0].call(l.exports,function(e){var n=t[s][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s').prop("disabled")),e.support.xhrFileUpload=!(!window.ProgressEvent||!window.FileReader),e.support.xhrFormDataFileUpload=!!window.FormData,e.support.blobSlice=window.Blob&&(Blob.prototype.slice||Blob.prototype.webkitSlice||Blob.prototype.mozSlice),e.widget("blueimp.fileupload",{options:{dropZone:e(document),pasteZone:e(document),fileInput:void 0,replaceFileInput:!0,paramName:void 0,singleFileUploads:!0,limitMultiFileUploads:void 0,sequentialUploads:!1,limitConcurrentUploads:void 0,forceIframeTransport:!1,redirect:void 0,redirectParamName:void 0,postMessage:void 0,multipart:!0,maxChunkSize:void 0,uploadedBytes:void 0,recalculateProgress:!0,progressInterval:100,bitrateInterval:500,autoUpload:!0,messages:{uploadedBytes:"Uploaded bytes exceed file size"},i18n:function(t,n){return t=this.messages[t]||t.toString(),n&&e.each(n,function(e,n){t=t.replace("{"+e+"}",n)}),t},formData:function(e){return e.serializeArray()},add:function(t,n){return t.isDefaultPrevented()?!1:void((n.autoUpload||n.autoUpload!==!1&&e(this).fileupload("option","autoUpload"))&&n.process().done(function(){n.submit()}))},processData:!1,contentType:!1,cache:!1},_specialOptions:["fileInput","dropZone","pasteZone","multipart","forceIframeTransport"],_blobSlice:e.support.blobSlice&&function(){var e=this.slice||this.webkitSlice||this.mozSlice;return e.apply(this,arguments)},_BitrateTimer:function(){this.timestamp=Date.now?Date.now():(new Date).getTime(),this.loaded=0,this.bitrate=0,this.getBitrate=function(e,t,n){var r=e-this.timestamp;return(!this.bitrate||!n||r>n)&&(this.bitrate=(t-this.loaded)*(1e3/r)*8,this.loaded=t,this.timestamp=e),this.bitrate}},_isXHRUpload:function(t){return!t.forceIframeTransport&&(!t.multipart&&e.support.xhrFileUpload||e.support.xhrFormDataFileUpload)},_getFormData:function(t){var n;return"function"==typeof t.formData?t.formData(t.form):e.isArray(t.formData)?t.formData:"object"===e.type(t.formData)?(n=[],e.each(t.formData,function(e,t){n.push({name:e,value:t})}),n):[]},_getTotal:function(t){var n=0;return e.each(t,function(e,t){n+=t.size||1}),n},_initProgressObject:function(t){var n={loaded:0,total:0,bitrate:0};t._progress?e.extend(t._progress,n):t._progress=n},_initResponseObject:function(e){var t;if(e._response)for(t in e._response)e._response.hasOwnProperty(t)&&delete e._response[t];else e._response={}},_onProgress:function(t,n){if(t.lengthComputable){var r,i=Date.now?Date.now():(new Date).getTime();if(n._time&&n.progressInterval&&i-n._time").prop("href",t.url).prop("host");t.dataType="iframe "+(t.dataType||""),t.formData=this._getFormData(t),t.redirect&&n&&n!==location.host&&t.formData.push({name:t.redirectParamName||"redirect",value:t.redirect})},_initDataSettings:function(e){this._isXHRUpload(e)?(this._chunkedUpload(e,!0)||(e.data||this._initXHRData(e),this._initProgressListener(e)),e.postMessage&&(e.dataType="postmessage "+(e.dataType||""))):this._initIframeSettings(e)},_getParamName:function(t){var n=e(t.fileInput),r=t.paramName;return r?e.isArray(r)||(r=[r]):(r=[],n.each(function(){for(var t=e(this),n=t.prop("name")||"files[]",i=(t.prop("files")||[1]).length;i;)r.push(n),i-=1}),r.length||(r=[n.prop("name")||"files[]"])),r},_initFormSettings:function(t){t.form&&t.form.length||(t.form=e(t.fileInput.prop("form")),t.form.length||(t.form=e(this.options.fileInput.prop("form")))),t.paramName=this._getParamName(t),t.url||(t.url=t.form.prop("action")||location.href),t.type=(t.type||"string"===e.type(t.form.prop("method"))&&t.form.prop("method")||"").toUpperCase(),"POST"!==t.type&&"PUT"!==t.type&&"PATCH"!==t.type&&(t.type="POST"),t.formAcceptCharset||(t.formAcceptCharset=t.form.attr("accept-charset"))},_getAJAXSettings:function(t){var n=e.extend({},this.options,t);return this._initFormSettings(n),this._initDataSettings(n),n},_getDeferredState:function(e){return e.state?e.state():e.isResolved()?"resolved":e.isRejected()?"rejected":"pending"},_enhancePromise:function(e){return e.success=e.done,e.error=e.fail,e.complete=e.always,e},_getXHRPromise:function(t,n,r){var i=e.Deferred(),o=i.promise();return n=n||this.options.context||o,t===!0?i.resolveWith(n,r):t===!1&&i.rejectWith(n,r),o.abort=i.promise,this._enhancePromise(o)},_addConvenienceMethods:function(t,n){var r=this,i=function(t){return e.Deferred().resolveWith(r,t).promise()};n.process=function(t,o){return(t||o)&&(n._processQueue=this._processQueue=(this._processQueue||i([this])).pipe(function(){return n.errorThrown?e.Deferred().rejectWith(r,[n]).promise():i(arguments)}).pipe(t,o)),this._processQueue||i([this])},n.submit=function(){return"pending"!==this.state()&&(n.jqXHR=this.jqXHR=r._trigger("submit",e.Event("submit",{delegatedEvent:t}),this)!==!1&&r._onSend(t,this)),this.jqXHR||r._getXHRPromise()},n.abort=function(){return this.jqXHR?this.jqXHR.abort():(this.errorThrown="abort",r._getXHRPromise())},n.state=function(){return this.jqXHR?r._getDeferredState(this.jqXHR):this._processQueue?r._getDeferredState(this._processQueue):void 0},n.processing=function(){return!this.jqXHR&&this._processQueue&&"pending"===r._getDeferredState(this._processQueue)},n.progress=function(){return this._progress},n.response=function(){return this._response}},_getUploadedBytes:function(e){var t=e.getResponseHeader("Range"),n=t&&t.split("-"),r=n&&n.length>1&&parseInt(n[1],10);return r&&r+1},_chunkedUpload:function(t,n){t.uploadedBytes=t.uploadedBytes||0;var r,i,o=this,s=t.files[0],a=s.size,u=t.uploadedBytes,l=t.maxChunkSize||a,c=this._blobSlice,f=e.Deferred(),h=f.promise();return this._isXHRUpload(t)&&c&&(u||a>l)&&!t.data?n?!0:u>=a?(s.error=t.i18n("uploadedBytes"),this._getXHRPromise(!1,t.context,[null,"error",s.error])):(i=function(){var n=e.extend({},t),h=n._progress.loaded;n.blob=c.call(s,u,u+l,s.type),n.chunkSize=n.blob.size,n.contentRange="bytes "+u+"-"+(u+n.chunkSize-1)+"/"+a,o._initXHRData(n),o._initProgressListener(n),r=(o._trigger("chunksend",null,n)!==!1&&e.ajax(n)||o._getXHRPromise(!1,n.context)).done(function(r,s,l){u=o._getUploadedBytes(l)||u+n.chunkSize,h+n.chunkSize-n._progress.loaded&&o._onProgress(e.Event("progress",{lengthComputable:!0,loaded:u-n.uploadedBytes,total:u-n.uploadedBytes}),n),t.uploadedBytes=n.uploadedBytes=u,n.result=r,n.textStatus=s,n.jqXHR=l,o._trigger("chunkdone",null,n),o._trigger("chunkalways",null,n),a>u?i():f.resolveWith(n.context,[r,s,l])}).fail(function(e,t,r){n.jqXHR=e,n.textStatus=t,n.errorThrown=r,o._trigger("chunkfail",null,n),o._trigger("chunkalways",null,n),f.rejectWith(n.context,[e,t,r])})},this._enhancePromise(h),h.abort=function(){return r.abort()},i(),h):!1},_beforeSend:function(e,t){0===this._active&&(this._trigger("start"),this._bitrateTimer=new this._BitrateTimer,this._progress.loaded=this._progress.total=0,this._progress.bitrate=0),this._initResponseObject(t),this._initProgressObject(t),t._progress.loaded=t.loaded=t.uploadedBytes||0,t._progress.total=t.total=this._getTotal(t.files)||1,t._progress.bitrate=t.bitrate=0,this._active+=1,this._progress.loaded+=t.loaded,this._progress.total+=t.total},_onDone:function(t,n,r,i){var o=i._progress.total,s=i._response;i._progress.loadeda._sending)for(var r=a._slots.shift();r;){if("pending"===a._getDeferredState(r)){r.resolve();break}r=a._slots.shift()}0===a._active&&a._trigger("stop")})};return this._beforeSend(t,u),this.options.sequentialUploads||this.options.limitConcurrentUploads&&this.options.limitConcurrentUploads<=this._sending?(this.options.limitConcurrentUploads>1?(o=e.Deferred(),this._slots.push(o),s=o.pipe(l)):(this._sequence=this._sequence.pipe(l,l),s=this._sequence),s.abort=function(){return i=[void 0,"abort","abort"],r?r.abort():(o&&o.rejectWith(u.context,i),l())},this._enhancePromise(s)):l()},_onAdd:function(t,n){var r,i,o,s,a=this,u=!0,l=e.extend({},this.options,n),c=l.limitMultiFileUploads,f=this._getParamName(l);if((l.singleFileUploads||c)&&this._isXHRUpload(l))if(!l.singleFileUploads&&c)for(o=[],r=[],s=0;s").append(n)[0].reset(),t.after(n).detach(),e.cleanData(t.unbind("remove")),this.options.fileInput=this.options.fileInput.map(function(e,r){return r===t[0]?n[0]:r}),t[0]===this.element[0]&&(this.element=n)},_handleFileTreeEntry:function(t,n){var r,i=this,o=e.Deferred(),s=function(e){e&&!e.entry&&(e.entry=t),o.resolve([e])};return n=n||"",t.isFile?t._file?(t._file.relativePath=n,o.resolve(t._file)):t.file(function(e){e.relativePath=n,o.resolve(e)},s):t.isDirectory?(r=t.createReader(),r.readEntries(function(e){i._handleFileTreeEntries(e,n+t.name+"/").done(function(e){o.resolve(e)}).fail(s)},s)):o.resolve([]),o.promise()},_handleFileTreeEntries:function(t,n){var r=this;return e.when.apply(e,e.map(t,function(e){return r._handleFileTreeEntry(e,n)})).pipe(function(){return Array.prototype.concat.apply([],arguments)})},_getDroppedFiles:function(t){t=t||{};var n=t.items;return n&&n.length&&(n[0].webkitGetAsEntry||n[0].getAsEntry)?this._handleFileTreeEntries(e.map(n,function(e){var t;return e.webkitGetAsEntry?(t=e.webkitGetAsEntry(),t&&(t._file=e.getAsFile()),t):e.getAsEntry()})):e.Deferred().resolve(e.makeArray(t.files)).promise()},_getSingleFileInputFiles:function(t){t=e(t);var n,r,i=t.prop("webkitEntries")||t.prop("entries");if(i&&i.length)return this._handleFileTreeEntries(i);if(n=e.makeArray(t.prop("files")),n.length)void 0===n[0].name&&n[0].fileName&&e.each(n,function(e,t){t.name=t.fileName,t.size=t.fileSize});else{if(r=t.prop("value"),!r)return e.Deferred().resolve([]).promise();n=[{name:r.replace(/^.*\\/,"")}]}return e.Deferred().resolve(n).promise()},_getFileInputFiles:function(t){return t instanceof e&&1!==t.length?e.when.apply(e,e.map(t,this._getSingleFileInputFiles)).pipe(function(){return Array.prototype.concat.apply([],arguments)}):this._getSingleFileInputFiles(t)},_onChange:function(t){var n=this,r={fileInput:e(t.target),form:e(t.target.form)};this._getFileInputFiles(r.fileInput).always(function(i){r.files=i,n.options.replaceFileInput&&n._replaceFileInput(r.fileInput),n._trigger("change",e.Event("change",{delegatedEvent:t}),r)!==!1&&n._onAdd(t,r)})},_onPaste:function(t){var n=t.originalEvent&&t.originalEvent.clipboardData&&t.originalEvent.clipboardData.items,r={files:[]};n&&n.length&&(e.each(n,function(e,t){var n=t.getAsFile&&t.getAsFile();n&&r.files.push(n)}),this._trigger("paste",e.Event("paste",{delegatedEvent:t}),r)!==!1&&this._onAdd(t,r))},_onDrop:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var n=this,r=t.dataTransfer,i={};r&&r.files&&r.files.length&&(t.preventDefault(),this._getDroppedFiles(r).always(function(r){i.files=r,n._trigger("drop",e.Event("drop",{delegatedEvent:t}),i)!==!1&&n._onAdd(t,i)}))},_onDragOver:function(t){t.dataTransfer=t.originalEvent&&t.originalEvent.dataTransfer;var n=t.dataTransfer;n&&-1!==e.inArray("Files",n.types)&&this._trigger("dragover",e.Event("dragover",{delegatedEvent:t}))!==!1&&(t.preventDefault(),n.dropEffect="copy")},_initEventHandlers:function(){this._isXHRUpload(this.options)&&(this._on(this.options.dropZone,{dragover:this._onDragOver,drop:this._onDrop}),this._on(this.options.pasteZone,{paste:this._onPaste})),e.support.fileInput&&this._on(this.options.fileInput,{change:this._onChange})},_destroyEventHandlers:function(){this._off(this.options.dropZone,"dragover drop"),this._off(this.options.pasteZone,"paste"),this._off(this.options.fileInput,"change")},_setOption:function(t,n){var r=-1!==e.inArray(t,this._specialOptions);r&&this._destroyEventHandlers(),this._super(t,n),r&&(this._initSpecialOptions(),this._initEventHandlers())},_initSpecialOptions:function(){var t=this.options;void 0===t.fileInput?t.fileInput=this.element.is('input[type="file"]')?this.element:this.element.find('input[type="file"]'):t.fileInput instanceof e||(t.fileInput=e(t.fileInput)),t.dropZone instanceof e||(t.dropZone=e(t.dropZone)),t.pasteZone instanceof e||(t.pasteZone=e(t.pasteZone))},_getRegExp:function(e){var t=e.split("/"),n=t.pop();return t.shift(),new RegExp(t.join("/"),n)},_isRegExpOption:function(t,n){return"url"!==t&&"string"===e.type(n)&&/^\/.*\/[igm]{0,3}$/.test(n)},_initDataAttributes:function(){var t=this,n=this.options;e.each(e(this.element[0].cloneNode(!1)).data(),function(e,r){t._isRegExpOption(e,r)&&(r=t._getRegExp(r)),n[e]=r})},_create:function(){this._initDataAttributes(),this._initSpecialOptions(),this._slots=[],this._sequence=this._getXHRPromise(!0),this._sending=this._active=0,this._initProgressObject(this),this._initEventHandlers()},active:function(){return this._active},progress:function(){return this._progress},add:function(t){var n=this;t&&!this.options.disabled&&(t.fileInput&&!t.files?this._getFileInputFiles(t.fileInput).always(function(e){t.files=e,n._onAdd(null,t)}):(t.files=e.makeArray(t.files),this._onAdd(null,t)))},send:function(t){if(t&&!this.options.disabled){if(t.fileInput&&!t.files){var n,r,i=this,o=e.Deferred(),s=o.promise();return s.abort=function(){return r=!0,n?n.abort():(o.reject(null,"abort","abort"),s)},this._getFileInputFiles(t.fileInput).always(function(e){if(!r){if(!e.length)return void o.reject();t.files=e,n=i._onSend(null,t).then(function(e,t,n){o.resolve(e,t,n)},function(e,t,n){o.reject(e,t,n)})}}),this._enhancePromise(s)}if(t.files=e.makeArray(t.files),t.files.length)return this._onSend(null,t)}return this._getXHRPromise(!1,t&&t.context)}})})},{}],5:[function(){!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):e(window.jQuery)}(function(e){"use strict";var t=0;e.ajaxTransport("iframe",function(n){if(n.async){var r,i,o,s=n.initialIframeSrc||"javascript:false;";return{send:function(a,u){r=e('
'),r.attr("accept-charset",n.formAcceptCharset),o=/\?/.test(n.url)?"&":"?","DELETE"===n.type?(n.url=n.url+o+"_method=DELETE",n.type="POST"):"PUT"===n.type?(n.url=n.url+o+"_method=PUT",n.type="POST"):"PATCH"===n.type&&(n.url=n.url+o+"_method=PATCH",n.type="POST"),t+=1,i=e('').bind("load",function(){var t,o=e.isArray(n.paramName)?n.paramName:[n.paramName];i.unbind("load").bind("load",function(){var t;try{if(t=i.contents(),!t.length||!t[0].firstChild)throw new Error}catch(n){t=void 0}u(200,"success",{iframe:t}),e('').appendTo(r),window.setTimeout(function(){r.remove()},0)}),r.prop("target",i.prop("name")).prop("action",n.url).prop("method",n.type),n.formData&&e.each(n.formData,function(t,n){e('').prop("name",n.name).val(n.value).appendTo(r)}),n.fileInput&&n.fileInput.length&&"POST"===n.type&&(t=n.fileInput.clone(),n.fileInput.after(function(e){return t[e]}),n.paramName&&n.fileInput.each(function(t){e(this).prop("name",o[t]||n.paramName)}),r.append(n.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data")),r.submit(),t&&t.length&&n.fileInput.each(function(n,r){var i=e(t[n]);e(r).prop("name",i.prop("name")),i.replaceWith(r)})}),r.append(i).appendTo(document.body)},abort:function(){i&&i.unbind("load").prop("src",s),r&&r.remove()}}}}),e.ajaxSetup({converters:{"iframe text":function(t){return t&&e(t[0].body).text()},"iframe json":function(t){return t&&e.parseJSON(e(t[0].body).text())},"iframe html":function(t){return t&&e(t[0].body).html()},"iframe xml":function(t){var n=t&&t[0];return n&&e.isXMLDoc(n)?n:e.parseXML(n.XMLDocument&&n.XMLDocument.xml||e(n.body).html())},"iframe script":function(t){return t&&e.globalEval(e(t[0].body).text())}}})})},{}],6:[function(){!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e,t){var n=0,r=Array.prototype.slice,i=e.cleanData;e.cleanData=function(t){for(var n,r=0;null!=(n=t[r]);r++)try{e(n).triggerHandler("remove")}catch(o){}i(t)},e.widget=function(t,n,r){var i,o,s,a,u={},l=t.split(".")[0];t=t.split(".")[1],i=l+"-"+t,r||(r=n,n=e.Widget),e.expr[":"][i.toLowerCase()]=function(t){return!!e.data(t,i)},e[l]=e[l]||{},o=e[l][t],s=e[l][t]=function(e,t){return this._createWidget?void(arguments.length&&this._createWidget(e,t)):new s(e,t)},e.extend(s,o,{version:r.version,_proto:e.extend({},r),_childConstructors:[]}),a=new n,a.options=e.widget.extend({},a.options),e.each(r,function(t,r){return e.isFunction(r)?void(u[t]=function(){var e=function(){return n.prototype[t].apply(this,arguments)},i=function(e){return n.prototype[t].apply(this,e)};return function(){var t,n=this._super,o=this._superApply;return this._super=e,this._superApply=i,t=r.apply(this,arguments),this._super=n,this._superApply=o,t}}()):void(u[t]=r)}),s.prototype=e.widget.extend(a,{widgetEventPrefix:o?a.widgetEventPrefix:t},u,{constructor:s,namespace:l,widgetName:t,widgetFullName:i}),o?(e.each(o._childConstructors,function(t,n){var r=n.prototype;e.widget(r.namespace+"."+r.widgetName,s,n._proto)}),delete o._childConstructors):n._childConstructors.push(s),e.widget.bridge(t,s)},e.widget.extend=function(n){for(var i,o,s=r.call(arguments,1),a=0,u=s.length;u>a;a++)for(i in s[a])o=s[a][i],s[a].hasOwnProperty(i)&&o!==t&&(n[i]=e.isPlainObject(o)?e.isPlainObject(n[i])?e.widget.extend({},n[i],o):e.widget.extend({},o):o);return n},e.widget.bridge=function(n,i){var o=i.prototype.widgetFullName||n;e.fn[n]=function(s){var a="string"==typeof s,u=r.call(arguments,1),l=this;return s=!a&&u.length?e.widget.extend.apply(null,[s].concat(u)):s,this.each(a?function(){var r,i=e.data(this,o);return i?e.isFunction(i[s])&&"_"!==s.charAt(0)?(r=i[s].apply(i,u),r!==i&&r!==t?(l=r&&r.jquery?l.pushStack(r.get()):r,!1):void 0):e.error("no such method '"+s+"' for "+n+" widget instance"):e.error("cannot call methods on "+n+" prior to initialization; attempted to call method '"+s+"'")}:function(){var t=e.data(this,o);t?t.option(s||{})._init():e.data(this,o,new i(s,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{disabled:!1,create:null},_createWidget:function(t,r){r=e(r||this.defaultElement||this)[0],this.element=e(r),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),r!==this&&(e.data(r,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===r&&this.destroy()}}),this.document=e(r.style?r.ownerDocument:r.document||r),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(n,r){var i,o,s,a=n;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof n)if(a={},i=n.split("."),n=i.shift(),i.length){for(o=a[n]=e.widget.extend({},this.options[n]),s=0;sn;n++)this._placeBrick(e[n]);var i={};if(i.height=Math.max.apply(Math,this.colYs),this.options.isFitWidth){var o=0;for(n=this.cols;--n&&0===this.colYs[n];)o++;i.width=(this.cols-o)*this.columnWidth-this.options.gutterWidth}this.styleQueue.push({$el:this.element,style:i});var s,a=this.isLaidOut&&this.options.isAnimated?"animate":"css",u=this.options.animationOptions;for(n=0,r=this.styleQueue.length;r>n;n++)s=this.styleQueue[n],s.$el[a](s.style,u);this.ghoster.layout(this.styleQueue),this.ghoster.updateView(),this.styleQueue=[],t&&t.call(e),this.isLaidOut=!0},_getColumns:function(){var e=this.options.isFitWidth?this.element.parent():this.element,t=e.width();this.columnWidth=this.isFluid?this.options.columnWidth(t):this.options.columnWidth||this.ghoster.firstBrickOuterWidth()||t,this.columnWidth+=this.options.gutterWidth,this.cols=Math.floor((t+this.options.gutterWidth)/this.columnWidth),this.cols=Math.max(this.cols,1)},_placeBrick:function(e){var n,r,i,o,s,a=t(e);if(n=Math.ceil(this.ghoster.outerWidth(a)/this.columnWidth),n=Math.min(n,this.cols),1===n)i=this.colYs;else for(r=this.cols+1-n,i=[],s=0;r>s;s++)o=this.colYs.slice(s,s+n),i[s]=Math.max.apply(Math,o);for(var u=Math.min.apply(Math,i),l=0,c=0,f=i.length;f>c;c++)if(i[c]===u){l=c;break}var h={top:u+this.offset.y}; h[this.horizontalDirection]=this.columnWidth*l+this.offset.x,this.styleQueue.push({$el:a,style:h});var p=u+this.ghoster.outerHeight(a),d=this.cols+1-f;for(c=0;d>c;c++)this.colYs[l+c]=p},resize:function(){var e=this.cols;this._getColumns(),(this.isFluid||this.cols!==e)&&this._reLayout()},_reLayout:function(e){var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.layout(this.$bricks,e)},reloadItems:function(){this.$bricks=this._getBricks(this.element.children())},reload:function(e){this.reloadItems(),this._init(e)},appended:function(e,t,n){if(t){this._filterFindBricks(e).css({top:this.element.height()});var r=this;setTimeout(function(){r._appended(e,n)},1)}else this._appended(e,n)},_appended:function(e,t){var n=this._getBricks(e);this.$bricks=this.$bricks.add(n),this.layout(n,t)},remove:function(e){this.$bricks=this.$bricks.not(e),e.remove()},destroy:function(){this.$bricks.removeClass("masonry-brick").each(function(){this.style.position="",this.style.top="",this.style.left=""});var n=this.element[0].style;for(var r in this.originalStyle)n[r]=this.originalStyle[r];this.element.unbind(".masonry").removeClass("masonry").removeData("masonry"),t(e).unbind(".masonry"),this.ghoster.destroy()}};var o=t.fn.Ghost=function(){function r(){var e=document.createElement("script");return e.type="text/template",e.id=d(),e}function i(e,t,n){t||(t=250);var r,i;return function(){var o=n||this,s=+new Date,a=arguments;r&&r+t>s?(clearTimeout(i),i=setTimeout(function(){r=s,e.apply(o,a)},t)):(r=s,e.apply(o,a))}}function o(e){this.instance=e,this.options=e.options.ghoster||{},p.scrollTop=h.scrollTop(),p.documentHeight=f.height(),p.windowHeight=h.height(),p.windowWidth=h.width(),h.on("ghostscroll.ghoster",t.proxy(this.updateView,this))}function s(e){for(var t,n=e.length;n--;)t=e[n],"IMG"===t.nodeName?t.src!==g&&(t.setAttribute("data-src",t.src),t.src=g):t.style.backgroundImage&&(t.style.backgroundImage="")}function a(e){for(var t,n,r=e.length;r--;)t=e[r],"IMG"===t.nodeName?t.src===g&&(t.src=t.getAttribute("data-src")):(n=t.getAttribute("data-imageurl"),-1===t.style.backgroundImage.indexOf(n)&&(t.style.backgroundImage="url("+n+")"))}var u=40,l=500,c=500,f=t(document),h=t(e),p={scrollTop:null,documentHeight:null,windowHeight:null,windowWidth:null},d=function(){var e=0,t="ghosted";return function(){return t+e++}}();h.bind("scroll.ghoster",i(function(){p.scrollTop=h.scrollTop(),h.trigger("ghostscroll",[p])},u)),o.onBeforeSmartResize=function(){p.scrollTop=h.scrollTop(),p.documentHeight=f.height(),p.windowHeight=h.height(),p.windowWidth=h.width(),h.trigger("ghostbeforeresize",[p])},o.onAfterSmartResize=function(){h.trigger("ghostafterresize",[p])},o._excluder=function(e,n){n=!!n,e instanceof jQuery?e=e.toArray():Array.isArray(e)||(e=[e]);for(var r=e.length;r--;){if(!(e[r]instanceof Element))throw"exclude takes either jquery object, arary of elements, or element.";t.data(e[r],"*exclude",n)}},o.exclude=function(e){return o._excluder(e,!0)},o.unexclude=function(e){return o._excluder(e,!1)};var g="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";return o._brickBlanker=function(e,n){e instanceof Element&&(n=e,e="blank");var r=t.data(n,"*blankables");r&&r.length&&("blank"===e?s(r):a(r),t.data(n,"*blanked","blank"===e))},o._brickUnblanker=function(e){var n=t.data(e,"*blankables");n&&n.length&&s(n)},o.live=function(e){var n=t.data(e),r=n["*attached"],i=(n["*blanked"],n["*detachable"]),o=n["*placeholder"];r||(o.parentNode.replaceChild(i,o),t.data(e,"*attached",!0))},o.prototype.resized=function(){this.updateView()},o.prototype.destroy=function(){var e=["*top","*bottom","*parent","*outerHeight","*outerWidth"];this.instance.$bricks.each(function(){var n=this;t.removeData(n,e)}),h.unbind(".ghoster"),h=null,this.instance=null},o.prototype.updateView=function(){var e=this.instance,n=p.scrollTop-l,r=p.scrollTop+p.windowHeight+c;e.$bricks.each(function(){var e=this,i=t.data(e),o=i["*attached"],u=i["*blankable"],l=i["*blanked"],c=i["*bottom"],f=i["*top"],h=i["*exclude"],p=i["*detachable"],d=i["*placeholder"],g=i["*seen"];if(r>f&&c>n){if(u&&l&&(a(i["*blankables"]),t.data(e,"*blanked",!1)),g||t.data(e,"*seen",!0),o)return;d.parentNode.replaceChild(p,d),t.data(e,"*attached",!0)}else{if(!g||!o||h)return;u&&!l&&(s(i["*blankables"]),t.data(e,"*blanked",!0)),p.parentNode.replaceChild(d,p),t.data(e,"*attached",!1)}})},o.prototype.layout=function(e){var i,o,s,a,u,l,c,f,h,p,d=this.instance.element,g=d.get(0),m=t.data(g),v=m["*top"];v||(v=d.offset().top,t.data(g,"*top",v));for(var y=this.options.detachable,b=e.length;b--;)if(s=e[b].$el.get(0),g!==s){if(f=t.data(s),l=f["*outerHeight"],"undefined"==typeof l)throw"should have outerHeight already";h=f["*blankable"],a=f["*parent"],u=f["*placeholder"],o=f["*detachable"],a&&u&&o&&h!==n||(p=t.makeArray(s.querySelectorAll("[data-imageurl], img")),o=y?s.querySelector(y):s,u=r(),a=s.parentNode,t.data(s,"*blankable",!!p.length),t.data(s,"*blanked",!!p.length),t.data(s,"*blankables",p.length?p:null),t.data(s,"*attached",!0),t.data(s,"*seen",!1),t.data(s,"*detachable",o),t.data(s,"*parent",a),t.data(s,"*placeholder",u)),c=v+parseInt(s.style.top,10),i=c+l,t.data(s,"*bottom",i),t.data(s,"*top",c)}},o.prototype.firstBrickOuterWidth=function(){var e=this.instance.$bricks.get(0),n=this.instance.$bricks.eq(0);return t.data(e,"*outerWidth")||n.outerWidth(!0)},o.prototype.recalc=function(e){var n=this,r=e.get(0),i=t.data(r),o=e.outerHeight(!0),s=e.outerWidth(!0);return(i["*outerHeight"]!==o||i["*outerWidth"]!==s)&&(t.data(r,"*outerHeight",o),t.data(r,"*outerWidth",s),n._reLayout()),this},o.prototype.outerWidth=function(e){var n=e.get(0),r=t.data(n,"*outerWidth");return r||(r=e.outerWidth(!0),t.data(n,"*outerWidth",r)),r},o.prototype.outerHeight=function(e){var n=e.get(0),r=t.data(n,"*outerHeight");return r||(r=e.outerHeight(!0),t.data(n,"*outerHeight",r)),r},o}();t.fn.imagesLoaded=function(e){function n(){e.call(i,o)}function r(e){var i=e.target;i.src!==a&&-1===t.inArray(i,u)&&(u.push(i),--s<=0&&(setTimeout(n),o.unbind(".imagesLoaded",r)))}var i=this,o=i.find("img").add(i.filter("img")),s=o.length,a="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",u=[];return s||n(),o.bind("load.imagesLoaded error.imagesLoaded",r).each(function(){var e=this.src;this.src=a,this.src=e}),i};var s=function(t){e.console&&e.console.error(t)};t.fn.ghost=function(e){if("string"==typeof e){var n=Array.prototype.slice.call(arguments,1);this.each(function(){var r=t.data(this,"masonry");if(!t.isFunction(r.ghoster[e]))throw"Bad Ghost method.";r.ghoster[e].apply(r,n)})}return this},t.fn.masonry=function(e){if("string"==typeof e){var n=Array.prototype.slice.call(arguments,1);this.each(function(){var r=t.data(this,"masonry");return r?t.isFunction(r[e])&&"_"!==e.charAt(0)?void r[e].apply(r,n):void s("no such method '"+e+"' for masonry instance"):void s("cannot call methods on masonry prior to initialization; attempted to call method '"+e+"'")})}else this.each(function(){var n=t.data(this,"masonry");n?(n.option(e||{}),n._init()):t.data(this,"masonry",new t.Mason(e,this))});return this}}(window,jQuery)},{}],backbone:[function(e,t){t.exports=e("5kFNoY")},{}],"5kFNoY":[function(e,t,n){!function(t,r){if("function"==typeof define&&define.amd)define(["underscore","jquery","exports"],function(e,n,i){t.Backbone=r(t,i,e,n)});else if("undefined"!=typeof n){var i=e("underscore");r(t,n,i)}else t.Backbone=r(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}(this,function(e,t,n,r){{var i=e.Backbone,o=[],s=(o.push,o.slice);o.splice}t.VERSION="1.1.2",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var a=t.Events={on:function(e,t,n){if(!l(this,"on",e,[t,n])||!t)return this;this._events||(this._events={});var r=this._events[e]||(this._events[e]=[]);return r.push({callback:t,context:n,ctx:n||this}),this},once:function(e,t,r){if(!l(this,"once",e,[t,r])||!t)return this;var i=this,o=n.once(function(){i.off(e,o),t.apply(this,arguments)});return o._callback=t,this.on(e,o,r)},off:function(e,t,r){var i,o,s,a,u,c,f,h;if(!this._events||!l(this,"off",e,[t,r]))return this;if(!e&&!t&&!r)return this._events=void 0,this;for(a=e?[e]:n.keys(this._events),u=0,c=a.length;c>u;u++)if(e=a[u],s=this._events[e]){if(this._events[e]=i=[],t||r)for(f=0,h=s.length;h>f;f++)o=s[f],(t&&t!==o.callback&&t!==o.callback._callback||r&&r!==o.context)&&i.push(o);i.length||delete this._events[e]}return this},trigger:function(e){if(!this._events)return this;var t=s.call(arguments,1);if(!l(this,"trigger",e,t))return this;var n=this._events[e],r=this._events.all;return n&&c(n,t),r&&c(r,arguments),this},stopListening:function(e,t,r){var i=this._listeningTo;if(!i)return this;var o=!t&&!r;r||"object"!=typeof t||(r=this),e&&((i={})[e._listenId]=e);for(var s in i)e=i[s],e.off(t,r,this),(o||n.isEmpty(e._events))&&delete this._listeningTo[s];return this}},u=/\s+/,l=function(e,t,n,r){if(!n)return!0;if("object"==typeof n){for(var i in n)e[t].apply(e,[i,n[i]].concat(r));return!1}if(u.test(n)){for(var o=n.split(u),s=0,a=o.length;a>s;s++)e[t].apply(e,[o[s]].concat(r));return!1}return!0},c=function(e,t){var n,r=-1,i=e.length,o=t[0],s=t[1],a=t[2];switch(t.length){case 0:for(;++rh;h++)this.trigger("change:"+a[h],this,f[a[h]],r)}if(l)return this;if(!u)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?n.clone(this.changed):!1;var t,r=!1,i=this._changing?this._previousAttributes:this.attributes;for(var o in e)n.isEqual(i[o],t=e[o])||((r||(r={}))[o]=t);return r},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=e?n.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=this,r=e.success;return e.success=function(n){return t.set(t.parse(n,e),e)?(r&&r(t,n,e),void t.trigger("sync",t,n,e)):!1},H(this,e),this.sync("read",this,e)},save:function(e,t,r){var i,o,s,a=this.attributes;if(null==e||"object"==typeof e?(i=e,r=t):(i={})[e]=t,r=n.extend({validate:!0},r),i&&!r.wait){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;i&&r.wait&&(this.attributes=n.extend({},a,i)),void 0===r.parse&&(r.parse=!0);var u=this,l=r.success;return r.success=function(e){u.attributes=a;var t=u.parse(e,r);return r.wait&&(t=n.extend(i||{},t)),n.isObject(t)&&!u.set(t,r)?!1:(l&&l(u,e,r),void u.trigger("sync",u,e,r))},H(this,r),o=this.isNew()?"create":r.patch?"patch":"update","patch"===o&&(r.attrs=i),s=this.sync(o,this,r),i&&r.wait&&(this.attributes=a),s},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=function(){t.trigger("destroy",t,t.collection,e)};if(e.success=function(n){(e.wait||t.isNew())&&i(),r&&r(t,n,e),t.isNew()||t.trigger("sync",t,n,e)},this.isNew())return e.success(),!1;H(this,e);var o=this.sync("delete",this,e);return e.wait||i(),o},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||R();return this.isNew()?e:e.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(e){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend(e||{},{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return r?(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1):!0}});var p=["keys","values","pairs","invert","pick","omit"];n.each(p,function(e){h.prototype[e]=function(){var t=s.call(arguments);return t.unshift(this.attributes),n[e].apply(n,t)}});var d=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},g={add:!0,remove:!0,merge:!0},m={add:!0,remove:!1};n.extend(d.prototype,a,{model:h,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,m))},remove:function(e,t){var r=!n.isArray(e);e=r?[e]:n.clone(e),t||(t={});var i,o,s,a;for(i=0,o=e.length;o>i;i++)a=e[i]=this.get(e[i]),a&&(delete this._byId[a.id],delete this._byId[a.cid],s=this.indexOf(a),this.models.splice(s,1),this.length--,t.silent||(t.index=s,a.trigger("remove",a,this,t)),this._removeReference(a,t));return r?e[0]:e},set:function(e,t){t=n.defaults({},t,g),t.parse&&(e=this.parse(e,t));var r=!n.isArray(e);e=r?e?[e]:[]:n.clone(e);var i,o,s,a,u,l,c,f=t.at,p=this.model,d=this.comparator&&null==f&&t.sort!==!1,m=n.isString(this.comparator)?this.comparator:null,v=[],y=[],b={},x=t.add,w=t.merge,_=t.remove,C=!d&&x&&_?[]:!1;for(i=0,o=e.length;o>i;i++){if(u=e[i]||{},s=u instanceof h?a=u:u[p.prototype.idAttribute||"id"],l=this.get(s))_&&(b[l.cid]=!0),w&&(u=u===a?a.attributes:u,t.parse&&(u=l.parse(u,t)),l.set(u,t),d&&!c&&l.hasChanged(m)&&(c=!0)),e[i]=l;else if(x){if(a=e[i]=this._prepareModel(u,t),!a)continue;v.push(a),this._addReference(a,t)}a=l||a,!C||!a.isNew()&&b[a.id]||C.push(a),b[a.id]=!0}if(_){for(i=0,o=this.length;o>i;++i)b[(a=this.models[i]).cid]||y.push(a);y.length&&this.remove(y,t)}if(v.length||C&&C.length)if(d&&(c=!0),this.length+=v.length,null!=f)for(i=0,o=v.length;o>i;i++)this.models.splice(f+i,0,v[i]);else{C&&(this.models.length=0);var T=C||v;for(i=0,o=T.length;o>i;i++)this.models.push(T[i])}if(c&&this.sort({silent:!0}),!t.silent){for(i=0,o=v.length;o>i;i++)(a=v[i]).trigger("add",a,this,t);(c||C&&C.length)&&this.trigger("sort",this,t)}return r?e[0]:e},reset:function(e,t){t||(t={});for(var r=0,i=this.models.length;i>r;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(){return s.apply(this.models,arguments)},get:function(e){return null==e?void 0:this._byId[e]||this._byId[e.id]||this._byId[e.cid]},at:function(e){return this.models[e]},where:function(e,t){return n.isEmpty(e)?t?void 0:[]:this[t?"find":"filter"](function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},findWhere:function(e){return this.where(e,!0)},sort:function(e){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return e||(e={}),n.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(n.bind(this.comparator,this)),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return n.invoke(this.models,"get",e)},fetch:function(e){e=e?n.clone(e):{},void 0===e.parse&&(e.parse=!0);var t=e.success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t(r,n,e),r.trigger("sync",r,n,e)},H(this,e),this.sync("read",this,e)},create:function(e,t){if(t=t?n.clone(t):{},!(e=this._prepareModel(e,t)))return!1;t.wait||this.add(e,t);var r=this,i=t.success;return t.success=function(e,n){t.wait&&r.add(e,t),i&&i(e,n,t)},e.save(null,t),e},parse:function(e){return e},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(e instanceof h)return e;t=t?n.clone(t):{},t.collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_addReference:function(e){this._byId[e.cid]=e,null!=e.id&&(this._byId[e.id]=e),e.collection||(e.collection=this),e.on("all",this._onModelEvent,this)},_removeReference:function(e){this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){("add"!==e&&"remove"!==e||n===this)&&("destroy"===e&&this.remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],null!=t.id&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments))}});var v=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];n.each(v,function(e){d.prototype[e]=function(){var t=s.call(arguments);return t.unshift(this.models),n[e].apply(n,t)}});var y=["groupBy","countBy","sortBy","indexBy"];n.each(y,function(e){d.prototype[e]=function(t,r){var i=n.isFunction(t)?t:function(e){return e.get(t)};return n[e](this.models,i,r)}});var b=t.View=function(e){this.cid=n.uniqueId("view"),e||(e={}),n.extend(this,n.pick(e,w)),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},x=/^(\S+)\s*(.*)$/,w=["model","collection","el","id","attributes","className","tagName","events"];n.extend(b.prototype,a,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,n){return this.$el&&this.undelegateEvents(),this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0],n!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=n.result(this,"events")))return this;this.undelegateEvents();for(var t in e){var r=e[t];if(n.isFunction(r)||(r=this[e[t]]),r){var i=t.match(x),o=i[1],s=i[2];r=n.bind(r,this),o+=".delegateEvents"+this.cid,""===s?this.$el.on(o,r):this.$el.on(o,s,r)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"),!1);else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e["class"]=n.result(this,"className"));var r=t.$("<"+n.result(this,"tagName")+">").attr(e);this.setElement(r,!1)}}}),t.sync=function(e,r,i){var o=C[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var s={type:o,dataType:"json"};if(i.url||(s.url=n.result(r,"url")||R()),null!=i.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(s.contentType="application/json",s.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(s.contentType="application/x-www-form-urlencoded",s.data=s.data?{model:s.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){s.type="POST",i.emulateJSON&&(s.data._method=o);var a=i.beforeSend;i.beforeSend=function(e){return e.setRequestHeader("X-HTTP-Method-Override",o),a?a.apply(this,arguments):void 0}}"GET"===s.type||i.emulateJSON||(s.processData=!1),"PATCH"===s.type&&_&&(s.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var u=i.xhr=t.ajax(n.extend(s,i));return r.trigger("request",r,u,i),u};var _=!("undefined"==typeof window||!window.ActiveXObject||window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent),C={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var T=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},j=/\((.*?)\)/g,k=/(\(\?)?:\w+/g,E=/\*\w+/g,A=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(T.prototype,a,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return t.history.route(e,function(n){var s=o._extractParameters(e,n);o.execute(i,s),o.trigger.apply(o,["route:"+r].concat(s)),o.trigger("route",r,s),t.history.trigger("route",o,r,s)}),this},execute:function(e,t){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(A,"\\$&").replace(j,"(?:$1)?").replace(k,function(e,t){return t?e:"([^/?]+)"}).replace(E,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null})}});var S=t.History=function(){this.handlers=[],n.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},N=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,O=/msie [\w.]+/,q=/\/$/,I=/#.*$/;S.started=!1,n.extend(S.prototype,a,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(null==e)if(this._hasPushState||!this._wantsHashChange||t){e=decodeURI(this.location.pathname+this.location.search);var n=this.root.replace(q,"");e.indexOf(n)||(e=e.slice(n.length))}else e=this.getHash();return e.replace(N,"")},start:function(e){if(S.started)throw new Error("Backbone.history has already been started");S.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment(),i=document.documentMode,o=O.exec(navigator.userAgent.toLowerCase())&&(!i||7>=i);if(this.root=("/"+this.root+"/").replace(D,"/"),o&&this._wantsHashChange){var s=t.$('