target
stringlengths
5
300
feat_repo_name
stringlengths
6
76
text
stringlengths
26
1.05M
ajax/libs/react/0.9.0/react-with-addons.min.js
RoryStolzenberg/cdnjs
/** * React (with addons) v0.9.0 * * Copyright 2013-2014 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ !function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.React=e()}}(function(){return function e(t,n,o){function r(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);throw new Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return r(n?n:e)},c,c.exports,e,t,n,o)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<o.length;a++)r(o[a]);return r}({1:[function(e,t){"use strict";var n={componentDidMount:function(){this.props.autoFocus&&this.getDOMNode().focus()}};t.exports=n},{}],2:[function(e,t){var n=e("./invariant"),o={addClass:function(e,t){return n(!/\s/.test(t)),t&&(e.classList?e.classList.add(t):o.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return n(!/\s/.test(t)),t&&(e.classList?e.classList.remove(t):o.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?o.addClass:o.removeClass)(e,t)},hasClass:function(e,t){return n(!/\s/.test(t)),e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}};t.exports=o},{"./invariant":118}],3:[function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var o={columnCount:!0,fillOpacity:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},r=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(e){r.forEach(function(t){o[n(t,e)]=o[e]})});var i={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},a={isUnitlessNumber:o,shorthandPropertyExpansions:i};t.exports=a},{}],4:[function(e,t){"use strict";var n=e("./CSSProperty"),o=e("./dangerousStyleValue"),r=e("./escapeTextForBrowser"),i=e("./hyphenate"),a=e("./memoizeStringOnly"),s=a(function(e){return r(i(e))}),u={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=s(n)+":",t+=o(n,r)+";")}return t||null},setValueForStyles:function(e,t){var r=e.style;for(var i in t)if(t.hasOwnProperty(i)){var a=o(i,t[i]);if(a)r[i]=a;else{var s=n.shorthandPropertyExpansions[i];if(s)for(var u in s)r[u]="";else r[i]=""}}}};t.exports=u},{"./CSSProperty":3,"./dangerousStyleValue":104,"./escapeTextForBrowser":106,"./hyphenate":117,"./memoizeStringOnly":126}],5:[function(e,t){"use strict";function n(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function o(e){var t=M.getPooled(P.change,N,e);C.accumulateTwoPhaseDispatches(t),R.batchedUpdates(r,t)}function r(e){y.enqueueEvents(e),y.processEventQueue()}function i(e,t){O=e,N=t,O.attachEvent("onchange",o)}function a(){O&&(O.detachEvent("onchange",o),O=null,N=null)}function s(e,t,n){return e===b.topChange?n:void 0}function u(e,t,n){e===b.topFocus?(a(),i(t,n)):e===b.topBlur&&a()}function c(e,t){O=e,N=t,I=e.value,S=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(O,"value",k),O.attachEvent("onpropertychange",p)}function l(){O&&(delete O.value,O.detachEvent("onpropertychange",p),O=null,N=null,I=null,S=null)}function p(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==I&&(I=t,o(e))}}function d(e,t,n){return e===b.topInput?n:void 0}function h(e,t,n){e===b.topFocus?(l(),c(t,n)):e===b.topBlur&&l()}function f(e){return e!==b.topSelectionChange&&e!==b.topKeyUp&&e!==b.topKeyDown||!O||O.value===I?void 0:(I=O.value,N)}function m(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function v(e,t,n){return e===b.topClick?n:void 0}var g=e("./EventConstants"),y=e("./EventPluginHub"),C=e("./EventPropagators"),E=e("./ExecutionEnvironment"),R=e("./ReactUpdates"),M=e("./SyntheticEvent"),D=e("./isEventSupported"),x=e("./isTextInputElement"),T=e("./keyOf"),b=g.topLevelTypes,P={change:{phasedRegistrationNames:{bubbled:T({onChange:null}),captured:T({onChangeCapture:null})},dependencies:[b.topBlur,b.topChange,b.topClick,b.topFocus,b.topInput,b.topKeyDown,b.topKeyUp,b.topSelectionChange]}},O=null,N=null,I=null,S=null,_=!1;E.canUseDOM&&(_=D("change")&&(!("documentMode"in document)||document.documentMode>8));var w=!1;E.canUseDOM&&(w=D("input")&&(!("documentMode"in document)||document.documentMode>9));var k={get:function(){return S.get.call(this)},set:function(e){I=""+e,S.set.call(this,e)}},A={eventTypes:P,extractEvents:function(e,t,o,r){var i,a;if(n(t)?_?i=s:a=u:x(t)?w?i=d:(i=f,a=h):m(t)&&(i=v),i){var c=i(e,t,o);if(c){var l=M.getPooled(P.change,c,r);return C.accumulateTwoPhaseDispatches(l),l}}a&&a(e,t,o)}};t.exports=A},{"./EventConstants":15,"./EventPluginHub":17,"./EventPropagators":20,"./ExecutionEnvironment":21,"./ReactUpdates":77,"./SyntheticEvent":85,"./isEventSupported":119,"./isTextInputElement":121,"./keyOf":125}],6:[function(e,t){"use strict";var n=0,o={createReactRootIndex:function(){return n++}};t.exports=o},{}],7:[function(e,t){"use strict";function n(e){switch(e){case g.topCompositionStart:return C.compositionStart;case g.topCompositionEnd:return C.compositionEnd;case g.topCompositionUpdate:return C.compositionUpdate}}function o(e,t){return e===g.topKeyDown&&t.keyCode===f}function r(e,t){switch(e){case g.topKeyUp:return-1!==h.indexOf(t.keyCode);case g.topKeyDown:return t.keyCode!==f;case g.topKeyPress:case g.topMouseDown:case g.topBlur:return!0;default:return!1}}function i(e){this.root=e,this.startSelection=c.getSelection(e),this.startValue=this.getText()}var a=e("./EventConstants"),s=e("./EventPropagators"),u=e("./ExecutionEnvironment"),c=e("./ReactInputSelection"),l=e("./SyntheticCompositionEvent"),p=e("./getTextContentAccessor"),d=e("./keyOf"),h=[9,13,27,32],f=229,m=u.canUseDOM&&"CompositionEvent"in window,v=!m||"documentMode"in document&&document.documentMode>8,g=a.topLevelTypes,y=null,C={compositionEnd:{phasedRegistrationNames:{bubbled:d({onCompositionEnd:null}),captured:d({onCompositionEndCapture:null})},dependencies:[g.topBlur,g.topCompositionEnd,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:d({onCompositionStart:null}),captured:d({onCompositionStartCapture:null})},dependencies:[g.topBlur,g.topCompositionStart,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:d({onCompositionUpdate:null}),captured:d({onCompositionUpdateCapture:null})},dependencies:[g.topBlur,g.topCompositionUpdate,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]}};i.prototype.getText=function(){return this.root.value||this.root[p()]},i.prototype.getData=function(){var e=this.getText(),t=this.startSelection.start,n=this.startValue.length-this.startSelection.end;return e.substr(t,e.length-n-t)};var E={eventTypes:C,extractEvents:function(e,t,a,u){var c,p;if(m?c=n(e):y?r(e,u)&&(c=C.compositionEnd):o(e,u)&&(c=C.compositionStart),v&&(y||c!==C.compositionStart?c===C.compositionEnd&&y&&(p=y.getData(),y=null):y=new i(t)),c){var d=l.getPooled(c,a,u);return p&&(d.data=p),s.accumulateTwoPhaseDispatches(d),d}}};t.exports=E},{"./EventConstants":15,"./EventPropagators":20,"./ExecutionEnvironment":21,"./ReactInputSelection":54,"./SyntheticCompositionEvent":83,"./getTextContentAccessor":115,"./keyOf":125}],8:[function(e,t){"use strict";function n(e,t,n){var o=e.childNodes;o[n]!==t&&(t.parentNode===e&&e.removeChild(t),n>=o.length?e.appendChild(t):e.insertBefore(t,o[n]))}var o,r=e("./Danger"),i=e("./ReactMultiChildUpdateTypes"),a=e("./getTextContentAccessor"),s=a();o="textContent"===s?function(e,t){e.textContent=t}:function(e,t){for(;e.firstChild;)e.removeChild(e.firstChild);if(t){var n=e.ownerDocument||document;e.appendChild(n.createTextNode(t))}};var u={dangerouslyReplaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,updateTextContent:o,processUpdates:function(e,t){for(var a,s=null,u=null,c=0;a=e[c];c++)if(a.type===i.MOVE_EXISTING||a.type===i.REMOVE_NODE){var l=a.fromIndex,p=a.parentNode.childNodes[l],d=a.parentID;s=s||{},s[d]=s[d]||[],s[d][l]=p,u=u||[],u.push(p)}var h=r.dangerouslyRenderMarkup(t);if(u)for(var f=0;f<u.length;f++)u[f].parentNode.removeChild(u[f]);for(var m=0;a=e[m];m++)switch(a.type){case i.INSERT_MARKUP:n(a.parentNode,h[a.markupIndex],a.toIndex);break;case i.MOVE_EXISTING:n(a.parentNode,s[a.parentID][a.fromIndex],a.toIndex);break;case i.TEXT_CONTENT:o(a.parentNode,a.textContent);break;case i.REMOVE_NODE:}}};t.exports=u},{"./Danger":11,"./ReactMultiChildUpdateTypes":61,"./getTextContentAccessor":115}],9:[function(e,t){"use strict";var n=e("./invariant"),o={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:16,injectDOMPropertyConfig:function(e){var t=e.Properties||{},r=e.DOMAttributeNames||{},a=e.DOMPropertyNames||{},s=e.DOMMutationMethods||{};e.isCustomAttribute&&i._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var u in t){n(!i.isStandardName[u]),i.isStandardName[u]=!0;var c=u.toLowerCase();i.getPossibleStandardName[c]=u;var l=r[u];l&&(i.getPossibleStandardName[l]=u),i.getAttributeName[u]=l||c,i.getPropertyName[u]=a[u]||u;var p=s[u];p&&(i.getMutationMethod[u]=p);var d=t[u];i.mustUseAttribute[u]=d&o.MUST_USE_ATTRIBUTE,i.mustUseProperty[u]=d&o.MUST_USE_PROPERTY,i.hasSideEffects[u]=d&o.HAS_SIDE_EFFECTS,i.hasBooleanValue[u]=d&o.HAS_BOOLEAN_VALUE,i.hasPositiveNumericValue[u]=d&o.HAS_POSITIVE_NUMERIC_VALUE,n(!i.mustUseAttribute[u]||!i.mustUseProperty[u]),n(i.mustUseProperty[u]||!i.hasSideEffects[u]),n(!i.hasBooleanValue[u]||!i.hasPositiveNumericValue[u])}}},r={},i={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasPositiveNumericValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){return i._isCustomAttributeFunctions.some(function(t){return t.call(null,e)})},getDefaultValueForProperty:function(e,t){var n,o=r[e];return o||(r[e]=o={}),t in o||(n=document.createElement(e),o[t]=n[t]),o[t]},injection:o};t.exports=i},{"./invariant":118}],10:[function(e,t){"use strict";function n(e,t){return null==t||o.hasBooleanValue[e]&&!t||o.hasPositiveNumericValue[e]&&(isNaN(t)||1>t)}var o=e("./DOMProperty"),r=e("./escapeTextForBrowser"),i=e("./memoizeStringOnly"),a=i(function(e){return r(e)+'="'}),s={createMarkupForID:function(e){return a(o.ID_ATTRIBUTE_NAME)+r(e)+'"'},createMarkupForProperty:function(e,t){if(o.isStandardName[e]){if(n(e,t))return"";var i=o.getAttributeName[e];return o.hasBooleanValue[e]?r(i):a(i)+r(t)+'"'}return o.isCustomAttribute(e)?null==t?"":a(e)+r(t)+'"':null},setValueForProperty:function(e,t,r){if(o.isStandardName[t]){var i=o.getMutationMethod[t];if(i)i(e,r);else if(n(t,r))this.deleteValueForProperty(e,t);else if(o.mustUseAttribute[t])e.setAttribute(o.getAttributeName[t],""+r);else{var a=o.getPropertyName[t];o.hasSideEffects[t]&&e[a]===r||(e[a]=r)}}else o.isCustomAttribute(t)&&(null==r?e.removeAttribute(o.getAttributeName[t]):e.setAttribute(t,""+r))},deleteValueForProperty:function(e,t){if(o.isStandardName[t]){var n=o.getMutationMethod[t];if(n)n(e,void 0);else if(o.mustUseAttribute[t])e.removeAttribute(o.getAttributeName[t]);else{var r=o.getPropertyName[t],i=o.getDefaultValueForProperty(e.nodeName,t);o.hasSideEffects[t]&&e[r]===i||(e[r]=i)}}else o.isCustomAttribute(t)&&e.removeAttribute(t)}};t.exports=s},{"./DOMProperty":9,"./escapeTextForBrowser":106,"./memoizeStringOnly":126}],11:[function(e,t){"use strict";function n(e){return e.substring(1,e.indexOf(" "))}var o=e("./ExecutionEnvironment"),r=e("./createNodesFromMarkup"),i=e("./emptyFunction"),a=e("./getMarkupWrap"),s=e("./invariant"),u=/^(<[^ \/>]+)/,c="data-danger-index",l={dangerouslyRenderMarkup:function(e){s(o.canUseDOM);for(var t,l={},p=0;p<e.length;p++)s(e[p]),t=n(e[p]),t=a(t)?t:"*",l[t]=l[t]||[],l[t][p]=e[p];var d=[],h=0;for(t in l)if(l.hasOwnProperty(t)){var f=l[t];for(var m in f)if(f.hasOwnProperty(m)){var v=f[m];f[m]=v.replace(u,"$1 "+c+'="'+m+'" ')}var g=r(f.join(""),i);for(p=0;p<g.length;++p){var y=g[p];y.hasAttribute&&y.hasAttribute(c)&&(m=+y.getAttribute(c),y.removeAttribute(c),s(!d.hasOwnProperty(m)),d[m]=y,h+=1)}}return s(h===d.length),s(d.length===e.length),d},dangerouslyReplaceNodeWithMarkup:function(e,t){s(o.canUseDOM),s(t),s("html"!==e.tagName.toLowerCase());var n=r(t,i)[0];e.parentNode.replaceChild(n,e)}};t.exports=l},{"./ExecutionEnvironment":21,"./createNodesFromMarkup":101,"./emptyFunction":105,"./getMarkupWrap":112,"./invariant":118}],12:[function(e,t){"use strict";var n=e("./DOMProperty"),o=n.injection.MUST_USE_ATTRIBUTE,r=n.injection.MUST_USE_PROPERTY,i=n.injection.HAS_BOOLEAN_VALUE,a=n.injection.HAS_SIDE_EFFECTS,s=n.injection.HAS_POSITIVE_NUMERIC_VALUE,u={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,accessKey:null,action:null,allowFullScreen:o|i,allowTransparency:o,alt:null,async:i,autoComplete:null,autoPlay:i,cellPadding:null,cellSpacing:null,charSet:o,checked:r|i,className:r,cols:o|s,colSpan:null,content:null,contentEditable:null,contextMenu:o,controls:r|i,crossOrigin:null,data:null,dateTime:o,defer:i,dir:null,disabled:o|i,download:null,draggable:null,encType:null,form:o,formNoValidate:i,frameBorder:o,height:o,hidden:o|i,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:r,label:null,lang:null,list:null,loop:r|i,max:null,maxLength:o,mediaGroup:null,method:null,min:null,multiple:r|i,muted:r|i,name:null,noValidate:i,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:r|i,rel:null,required:i,role:o,rows:o|s,rowSpan:null,sandbox:null,scope:null,scrollLeft:r,scrollTop:r,seamless:o|i,selected:r|i,size:o|s,span:s,spellCheck:null,src:null,srcDoc:r,step:null,style:null,tabIndex:null,target:null,title:null,type:null,value:r|a,width:o,wmode:o,autoCapitalize:null,autoCorrect:null,property:null,cx:o,cy:o,d:o,fill:o,fx:o,fy:o,gradientTransform:o,gradientUnits:o,offset:o,points:o,r:o,rx:o,ry:o,spreadMethod:o,stopColor:o,stopOpacity:o,stroke:o,strokeLinecap:o,strokeWidth:o,transform:o,version:o,viewBox:o,x1:o,x2:o,x:o,y1:o,y2:o,y:o},DOMAttributeNames:{className:"class",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",htmlFor:"for",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeLinecap:"stroke-linecap",strokeWidth:"stroke-width",viewBox:"viewBox"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"enctype",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc"},DOMMutationMethods:{className:function(e,t){e.className=t||""}}};t.exports=u},{"./DOMProperty":9}],13:[function(e,t){"use strict";var n=e("./keyOf"),o=[n({ResponderEventPlugin:null}),n({SimpleEventPlugin:null}),n({TapEventPlugin:null}),n({EnterLeaveEventPlugin:null}),n({ChangeEventPlugin:null}),n({SelectEventPlugin:null}),n({CompositionEventPlugin:null}),n({AnalyticsEventPlugin:null}),n({MobileSafariClickEventPlugin:null})];t.exports=o},{"./keyOf":125}],14:[function(e,t){"use strict";var n=e("./EventConstants"),o=e("./EventPropagators"),r=e("./SyntheticMouseEvent"),i=e("./ReactMount"),a=e("./keyOf"),s=n.topLevelTypes,u=i.getFirstReactDOM,c={mouseEnter:{registrationName:a({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:a({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},l=[null,null],p={eventTypes:c,extractEvents:function(e,t,n,a){if(e===s.topMouseOver&&(a.relatedTarget||a.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var p;if(t.window===t)p=t;else{var d=t.ownerDocument;p=d?d.defaultView||d.parentWindow:window}var h,f;if(e===s.topMouseOut?(h=t,f=u(a.relatedTarget||a.toElement)||p):(h=p,f=t),h===f)return null;var m=h?i.getID(h):"",v=f?i.getID(f):"",g=r.getPooled(c.mouseLeave,m,a);g.type="mouseleave",g.target=h,g.relatedTarget=f;var y=r.getPooled(c.mouseEnter,v,a);return y.type="mouseenter",y.target=f,y.relatedTarget=h,o.accumulateEnterLeaveDispatches(g,y,m,v),l[0]=g,l[1]=y,l}};t.exports=p},{"./EventConstants":15,"./EventPropagators":20,"./ReactMount":58,"./SyntheticMouseEvent":88,"./keyOf":125}],15:[function(e,t){"use strict";var n=e("./keyMirror"),o=n({bubbled:null,captured:null}),r=n({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),i={topLevelTypes:r,PropagationPhases:o};t.exports=i},{"./keyMirror":124}],16:[function(e,t){var n=e("./emptyFunction"),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent(t,n)}}):void 0},capture:function(e,t,o){return e.addEventListener?(e.addEventListener(t,o,!0),{remove:function(){e.removeEventListener(t,o,!0)}}):{remove:n}}};t.exports=o},{"./emptyFunction":105}],17:[function(e,t){"use strict";var n=e("./EventPluginRegistry"),o=e("./EventPluginUtils"),r=e("./ExecutionEnvironment"),i=e("./accumulate"),a=e("./forEachAccumulated"),s=e("./invariant"),u=(e("./isEventSupported"),{}),c=null,l=function(e){if(e){var t=o.executeDispatch,r=n.getPluginModuleForEvent(e);r&&r.executeDispatch&&(t=r.executeDispatch),o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e)}},p=null,d={injection:{injectMount:o.injection.injectMount,injectInstanceHandle:function(e){p=e},getInstanceHandle:function(){return p},injectEventPluginOrder:n.injectEventPluginOrder,injectEventPluginsByName:n.injectEventPluginsByName},eventNameDispatchConfigs:n.eventNameDispatchConfigs,registrationNameModules:n.registrationNameModules,putListener:function(e,t,n){s(r.canUseDOM),s(!n||"function"==typeof n);var o=u[t]||(u[t]={});o[e]=n},getListener:function(e,t){var n=u[t];return n&&n[e]},deleteListener:function(e,t){var n=u[t];n&&delete n[e]},deleteAllListeners:function(e){for(var t in u)delete u[t][e]},extractEvents:function(e,t,o,r){for(var a,s=n.plugins,u=0,c=s.length;c>u;u++){var l=s[u];if(l){var p=l.extractEvents(e,t,o,r);p&&(a=i(a,p))}}return a},enqueueEvents:function(e){e&&(c=i(c,e))},processEventQueue:function(){var e=c;c=null,a(e,l),s(!c)},__purge:function(){u={}},__getListenerBank:function(){return u}};t.exports=d},{"./EventPluginRegistry":18,"./EventPluginUtils":19,"./ExecutionEnvironment":21,"./accumulate":94,"./forEachAccumulated":108,"./invariant":118,"./isEventSupported":119}],18:[function(e,t){"use strict";function n(){if(a)for(var e in s){var t=s[e],n=a.indexOf(e);if(i(n>-1),!u.plugins[n]){i(t.extractEvents),u.plugins[n]=t;var r=t.eventTypes;for(var c in r)i(o(r[c],t,c))}}}function o(e,t,n){i(!u.eventNameDispatchConfigs[n]),u.eventNameDispatchConfigs[n]=e;var o=e.phasedRegistrationNames;if(o){for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];r(s,t,n)}return!0}return e.registrationName?(r(e.registrationName,t,n),!0):!1}function r(e,t,n){i(!u.registrationNameModules[e]),u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e("./invariant"),a=null,s={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){i(!a),a=Array.prototype.slice.call(e),n()},injectEventPluginsByName:function(e){var t=!1;for(var o in e)if(e.hasOwnProperty(o)){var r=e[o];s[o]!==r&&(i(!s[o]),s[o]=r,t=!0)}t&&n()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var o=u.registrationNameModules[t.phasedRegistrationNames[n]];if(o)return o}return null},_resetEventPlugins:function(){a=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var o=u.registrationNameModules;for(var r in o)o.hasOwnProperty(r)&&delete o[r]}};t.exports=u},{"./invariant":118}],19:[function(e,t){"use strict";function n(e){return e===f.topMouseUp||e===f.topTouchEnd||e===f.topTouchCancel}function o(e){return e===f.topMouseMove||e===f.topTouchMove}function r(e){return e===f.topMouseDown||e===f.topTouchStart}function i(e,t){var n=e._dispatchListeners,o=e._dispatchIDs;if(Array.isArray(n))for(var r=0;r<n.length&&!e.isPropagationStopped();r++)t(e,n[r],o[r]);else n&&t(e,n,o)}function a(e,t,n){e.currentTarget=h.Mount.getNode(n);var o=t(e,n);return e.currentTarget=null,o}function s(e,t){i(e,t),e._dispatchListeners=null,e._dispatchIDs=null}function u(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){for(var o=0;o<t.length&&!e.isPropagationStopped();o++)if(t[o](e,n[o]))return n[o]}else if(t&&t(e,n))return n;return null}function c(e){var t=e._dispatchListeners,n=e._dispatchIDs;d(!Array.isArray(t));var o=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,o}function l(e){return!!e._dispatchListeners}var p=e("./EventConstants"),d=e("./invariant"),h={Mount:null,injectMount:function(e){h.Mount=e}},f=p.topLevelTypes,m={isEndish:n,isMoveish:o,isStartish:r,executeDirectDispatch:c,executeDispatch:a,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:u,hasDispatches:l,injection:h,useTouchEvents:!1};t.exports=m},{"./EventConstants":15,"./invariant":118}],20:[function(e,t){"use strict";function n(e,t,n){var o=t.dispatchConfig.phasedRegistrationNames[n];return m(e,o)}function o(e,t,o){var r=t?f.bubbled:f.captured,i=n(e,o,r);i&&(o._dispatchListeners=d(o._dispatchListeners,i),o._dispatchIDs=d(o._dispatchIDs,e))}function r(e){e&&e.dispatchConfig.phasedRegistrationNames&&p.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function i(e,t,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,r=m(e,o);r&&(n._dispatchListeners=d(n._dispatchListeners,r),n._dispatchIDs=d(n._dispatchIDs,e))}}function a(e){e&&e.dispatchConfig.registrationName&&i(e.dispatchMarker,null,e)}function s(e){h(e,r)}function u(e,t,n,o){p.injection.getInstanceHandle().traverseEnterLeave(n,o,i,e,t)}function c(e){h(e,a)}var l=e("./EventConstants"),p=e("./EventPluginHub"),d=e("./accumulate"),h=e("./forEachAccumulated"),f=l.PropagationPhases,m=p.getListener,v={accumulateTwoPhaseDispatches:s,accumulateDirectDispatches:c,accumulateEnterLeaveDispatches:u};t.exports=v},{"./EventConstants":15,"./EventPluginHub":17,"./accumulate":94,"./forEachAccumulated":108}],21:[function(e,t){"use strict";var n="undefined"!=typeof window,o={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&(window.addEventListener||window.attachEvent),isInWorker:!n};t.exports=o},{}],22:[function(e,t){"use strict";var n=e("./ReactLink"),o=e("./ReactStateSetters"),r={linkState:function(e){return new n(this.state[e],o.createStateKeySetter(this,e))}};t.exports=r},{"./ReactLink":56,"./ReactStateSetters":72}],23:[function(e,t){"use strict";function n(e){u(null==e.props.checkedLink||null==e.props.valueLink)}function o(e){n(e),u(null==e.props.value&&null==e.props.onChange)}function r(e){n(e),u(null==e.props.checked&&null==e.props.onChange)}function i(e){this.props.valueLink.requestChange(e.target.value)}function a(e){this.props.checkedLink.requestChange(e.target.checked)}var s=e("./ReactPropTypes"),u=e("./invariant"),c={Mixin:{propTypes:{value:function(){},checked:function(){},onChange:s.func}},getValue:function(e){return e.props.valueLink?(o(e),e.props.valueLink.value):e.props.value},getChecked:function(e){return e.props.checkedLink?(r(e),e.props.checkedLink.value):e.props.checked},getOnChange:function(e){return e.props.valueLink?(o(e),i):e.props.checkedLink?(r(e),a):e.props.onChange}};t.exports=c},{"./ReactPropTypes":67,"./invariant":118}],24:[function(e,t){"use strict";var n=e("./EventConstants"),o=e("./emptyFunction"),r=n.topLevelTypes,i={eventTypes:null,extractEvents:function(e,t,n,i){if(e===r.topTouchStart){var a=i.target;a&&!a.onclick&&(a.onclick=o)}}};t.exports=i},{"./EventConstants":15,"./emptyFunction":105}],25:[function(e,t){"use strict";var n=e("./invariant"),o=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},r=function(e,t){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,e,t),o}return new n(e,t)},i=function(e,t,n){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,e,t,n),r}return new o(e,t,n)},a=function(e,t,n,o,r){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,o,r),a}return new i(e,t,n,o,r)},s=function(e){var t=this;n(e instanceof t),e.destructor&&e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},u=10,c=o,l=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||c,n.poolSize||(n.poolSize=u),n.release=s,n},p={addPoolingTo:l,oneArgumentPooler:o,twoArgumentPooler:r,threeArgumentPooler:i,fiveArgumentPooler:a};t.exports=p},{"./invariant":118}],26:[function(e,t){"use strict";var n=e("./DOMPropertyOperations"),o=e("./EventPluginUtils"),r=e("./ReactChildren"),i=e("./ReactComponent"),a=e("./ReactCompositeComponent"),s=e("./ReactContext"),u=e("./ReactCurrentOwner"),c=e("./ReactDOM"),l=e("./ReactDOMComponent"),p=e("./ReactDefaultInjection"),d=e("./ReactInstanceHandles"),h=e("./ReactMount"),f=e("./ReactMultiChild"),m=e("./ReactPerf"),v=e("./ReactPropTypes"),g=e("./ReactServerRendering"),y=e("./ReactTextComponent"),C=e("./onlyChild");p.inject();var E={Children:{map:r.map,forEach:r.forEach,only:C},DOM:c,PropTypes:v,initializeTouchEvents:function(e){o.useTouchEvents=e},createClass:a.createClass,constructAndRenderComponent:h.constructAndRenderComponent,constructAndRenderComponentByID:h.constructAndRenderComponentByID,renderComponent:m.measure("React","renderComponent",h.renderComponent),renderComponentToString:g.renderComponentToString,unmountComponentAtNode:h.unmountComponentAtNode,isValidClass:a.isValidClass,isValidComponent:i.isValidComponent,withContext:s.withContext,__internals:{Component:i,CurrentOwner:u,DOMComponent:l,DOMPropertyOperations:n,InstanceHandles:d,Mount:h,MultiChild:f,TextComponent:y}};E.version="0.9.0",t.exports=E},{"./DOMPropertyOperations":10,"./EventPluginUtils":19,"./ReactChildren":29,"./ReactComponent":30,"./ReactCompositeComponent":33,"./ReactContext":34,"./ReactCurrentOwner":35,"./ReactDOM":36,"./ReactDOMComponent":38,"./ReactDefaultInjection":48,"./ReactInstanceHandles":55,"./ReactMount":58,"./ReactMultiChild":60,"./ReactPerf":63,"./ReactPropTypes":67,"./ReactServerRendering":71,"./ReactTextComponent":73,"./onlyChild":133}],27:[function(e,t){"use strict";var n=e("./React"),o=e("./ReactTransitionGroup"),r=e("./ReactCSSTransitionGroupChild"),i=n.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:n.PropTypes.string.isRequired,transitionEnter:n.PropTypes.bool,transitionLeave:n.PropTypes.bool},getDefaultProps:function(){return{transitionEnter:!0,transitionLeave:!0}},_wrapChild:function(e){return r({name:this.props.transitionName,enter:this.props.transitionEnter,leave:this.props.transitionLeave},e)},render:function(){return this.transferPropsTo(o({childFactory:this._wrapChild},this.props.children))}});t.exports=i},{"./React":26,"./ReactCSSTransitionGroupChild":28,"./ReactTransitionGroup":76}],28:[function(e,t){"use strict";var n=e("./React"),o=e("./CSSCore"),r=e("./ReactTransitionEvents"),i=e("./onlyChild"),a=17,s=n.createClass({transition:function(e,t){var n=this.getDOMNode(),i=this.props.name+"-"+e,a=i+"-active",s=function(){o.removeClass(n,i),o.removeClass(n,a),r.removeEndEventListener(n,s),t&&t()};r.addEndEventListener(n,s),o.addClass(n,i),this.queueClass(a)},queueClass:function(e){return this.classNameQueue.push(e),this.props.runNextTick?void this.props.runNextTick(this.flushClassNameQueue):void(this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,a)))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(o.addClass.bind(o,this.getDOMNode())),this.classNameQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameQueue=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout)},componentWillEnter:function(e){this.props.enter?this.transition("enter",e):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e):e()},render:function(){return i(this.props.children)}});t.exports=s},{"./CSSCore":2,"./React":26,"./ReactTransitionEvents":75,"./onlyChild":133}],29:[function(e,t){"use strict";function n(e,t){this.forEachFunction=e,this.forEachContext=t}function o(e,t,n,o){var r=e;r.forEachFunction.call(r.forEachContext,t,o)}function r(e,t,r){if(null==e)return e;var i=n.getPooled(t,r);l(e,o,i),n.release(i)}function i(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function a(e,t,n,o){var r=e,i=r.mapResult,a=r.mapFunction.call(r.mapContext,t,o);c(!i.hasOwnProperty(n)),i[n]=a}function s(e,t,n){if(null==e)return e;var o={},r=i.getPooled(o,t,n);return l(e,a,r),i.release(r),o}var u=e("./PooledClass"),c=e("./invariant"),l=e("./traverseAllChildren"),p=u.twoArgumentPooler,d=u.threeArgumentPooler;u.addPoolingTo(n,p),u.addPoolingTo(i,d);var h={forEach:r,map:s};t.exports=h},{"./PooledClass":25,"./invariant":118,"./traverseAllChildren":137}],30:[function(e,t){"use strict";var n=e("./ReactComponentEnvironment"),o=e("./ReactCurrentOwner"),r=e("./ReactOwner"),i=e("./ReactUpdates"),a=e("./invariant"),s=e("./keyMirror"),u=e("./merge"),c=s({MOUNTED:null,UNMOUNTED:null}),l={isValidComponent:function(e){if(!e||!e.type||!e.type.prototype)return!1;var t=e.type.prototype;return"function"==typeof t.mountComponentIntoNode&&"function"==typeof t.receiveComponent},LifeCycle:c,BackendIDOperations:n.BackendIDOperations,unmountIDFromEnvironment:n.unmountIDFromEnvironment,mountImageIntoNode:n.mountImageIntoNode,ReactReconcileTransaction:n.ReactReconcileTransaction,Mixin:u(n.Mixin,{isMounted:function(){return this._lifeCycleState===c.MOUNTED},setProps:function(e,t){this.replaceProps(u(this._pendingProps||this.props,e),t)},replaceProps:function(e,t){a(this.isMounted()),a(0===this._mountDepth),this._pendingProps=e,i.enqueueUpdate(this,t)},construct:function(e,t){this.props=e||{},this._owner=o.current,this._lifeCycleState=c.UNMOUNTED,this._pendingProps=null,this._pendingCallbacks=null,this._pendingOwner=this._owner;var n=arguments.length-1;if(1===n)this.props.children=t;else if(n>1){for(var r=Array(n),i=0;n>i;i++)r[i]=arguments[i+1];this.props.children=r}},mountComponent:function(e,t,n){a(!this.isMounted());var o=this.props;null!=o.ref&&r.addComponentAsRefTo(this,o.ref,this._owner),this._rootNodeID=e,this._lifeCycleState=c.MOUNTED,this._mountDepth=n },unmountComponent:function(){a(this.isMounted());var e=this.props;null!=e.ref&&r.removeComponentAsRefFrom(this,e.ref,this._owner),l.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._lifeCycleState=c.UNMOUNTED},receiveComponent:function(e,t){a(this.isMounted()),this._pendingOwner=e._owner,this._pendingProps=e.props,this._performUpdateIfNecessary(t)},performUpdateIfNecessary:function(){var e=l.ReactReconcileTransaction.getPooled();e.perform(this._performUpdateIfNecessary,this,e),l.ReactReconcileTransaction.release(e)},_performUpdateIfNecessary:function(e){if(null!=this._pendingProps){var t=this.props,n=this._owner;this.props=this._pendingProps,this._owner=this._pendingOwner,this._pendingProps=null,this.updateComponent(e,t,n)}},updateComponent:function(e,t,n){var o=this.props;(this._owner!==n||o.ref!==t.ref)&&(null!=t.ref&&r.removeComponentAsRefFrom(this,t.ref,n),null!=o.ref&&r.addComponentAsRefTo(this,o.ref,this._owner))},mountComponentIntoNode:function(e,t,n){var o=l.ReactReconcileTransaction.getPooled();o.perform(this._mountComponentIntoNode,this,e,t,o,n),l.ReactReconcileTransaction.release(o)},_mountComponentIntoNode:function(e,t,n,o){var r=this.mountComponent(e,n,0);l.mountImageIntoNode(r,t,o)},isOwnedBy:function(e){return this._owner===e},getSiblingByRef:function(e){var t=this._owner;return t&&t.refs?t.refs[e]:null}})};t.exports=l},{"./ReactComponentEnvironment":32,"./ReactCurrentOwner":35,"./ReactOwner":62,"./ReactUpdates":77,"./invariant":118,"./keyMirror":124,"./merge":127}],31:[function(e,t){"use strict";var n=e("./ReactDOMIDOperations"),o=e("./ReactMarkupChecksum"),r=e("./ReactMount"),i=e("./ReactPerf"),a=e("./ReactReconcileTransaction"),s=e("./getReactRootElementInContainer"),u=e("./invariant"),c=1,l=9,p={Mixin:{getDOMNode:function(){return u(this.isMounted()),r.getNode(this._rootNodeID)}},ReactReconcileTransaction:a,BackendIDOperations:n,unmountIDFromEnvironment:function(e){r.purgeID(e)},mountImageIntoNode:i.measure("ReactComponentBrowserEnvironment","mountImageIntoNode",function(e,t,n){if(u(t&&(t.nodeType===c||t.nodeType===l)),n){if(o.canReuseMarkup(e,s(t)))return;u(t.nodeType!==l)}u(t.nodeType!==l);var r=t.parentNode;if(r){var i=t.nextSibling;r.removeChild(t),t.innerHTML=e,i?r.insertBefore(t,i):r.appendChild(t)}else t.innerHTML=e})};t.exports=p},{"./ReactDOMIDOperations":40,"./ReactMarkupChecksum":57,"./ReactMount":58,"./ReactPerf":63,"./ReactReconcileTransaction":69,"./getReactRootElementInContainer":114,"./invariant":118}],32:[function(e,t){"use strict";var n=e("./ReactComponentBrowserEnvironment"),o=n;t.exports=o},{"./ReactComponentBrowserEnvironment":31}],33:[function(e,t){"use strict";function n(e,t){for(var n in t)t.hasOwnProperty(n)&&E("function"==typeof t[n])}function o(e,t){var n=P[t];I.hasOwnProperty(t)&&E(n===b.OVERRIDE_BASE),e.hasOwnProperty(t)&&E(n===b.DEFINE_MANY||n===b.DEFINE_MANY_MERGED)}function r(e){var t=e._compositeLifeCycleState;E(e.isMounted()||t===N.MOUNTING),E(t!==N.RECEIVING_STATE),E(t!==N.UNMOUNTING)}function i(e,t){E(!l(t)),E(!p.isValidComponent(t));var n=e.componentConstructor,r=n.prototype;for(var i in t){var a=t[i];if(t.hasOwnProperty(i))if(o(r,i),O.hasOwnProperty(i))O[i](e,a);else{var s=i in P,d=i in r,h=a&&a.__reactDontBind,f="function"==typeof a,m=f&&!s&&!d&&!h;m?(r.__reactAutoBindMap||(r.__reactAutoBindMap={}),r.__reactAutoBindMap[i]=a,r[i]=a):r[i]=d?P[i]===b.DEFINE_MANY_MERGED?u(r[i],a):c(r[i],a):a}}}function a(e,t){if(t)for(var n in t){var o=t[n];if(!t.hasOwnProperty(n)||!o)return;var r=n in e,i=o;if(r){var a=e[n],s=typeof a,u=typeof o;E("function"===s&&"function"===u),i=c(a,o)}e[n]=i,e.componentConstructor[n]=i}}function s(e,t){return E(e&&t&&"object"==typeof e&&"object"==typeof t),x(t,function(t,n){E(void 0===e[n]),e[n]=t}),e}function u(e,t){return function(){var n=e.apply(this,arguments),o=t.apply(this,arguments);return null==n?o:null==o?n:s(n,o)}}function c(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function l(e){return e instanceof Function&&"componentConstructor"in e&&e.componentConstructor instanceof Function}var p=e("./ReactComponent"),d=e("./ReactContext"),h=e("./ReactCurrentOwner"),f=e("./ReactErrorUtils"),m=e("./ReactOwner"),v=e("./ReactPerf"),g=e("./ReactPropTransferer"),y=e("./ReactPropTypeLocations"),C=(e("./ReactPropTypeLocationNames"),e("./ReactUpdates")),E=e("./invariant"),R=e("./keyMirror"),M=e("./merge"),D=e("./mixInto"),x=e("./objMap"),T=e("./shouldUpdateReactComponent"),b=R({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),P={mixins:b.DEFINE_MANY,statics:b.DEFINE_MANY,propTypes:b.DEFINE_MANY,contextTypes:b.DEFINE_MANY,childContextTypes:b.DEFINE_MANY,getDefaultProps:b.DEFINE_MANY_MERGED,getInitialState:b.DEFINE_MANY_MERGED,getChildContext:b.DEFINE_MANY_MERGED,render:b.DEFINE_ONCE,componentWillMount:b.DEFINE_MANY,componentDidMount:b.DEFINE_MANY,componentWillReceiveProps:b.DEFINE_MANY,shouldComponentUpdate:b.DEFINE_ONCE,componentWillUpdate:b.DEFINE_MANY,componentDidUpdate:b.DEFINE_MANY,componentWillUnmount:b.DEFINE_MANY,updateComponent:b.OVERRIDE_BASE},O={displayName:function(e,t){e.componentConstructor.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){var o=e.componentConstructor;n(o,t,y.childContext),o.childContextTypes=M(o.childContextTypes,t)},contextTypes:function(e,t){var o=e.componentConstructor;n(o,t,y.context),o.contextTypes=M(o.contextTypes,t)},propTypes:function(e,t){var o=e.componentConstructor;n(o,t,y.prop),o.propTypes=M(o.propTypes,t)},statics:function(e,t){a(e,t)}},N=R({MOUNTING:null,UNMOUNTING:null,RECEIVING_PROPS:null,RECEIVING_STATE:null}),I={construct:function(){p.Mixin.construct.apply(this,arguments),this.state=null,this._pendingState=null,this.context=this._processContext(d.current),this._currentContext=d.current,this._pendingContext=null,this._compositeLifeCycleState=null},isMounted:function(){return p.Mixin.isMounted.call(this)&&this._compositeLifeCycleState!==N.MOUNTING},mountComponent:v.measure("ReactCompositeComponent","mountComponent",function(e,t,n){p.Mixin.mountComponent.call(this,e,t,n),this._compositeLifeCycleState=N.MOUNTING,this._defaultProps=this.getDefaultProps?this.getDefaultProps():null,this.props=this._processProps(this.props),this.__reactAutoBindMap&&this._bindAutoBindMethods(),this.state=this.getInitialState?this.getInitialState():null,E("object"==typeof this.state&&!Array.isArray(this.state)),this._pendingState=null,this._pendingForceUpdate=!1,this.componentWillMount&&(this.componentWillMount(),this._pendingState&&(this.state=this._pendingState,this._pendingState=null)),this._renderedComponent=this._renderValidatedComponent(),this._compositeLifeCycleState=null;var o=this._renderedComponent.mountComponent(e,t,n+1);return this.componentDidMount&&t.getReactMountReady().enqueue(this,this.componentDidMount),o}),unmountComponent:function(){this._compositeLifeCycleState=N.UNMOUNTING,this.componentWillUnmount&&this.componentWillUnmount(),this._compositeLifeCycleState=null,this._defaultProps=null,this._renderedComponent.unmountComponent(),this._renderedComponent=null,p.Mixin.unmountComponent.call(this),this.refs&&(this.refs=null)},setState:function(e,t){E("object"==typeof e||null==e),this.replaceState(M(this._pendingState||this.state,e),t)},replaceState:function(e,t){r(this),this._pendingState=e,C.enqueueUpdate(this,t)},_processContext:function(e){var t=null,n=this.constructor.contextTypes;if(n){t={};for(var o in n)t[o]=e[o]}return t},_processChildContext:function(e){var t=this.getChildContext&&this.getChildContext();if(this.constructor.displayName||"ReactCompositeComponent",t){E("object"==typeof this.constructor.childContextTypes);for(var n in t)E(n in this.constructor.childContextTypes);return M(e,t)}return e},_processProps:function(e){var t=M(e),n=this._defaultProps;for(var o in n)"undefined"==typeof t[o]&&(t[o]=n[o]);return t},_checkPropTypes:function(e,t,n){var o=this.constructor.displayName;for(var r in e)e.hasOwnProperty(r)&&e[r](t,r,o,n)},performUpdateIfNecessary:function(){var e=this._compositeLifeCycleState;e!==N.MOUNTING&&e!==N.RECEIVING_PROPS&&p.Mixin.performUpdateIfNecessary.call(this)},_performUpdateIfNecessary:function(e){if(null!=this._pendingProps||null!=this._pendingState||null!=this._pendingContext||this._pendingForceUpdate){var t=this._pendingContext||this._currentContext,n=this._processContext(t);this._pendingContext=null;var o=this.props;null!=this._pendingProps&&(o=this._processProps(this._pendingProps),this._pendingProps=null,this._compositeLifeCycleState=N.RECEIVING_PROPS,this.componentWillReceiveProps&&this.componentWillReceiveProps(o,n)),this._compositeLifeCycleState=N.RECEIVING_STATE;var r=this._pendingOwner,i=this._pendingState||this.state;this._pendingState=null;try{this._pendingForceUpdate||!this.shouldComponentUpdate||this.shouldComponentUpdate(o,i,n)?(this._pendingForceUpdate=!1,this._performComponentUpdate(o,r,i,t,n,e)):(this.props=o,this._owner=r,this.state=i,this._currentContext=t,this.context=n)}finally{this._compositeLifeCycleState=null}}},_performComponentUpdate:function(e,t,n,o,r,i){var a=this.props,s=this._owner,u=this.state,c=this.context;this.componentWillUpdate&&this.componentWillUpdate(e,n,r),this.props=e,this._owner=t,this.state=n,this._currentContext=o,this.context=r,this.updateComponent(i,a,s,u,c),this.componentDidUpdate&&i.getReactMountReady().enqueue(this,this.componentDidUpdate.bind(this,a,u,c))},receiveComponent:function(e,t){e!==this&&(this._pendingContext=e._currentContext,p.Mixin.receiveComponent.call(this,e,t))},updateComponent:v.measure("ReactCompositeComponent","updateComponent",function(e,t,n){p.Mixin.updateComponent.call(this,e,t,n);var o=this._renderedComponent,r=this._renderValidatedComponent();if(T(o,r))o.receiveComponent(r,e);else{var i=this._rootNodeID,a=o._rootNodeID;o.unmountComponent(),this._renderedComponent=r;var s=r.mountComponent(i,e,this._mountDepth+1);p.BackendIDOperations.dangerouslyReplaceNodeWithMarkupByID(a,s)}}),forceUpdate:function(e){var t=this._compositeLifeCycleState;E(this.isMounted()||t===N.MOUNTING),E(t!==N.RECEIVING_STATE&&t!==N.UNMOUNTING),this._pendingForceUpdate=!0,C.enqueueUpdate(this,e)},_renderValidatedComponent:v.measure("ReactCompositeComponent","_renderValidatedComponent",function(){var e,t=d.current;d.current=this._processChildContext(this._currentContext),h.current=this;try{e=this.render()}finally{d.current=t,h.current=null}return E(p.isValidComponent(e)),e}),_bindAutoBindMethods:function(){for(var e in this.__reactAutoBindMap)if(this.__reactAutoBindMap.hasOwnProperty(e)){var t=this.__reactAutoBindMap[e];this[e]=this._bindAutoBindMethod(f.guard(t,this.constructor.displayName+"."+e))}},_bindAutoBindMethod:function(e){var t=this,n=function(){return e.apply(t,arguments)};return n}},S=function(){};D(S,p.Mixin),D(S,m.Mixin),D(S,g.Mixin),D(S,I);var _={LifeCycle:N,Base:S,createClass:function(e){var t=function(){};t.prototype=new S,t.prototype.constructor=t;var n=function(){var e=new t;return e.construct.apply(e,arguments),e};n.componentConstructor=t,t.ConvenienceConstructor=n,n.originalSpec=e,i(n,e),E(t.prototype.render),n.type=t,t.prototype.type=t;for(var o in P)t.prototype[o]||(t.prototype[o]=null);return n},isValidClass:l};t.exports=_},{"./ReactComponent":30,"./ReactContext":34,"./ReactCurrentOwner":35,"./ReactErrorUtils":49,"./ReactOwner":62,"./ReactPerf":63,"./ReactPropTransferer":64,"./ReactPropTypeLocationNames":65,"./ReactPropTypeLocations":66,"./ReactUpdates":77,"./invariant":118,"./keyMirror":124,"./merge":127,"./mixInto":130,"./objMap":131,"./shouldUpdateReactComponent":135}],34:[function(e,t){"use strict";var n=e("./merge"),o={current:{},withContext:function(e,t){var r,i=o.current;o.current=n(i,e);try{r=t()}finally{o.current=i}return r}};t.exports=o},{"./merge":127}],35:[function(e,t){"use strict";var n={current:null};t.exports=n},{}],36:[function(e,t){"use strict";function n(e,t){var n=function(){};n.prototype=new o(e,t),n.prototype.constructor=n,n.displayName=e;var r=function(){var e=new n;return e.construct.apply(e,arguments),e};return r.type=n,n.prototype.type=n,n.ConvenienceConstructor=r,r.componentConstructor=n,r}var o=e("./ReactDOMComponent"),r=e("./mergeInto"),i=e("./objMapKeyVal"),a=i({a:!1,abbr:!1,address:!1,area:!1,article:!1,aside:!1,audio:!1,b:!1,base:!1,bdi:!1,bdo:!1,big:!1,blockquote:!1,body:!1,br:!0,button:!1,canvas:!1,caption:!1,cite:!1,code:!1,col:!0,colgroup:!1,data:!1,datalist:!1,dd:!1,del:!1,details:!1,dfn:!1,div:!1,dl:!1,dt:!1,em:!1,embed:!0,fieldset:!1,figcaption:!1,figure:!1,footer:!1,form:!1,h1:!1,h2:!1,h3:!1,h4:!1,h5:!1,h6:!1,head:!1,header:!1,hr:!0,html:!1,i:!1,iframe:!1,img:!0,input:!0,ins:!1,kbd:!1,keygen:!0,label:!1,legend:!1,li:!1,link:!1,main:!1,map:!1,mark:!1,menu:!1,menuitem:!1,meta:!0,meter:!1,nav:!1,noscript:!1,object:!1,ol:!1,optgroup:!1,option:!1,output:!1,p:!1,param:!0,pre:!1,progress:!1,q:!1,rp:!1,rt:!1,ruby:!1,s:!1,samp:!1,script:!1,section:!1,select:!1,small:!1,source:!1,span:!1,strong:!1,style:!1,sub:!1,summary:!1,sup:!1,table:!1,tbody:!1,td:!1,textarea:!1,tfoot:!1,th:!1,thead:!1,time:!1,title:!1,tr:!1,track:!0,u:!1,ul:!1,"var":!1,video:!1,wbr:!1,circle:!1,defs:!1,g:!1,line:!1,linearGradient:!1,path:!1,polygon:!1,polyline:!1,radialGradient:!1,rect:!1,stop:!1,svg:!1,text:!1},n),s={injectComponentClasses:function(e){r(a,e)}};a.injection=s,t.exports=a},{"./ReactDOMComponent":38,"./mergeInto":129,"./objMapKeyVal":132}],37:[function(e,t){"use strict";var n=e("./AutoFocusMixin"),o=e("./ReactCompositeComponent"),r=e("./ReactDOM"),i=e("./keyMirror"),a=r.button,s=i({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),u=o.createClass({displayName:"ReactDOMButton",mixins:[n],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&s[t]||(e[t]=this.props[t]);return a(e,this.props.children)}});t.exports=u},{"./AutoFocusMixin":1,"./ReactCompositeComponent":33,"./ReactDOM":36,"./keyMirror":124}],38:[function(e,t){"use strict";function n(e){e&&(f(null==e.children||null==e.dangerouslySetInnerHTML),f(null==e.style||"object"==typeof e.style))}function o(e,t,n,o){var r=l.findReactContainerForID(e);if(r){var i=r.nodeType===D?r.ownerDocument:r;C(t,i)}o.getPutListenerQueue().enqueuePutListener(e,t,n)}function r(e,t){this._tagOpen="<"+e,this._tagClose=t?"":"</"+e+">",this.tagName=e.toUpperCase()}var i=e("./CSSPropertyOperations"),a=e("./DOMProperty"),s=e("./DOMPropertyOperations"),u=e("./ReactComponent"),c=e("./ReactEventEmitter"),l=e("./ReactMount"),p=e("./ReactMultiChild"),d=e("./ReactPerf"),h=e("./escapeTextForBrowser"),f=e("./invariant"),m=e("./keyOf"),v=e("./merge"),g=e("./mixInto"),y=c.deleteListener,C=c.listenTo,E=c.registrationNameModules,R={string:!0,number:!0},M=m({style:null}),D=1;r.Mixin={mountComponent:d.measure("ReactDOMComponent","mountComponent",function(e,t,o){return u.Mixin.mountComponent.call(this,e,t,o),n(this.props),this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t)+this._tagClose}),_createOpenTagMarkupAndPutListeners:function(e){var t=this.props,n=this._tagOpen;for(var r in t)if(t.hasOwnProperty(r)){var a=t[r];if(null!=a)if(E[r])o(this._rootNodeID,r,a,e);else{r===M&&(a&&(a=t.style=v(t.style)),a=i.createMarkupForStyles(a));var u=s.createMarkupForProperty(r,a);u&&(n+=" "+u)}}var c=s.createMarkupForID(this._rootNodeID);return n+" "+c+">"},_createContentMarkup:function(e){var t=this.props.dangerouslySetInnerHTML;if(null!=t){if(null!=t.__html)return t.__html}else{var n=R[typeof this.props.children]?this.props.children:null,o=null!=n?null:this.props.children;if(null!=n)return h(n);if(null!=o){var r=this.mountChildren(o,e);return r.join("")}}return""},receiveComponent:function(e,t){n(e.props),u.Mixin.receiveComponent.call(this,e,t)},updateComponent:d.measure("ReactDOMComponent","updateComponent",function(e,t,n){u.Mixin.updateComponent.call(this,e,t,n),this._updateDOMProperties(t,e),this._updateDOMChildren(t,e)}),_updateDOMProperties:function(e,t){var n,r,i,s=this.props;for(n in e)if(!s.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===M){var c=e[n];for(r in c)c.hasOwnProperty(r)&&(i=i||{},i[r]="")}else E[n]?y(this._rootNodeID,n):(a.isStandardName[n]||a.isCustomAttribute(n))&&u.BackendIDOperations.deletePropertyByID(this._rootNodeID,n);for(n in s){var l=s[n],p=e[n];if(s.hasOwnProperty(n)&&l!==p)if(n===M)if(l&&(l=s.style=v(l)),p){for(r in p)p.hasOwnProperty(r)&&!l.hasOwnProperty(r)&&(i=i||{},i[r]="");for(r in l)l.hasOwnProperty(r)&&p[r]!==l[r]&&(i=i||{},i[r]=l[r])}else i=l;else E[n]?o(this._rootNodeID,n,l,t):(a.isStandardName[n]||a.isCustomAttribute(n))&&u.BackendIDOperations.updatePropertyByID(this._rootNodeID,n,l)}i&&u.BackendIDOperations.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t){var n=this.props,o=R[typeof e.children]?e.children:null,r=R[typeof n.children]?n.children:null,i=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,a=n.dangerouslySetInnerHTML&&n.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,c=null!=r?null:n.children,l=null!=o||null!=i,p=null!=r||null!=a;null!=s&&null==c?this.updateChildren(null,t):l&&!p&&this.updateTextContent(""),null!=r?o!==r&&this.updateTextContent(""+r):null!=a?i!==a&&u.BackendIDOperations.updateInnerHTMLByID(this._rootNodeID,a):null!=c&&this.updateChildren(c,t)},unmountComponent:function(){this.unmountChildren(),c.deleteAllListeners(this._rootNodeID),u.Mixin.unmountComponent.call(this)}},g(r,u.Mixin),g(r,r.Mixin),g(r,p.Mixin),t.exports=r},{"./CSSPropertyOperations":4,"./DOMProperty":9,"./DOMPropertyOperations":10,"./ReactComponent":30,"./ReactEventEmitter":50,"./ReactMount":58,"./ReactMultiChild":60,"./ReactPerf":63,"./escapeTextForBrowser":106,"./invariant":118,"./keyOf":125,"./merge":127,"./mixInto":130}],39:[function(e,t){"use strict";var n=e("./ReactCompositeComponent"),o=e("./ReactDOM"),r=e("./ReactEventEmitter"),i=e("./EventConstants"),a=o.form,s=n.createClass({displayName:"ReactDOMForm",render:function(){return this.transferPropsTo(a(null,this.props.children))},componentDidMount:function(){r.trapBubbledEvent(i.topLevelTypes.topReset,"reset",this.getDOMNode()),r.trapBubbledEvent(i.topLevelTypes.topSubmit,"submit",this.getDOMNode())}});t.exports=s},{"./EventConstants":15,"./ReactCompositeComponent":33,"./ReactDOM":36,"./ReactEventEmitter":50}],40:[function(e,t){"use strict";var n,o=e("./CSSPropertyOperations"),r=e("./DOMChildrenOperations"),i=e("./DOMPropertyOperations"),a=e("./ReactMount"),s=e("./ReactPerf"),u=e("./invariant"),c={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},l={updatePropertyByID:s.measure("ReactDOMIDOperations","updatePropertyByID",function(e,t,n){var o=a.getNode(e);u(!c.hasOwnProperty(t)),null!=n?i.setValueForProperty(o,t,n):i.deleteValueForProperty(o,t)}),deletePropertyByID:s.measure("ReactDOMIDOperations","deletePropertyByID",function(e,t,n){var o=a.getNode(e);u(!c.hasOwnProperty(t)),i.deleteValueForProperty(o,t,n)}),updateStylesByID:s.measure("ReactDOMIDOperations","updateStylesByID",function(e,t){var n=a.getNode(e);o.setValueForStyles(n,t)}),updateInnerHTMLByID:s.measure("ReactDOMIDOperations","updateInnerHTMLByID",function(e,t){var o=a.getNode(e);if(void 0===n){var r=document.createElement("div");r.innerHTML=" ",n=""===r.innerHTML}n&&o.parentNode.replaceChild(o,o),n&&t.match(/^[ \r\n\t\f]/)?(o.innerHTML=""+t,o.firstChild.deleteData(0,1)):o.innerHTML=t}),updateTextContentByID:s.measure("ReactDOMIDOperations","updateTextContentByID",function(e,t){var n=a.getNode(e);r.updateTextContent(n,t)}),dangerouslyReplaceNodeWithMarkupByID:s.measure("ReactDOMIDOperations","dangerouslyReplaceNodeWithMarkupByID",function(e,t){var n=a.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)}),dangerouslyProcessChildrenUpdates:s.measure("ReactDOMIDOperations","dangerouslyProcessChildrenUpdates",function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=a.getNode(e[n].parentID);r.processUpdates(e,t)})};t.exports=l},{"./CSSPropertyOperations":4,"./DOMChildrenOperations":8,"./DOMPropertyOperations":10,"./ReactMount":58,"./ReactPerf":63,"./invariant":118}],41:[function(e,t){"use strict";var n=e("./ReactCompositeComponent"),o=e("./ReactDOM"),r=e("./ReactEventEmitter"),i=e("./EventConstants"),a=o.img,s=n.createClass({displayName:"ReactDOMImg",tagName:"IMG",render:function(){return a(this.props)},componentDidMount:function(){var e=this.getDOMNode();r.trapBubbledEvent(i.topLevelTypes.topLoad,"load",e),r.trapBubbledEvent(i.topLevelTypes.topError,"error",e)}});t.exports=s},{"./EventConstants":15,"./ReactCompositeComponent":33,"./ReactDOM":36,"./ReactEventEmitter":50}],42:[function(e,t){"use strict";var n=e("./AutoFocusMixin"),o=e("./DOMPropertyOperations"),r=e("./LinkedValueUtils"),i=e("./ReactCompositeComponent"),a=e("./ReactDOM"),s=e("./ReactMount"),u=e("./invariant"),c=e("./merge"),l=a.input,p={},d=i.createClass({displayName:"ReactDOMInput",mixins:[n,r.Mixin],getInitialState:function(){var e=this.props.defaultValue;return{checked:this.props.defaultChecked||!1,value:null!=e?e:null}},shouldComponentUpdate:function(){return!this._isChanging},render:function(){var e=c(this.props);e.defaultChecked=null,e.defaultValue=null;var t=r.getValue(this);e.value=null!=t?t:this.state.value;var n=r.getChecked(this);return e.checked=null!=n?n:this.state.checked,e.onChange=this._handleChange,l(e,this.props.children)},componentDidMount:function(){var e=s.getID(this.getDOMNode());p[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=s.getID(e);delete p[t]},componentDidUpdate:function(){var e=this.getDOMNode();null!=this.props.checked&&o.setValueForProperty(e,"checked",this.props.checked||!1);var t=r.getValue(this);null!=t&&o.setValueForProperty(e,"value",""+t)},_handleChange:function(e){var t,n=r.getOnChange(this);n&&(this._isChanging=!0,t=n.call(this,e),this._isChanging=!1),this.setState({checked:e.target.checked,value:e.target.value});var o=this.props.name;if("radio"===this.props.type&&null!=o){for(var i=this.getDOMNode(),a=i;a.parentNode;)a=a.parentNode;for(var c=a.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),l=0,d=c.length;d>l;l++){var h=c[l];if(h!==i&&h.form===i.form){var f=s.getID(h);u(f);var m=p[f];u(m),m.setState({checked:!1})}}}return t}});t.exports=d},{"./AutoFocusMixin":1,"./DOMPropertyOperations":10,"./LinkedValueUtils":23,"./ReactCompositeComponent":33,"./ReactDOM":36,"./ReactMount":58,"./invariant":118,"./merge":127}],43:[function(e,t){"use strict";var n=e("./ReactCompositeComponent"),o=e("./ReactDOM"),r=o.option,i=n.createClass({displayName:"ReactDOMOption",componentWillMount:function(){null!=this.props.selected},render:function(){return r(this.props,this.props.children)}});t.exports=i},{"./ReactCompositeComponent":33,"./ReactDOM":36}],44:[function(e,t){"use strict";function n(e,t){null!=e[t]&&u(e.multiple?Array.isArray(e[t]):!Array.isArray(e[t]))}function o(e,t){var n,o,r,i=e.props.multiple,a=null!=t?t:e.state.value,s=e.getDOMNode().options;if(i)for(n={},o=0,r=a.length;r>o;++o)n[""+a[o]]=!0;else n=""+a;for(o=0,r=s.length;r>o;o++){var u=i?n.hasOwnProperty(s[o].value):s[o].value===n;u!==s[o].selected&&(s[o].selected=u)}}var r=e("./AutoFocusMixin"),i=e("./LinkedValueUtils"),a=e("./ReactCompositeComponent"),s=e("./ReactDOM"),u=e("./invariant"),c=e("./merge"),l=s.select,p=a.createClass({displayName:"ReactDOMSelect",mixins:[r,i.Mixin],propTypes:{defaultValue:n,value:n},getInitialState:function(){return{value:this.props.defaultValue||(this.props.multiple?[]:"")}},componentWillReceiveProps:function(e){!this.props.multiple&&e.multiple?this.setState({value:[this.state.value]}):this.props.multiple&&!e.multiple&&this.setState({value:this.state.value[0]})},shouldComponentUpdate:function(){return!this._isChanging},render:function(){var e=c(this.props);return e.onChange=this._handleChange,e.value=null,l(e,this.props.children)},componentDidMount:function(){o(this,i.getValue(this))},componentDidUpdate:function(){var e=i.getValue(this);null!=e&&o(this,e)},_handleChange:function(e){var t,n=i.getOnChange(this);n&&(this._isChanging=!0,t=n.call(this,e),this._isChanging=!1);var o;if(this.props.multiple){o=[];for(var r=e.target.options,a=0,s=r.length;s>a;a++)r[a].selected&&o.push(r[a].value)}else o=e.target.value;return this.setState({value:o}),t}});t.exports=p},{"./AutoFocusMixin":1,"./LinkedValueUtils":23,"./ReactCompositeComponent":33,"./ReactDOM":36,"./invariant":118,"./merge":127}],45:[function(e,t){"use strict";function n(e){var t=document.selection,n=t.createRange(),o=n.text.length,r=n.duplicate();r.moveToElementText(e),r.setEndPoint("EndToStart",n);var i=r.text.length,a=i+o;return{start:i,end:a}}function o(e){var t=window.getSelection();if(0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,r=t.focusNode,i=t.focusOffset,a=t.getRangeAt(0),s=a.toString().length,u=a.cloneRange();u.selectNodeContents(e),u.setEnd(a.startContainer,a.startOffset);var c=u.toString().length,l=c+s,p=document.createRange();p.setStart(n,o),p.setEnd(r,i);var d=p.collapsed;return p.detach(),{start:d?l:c,end:d?c:l}}function r(e,t){var n,o,r=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,o=n):t.start>t.end?(n=t.end,o=t.start):(n=t.start,o=t.end),r.moveToElementText(e),r.moveStart("character",n),r.setEndPoint("EndToStart",r),r.moveEnd("character",o-n),r.select()}function i(e,t){var n=window.getSelection(),o=e[s()].length,r=Math.min(t.start,o),i="undefined"==typeof t.end?r:Math.min(t.end,o);if(!n.extend&&r>i){var u=i;i=r,r=u}var c=a(e,r),l=a(e,i);if(c&&l){var p=document.createRange();p.setStart(c.node,c.offset),n.removeAllRanges(),r>i?(n.addRange(p),n.extend(l.node,l.offset)):(p.setEnd(l.node,l.offset),n.addRange(p)),p.detach()}}var a=e("./getNodeForCharacterOffset"),s=e("./getTextContentAccessor"),u={getOffsets:function(e){var t=document.selection?n:o;return t(e)},setOffsets:function(e,t){var n=document.selection?r:i;n(e,t)}};t.exports=u},{"./getNodeForCharacterOffset":113,"./getTextContentAccessor":115}],46:[function(e,t){"use strict";var n=e("./AutoFocusMixin"),o=e("./DOMPropertyOperations"),r=e("./LinkedValueUtils"),i=e("./ReactCompositeComponent"),a=e("./ReactDOM"),s=e("./invariant"),u=e("./merge"),c=a.textarea,l=i.createClass({displayName:"ReactDOMTextarea",mixins:[n,r.Mixin],getInitialState:function(){var e=this.props.defaultValue,t=this.props.children;null!=t&&(s(null==e),Array.isArray(t)&&(s(t.length<=1),t=t[0]),e=""+t),null==e&&(e="");var n=r.getValue(this);return{initialValue:""+(null!=n?n:e),value:e}},shouldComponentUpdate:function(){return!this._isChanging},render:function(){var e=u(this.props),t=r.getValue(this);return s(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null!=t?t:this.state.value,e.onChange=this._handleChange,c(e,this.state.initialValue)},componentDidUpdate:function(){var e=r.getValue(this);if(null!=e){var t=this.getDOMNode();o.setValueForProperty(t,"value",""+e)}},_handleChange:function(e){var t,n=r.getOnChange(this);return n&&(this._isChanging=!0,t=n.call(this,e),this._isChanging=!1),this.setState({value:e.target.value}),t}});t.exports=l},{"./AutoFocusMixin":1,"./DOMPropertyOperations":10,"./LinkedValueUtils":23,"./ReactCompositeComponent":33,"./ReactDOM":36,"./invariant":118,"./merge":127}],47:[function(e,t){"use strict";function n(){this.reinitializeTransaction()}var o=e("./ReactUpdates"),r=e("./Transaction"),i=e("./emptyFunction"),a=e("./mixInto"),s={initialize:i,close:function(){p.isBatchingUpdates=!1}},u={initialize:i,close:o.flushBatchedUpdates.bind(o)},c=[u,s];a(n,r.Mixin),a(n,{getTransactionWrappers:function(){return c}});var l=new n,p={isBatchingUpdates:!1,batchedUpdates:function(e,t){var n=p.isBatchingUpdates;p.isBatchingUpdates=!0,n?e(t):l.perform(e,null,t)}};t.exports=p},{"./ReactUpdates":77,"./Transaction":92,"./emptyFunction":105,"./mixInto":130}],48:[function(e,t){"use strict";function n(){o.EventEmitter.injectTopLevelCallbackCreator(d),o.EventPluginHub.injectEventPluginOrder(c),o.EventPluginHub.injectInstanceHandle(R),o.EventPluginHub.injectMount(M),o.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:T,EnterLeaveEventPlugin:l,ChangeEventPlugin:a,CompositionEventPlugin:u,MobileSafariClickEventPlugin:p,SelectEventPlugin:D}),o.DOM.injectComponentClasses({button:f,form:m,img:v,input:g,option:y,select:C,textarea:E,html:P(h.html),head:P(h.head),title:P(h.title),body:P(h.body)}),o.DOMProperty.injectDOMPropertyConfig(i),o.Updates.injectBatchingStrategy(b),o.RootIndex.injectCreateReactRootIndex(r.canUseDOM?s.createReactRootIndex:x.createReactRootIndex)}var o=e("./ReactInjection"),r=e("./ExecutionEnvironment"),i=e("./DefaultDOMPropertyConfig"),a=e("./ChangeEventPlugin"),s=e("./ClientReactRootIndex"),u=e("./CompositionEventPlugin"),c=e("./DefaultEventPluginOrder"),l=e("./EnterLeaveEventPlugin"),p=e("./MobileSafariClickEventPlugin"),d=e("./ReactEventTopLevelCallback"),h=e("./ReactDOM"),f=e("./ReactDOMButton"),m=e("./ReactDOMForm"),v=e("./ReactDOMImg"),g=e("./ReactDOMInput"),y=e("./ReactDOMOption"),C=e("./ReactDOMSelect"),E=e("./ReactDOMTextarea"),R=e("./ReactInstanceHandles"),M=e("./ReactMount"),D=e("./SelectEventPlugin"),x=e("./ServerReactRootIndex"),T=e("./SimpleEventPlugin"),b=e("./ReactDefaultBatchingStrategy"),P=e("./createFullPageComponent");t.exports={inject:n}},{"./ChangeEventPlugin":5,"./ClientReactRootIndex":6,"./CompositionEventPlugin":7,"./DefaultDOMPropertyConfig":12,"./DefaultEventPluginOrder":13,"./EnterLeaveEventPlugin":14,"./ExecutionEnvironment":21,"./MobileSafariClickEventPlugin":24,"./ReactDOM":36,"./ReactDOMButton":37,"./ReactDOMForm":39,"./ReactDOMImg":41,"./ReactDOMInput":42,"./ReactDOMOption":43,"./ReactDOMSelect":44,"./ReactDOMTextarea":46,"./ReactDefaultBatchingStrategy":47,"./ReactEventTopLevelCallback":52,"./ReactInjection":53,"./ReactInstanceHandles":55,"./ReactMount":58,"./SelectEventPlugin":79,"./ServerReactRootIndex":80,"./SimpleEventPlugin":81,"./createFullPageComponent":100}],49:[function(e,t){"use strict";var n={guard:function(e){return e}};t.exports=n},{}],50:[function(e,t){"use strict";function n(e){return null==e[C]&&(e[C]=g++,m[e[C]]={}),m[e[C]]}function o(e,t,n){a.listen(n,t,E.TopLevelCallbackCreator.createTopLevelCallback(e))}function r(e,t,n){a.capture(n,t,E.TopLevelCallbackCreator.createTopLevelCallback(e))}var i=e("./EventConstants"),a=e("./EventListener"),s=e("./EventPluginHub"),u=e("./EventPluginRegistry"),c=e("./ExecutionEnvironment"),l=e("./ReactEventEmitterMixin"),p=e("./ViewportMetrics"),d=e("./invariant"),h=e("./isEventSupported"),f=e("./merge"),m={},v=!1,g=0,y={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},C="_reactListenersID"+String(Math.random()).slice(2),E=f(l,{TopLevelCallbackCreator:null,injection:{injectTopLevelCallbackCreator:function(e){E.TopLevelCallbackCreator=e}},setEnabled:function(e){d(c.canUseDOM),E.TopLevelCallbackCreator&&E.TopLevelCallbackCreator.setEnabled(e)},isEnabled:function(){return!(!E.TopLevelCallbackCreator||!E.TopLevelCallbackCreator.isEnabled())},listenTo:function(e,t){for(var a=t,s=n(a),c=u.registrationNameDependencies[e],l=i.topLevelTypes,p=0,d=c.length;d>p;p++){var f=c[p]; if(!s[f]){var m=l[f];m===l.topWheel?h("wheel")?o(l.topWheel,"wheel",a):h("mousewheel")?o(l.topWheel,"mousewheel",a):o(l.topWheel,"DOMMouseScroll",a):m===l.topScroll?h("scroll",!0)?r(l.topScroll,"scroll",a):o(l.topScroll,"scroll",window):m===l.topFocus||m===l.topBlur?(h("focus",!0)?(r(l.topFocus,"focus",a),r(l.topBlur,"blur",a)):h("focusin")&&(o(l.topFocus,"focusin",a),o(l.topBlur,"focusout",a)),s[l.topBlur]=!0,s[l.topFocus]=!0):y[f]&&o(m,y[f],a),s[f]=!0}}},ensureScrollValueMonitoring:function(){if(!v){var e=p.refreshScrollValues;a.listen(window,"scroll",e),a.listen(window,"resize",e),v=!0}},eventNameDispatchConfigs:s.eventNameDispatchConfigs,registrationNameModules:s.registrationNameModules,putListener:s.putListener,getListener:s.getListener,deleteListener:s.deleteListener,deleteAllListeners:s.deleteAllListeners,trapBubbledEvent:o,trapCapturedEvent:r});t.exports=E},{"./EventConstants":15,"./EventListener":16,"./EventPluginHub":17,"./EventPluginRegistry":18,"./ExecutionEnvironment":21,"./ReactEventEmitterMixin":51,"./ViewportMetrics":93,"./invariant":118,"./isEventSupported":119,"./merge":127}],51:[function(e,t){"use strict";function n(e){o.enqueueEvents(e),o.processEventQueue()}var o=e("./EventPluginHub"),r=e("./ReactUpdates"),i={handleTopLevel:function(e,t,i,a){var s=o.extractEvents(e,t,i,a);r.batchedUpdates(n,s)}};t.exports=i},{"./EventPluginHub":17,"./ReactUpdates":77}],52:[function(e,t){"use strict";function n(e){var t=u.getID(e),n=s.getReactRootIDFromNodeID(t),o=u.findReactContainerForID(n),r=u.getFirstReactDOM(o);return r}function o(e,t,o){for(var r=u.getFirstReactDOM(c(t))||window,i=r;i;)o.ancestors.push(i),i=n(i);for(var s=0,l=o.ancestors.length;l>s;s++){r=o.ancestors[s];var p=u.getID(r)||"";a.handleTopLevel(e,r,p,t)}}function r(){this.ancestors=[]}var i=e("./PooledClass"),a=e("./ReactEventEmitter"),s=e("./ReactInstanceHandles"),u=e("./ReactMount"),c=e("./getEventTarget"),l=e("./mixInto"),p=!0;l(r,{destructor:function(){this.ancestors.length=0}}),i.addPoolingTo(r);var d={setEnabled:function(e){p=!!e},isEnabled:function(){return p},createTopLevelCallback:function(e){return function(t){if(p){var n=r.getPooled();try{o(e,t,n)}finally{r.release(n)}}}}};t.exports=d},{"./PooledClass":25,"./ReactEventEmitter":50,"./ReactInstanceHandles":55,"./ReactMount":58,"./getEventTarget":111,"./mixInto":130}],53:[function(e,t){"use strict";var n=e("./DOMProperty"),o=e("./EventPluginHub"),r=e("./ReactDOM"),i=e("./ReactEventEmitter"),a=e("./ReactPerf"),s=e("./ReactRootIndex"),u=e("./ReactUpdates"),c={DOMProperty:n.injection,EventPluginHub:o.injection,DOM:r.injection,EventEmitter:i.injection,Perf:a.injection,RootIndex:s.injection,Updates:u.injection};t.exports=c},{"./DOMProperty":9,"./EventPluginHub":17,"./ReactDOM":36,"./ReactEventEmitter":50,"./ReactPerf":63,"./ReactRootIndex":70,"./ReactUpdates":77}],54:[function(e,t){"use strict";function n(e){return r(document.documentElement,e)}var o=e("./ReactDOMSelection"),r=e("./containsNode"),i=e("./getActiveElement"),a={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=i();return{focusedElem:e,selectionRange:a.hasSelectionCapabilities(e)?a.getSelection(e):null}},restoreSelection:function(e){var t=i(),o=e.focusedElem,r=e.selectionRange;t!==o&&n(o)&&(a.hasSelectionCapabilities(o)&&a.setSelection(o,r),o.focus())},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if("undefined"==typeof r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};t.exports=a},{"./ReactDOMSelection":45,"./containsNode":97,"./getActiveElement":109}],55:[function(e,t){"use strict";function n(e){return d+e.toString(36)}function o(e,t){return e.charAt(t)===d||t===e.length}function r(e){return""===e||e.charAt(0)===d&&e.charAt(e.length-1)!==d}function i(e,t){return 0===t.indexOf(e)&&o(t,e.length)}function a(e){return e?e.substr(0,e.lastIndexOf(d)):""}function s(e,t){if(p(r(e)&&r(t)),p(i(e,t)),e===t)return e;for(var n=e.length+h,a=n;a<t.length&&!o(t,a);a++);return t.substr(0,a)}function u(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var i=0,a=0;n>=a;a++)if(o(e,a)&&o(t,a))i=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,i);return p(r(s)),s}function c(e,t,n,o,r,u){e=e||"",t=t||"",p(e!==t);var c=i(t,e);p(c||i(e,t));for(var l=0,d=c?a:s,h=e;;h=d(h,t)){var m;if(r&&h===e||u&&h===t||(m=n(h,c,o)),m===!1||h===t)break;p(l++<f)}}var l=e("./ReactRootIndex"),p=e("./invariant"),d=".",h=d.length,f=100,m={createReactRootID:function(){return n(l.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===d&&e.length>1){var t=e.indexOf(d,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,o,r){var i=u(e,t);i!==e&&c(e,i,n,o,!1,!0),i!==t&&c(i,t,n,r,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},_getFirstCommonAncestorID:u,_getNextDescendantID:s,isAncestorIDOf:i,SEPARATOR:d};t.exports=m},{"./ReactRootIndex":70,"./invariant":118}],56:[function(e,t){"use strict";function n(e,t){this.value=e,this.requestChange=t}t.exports=n},{}],57:[function(e,t){"use strict";var n=e("./adler32"),o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=n(e);return e.replace(">"," "+o.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var r=t.getAttribute(o.CHECKSUM_ATTR_NAME);r=r&&parseInt(r,10);var i=n(e);return i===r}};t.exports=o},{"./adler32":95}],58:[function(e,t){"use strict";function n(e){var t=v(e);return t&&O.getID(t)}function o(e){var t=r(e);if(t)if(R.hasOwnProperty(t)){var n=R[t];n!==e&&(g(!s(n,t)),R[t]=e)}else R[t]=e;return t}function r(e){return e&&e.getAttribute&&e.getAttribute(E)||""}function i(e,t){var n=r(e);n!==t&&delete R[n],e.setAttribute(E,t),R[t]=e}function a(e){return R.hasOwnProperty(e)&&s(R[e],e)||(R[e]=O.findReactNodeByID(e)),R[e]}function s(e,t){if(e){g(r(e)===t);var n=O.findReactContainerForID(t);if(n&&m(n,e))return!0}return!1}function u(e){delete R[e]}function c(e){var t=R[e];return t&&s(t,e)?void(P=t):!1}function l(e){P=null,h.traverseAncestors(e,c);var t=P;return P=null,t}var p=e("./DOMProperty"),d=e("./ReactEventEmitter"),h=e("./ReactInstanceHandles"),f=e("./ReactPerf"),m=e("./containsNode"),v=e("./getReactRootElementInContainer"),g=e("./invariant"),y=e("./shouldUpdateReactComponent"),C=h.SEPARATOR,E=p.ID_ATTRIBUTE_NAME,R={},M=1,D=9,x={},T={},b=[],P=null,O={totalInstantiationTime:0,totalInjectionTime:0,useTouchEvents:!1,_instancesByReactRootID:x,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,o){var r=t.props;return O.scrollMonitor(n,function(){e.replaceProps(r,o)}),e},_registerComponent:function(e,t){g(t&&(t.nodeType===M||t.nodeType===D)),d.ensureScrollValueMonitoring();var n=O.registerContainer(t);return x[n]=e,n},_renderNewRootComponent:f.measure("ReactMount","_renderNewRootComponent",function(e,t,n){var o=O._registerComponent(e,t);return e.mountComponentIntoNode(o,t,n),e}),renderComponent:function(e,t,o){var r=x[n(t)];if(r){if(y(r,e))return O._updateRootComponent(r,e,t,o);O.unmountComponentAtNode(t)}var i=v(t),a=i&&O.isRenderedByReact(i),s=a&&!r,u=O._renderNewRootComponent(e,t,s);return o&&o.call(u),u},constructAndRenderComponent:function(e,t,n){return O.renderComponent(e(t),n)},constructAndRenderComponentByID:function(e,t,n){var o=document.getElementById(n);return g(o),O.constructAndRenderComponent(e,t,o)},registerContainer:function(e){var t=n(e);return t&&(t=h.getReactRootIDFromNodeID(t)),t||(t=h.createReactRootID()),T[t]=e,t},unmountComponentAtNode:function(e){var t=n(e),o=x[t];return o?(O.unmountComponentFromNode(o,e),delete x[t],delete T[t],!0):!1},unmountComponentFromNode:function(e,t){for(e.unmountComponent(),t.nodeType===D&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var t=h.getReactRootIDFromNodeID(e),n=T[t];return n},findReactNodeByID:function(e){var t=O.findReactContainerForID(e);return O.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=O.getID(e);return t?t.charAt(0)===C:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(O.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){var n=b,o=0,r=l(t)||e;for(n[0]=r.firstChild,n.length=1;o<n.length;){for(var i,a=n[o++];a;){var s=O.getID(a);s?t===s?i=a:h.isAncestorIDOf(s,t)&&(n.length=o=0,n.push(a.firstChild)):n.push(a.firstChild),a=a.nextSibling}if(i)return n.length=0,i}n.length=0,g(!1)},getReactRootID:n,getID:o,setID:i,getNode:a,purgeID:u};t.exports=O},{"./DOMProperty":9,"./ReactEventEmitter":50,"./ReactInstanceHandles":55,"./ReactPerf":63,"./containsNode":97,"./getReactRootElementInContainer":114,"./invariant":118,"./shouldUpdateReactComponent":135}],59:[function(e,t){"use strict";function n(e){this._queue=e||null}var o=e("./PooledClass"),r=e("./mixInto");r(n,{enqueue:function(e,t){this._queue=this._queue||[],this._queue.push({component:e,callback:t})},notifyAll:function(){var e=this._queue;if(e){this._queue=null;for(var t=0,n=e.length;n>t;t++){var o=e[t].component,r=e[t].callback;r.call(o)}e.length=0}},reset:function(){this._queue=null},destructor:function(){this.reset()}}),o.addPoolingTo(n),t.exports=n},{"./PooledClass":25,"./mixInto":130}],60:[function(e,t){"use strict";function n(e,t,n){h.push({parentID:e,parentNode:null,type:c.INSERT_MARKUP,markupIndex:f.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function o(e,t,n){h.push({parentID:e,parentNode:null,type:c.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function r(e,t){h.push({parentID:e,parentNode:null,type:c.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function i(e,t){h.push({parentID:e,parentNode:null,type:c.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function a(){h.length&&(u.BackendIDOperations.dangerouslyProcessChildrenUpdates(h,f),s())}function s(){h.length=0,f.length=0}var u=e("./ReactComponent"),c=e("./ReactMultiChildUpdateTypes"),l=e("./flattenChildren"),p=e("./shouldUpdateReactComponent"),d=0,h=[],f=[],m={Mixin:{mountChildren:function(e,t){var n=l(e),o=[],r=0;this._renderedChildren=n;for(var i in n){var a=n[i];if(n.hasOwnProperty(i)){var s=this._rootNodeID+i,u=a.mountComponent(s,t,this._mountDepth+1);a._mountIndex=r,o.push(u),r++}}return o},updateTextContent:function(e){d++;var t=!0;try{var n=this._renderedChildren;for(var o in n)n.hasOwnProperty(o)&&this._unmountChildByName(n[o],o);this.setTextContent(e),t=!1}finally{d--,d||(t?s():a())}},updateChildren:function(e,t){d++;var n=!0;try{this._updateChildren(e,t),n=!1}finally{d--,d||(n?s():a())}},_updateChildren:function(e,t){var n=l(e),o=this._renderedChildren;if(n||o){var r,i=0,a=0;for(r in n)if(n.hasOwnProperty(r)){var s=o&&o[r],u=n[r];p(s,u)?(this.moveChild(s,a,i),i=Math.max(s._mountIndex,i),s.receiveComponent(u,t),s._mountIndex=a):(s&&(i=Math.max(s._mountIndex,i),this._unmountChildByName(s,r)),this._mountChildByNameAtIndex(u,r,a,t)),a++}for(r in o)!o.hasOwnProperty(r)||n&&n[r]||this._unmountChildByName(o[r],r)}},unmountChildren:function(){var e=this._renderedChildren;for(var t in e){var n=e[t];n.unmountComponent&&n.unmountComponent()}this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&o(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){n(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){r(this._rootNodeID,e._mountIndex)},setTextContent:function(e){i(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,o){var r=this._rootNodeID+t,i=e.mountComponent(r,o,this._mountDepth+1);e._mountIndex=n,this.createChild(e,i),this._renderedChildren=this._renderedChildren||{},this._renderedChildren[t]=e},_unmountChildByName:function(e,t){u.isValidComponent(e)&&(this.removeChild(e),e._mountIndex=null,e.unmountComponent(),delete this._renderedChildren[t])}}};t.exports=m},{"./ReactComponent":30,"./ReactMultiChildUpdateTypes":61,"./flattenChildren":107,"./shouldUpdateReactComponent":135}],61:[function(e,t){"use strict";var n=e("./keyMirror"),o=n({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});t.exports=o},{"./keyMirror":124}],62:[function(e,t){"use strict";var n=e("./invariant"),o={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,r){n(o.isValidOwner(r)),r.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,r){n(o.isValidOwner(r)),r.refs[t]===e&&r.detachRef(t)},Mixin:{attachRef:function(e,t){n(t.isOwnedBy(this));var o=this.refs||(this.refs={});o[e]=t},detachRef:function(e){delete this.refs[e]}}};t.exports=o},{"./invariant":118}],63:[function(e,t){"use strict";function n(e,t,n){return n}var o={enableMeasure:!1,storedMeasure:n,measure:function(e,t,n){return n},injection:{injectMeasure:function(e){o.storedMeasure=e}}};t.exports=o},{}],64:[function(e,t){"use strict";function n(e){return function(t,n,o){t[n]=t.hasOwnProperty(n)?e(t[n],o):o}}var o=e("./emptyFunction"),r=e("./invariant"),i=e("./joinClasses"),a=e("./merge"),s={children:o,className:n(i),key:o,ref:o,style:n(a)},u={TransferStrategies:s,mergeProps:function(e,t){var n=a(e);for(var o in t)if(t.hasOwnProperty(o)){var r=s[o];r?r(n,o,t[o]):n.hasOwnProperty(o)||(n[o]=t[o])}return n},Mixin:{transferPropsTo:function(e){return r(e._owner===this),e.props=u.mergeProps(e.props,this.props),e}}};t.exports=u},{"./emptyFunction":105,"./invariant":118,"./joinClasses":123,"./merge":127}],65:[function(e,t){"use strict";var n={};t.exports=n},{}],66:[function(e,t){"use strict";var n=e("./keyMirror"),o=n({prop:null,context:null,childContext:null});t.exports=o},{"./keyMirror":124}],67:[function(e,t){"use strict";function n(e){switch(typeof e){case"number":case"string":return!0;case"object":if(Array.isArray(e))return e.every(n);if(f.isValidComponent(e))return!0;for(var t in e)if(!n(e[t]))return!1;return!0;default:return!1}}function o(e){var t=typeof e;return"object"===t&&Array.isArray(e)?"array":t}function r(){function e(){return!0}return h(e)}function i(e){function t(t,n){var r=o(n),i=r===e;return i}return h(t)}function a(e){function t(e,t){var o=n[t];return o}var n=m(e);return h(t)}function s(e){function t(t,n,r,i,a){var s=o(n),u="object"===s;if(u)for(var c in e){var l=e[c];if(l&&!l(n,c,i,a))return!1}return u}return h(t)}function u(e){function t(t,n){var o=n instanceof e;return o}return h(t)}function c(e){function t(t,n,o,r,i){var a=Array.isArray(n);if(a)for(var s=0;s<n.length;s++)if(!e(n,s,r,i))return!1;return a}return h(t)}function l(){function e(e,t){var o=n(t);return o}return h(e)}function p(){function e(e,t){var n=f.isValidComponent(t);return n}return h(e)}function d(e){return function(t,n,o,r){for(var i=!1,a=0;a<e.length;a++){var s=e[a];if("function"==typeof s.weak&&(s=s.weak),s(t,n,o,r)){i=!0;break}}return i}}function h(e){function t(t,n,o,r,i,a){var s=o[r];if(null!=s)return e(n,s,r,i||g,a);var u=!t;return u}var n=t.bind(null,!1,!0);return n.weak=t.bind(null,!1,!1),n.isRequired=t.bind(null,!0,!0),n.weak.isRequired=t.bind(null,!0,!1),n.isRequired.weak=n.weak.isRequired,n}var f=e("./ReactComponent"),m=(e("./ReactPropTypeLocationNames"),e("./warning"),e("./createObjectFrom")),v={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),shape:s,oneOf:a,oneOfType:d,arrayOf:c,instanceOf:u,renderable:l(),component:p(),any:r()},g="<<anonymous>>";t.exports=v},{"./ReactComponent":30,"./ReactPropTypeLocationNames":65,"./createObjectFrom":102,"./warning":138}],68:[function(e,t){"use strict";function n(){this.listenersToPut=[]}var o=e("./PooledClass"),r=e("./ReactEventEmitter"),i=e("./mixInto");i(n,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e<this.listenersToPut.length;e++){var t=this.listenersToPut[e];r.putListener(t.rootNodeID,t.propKey,t.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}}),o.addPoolingTo(n),t.exports=n},{"./PooledClass":25,"./ReactEventEmitter":50,"./mixInto":130}],69:[function(e,t){"use strict";function n(){this.reinitializeTransaction(),this.reactMountReady=s.getPooled(null),this.putListenerQueue=u.getPooled()}var o=e("./ExecutionEnvironment"),r=e("./PooledClass"),i=e("./ReactEventEmitter"),a=e("./ReactInputSelection"),s=e("./ReactMountReady"),u=e("./ReactPutListenerQueue"),c=e("./Transaction"),l=e("./mixInto"),p={initialize:a.getSelectionInformation,close:a.restoreSelection},d={initialize:function(){var e=i.isEnabled();return i.setEnabled(!1),e},close:function(e){i.setEnabled(e)}},h={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},f={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},m=[f,p,d,h],v={getTransactionWrappers:function(){return o.canUseDOM?m:[]},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){s.release(this.reactMountReady),this.reactMountReady=null,u.release(this.putListenerQueue),this.putListenerQueue=null}};l(n,c.Mixin),l(n,v),r.addPoolingTo(n),t.exports=n},{"./ExecutionEnvironment":21,"./PooledClass":25,"./ReactEventEmitter":50,"./ReactInputSelection":54,"./ReactMountReady":59,"./ReactPutListenerQueue":68,"./Transaction":92,"./mixInto":130}],70:[function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){o.createReactRootIndex=e}},o={createReactRootIndex:null,injection:n};t.exports=o},{}],71:[function(e,t){"use strict";function n(e){s(o.isValidComponent(e)),s(!(2===arguments.length&&"function"==typeof arguments[1]));var t=r.createReactRootID(),n=a.getPooled();n.reinitializeTransaction();try{return n.perform(function(){var o=e.mountComponent(t,n,0);return i.addChecksumToMarkup(o)},null)}finally{a.release(n)}}var o=e("./ReactComponent"),r=e("./ReactInstanceHandles"),i=e("./ReactMarkupChecksum"),a=e("./ReactReconcileTransaction"),s=e("./invariant");t.exports={renderComponentToString:n}},{"./ReactComponent":30,"./ReactInstanceHandles":55,"./ReactMarkupChecksum":57,"./ReactReconcileTransaction":69,"./invariant":118}],72:[function(e,t){"use strict";function n(e,t){var n={};return function(o){n[t]=o,e.setState(n)}}var o={createStateSetter:function(e,t){return function(n,o,r,i,a,s){var u=t.call(e,n,o,r,i,a,s);u&&e.setState(u)}},createStateKeySetter:function(e,t){var o=e.__keySetters||(e.__keySetters={});return o[t]||(o[t]=n(e,t))}};o.Mixin={createStateSetter:function(e){return o.createStateSetter(this,e)},createStateKeySetter:function(e){return o.createStateKeySetter(this,e)}},t.exports=o},{}],73:[function(e,t){"use strict";var n=e("./DOMPropertyOperations"),o=e("./ReactComponent"),r=e("./escapeTextForBrowser"),i=e("./mixInto"),a=function(e){this.construct({text:e})};i(a,o.Mixin),i(a,{mountComponent:function(e,t,i){return o.Mixin.mountComponent.call(this,e,t,i),"<span "+n.createMarkupForID(e)+">"+r(this.props.text)+"</span>"},receiveComponent:function(e){var t=e.props;t.text!==this.props.text&&(this.props.text=t.text,o.BackendIDOperations.updateTextContentByID(this._rootNodeID,t.text))}}),a.type=a,a.prototype.type=a,t.exports=a},{"./DOMPropertyOperations":10,"./ReactComponent":30,"./escapeTextForBrowser":106,"./mixInto":130}],74:[function(e,t){"use strict";var n=e("./ReactChildren"),o={getChildMapping:function(e){return n.map(e,function(e){return e})},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var o={},r=[];for(var i in e)t[i]?r.length&&(o[i]=r,r=[]):r.push(i);var a,s={};for(var u in t){if(o[u])for(a=0;a<o[u].length;a++){var c=o[u][a];s[o[u][a]]=n(c)}s[u]=n(u)}for(a=0;a<r.length;a++)s[r[a]]=n(r[a]);return s}};t.exports=o},{"./ReactChildren":29}],75:[function(e,t){"use strict";function n(){var e=document.createElement("div"),t=e.style;for(var n in a){var o=a[n];for(var r in o)if(r in t){s.push(o[r]);break}}}function o(e,t,n){e.addEventListener(t,n,!1)}function r(e,t,n){e.removeEventListener(t,n,!1)}var i=e("./ExecutionEnvironment"),a={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},s=[];i.canUseDOM&&n();var u={addEndEventListener:function(e,t){return 0===s.length?void window.setTimeout(t,0):void s.forEach(function(n){o(e,n,t)})},removeEndEventListener:function(e,t){0!==s.length&&s.forEach(function(n){r(e,n,t)})}};t.exports=u},{"./ExecutionEnvironment":21}],76:[function(e,t){"use strict";var n=e("./React"),o=e("./ReactTransitionChildMapping"),r=e("./cloneWithProps"),i=e("./emptyFunction"),a=e("./merge"),s=n.createClass({propTypes:{component:n.PropTypes.func,childFactory:n.PropTypes.func},getDefaultProps:function(){return{component:n.DOM.span,childFactory:i.thatReturnsArgument}},getInitialState:function(){return{children:o.getChildMapping(this.props.children)}},componentWillReceiveProps:function(e){var t=o.getChildMapping(e.children),n=this.state.children;this.setState({children:o.mergeChildMappings(n,t)});var r;for(r in t)n.hasOwnProperty(r)||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r);for(r in n)t.hasOwnProperty(r)||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)},componentWillMount:function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},componentDidUpdate:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},performEnter:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var n=o.getChildMapping(this.props.children);n.hasOwnProperty(e)||this.performLeave(e)},performLeave:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var n=o.getChildMapping(this.props.children);if(n.hasOwnProperty(e))this.performEnter(e);else{var r=a(this.state.children);delete r[e],this.setState({children:r})}},render:function(){var e={};for(var t in this.state.children){var n=this.state.children[t];n&&(e[t]=r(this.props.childFactory(n),{ref:t}))}return this.transferPropsTo(this.props.component(null,e))}});t.exports=s},{"./React":26,"./ReactTransitionChildMapping":74,"./cloneWithProps":96,"./emptyFunction":105,"./merge":127}],77:[function(e,t){"use strict";function n(){c(p)}function o(e,t){n(),p.batchedUpdates(e,t)}function r(e,t){return e._mountDepth-t._mountDepth}function i(){l.sort(r);for(var e=0;e<l.length;e++){var t=l[e];if(t.isMounted()){var n=t._pendingCallbacks;if(t._pendingCallbacks=null,t.performUpdateIfNecessary(),n)for(var o=0;o<n.length;o++)n[o].call(t)}}}function a(){l.length=0}function s(e,t){return c(!t||"function"==typeof t),n(),p.isBatchingUpdates?(l.push(e),void(t&&(e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t]))):(e.performUpdateIfNecessary(),void(t&&t.call(e)))}var u=e("./ReactPerf"),c=e("./invariant"),l=[],p=null,d=u.measure("ReactUpdates","flushBatchedUpdates",function(){try{i()}finally{a()}}),h={injectBatchingStrategy:function(e){c(e),c("function"==typeof e.batchedUpdates),c("boolean"==typeof e.isBatchingUpdates),p=e}},f={batchedUpdates:o,enqueueUpdate:s,flushBatchedUpdates:d,injection:h};t.exports=f},{"./ReactPerf":63,"./invariant":118}],78:[function(e,t){"use strict";var n=e("./LinkedStateMixin"),o=e("./React"),r=e("./ReactCSSTransitionGroup"),i=e("./ReactTransitionGroup"),r=e("./ReactCSSTransitionGroup"),a=e("./cx"),s=e("./cloneWithProps");o.addons={LinkedStateMixin:n,CSSTransitionGroup:r,TransitionGroup:i,classSet:a,cloneWithProps:s},t.exports=o},{"./LinkedStateMixin":22,"./React":26,"./ReactCSSTransitionGroup":27,"./ReactTransitionGroup":76,"./cloneWithProps":96,"./cx":103}],79:[function(e,t){"use strict";function n(e){if("selectionStart"in e&&a.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(document.selection){var t=document.selection.createRange();return{parentElement:t.parentElement(),text:t.text,top:t.boundingTop,left:t.boundingLeft}}var n=window.getSelection();return{anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}}function o(e){if(!g&&null!=f&&f==u()){var t=n(f);if(!v||!p(v,t)){v=t;var o=s.getPooled(h.select,m,e);return o.type="select",o.target=f,i.accumulateTwoPhaseDispatches(o),o}}}var r=e("./EventConstants"),i=e("./EventPropagators"),a=e("./ReactInputSelection"),s=e("./SyntheticEvent"),u=e("./getActiveElement"),c=e("./isTextInputElement"),l=e("./keyOf"),p=e("./shallowEqual"),d=r.topLevelTypes,h={select:{phasedRegistrationNames:{bubbled:l({onSelect:null}),captured:l({onSelectCapture:null})},dependencies:[d.topBlur,d.topContextMenu,d.topFocus,d.topKeyDown,d.topMouseDown,d.topMouseUp,d.topSelectionChange]}},f=null,m=null,v=null,g=!1,y={eventTypes:h,extractEvents:function(e,t,n,r){switch(e){case d.topFocus:(c(t)||"true"===t.contentEditable)&&(f=t,m=n,v=null);break;case d.topBlur:f=null,m=null,v=null;break;case d.topMouseDown:g=!0;break;case d.topContextMenu:case d.topMouseUp:return g=!1,o(r);case d.topSelectionChange:case d.topKeyDown:case d.topKeyUp:return o(r)}}};t.exports=y},{"./EventConstants":15,"./EventPropagators":20,"./ReactInputSelection":54,"./SyntheticEvent":85,"./getActiveElement":109,"./isTextInputElement":121,"./keyOf":125,"./shallowEqual":134}],80:[function(e,t){"use strict";var n=Math.pow(2,53),o={createReactRootIndex:function(){return Math.ceil(Math.random()*n)}};t.exports=o},{}],81:[function(e,t){"use strict";var n=e("./EventConstants"),o=e("./EventPluginUtils"),r=e("./EventPropagators"),i=e("./SyntheticClipboardEvent"),a=e("./SyntheticEvent"),s=e("./SyntheticFocusEvent"),u=e("./SyntheticKeyboardEvent"),c=e("./SyntheticMouseEvent"),l=e("./SyntheticDragEvent"),p=e("./SyntheticTouchEvent"),d=e("./SyntheticUIEvent"),h=e("./SyntheticWheelEvent"),f=e("./invariant"),m=e("./keyOf"),v=n.topLevelTypes,g={blur:{phasedRegistrationNames:{bubbled:m({onBlur:!0}),captured:m({onBlurCapture:!0})}},click:{phasedRegistrationNames:{bubbled:m({onClick:!0}),captured:m({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:m({onContextMenu:!0}),captured:m({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:m({onCopy:!0}),captured:m({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:m({onCut:!0}),captured:m({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:m({onDoubleClick:!0}),captured:m({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:m({onDrag:!0}),captured:m({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:m({onDragEnd:!0}),captured:m({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:m({onDragEnter:!0}),captured:m({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:m({onDragExit:!0}),captured:m({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:m({onDragLeave:!0}),captured:m({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:m({onDragOver:!0}),captured:m({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:m({onDragStart:!0}),captured:m({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:m({onDrop:!0}),captured:m({onDropCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:m({onFocus:!0}),captured:m({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:m({onInput:!0}),captured:m({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:m({onKeyDown:!0}),captured:m({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:m({onKeyPress:!0}),captured:m({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:m({onKeyUp:!0}),captured:m({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:m({onLoad:!0}),captured:m({onLoadCapture:!0})}},error:{phasedRegistrationNames:{bubbled:m({onError:!0}),captured:m({onErrorCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:m({onMouseDown:!0}),captured:m({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:m({onMouseMove:!0}),captured:m({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:m({onMouseOut:!0}),captured:m({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:m({onMouseOver:!0}),captured:m({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:m({onMouseUp:!0}),captured:m({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:m({onPaste:!0}),captured:m({onPasteCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:m({onReset:!0}),captured:m({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:m({onScroll:!0}),captured:m({onScrollCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:m({onSubmit:!0}),captured:m({onSubmitCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:m({onTouchCancel:!0}),captured:m({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:m({onTouchEnd:!0}),captured:m({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:m({onTouchMove:!0}),captured:m({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:m({onTouchStart:!0}),captured:m({onTouchStartCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:m({onWheel:!0}),captured:m({onWheelCapture:!0})}}},y={topBlur:g.blur,topClick:g.click,topContextMenu:g.contextMenu,topCopy:g.copy,topCut:g.cut,topDoubleClick:g.doubleClick,topDrag:g.drag,topDragEnd:g.dragEnd,topDragEnter:g.dragEnter,topDragExit:g.dragExit,topDragLeave:g.dragLeave,topDragOver:g.dragOver,topDragStart:g.dragStart,topDrop:g.drop,topError:g.error,topFocus:g.focus,topInput:g.input,topKeyDown:g.keyDown,topKeyPress:g.keyPress,topKeyUp:g.keyUp,topLoad:g.load,topMouseDown:g.mouseDown,topMouseMove:g.mouseMove,topMouseOut:g.mouseOut,topMouseOver:g.mouseOver,topMouseUp:g.mouseUp,topPaste:g.paste,topReset:g.reset,topScroll:g.scroll,topSubmit:g.submit,topTouchCancel:g.touchCancel,topTouchEnd:g.touchEnd,topTouchMove:g.touchMove,topTouchStart:g.touchStart,topWheel:g.wheel};for(var C in y)y[C].dependencies=[C];var E={eventTypes:g,executeDispatch:function(e,t,n){var r=o.executeDispatch(e,t,n);r===!1&&(e.stopPropagation(),e.preventDefault())},extractEvents:function(e,t,n,o){var m=y[e];if(!m)return null;var g;switch(e){case v.topInput:case v.topLoad:case v.topError:case v.topReset:case v.topSubmit:g=a;break;case v.topKeyDown:case v.topKeyPress:case v.topKeyUp:g=u;break;case v.topBlur:case v.topFocus:g=s;break;case v.topClick:if(2===o.button)return null;case v.topContextMenu:case v.topDoubleClick:case v.topMouseDown:case v.topMouseMove:case v.topMouseOut:case v.topMouseOver:case v.topMouseUp:g=c; break;case v.topDrag:case v.topDragEnd:case v.topDragEnter:case v.topDragExit:case v.topDragLeave:case v.topDragOver:case v.topDragStart:case v.topDrop:g=l;break;case v.topTouchCancel:case v.topTouchEnd:case v.topTouchMove:case v.topTouchStart:g=p;break;case v.topScroll:g=d;break;case v.topWheel:g=h;break;case v.topCopy:case v.topCut:case v.topPaste:g=i}f(g);var C=g.getPooled(m,n,o);return r.accumulateTwoPhaseDispatches(C),C}};t.exports=E},{"./EventConstants":15,"./EventPluginUtils":19,"./EventPropagators":20,"./SyntheticClipboardEvent":82,"./SyntheticDragEvent":84,"./SyntheticEvent":85,"./SyntheticFocusEvent":86,"./SyntheticKeyboardEvent":87,"./SyntheticMouseEvent":88,"./SyntheticTouchEvent":89,"./SyntheticUIEvent":90,"./SyntheticWheelEvent":91,"./invariant":118,"./keyOf":125}],82:[function(e,t){"use strict";function n(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticEvent"),r={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(n,r),t.exports=n},{"./SyntheticEvent":85}],83:[function(e,t){"use strict";function n(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticEvent"),r={data:null};o.augmentClass(n,r),t.exports=n},{"./SyntheticEvent":85}],84:[function(e,t){"use strict";function n(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticMouseEvent"),r={dataTransfer:null};o.augmentClass(n,r),t.exports=n},{"./SyntheticMouseEvent":88}],85:[function(e,t){"use strict";function n(e,t,n){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];this[i]=a?a(n):n[i]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;this.isDefaultPrevented=s?r.thatReturnsTrue:r.thatReturnsFalse,this.isPropagationStopped=r.thatReturnsFalse}var o=e("./PooledClass"),r=e("./emptyFunction"),i=e("./getEventTarget"),a=e("./merge"),s=e("./mergeInto"),u={type:null,target:i,currentTarget:r.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};s(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=r.thatReturnsTrue},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=r.thatReturnsTrue},persist:function(){this.isPersistent=r.thatReturnsTrue},isPersistent:r.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),n.Interface=u,n.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);s(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=a(n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.threeArgumentPooler)},o.addPoolingTo(n,o.threeArgumentPooler),t.exports=n},{"./PooledClass":25,"./emptyFunction":105,"./getEventTarget":111,"./merge":127,"./mergeInto":129}],86:[function(e,t){"use strict";function n(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticUIEvent"),r={relatedTarget:null};o.augmentClass(n,r),t.exports=n},{"./SyntheticUIEvent":90}],87:[function(e,t){"use strict";function n(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticUIEvent"),r=e("./getEventKey"),i={key:r,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,"char":null,charCode:null,keyCode:null,which:null};o.augmentClass(n,i),t.exports=n},{"./SyntheticUIEvent":90,"./getEventKey":110}],88:[function(e,t){"use strict";function n(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticUIEvent"),r=e("./ViewportMetrics"),i={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+r.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+r.currentScrollTop}};o.augmentClass(n,i),t.exports=n},{"./SyntheticUIEvent":90,"./ViewportMetrics":93}],89:[function(e,t){"use strict";function n(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticUIEvent"),r={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null};o.augmentClass(n,r),t.exports=n},{"./SyntheticUIEvent":90}],90:[function(e,t){"use strict";function n(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticEvent"),r={view:null,detail:null};o.augmentClass(n,r),t.exports=n},{"./SyntheticEvent":85}],91:[function(e,t){"use strict";function n(e,t,n){o.call(this,e,t,n)}var o=e("./SyntheticMouseEvent"),r={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(n,r),t.exports=n},{"./SyntheticMouseEvent":88}],92:[function(e,t){"use strict";var n=e("./invariant"),o={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this.timingMetrics||(this.timingMetrics={}),this.timingMetrics.methodInvocationTime=0,this.timingMetrics.wrapperInitTimes?this.timingMetrics.wrapperInitTimes.length=0:this.timingMetrics.wrapperInitTimes=[],this.timingMetrics.wrapperCloseTimes?this.timingMetrics.wrapperCloseTimes.length=0:this.timingMetrics.wrapperCloseTimes=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,o,r,i,a,s,u){n(!this.isInTransaction());var c,l,p=Date.now();try{this._isInTransaction=!0,c=!0,this.initializeAll(0),l=e.call(t,o,r,i,a,s,u),c=!1}finally{var d=Date.now();this.methodInvocationTime+=d-p;try{if(c)try{this.closeAll(0)}catch(h){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return l},initializeAll:function(e){for(var t=this.transactionWrappers,n=this.timingMetrics.wrapperInitTimes,o=e;o<t.length;o++){var i=Date.now(),a=t[o];try{this.wrapperInitData[o]=r.OBSERVED_ERROR,this.wrapperInitData[o]=a.initialize?a.initialize.call(this):null}finally{var s=n[o],u=Date.now();if(n[o]=(s||0)+(u-i),this.wrapperInitData[o]===r.OBSERVED_ERROR)try{this.initializeAll(o+1)}catch(c){}}}},closeAll:function(e){n(this.isInTransaction());for(var t=this.transactionWrappers,o=this.timingMetrics.wrapperCloseTimes,i=e;i<t.length;i++){var a,s=t[i],u=Date.now(),c=this.wrapperInitData[i];try{a=!0,c!==r.OBSERVED_ERROR&&s.close&&s.close.call(this,c),a=!1}finally{var l=Date.now(),p=o[i];if(o[i]=(p||0)+(l-u),a)try{this.closeAll(i+1)}catch(d){}}}this.wrapperInitData.length=0}},r={Mixin:o,OBSERVED_ERROR:{}};t.exports=r},{"./invariant":118}],93:[function(e,t){"use strict";var n=e("./getUnboundedScrollPosition"),o={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(){var e=n(window);o.currentScrollLeft=e.x,o.currentScrollTop=e.y}};t.exports=o},{"./getUnboundedScrollPosition":116}],94:[function(e,t){"use strict";function n(e,t){if(o(null!=t),null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n?e.concat(t):r?[e].concat(t):[e,t]}var o=e("./invariant");t.exports=n},{"./invariant":118}],95:[function(e,t){"use strict";function n(e){for(var t=1,n=0,r=0;r<e.length;r++)t=(t+e.charCodeAt(r))%o,n=(n+t)%o;return t|n<<16}var o=65521;t.exports=n},{}],96:[function(e,t){"use strict";function n(e,t){var n=o.mergeProps(t,e.props);return!n.hasOwnProperty(i)&&e.props.hasOwnProperty(i)&&(n.children=e.props.children),e.constructor.ConvenienceConstructor(n)}var o=e("./ReactPropTransferer"),r=e("./keyOf"),i=r({children:null});t.exports=n},{"./ReactPropTransferer":64,"./keyOf":125}],97:[function(e,t){function n(e,t){return e&&t?e===t?!0:o(e)?!1:o(t)?n(e,t.parentNode):e.contains?e.contains(t):e.compareDocumentPosition?!!(16&e.compareDocumentPosition(t)):!1:!1}var o=e("./isTextNode");t.exports=n},{"./isTextNode":122}],98:[function(e,t){function n(e,t,n,o,r,i){e=e||{};for(var a,s=[t,n,o,r,i],u=0;s[u];){a=s[u++];for(var c in a)e[c]=a[c];a.hasOwnProperty&&a.hasOwnProperty("toString")&&"undefined"!=typeof a.toString&&e.toString!==a.toString&&(e.toString=a.toString)}return e}t.exports=n},{}],99:[function(e,t){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function o(e){return n(e)?Array.isArray(e)?e.slice():r(e):[e]}var r=e("./toArray");t.exports=o},{"./toArray":136}],100:[function(e,t){"use strict";function n(e){var t=o.createClass({displayName:"ReactFullPageComponent"+(e.componentConstructor.displayName||""),componentWillUnmount:function(){r(!1)},render:function(){return this.transferPropsTo(e(null,this.props.children))}});return t}var o=e("./ReactCompositeComponent"),r=e("./invariant");t.exports=n},{"./ReactCompositeComponent":33,"./invariant":118}],101:[function(e,t){function n(e){var t=e.match(c);return t&&t[1].toLowerCase()}function o(e,t){var o=u;s(!!u);var r=n(e),c=r&&a(r);if(c){o.innerHTML=c[1]+e+c[2];for(var l=c[0];l--;)o=o.lastChild}else o.innerHTML=e;var p=o.getElementsByTagName("script");p.length&&(s(t),i(p).forEach(t));for(var d=i(o.childNodes);o.lastChild;)o.removeChild(o.lastChild);return d}var r=e("./ExecutionEnvironment"),i=e("./createArrayFrom"),a=e("./getMarkupWrap"),s=e("./invariant"),u=r.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},{"./ExecutionEnvironment":21,"./createArrayFrom":99,"./getMarkupWrap":112,"./invariant":118}],102:[function(e,t){function n(e,t){var n={},o=Array.isArray(t);"undefined"==typeof t&&(t=!0);for(var r=e.length;r--;)n[e[r]]=o?t[r]:t;return n}t.exports=n},{}],103:[function(e,t){function n(e){return"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).join(" "):Array.prototype.join.call(arguments," ")}t.exports=n},{}],104:[function(e,t){"use strict";function n(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||o.isUnitlessNumber[e]?""+t:t+"px"}var o=e("./CSSProperty");t.exports=n},{"./CSSProperty":3}],105:[function(e,t){function n(e){return function(){return e}}function o(){}var r=e("./copyProperties");r(o,{thatReturns:n,thatReturnsFalse:n(!1),thatReturnsTrue:n(!0),thatReturnsNull:n(null),thatReturnsThis:function(){return this},thatReturnsArgument:function(e){return e}}),t.exports=o},{"./copyProperties":98}],106:[function(e,t){"use strict";function n(e){return r[e]}function o(e){return(""+e).replace(i,n)}var r={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;","/":"&#x2f;"},i=/[&><"'\/]/g;t.exports=o},{}],107:[function(e,t){"use strict";function n(e,t,n){var o=e;r(!o.hasOwnProperty(n)),null!=t&&(o[n]=t)}function o(e){if(null==e)return e;var t={};return i(e,n,t),t}var r=e("./invariant"),i=e("./traverseAllChildren");t.exports=o},{"./invariant":118,"./traverseAllChildren":137}],108:[function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=n},{}],109:[function(e,t){function n(){try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=n},{}],110:[function(e,t){"use strict";function n(e){return"key"in e?o[e.key]||e.key:r[e.which||e.keyCode]||"Unidentified"}var o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=n},{}],111:[function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=n},{}],112:[function(e,t){function n(e){return r(!!i),p.hasOwnProperty(e)||(e="*"),a.hasOwnProperty(e)||(i.innerHTML="*"===e?"<link />":"<"+e+"></"+e+">",a[e]=!i.firstChild),a[e]?p[e]:null}var o=e("./ExecutionEnvironment"),r=e("./invariant"),i=o.canUseDOM?document.createElement("div"):null,a={circle:!0,defs:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},s=[1,'<select multiple="true">',"</select>"],u=[1,"<table>","</table>"],c=[3,"<table><tbody><tr>","</tr></tbody></table>"],l=[1,"<svg>","</svg>"],p={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:s,option:s,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:c,th:c,circle:l,defs:l,g:l,line:l,linearGradient:l,path:l,polygon:l,polyline:l,radialGradient:l,rect:l,stop:l,text:l};t.exports=n},{"./ExecutionEnvironment":21,"./invariant":118}],113:[function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function o(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function r(e,t){for(var r=n(e),i=0,a=0;r;){if(3==r.nodeType){if(a=i+r.textContent.length,t>=i&&a>=t)return{node:r,offset:t-i};i=a}r=n(o(r))}}t.exports=r},{}],114:[function(e,t){"use strict";function n(e){return e?e.nodeType===o?e.documentElement:e.firstChild:null}var o=9;t.exports=n},{}],115:[function(e,t){"use strict";function n(){return!r&&o.canUseDOM&&(r="textContent"in document.createElement("div")?"textContent":"innerText"),r}var o=e("./ExecutionEnvironment"),r=null;t.exports=n},{"./ExecutionEnvironment":21}],116:[function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=n},{}],117:[function(e,t){function n(e){return e.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;t.exports=n},{}],118:[function(e,t){"use strict";var n=function(e){if(!e){var t=new Error("Minified exception occured; use the non-minified dev environment for the full error message and additional helpful warnings.");throw t.framesToPop=1,t}};t.exports=n},{}],119:[function(e,t){"use strict";function n(e,t){if(!r.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&o&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var o,r=e("./ExecutionEnvironment");r.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=n},{"./ExecutionEnvironment":21}],120:[function(e,t){function n(e){return!(!e||!("undefined"!=typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=n},{}],121:[function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&o[e.type]||"TEXTAREA"===e.nodeName)}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=n},{}],122:[function(e,t){function n(e){return o(e)&&3==e.nodeType}var o=e("./isNode");t.exports=n},{"./isNode":120}],123:[function(e,t){"use strict";function n(e){e||(e="");var t,n=arguments.length;if(n>1)for(var o=1;n>o;o++)t=arguments[o],t&&(e+=" "+t);return e}t.exports=n},{}],124:[function(e,t){"use strict";var n=e("./invariant"),o=function(e){var t,o={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(o[t]=t);return o};t.exports=o},{"./invariant":118}],125:[function(e,t){var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=n},{}],126:[function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)?t[n]:t[n]=e.call(this,n)}}t.exports=n},{}],127:[function(e,t){"use strict";var n=e("./mergeInto"),o=function(e,t){var o={};return n(o,e),n(o,t),o};t.exports=o},{"./mergeInto":129}],128:[function(e,t){"use strict";var n=e("./invariant"),o=e("./keyMirror"),r=36,i=function(e){return"object"!=typeof e||null===e},a={MAX_MERGE_DEPTH:r,isTerminal:i,normalizeMergeArg:function(e){return void 0===e||null===e?{}:e},checkMergeArrayArgs:function(e,t){n(Array.isArray(e)&&Array.isArray(t))},checkMergeObjectArgs:function(e,t){a.checkMergeObjectArg(e),a.checkMergeObjectArg(t)},checkMergeObjectArg:function(e){n(!i(e)&&!Array.isArray(e))},checkMergeLevel:function(e){n(r>e)},checkArrayStrategy:function(e){n(void 0===e||e in a.ArrayStrategies)},ArrayStrategies:o({Clobber:!0,IndexByIndex:!0})};t.exports=a},{"./invariant":118,"./keyMirror":124}],129:[function(e,t){"use strict";function n(e,t){if(r(e),null!=t){r(t);for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}}var o=e("./mergeHelpers"),r=o.checkMergeObjectArg;t.exports=n},{"./mergeHelpers":128}],130:[function(e,t){"use strict";var n=function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&(e.prototype[n]=t[n])};t.exports=n},{}],131:[function(e,t){"use strict";function n(e,t,n){if(!e)return null;var o=0,r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.call(n,e[i],i,o++));return r}t.exports=n},{}],132:[function(e,t){"use strict";function n(e,t,n){if(!e)return null;var o=0,r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.call(n,i,e[i],o++));return r}t.exports=n},{}],133:[function(e,t){"use strict";function n(e){return r(o.isValidComponent(e)),e}var o=e("./ReactComponent"),r=e("./invariant");t.exports=n},{"./ReactComponent":30,"./invariant":118}],134:[function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}t.exports=n},{}],135:[function(e,t){"use strict";function n(e,t){return e&&t&&e.constructor===t.constructor&&(e.props&&e.props.key)===(t.props&&t.props.key)&&e._owner===t._owner?!0:!1}t.exports=n},{}],136:[function(e,t){function n(e){var t=e.length;if(o(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)),o("number"==typeof t),o(0===t||t-1 in e),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),i=0;t>i;i++)r[i]=e[i];return r}var o=e("./invariant");t.exports=n},{"./invariant":118}],137:[function(e,t){"use strict";function n(e){return d[e]}function o(e,t){return e&&e.props&&null!=e.props.key?i(e.props.key):t.toString(36)}function r(e){return(""+e).replace(h,n)}function i(e){return"$"+r(e)}function a(e,t,n){null!==e&&void 0!==e&&f(e,"",0,t,n)}var s=e("./ReactInstanceHandles"),u=e("./ReactTextComponent"),c=e("./invariant"),l=s.SEPARATOR,p=":",d={"=":"=0",".":"=1",":":"=2"},h=/[=.:]/g,f=function(e,t,n,r,a){var s=0;if(Array.isArray(e))for(var d=0;d<e.length;d++){var h=e[d],m=t+(t?p:l)+o(h,d),v=n+s;s+=f(h,m,v,r,a)}else{var g=typeof e,y=""===t,C=y?l+o(e,0):t;if(null==e||"boolean"===g)r(a,null,C,n),s=1;else if(e.mountComponentIntoNode)r(a,e,C,n),s=1;else if("object"===g){c(!e||1!==e.nodeType);for(var E in e)e.hasOwnProperty(E)&&(s+=f(e[E],t+(t?p:l)+i(E)+p+o(e[E],0),n+s,r,a))}else if("string"===g){var R=new u(e);r(a,R,C,n),s+=1}else if("number"===g){var M=new u(""+e);r(a,M,C,n),s+=1}}return s};t.exports=a},{"./ReactInstanceHandles":55,"./ReactTextComponent":73,"./invariant":118}],138:[function(e,t){"use strict";var n=e("./emptyFunction"),o=n;t.exports=o},{"./emptyFunction":105}]},{},[78])(78)});
src/components/article/Image.js
garfieldduck/twreporter-react
/*eslint no-unused-vars: [2, { "args": "none" }]*/ 'use strict' import { replaceStorageUrlPrefix } from '../../utils/index' import cx from 'classnames' import commonStyles from './Common.scss' import FitwidthMixin from './mixins/FitwidthMixin' import { getScreenType } from '../../utils/index' import BlockAlignmentWrapper from './BlockAlignmentWrapper' import React, { Component } from 'react' import ReactDOM from 'react-dom' import LazyLoad, { forceCheck } from 'react-lazyload' import styles from './Image.scss' import UI_SETTING from '../../constants/ui-settings' // lodash import get from 'lodash/get' const DEFAULT_WIDTH = 200 const DEFAULT_HEIGHT = 200 class Image extends FitwidthMixin(Component) { constructor(props) { super(props) this.state = { isMounted: false, screenType: 'MOBILE', width: DEFAULT_WIDTH } this.fitToParentWidth = this.fitToParentWidth.bind(this) } componentDidMount() { this.setState({ isMounted: true, screenType: getScreenType(window.innerWidth) }) if (super.componentDidMount) super.componentDidMount() forceCheck() } componentWillReceiveProps(nextProps) { if (ReactDOM.findDOMNode(this)) { this.fitToParentWidth() } } _renderPlaceHoderImage(imageUrl, imgStyle) { if (imageUrl) { return ( <div className={styles['img-placeholder-outer']} style={ { ...imgStyle } }> <LazyLoad offset={UI_SETTING.image.loadingOffset.placeholder} height={imgStyle.height} once={true}> <img src={ replaceStorageUrlPrefix(imageUrl) } className={styles['img-placeholder']} style={imgStyle} /> </LazyLoad> </div> ) } return null } _renderFigure(imageObj, imgStyle) { if (get(imageObj, 'url')) { return ( <figure> <LazyLoad offset={UI_SETTING.image.loadingOffset.image} height={imgStyle.height} once={true}> <img src={ replaceStorageUrlPrefix(imageObj.url) } style={ { ...imgStyle } } className={styles['img-absolute']} /> </LazyLoad> </figure> ) } return null } _getNoscript(imgUrl, imgDes) { // generate image tag for search engines return { __html: '<img src="'+imgUrl+'" alt="'+imgDes+'">' } } render() { let imageByDevice = get(this.props, [ 'content', 0 ], {}) if (imageByDevice===null) { return null } let { desktop, tiny } = imageByDevice let { isMounted, screenType, width } = this.state let { isToShowDescription, outerWidth, outerHeight } = this.props let boxWidth = outerWidth || width let maxWidth = get(desktop, 'width', DEFAULT_WIDTH) if(maxWidth < boxWidth) { boxWidth = maxWidth } let boxHeight = outerHeight || this._getHeight(boxWidth, desktop, DEFAULT_WIDTH, DEFAULT_HEIGHT) let renderedPlaceHoderImage = null let renderedFigure = null let imageDescription = get(imageByDevice, 'description', null) let descriptionBox let outerStyle = { width: boxWidth, minHeight: boxHeight } let imgStyle = { ...outerStyle, height: boxHeight } // if the Image is being mounted, select image to render // according to the device of the client if (isMounted) { renderedPlaceHoderImage = this._renderPlaceHoderImage(get(tiny, [ 'url' ]), imgStyle) renderedFigure = this._renderByDevice(screenType, imageByDevice, imgStyle) } if(imageDescription && isToShowDescription) { descriptionBox = <div className={cx(commonStyles['desc-text-block'], 'text-justify')} style={{ marginTop: '16px' }} > {imageDescription} </div> } let imgUrl = replaceStorageUrlPrefix(get(desktop, 'url', '')) let microData = ( <div itemProp="image" itemScope itemType="http://schema.org/ImageObject"> <meta itemProp="url" content={imgUrl} /> <meta itemProp="description" content={imageDescription} /> <meta itemProp="height" content={get(desktop, 'height')} /> <meta itemProp="width" content={get(desktop, 'width')} /> </div> ) const { isPhotography } = this.context return ( <div ref="imageBox" className={cx(styles['image-box'], isPhotography ? styles['photoExclu'] : null)}> <div className="hidden-print" style={outerStyle}> {renderedPlaceHoderImage} {renderedFigure} <noscript dangerouslySetInnerHTML={this._getNoscript(imgUrl, imageDescription)} /> </div> {descriptionBox} {microData} <div className="visible-print"> <img src={imgUrl} alt={imageDescription} /> </div> </div> ) } } Image.contextTypes = { isPhotography: React.PropTypes.bool } Image.propTypes = { content: React.PropTypes.array, customeStyles: React.PropTypes.array, isToShowDescription: React.PropTypes.bool, outerHeight: React.PropTypes.number, outerWidth: React.PropTypes.number } Image.defaultProps = { content: [], customeStyles: [], isToShowDescription: true, outerHeight: 0, outerWidth: 0 } const AlignedImage = BlockAlignmentWrapper(Image) export { AlignedImage, Image }
src/component/tile.spec.js
sjcrank/viz-data-generator
import test from 'ava'; import { shallow } from 'enzyme'; import React from 'react'; import { StyleSheetTestUtils } from 'aphrodite'; import Tile from './tile'; test.beforeEach('disable style injection', () => { StyleSheetTestUtils.suppressStyleInjection(); }); test.afterEach('resume style injection', () => { StyleSheetTestUtils.clearBufferAndResumeStyleInjection(); }); test('renders children when passed in', (t) => { const wrapper = shallow( <Tile> <div className='unique1'/> <div className='unique2'/> </Tile> ); t.true(wrapper.contains(<div className='unique1'/>)); t.true(wrapper.contains(<div className='unique2'/>)); }); test('uses passed in class', (t) => { const wrapper = shallow(<Tile className='testClass'/>); t.true(wrapper.find('div').hasClass('testClass')); });
plugins/react/frontend/components/common/DeleteConfirmationButtons/index.js
carteb/carte-blanche
/* eslint-disable max-len */ /** * DeleteConfirmationButtons * * Shows buttons for delete confirmation */ import React from 'react'; import styles from './style.css'; class DeleteConfirmationButtons extends React.Component { confirmDeleteVariation = (e) => { e.preventDefault(); this.props.confirmDeleteVariation(this.props.variationPath); } cancelDeleteVariation = (e) => { e.preventDefault(); this.props.cancelDeleteVariation(this.props.variationPath); } render() { return ( <div> <button onClick={this.confirmDeleteVariation} className={`${styles.base}`}> Delete </button> <button onClick={this.cancelDeleteVariation} className={`${styles.base} `}> Cancel </button> </div> ); } } export default DeleteConfirmationButtons;
ajax/libs/forerunnerdb/1.3.412/fdb-core.min.js
dc-js/cdnjs
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d=a("../lib/Core");a("../lib/Shim.IE8");"undefined"!=typeof window&&(window.ForerunnerDB=d),b.exports=d},{"../lib/Core":4,"../lib/Shim.IE8":27}],2:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(a,b,c){this.init.apply(this,arguments)};f.prototype.init=function(a,b,c,d){this._store=[],this._keys=[],void 0!==b&&this.index(b),void 0!==c&&this.compareFunc(c),void 0!==d&&this.hashFunc(d),void 0!==a&&this.data(a)},d.addModule("BinaryTree",f),d.mixin(f.prototype,"Mixin.ChainReactor"),d.mixin(f.prototype,"Mixin.Sorting"),d.mixin(f.prototype,"Mixin.Common"),d.synthesize(f.prototype,"compareFunc"),d.synthesize(f.prototype,"hashFunc"),d.synthesize(f.prototype,"indexDir"),d.synthesize(f.prototype,"keys"),d.synthesize(f.prototype,"index",function(a){return void 0!==a&&this.keys(this.extractKeys(a)),this.$super.call(this,a)}),f.prototype.extractKeys=function(a){var b,c=[];for(b in a)a.hasOwnProperty(b)&&c.push({key:b,val:a[b]});return c},f.prototype.data=function(a){return void 0!==a?(this._data=a,this._hashFunc&&(this._hash=this._hashFunc(a)),this):this._data},f.prototype.push=function(a){return void 0!==a?(this._store.push(a),this):!1},f.prototype.pull=function(a){if(void 0!==a){var b=this._store.indexOf(a);if(b>-1)return this._store.splice(b,1),this}return!1},f.prototype._compareFunc=function(a,b){var c,d,e=0;for(c=0;c<this._keys.length;c++)if(d=this._keys[c],1===d.val?e=this.sortAsc(a[d.key],b[d.key]):-1===d.val&&(e=this.sortDesc(a[d.key],b[d.key])),0!==e)return e;return e},f.prototype._hashFunc=function(a){return a[this._keys[0].key]},f.prototype.insert=function(a){var b,c,d,e;if(a instanceof Array){for(c=[],d=[],e=0;e<a.length;e++)this.insert(a[e])?c.push(a[e]):d.push(a[e]);return{inserted:c,failed:d}}return this._data?(b=this._compareFunc(this._data,a),0===b?(this.push(a),this._left?this._left.insert(a):this._left=new f(a,this._index,this._compareFunc,this._hashFunc),!0):-1===b?(this._right?this._right.insert(a):this._right=new f(a,this._index,this._compareFunc,this._hashFunc),!0):1===b?(this._left?this._left.insert(a):this._left=new f(a,this._index,this._compareFunc,this._hashFunc),!0):!1):(this.data(a),!0)},f.prototype.lookup=function(a,b){var c=this._compareFunc(this._data,a);return b=b||[],0===c&&(this._left&&this._left.lookup(a,b),b.push(this._data),this._right&&this._right.lookup(a,b)),-1===c&&this._right&&this._right.lookup(a,b),1===c&&this._left&&this._left.lookup(a,b),b},f.prototype.inOrder=function(a,b){switch(b=b||[],this._left&&this._left.inOrder(a,b),a){case"hash":b.push(this._hash);break;case"data":b.push(this._data);break;default:b.push({key:this._data,arr:this._store})}return this._right&&this._right.inOrder(a,b),b},f.prototype.findRange=function(a,b,c,d,f,g){f=f||[],g=g||new e(b),this._left&&this._left.findRange(a,b,c,d,f,g);var h=g.value(this._data),i=this.sortAsc(h,c),j=this.sortAsc(h,d);if(!(0!==i&&1!==i||0!==j&&-1!==j))switch(a){case"hash":f.push(this._hash);break;case"data":f.push(this._data);break;default:f.push({key:this._data,arr:this._store})}return this._right&&this._right.findRange(a,b,c,d,f,g),f},f.prototype.match=function(a,b){var c,d,f,g=new e,h=[],i=0;for(c=g.parseArr(this._index,{verbose:!0}),d=g.parseArr(a,{ignore:/\$/,verbose:!0}),f=0;f<c.length;f++)d[f]===c[f]&&(i++,h.push(d[f]));return{matchedKeys:h,totalKeyCount:d.length,score:i}},d.finishModule("BinaryTree"),b.exports=f},{"./Path":23,"./Shared":26}],3:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m;d=a("./Shared");var n=function(a){this.init.apply(this,arguments)};n.prototype.init=function(a,b){this._primaryKey="_id",this._primaryIndex=new g("primary"),this._primaryCrc=new g("primaryCrc"),this._crcLookup=new g("crcLookup"),this._name=a,this._data=[],this._metrics=new f,this._options=b||{changeTimestamp:!1},this._metaData={},this._deferQueue={insert:[],update:[],remove:[],upsert:[]},this._deferThreshold={insert:100,update:100,remove:100,upsert:100},this._deferTime={insert:1,update:1,remove:1,upsert:1},this.subsetOf(this)},d.addModule("Collection",n),d.mixin(n.prototype,"Mixin.Common"),d.mixin(n.prototype,"Mixin.Events"),d.mixin(n.prototype,"Mixin.ChainReactor"),d.mixin(n.prototype,"Mixin.CRUD"),d.mixin(n.prototype,"Mixin.Constants"),d.mixin(n.prototype,"Mixin.Triggers"),d.mixin(n.prototype,"Mixin.Sorting"),d.mixin(n.prototype,"Mixin.Matching"),d.mixin(n.prototype,"Mixin.Updating"),d.mixin(n.prototype,"Mixin.Tags"),f=a("./Metrics"),g=a("./KeyValueStore"),h=a("./Path"),i=a("./IndexHashMap"),j=a("./IndexBinaryTree"),k=a("./Crc"),e=d.modules.Db,l=a("./Overload"),m=a("./ReactorIO"),n.prototype.crc=k,d.synthesize(n.prototype,"state"),d.synthesize(n.prototype,"name"),d.synthesize(n.prototype,"metaData"),n.prototype.data=function(){return this._data},n.prototype.drop=function(a){var b;if(this.isDropped())return a&&a(!1,!0),!0;if(this._db&&this._db._collection&&this._name){if(this.debug()&&console.log(this.logIdentifier()+" Dropping"),this._state="dropped",this.emit("drop",this),delete this._db._collection[this._name],this._collate)for(b in this._collate)this._collate.hasOwnProperty(b)&&this.collateRemove(b);return delete this._primaryKey,delete this._primaryIndex,delete this._primaryCrc,delete this._crcLookup,delete this._name,delete this._data,delete this._metrics,a&&a(!1,!0),!0}return a&&a(!1,!0),!1},n.prototype.primaryKey=function(a){if(void 0!==a){if(this._primaryKey!==a){var b=this._primaryKey;this._primaryKey=a,this._primaryIndex.primaryKey(a),this.rebuildPrimaryKeyIndex(),this.chainSend("primaryKey",a,{oldData:b})}return this}return this._primaryKey},n.prototype._onInsert=function(a,b){this.emit("insert",a,b)},n.prototype._onUpdate=function(a){this.emit("update",a)},n.prototype._onRemove=function(a){this.emit("remove",a)},n.prototype._onChange=function(){this._options.changeTimestamp&&(this._metaData.lastChange=new Date)},d.synthesize(n.prototype,"db",function(a){return a&&"_id"===this.primaryKey()&&(this.primaryKey(a.primaryKey()),this.debug(a.debug())),this.$super.apply(this,arguments)}),d.synthesize(n.prototype,"mongoEmulation"),n.prototype.setData=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";if(a){var d=this._metrics.create("setData");d.start(),b=this.options(b),this.preSetData(a,b,c),b.$decouple&&(a=this.decouple(a)),a instanceof Array||(a=[a]),d.time("transformIn"),a=this.transformIn(a),d.time("transformIn");var e=[].concat(this._data);this._dataReplace(a),d.time("Rebuild Primary Key Index"),this.rebuildPrimaryKeyIndex(b),d.time("Rebuild Primary Key Index"),d.time("Rebuild All Other Indexes"),this._rebuildIndexes(),d.time("Rebuild All Other Indexes"),d.time("Resolve chains"),this.chainSend("setData",a,{oldData:e}),d.time("Resolve chains"),d.stop(),this._onChange(),this.emit("setData",this._data,e)}return c&&c(!1),this},n.prototype.rebuildPrimaryKeyIndex=function(a){a=a||{$ensureKeys:void 0,$violationCheck:void 0};var b,c,d,e,f=a&&void 0!==a.$ensureKeys?a.$ensureKeys:!0,g=a&&void 0!==a.$violationCheck?a.$violationCheck:!0,h=this._primaryIndex,i=this._primaryCrc,j=this._crcLookup,k=this._primaryKey;for(h.truncate(),i.truncate(),j.truncate(),b=this._data,c=b.length;c--;){if(d=b[c],f&&this.ensurePrimaryKey(d),g){if(!h.uniqueSet(d[k],d))throw this.logIdentifier()+" Call to setData on collection failed because your data violates the primary key unique constraint. One or more documents are using the same primary key: "+d[this._primaryKey]}else h.set(d[k],d);e=this.jStringify(d),i.set(d[k],e),j.set(e,d)}},n.prototype.ensurePrimaryKey=function(a){void 0===a[this._primaryKey]&&(a[this._primaryKey]=this.objectId())},n.prototype.truncate=function(){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return this.emit("truncate",this._data),this._data.length=0,this._primaryIndex=new g("primary"),this._primaryCrc=new g("primaryCrc"),this._crcLookup=new g("crcLookup"),this._onChange(),this.deferEmit("change",{type:"truncate"}),this},n.prototype.upsert=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";if(a){var c,d,e=this._deferQueue.upsert,f=this._deferThreshold.upsert,g={};if(a instanceof Array){if(a.length>f)return this._deferQueue.upsert=e.concat(a),this.processQueue("upsert",b),{};for(g=[],d=0;d<a.length;d++)g.push(this.upsert(a[d]));return b&&b(),g}switch(a[this._primaryKey]?(c={},c[this._primaryKey]=a[this._primaryKey],this._primaryIndex.lookup(c)[0]?g.op="update":g.op="insert"):g.op="insert",g.op){case"insert":g.result=this.insert(a);break;case"update":g.result=this.update(c,a)}return g}return b&&b(),{}},n.prototype.filter=function(a,b,c){return this.find(a,c).filter(b)},n.prototype.filterUpdate=function(a,b,c){var d,e,f,g,h=this.find(a,c),i=[],j=this.primaryKey();for(g=0;g<h.length;g++)d=h[g],f=b(d),f&&(e={},e[j]=d[j],i.push(this.update(e,f)));return i},n.prototype.update=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";b=this.decouple(b),this.mongoEmulation()&&(this.convertToFdb(a),this.convertToFdb(b)),b=this.transformIn(b),this.debug()&&console.log(this.logIdentifier()+" Updating some data");var d,e,f=this,g=this._metrics.create("update"),h=function(d){var e,h,i,j=f.decouple(d);return f.willTrigger(f.TYPE_UPDATE,f.PHASE_BEFORE)||f.willTrigger(f.TYPE_UPDATE,f.PHASE_AFTER)?(e=f.decouple(d),h={type:"update",query:f.decouple(a),update:f.decouple(b),options:f.decouple(c),op:g},i=f.updateObject(e,h.update,h.query,h.options,""),f.processTrigger(h,f.TYPE_UPDATE,f.PHASE_BEFORE,d,e)!==!1?(i=f.updateObject(d,e,h.query,h.options,""),f.processTrigger(h,f.TYPE_UPDATE,f.PHASE_AFTER,j,e)):i=!1):i=f.updateObject(d,b,a,c,""),f._updateIndexes(j,d),i};return g.start(),g.time("Retrieve documents to update"),d=this.find(a,{$decouple:!1}),g.time("Retrieve documents to update"),d.length&&(g.time("Update documents"),e=d.filter(h),g.time("Update documents"),e.length&&(g.time("Resolve chains"),this.chainSend("update",{query:a,update:b,dataSet:d},c),g.time("Resolve chains"),this._onUpdate(e),this._onChange(),this.deferEmit("change",{type:"update",data:e}))),g.stop(),e||[]},n.prototype._replaceObj=function(a,b){var c;this._removeFromIndexes(a);for(c in a)a.hasOwnProperty(c)&&delete a[c];for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);if(!this._insertIntoIndexes(a))throw this.logIdentifier()+" Primary key violation in update! Key violated: "+a[this._primaryKey];return this},n.prototype.updateById=function(a,b){var c={};return c[this._primaryKey]=a,this.update(c,b)},n.prototype.updateObject=function(a,b,c,d,e,f){b=this.decouple(b),e=e||"","."===e.substr(0,1)&&(e=e.substr(1,e.length-1));var g,i,j,k,l,m,n,o,p,q=!1,r=!1;for(p in b)if(b.hasOwnProperty(p)){if(g=!1,"$"===p.substr(0,1))switch(p){case"$key":case"$index":case"$data":case"$min":case"$max":g=!0;break;case"$each":for(g=!0,k=b.$each.length,j=0;k>j;j++)r=this.updateObject(a,b.$each[j],c,d,e),r&&(q=!0);q=q||r;break;default:g=!0,r=this.updateObject(a,b[p],c,d,e,p),q=q||r}if(this._isPositionalKey(p)&&(g=!0,p=p.substr(0,p.length-2),m=new h(e+"."+p),a[p]&&a[p]instanceof Array&&a[p].length)){for(i=[],j=0;j<a[p].length;j++)this._match(a[p][j],m.value(c)[0],d,"",{})&&i.push(j);for(j=0;j<i.length;j++)r=this.updateObject(a[p][i[j]],b[p+".$"],c,d,e+"."+p,f),q=q||r}if(!g)if(f||"object"!=typeof b[p])switch(f){case"$inc":var s=!0;b[p]>0?b.$max&&a[p]>=b.$max&&(s=!1):b[p]<0&&b.$min&&a[p]<=b.$min&&(s=!1),s&&(this._updateIncrement(a,p,b[p]),q=!0);break;case"$cast":switch(b[p]){case"array":a[p]instanceof Array||(this._updateProperty(a,p,b.$data||[]),q=!0);break;case"object":(!(a[p]instanceof Object)||a[p]instanceof Array)&&(this._updateProperty(a,p,b.$data||{}),q=!0);break;case"number":"number"!=typeof a[p]&&(this._updateProperty(a,p,Number(a[p])),q=!0);break;case"string":"string"!=typeof a[p]&&(this._updateProperty(a,p,String(a[p])),q=!0);break;default:throw this.logIdentifier()+" Cannot update cast to unknown type: "+b[p]}break;case"$push":if(void 0===a[p]&&this._updateProperty(a,p,[]),!(a[p]instanceof Array))throw this.logIdentifier()+" Cannot push to a key that is not an array! ("+p+")";if(void 0!==b[p].$position&&b[p].$each instanceof Array)for(l=b[p].$position,k=b[p].$each.length,j=0;k>j;j++)this._updateSplicePush(a[p],l+j,b[p].$each[j]);else if(b[p].$each instanceof Array)for(k=b[p].$each.length,j=0;k>j;j++)this._updatePush(a[p],b[p].$each[j]);else this._updatePush(a[p],b[p]);q=!0;break;case"$pull":if(a[p]instanceof Array){for(i=[],j=0;j<a[p].length;j++)this._match(a[p][j],b[p],d,"",{})&&i.push(j);for(k=i.length;k--;)this._updatePull(a[p],i[k]),q=!0}break;case"$pullAll":if(a[p]instanceof Array){if(!(b[p]instanceof Array))throw this.logIdentifier()+" Cannot pullAll without being given an array of values to pull! ("+p+")";if(i=a[p],k=i.length,k>0)for(;k--;){for(l=0;l<b[p].length;l++)i[k]===b[p][l]&&(this._updatePull(a[p],k),k--,q=!0);if(0>k)break}}break;case"$addToSet":if(void 0===a[p]&&this._updateProperty(a,p,[]),!(a[p]instanceof Array))throw this.logIdentifier()+" Cannot addToSet on a key that is not an array! ("+p+")";var t,u,v,w,x=a[p],y=x.length,z=!0,A=d&&d.$addToSet;for(b[p].$key?(v=!1,w=new h(b[p].$key),u=w.value(b[p])[0],delete b[p].$key):A&&A.key?(v=!1,w=new h(A.key),u=w.value(b[p])[0]):(u=this.jStringify(b[p]),v=!0),t=0;y>t;t++)if(v){if(this.jStringify(x[t])===u){z=!1;break}}else if(u===w.value(x[t])[0]){z=!1;break}z&&(this._updatePush(a[p],b[p]),q=!0);break;case"$splicePush":if(void 0===a[p]&&this._updateProperty(a,p,[]),!(a[p]instanceof Array))throw this.logIdentifier()+" Cannot splicePush with a key that is not an array! ("+p+")";if(l=b.$index,void 0===l)throw this.logIdentifier()+" Cannot splicePush without a $index integer value!";delete b.$index,l>a[p].length&&(l=a[p].length),this._updateSplicePush(a[p],l,b[p]),q=!0;break;case"$move":if(!(a[p]instanceof Array))throw this.logIdentifier()+" Cannot move on a key that is not an array! ("+p+")";for(j=0;j<a[p].length;j++)if(this._match(a[p][j],b[p],d,"",{})){var B=b.$index;if(void 0===B)throw this.logIdentifier()+" Cannot move without a $index integer value!";delete b.$index,this._updateSpliceMove(a[p],j,B),q=!0;break}break;case"$mul":this._updateMultiply(a,p,b[p]),q=!0;break;case"$rename":this._updateRename(a,p,b[p]),q=!0;break;case"$overwrite":this._updateOverwrite(a,p,b[p]),q=!0;break;case"$unset":this._updateUnset(a,p),q=!0;break;case"$clear":this._updateClear(a,p),q=!0;break;case"$pop":if(!(a[p]instanceof Array))throw this.logIdentifier()+" Cannot pop from a key that is not an array! ("+p+")";this._updatePop(a[p],b[p])&&(q=!0);break;case"$toggle":this._updateProperty(a,p,!a[p]),q=!0;break;default:a[p]!==b[p]&&(this._updateProperty(a,p,b[p]),q=!0)}else if(null!==a[p]&&"object"==typeof a[p])if(n=a[p]instanceof Array,o=b[p]instanceof Array,n||o)if(!o&&n)for(j=0;j<a[p].length;j++)r=this.updateObject(a[p][j],b[p],c,d,e+"."+p,f),q=q||r;else a[p]!==b[p]&&(this._updateProperty(a,p,b[p]),q=!0);else r=this.updateObject(a[p],b[p],c,d,e+"."+p,f),q=q||r;else a[p]!==b[p]&&(this._updateProperty(a,p,b[p]),q=!0)}return q},n.prototype._isPositionalKey=function(a){return".$"===a.substr(a.length-2,2)},n.prototype.remove=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";var d,e,f,g,h,i,j,k,l=this;if("function"==typeof b&&(c=b,b={}),this.mongoEmulation()&&this.convertToFdb(a),a instanceof Array){for(g=[],f=0;f<a.length;f++)g.push(this.remove(a[f],{noEmit:!0}));return(!b||b&&!b.noEmit)&&this._onRemove(g),c&&c(!1,g),g}if(d=this.find(a,{$decouple:!1}),d.length){h=function(a){l._removeFromIndexes(a),e=l._data.indexOf(a),l._dataRemoveAtIndex(e)};for(var m=0;m<d.length;m++)j=d[m],l.willTrigger(l.TYPE_REMOVE,l.PHASE_BEFORE)||l.willTrigger(l.TYPE_REMOVE,l.PHASE_AFTER)?(i={type:"remove"},k=l.decouple(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_BEFORE,k,k)!==!1&&(h(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_AFTER,k,k))):h(j);this.chainSend("remove",{query:a,dataSet:d},b),(!b||b&&!b.noEmit)&&this._onRemove(d),this._onChange(),this.deferEmit("change",{type:"remove",data:d})}return c&&c(!1,d),d},n.prototype.removeById=function(a){var b={};return b[this._primaryKey]=a,this.remove(b)},n.prototype.processQueue=function(a,b,c){var d,e,f=this,g=this._deferQueue[a],h=this._deferThreshold[a],i=this._deferTime[a];if(c=c||{deferred:!0},g.length){if(g.length)switch(d=g.length>h?g.splice(0,h):g.splice(0,g.length),e=f[a](d),a){case"insert":c.inserted=c.inserted||[],c.failed=c.failed||[],c.inserted=c.inserted.concat(e.inserted),c.failed=c.failed.concat(e.failed)}setTimeout(function(){f.processQueue.call(f,a,b,c)},i)}else b&&b(c);this.isProcessingQueue()||this.emit("queuesComplete")},n.prototype.isProcessingQueue=function(){var a;for(a in this._deferQueue)if(this._deferQueue.hasOwnProperty(a)&&this._deferQueue[a].length)return!0;return!1},n.prototype.insert=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return"function"==typeof b?(c=b,b=this._data.length):void 0===b&&(b=this._data.length),a=this.transformIn(a),this._insertHandle(a,b,c)},n.prototype._insertHandle=function(a,b,c){var d,e,f,g=this._deferQueue.insert,h=this._deferThreshold.insert,i=[],j=[];if(a instanceof Array){if(a.length>h)return this._deferQueue.insert=g.concat(a),void this.processQueue("insert",c);for(f=0;f<a.length;f++)d=this._insert(a[f],b+f),d===!0?i.push(a[f]):j.push({doc:a[f],reason:d})}else d=this._insert(a,b),d===!0?i.push(a):j.push({doc:a,reason:d});return this.chainSend("insert",a,{index:b}),e={deferred:!1,inserted:i,failed:j},this._onInsert(i,j),c&&c(e),this._onChange(),this.deferEmit("change",{type:"insert",data:i}),e},n.prototype._insert=function(a,b){if(a){var c,d,e,f,g=this;if(this.ensurePrimaryKey(a),c=this.insertIndexViolation(a),e=function(a){g._insertIntoIndexes(a),b>g._data.length&&(b=g._data.length),g._dataInsertAtIndex(b,a)},c)return"Index violation in index: "+c;if(g.willTrigger(g.TYPE_INSERT,g.PHASE_BEFORE)||g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)){if(d={type:"insert"},g.processTrigger(d,g.TYPE_INSERT,g.PHASE_BEFORE,{},a)===!1)return!1;e(a),g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)&&(f=g.decouple(a),g.processTrigger(d,g.TYPE_INSERT,g.PHASE_AFTER,{},f))}else e(a);return!0}return"No document passed to insert"},n.prototype._dataInsertAtIndex=function(a,b){this._data.splice(a,0,b)},n.prototype._dataRemoveAtIndex=function(a){this._data.splice(a,1)},n.prototype._dataReplace=function(a){for(;this._data.length;)this._data.pop();this._data=this._data.concat(a)},n.prototype._insertIntoIndexes=function(a){var b,c,d=this._indexByName,e=this.jStringify(a);c=this._primaryIndex.uniqueSet(a[this._primaryKey],a),this._primaryCrc.uniqueSet(a[this._primaryKey],e),this._crcLookup.uniqueSet(e,a);for(b in d)d.hasOwnProperty(b)&&d[b].insert(a);return c},n.prototype._removeFromIndexes=function(a){var b,c=this._indexByName,d=this.jStringify(a);this._primaryIndex.unSet(a[this._primaryKey]),this._primaryCrc.unSet(a[this._primaryKey]),this._crcLookup.unSet(d);for(b in c)c.hasOwnProperty(b)&&c[b].remove(a)},n.prototype._updateIndexes=function(a,b){this._removeFromIndexes(a),this._insertIntoIndexes(b)},n.prototype._rebuildIndexes=function(){var a,b=this._indexByName;for(a in b)b.hasOwnProperty(a)&&b[a].rebuild()},n.prototype.subset=function(a,b){var c=this.find(a,b);return(new n).subsetOf(this).primaryKey(this._primaryKey).setData(c)},d.synthesize(n.prototype,"subsetOf"),n.prototype.isSubsetOf=function(a){return this._subsetOf===a},n.prototype.distinct=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";var d,e,f=this.find(b,c),g=new h(a),i={},j=[];for(e=0;e<f.length;e++)d=g.value(f[e])[0],d&&!i[d]&&(i[d]=!0,j.push(d));return j},n.prototype.findById=function(a,b){var c={};return c[this._primaryKey]=a,this.find(c,b)[0]},n.prototype.peek=function(a,b){var c,d,e=this._data,f=e.length,g=new n,h=typeof a;if("string"===h){for(c=0;f>c;c++)d=this.jStringify(e[c]),d.indexOf(a)>-1&&g.insert(e[c]);return g.find({},b)}return this.find(a,b)},n.prototype.explain=function(a,b){var c=this.find(a,b);return c.__fdbOp._data},n.prototype.options=function(a){return a=a||{},a.$decouple=void 0!==a.$decouple?a.$decouple:!0,a.$explain=void 0!==a.$explain?a.$explain:!1,a},n.prototype.find=function(a,b,c){return this.mongoEmulation()&&this.convertToFdb(a),c?(c("Callbacks for the find() operation are not yet implemented!",[]),[]):this._find.apply(this,arguments)},n.prototype._find=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";a=a||{},b=this.options(b);var c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=this._metrics.create("find"),I=this.primaryKey(),J=this,K=!0,L={},M=[],N=[],O=[],P={},Q={},R=function(c){return J._match(c,a,b,"and",P)};if(H.start(),a){if(H.time("analyseQuery"),c=this._analyseQuery(J.decouple(a),b,H),H.time("analyseQuery"),H.data("analysis",c),c.hasJoin&&c.queriesJoin){for(H.time("joinReferences"),g=0;g<c.joinsOn.length;g++)k=c.joinsOn[g],j=new h(c.joinQueries[k]),i=j.value(a)[0],L[c.joinsOn[g]]=this._db.collection(c.joinsOn[g]).subset(i),delete a[c.joinQueries[k]];H.time("joinReferences")}if(c.indexMatch.length&&(!b||b&&!b.$skipIndex)?(H.data("index.potential",c.indexMatch),H.data("index.used",c.indexMatch[0].index),H.time("indexLookup"),e=c.indexMatch[0].lookup||[],H.time("indexLookup"),c.indexMatch[0].keyData.totalKeyCount===c.indexMatch[0].keyData.score&&(K=!1)):H.flag("usedIndex",!1),K&&(e&&e.length?(d=e.length,H.time("tableScan: "+d),e=e.filter(R)):(d=this._data.length,H.time("tableScan: "+d),e=this._data.filter(R)),H.time("tableScan: "+d)),b.$orderBy&&(H.time("sort"),e=this.sort(b.$orderBy,e),H.time("sort")),void 0!==b.$page&&void 0!==b.$limit&&(Q.page=b.$page,Q.pages=Math.ceil(e.length/b.$limit),Q.records=e.length,b.$page&&b.$limit>0&&(H.data("cursor",Q),e.splice(0,b.$page*b.$limit))),b.$skip&&(Q.skip=b.$skip,e.splice(0,b.$skip),H.data("skip",b.$skip)),b.$limit&&e&&e.length>b.$limit&&(Q.limit=b.$limit,e.length=b.$limit,H.data("limit",b.$limit)),b.$decouple&&(H.time("decouple"),e=this.decouple(e),H.time("decouple"),H.data("flag.decouple",!0)),b.$join){for(f=0;f<b.$join.length;f++)for(k in b.$join[f])if(b.$join[f].hasOwnProperty(k))for(w=k,l=L[k]?L[k]:this._db.collection(k),m=b.$join[f][k],x=0;x<e.length;x++){o={},q=!1,r=!1,v="";for(n in m)if(m.hasOwnProperty(n))if("$"===n.substr(0,1))switch(n){case"$where":m[n].query&&(o=m[n].query),m[n].options&&(p=m[n].options);break;case"$as":w=m[n];break;case"$multi":q=m[n];break;case"$require":r=m[n];break;case"$prefix":v=m[n]}else o[n]=J._resolveDynamicQuery(m[n],e[x]);if(s=l.find(o,p),!r||r&&s[0])if("$root"===w){if(q!==!1)throw this.logIdentifier()+' Cannot combine [$as: "$root"] with [$joinMulti: true] in $join clause!';t=s[0],u=e[x];for(C in t)t.hasOwnProperty(C)&&void 0===u[v+C]&&(u[v+C]=t[C])}else e[x][w]=q===!1?s[0]:s;else M.push(e[x])}H.data("flag.join",!0)}if(M.length){for(H.time("removalQueue"),z=0;z<M.length;z++)y=e.indexOf(M[z]),y>-1&&e.splice(y,1);H.time("removalQueue")}if(b.$transform){for(H.time("transform"),z=0;z<e.length;z++)e.splice(z,1,b.$transform(e[z]));H.time("transform"),H.data("flag.transform",!0)}this._transformEnabled&&this._transformOut&&(H.time("transformOut"),e=this.transformOut(e),H.time("transformOut")),H.data("results",e.length)}else e=[];H.time("scanFields");for(z in b)b.hasOwnProperty(z)&&0!==z.indexOf("$")&&(1===b[z]?N.push(z):0===b[z]&&O.push(z));if(H.time("scanFields"),N.length||O.length){for(H.data("flag.limitFields",!0),H.data("limitFields.on",N),H.data("limitFields.off",O),H.time("limitFields"),z=0;z<e.length;z++){G=e[z];for(A in G)G.hasOwnProperty(A)&&(N.length&&A!==I&&-1===N.indexOf(A)&&delete G[A],O.length&&O.indexOf(A)>-1&&delete G[A])}H.time("limitFields")}if(b.$elemMatch){H.data("flag.elemMatch",!0),H.time("projection-elemMatch");for(z in b.$elemMatch)if(b.$elemMatch.hasOwnProperty(z))for(D=new h(z),A=0;A<e.length;A++)if(E=D.value(e[A])[0],E&&E.length)for(B=0;B<E.length;B++)if(J._match(E[B],b.$elemMatch[z],b,"",{})){D.set(e[A],z,[E[B]]);break}H.time("projection-elemMatch")}if(b.$elemsMatch){H.data("flag.elemsMatch",!0),H.time("projection-elemsMatch");for(z in b.$elemsMatch)if(b.$elemsMatch.hasOwnProperty(z))for(D=new h(z),A=0;A<e.length;A++)if(E=D.value(e[A])[0],E&&E.length){for(F=[],B=0;B<E.length;B++)J._match(E[B],b.$elemsMatch[z],b,"",{})&&F.push(E[B]);D.set(e[A],z,F)}H.time("projection-elemsMatch")}return H.stop(),e.__fdbOp=H,e.$cursor=Q,e},n.prototype._resolveDynamicQuery=function(a,b){var c,d,e,f,g=this;if("string"==typeof a)return"$$."===a.substr(0,3)?new h(a.substr(3,a.length-3)).value(b)[0]:new h(a).value(b)[0];c={};for(f in a)if(a.hasOwnProperty(f))switch(d=typeof a[f],e=a[f],d){case"string":"$$."===e.substr(0,3)?c[f]=new h(e.substr(3,e.length-3)).value(b)[0]:c[f]=e;break;case"object":c[f]=g._resolveDynamicQuery(e,b);break;default:c[f]=e}return c},n.prototype.findOne=function(){return this.find.apply(this,arguments)[0]},n.prototype.indexOf=function(a,b){var c,d=this.find(a,{$decouple:!1})[0];return d?!b||b&&!b.$orderBy?this._data.indexOf(d):(b.$decouple=!1,c=this.find(a,b),c.indexOf(d)):-1},n.prototype.indexOfDocById=function(a,b){var c,d;return c="object"!=typeof a?this._primaryIndex.get(a):this._primaryIndex.get(a[this._primaryKey]),c?!b||b&&!b.$orderBy?this._data.indexOf(c):(b.$decouple=!1,d=this.find({},b),d.indexOf(c)):-1},n.prototype.removeByIndex=function(a){var b,c;return b=this._data[a],void 0!==b?(b=this.decouple(b),c=b[this.primaryKey()],this.removeById(c)):!1},n.prototype.transform=function(a){return void 0!==a?("object"==typeof a?(void 0!==a.enabled&&(this._transformEnabled=a.enabled),void 0!==a.dataIn&&(this._transformIn=a.dataIn),void 0!==a.dataOut&&(this._transformOut=a.dataOut)):this._transformEnabled=a!==!1,this):{enabled:this._transformEnabled,dataIn:this._transformIn,dataOut:this._transformOut}},n.prototype.transformIn=function(a){if(this._transformEnabled&&this._transformIn){if(a instanceof Array){var b,c=[];for(b=0;b<a.length;b++)c[b]=this._transformIn(a[b]);return c}return this._transformIn(a)}return a},n.prototype.transformOut=function(a){if(this._transformEnabled&&this._transformOut){if(a instanceof Array){var b,c=[];for(b=0;b<a.length;b++)c[b]=this._transformOut(a[b]);return c}return this._transformOut(a)}return a},n.prototype.sort=function(a,b){b=b||[];var c,d,e=[];for(c in a)a.hasOwnProperty(c)&&(d={},d[c]=a[c],d.___fdbKey=String(c),e.push(d));return e.length<2?this._sort(a,b):this._bucketSort(e,b)},n.prototype._bucketSort=function(a,b){var c,d,e,f,g,h,i=a.shift(),j=[];if(a.length>0){for(b=this._sort(i,b),d=this.bucket(i.___fdbKey,b),e=d.order,g=d.buckets,h=0;h<e.length;h++)f=e[h],c=[].concat(a),j=j.concat(this._bucketSort(c,g[f]));return j}return this._sort(i,b)},n.prototype._sort=function(a,b){var c,d=this,e=new h,f=e.parse(a,!0)[0];if(e.path(f.path),1===f.value)c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortAsc(c,f)};else{if(-1!==f.value)throw this.logIdentifier()+" $orderBy clause has invalid direction: "+f.value+", accepted values are 1 or -1 for ascending or descending!";c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortDesc(c,f)}}return b.sort(c)},n.prototype.bucket=function(a,b){var c,d,e,f=[],g={};for(c=0;c<b.length;c++)e=String(b[c][a]),d!==e&&(f.push(e),d=e),g[e]=g[e]||[],g[e].push(b[c]);return{buckets:g,order:f}},n.prototype._analyseQuery=function(a,b,c){var d,e,f,g,i,j,k,l,m,n,o,p={queriesOn:[this._name],indexMatch:[],hasJoin:!1,queriesJoin:!1,joinQueries:{},query:a,options:b},q=[],r=[];if(c.time("checkIndexes"),m=new h,n=m.countKeys(a)){void 0!==a[this._primaryKey]&&(c.time("checkIndexMatch: Primary Key"),p.indexMatch.push({lookup:this._primaryIndex.lookup(a,b),keyData:{matchedKeys:[this._primaryKey],totalKeyCount:n,score:1},index:this._primaryIndex}),c.time("checkIndexMatch: Primary Key"));for(o in this._indexById)if(this._indexById.hasOwnProperty(o)&&(j=this._indexById[o],k=j.name(),c.time("checkIndexMatch: "+k),i=j.match(a,b),i.score>0&&(l=j.lookup(a,b),p.indexMatch.push({lookup:l,keyData:i,index:j})),c.time("checkIndexMatch: "+k),i.score===n))break;c.time("checkIndexes"),p.indexMatch.length>1&&(c.time("findOptimalIndex"),p.indexMatch.sort(function(a,b){return a.keyData.score>b.keyData.score?-1:a.keyData.score<b.keyData.score?1:a.keyData.score===b.keyData.score?a.lookup.length-b.lookup.length:void 0}),c.time("findOptimalIndex"))}if(b.$join){for(p.hasJoin=!0,d=0;d<b.$join.length;d++)for(e in b.$join[d])b.$join[d].hasOwnProperty(e)&&(q.push(e),"$as"in b.$join[d][e]?r.push(b.$join[d][e].$as):r.push(e));for(g=0;g<r.length;g++)f=this._queryReferencesCollection(a,r[g],""),f&&(p.joinQueries[q[g]]=f,p.queriesJoin=!0);p.joinsOn=q,p.queriesOn=p.queriesOn.concat(q)}return p},n.prototype._queryReferencesCollection=function(a,b,c){var d;for(d in a)if(a.hasOwnProperty(d)){if(d===b)return c&&(c+="."),c+d;if("object"==typeof a[d])return c&&(c+="."),c+=d,this._queryReferencesCollection(a[d],b,c)}return!1},n.prototype.count=function(a,b){return a?this.find(a,b).length:this._data.length},n.prototype.findSub=function(a,b,c,d){var e,f,g,i=new h(b),j=this.find(a),k=j.length,l=this._db.collection("__FDB_temp_"+this.objectId()),m={parents:k,subDocTotal:0,subDocs:[],pathFound:!1,err:""};for(d=d||{},e=0;k>e;e++)if(f=i.value(j[e])[0]){if(l.setData(f),g=l.find(c,d),d.returnFirst&&g.length)return g[0];d.$split?m.subDocs.push(g):m.subDocs=m.subDocs.concat(g),m.subDocTotal+=g.length,m.pathFound=!0}return l.drop(),d.$stats?m:m.subDocs},n.prototype.insertIndexViolation=function(a){var b,c,d,e=this._indexByName;if(this._primaryIndex.get(a[this._primaryKey]))b=this._primaryIndex;else for(c in e)if(e.hasOwnProperty(c)&&(d=e[c],d.unique()&&d.violation(a))){b=d;break}return b?b.name():!1},n.prototype.ensureIndex=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";this._indexByName=this._indexByName||{},this._indexById=this._indexById||{};var c,d={start:(new Date).getTime()};if(b)switch(b.type){case"hashed":c=new i(a,b,this);break;case"btree":c=new j(a,b,this);break;default:c=new i(a,b,this)}else c=new i(a,b,this);return this._indexByName[c.name()]?{err:"Index with that name already exists"}:this._indexById[c.id()]?{err:"Index with those keys already exists"}:(c.rebuild(),this._indexByName[c.name()]=c,this._indexById[c.id()]=c,d.end=(new Date).getTime(),d.total=d.end-d.start,this._lastOp={type:"ensureIndex",stats:{time:d}},{index:c,id:c.id(),name:c.name(),state:c.state()})},n.prototype.index=function(a){return this._indexByName?this._indexByName[a]:void 0},n.prototype.lastOp=function(){return this._metrics.list()},n.prototype.diff=function(a){var b,c,d,e,f={insert:[],update:[],remove:[]},g=this.primaryKey();if(g!==a.primaryKey())throw this.logIdentifier()+" Diffing requires that both collections have the same primary key!";for(b=a._data;b&&!(b instanceof Array);)a=b,b=a._data;for(e=b.length,c=0;e>c;c++)d=b[c],this._primaryIndex.get(d[g])?this._primaryCrc.get(d[g])!==a._primaryCrc.get(d[g])&&f.update.push(d):f.insert.push(d);for(b=this._data,e=b.length,c=0;e>c;c++)d=b[c],a._primaryIndex.get(d[g])||f.remove.push(d);return f},n.prototype.collateAdd=new l({"object, string":function(a,b){var c=this;c.collateAdd(a,function(d){var e,f;switch(d.type){case"insert":b?(e={$push:{}},e.$push[b]=c.decouple(d.data),c.update({},e)):c.insert(d.data);break;case"update":b?(e={},f={},e[b]=d.data.query,f[b+".$"]=d.data.update,c.update(e,f)):c.update(d.data.query,d.data.update); break;case"remove":b?(e={$pull:{}},e.$pull[b]={},e.$pull[b][c.primaryKey()]=d.data.dataSet[0][a.primaryKey()],c.update({},e)):c.remove(d.data)}})},"object, function":function(a,b){if("string"==typeof a&&(a=this._db.collection(a,{autoCreate:!1,throwError:!1})),a)return this._collate=this._collate||{},this._collate[a.name()]=new m(a,this,b),this;throw"Cannot collate from a non-existent collection!"}}),n.prototype.collateRemove=function(a){if("object"==typeof a&&(a=a.name()),a)return this._collate[a].drop(),delete this._collate[a],this;throw"No collection name passed to collateRemove() or collection not found!"},e.prototype.collection=new l({"":function(){return this.$main.call(this,{name:this.objectId()})},object:function(a){return a instanceof n?"droppped"!==a.state()?a:this.$main.call(this,{name:a.name()}):this.$main.call(this,a)},string:function(a){return this.$main.call(this,{name:a})},"string, string":function(a,b){return this.$main.call(this,{name:a,primaryKey:b})},"string, object":function(a,b){return b.name=a,this.$main.call(this,b)},"string, string, object":function(a,b,c){return c.name=a,c.primaryKey=b,this.$main.call(this,c)},$main:function(a){var b=a.name;if(b){if(!this._collection[b]){if(a&&a.autoCreate===!1&&a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get collection "+b+" because it does not exist and auto-create has been disabled!";this.debug()&&console.log(this.logIdentifier()+" Creating collection "+b)}return this._collection[b]=this._collection[b]||new n(b,a).db(this),this._collection[b].mongoEmulation(this.mongoEmulation()),void 0!==a.primaryKey&&this._collection[b].primaryKey(a.primaryKey),this._collection[b]}if(!a||a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get collection with undefined name!"}}),e.prototype.collectionExists=function(a){return Boolean(this._collection[a])},e.prototype.collections=function(a){var b,c,d=[],e=this._collection;a&&(a instanceof RegExp||(a=new RegExp(a)));for(c in e)e.hasOwnProperty(c)&&(b=e[c],a?a.exec(c)&&d.push({name:c,count:b.count(),linked:void 0!==b.isLinked?b.isLinked():!1}):d.push({name:c,count:b.count(),linked:void 0!==b.isLinked?b.isLinked():!1}));return d.sort(function(a,b){return a.name.localeCompare(b.name)}),d},d.finishModule("Collection"),b.exports=n},{"./Crc":5,"./IndexBinaryTree":7,"./IndexHashMap":8,"./KeyValueStore":9,"./Metrics":10,"./Overload":22,"./Path":23,"./ReactorIO":24,"./Shared":26}],4:[function(a,b,c){"use strict";var d,e,f,g,h=[];d=a("./Shared"),g=a("./Overload");var i=function(a){this.init.apply(this,arguments)};i.prototype.init=function(a){this._db={},this._debug={},this._name=a||"ForerunnerDB",h.push(this)},i.prototype.instantiatedCount=function(){return h.length},i.prototype.instances=function(a){return void 0!==a?h[a]:h},i.prototype.namedInstances=function(a){var b,c;{if(void 0===a){for(c=[],b=0;b<h.length;b++)c.push(h[b].name);return c}for(b=0;b<h.length;b++)if(h[b].name===a)return h[b]}},i.prototype.moduleLoaded=new g({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b&&b()}},"array, function":function(a,b){var c,e;for(e=0;e<a.length;e++)if(c=a[e],void 0!==c){c=c.replace(/ /g,"");var f,g=c.split(",");for(f=0;f<g.length;f++)if(!d.modules[g[f]])return!1}b&&b()},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),i.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)?(b&&b(),!0):!1:d.version},i.moduleLoaded=i.prototype.moduleLoaded,i.version=i.prototype.version,i.instances=i.prototype.instances,i.instantiatedCount=i.prototype.instantiatedCount,i.shared=d,i.prototype.shared=d,d.addModule("Core",i),d.mixin(i.prototype,"Mixin.Common"),d.mixin(i.prototype,"Mixin.Constants"),e=a("./Db.js"),f=a("./Metrics.js"),d.synthesize(i.prototype,"name"),d.synthesize(i.prototype,"mongoEmulation"),i.prototype._isServer=!1,i.prototype.isClient=function(){return!this._isServer},i.prototype.isServer=function(){return this._isServer},i.prototype.isClient=function(){return!this._isServer},i.prototype.isServer=function(){return this._isServer},i.prototype.collection=function(){throw"ForerunnerDB's instantiation has changed since version 1.3.36 to support multiple database instances. Please see the readme.md file for the minor change you have to make to get your project back up and running, or see the issue related to this change at https://github.com/Irrelon/ForerunnerDB/issues/44"},b.exports=i},{"./Db.js":6,"./Metrics.js":10,"./Overload":22,"./Shared":26}],5:[function(a,b,c){"use strict";var d=function(){var a,b,c,d=[];for(b=0;256>b;b++){for(a=b,c=0;8>c;c++)a=1&a?3988292384^a>>>1:a>>>1;d[b]=a}return d}();b.exports=function(a){var b,c=-1;for(b=0;b<a.length;b++)c=c>>>8^d[255&(c^a.charCodeAt(b))];return(-1^c)>>>0}},{}],6:[function(a,b,c){"use strict";var d,e,f,g,h,i;d=a("./Shared"),i=a("./Overload");var j=function(a,b){this.init.apply(this,arguments)};j.prototype.init=function(a,b){this.core(b),this._primaryKey="_id",this._name=a,this._collection={},this._debug={}},d.addModule("Db",j),j.prototype.moduleLoaded=new i({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b&&b()}},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),j.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)?(b&&b(),!0):!1:d.version},j.moduleLoaded=j.prototype.moduleLoaded,j.version=j.prototype.version,j.shared=d,j.prototype.shared=d,d.addModule("Db",j),d.mixin(j.prototype,"Mixin.Common"),d.mixin(j.prototype,"Mixin.ChainReactor"),d.mixin(j.prototype,"Mixin.Constants"),d.mixin(j.prototype,"Mixin.Tags"),e=d.modules.Core,f=a("./Collection.js"),g=a("./Metrics.js"),h=a("./Crc.js"),j.prototype._isServer=!1,d.synthesize(j.prototype,"core"),d.synthesize(j.prototype,"primaryKey"),d.synthesize(j.prototype,"state"),d.synthesize(j.prototype,"name"),d.synthesize(j.prototype,"mongoEmulation"),j.prototype.isClient=function(){return!this._isServer},j.prototype.isServer=function(){return this._isServer},j.prototype.crc=h,j.prototype.isClient=function(){return!this._isServer},j.prototype.isServer=function(){return this._isServer},j.prototype.arrayToCollection=function(a){return(new f).setData(a)},j.prototype.on=function(a,b){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||[],this._listeners[a].push(b),this},j.prototype.off=function(a,b){if(a in this._listeners){var c=this._listeners[a],d=c.indexOf(b);d>-1&&c.splice(d,1)}return this},j.prototype.emit=function(a,b){if(this._listeners=this._listeners||{},a in this._listeners){var c,d=this._listeners[a],e=d.length;for(c=0;e>c;c++)d[c].apply(this,Array.prototype.slice.call(arguments,1))}return this},j.prototype.peek=function(a){var b,c,d=[],e=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],d="string"===e?d.concat(c.peek(a)):d.concat(c.find(a)));return d},j.prototype.peek=function(a){var b,c,d=[],e=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],d="string"===e?d.concat(c.peek(a)):d.concat(c.find(a)));return d},j.prototype.peekCat=function(a){var b,c,d,e={},f=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],"string"===f?(d=c.peek(a),d&&d.length&&(e[c.name()]=d)):(d=c.find(a),d&&d.length&&(e[c.name()]=d)));return e},j.prototype.drop=new i({"":function(){if(!this.isDropped()){var a,b=this.collections(),c=b.length;for(this._state="dropped",a=0;c>a;a++)this.collection(b[a].name).drop(),delete this._collection[b[a].name];this.emit("drop",this),delete this._core._db[this._name]}return!0},"function":function(a){if(!this.isDropped()){var b,c=this.collections(),d=c.length,e=0,f=function(){e++,e===d&&a&&a()};for(this._state="dropped",b=0;d>b;b++)this.collection(c[b].name).drop(f),delete this._collection[c[b].name];this.emit("drop",this),delete this._core._db[this._name]}return!0},"boolean":function(a){if(!this.isDropped()){var b,c=this.collections(),d=c.length;for(this._state="dropped",b=0;d>b;b++)this.collection(c[b].name).drop(a),delete this._collection[c[b].name];this.emit("drop",this),delete this._core._db[this._name]}return!0},"boolean, function":function(a,b){if(!this.isDropped()){var c,d=this.collections(),e=d.length,f=0,g=function(){f++,f===e&&b&&b()};for(this._state="dropped",c=0;e>c;c++)this.collection(d[c].name).drop(a,g),delete this._collection[d[c].name];this.emit("drop",this),delete this._core._db[this._name]}return!0}}),e.prototype.db=function(a){return a instanceof j?a:(a||(a=this.objectId()),this._db[a]=this._db[a]||new j(a,this),this._db[a].mongoEmulation(this.mongoEmulation()),this._db[a])},e.prototype.databases=function(a){var b,c,d,e=[];a&&(a instanceof RegExp||(a=new RegExp(a)));for(d in this._db)this._db.hasOwnProperty(d)&&(c=!0,a&&(a.exec(d)||(c=!1)),c&&(b={name:d,children:[]},this.shared.moduleExists("Collection")&&b.children.push({module:"collection",moduleName:"Collections",count:this._db[d].collections().length}),this.shared.moduleExists("CollectionGroup")&&b.children.push({module:"collectionGroup",moduleName:"Collection Groups",count:this._db[d].collectionGroups().length}),this.shared.moduleExists("Document")&&b.children.push({module:"document",moduleName:"Documents",count:this._db[d].documents().length}),this.shared.moduleExists("Grid")&&b.children.push({module:"grid",moduleName:"Grids",count:this._db[d].grids().length}),this.shared.moduleExists("Overview")&&b.children.push({module:"overview",moduleName:"Overviews",count:this._db[d].overviews().length}),this.shared.moduleExists("View")&&b.children.push({module:"view",moduleName:"Views",count:this._db[d].views().length}),e.push(b)));return e.sort(function(a,b){return a.name.localeCompare(b.name)}),e},d.finishModule("Db"),b.exports=j},{"./Collection.js":3,"./Crc.js":5,"./Metrics.js":10,"./Overload":22,"./Shared":26}],7:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=a("./BinaryTree"),g=new f,h=function(){};g.inOrder("hash");var i=function(){this.init.apply(this,arguments)};i.prototype.init=function(a,b,c){this._btree=new(h.create(2,this.sortAsc)),this._size=0,this._id=this._itemKeyHash(a,a),this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&this.collection(c),this.name(b&&b.name?b.name:this._id)},d.addModule("IndexBinaryTree",i),d.mixin(i.prototype,"Mixin.ChainReactor"),d.mixin(i.prototype,"Mixin.Sorting"),i.prototype.id=function(){return this._id},i.prototype.state=function(){return this._state},i.prototype.size=function(){return this._size},d.synthesize(i.prototype,"data"),d.synthesize(i.prototype,"name"),d.synthesize(i.prototype,"collection"),d.synthesize(i.prototype,"type"),d.synthesize(i.prototype,"unique"),i.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},i.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._btree=new(h.create(2,this.sortAsc)),this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},i.prototype.insert=function(a,b){var c,d,e=this._unique,f=this._itemKeyHash(a,this._keys);e&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),d=this._btree.get(f),void 0===d&&(d=[],this._btree.put(f,d)),d.push(a),this._size++},i.prototype.remove=function(a,b){var c,d,e,f=this._unique,g=this._itemKeyHash(a,this._keys);f&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),d=this._btree.get(g),void 0!==d&&(e=d.indexOf(a),e>-1&&(1===d.length?this._btree.del(g):d.splice(e,1),this._size--))},i.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},i.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},i.prototype.lookup=function(a){return this._data[this._itemHash(a,this._keys)]||[]},i.prototype.match=function(a,b){var c,d=new e,f=d.parseArr(this._keys),g=d.parseArr(a),h=[],i=0;for(c=0;c<f.length;c++){if(g[c]!==f[c])return{matchedKeys:[],totalKeyCount:g.length,score:0};i++,h.push(g[c])}return{matchedKeys:h,totalKeyCount:g.length,score:i}},i.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},i.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},i.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.finishModule("IndexBinaryTree"),b.exports=i},{"./BinaryTree":2,"./Path":23,"./Shared":26}],8:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a,b,c){this._crossRef={},this._size=0,this._id=this._itemKeyHash(a,a),this.data({}),this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&this.collection(c),this.name(b&&b.name?b.name:this._id)},d.addModule("IndexHashMap",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.id=function(){return this._id},f.prototype.state=function(){return this._state},f.prototype.size=function(){return this._size},d.synthesize(f.prototype,"data"),d.synthesize(f.prototype,"name"),d.synthesize(f.prototype,"collection"),d.synthesize(f.prototype,"type"),d.synthesize(f.prototype,"unique"),f.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},f.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._data={},this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},f.prototype.insert=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pushToPathValue(d[e],a)},f.prototype.update=function(a,b){},f.prototype.remove=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pullFromPathValue(d[e],a)},f.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},f.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},f.prototype.pushToPathValue=function(a,b){var c=this._data[a]=this._data[a]||[];-1===c.indexOf(b)&&(c.push(b),this._size++,this.pushToCrossRef(b,c))},f.prototype.pullFromPathValue=function(a,b){var c,d=this._data[a];c=d.indexOf(b),c>-1&&(d.splice(c,1),this._size--,this.pullFromCrossRef(b,d)),d.length||delete this._data[a]},f.prototype.pull=function(a){var b,c,d=a[this._collection.primaryKey()],e=this._crossRef[d],f=e.length;for(b=0;f>b;b++)c=e[b],this._pullFromArray(c,a);this._size--,delete this._crossRef[d]},f.prototype._pullFromArray=function(a,b){for(var c=a.length;c--;)a[c]===b&&a.splice(c,1)},f.prototype.pushToCrossRef=function(a,b){var c,d=a[this._collection.primaryKey()];this._crossRef[d]=this._crossRef[d]||[],c=this._crossRef[d],-1===c.indexOf(b)&&c.push(b)},f.prototype.pullFromCrossRef=function(a,b){var c=a[this._collection.primaryKey()];delete this._crossRef[c]},f.prototype.lookup=function(a){return this._data[this._itemHash(a,this._keys)]||[]},f.prototype.match=function(a,b){var c,d=new e,f=d.parseArr(this._keys),g=d.parseArr(a),h=[],i=0;for(c=0;c<f.length;c++){if(g[c]!==f[c])return{matchedKeys:[],totalKeyCount:g.length,score:0};i++,h.push(g[c])}return{matchedKeys:h,totalKeyCount:g.length,score:i}},f.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},f.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},f.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.finishModule("IndexHashMap"),b.exports=f},{"./Path":23,"./Shared":26}],9:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){this.init.apply(this,arguments)};e.prototype.init=function(a){this._name=a,this._data={},this._primaryKey="_id"},d.addModule("KeyValueStore",e),d.mixin(e.prototype,"Mixin.ChainReactor"),d.synthesize(e.prototype,"name"),e.prototype.primaryKey=function(a){return void 0!==a?(this._primaryKey=a,this):this._primaryKey},e.prototype.truncate=function(){return this._data={},this},e.prototype.set=function(a,b){return this._data[a]=b?b:!0,this},e.prototype.get=function(a){return this._data[a]},e.prototype.lookup=function(a){var b,c,d,e,f=a[this._primaryKey];if(f instanceof Array){for(c=f.length,e=[],b=0;c>b;b++)d=this._data[f[b]],d&&e.push(d);return e}if(f instanceof RegExp){e=[];for(b in this._data)this._data.hasOwnProperty(b)&&f.test(b)&&e.push(this._data[b]);return e}if("object"!=typeof f)return d=this._data[f],void 0!==d?[d]:[];if(f.$ne){e=[];for(b in this._data)this._data.hasOwnProperty(b)&&b!==f.$ne&&e.push(this._data[b]);return e}if(f.$in&&f.$in instanceof Array){e=[];for(b in this._data)this._data.hasOwnProperty(b)&&f.$in.indexOf(b)>-1&&e.push(this._data[b]);return e}if(f.$nin&&f.$nin instanceof Array){e=[];for(b in this._data)this._data.hasOwnProperty(b)&&-1===f.$nin.indexOf(b)&&e.push(this._data[b]);return e}if(f.$or&&f.$or instanceof Array){for(e=[],b=0;b<f.$or.length;b++)e=e.concat(this.lookup(f.$or[b]));return e}},e.prototype.unSet=function(a){return delete this._data[a],this},e.prototype.uniqueSet=function(a,b){return void 0===this._data[a]?(this._data[a]=b,!0):!1},d.finishModule("KeyValueStore"),b.exports=e},{"./Shared":26}],10:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Operation"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(){this._data=[]},d.addModule("Metrics",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.create=function(a){var b=new e(a);return this._enabled&&this._data.push(b),b},f.prototype.start=function(){return this._enabled=!0,this},f.prototype.stop=function(){return this._enabled=!1,this},f.prototype.clear=function(){return this._data=[],this},f.prototype.list=function(){return this._data},d.finishModule("Metrics"),b.exports=f},{"./Operation":21,"./Shared":26}],11:[function(a,b,c){"use strict";var d={preSetData:function(){},postSetData:function(){}};b.exports=d},{}],12:[function(a,b,c){"use strict";var d={chain:function(a){this.debug&&this.debug()&&(a._reactorIn&&a._reactorOut?console.log(a._reactorIn.logIdentifier()+' Adding target "'+a._reactorOut.instanceIdentifier()+'" to the chain reactor target list'):console.log(this.logIdentifier()+' Adding target "'+a.instanceIdentifier()+'" to the chain reactor target list')),this._chain=this._chain||[];var b=this._chain.indexOf(a);-1===b&&this._chain.push(a)},unChain:function(a){if(this.debug&&this.debug()&&(a._reactorIn&&a._reactorOut?console.log(a._reactorIn.logIdentifier()+' Removing target "'+a._reactorOut.instanceIdentifier()+'" from the chain reactor target list'):console.log(this.logIdentifier()+' Removing target "'+a.instanceIdentifier()+'" from the chain reactor target list')),this._chain){var b=this._chain.indexOf(a);b>-1&&this._chain.splice(b,1)}},chainSend:function(a,b,c){if(this._chain){var d,e,f=this._chain,g=f.length;for(e=0;g>e;e++){if(d=f[e],d._state&&(!d._state||d.isDropped()))throw console.log("Reactor Data:",a,b,c),console.log("Reactor Node:",d),"Chain reactor attempting to send data to target reactor node that is in a dropped state!";this.debug&&this.debug()&&(d._reactorIn&&d._reactorOut?console.log(d._reactorIn.logIdentifier()+' Sending data down the chain reactor pipe to "'+d._reactorOut.instanceIdentifier()+'"'):console.log(this.logIdentifier()+' Sending data down the chain reactor pipe to "'+d.instanceIdentifier()+'"')),d.chainReceive(this,a,b,c)}}},chainReceive:function(a,b,c,d){var e={sender:a,type:b,data:c,options:d};this.debug&&this.debug()&&console.log(this.logIdentifier()+"Received data from parent reactor node"),(!this._chainHandler||this._chainHandler&&!this._chainHandler(e))&&this.chainSend(e.type,e.data,e.options)}};b.exports=d},{}],13:[function(a,b,c){"use strict";var d,e=0,f=a("./Overload"),g=a("./Serialiser"),h=new g;d={serialiser:h,store:function(a,b){if(void 0!==a){if(void 0!==b)return this._store=this._store||{},this._store[a]=b,this;if(this._store)return this._store[a]}},unStore:function(a){return void 0!==a&&delete this._store[a],this},decouple:function(a,b){if(void 0!==a){if(b){var c,d=this.jStringify(a),e=[];for(c=0;b>c;c++)e.push(this.jParse(d));return e}return this.jParse(this.jStringify(a))}},jParse:function(a){return h.parse(a)},jStringify:function(a){return h.stringify(a)},objectId:function(a){var b,c=Math.pow(10,17);if(a){var d,f=0,g=a.length;for(d=0;g>d;d++)f+=a.charCodeAt(d)*c;b=f.toString(16)}else e++,b=(e+(Math.random()*c+Math.random()*c+Math.random()*c+Math.random()*c)).toString(16);return b},debug:new f([function(){return this._debug&&this._debug.all},function(a){return void 0!==a?"boolean"==typeof a?(this._debug=this._debug||{},this._debug.all=a,this.chainSend("debug",this._debug),this):this._debug&&this._debug[a]||this._db&&this._db._debug&&this._db._debug[a]||this._debug&&this._debug.all:this._debug&&this._debug.all},function(a,b){return void 0!==a?void 0!==b?(this._debug=this._debug||{},this._debug[a]=b,this.chainSend("debug",this._debug),this):this._debug&&this._debug[b]||this._db&&this._db._debug&&this._db._debug[a]:this._debug&&this._debug.all}]),classIdentifier:function(){return"ForerunnerDB."+this.className},instanceIdentifier:function(){return"["+this.className+"]"+this.name()},logIdentifier:function(){return this.classIdentifier()+": "+this.instanceIdentifier()},convertToFdb:function(a){var b,c,d,e;for(e in a)if(a.hasOwnProperty(e)&&(d=a,e.indexOf(".")>-1)){for(e=e.replace(".$","[|$|]"),c=e.split(".");b=c.shift();)b=b.replace("[|$|]",".$"),c.length?d[b]={}:d[b]=a[e],d=d[b];delete a[e]}},isDropped:function(){return"dropped"===this._state}},b.exports=d},{"./Overload":22,"./Serialiser":25}],14:[function(a,b,c){"use strict";var d={TYPE_INSERT:0,TYPE_UPDATE:1,TYPE_REMOVE:2,PHASE_BEFORE:0,PHASE_AFTER:1};b.exports=d},{}],15:[function(a,b,c){"use strict";var d=a("./Overload"),e={on:new d({"string, function":function(a,b){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a]["*"]=this._listeners[a]["*"]||[],this._listeners[a]["*"].push(b),this},"string, *, function":function(a,b,c){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a][b]=this._listeners[a][b]||[],this._listeners[a][b].push(c),this}}),once:new d({"string, function":function(a,b){var c=this,d=function(){c.off(a,d),b.apply(c,arguments)};return this.on(a,d)},"string, *, function":function(a,b,c){var d=this,e=function(){d.off(a,b,e),c.apply(d,arguments)};return this.on(a,b,e)}}),off:new d({string:function(a){return this._listeners&&this._listeners[a]&&a in this._listeners&&delete this._listeners[a],this},"string, function":function(a,b){var c,d;return"string"==typeof b?this._listeners&&this._listeners[a]&&this._listeners[a][b]&&delete this._listeners[a][b]:this._listeners&&a in this._listeners&&(c=this._listeners[a]["*"],d=c.indexOf(b),d>-1&&c.splice(d,1)),this},"string, *, function":function(a,b,c){if(this._listeners&&a in this._listeners&&b in this.listeners[a]){var d=this._listeners[a][b],e=d.indexOf(c);e>-1&&d.splice(e,1)}},"string, *":function(a,b){this._listeners&&a in this._listeners&&b in this._listeners[a]&&delete this._listeners[a][b]}}),emit:function(a,b){if(this._listeners=this._listeners||{},a in this._listeners){var c,d,e,f,g,h,i;if(this._listeners[a]["*"])for(f=this._listeners[a]["*"],d=f.length,c=0;d>c;c++)e=f[c],"function"==typeof e&&e.apply(this,Array.prototype.slice.call(arguments,1));if(b instanceof Array&&b[0]&&b[0][this._primaryKey])for(g=this._listeners[a],d=b.length,c=0;d>c;c++)if(g[b[c][this._primaryKey]])for(h=g[b[c][this._primaryKey]].length,i=0;h>i;i++)e=g[b[c][this._primaryKey]][i],"function"==typeof e&&g[b[c][this._primaryKey]][i].apply(this,Array.prototype.slice.call(arguments,1))}return this},deferEmit:function(a,b){var c,d=this;return this._noEmitDefer||this._db&&(!this._db||this._db._noEmitDefer)?this.emit.apply(this,arguments):(c=arguments,this._deferTimeout=this._deferTimeout||{},this._deferTimeout[a]&&clearTimeout(this._deferTimeout[a]),this._deferTimeout[a]=setTimeout(function(){d.debug()&&console.log(d.logIdentifier()+" Emitting "+c[0]),d.emit.apply(d,c)},1)),this}};b.exports=e},{"./Overload":22}],16:[function(a,b,c){"use strict";var d={_match:function(a,b,c,d,e){var f,g,h,i,j,k,l=d,m=typeof a,n=typeof b,o=!0;if(e=e||{},c=c||{},e.$rootQuery||(e.$rootQuery=b),e.$rootData=e.$rootData||{},"string"!==m&&"number"!==m||"string"!==n&&"number"!==n){for(k in b)if(b.hasOwnProperty(k)){if(f=!1,j=k.substr(0,2),"//"===j)continue;if(0===j.indexOf("$")&&(i=this._matchOp(k,a,b[k],c,e),i>-1)){if(i){if("or"===d)return!0}else o=i;f=!0}if(!f&&b[k]instanceof RegExp)if(f=!0,"object"===m&&void 0!==a[k]&&b[k].test(a[k])){if("or"===d)return!0}else o=!1;if(!f)if("object"==typeof b[k])if(void 0!==a[k])if(a[k]instanceof Array&&!(b[k]instanceof Array)){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else if(!(a[k]instanceof Array)&&b[k]instanceof Array){for(g=!1,h=0;h<b[k].length&&!(g=this._match(a[k],b[k][h],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else if("object"==typeof a)if(g=this._match(a[k],b[k],c,l,e)){if("or"===d)return!0}else o=!1;else if(g=this._match(void 0,b[k],c,l,e)){if("or"===d)return!0}else o=!1;else if(b[k]&&void 0!==b[k].$exists)if(g=this._match(void 0,b[k],c,l,e)){if("or"===d)return!0}else o=!1;else o=!1;else if(a&&a[k]===b[k]){if("or"===d)return!0}else if(a&&a[k]&&a[k]instanceof Array&&b[k]&&"object"!=typeof b[k]){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else o=!1;if("and"===d&&!o)return!1}}else"number"===m?a!==b&&(o=!1):a.localeCompare(b)&&(o=!1);return o},_matchOp:function(a,b,c,d,e){switch(a){case"$gt":return b>c;case"$gte":return b>=c;case"$lt":return c>b;case"$lte":return c>=b;case"$exists":return void 0===b!==c;case"$ne":return b!=c;case"$nee":return b!==c;case"$or":for(var f=0;f<c.length;f++)if(this._match(b,c[f],d,"and",e))return!0;return!1;case"$and":for(var g=0;g<c.length;g++)if(!this._match(b,c[g],d,"and",e))return!1;return!0;case"$in":if(c instanceof Array){var h,i=c,j=i.length;for(h=0;j>h;h++){if(i[h]instanceof RegExp&&i[h].test(b))return!0;if(i[h]===b)return!0}return!1}throw this.logIdentifier()+" Cannot use an $in operator on a non-array key: "+a;case"$nin":if(c instanceof Array){var k,l=c,m=l.length;for(k=0;m>k;k++)if(l[k]===b)return!1;return!0}throw this.logIdentifier()+" Cannot use a $nin operator on a non-array key: "+a;case"$distinct":e.$rootData["//distinctLookup"]=e.$rootData["//distinctLookup"]||{};for(var n in c)if(c.hasOwnProperty(n))return e.$rootData["//distinctLookup"][n]=e.$rootData["//distinctLookup"][n]||{},e.$rootData["//distinctLookup"][n][b[n]]?!1:(e.$rootData["//distinctLookup"][n][b[n]]=!0,!0);break;case"$count":var o,p,q;for(o in c)if(c.hasOwnProperty(o)&&(p=b[o],q="object"==typeof p&&p instanceof Array?p.length:0,!this._match(q,c[o],d,"and",e)))return!1;return!0}return-1}};b.exports=d},{}],17:[function(a,b,c){"use strict";var d={sortAsc:function(a,b){return"string"==typeof a&&"string"==typeof b?a.localeCompare(b):a>b?1:b>a?-1:0},sortDesc:function(a,b){return"string"==typeof a&&"string"==typeof b?b.localeCompare(a):a>b?-1:b>a?1:0}};b.exports=d},{}],18:[function(a,b,c){"use strict";var d,e={};d={tagAdd:function(a){var b,c=this,d=e[a]=e[a]||[];for(b=0;b<d.length;b++)if(d[b]===c)return!0;return d.push(c),c.on&&c.on("drop",function(){c.tagRemove(a)}),!0},tagRemove:function(a){var b,c=e[a];if(c)for(b=0;b<c.length;b++)if(c[b]===this)return c.splice(b,1),!0;return!1},tagLookup:function(a){return e[a]||[]},tagDrop:function(a,b){var c,d,e,f=this.tagLookup(a);if(c=function(){d--,b&&0===d&&b(!1)},f.length)for(d=f.length,e=f.length-1;e>=0;e--)f[e].drop(c);return!0}},b.exports=d},{}],19:[function(a,b,c){"use strict";var d=a("./Overload"),e={addTrigger:function(a,b,c,d){var e,f=this;return e=f._triggerIndexOf(a,b,c),-1===e?(f._trigger=f._trigger||{},f._trigger[b]=f._trigger[b]||{},f._trigger[b][c]=f._trigger[b][c]||[],f._trigger[b][c].push({id:a,method:d,enabled:!0}),!0):!1},removeTrigger:function(a,b,c){var d,e=this;return d=e._triggerIndexOf(a,b,c),d>-1&&e._trigger[b][c].splice(d,1),!1},enableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!0,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!0,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!0,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1?(d._trigger[b][c][e].enabled=!0,!0):!1}}),disableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!1,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!1,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!1,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1?(d._trigger[b][c][e].enabled=!1,!0):!1}}),willTrigger:function(a,b){if(this._trigger&&this._trigger[a]&&this._trigger[a][b]&&this._trigger[a][b].length){var c,d=this._trigger[a][b];for(c=0;c<d.length;c++)if(d[c].enabled)return!0}return!1},processTrigger:function(a,b,c,d,e){var f,g,h,i,j,k=this;if(k._trigger&&k._trigger[b]&&k._trigger[b][c]){for(f=k._trigger[b][c],h=f.length,g=0;h>g;g++)if(i=f[g],i.enabled){if(this.debug()){var l,m;switch(b){case this.TYPE_INSERT:l="insert";break;case this.TYPE_UPDATE:l="update";break;case this.TYPE_REMOVE:l="remove";break;default:l=""}switch(c){case this.PHASE_BEFORE:m="before";break;case this.PHASE_AFTER:m="after";break;default:m=""}}if(j=i.method.call(k,a,d,e),j===!1)return!1;if(void 0!==j&&j!==!0&&j!==!1)throw"ForerunnerDB.Mixin.Triggers: Trigger error: "+j}return!0}},_triggerIndexOf:function(a,b,c){var d,e,f,g=this;if(g._trigger&&g._trigger[b]&&g._trigger[b][c])for(d=g._trigger[b][c],e=d.length,f=0;e>f;f++)if(d[f].id===a)return f; return-1}};b.exports=e},{"./Overload":22}],20:[function(a,b,c){"use strict";var d={_updateProperty:function(a,b,c){a[b]=c,this.debug()&&console.log(this.logIdentifier()+' Setting non-data-bound document property "'+b+'"')},_updateIncrement:function(a,b,c){a[b]+=c},_updateSpliceMove:function(a,b,c){a.splice(c,0,a.splice(b,1)[0]),this.debug()&&console.log(this.logIdentifier()+' Moving non-data-bound document array index from "'+b+'" to "'+c+'"')},_updateSplicePush:function(a,b,c){a.length>b?a.splice(b,0,c):a.push(c)},_updatePush:function(a,b){a.push(b)},_updatePull:function(a,b){a.splice(b,1)},_updateMultiply:function(a,b,c){a[b]*=c},_updateRename:function(a,b,c){a[c]=a[b],delete a[b]},_updateOverwrite:function(a,b,c){a[b]=c},_updateUnset:function(a,b){delete a[b]},_updateClear:function(a,b){var c,d=a[b];if(d&&"object"==typeof d)for(c in d)d.hasOwnProperty(c)&&this._updateUnset(d,c)},_updatePop:function(a,b){var c,d=!1;if(a.length>0)if(b>0){for(c=0;b>c;c++)a.pop();d=!0}else if(0>b){for(c=0;c>b;c--)a.shift();d=!0}return d}};b.exports=d},{}],21:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(a){this.pathSolver=new e,this.counter=0,this.init.apply(this,arguments)};f.prototype.init=function(a){this._data={operation:a,index:{potential:[],used:!1},steps:[],time:{startMs:0,stopMs:0,totalMs:0,process:{}},flag:{},log:[]}},d.addModule("Operation",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.start=function(){this._data.time.startMs=(new Date).getTime()},f.prototype.log=function(a){if(a){var b=this._log.length>0?this._data.log[this._data.log.length-1].time:0,c={event:a,time:(new Date).getTime(),delta:0};return this._data.log.push(c),b&&(c.delta=c.time-b),this}return this._data.log},f.prototype.time=function(a){if(void 0!==a){var b=this._data.time.process,c=b[a]=b[a]||{};return c.startMs?(c.stopMs=(new Date).getTime(),c.totalMs=c.stopMs-c.startMs,c.stepObj.totalMs=c.totalMs,delete c.stepObj):(c.startMs=(new Date).getTime(),c.stepObj={name:a},this._data.steps.push(c.stepObj)),this}return this._data.time},f.prototype.flag=function(a,b){return void 0===a||void 0===b?void 0!==a?this._data.flag[a]:this._data.flag:void(this._data.flag[a]=b)},f.prototype.data=function(a,b,c){return void 0!==b?(this.pathSolver.set(this._data,a,b),this):this.pathSolver.get(this._data,a)},f.prototype.pushData=function(a,b,c){this.pathSolver.push(this._data,a,b)},f.prototype.stop=function(){this._data.time.stopMs=(new Date).getTime(),this._data.time.totalMs=this._data.time.stopMs-this._data.time.startMs},d.finishModule("Operation"),b.exports=f},{"./Path":23,"./Shared":26}],22:[function(a,b,c){"use strict";var d=function(a){if(a){var b,c,d,e,f,g,h=this;if(!(a instanceof Array)){d={};for(b in a)if(a.hasOwnProperty(b))if(e=b.replace(/ /g,""),-1===e.indexOf("*"))d[e]=a[b];else for(g=this.generateSignaturePermutations(e),f=0;f<g.length;f++)d[g[f]]||(d[g[f]]=a[b]);a=d}return function(){var d,e,f,g=[];if(a instanceof Array){for(c=a.length,b=0;c>b;b++)if(a[b].length===arguments.length)return h.callExtend(this,"$main",a,a[b],arguments)}else{for(b=0;b<arguments.length&&(e=typeof arguments[b],"object"===e&&arguments[b]instanceof Array&&(e="array"),1!==arguments.length||"undefined"!==e);b++)g.push(e);if(d=g.join(","),a[d])return h.callExtend(this,"$main",a,a[d],arguments);for(b=g.length;b>=0;b--)if(d=g.slice(0,b).join(","),a[d+",..."])return h.callExtend(this,"$main",a,a[d+",..."],arguments)}throw f="function"==typeof this.name?this.name():"Unknown",'ForerunnerDB.Overload "'+f+'": Overloaded method does not have a matching signature for the passed arguments: '+this.jStringify(g)}}return function(){}};d.prototype.generateSignaturePermutations=function(a){var b,c,d=[],e=["string","object","number","function","undefined"];if(a.indexOf("*")>-1)for(c=0;c<e.length;c++)b=a.replace("*",e[c]),d=d.concat(this.generateSignaturePermutations(b));else d.push(a);return d},d.prototype.callExtend=function(a,b,c,d,e){var f,g;return a&&c[b]?(f=a[b],a[b]=c[b],g=d.apply(a,e),a[b]=f,g):d.apply(a,e)},b.exports=d},{}],23:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){this.init.apply(this,arguments)};e.prototype.init=function(a){a&&this.path(a)},d.addModule("Path",e),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),e.prototype.path=function(a){return void 0!==a?(this._path=this.clean(a),this._pathParts=this._path.split("."),this):this._path},e.prototype.hasObjectPaths=function(a,b){var c,d=!0;for(c in a)if(a.hasOwnProperty(c)){if(void 0===b[c])return!1;if("object"==typeof a[c]&&(d=this.hasObjectPaths(a[c],b[c]),!d))return!1}return d},e.prototype.countKeys=function(a){var b,c=0;for(b in a)a.hasOwnProperty(b)&&void 0!==a[b]&&("object"!=typeof a[b]?c++:c+=this.countKeys(a[b]));return c},e.prototype.countObjectPaths=function(a,b){var c,d,e={},f=0,g=0;for(d in b)b.hasOwnProperty(d)&&("object"==typeof b[d]?(c=this.countObjectPaths(a[d],b[d]),e[d]=c.matchedKeys,g+=c.totalKeyCount,f+=c.matchedKeyCount):(g++,a&&a[d]&&"object"!=typeof a[d]?(e[d]=!0,f++):e[d]=!1));return{matchedKeys:e,matchedKeyCount:f,totalKeyCount:g}},e.prototype.parse=function(a,b){var c,d,e,f=[],g="";for(d in a)if(a.hasOwnProperty(d))if(g=d,"object"==typeof a[d])if(b)for(c=this.parse(a[d],b),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path,value:c[e].value});else for(c=this.parse(a[d]),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path});else b?f.push({path:g,value:a[d]}):f.push({path:g});return f},e.prototype.parseArr=function(a,b){return b=b||{},this._parseArr(a,"",[],b)},e.prototype._parseArr=function(a,b,c,d){var e,f="";b=b||"",c=c||[];for(e in a)a.hasOwnProperty(e)&&(!d.ignore||d.ignore&&!d.ignore.test(e))&&(f=b?b+"."+e:e,"object"==typeof a[e]?(d.verbose&&c.push(f),this._parseArr(a[e],f,c,d)):c.push(f));return c},e.prototype.value=function(a,b){if(void 0!==a&&"object"==typeof a){var c,d,e,f,g,h,i,j=[];for(void 0!==b&&(b=this.clean(b),c=b.split(".")),d=c||this._pathParts,e=d.length,f=a,h=0;e>h;h++){if(f=f[d[h]],g instanceof Array){for(i=0;i<g.length;i++)j=j.concat(this.value(g,i+"."+d[h]));return j}if(!f||"object"!=typeof f)break;g=f}return[f]}return[]},e.prototype.set=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;b=this.clean(b),d=b.split("."),e=d.shift(),d.length?(a[e]=a[e]||{},this.set(a[e],d.join("."),c)):a[e]=c}return a},e.prototype.get=function(a,b){return this.value(a,b)[0]},e.prototype.push=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;if(b=this.clean(b),d=b.split("."),e=d.shift(),d.length)a[e]=a[e]||{},this.set(a[e],d.join("."),c);else{if(a[e]=a[e]||[],!(a[e]instanceof Array))throw"ForerunnerDB.Path: Cannot push to a path whose endpoint is not an array!";a[e].push(c)}}return a},e.prototype.keyValue=function(a,b){var c,d,e,f,g,h,i;for(void 0!==b&&(b=this.clean(b),c=b.split(".")),d=c||this._pathParts,e=d.length,f=a,i=0;e>i;i++){if(f=f[d[i]],!f||"object"!=typeof f){h=d[i]+":"+f;break}g=f}return h},e.prototype.set=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;b=this.clean(b),d=b.split("."),e=d.shift(),d.length?(a[e]=a[e]||{},this.set(a[e],d.join("."),c)):a[e]=c}return a},e.prototype.clean=function(a){return"."===a.substr(0,1)&&(a=a.substr(1,a.length-1)),a},d.finishModule("Path"),b.exports=e},{"./Shared":26}],24:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a,b,c){if(!(a&&b&&c))throw"ForerunnerDB.ReactorIO: ReactorIO requires in, out and process arguments to instantiate!";if(this._reactorIn=a,this._reactorOut=b,this._chainHandler=c,!a.chain||!b.chainReceive)throw"ForerunnerDB.ReactorIO: ReactorIO requires passed in and out objects to implement the ChainReactor mixin!";a.chain(this),this.chain(b)};d.addModule("ReactorIO",e),e.prototype.drop=function(){return this.isDropped()||(this._state="dropped",this._reactorIn&&this._reactorIn.unChain(this),this._reactorOut&&this.unChain(this._reactorOut),delete this._reactorIn,delete this._reactorOut,delete this._chainHandler,this.emit("drop",this)),!0},d.synthesize(e.prototype,"state"),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),d.mixin(e.prototype,"Mixin.Events"),d.finishModule("ReactorIO"),b.exports=e},{"./Shared":26}],25:[function(a,b,c){"use strict";var d=function(){this.init.apply(this,arguments)};d.prototype.init=function(){this._encoder=[],this._decoder={},this.registerEncoder("$date",function(a){return a instanceof Date?a.toISOString():void 0}),this.registerDecoder("$date",function(a){return new Date(a)})},d.prototype.registerEncoder=function(a,b){this._encoder.push(function(c){var d,e=b(c);return void 0!==e&&(d={},d[a]=e),d})},d.prototype.registerDecoder=function(a,b){this._decoder[a]=b},d.prototype._encode=function(a){for(var b,c=this._encoder.length;c--&&!b;)b=this._encoder[c](a);return b},d.prototype.parse=function(a){return this._parse(JSON.parse(a))},d.prototype._parse=function(a,b){var c;if("object"==typeof a&&null!==a){b=a instanceof Array?b||[]:b||{};for(c in a)if(a.hasOwnProperty(c)){if("$"===c.substr(0,1)&&this._decoder[c])return this._decoder[c](a[c]);b[c]=this._parse(a[c],b[c])}}else b=a;return b},d.prototype.stringify=function(a){return JSON.stringify(this._stringify(a))},d.prototype._stringify=function(a,b){var c,d;if("object"==typeof a&&null!==a){if(c=this._encode(a))return c;b=a instanceof Array?b||[]:b||{};for(d in a)a.hasOwnProperty(d)&&(b[d]=this._stringify(a[d],b[d]))}else b=a;return b},b.exports=d},{}],26:[function(a,b,c){"use strict";var d=a("./Overload"),e={version:"1.3.412",modules:{},plugins:{},_synth:{},addModule:function(a,b){this.modules[a]=b,this.emit("moduleLoad",[a,b])},finishModule:function(a){if(!this.modules[a])throw"ForerunnerDB.Shared: finishModule called on a module that has not been registered with addModule(): "+a;this.modules[a]._fdbFinished=!0,this.modules[a].prototype?this.modules[a].prototype.className=a:this.modules[a].className=a,this.emit("moduleFinished",[a,this.modules[a]])},moduleFinished:function(a,b){this.modules[a]&&this.modules[a]._fdbFinished?b&&b(a,this.modules[a]):this.on("moduleFinished",b)},moduleExists:function(a){return Boolean(this.modules[a])},mixin:new d({"object, string":function(a,b){var c;if("string"==typeof b&&(c=this.mixins[b],!c))throw"ForerunnerDB.Shared: Cannot find mixin named: "+b;return this.$main.call(this,a,c)},"object, *":function(a,b){return this.$main.call(this,a,b)},$main:function(a,b){if(b&&"object"==typeof b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}}),synthesize:function(a,b,c){if(this._synth[b]=this._synth[b]||function(a){return void 0!==a?(this["_"+b]=a,this):this["_"+b]},c){var d=this;a[b]=function(){var a,e=this.$super;return this.$super=d._synth[b],a=c.apply(this,arguments),this.$super=e,a}}else a[b]=this._synth[b]},overload:d,mixins:{"Mixin.Common":a("./Mixin.Common"),"Mixin.Events":a("./Mixin.Events"),"Mixin.ChainReactor":a("./Mixin.ChainReactor"),"Mixin.CRUD":a("./Mixin.CRUD"),"Mixin.Constants":a("./Mixin.Constants"),"Mixin.Triggers":a("./Mixin.Triggers"),"Mixin.Sorting":a("./Mixin.Sorting"),"Mixin.Matching":a("./Mixin.Matching"),"Mixin.Updating":a("./Mixin.Updating"),"Mixin.Tags":a("./Mixin.Tags")}};e.mixin(e,"Mixin.Events"),b.exports=e},{"./Mixin.CRUD":11,"./Mixin.ChainReactor":12,"./Mixin.Common":13,"./Mixin.Constants":14,"./Mixin.Events":15,"./Mixin.Matching":16,"./Mixin.Sorting":17,"./Mixin.Tags":18,"./Mixin.Triggers":19,"./Mixin.Updating":20,"./Overload":22}],27:[function(a,b,c){Array.prototype.filter||(Array.prototype.filter=function(a){if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=[],e=arguments.length>=2?arguments[1]:void 0,f=0;c>f;f++)if(f in b){var g=b[f];a.call(e,g,f,b)&&d.push(g)}return d}),"function"!=typeof Object.create&&(Object.create=function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}()),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null===this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);e>c;){if(c in d&&d[c]===a)return c;c++}return-1}),b.exports={}},{}]},{},[1]);
public/js/jquery.min.js
kuzua001/sharer-zf2
/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license //@ sourceMappingURL=jquery-1.10.2.min.map */ (function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t }({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
__tests__/index.android.js
tugberka/tubi-weather
import 'react-native'; import React from 'react'; import Index from '../index.android.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
src/js/utils/reduxFormValidators.js
knowncitizen/tripleo-ui
/** * Copyright 2017 Red Hat Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. You may obtain * a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ import React from 'react'; import Validators from 'redux-form-validators'; import { FormattedMessage } from 'react-intl'; export const setupReduxFormValidators = () => { Validators.formatMessage = msg => <FormattedMessage {...msg.props || msg} />; };
ajax/libs/inferno-compat/1.0.0-alpha6/inferno-compat.min.js
joeyparrish/cdnjs
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.InfernoCompat=e.InfernoCompat||{})}(this,function(e){"use strict";function n(e){return e instanceof Array}function t(e){var n=e.component;return!s(n.prototype)&&!s(n.prototype.render)}function r(e){return u(e)||c(e)}function o(e){return s(e)||f(e)}function i(e){return f(e)||e===!1||p(e)||s(e)}function l(e){return"function"==typeof e}function a(e){return"o"===e[0]&&"n"===e[1]&&e.length>3}function u(e){return"string"==typeof e}function c(e){return"number"==typeof e}function f(e){return null===e}function p(e){return e===!0}function s(e){return void 0===e}function d(e){return"object"==typeof e}function v(e){throw e||(e=Yn),new Error("Inferno Error: "+e)}function m(e){var n=e.bp,t=n.staticVElement,r=_(t.tag,null,null,e.key,null,null),o=n.v0,i=t.children,l=t.props;if(f(i)||(r.children=i),f(l)||(r.props=l),!f(o)){h(r,e,o,e.v0,n.d0);var a=n.v1;if(!f(a)){h(r,e,a,e.v1,n.d1);var u=n.v2;if(!f(u)){h(r,e,u,e.v2,n.d2);var c=n.v3;if(!f(c))for(var p=e.v3,s=n.d3,d=n.v3,v=0;v<d.length;v++)h(r,e,d[v],p[v],s[v])}}}return r}function h(e,n,t,r,i){switch(t){case zn.CHILDREN:e.childrenType=i,o(e.children)&&(e.children=r);break;case zn.PROP_CLASS_NAME:e.props||(e.props={className:r});break;case zn.PROP_DATA:e.props||(e.props={}),e.props["data-"+i]=r;break;case zn.PROP_STYLE:e.props||(e.props={style:r});break;case zn.PROP_VALUE:e.props||(e.props={value:r});break;case zn.PROP:e.props||(e.props={}),e.props[i]=r;break;case zn.PROP_REF:e.ref=r;break;case zn.PROP_SPREAD:e.props||(e.props=r)}}function y(e,t){for(var r=[],i=arguments.length-2;i-- >0;)r[i]=arguments[i+2];r.length>0&&!f(r[0])?(t||(t={}),1===r.length&&(r=r[0]),s(t.children)?t.children=r:n(r)?n(t.children)?t.children=t.children.concat(r):t.children=[t.children].concat(r):n(t.children)?t.children.push(r):(t.children=[t.children],t.children.push(r))):r=null;var l;return n(e)?l=e.map(function(e){return y(e)}):o(t)&&o(r)?l=Object.assign({},e):N(e)?l=E(e.component,Object.assign({},e.props,t),e.key,e.hooks,e.ref):x(e)?l=_(e.tag,Object.assign({},e.props,t),t&&t.children||r||e.children,e.key,e.ref,$n.UNKNOWN):P(e)&&(l=y(m(e),t,r)),l.dom=null,l}function g(e,n,t,r,o,i,l,a,u){return{clone:null,d0:t,d1:o,d2:l,d3:u,pools:{nonKeyed:[],keyed:new Map},staticVElement:e,type:Xn.OPT_BLUEPRINT,v0:n,v1:r,v2:i,v3:a}}function E(e,n,t,r,o){return{component:e,dom:null,hooks:r||null,instance:null,key:t,props:n,ref:o||null,type:Xn.COMPONENT}}function b(e){return{dom:null,text:e,type:Xn.TEXT}}function _(e,n,t,r,o,i){return{children:t,childrenType:i||$n.UNKNOWN,dom:null,key:r,props:n,ref:o||null,tag:e,type:Xn.ELEMENT}}function k(e,n,t){return{children:t,props:n,tag:e,type:Xn.ELEMENT}}function C(e,n){return{children:e,childrenType:n||$n.UNKNOWN,dom:null,pointer:null,type:Xn.FRAGMENT}}function O(){return{dom:null,type:Xn.PLACEHOLDER}}function x(e){return e.type===Xn.ELEMENT}function P(e){return e.type===Xn.OPT_ELEMENT}function N(e){return e.type===Xn.COMPONENT}function S(e){return e.type===Xn.TEXT}function T(e){return e.type===Xn.FRAGMENT}function w(e){return e.type===Xn.PLACEHOLDER}function A(e){return!s(e.type)}function R(e){return e===$n.UNKNOWN}function I(e){return e===$n.KEYED}function M(e){return e===$n.NON_KEYED}function D(e){return e===$n.TEXT}function L(e){return e===$n.NODE}function U(e,n,t,r,o){var i=e.bp,l=e.key,a=null===l?i.pools.nonKeyed:i.pools.keyed.get(l);if(!s(a)){var u=a.pop();if(!s(u))return ne(u,e,null,n,t,r,o),e.dom}return null}function j(e){var n=e.bp,t=e.key,r=n.pools;if(f(t))r.nonKeyed.push(e);else{var o=r.keyed.get(t);s(o)&&(o=[],r.keyed.set(t,o)),o.push(e)}}function W(e,n,t,r,o){var i=e.component,l=e.key,a=Jn.get(i);if(!s(a)){var u=null===l?a.nonKeyed:a.keyed.get(l);if(!s(u)){var c=u.pop();if(!s(c)){var f=ie(c,e,null,n,t,r,o);if(!f)return e.dom}}}return null}function V(e){var n=e.component,t=e.key,r=Jn.get(n);if(s(r)&&(r={nonKeyed:[],keyed:new Map},Jn.set(n,r)),f(t))r.nonKeyed.push(e);else{var o=r.keyed.get(t);s(o)&&(o=[],r.keyed.set(t,o)),o.push(e)}}function K(e,n,t,r,o){i(e)||(P(e)?G(e,n,t,r,o):N(e)?q(e,n,t,r,o):x(e)?X(e,n,t,o):T(e)?B(e,n,!0,t,o):S(e)?F(e,n):w(e)&&H(e,n))}function H(e,n){n&&we(n,e.dom)}function F(e,n){n&&we(n,e.dom)}function G(e,n,t,r,o){var i=e.bp,l=i.v0;i.dom;if(!o&&!f(l)){Y(e,l,e.v0,t);var a=i.v1;if(!f(a)){Y(e,a,e.v1,t);var u=i.v2;f(u)||Y(e,u,e.v2,t)}}f(n)||n.removeChild(e.dom),Zn&&(n||r)&&j(e)}function Y(e,n,t,r){switch(n){case zn.CHILDREN:z(t,r);break;case zn.PROP_REF:$(t);break;case zn.PROP_SPREAD:Z(t,r)}}function B(e,n,t,r,o){var i=e.children,l=i.length,a=e.pointer;if(!o&&l>0)for(var u=0;u<l;u++){var c=i[u];T(c)?B(c,n,!0,r,!1):K(c,n,r,!1)}n&&t&&we(n,a)}function q(e,n,t,r,i){if(!i){var l=e.instance,a=null,u=null;if(e.unmounted=!0,!o(l)){var c=e.ref;c&&c(null),a=l.hooks,u=l.children,void 0!==l.render?(l.componentWillUnmount(),l._unmounted=!0,at.delete(l),K(l._lastInput,null,t,!1)):K(l,null,t,!1)}var f=e.hooks||a;o(f)||o(f.onComponentWillUnmount)||f.onComponentWillUnmount(f)}n&&we(n,e.dom),Zn&&(n||r)&&V(e)}function X(e,n,t,r){var i=(e.hooks,e.dom),l=e.ref;if(!r){l&&$(l);var a=e.children;o(a)||z(a,t)}n&&we(n,i)}function z(e,t){if(n(e))for(var r=0;r<e.length;r++){var o=e[r];d(o)&&K(o,null,t,!1)}else d(e)&&K(e,null,t,!1)}function $(e){l(e)?e(null):v()}function Z(e,n){for(var t in e){var r=e[t];"ref"===t&&$(r)}}function J(e,n,t,r,o,i,l){Ne(t,je(n,null,r,o,i,l),e.dom),K(e,null,r,!1,l)}function Q(e,n,t,r,o,i,l){e!==n&&(P(n)?P(e)?ne(e,n,t,r,o,i,l):(Ne(t,Be(n,null,r,o,i,l),e.dom),K(e,null,r,!1,l)):P(e)?J(e,n,t,r,o,i,l):N(n)?N(e)?ie(e,n,t,r,o,i,l):(Ne(t,Je(n,null,r,o,i,l),e.dom),K(e,null,r,!1,l)):N(e)?J(e,n,t,r,o,i,l):x(n)?x(e)?ee(e,n,t,r,o,i,l):(Ne(t,Ve(n,null,r,o,i,l),e.dom),K(e,null,r,!1,l)):T(n)?T(e)?ue(e,n,t,r,o,i,l):(Ne(t,Ke(n,null,r,o,i,l),e.dom),K(e,null,r,!1,l)):T(e)?Ce(t,e,je(n,null,r,o,i,l),r,l):x(e)?J(e,n,t,r,o,i,l):S(n)?S(e)?le(e,n,!1,l):(Ne(t,Ye(n,null),e.dom),K(e,null,r,!1,l)):S(e)?Ne(t,je(n,null,r,o,i,l),e.dom):w(n)?w(e)?ae(e,n):(Ne(t,We(n,null),e.dom),K(e,null,r,!1,l)):w(e)?Ne(t,je(n,null,r,o,i,l),e.dom):v())}function ee(e,n,t,r,o,i,l){var a=n.tag,u=e.tag;if("svg"===a&&(i=!0),u!==a)Pe(e,n,t,r,o,i,l);else{var c=e.dom,f=e.props,p=n.props,s=e.children,d=n.children;if(n.dom=c,s!==d){var v=e.childrenType,m=n.childrenType;v===m?re(v,s,d,c,r,o,i,l):oe(s,d,c,r,o,i,l)}if(f!==p){var h=de(f,p,c,l);"select"===a&&Le(c,h)}}}function ne(e,n,t,r,o,i,l){var a=e.dom,u=e.bp,c=n.bp;if(n.dom=a,u!==c){var p=Be(n,null,r,o,i,l);Ne(t,p,a),K(e,null,r,!0,l)}else{var s=c.v0,d=c.staticVElement.tag,v=!1;if("svg"===d?i=!0:"input"===d?(Ue(a),v=!0):"select"===d||"textarea"===d&&(v=!0),!f(s)){var m=e.v0,h=n.v0,y=c.v1;if((m!==h||v)&&te(s,m,h,c.d0,a,r,o,i,l),!f(y)){var g=e.v1,E=n.v1,b=c.v2;if((g!==E||v)&&te(y,g,E,c.d1,a,r,o,i,l),!f(b)){var _=e.v2,k=n.v2,C=c.v3;if((_!==k||v)&&te(b,_,k,c.d2,a,r,o,i,l),!f(C))for(var O=c.d3,x=e.v3,P=n.v3,N=0;N<x.length;N++){var S=x[N],T=P[N];(S!==T||v)&&te(C[N],S,T,O[N],a,r,o,i,l)}}}}"select"===d&&Le(a,Oe(n,zn.PROP_VALUE))}}function te(e,n,t,r,i,l,a,u,c){switch(e){case zn.CHILDREN:re(r,n,t,i,l,a,u,c);break;case zn.PROP_CLASS_NAME:o(t)?i.removeAttribute("class"):u?i.setAttribute("class",t):i.className=t;break;case zn.PROP_DATA:i.dataset[r]=t;break;case zn.PROP_STYLE:ve(n,t,i);break;case zn.PROP_VALUE:i.value=o(t)?"":t;break;case zn.PROP:se(r,n,t,i);break;case zn.SPREAD:de(n,t,i,c)}}function re(e,n,t,r,o,i,l,a){D(e)?be(r,t):L(e)?Q(n,t,r,o,i,l,a):I(e)?fe(n,t,r,o,i,l,null,a):M(e)?ce(n,t,r,o,i,l,null,!1,a):R(e)?oe(n,t,r,o,i,l,a):v()}function oe(e,t,o,l,a,u,c){if(i(t))i(e)||Re(o,e,l,c);else if(i(e))r(t)?Ee(o,t):i(t)||(n(t)?Ze(t,o,l,a,u,c):je(t,o,l,a,u,c));else if(A(e)&&A(t))Q(e,t,o,l,a,u,c);else if(r(t))r(e)?be(o,t):Ee(o,t);else if(r(e)){var f=Se(e);f.dom=o.firstChild,oe(f,t,o,l,a,u,c)}else n(t)?n(e)?(t.complex=e.complex,Me(e,t)?fe(e,t,o,l,a,u,null,c):ce(e,t,o,l,a,u,null,!0,c)):ce([e],t,o,l,a,u,null,!0,c):n(e)?ce(e,[t],o,l,a,u,null,!0,c):v()}function ie(e,n,r,l,a,u,c){var p=e.component,s=n.component,d=n.props||{};if(p!==s){if(t(n)){var v=e.instance,m=ye(s,d,a,u),h=v._lastInput||v,y=m._lastInput,g=n.ref;m._vComponent=n,n.instance=m,Q(h,y,r,l,m._childContext,u,!0),Qe(g,m,l),n.dom=y.dom,at.set(m,y.dom)}else{var E=e.instance._lastInput||e.instance,b=ge(s,d,a);Q(E,b,r,l,a,u,!0);var _=n.dom=b.dom;n.instance=b,en(n.hooks,_,l)}K(e,null,l,!1,c)}else if(t(n)){var k=e.instance;if(k._unmounted){if(f(r))return!0;Ne(r,Je(n,null,l,a,u,c),e.dom)}else{var C=k.props,x=k.state,P=k.state,N=k.getChildContext();n.instance=k,k.context=a,o(N)||(a=Object.assign({},a,N));var S=k._lastInput,T=k._updateComponent(x,P,C,d);T===Gn?T=S:i(T)&&(T=O()),k._lastInput=T,k._vComponent=n,k._lastInput=T,Q(S,T,r,l,a,u,c),k.componentDidUpdate(C,x),n.dom=T.dom,at.set(k,T.dom)}}else{var w=!0,A=e.props,R=n.hooks,I=!o(R),M=e.instance;if(n.dom=e.dom,n.instance=M,I&&!o(R.onComponentShouldUpdate)&&(w=R.onComponentShouldUpdate(A,d)),w!==!1){I&&!o(R.onComponentWillUpdate)&&R.onComponentWillUpdate(A,d);var D=s(d,a);if(D===Gn)return!1;i(D)&&(D=O()),Q(M,D,r,l,a,u,c),n.instance=D,I&&!o(R.onComponentDidUpdate)&&R.onComponentDidUpdate(A,d)}}return!1}function le(e,n){var t=n.text,r=e.dom;n.dom=r,e.text!==t&&(r.nodeValue=t)}function ae(e,n){n.dom=e.dom}function ue(e,n,t,r,o,i,l){var a=e.children,u=n.children,c=e.pointer;if(n.dom=e.dom,n.pointer=c,!a!==u){var f=e.childrenType,p=n.childrenType;if(f===p){if(I(p))return fe(a,u,t,r,o,i,n,l);if(M(p))return ce(a,u,t,r,o,i,n,!1,l)}Me(a,u)?fe(a,u,t,r,o,i,n,l):ce(a,u,t,r,o,i,n,!0,l)}}function ce(e,n,t,r,o,i,l,a,u){for(var c=e.length,f=n.length,p=c>f?f:c,s=0;s<p;s++){var d=e[s],v=a?Te(n,s):n[s];Q(d,v,t,r,o,i,u)}if(c<f)for(s=p;s<f;s++){var m=Te(n,s);ke(t,je(m,null,r,o,i,u),l&&l.pointer)}else if(c>f)for(s=p;s<c;s++)K(e[s],t,r,!1,u)}function fe(e,n,t,r,o,i,l,a){var u,c,p,d,v,m=e.length,h=n.length,y=m-1,g=h-1,E=0,b=0,_=e[E],k=n[b],C=e[y],O=n[g],x=null,P=null;if(0===m)return void(0!==h&&ze(n,t,r,o,i,a));if(0===h)return void(0!==m&&Re(t,e,r,a));e:for(;;){for(;_.key===k.key;){if(Q(_,k,t,r,o,i,a),E++,b++,E>y||b>g)break e;_=e[E],k=n[b]}for(;C.key===O.key;){if(Q(C,O,t,r,o,i,a),y--,g--,E>y||b>g)break e;C=e[y],O=n[g]}if(C.key!==k.key){if(_.key!==O.key)break;if(Q(_,O,t,r,o,i,a),d=g+1,p=d<n.length?n[d].dom:l&&l.pointer,ke(t,O.dom,p),E++,g--,E>y||b>g)break;_=e[E],O=n[g]}else{if(Q(C,k,t,r,o,i,a),ke(t,k.dom,_.dom),y--,b++,E>y||b>g)break;C=e[y],k=n[b]}}if(E>y){if(b<=g)for(d=g+1,p=d<n.length?n[d].dom:l&&l.pointer;b<=g;)ke(t,je(n[b++],null,r,o,i,a),p)}else if(b>g)for(;E<=y;)K(e[E++],t,r,!1,a);else{m=y-E+1,h=g-b+1;var N=e,S=new Array(h);for(u=0;u<h;u++)S[u]=-1;var T=!1,w=0,A=0;if(h<=4||m*h<=16){for(u=E;u<=y;u++)if(x=e[u],A<h)for(c=b;c<=g;c++)if(P=n[c],x.key===P.key){S[c-b]=u,w>c?T=!0:w=c,Q(x,P,t,r,o,i,a),A++,N[u]=null;break}}else{var R=new Map;for(u=b;u<=g;u++)v=n[u],R.set(v.key,u);for(u=E;u<=y;u++)x=e[u],A<h&&(c=R.get(x.key),s(c)||(P=n[c],S[c-b]=u,w>c?T=!0:w=c,Q(x,P,t,r,o,i,a),A++,N[u]=null))}if(m===e.length&&0===A)for(Re(t,e,r);b<h;)ke(t,je(n[b++],null,r,o,i,a),null);else{for(u=m-A;u>0;)x=N[E++],f(x)||(K(x,t,r,!1,a),u--);if(T){var I=pe(S);for(c=I.length-1,u=h-1;u>=0;u--)S[u]===-1?(w=u+b,v=n[w],d=w+1,p=d<n.length?n[d].dom:l&&l.pointer,ke(t,je(v,t,r,o,i,a),p)):c<0||u!==I[c]?(w=u+b,v=n[w],d=w+1,p=d<n.length?n[d].dom:l&&l.pointer,ke(t,v.dom,p)):c--}else if(A!==h)for(u=h-1;u>=0;u--)S[u]===-1&&(w=u+b,v=n[w],d=w+1,p=d<n.length?n[d].dom:l&&l.pointer,ke(t,je(v,null,r,o,i,a),p))}}}function pe(e){var n=e.slice(0),t=[];t.push(0);var r,o,i,l,a;for(r=0;r<e.length;r++)if(e[r]!==-1)if(o=t[t.length-1],e[o]<e[r])n[r]=o,t.push(r);else{for(i=0,l=t.length-1;i<l;)a=(i+l)/2|0,e[t[a]]<e[r]?i=a+1:l=a;e[r]<e[t[i]]&&(i>0&&(n[r]=t[i-1]),t[i]=r)}for(i=t.length,l=t[i-1];i-- >0;)t[i]=l,l=n[l];return t}function se(e,n,t,r){if(tt[e])r[e]=o(t)?"":t;else if(rt[e])r[e]=!!t;else if(n!==t){if(o(t))return r.removeAttribute(e),!1;if("className"===e)return r.className=t,!1;if("style"===e)ve(n,t,r);else{if("defaultChecked"===e)return f(n)&&r.addAttribute("checked"),!1;if("defaultValue"===e)return f(n)&&r.setAttribute("value",t),!1;if(a(e))r[e.toLowerCase()]=t;else if("dangerouslySetInnerHTML"===e){var i=n&&n.__html,l=t&&t.__html;o(l)&&v(),i!==l&&(r.innerHTML=l)}else if("childrenType"!==e&&"ref"!==e&&"key"!==e){var u=ot[e];return u?r.setAttributeNS(u,e,t):r.setAttribute(e,t),!1}}}return!0}function de(e,n,t,r){e=e||{},n=n||{};var i;for(var l in n){var a=n[l],u=e[l];"value"===l&&(i=a),o(a)?me(l,t):se(l,u,a,t)}for(var c in e)o(n[c])&&me(c,t);return i}function ve(e,n,t){if(u(n))t.style.cssText=n;else if(o(e)){if(!o(n))for(var r=Object.keys(n),i=0;i<r.length;i++){var l=r[i],a=n[l];c(a)&&!it[l]?t.style[l]=a+"px":t.style[l]=a}}else if(o(n))t.removeAttribute("style");else{for(var f=Object.keys(n),p=0;p<f.length;p++){var s=f[p],d=n[s];c(d)&&!it[s]?t.style[s]=d+"px":t.style[s]=d}for(var v=Object.keys(e),m=0;m<v.length;m++){var h=v[m];o(n[h])&&(t.style[h]="")}}}function me(e,n){"className"===e?n.removeAttribute("class"):"value"===e?n.value="":n.removeAttribute(e)}function he(e,n,t){e.split(",").forEach(function(e){return n[e]=t})}function ye(e,n,t,r){var l=new e(n,t);l._patch=Q,l._componentToDOMNodeMap=at;var a=l.getChildContext();o(a)?l._childContext=t:l._childContext=Object.assign({},t,a),l._unmounted=!1,l._pendingSetState=!0,l._isSVG=r,l.componentWillMount();var u=l.render();return i(u)&&(u=O()),l._pendingSetState=!1,l._lastInput=u,l}function ge(e,n,t){var r=e(n,t);return i(r)&&(r=O()),r}function Ee(e,n){""!==n?e.textContent=n:e.appendChild(document.createTextNode(""))}function be(e,n){e.firstChild.nodeValue=n}function _e(e,n){e.appendChild(n)}function ke(e,n,t){o(t)?_e(e,n):e.insertBefore(n,t)}function Ce(e,n,t,r,o){var i=n.pointer;B(n,e,!1,r,o),Ne(e,t,i)}function Oe(e,n){var t=e.bp;if(!f(t.v0)){if(t.v0===n)return e.v0;if(!f(t.v1)){if(t.v1===n)return e.v1;if(!f(t.v2)&&t.v2===n)return e.v2}}}function xe(e,n){var t;return t=n===!0?document.createElementNS(nt,e):document.createElement(e)}function Pe(e,n,t,r,i,l,a){var u=null,c=e._lastInput;o(c)||(u=e,e=c),K(e,null,r,!0,a);var f=je(n,null,r,i,l,a);n.dom=f,Ne(t,f,e.dom),null!==u&&(u._lasInput=n)}function Ne(e,n,t){e.replaceChild(n,t)}function Se(e){return r(e)?b(e):i(e)?O():n(e)?C(e):A(e)&&e.dom?y(e):e}function Te(e,n){var t=e[n];return e[n]=Se(t)}function we(e,n){e.removeChild(n)}function Ae(){return document.activeElement}function Re(e,n,t,r){e.textContent="";for(var o=0;o<n.length;o++){var l=n[o];i(l)||K(l,null,t,!0,r)}}function Ie(e){null!==e&&e!==document.body&&document.activeElement!==e&&e.focus()}function Me(e,n){return!e.complex&&(n.length&&!o(n[0])&&!o(n[0].key)&&e.length&&!o(e[0])&&!o(e[0].key))}function De(e,n,t){for(var r=e.firstChild;r;){var o=r.tagName;"OPTION"===o?!t&&r.value===n||t&&n.get(r.value)?r.selected=!0:r.selected=!1:"OPTGROUP"===o&&De(r,n,t),r=r.nextSibling}}function Le(e,t){var r=!1;o(t)||(n(t)?(t=t.reduce(function(e,n){return e.set(n,!0)},new Map),r=!0):t+="",De(e,t,r))}function Ue(e){e.checked&&(e.checked=!1),e.disabled&&(e.disabled=!1)}function je(e,n,t,r,o,i){return P(e)?Be(e,n,t,r,o,i):N(e)?Je(e,n,t,r,o,i):x(e)?Ve(e,n,t,r,o,i):S(e)?Ye(e,n):T(e)?Ke(e,n,t,r,o,i):w(e)?We(e,n):void v()}function We(e,n){var t=document.createTextNode("");return e.dom=t,n&&_e(n,t),t}function Ve(e,n,t,r,i,l){var a=e.tag;u(a)||v(),"svg"===a&&(i=!0);var c,p=xe(a,i),s=e.children,d=e.props,m=e.ref,h=!o(d);return e.dom=p,o(m)||tn(p,m,t),h&&(c=nn(e,d,p,t,r,i,!1,l)),o(s)||Xe(e.childrenType,s,p,t,r,i,l),"select"===a&&c&&Le(p,c),f(n)||_e(n,p),p}function Ke(e,n,t,r,o,i){var l=e.children,a=document.createTextNode(""),u=document.createDocumentFragment(),c=e.childrenType;return I(c)||M(c)?ze(l,u,t,r,o,i):R(c)&&Ze(l,u,t,r,o,i),e.pointer=a,e.dom=u,_e(u,a),n&&_e(n,u),u}function He(e,t,o){if(n(e))for(var l=0;l<e.length;l++){var a=e[l];He(a,t,o)}else r(e)?t.appendChild(document.createTextNode(e)):i(e)||Fe(e,t,o)}function Fe(e,n,t){var r=e.tag;"svg"===r&&(t=!0);var o=xe(r,t),i=e.children;f(i)||He(i,o,t);var l=e.props;if(!f(l))for(var a in l)se(a,null,l[a],o);return n&&n.appendChild(o),o}function Ge(e,n){var t=e.staticVElement,r=Fe(t,null,n);return e.clone=r,r.cloneNode(!0)}function Ye(e,n){var t=document.createTextNode(e.text);return e.dom=t,f(n)||_e(n,t),t}function Be(e,n,t,r,o,i){var l=e.bp,a=null;Zn&&(a=U(e,t,r,o,i));var u=l.staticVElement.tag;if(f(a)){(o||"svg"===u)&&(o=!0),a=l.clone&&l.clone.cloneNode(!0)||Ge(l,o),e.dom=a;var c=l.v0;if(!f(c)){qe(e,c,e.v0,l.d0,a,t,r,o,i);var p=l.v1;if(!f(p)){qe(e,p,e.v1,l.d1,a,t,r,o,i);var s=l.v2;if(!f(s)){qe(e,s,e.v2,l.d2,a,t,r,o,i);var d=l.v3;if(!f(d))for(var v=e.v3,m=l.d3,h=l.v3,y=0;y<h.length;y++)qe(e,h[y],v[y],m[y],a,t,r,o,i)}}}"select"===u&&Le(a,Oe(e,zn.PROP_VALUE))}return f(n)||n.appendChild(a),a}function qe(e,n,t,r,i,l,a,u,c){switch(n){case zn.CHILDREN:Xe(r,t,i,l,a,u,c);break;case zn.PROP_CLASS_NAME:o(t)||(u?i.setAttribute("class",t):i.className=t);break;case zn.PROP_DATA:i.dataset[r]=t;break;case zn.PROP_STYLE:ve(null,t,i);break;case zn.PROP_VALUE:i.value=o(t)?"":t;break;case zn.PROP:se(r,null,t,i);break;case zn.PROP_REF:tn(i,t,l);break;case zn.PROP_SPREAD:nn(e,t,i,l,a,u,!0,c)}}function Xe(e,n,t,r,o,i,l){D(e)?Ee(t,n):L(e)?je(n,t,r,o,i,l):I(e)||M(e)?ze(n,t,r,o,i,l):R(e)?$e(n,t,r,o,i,l):v()}function ze(e,n,t,r,o,i){for(var l=0;l<e.length;l++)je(e[l],n,t,r,o,i)}function $e(e,t,o,l,a,u){n(e)?Ze(e,t,o,l,a,u):r(e)?Ee(t,e):i(e)||je(e,t,o,l,a,u)}function Ze(e,n,t,r,o,i){e.complex=!1;for(var l=0;l<e.length;l++){var a=Te(e,l);S(a)?(Ye(a,n),e.complex=!0):w(a)?(We(a,n),e.complex=!0):T(a)?(Ke(a,n,t,r,o,i),e.complex=!0):je(a,n,t,r,o,i)}}function Je(e,n,r,o,i,l){if(Zn){var a=W(e,r,o,i,l);if(!f(a))return f(n)||_e(n,a),a}var u,c=e.component,p=e.props||qn,s=e.hooks,d=e.ref;if(t(e)){s&&v();var m=ye(c,p,o,i),h=m._lastInput;m._vComponent=e,e.dom=u=je(h,null,r,m._childContext,!1,l),f(n)||_e(n,u),Qe(d,m,r),at.set(m,u),e.instance=m}else{d&&v();var y=ge(c,p,o);e.dom=u=je(y,null,r,o,null,!1,l),e.instance=y,en(s,u,r),f(n)||_e(n,u)}return u}function Qe(e,n,t){e&&(l(e)?t.addListener(function(){return e(n)}):v()),f(n.componentDidMount)||t.addListener(function(){n.componentDidMount()})}function en(e,n,t){o(e)||(o(e.onComponentWillMount)||e.onComponentWillMount(props),o(e.onComponentDidMount)||t.addListener(function(){return e.onComponentDidMount(n,props)}))}function nn(e,n,t,r,o,i,l,a){var u;for(var c in n){var f=n[c];"value"===c&&(u=f),"key"===c?e.key=f:"ref"===c?tn(t,f,r):"children"===c?l?$e(f,t,r,o,i,a):x(e)&&(e.children=f):se(c,null,f,t)}return u}function tn(e,n,t){l(n)?t.addListener(function(){return n(e)}):v()}function rn(e){for(var n=e.childNodes,t=n.length,r=0;r<t;){var o=n[r];if(8===o.nodeType)if("!"===o.data){var i=document.createTextNode("");e.replaceChild(i,o),r++}else e.removeChild(o),t--;else r++}}function on(e,n,r,o){var i=e.component,l=e.props,a=e.hooks,u=e.ref;if(e.dom=n,t(e)){var c=n.namespaceURI===nt,f=ye(i,l,o,c),p=f._lastInput;f._vComponent=e,mn(p,n,r,o),Qe(u,f,r),at.set(f,n),e.instance=f}else{var s=ge(i,l,o);mn(s,n,r,o),e.instance=s,e.dom=s.dom,en(a,n,r)}}function ln(e,n,t,r){var o=e.tag;u(o)||v();var i=e.children;e.props,e.ref;e.dom=n,i&&cn(e.childrenType,i,n,t,r)}function an(e,n,t,r,o){for(var i=Array.prototype.slice.call(n.childNodes),l=0;l<e.length;l++)mn(e[l],i[l],t,r)}function un(e,t,r,o){var i=Array.prototype.slice.call(t.childNodes);if(n(e))for(var l=0;l<e.length;l++){var a=Te(e,l);d(a)&&mn(a,i[l],r,o)}else d(e)&&mn(e,t.firstChild,r,o)}function cn(e,n,t,r,o){L(e)?mn(n,t.firstChild,r,o):I(e)||M(e)?an(n,t,r,o):R(e)?un(n,t):D(e)||v()}function fn(e,t){var o=e.children;if(!f(o)&&!r(o)&&!i(o)){var l=t.firstChild;if(n(o))for(var a=0;a<o.length;a++){var u=o[a];r(u)||i(u)||(rn(l),fn(u,rn(l))),l=l.nextSibling}else rn(l),fn(o,l)}}function pn(e,n,t,r){var o=e.bp,i=o.v0,l=o.staticVElement;if(fn(l,n),e.dom=n,!f(i)){vn(e,i,e.v0,o.d0,n,r);var a=o.v1;if(!f(a)){vn(e,a,e.v1,o.d1,n,r);var u=o.v2;if(!f(u)){vn(e,u,e.v2,o.d2,n,r);var c=o.v3;if(!f(c))for(var p=e.v3,s=o.d3,d=o.v3,v=0;v<d.length;v++)vn(e,d[v],p[v],s[v],n,r)}}}}function sn(e,n){e.dom=n}function dn(e,n,t,r){for(var o=e.children,i=n.parentNode,l=e.pointer=document.createTextNode(""),a=0;a<o.length;a++){var u=Te(o,a),c=n;d(u)&&mn(u,c,t,r),n=n.nextSibling}i.insertBefore(l,n)}function vn(e,n,t,r,o,i,l){switch(n){case zn.CHILDREN:cn(r,t,o,i,l);break;case zn.PROP_SPREAD:}}function mn(e,n,t,r){rn(n),P(e)?pn(e,n,t,r):N(e)?on(e,n,t,r):x(e)?ln(e,n,t,r):T(e)?dn(e,n,t,r):S(e)?sn(e,n):w(e)||v()}function hn(e,n,t){if(n&&1===n.nodeType){var r=n.querySelector("[data-infernoroot]");if(r&&r.parentNode===n)return r.removeAttribute("data-infernoroot"),mn(e,r,t,{}),!0}return!1}function yn(e){return at.get(e)||null}function gn(e,n){var t=lt.get(n),r=new Fn;if(ut===n&&v(),e!==Gn)if(s(t))i(e)||(e.dom&&(e=y(e)),hn(e,n,r)||$e(e,n,r,{},!1,!1),r.trigger(),lt.set(n,{input:e}));else{var l=Ae();o(e)?(K(t.input,n,r,!0),lt.delete(n)):(e.dom&&(e=y(e)),oe(t.input,e,n,r,{},!1,!1)),r.trigger(),t.input=e,Ie(l)}}function En(e,n){for(var t=[],r=arguments.length-2;r-- >0;)t[r]=arguments[r+2];if(i(e)||d(e))throw new Error("Inferno Error: createElement() name paramater cannot be undefined, null, false or true, It must be a string, class or function.");var o,l=t;if(t&&(1===t.length?l=t[0]:0===t.length&&(l=void 0)),u(e)){var c;o=_(e);for(var f in n)if("key"===f)o.key=n.key,delete n.key;else if(ct[f])c||(c={}),c[f]=n[f],delete n[f];else if(a(f)){var p=f.toLowerCase();p!==f&&(n[f.toLowerCase()]=n[f],delete n[f])}o.props=n,s(l)||(o.children=l),c&&(o.hooks=c)}else{var v;o=E(e),s(l)||(n||(n={}),n.children=l);for(var m in n)ft[m]?(v||(v={}),v[m]=n[m]):"key"===m&&(o.key=n.key,delete n.key);o.props=n,v&&(o.hooks=v)}return o}function bn(){return document.activeElement}function _n(e){e!==document.body&&document.activeElement!==e&&e.focus()}function kn(e,n,t){for(var r in n)e._pendingState[r]=n[r];e._pendingSetState?(e.state=Object.assign({},e.state,e._pendingState),e._pendingState={}):(e._pendingSetState=!0,Cn(e,!1,t))}function Cn(e,n,t){if((!e._deferSetState||n)&&!e._blockRender){e._pendingSetState=!1;var r=e._pendingState,i=e.state,l=Object.assign({},i,r),a=e.props;e._pendingState={};var u=e._updateComponent(i,l,a,a,n);u===Gn?u=e._lastInput:o(u)&&(u=O());var c=e._lastInput,f=c.dom.parentNode,p=bn(),s=new Fn;e._patch(c,u,f,s,e.context,e._isSVG,!1),e._lastInput=u,e._vComponent.dom=u.dom,e._componentToDOMNodeMap.set(e,u.dom),e.componentDidUpdate(a,i),s.trigger(),o(t)||t(),_n(p)}}function On(){}function xn(e,n,t){for(var r in n)t!==!0&&o(n[r])||(e[r]=n[r]);return e}function Pn(e){for(var n in e){var t=e[n];"function"!=typeof t||t.__bound||dt.hasOwnProperty(n)||((e[n]=t.bind(e)).__bound=!0)}}function Nn(e){function n(n){xn(this,e),st.call(this,n),Pn(this),this.getInitialState&&(this.state=this.getInitialState())}return On.prototype=st.prototype,n.prototype=new On,n.prototype.constructor=n,n.displayName=e.displayName||"Component",n}function Sn(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/\//g,"&#x2F;")}function Tn(e){return(e+"").replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function wn(e){return e.replace(/([a-zA-Z])(?=[A-Z])/g,"$1-").toLowerCase()}function An(e){return!!vt[e]}function Rn(e,n,r){var i=e.component,l=e.props;if(t(e)){var a=new i(l),u=a.getChildContext();o(u)||(r=Object.assign({},r,u)),a.context=r,a._pendingSetState=!0,a.componentWillMount();var c=a.render();return a._pendingSetState=!1,Un(c,r,n)}return Un(i(l),r,n)}function In(e,t){if(e&&n(e)){for(var o=[],l=!1,a=0;a<e.length;a++){var u=e[a],c=r(u),f=i(u);c||f?(l===!0&&(i(u)?o.push("<!--!-->"):o.push("<!---->")),c&&o.push(Sn(u)),l=!0):n(u)?(o.push("<!---->"),o.push(In(u)),o.push("<!--!-->"),l=!0):(l=!1,o.push(Un(u,t,!1)))}return o.join("")}return i(e)?"":r(e)?Sn(e):Un(e,t,!1)||""}function Mn(e){if(r(e))return e;for(var n=[],t=Object.keys(e),i=0;i<t.length;i++){var l=t[i],a=e[l],u=c(a)&&!it[l]?"px":"";o(a)||n.push(wn(l)+":"+Tn(a)+u+";")}return n.join()}function Dn(e,n,t){for(var o=e.tag,i=[],l=e.props,a=l&&Object.keys(l)||[],u="",c=0;c<a.length;c++){var f=a[c],s=l[f];"dangerouslySetInnerHTML"===f?u=s.__html:"style"===f?i.push('style="'+Mn(l.style)+'"'):"className"===f?i.push('class="'+s+'"'):r(s)?i.push(Tn(f)+'="'+Tn(s)+'"'):p(s)&&i.push(Tn(f))}return n&&i.push("data-infernoroot"),An(o)?"<"+o+(i.length>0?" "+i.join(" "):"")+">":"<"+o+(i.length>0?" "+i.join(" "):"")+">"+(u||In(e.children,t))+"</"+o+">"}function Ln(e,n,t){return Un(m(e),t,n)}function Un(e,n,t){if(!i(e)){if(P(e))return Ln(e,t,n);if(x(e))return Dn(e,t,n);if(N(e))return Rn(e,t,n)}throw Error("Inferno Error: Bad input argument called on renderInputToString(). Input argument may need normalising.")}function jn(e){return Un(e,null,!1)}function Wn(e){return Un(e,null,!0)}function Vn(e,n){return n={exports:{}},e(n,n.exports),n.exports}function Kn(e){return gn(null,e),!0}function Hn(e,n){for(var t=[],r=arguments.length-2;r-- >0;)t[r]=arguments[r+2];return En.apply(void 0,[e.tag,Object.assign({},e.attrs||{},n||{},e.className?{className:e.className}:{},e.style?{style:e.style}:{},e.key?{key:e.key}:{},e.hooks||{},e.events||{})].concat(t))}var Fn=function(){this._listeners=[]};Fn.prototype.addListener=function(e){this._listeners.push(e)},Fn.prototype.trigger=function(){for(var e=this,n=0;n<this._listeners.length;n++)e._listeners[n]()};var Gn="$NO_OP",Yn="a runtime error occured! Use Inferno in development environment to find the error.",Bn="undefined"!=typeof window&&window.document,qn={},Xn={ELEMENT:1,OPT_ELEMENT:2,TEXT:3,FRAGMENT:4,OPT_BLUEPRINT:5,COMPONENT:6,PLACEHOLDER:7},zn={CHILDREN:1,PROP_CLASS_NAME:2,PROP_STYLE:3,PROP_DATA:4,PROP_REF:5,PROP_SPREAD:6,PROP_VALUE:7,PROP:8},$n={NON_KEYED:1,KEYED:2,NODE:3,TEXT:4,UNKNOWN:5},Zn=!0,Jn=new Map,Qn="http://www.w3.org/1999/xlink",et="http://www.w3.org/XML/1998/namespace",nt="http://www.w3.org/2000/svg",tt={},rt={},ot={},it={};he("xlink:href,xlink:arcrole,xlink:actuate,xlink:role,xlink:titlef,xlink:type",ot,Qn),he("xml:base,xml:lang,xml:space",ot,et),he("volume,value",tt,!0),he("muted,scoped,loop,open,checked,default,capture,disabled,selected,readonly,multiple,required,autoplay,controls,seamless,reversed,allowfullscreen,novalidate",rt,!0),he("animationIterationCount,borderImageOutset,borderImageSlice,borderImageWidth,boxFlex,boxFlexGroup,boxOrdinalGroup,columnCount,flex,flexGrow,flexPositive,flexShrink,flexNegative,flexOrder,gridRow,gridColumn,fontWeight,lineClamp,lineHeight,opacity,order,orphans,tabSize,widows,zIndex,zoom,fillOpacity,floodOpacity,stopOpacity,strokeDasharray,strokeDashoffset,strokeMiterlimit,strokeOpacity,strokeWidth,",it,!0);var lt=new Map,at=new Map,ut=Bn?document.body:null,ct={onCreated:!0,onAttached:!0,onWillUpdate:!0,onDidUpdate:!0,onWillDetach:!0},ft={onComponentWillMount:!0,onComponentDidMount:!0,onComponentWillUnmount:!0,onComponentShouldUpdate:!0,onComponentWillUpdate:!0,onComponentDidUpdate:!0},pt="Inferno Error: Can only update a mounted or mounting component. This usually means you called setState() or forceUpdate() on an unmounted component. This is a no-op.",st=function(e,n){this.props=e||{},this.state={},this.refs={},this._blockRender=!1,this._blockSetState=!1,this._deferSetState=!1,this._pendingSetState=!1,this._pendingState={},this._lastInput=null,this._vComponent=null,this._unmounted=!0,this.context=n||{},this._childContext=null,this._patch=null,this._isSVG=!1,this._componentToDOMNodeMap=null,this.componentDidMount||(this.componentDidMount=null)};st.prototype.render=function(){},st.prototype.forceUpdate=function(e){if(this._unmounted)throw Error(pt);Cn(this,!0,e)},st.prototype.setState=function(e,n){if(this._unmounted)throw Error(pt);this._blockSetState===!1?kn(this,e,n):v()},st.prototype.componentWillMount=function(){},st.prototype.componentWillUnmount=function(){},st.prototype.componentDidUpdate=function(){},st.prototype.shouldComponentUpdate=function(){return!0},st.prototype.componentWillReceiveProps=function(){},st.prototype.componentWillUpdate=function(){},st.prototype.getChildContext=function(){},st.prototype._updateComponent=function(e,n,t,r,i){if(this._unmounted===!0)throw new Error("You can't update an unmounted component!");if(!o(r)&&o(r.children)&&(r.children=t.children),t!==r||e!==n||i){t!==r&&(this._blockRender=!0,this.componentWillReceiveProps(r),this._blockRender=!1,this._pendingSetState&&(n=Object.assign({},n,this._pendingState),this._pendingSetState=!1,this._pendingState={}));var l=this.shouldComponentUpdate(r,n);if(l!==!1||i)return this._blockSetState=!0,this.componentWillUpdate(r,n),this._blockSetState=!1,this.props=r,this.state=n,this.render()}return Gn};var dt={constructor:1,render:1,shouldComponentUpdate:1,componentWillRecieveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},vt={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},mt="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ht=Vn(function(e,n){!function(t,r){if("function"==typeof define&&define.amd)define("PropTypes",["exports","module"],r);else if("undefined"!=typeof n&&"undefined"!=typeof e)r(n,e);else{var o={exports:{}};r(o.exports,o),t.PropTypes=o.exports}}(mt,function(e,n){function t(e){var n=e&&(k&&e[k]||e[C]);if("function"==typeof n)return n}function r(e){function n(n,t,r,o,i,l){if(o=o||O,l=l||r,null==t[r]){var a=b[i];return n?new Error("Required "+a+" `"+l+"` was not specified in "+("`"+o+"`.")):null}return e(t,r,o,i,l)}var t=n.bind(null,!1);return t.isRequired=n.bind(null,!0),t}function o(e){function n(n,t,r,o,i){var l=n[t],a=m(l);if(a!==e){var u=b[o],c=h(l);return new Error("Invalid "+u+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return r(n)}function i(){return r(_.thatReturns(null))}function l(e){function n(n,t,r,o,i){var l=n[t];if(!Array.isArray(l)){var a=b[o],u=m(l);return new Error("Invalid "+a+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<l.length;c++){var f=e(l,c,r,o,i+"["+c+"]");if(f instanceof Error)return f}return null}return r(n)}function a(){function e(e,n,t,r,o){if(!E.isValidElement(e[n])){var i=b[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+t+"`, expected a single ReactElement."))}return null}return r(e)}function u(e){function n(n,t,r,o,i){if(!(n[t]instanceof e)){var l=b[o],a=e.name||O,u=y(n[t]);return new Error("Invalid "+l+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return r(n)}function c(e){function n(n,t,r,o,i){for(var l=n[t],a=0;a<e.length;a++)if(l===e[a])return null;var u=b[o],c=JSON.stringify(e);return new Error("Invalid "+u+" `"+i+"` of value `"+l+"` "+("supplied to `"+r+"`, expected one of "+c+"."))}return r(Array.isArray(e)?n:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function f(e){function n(n,t,r,o,i){var l=n[t],a=m(l);if("object"!==a){var u=b[o];return new Error("Invalid "+u+" `"+i+"` of type "+("`"+a+"` supplied to `"+r+"`, expected an object."))}for(var c in l)if(l.hasOwnProperty(c)){var f=e(l,c,r,o,i+"."+c);if(f instanceof Error)return f}return null}return r(n)}function p(e){function n(n,t,r,o,i){for(var l=0;l<e.length;l++){var a=e[l];if(null==a(n,t,r,o,i))return null}var u=b[o];return new Error("Invalid "+u+" `"+i+"` supplied to "+("`"+r+"`."))}return r(Array.isArray(e)?n:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function s(){function e(e,n,t,r,o){if(!v(e[n])){var i=b[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+t+"`, expected a ReactNode."))}return null}return r(e)}function d(e){function n(n,t,r,o,i){var l=n[t],a=m(l);if("object"!==a){var u=b[o];return new Error("Invalid "+u+" `"+i+"` of type `"+a+"` "+("supplied to `"+r+"`, expected `object`."))}for(var c in e){var f=e[c];if(f){var p=f(l,c,r,o,i+"."+c);if(p)return p; }}return null}return r(n)}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||E.isValidElement(e))return!0;var n=t(e);if(!n)return!1;var r,o=n.call(e);if(n!==e.entries){for(;!(r=o.next()).done;)if(!v(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!v(i[1]))return!1}return!0;default:return!1}}function m(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":n}function h(e){var n=m(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function y(e){return e.constructor&&e.constructor.name?e.constructor.name:O}var g="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,E={};E.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===g};var b={prop:"prop",context:"context",childContext:"child context"},_={thatReturns:function(e){return function(){return e}}},k="function"==typeof Symbol&&Symbol.iterator,C="@@iterator",O="<<anonymous>>",x={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:l,element:a(),instanceOf:u,node:s(),objectOf:f,oneOf:c,oneOfType:p,shape:d};n.exports=x})}),yt=[],gt={map:function(e,n,t){return e=gt.toArray(e),t&&t!==e&&(n=n.bind(t)),e.map(n)},forEach:function(e,n,t){e=gt.toArray(e),t&&t!==e&&(n=n.bind(t)),e.forEach(n)},count:function(e){return e=gt.toArray(e),e.length},only:function(e){if(e=gt.toArray(e),1!==e.length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return Array.isArray&&Array.isArray(e)?e:yt.concat(e)}};st.prototype.isReactComponent={};var Et={render:gn,createElement:En,Component:st,unmountComponentAtNode:Kn,cloneElement:Hn,PropTypes:ht,createClass:Nn,findDOMNode:yn,renderToString:jn,renderToStaticMarkup:Wn,createVElement:_,createStaticVElement:k,createOptBlueprint:g,createVComponent:E,ValueTypes:zn,ChildrenTypes:$n,NodeTypes:Xn,Children:gt};e.render=gn,e.createElement=En,e.Component=st,e.unmountComponentAtNode=Kn,e.cloneElement=Hn,e.PropTypes=ht,e.createClass=Nn,e.findDOMNode=yn,e.renderToString=jn,e.renderToStaticMarkup=Wn,e.createVElement=_,e.createStaticVElement=k,e.createOptBlueprint=g,e.createVComponent=E,e.ValueTypes=zn,e.ChildrenTypes=$n,e.NodeTypes=Xn,e.Children=gt,e.default=Et,Object.defineProperty(e,"__esModule",{value:!0})});
ajax/libs/react-data-grid/0.14.30/react-data-grid-with-addons.min.js
redmunds/cdnjs
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactDataGrid=t(require("react"),require("react-dom")):e.ReactDataGrid=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";e.exports=r(1),e.exports.Editors=r(103),e.exports.Formatters=r(107),e.exports.Toolbar=r(109),e.exports.Row=r(87),e.exports.Menu=r(110)},function(e,t,r){"use strict";function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},i=r(2),s=r(3),a=r(4),l=(r(87),r(15),r(90)),u=r(99),c=r(97),p=r(100),d=r(102),h=r(10);Object.assign||(Object.assign=r(101));var f=i.createClass({displayName:"ReactDataGrid",mixins:[p,c.MetricsComputatorMixin,l],propTypes:{rowHeight:i.PropTypes.number.isRequired,headerRowHeight:i.PropTypes.number,minHeight:i.PropTypes.number.isRequired,minWidth:i.PropTypes.number,enableRowSelect:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.string]),onRowUpdated:i.PropTypes.func,rowGetter:i.PropTypes.func.isRequired,rowsCount:i.PropTypes.number.isRequired,toolbar:i.PropTypes.element,enableCellSelect:i.PropTypes.bool,columns:i.PropTypes.oneOfType([i.PropTypes.object,i.PropTypes.array]).isRequired,onFilter:i.PropTypes.func,onCellCopyPaste:i.PropTypes.func,onCellsDragged:i.PropTypes.func,onAddFilter:i.PropTypes.func,onGridSort:i.PropTypes.func,onDragHandleDoubleClick:i.PropTypes.func,onGridRowsUpdated:i.PropTypes.func,onRowSelect:i.PropTypes.func,rowKey:i.PropTypes.string,rowScrollTimeout:i.PropTypes.number,onClearFilters:i.PropTypes.func,contextMenu:i.PropTypes.element},getDefaultProps:function(){return{enableCellSelect:!1,tabIndex:-1,rowHeight:35,enableRowSelect:!1,minHeight:350,rowKey:"id",rowScrollTimeout:0}},getInitialState:function(){var e=this.createColumnMetrics(),t={columnMetrics:e,selectedRows:[],copied:null,expandedRows:[],canFilter:!1,columnFilters:{},sortDirection:null,sortColumn:null,dragged:null,scrollOffset:0};return this.props.enableCellSelect?t.selected={rowIdx:0,idx:0}:t.selected={rowIdx:-1,idx:-1},t},onContextMenuHide:function(){document.removeEventListener("click",this.onContextMenuHide);var e=Object.assign({},this.state.selected,{contextMenuDisplayed:!1});this.setState({selected:e})},onSelect:function(e){if(this.state.selected.rowIdx!==e.rowIdx||this.state.selected.idx!==e.idx||this.state.selected.active===!1||e.contextMenuDisplayed){var t=e.idx,r=e.rowIdx;t>=0&&r>=0&&t<h.getSize(this.state.columnMetrics.columns)&&r<this.props.rowsCount&&this.setState({selected:e})}},onCellClick:function(e){this.onSelect({rowIdx:e.rowIdx,idx:e.idx})},onCellContextMenu:function(e){this.onSelect({rowIdx:e.rowIdx,idx:e.idx,contextMenuDisplayed:this.props.contextMenu}),this.props.contextMenu&&document.addEventListener("click",this.onContextMenuHide)},onCellDoubleClick:function(e){this.onSelect({rowIdx:e.rowIdx,idx:e.idx}),this.setActive("Enter")},onViewportDoubleClick:function(){this.setActive()},onPressArrowUp:function(e){this.moveSelectedCell(e,-1,0)},onPressArrowDown:function(e){this.moveSelectedCell(e,1,0)},onPressArrowLeft:function(e){this.moveSelectedCell(e,0,-1)},onPressArrowRight:function(e){this.moveSelectedCell(e,0,1)},onPressTab:function(e){this.moveSelectedCell(e,0,e.shiftKey?-1:1)},onPressEnter:function(e){this.setActive(e.key)},onPressDelete:function(e){this.setActive(e.key)},onPressEscape:function(e){this.setInactive(e.key)},onPressBackspace:function(e){this.setActive(e.key)},onPressChar:function(e){this.isKeyPrintable(e.keyCode)&&this.setActive(e.keyCode)},onPressKeyWithCtrl:function(e){var t={KeyCode_c:99,KeyCode_C:67,KeyCode_V:86,KeyCode_v:118},r=this.state.selected.idx;if(this.canEdit(r))if(e.keyCode===t.KeyCode_c||e.keyCode===t.KeyCode_C){var o=this.getSelectedValue();this.handleCopy({value:o})}else e.keyCode!==t.KeyCode_v&&e.keyCode!==t.KeyCode_V||this.handlePaste()},onCellCommit:function(e){var t=Object.assign({},this.state.selected);t.active=!1,"Tab"===e.key&&(t.idx+=1);var r=this.state.expandedRows;this.setState({selected:t,expandedRows:r}),this.props.onRowUpdated&&this.props.onRowUpdated(e);var o=e.rowIdx;this.props.onGridRowsUpdated&&this.props.onGridRowsUpdated({cellKey:e.cellKey,fromRow:o,toRow:o,updated:e.updated,action:"cellUpdate"})},onDragStart:function(e){var t=this.getSelectedValue();this.handleDragStart({idx:this.state.selected.idx,rowIdx:this.state.selected.rowIdx,value:t}),e&&e.dataTransfer&&e.dataTransfer.setData&&(e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain","dummy"))},onToggleFilter:function(){this.setState({canFilter:!this.state.canFilter}),this.state.canFilter===!1&&this.props.onClearFilters&&this.props.onClearFilters()},onDragHandleDoubleClick:function(e){if(this.props.onDragHandleDoubleClick&&this.props.onDragHandleDoubleClick(e),this.props.onGridRowsUpdated){var t=this.getColumn(e.idx).key,r=o({},t,e.rowData[t]);this.props.onGridRowsUpdated({cellKey:t,fromRow:e.rowIdx,toRow:this.props.rowsCount-1,updated:r,action:"columnFill"})}},handleDragStart:function(e){if(this.dragEnabled()){var t=e.idx,r=e.rowIdx;t>=0&&r>=0&&t<this.getSize()&&r<this.props.rowsCount&&this.setState({dragged:e})}},handleDragEnd:function(){if(this.dragEnabled()){var e=void 0,t=void 0,r=this.state.selected,n=this.state.dragged,i=this.getColumn(this.state.selected.idx).key;if(e=r.rowIdx<n.overRowIdx?r.rowIdx:n.overRowIdx,t=r.rowIdx>n.overRowIdx?r.rowIdx:n.overRowIdx,this.props.onCellsDragged&&this.props.onCellsDragged({cellKey:i,fromRow:e,toRow:t,value:n.value}),this.props.onGridRowsUpdated){var s=o({},i,n.value);this.props.onGridRowsUpdated({cellKey:i,fromRow:e,toRow:t,updated:s,action:"cellDrag"})}this.setState({dragged:{complete:!0}})}},handleDragEnter:function(e){if(this.dragEnabled()){var t=this.state.dragged;t.overRowIdx=e,this.setState({dragged:t})}},handleTerminateDrag:function(){this.dragEnabled()&&this.setState({dragged:null})},handlePaste:function(){if(this.copyPasteEnabled()){var e=this.state.selected,t=this.getColumn(this.state.selected.idx).key,r=this.state.textToCopy,n=e.rowIdx;if(this.props.onCellCopyPaste&&this.props.onCellCopyPaste({cellKey:t,rowIdx:n,value:r,fromRow:this.state.copied.rowIdx,toRow:n}),this.props.onGridRowsUpdated){var i=o({},t,r);this.props.onGridRowsUpdated({cellKey:t,fromRow:n,toRow:n,updated:i,action:"copyPaste"})}this.setState({copied:null})}},handleCopy:function(e){if(this.copyPasteEnabled()){var t=e.value,r=this.state.selected,o={idx:r.idx,rowIdx:r.rowIdx};this.setState({textToCopy:t,copied:o})}},handleSort:function(e,t){this.setState({sortDirection:t,sortColumn:e},function(){this.props.onGridSort(e,t)})},getSelectedRow:function(e,t){var r=this,o=e.filter(function(e){return e[r.props.rowKey]===t});return o.length>0?o[0]:void 0},handleRowSelect:function(e,t,r,o){o.stopPropagation();var n="single"===this.props.enableRowSelect?[]:this.state.selectedRows.slice(0),i=this.getSelectedRow(n,r[this.props.rowKey]);i?i.isSelected=!i.isSelected:(r.isSelected=!0,n.push(r)),this.setState({selectedRows:n,selected:{rowIdx:e,idx:0}}),this.props.onRowSelect&&this.props.onRowSelect(n.filter(function(e){return e.isSelected===!0}))},handleCheckboxChange:function(e){var t=void 0;t=e.currentTarget instanceof HTMLInputElement&&e.currentTarget.checked===!0;for(var r=[],o=0;o<this.props.rowsCount;o++){var n=Object.assign({},this.props.rowGetter(o),{isSelected:t});r.push(n)}this.setState({selectedRows:r}),"function"==typeof this.props.onRowSelect&&this.props.onRowSelect(r.filter(function(e){return e.isSelected===!0}))},getScrollOffSet:function(){var e=0,t=s.findDOMNode(this).querySelector(".react-grid-Canvas");t&&(e=t.offsetWidth-t.clientWidth),this.setState({scrollOffset:e})},getRowOffsetHeight:function(){var e=0;return this.getHeaderRows().forEach(function(t){return e+=parseFloat(t.height,10)}),e},getHeaderRows:function(){var e=[{ref:"row",height:this.props.headerRowHeight||this.props.rowHeight,rowType:"header"}];return this.state.canFilter===!0&&e.push({ref:"filterRow",filterable:!0,onFilterChange:this.props.onAddFilter,height:45,rowType:"filter"}),e},getInitialSelectedRows:function(){for(var e=[],t=0;t<this.props.rowsCount;t++)e.push(!1);return e},getSelectedValue:function(){var e=this.state.selected.rowIdx,t=this.state.selected.idx,r=this.getColumn(t).key,o=this.props.rowGetter(e);return d.get(o,r)},moveSelectedCell:function(e,t,r){e.preventDefault();var o=this.state.selected.rowIdx+t,n=this.state.selected.idx+r;this.onSelect({idx:n,rowIdx:o})},setActive:function(e){var t=this.state.selected.rowIdx,r=this.state.selected.idx;if(this.canEdit(r)&&!this.isActive()){var o=Object.assign(this.state.selected,{idx:r,rowIdx:t,active:!0,initialKeyCode:e});this.setState({selected:o})}},setInactive:function(){var e=this.state.selected.rowIdx,t=this.state.selected.idx;if(this.canEdit(t)&&this.isActive()){var r=Object.assign(this.state.selected,{idx:t,rowIdx:e,active:!1});this.setState({selected:r})}},canEdit:function(e){var t=this.getColumn(e);return this.props.enableCellSelect===!0&&(null!=t.editor||t.editable)},isActive:function(){return this.state.selected.active===!0},setupGridColumns:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=e.columns.slice(0),r={};if(e.enableRowSelect){var o="single"===e.enableRowSelect?null:i.createElement("div",{className:"react-grid-checkbox-container"},i.createElement("input",{className:"react-grid-checkbox",type:"checkbox",name:"select-all-checkbox",onChange:this.handleCheckboxChange}),i.createElement("label",{htmlFor:"select-all-checkbox",className:"react-grid-checkbox-label"})),n={key:"select-row",name:"",formatter:i.createElement(u,null),onCellChange:this.handleRowSelect,filterable:!1,headerRenderer:o,width:60,locked:!0,getRowMetaData:function(e){return e}};r=t.unshift(n),t=r>0?t:r}return t},copyPasteEnabled:function(){return null!==this.props.onCellCopyPaste},dragEnabled:function(){return null!==this.props.onCellsDragged},renderToolbar:function(){var e=this.props.toolbar;return i.isValidElement(e)?i.cloneElement(e,{onToggleFilter:this.onToggleFilter,numberOfRows:this.props.rowsCount}):void 0},render:function(){var e={selected:this.state.selected,dragged:this.state.dragged,onCellClick:this.onCellClick,onCellContextMenu:this.onCellContextMenu,onCellDoubleClick:this.onCellDoubleClick,onCommit:this.onCellCommit,onCommitCancel:this.setInactive,copied:this.state.copied,handleDragEnterRow:this.handleDragEnter,handleTerminateDrag:this.handleTerminateDrag,onDragHandleDoubleClick:this.onDragHandleDoubleClick,enableCellSelect:this.props.enableCellSelect},t=this.renderToolbar(),r=this.props.minWidth||this.DOMMetrics.gridWidth(),o=r-this.state.scrollOffset;return("undefined"==typeof r||isNaN(r)||0===r)&&(r="100%"),("undefined"==typeof o||isNaN(o)||0===o)&&(o="100%"),i.createElement("div",{className:"react-grid-Container",style:{width:r}},t,i.createElement("div",{className:"react-grid-Main"},i.createElement(a,n({ref:"base"},this.props,{rowKey:this.props.rowKey,headerRows:this.getHeaderRows(),columnMetrics:this.state.columnMetrics,rowGetter:this.props.rowGetter,rowsCount:this.props.rowsCount,rowHeight:this.props.rowHeight,cellMetaData:e,selectedRows:this.state.selectedRows.filter(function(e){return e.isSelected===!0}),expandedRows:this.state.expandedRows,rowOffsetHeight:this.getRowOffsetHeight(),sortColumn:this.state.sortColumn,sortDirection:this.state.sortDirection,onSort:this.handleSort,minHeight:this.props.minHeight,totalWidth:o,onViewportKeydown:this.onKeyDown,onViewportDragStart:this.onDragStart,onViewportDragEnd:this.handleDragEnd,onViewportDoubleClick:this.onViewportDoubleClick,onColumnResize:this.onColumnResize,rowScrollTimeout:this.props.rowScrollTimeout,contextMenu:this.props.contextMenu}))))}});e.exports=f},function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t,r){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},n=r(2),i=n.PropTypes,s=r(5),a=r(21),l=r(98),u=r(97),c=r(94),p=n.createClass({displayName:"Grid",propTypes:{rowGetter:i.oneOfType([i.array,i.func]).isRequired,columns:i.oneOfType([i.array,i.object]),columnMetrics:i.object,minHeight:i.number,totalWidth:i.oneOfType([i.number,i.string]),headerRows:i.oneOfType([i.array,i.func]),rowHeight:i.number,rowRenderer:i.func,emptyRowsView:i.func,expandedRows:i.oneOfType([i.array,i.func]),selectedRows:i.oneOfType([i.array,i.func]),rowsCount:i.number,onRows:i.func,sortColumn:n.PropTypes.string,sortDirection:n.PropTypes.oneOf(["ASC","DESC","NONE"]),rowOffsetHeight:i.number.isRequired,onViewportKeydown:i.func.isRequired,onViewportDragStart:i.func.isRequired,onViewportDragEnd:i.func.isRequired,onViewportDoubleClick:i.func.isRequired,onColumnResize:i.func,onSort:i.func,cellMetaData:i.shape(c),rowKey:i.string.isRequired,rowScrollTimeout:i.number,contextMenu:i.element},mixins:[l,u.MetricsComputatorMixin],getDefaultProps:function(){return{rowHeight:35,minHeight:350}},getStyle:function(){return{overflow:"hidden",outline:0,position:"relative",minHeight:this.props.minHeight}},render:function(){var e=this.props.headerRows||[{ref:"row"}],t=this.props.emptyRowsView;return n.createElement("div",o({},this.props,{style:this.getStyle(),className:"react-grid-Grid"}),n.createElement(s,{ref:"header",columnMetrics:this.props.columnMetrics,onColumnResize:this.props.onColumnResize,height:this.props.rowHeight,totalWidth:this.props.totalWidth,headerRows:e,sortColumn:this.props.sortColumn,sortDirection:this.props.sortDirection,onSort:this.props.onSort,onScroll:this.onHeaderScroll}),this.props.rowsCount>=1||0===this.props.rowsCount&&!this.props.emptyRowsView?n.createElement("div",{ref:"viewPortContainer",onKeyDown:this.props.onViewportKeydown,onDoubleClick:this.props.onViewportDoubleClick,onDragStart:this.props.onViewportDragStart,onDragEnd:this.props.onViewportDragEnd},n.createElement(a,{ref:"viewport",rowKey:this.props.rowKey,width:this.props.columnMetrics.width,rowHeight:this.props.rowHeight,rowRenderer:this.props.rowRenderer,rowGetter:this.props.rowGetter,rowsCount:this.props.rowsCount,selectedRows:this.props.selectedRows,expandedRows:this.props.expandedRows,columnMetrics:this.props.columnMetrics,totalWidth:this.props.totalWidth,onScroll:this.onScroll,onRows:this.props.onRows,cellMetaData:this.props.cellMetaData,rowOffsetHeight:this.props.rowOffsetHeight||this.props.rowHeight*e.length,minHeight:this.props.minHeight,rowScrollTimeout:this.props.rowScrollTimeout,contextMenu:this.props.contextMenu})):n.createElement("div",{ref:"emptyView",className:"react-grid-Empty"},n.createElement(t,null)))}});e.exports=p},function(e,t,r){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},n=r(2),i=r(3),s=r(6),a=r(7),l=r(8),u=r(10),c=r(12),p=n.PropTypes,d=n.createClass({displayName:"Header",propTypes:{columnMetrics:p.shape({width:p.number.isRequired,columns:p.any}).isRequired,totalWidth:p.oneOfType([p.number,p.string]),height:p.number.isRequired,headerRows:p.array.isRequired,sortColumn:p.string,sortDirection:p.oneOf(["ASC","DESC","NONE"]),onSort:p.func,onColumnResize:p.func,onScroll:p.func},getInitialState:function(){return{resizing:null}},componentWillReceiveProps:function(){this.setState({resizing:null})},shouldComponentUpdate:function(e,t){var r=!l.sameColumns(this.props.columnMetrics.columns,e.columnMetrics.columns,l.sameColumn)||this.props.totalWidth!==e.totalWidth||this.props.headerRows.length!==e.headerRows.length||this.state.resizing!==t.resizing||this.props.sortColumn!==e.sortColumn||this.props.sortDirection!==e.sortDirection;return r},onColumnResize:function(e,t){var r=this.state.resizing||this.props,o=this.getColumnPosition(e);if(null!=o){var n={columnMetrics:a(r.columnMetrics)};n.columnMetrics=l.resizeColumn(n.columnMetrics,o,t),n.columnMetrics.totalWidth<r.columnMetrics.totalWidth&&(n.columnMetrics.totalWidth=r.columnMetrics.totalWidth),n.column=u.getColumn(n.columnMetrics.columns,o),this.setState({resizing:n})}},onColumnResizeEnd:function(e,t){var r=this.getColumnPosition(e);null!==r&&this.props.onColumnResize&&this.props.onColumnResize(r,t||e.width)},getHeaderRows:function(){var e=this,t=this.getColumnMetrics(),r=void 0;this.state.resizing&&(r=this.state.resizing.column);var o=[];return this.props.headerRows.forEach(function(i,s){var a={position:"absolute",top:e.getCombinedHeaderHeights(s),left:0,width:e.props.totalWidth,overflow:"hidden"};o.push(n.createElement(c,{key:i.ref,ref:i.ref,rowType:i.rowType,style:a,onColumnResize:e.onColumnResize,onColumnResizeEnd:e.onColumnResizeEnd,width:t.width,height:i.height||e.props.height,columns:t.columns,resizing:r,filterable:i.filterable,onFilterChange:i.onFilterChange,sortColumn:e.props.sortColumn,sortDirection:e.props.sortDirection,onSort:e.props.onSort,onScroll:e.props.onScroll}))}),o},getColumnMetrics:function(){var e=void 0;return e=this.state.resizing?this.state.resizing.columnMetrics:this.props.columnMetrics},getColumnPosition:function(e){var t=this.getColumnMetrics(),r=-1;return t.columns.forEach(function(t,o){t.key===e.key&&(r=o)}),-1===r?null:r},getCombinedHeaderHeights:function(e){var t=this.props.headerRows.length;"undefined"!=typeof e&&(t=e);for(var r=0,o=0;t>o;o++)r+=this.props.headerRows[o].height||this.props.height;return r},getStyle:function(){return{position:"relative",height:this.getCombinedHeaderHeights(),overflow:"hidden"}},setScrollLeft:function(e){var t=i.findDOMNode(this.refs.row);if(t.scrollLeft=e,this.refs.row.setScrollLeft(e),this.refs.filterRow){var r=i.findDOMNode(this.refs.filterRow);r.scrollLeft=e,this.refs.filterRow.setScrollLeft(e)}},render:function(){var e=s({"react-grid-Header":!0,"react-grid-Header--resizing":!!this.state.resizing}),t=this.getHeaderRows();return n.createElement("div",o({},this.props,{style:this.getStyle(),className:e}),t)}});e.exports=d},function(e,t,r){function o(){for(var e,t="",r=0;r<arguments.length;r++)if(e=arguments[r])if("string"==typeof e||"number"==typeof e)t+=" "+e;else if("[object Array]"===Object.prototype.toString.call(e))t+=" "+o.apply(null,e);else if("object"==typeof e)for(var n in e)e.hasOwnProperty(n)&&e[n]&&(t+=" "+n);return t.substr(1)}var n,i;"undefined"!=typeof e&&e.exports&&(e.exports=o),n=[],i=function(){return o}.apply(t,n),!(void 0!==i&&(e.exports=i))},function(e,t){"use strict";function r(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}e.exports=r},function(e,t,r){"use strict";function o(e,t){return e.map(function(e){var r=Object.assign({},e);return e.width&&/^([0-9]+)%$/.exec(e.width.toString())&&(r.width=Math.floor(e.width/100*t)),r})}function n(e,t,r){var o=e.filter(function(e){return!e.width});return e.map(function(e){return e.width||(0>=t?e.width=r:e.width=Math.floor(t/h.getSize(o))),e})}function i(e){var t=0;return e.map(function(e){return e.left=t,t+=e.width,e})}function s(e){var t=o(e.columns,e.totalWidth),r=t.filter(function(e){return e.width}).reduce(function(e,t){return e-t.width},e.totalWidth);r-=f();var s=t.filter(function(e){return e.width}).reduce(function(e,t){return e+t.width},0);return t=n(t,r,e.minColumnWidth),t=i(t),{columns:t,width:s,totalWidth:e.totalWidth,minColumnWidth:e.minColumnWidth}}function a(e,t,r){var o=h.getColumn(e.columns,t),n=p(e);n.columns=e.columns.slice(0);var i=p(o);return i.width=Math.max(r,n.minColumnWidth),n=h.spliceColumn(n,t,i),s(n)}function l(e,t){return"undefined"!=typeof Immutable&&e instanceof Immutable.List&&t instanceof Immutable.List}function u(e,t,r){var o=void 0,n=void 0,i=void 0,s={},a={};if(h.getSize(e)!==h.getSize(t))return!1;for(o=0,n=h.getSize(e);n>o;o++)i=e[o],s[i.key]=i;for(o=0,n=h.getSize(t);n>o;o++){i=t[o],a[i.key]=i;var l=s[i.key];if(void 0===l||!r(l,i))return!1}for(o=0,n=h.getSize(e);n>o;o++){i=e[o];var u=a[i.key];if(void 0===u)return!1}return!0}function c(e,t,r){return l(e,t)?e===t:u(e,t,r)}var p=r(7),d=r(9),h=r(10),f=r(11);e.exports={recalculate:s,resizeColumn:a,sameColumn:d,sameColumns:c}},function(e,t,r){"use strict";var o=r(2).isValidElement;e.exports=function(e,t){var r=void 0;for(r in e)if(e.hasOwnProperty(r)){if("function"==typeof e[r]&&"function"==typeof t[r]||o(e[r])&&o(t[r]))continue;if(!t.hasOwnProperty(r)||e[r]!==t[r])return!1}for(r in t)if(t.hasOwnProperty(r)&&!e.hasOwnProperty(r))return!1;return!0}},function(e,t){"use strict";e.exports={getColumn:function(e,t){return Array.isArray(e)?e[t]:"undefined"!=typeof Immutable?e.get(t):void 0},spliceColumn:function(e,t,r){return Array.isArray(e.columns)?e.columns.splice(t,1,r):"undefined"!=typeof Immutable&&(e.columns=e.columns.splice(t,1,r)),e},getSize:function(e){return Array.isArray(e)?e.length:"undefined"!=typeof Immutable?e.size:void 0}}},function(e,t){"use strict";function r(){if(void 0===o){var e=document.createElement("div");e.style.width="50px",e.style.height="50px",e.style.position="absolute",e.style.top="-200px",e.style.left="-200px";var t=document.createElement("div");t.style.height="100px",t.style.width="100%",e.appendChild(t),document.body.appendChild(e);var r=e.clientWidth;e.style.overflowY="scroll";var n=t.clientWidth;document.body.removeChild(e),o=r-n}return o}var o=void 0;e.exports=r},function(e,t,r){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},n=r(2),i=r(13),s=r(14),a=r(11),l=(r(15),r(10)),u=r(18),c=r(19),p=r(20),d=n.PropTypes,h={overflow:n.PropTypes.string,width:d.oneOfType([d.number,d.string]),height:n.PropTypes.number,position:n.PropTypes.string},f=["ASC","DESC","NONE"],m=n.createClass({displayName:"HeaderRow",propTypes:{width:d.oneOfType([d.number,d.string]),height:d.number.isRequired,columns:d.oneOfType([d.array,d.object]),onColumnResize:d.func,onSort:d.func.isRequired,onColumnResizeEnd:d.func,style:d.shape(h),sortColumn:d.string,sortDirection:n.PropTypes.oneOf(f),cellRenderer:d.func,headerCellRenderer:d.func,filterable:d.bool,onFilterChange:d.func,resizing:d.func,onScroll:d.func,rowType:d.string},mixins:[l],shouldComponentUpdate:function(e){return e.width!==this.props.width||e.height!==this.props.height||e.columns!==this.props.columns||!i(e.style,this.props.style)||this.props.sortColumn!==e.sortColumn||this.props.sortDirection!==e.sortDirection},getHeaderCellType:function(e){return e.filterable&&this.props.filterable?p.FILTERABLE:e.sortable?p.SORTABLE:p.NONE},getFilterableHeaderCell:function(){return n.createElement(c,{onChange:this.props.onFilterChange})},getSortableHeaderCell:function(e){var t=this.props.sortColumn===e.key?this.props.sortDirection:f.NONE;return n.createElement(u,{columnKey:e.key,onSort:this.props.onSort,sortDirection:t})},getHeaderRenderer:function(e){var t=void 0;if(e.headerRenderer)t=e.headerRenderer;else{var r=this.getHeaderCellType(e);switch(r){case p.SORTABLE:t=this.getSortableHeaderCell(e);break;case p.FILTERABLE:t=this.getFilterableHeaderCell()}}return t},getStyle:function(){return{overflow:"hidden",width:"100%",height:this.props.height,position:"absolute"}},getCells:function(){for(var e=[],t=[],r=0,o=this.getSize(this.props.columns);o>r;r++){var i=this.getColumn(this.props.columns,r),a=this.getHeaderRenderer(i);"select-row"===i.key&&"filter"===this.props.rowType&&(a=n.createElement("div",null));var l=n.createElement(s,{ref:r,key:r,height:this.props.height,column:i,renderer:a,resizing:this.props.resizing===i,onResize:this.props.onColumnResize,onResizeEnd:this.props.onColumnResizeEnd});i.locked?t.push(l):e.push(l)}return e.concat(t)},setScrollLeft:function(e){var t=this;this.props.columns.forEach(function(r,o){r.locked&&t.refs[o].setScrollLeft(e)})},render:function(){var e={width:this.props.width?this.props.width+a():"100%",height:this.props.height,whiteSpace:"nowrap",overflowX:"hidden",overflowY:"hidden"},t=this.getCells();return n.createElement("div",o({},this.props,{className:"react-grid-HeaderRow",onScroll:this.props.onScroll}),n.createElement("div",{style:e},t))}});e.exports=m},function(e,t){"use strict";function r(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var i=o.bind(t),s=0;s<r.length;s++)if(!i(r[s])||e[r[s]]!==t[r[s]])return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=r},function(e,t,r){"use strict";function o(e){return n.createElement("div",{className:"widget-HeaderCell__value"},e.column.name)}var n=r(2),i=r(3),s=r(6),a=r(15),l=r(16),u=n.PropTypes,c=n.createClass({displayName:"HeaderCell",propTypes:{renderer:u.oneOfType([u.func,u.element]).isRequired,column:u.shape(a).isRequired,onResize:u.func.isRequired,height:u.number.isRequired,onResizeEnd:u.func.isRequired,className:u.string},getDefaultProps:function(){return{renderer:o}},getInitialState:function(){return{resizing:!1}},onDragStart:function(e){this.setState({resizing:!0}),e&&e.dataTransfer&&e.dataTransfer.setData&&e.dataTransfer.setData("text/plain","dummy")},onDrag:function(e){var t=this.props.onResize||null;if(t){var r=this.getWidthFromMouseEvent(e);r>0&&t(this.props.column,r)}},onDragEnd:function(e){var t=this.getWidthFromMouseEvent(e);this.props.onResizeEnd(this.props.column,t),this.setState({resizing:!1})},getWidthFromMouseEvent:function(e){var t=e.pageX,r=i.findDOMNode(this).getBoundingClientRect().left;return t-r},getCell:function(){return n.isValidElement(this.props.renderer)?n.cloneElement(this.props.renderer,{column:this.props.column}):this.props.renderer({column:this.props.column})},getStyle:function(){return{width:this.props.column.width,left:this.props.column.left,display:"inline-block",position:"absolute",overflow:"hidden",height:this.props.height,margin:0,textOverflow:"ellipsis",whiteSpace:"nowrap"}},setScrollLeft:function(e){var t=i.findDOMNode(this);t.style.webkitTransform="translate3d("+e+"px, 0px, 0px)",t.style.transform="translate3d("+e+"px, 0px, 0px)"},render:function(){var e=void 0;this.props.column.resizable&&(e=n.createElement(l,{onDrag:this.onDrag,onDragStart:this.onDragStart,onDragEnd:this.onDragEnd}));var t=s({"react-grid-HeaderCell":!0,"react-grid-HeaderCell--resizing":this.state.resizing,"react-grid-HeaderCell--locked":this.props.column.locked});t=s(t,this.props.className,this.props.column.cellClass);var r=this.getCell();return n.createElement("div",{className:t,style:this.getStyle()},r,e)}});e.exports=c},function(e,t,r){"use strict";var o=r(2),n={name:o.PropTypes.node.isRequired,key:o.PropTypes.string.isRequired,width:o.PropTypes.number.isRequired,filterable:o.PropTypes.bool};e.exports=n},function(e,t,r){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},n=r(2),i=r(17),s=n.createClass({displayName:"ResizeHandle",style:{position:"absolute",top:0,right:0,width:6,height:"100%"},render:function(){return n.createElement(i,o({},this.props,{className:"react-grid-HeaderCell__resizeHandle",style:this.style}))}});e.exports=s},function(e,t,r){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},n=r(2),i=n.PropTypes,s=n.createClass({displayName:"Draggable",propTypes:{onDragStart:i.func,onDragEnd:i.func,onDrag:i.func,component:i.oneOfType([i.func,i.constructor])},getDefaultProps:function(){return{onDragStart:function(){return!0},onDragEnd:function(){},onDrag:function(){}}},getInitialState:function(){return{drag:null}},componentWillUnmount:function(){this.cleanUp()},onMouseDown:function(e){var t=this.props.onDragStart(e);null===t&&0!==e.button||(window.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mousemove",this.onMouseMove),this.setState({drag:t}))},onMouseMove:function(e){null!==this.state.drag&&(e.preventDefault&&e.preventDefault(),this.props.onDrag(e))},onMouseUp:function(e){this.cleanUp(),this.props.onDragEnd(e,this.state.drag),this.setState({drag:null})},cleanUp:function(){window.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mousemove",this.onMouseMove)},render:function(){return n.createElement("div",o({},this.props,{onMouseDown:this.onMouseDown,className:"react-grid-HeaderCell__draggable"}))}});e.exports=s},function(e,t,r){"use strict";var o=r(2),n=r(6),i={ASC:"ASC",DESC:"DESC",NONE:"NONE"},s=o.createClass({displayName:"SortableHeaderCell",propTypes:{columnKey:o.PropTypes.string.isRequired,column:o.PropTypes.shape({name:o.PropTypes.node}),onSort:o.PropTypes.func.isRequired,sortDirection:o.PropTypes.oneOf(["ASC","DESC","NONE"])},onClick:function(){var e=void 0;switch(this.props.sortDirection){default:case null:case void 0:case i.NONE:e=i.ASC;break;case i.ASC:e=i.DESC;break;case i.DESC:e=i.NONE}this.props.onSort(this.props.columnKey,e)},getSortByText:function(){var e={ASC:"9650",DESC:"9660",NONE:""};return String.fromCharCode(e[this.props.sortDirection])},render:function(){var e=n({"react-grid-HeaderCell-sortable":!0,"react-grid-HeaderCell-sortable--ascending":"ASC"===this.props.sortDirection,"react-grid-HeaderCell-sortable--descending":"DESC"===this.props.sortDirection});return o.createElement("div",{className:e,onClick:this.onClick,style:{cursor:"pointer"}},this.props.column.name,o.createElement("span",{className:"pull-right"},this.getSortByText()))}});e.exports=s},function(e,t,r){"use strict";var o=r(2),n=r(15),i=o.createClass({displayName:"FilterableHeaderCell",propTypes:{onChange:o.PropTypes.func.isRequired,column:o.PropTypes.shape(n)},getInitialState:function(){return{filterTerm:""}},handleChange:function(e){var t=e.target.value;this.setState({filterTerm:t}),this.props.onChange({filterTerm:t,columnKey:this.props.column.key})},renderInput:function(){if(this.props.column.filterable===!1)return o.createElement("span",null);var e="header-filter-"+this.props.column.key;return o.createElement("input",{key:e,type:"text",className:"form-control input-sm",placeholder:"Search",value:this.state.filterTerm,onChange:this.handleChange})},render:function(){return o.createElement("div",null,o.createElement("div",{className:"form-group"},this.renderInput()))}});e.exports=i},function(e,t){"use strict";var r={SORTABLE:0,FILTERABLE:1,NONE:2,CHECKBOX:3};e.exports=r},function(e,t,r){"use strict";var o=r(2),n=r(22),i=r(96),s=r(94),a=o.PropTypes,l=o.createClass({displayName:"Viewport",mixins:[i],propTypes:{rowOffsetHeight:a.number.isRequired,totalWidth:a.oneOfType([a.number,a.string]).isRequired,columnMetrics:a.object.isRequired,rowGetter:a.oneOfType([a.array,a.func]).isRequired,selectedRows:a.array,expandedRows:a.array,rowRenderer:a.func,rowsCount:a.number.isRequired,rowHeight:a.number.isRequired,onRows:a.func,onScroll:a.func,minHeight:a.number,cellMetaData:a.shape(s),rowKey:a.string.isRequired,rowScrollTimeout:a.number,contextMenu:a.element},onScroll:function(e){this.updateScroll(e.scrollTop,e.scrollLeft,this.state.height,this.props.rowHeight,this.props.rowsCount),this.props.onScroll&&this.props.onScroll({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft})},getScroll:function(){return this.refs.canvas.getScroll()},setScrollLeft:function(e){this.refs.canvas.setScrollLeft(e)},render:function(){var e={padding:0,bottom:0,left:0,right:0,overflow:"hidden",position:"absolute",top:this.props.rowOffsetHeight};return o.createElement("div",{ className:"react-grid-Viewport",style:e},o.createElement(n,{ref:"canvas",rowKey:this.props.rowKey,totalWidth:this.props.totalWidth,width:this.props.columnMetrics.width,rowGetter:this.props.rowGetter,rowsCount:this.props.rowsCount,selectedRows:this.props.selectedRows,expandedRows:this.props.expandedRows,columns:this.props.columnMetrics.columns,rowRenderer:this.props.rowRenderer,displayStart:this.state.displayStart,displayEnd:this.state.displayEnd,cellMetaData:this.props.cellMetaData,height:this.state.height,rowHeight:this.props.rowHeight,onScroll:this.onScroll,onRows:this.props.onRows,rowScrollTimeout:this.props.rowScrollTimeout,contextMenu:this.props.contextMenu}))}});e.exports=l},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}var n=r(13),i=o(n),s=r(23),a=o(s),l=r(2),u=r(3),c=r(6),p=l.PropTypes,d=r(86),h=r(87),f=r(94),m=l.createClass({displayName:"Canvas",mixins:[d],propTypes:{rowRenderer:p.oneOfType([p.func,p.element]),rowHeight:p.number.isRequired,height:p.number.isRequired,width:p.number,totalWidth:p.oneOfType([p.number,p.string]),style:p.string,className:p.string,displayStart:p.number.isRequired,displayEnd:p.number.isRequired,rowsCount:p.number.isRequired,rowGetter:p.oneOfType([p.func.isRequired,p.array.isRequired]),expandedRows:p.array,onRows:p.func,onScroll:p.func,columns:p.oneOfType([p.object,p.array]).isRequired,cellMetaData:p.shape(f).isRequired,selectedRows:p.array,rowKey:l.PropTypes.string,rowScrollTimeout:l.PropTypes.number,contextMenu:p.element},getDefaultProps:function(){return{rowRenderer:h,onRows:function(){},selectedRows:[],rowScrollTimeout:0}},getInitialState:function(){return{displayStart:this.props.displayStart,displayEnd:this.props.displayEnd,scrollingTimeout:null}},componentWillMount:function(){this._currentRowsLength=0,this._currentRowsRange={start:0,end:0},this._scroll={scrollTop:0,scrollLeft:0}},componentDidMount:function(){this.onRows()},componentWillReceiveProps:function(e){e.displayStart===this.state.displayStart&&e.displayEnd===this.state.displayEnd||this.setState({displayStart:e.displayStart,displayEnd:e.displayEnd})},shouldComponentUpdate:function(e,t){var r=t.displayStart!==this.state.displayStart||t.displayEnd!==this.state.displayEnd||t.scrollingTimeout!==this.state.scrollingTimeout||e.rowsCount!==this.props.rowsCount||e.rowHeight!==this.props.rowHeight||e.columns!==this.props.columns||e.width!==this.props.width||e.cellMetaData!==this.props.cellMetaData||!(0,i["default"])(e.style,this.props.style);return r},componentWillUnmount:function(){this._currentRowsLength=0,this._currentRowsRange={start:0,end:0},this._scroll={scrollTop:0,scrollLeft:0}},componentDidUpdate:function(){0!==this._scroll.scrollTop&&0!==this._scroll.scrollLeft&&this.setScrollLeft(this._scroll.scrollLeft),this.onRows()},onRows:function(){this._currentRowsRange!=={start:0,end:0}&&(this.props.onRows(this._currentRowsRange),this._currentRowsRange={start:0,end:0})},onScroll:function(e){var t=this;if(u.findDOMNode(this)===e.target){this.appendScrollShim();var r=e.target.scrollLeft,o=e.target.scrollTop,n={scrollTop:o,scrollLeft:r},i=Math.abs(this._scroll.scrollTop-n.scrollTop)/this.props.rowHeight,s=i>this.props.displayEnd-this.props.displayStart;if(this._scroll=n,this.props.onScroll(n),s&&this.props.rowScrollTimeout>0){var a=this.state.scrollingTimeout;a&&clearTimeout(a),a=setTimeout(function(){null!==t.state.scrollingTimeout&&t.setState({scrollingTimeout:null})},this.props.rowScrollTimeout),this.setState({scrollingTimeout:a})}}},getRows:function(e,t){if(this._currentRowsRange={start:e,end:t},Array.isArray(this.props.rowGetter))return this.props.rowGetter.slice(e,t);for(var r=[],o=e;t>o;o++)r.push(this.props.rowGetter(o));return r},getScrollbarWidth:function(){var e=0,t=u.findDOMNode(this);return e=t.offsetWidth-t.clientWidth},getScroll:function(){var e=u.findDOMNode(this),t=e.scrollTop,r=e.scrollLeft;return{scrollTop:t,scrollLeft:r}},isRowSelected:function(e){var t=this,r=this.props.selectedRows.filter(function(r){var o=e.get?e.get(t.props.rowKey):e[t.props.rowKey];return r[t.props.rowKey]===o});return r.length>0&&r[0].isSelected},_currentRowsLength:0,_currentRowsRange:{start:0,end:0},_scroll:{scrollTop:0,scrollLeft:0},setScrollLeft:function(e){if(0!==this._currentRowsLength){if(!this.refs)return;for(var t=0,r=this._currentRowsLength;r>t;t++)this.refs[t]&&this.refs[t].setScrollLeft&&this.refs[t].setScrollLeft(e)}},renderRow:function(e){if(null!==this.state.scrollingTimeout)return this.renderScrollingPlaceholder(e);var t=this.props.rowRenderer;return"function"==typeof t?l.createElement(t,e):l.isValidElement(this.props.rowRenderer)?l.cloneElement(this.props.rowRenderer,e):void 0},renderScrollingPlaceholder:function(e){var t={row:{height:e.height,overflow:"hidden"},cell:{height:e.height,position:"absolute"},placeholder:{backgroundColor:"rgba(211, 211, 211, 0.45)",width:"60%",height:Math.floor(.3*e.height)}};return l.createElement("div",{key:e.key,style:t.row,className:"react-grid-Row"},this.props.columns.map(function(e,r){return l.createElement("div",{style:Object.assign(t.cell,{width:e.width,left:e.left}),key:r,className:"react-grid-Cell"},l.createElement("div",{style:Object.assign(t.placeholder,{width:Math.floor(.6*e.width)})}))}))},renderPlaceholder:function(e,t){return l.createElement("div",{key:e,style:{height:t}},this.props.columns.map(function(e,t){return l.createElement("div",{style:{width:e.width},key:t})}))},render:function(){var e=this,t=this.state.displayStart,r=this.state.displayEnd,o=this.props.rowHeight,n=this.props.rowsCount,i=this.getRows(t,r).map(function(r,n){return e.renderRow({key:t+n,ref:n,idx:t+n,row:r,height:o,columns:e.props.columns,isSelected:e.isRowSelected(r),expandedRows:e.props.expandedRows,cellMetaData:e.props.cellMetaData})});this._currentRowsLength=i.length,t>0&&i.unshift(this.renderPlaceholder("top",t*o)),n-r>0&&i.push(this.renderPlaceholder("bottom",(n-r)*o));var s={position:"absolute",top:0,left:0,overflowX:"auto",overflowY:"scroll",width:this.props.totalWidth,height:this.props.height,transform:"translate3d(0, 0, 0)"};return l.createElement("div",{style:s,onScroll:this.onScroll,className:c("react-grid-Canvas",this.props.className,{opaque:this.props.cellMetaData.selected&&this.props.cellMetaData.selected.active})},l.createElement(a["default"],{width:this.props.width,rows:i,contextMenu:this.props.contextMenu,rowIdx:this.props.cellMetaData.selected.rowIdx,idx:this.props.cellMetaData.selected.idx}))}});e.exports=m},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenuRowsContainer=t.SimpleRowsContainer=void 0;var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),l=r(2),u=o(l),c=r(24),p=function(e){function t(){return n(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return s(t,e),a(t,[{key:"hasContextMenu",value:function(){return this.props.contextMenu&&u["default"].isValidElement(this.props.contextMenu)}},{key:"renderRowsWithContextMenu",value:function(){var e={rowIdx:this.props.rowIdx,idx:this.props.idx},t=u["default"].cloneElement(this.props.contextMenu,e);return u["default"].createElement("div",null,u["default"].createElement(h,this.props),t)}},{key:"render",value:function(){return this.hasContextMenu()?this.renderRowsWithContextMenu():u["default"].createElement(d,this.props)}}]),t}(u["default"].Component);p.propTypes={contextMenu:l.PropTypes.element,rowIdx:l.PropTypes.number,idx:l.PropTypes.number};var d=function(e){function t(){return n(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return s(t,e),a(t,[{key:"render",value:function(){return u["default"].createElement("div",{style:{width:this.props.width,overflow:"hidden"}},this.props.rows)}}]),t}(u["default"].Component);d.propTypes={width:l.PropTypes.number,rows:l.PropTypes.array};var h=(0,c.ContextMenuLayer)("reactDataGridContextMenu")(d);t["default"]=p,t.SimpleRowsContainer=d,t.ContextMenuRowsContainer=h},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=r(25);Object.defineProperty(t,"ContextMenu",{enumerable:!0,get:function(){return o(n)["default"]}});var i=r(78);Object.defineProperty(t,"ContextMenuLayer",{enumerable:!0,get:function(){return o(i)["default"]}});var s=r(81);Object.defineProperty(t,"MenuItem",{enumerable:!0,get:function(){return o(s)["default"]}});var a=r(44);Object.defineProperty(t,"monitor",{enumerable:!0,get:function(){return o(a)["default"]}});var l=r(83);Object.defineProperty(t,"SubMenu",{enumerable:!0,get:function(){return o(l)["default"]}});var u=r(85);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return o(u)["default"]}})},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},i=r(2),s=o(i),a=r(26),l=o(a),u=r(43),c=o(u),p=s["default"].PropTypes,d=s["default"].createClass({displayName:"ContextMenu",propTypes:{identifier:p.string.isRequired},getInitialState:function(){return l["default"].getState()},componentDidMount:function(){this.unsubscribe=l["default"].subscribe(this.handleUpdate)},componentWillUnmount:function(){this.unsubscribe&&this.unsubscribe()},handleUpdate:function(){this.setState(this.getInitialState())},render:function(){return s["default"].createElement(c["default"],n({},this.props,this.state))}});t["default"]=d},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=r(27),i=r(41),s=o(i);t["default"]=(0,n.createStore)(s["default"])},function(e,t,r){(function(e){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(){}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var i=r(29),s=o(i),a=r(36),l=o(a),u=r(38),c=o(u),p=r(39),d=o(p),h=r(40),f=o(h),m=r(37),y=o(m);"production"!==e.env.NODE_ENV&&"string"==typeof n.name&&"isCrushed"!==n.name&&(0,y["default"])("You are currently using minified code outside of NODE_ENV === 'production'. This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) to ensure you have the correct code for your production build."),t.createStore=s["default"],t.combineReducers=l["default"],t.bindActionCreators=c["default"],t.applyMiddleware=d["default"],t.compose=f["default"]}).call(t,r(28))},function(e,t){function r(){u&&s&&(u=!1,s.length?l=s.concat(l):c=-1,l.length&&o())}function o(){if(!u){var e=setTimeout(r);u=!0;for(var t=l.length;t;){for(s=l,l=[];++c<t;)s&&s[c].run();c=-1,t=l.length}s=null,u=!1,clearTimeout(e)}}function n(e,t){this.fun=e,this.array=t}function i(){}var s,a=e.exports={},l=[],u=!1,c=-1;a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new n(e,t)),1!==l.length||u||setTimeout(o,0)},n.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=i,a.addListener=i,a.once=i,a.off=i,a.removeListener=i,a.removeAllListeners=i,a.emit=i,a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t,r){function o(){g===y&&(g=y.slice())}function i(){return m}function a(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return o(),g.push(e),function(){if(t){t=!1,o();var r=g.indexOf(e);g.splice(r,1)}}}function c(e){if(!(0,s["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(v)throw new Error("Reducers may not dispatch actions.");try{v=!0,m=f(m,e)}finally{v=!1}for(var t=y=g,r=0;r<t.length;r++)t[r]();return e}function p(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");f=e,c({type:u.INIT})}function d(){var e,t=a;return e={subscribe:function(e){function r(){e.next&&e.next(i())}if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");r();var o=t(r);return{unsubscribe:o}}},e[l["default"]]=function(){return this},e}var h;if("function"==typeof t&&"undefined"==typeof r&&(r=t,t=void 0),"undefined"!=typeof r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(n)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var f=e,m=t,y=[],g=y,v=!1;return c({type:u.INIT}),h={dispatch:c,subscribe:a,getState:i,replaceReducer:p},h[l["default"]]=d,h}t.__esModule=!0,t.ActionTypes=void 0,t["default"]=n;var i=r(30),s=o(i),a=r(34),l=o(a),u=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,r){function o(e){if(!s(e)||d.call(e)!=a||i(e))return!1;var t=n(e);if(null===t)return!0;var r=c.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==p}var n=r(31),i=r(32),s=r(33),a="[object Object]",l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,p=u.call(Object),d=l.toString;e.exports=o},function(e,t){function r(e){return o(Object(e))}var o=Object.getPrototypeOf;e.exports=r},function(e,t){function r(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}e.exports=r},function(e,t){function r(e){return!!e&&"object"==typeof e}e.exports=r},function(e,t,r){(function(t){"use strict";e.exports=r(35)(t||window||this)}).call(t,function(){return this}())},function(e,t){"use strict";e.exports=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}},function(e,t,r){(function(e){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){var r=t&&t.type,o=r&&'"'+r.toString()+'"'||"an action";return"Given action "+o+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function i(e,t,r){var o=Object.keys(t),n=r&&r.type===l.ActionTypes.INIT?"initialState argument passed to createStore":"previous state received by the reducer";if(0===o.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!(0,c["default"])(e))return"The "+n+' has unexpected type of "'+{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1]+'". Expected argument to be an object with the following '+('keys: "'+o.join('", "')+'"');var i=Object.keys(e).filter(function(e){return!t.hasOwnProperty(e)});return i.length>0?"Unexpected "+(i.length>1?"keys":"key")+" "+('"'+i.join('", "')+'" found in '+n+". ")+"Expected to find one of the known reducer keys instead: "+('"'+o.join('", "')+'". Unexpected keys will be ignored.'):void 0}function s(e){Object.keys(e).forEach(function(t){var r=e[t],o=r(void 0,{type:l.ActionTypes.INIT});if("undefined"==typeof o)throw new Error('Reducer "'+t+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var n="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof r(void 0,{type:n}))throw new Error('Reducer "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle "+l.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function a(t){for(var r=Object.keys(t),o={},a=0;a<r.length;a++){var l=r[a];"function"==typeof t[l]&&(o[l]=t[l])}var u,c=Object.keys(o);try{s(o)}catch(p){u=p}return function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=arguments[1];if(u)throw u;if("production"!==e.env.NODE_ENV){var s=i(t,o,r);s&&(0,d["default"])(s)}for(var a=!1,l={},p=0;p<c.length;p++){var h=c[p],f=o[h],m=t[h],y=f(m,r);if("undefined"==typeof y){var g=n(h,r);throw new Error(g)}l[h]=y,a=a||y!==m}return a?l:t}}t.__esModule=!0,t["default"]=a;var l=r(29),u=r(30),c=o(u),p=r(37),d=o(p)}).call(t,r(28))},function(e,t){"use strict";function r(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t["default"]=r},function(e,t){"use strict";function r(e,t){return function(){return t(e.apply(void 0,arguments))}}function o(e,t){if("function"==typeof e)return r(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var o=Object.keys(e),n={},i=0;i<o.length;i++){var s=o[i],a=e[s];"function"==typeof a&&(n[s]=r(a,t))}return n}t.__esModule=!0,t["default"]=o},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return function(e){return function(r,o,n){var s=e(r,o,n),l=s.dispatch,u=[],c={getState:s.getState,dispatch:function(e){return l(e)}};return u=t.map(function(e){return e(c)}),l=a["default"].apply(void 0,u)(s.dispatch),i({},s,{dispatch:l})}}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e};t["default"]=n;var s=r(40),a=o(s)},function(e,t){"use strict";function r(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];if(0===t.length)return function(e){return e};var o=function(){var e=t[t.length-1],r=t.slice(0,-1);return{v:function(){return r.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}}();return"object"==typeof o?o.v:void 0}t.__esModule=!0,t["default"]=r},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(){var e=arguments.length<=0||void 0===arguments[0]?s:arguments[0],t=arguments[1];return"SET_PARAMS"===t.type?(0,i["default"])({},e,t.data):e};var n=r(42),i=o(n),s={x:0,y:0,isVisible:!1,currentItem:{}}},function(e,t){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;10>r;r++)t["_"+String.fromCharCode(r)]=r;var o=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==o.join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(i){return!1}}var n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=o()?Object.assign:function(e,t){for(var o,s,a=r(e),l=1;l<arguments.length;l++){o=Object(arguments[l]);for(var u in o)n.call(o,u)&&(a[u]=o[u]);if(Object.getOwnPropertySymbols){s=Object.getOwnPropertySymbols(o);for(var c=0;c<s.length;c++)i.call(o,s[c])&&(a[s[c]]=o[s[c]])}}return a}},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},i=r(2),s=o(i),a=r(44),l=o(a),u=r(45),c=o(u),p={position:"fixed",zIndex:1040,top:0,bottom:0,left:0,right:0},d=n({},p,{zIndex:"auto",backgroundColor:"transparent"}),h={position:"fixed",zIndex:"auto"},f=s["default"].createClass({displayName:"ContextMenuWrapper",getInitialState:function(){return{left:0,top:0}},componentWillReceiveProps:function(e){var t=this;if(e.isVisible===e.identifier){var r=window.requestAnimationFrame||setTimeout;r(function(){return t.setState(t.getMenuPosition(e.x,e.y))})}},shouldComponentUpdate:function(e){return this.props.isVisible!==e.visible},getMenuPosition:function(e,t){var r=document.documentElement.scrollTop,o=document.documentElement.scrollLeft,n=window,i=n.innerWidth,s=n.innerHeight,a=this.menu.getBoundingClientRect(),l={top:t+o,left:e+r};return t+a.height>s&&(l.top-=a.height),e+a.width>i&&(l.left-=a.width),l},render:function(){var e=this,t=this.props,r=t.isVisible,o=t.identifier,i=t.children,a=n({},h,this.state);return s["default"].createElement(c["default"],{style:p,backdropStyle:d,show:r===o,onHide:function(){return l["default"].hideMenu()}},s["default"].createElement("nav",{ref:function(t){return e.menu=t},style:a,className:"react-context-menu"},i))}});t["default"]=f},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=r(26),i=o(n);t["default"]={getItem:function(){return i["default"].getState().currentItem},getPosition:function(){var e=i["default"].getState(),t=e.x,r=e.y;return{x:t,y:r}},hideMenu:function(){i["default"].dispatch({type:"SET_PARAMS",data:{isVisible:!1,currentItem:{}}})}}},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},s=r(2),a=o(s),l=r(46),u=o(l),c=r(47),p=o(c),d=r(49),h=o(d),f=r(50),m=o(f),y=r(54),g=o(y),v=r(51),w=o(v),b=r(72),C=o(b),x=r(75),T=o(x),S=r(68),R=o(S),M=r(76),E=o(M),D=r(77),O=o(D),P=r(53),_=o(P),k=new g["default"],I=a["default"].createClass({displayName:"Modal",propTypes:i({},m["default"].propTypes,{show:a["default"].PropTypes.bool,container:a["default"].PropTypes.oneOfType([p["default"],a["default"].PropTypes.func]),onShow:a["default"].PropTypes.func,onHide:a["default"].PropTypes.func,backdrop:a["default"].PropTypes.oneOfType([a["default"].PropTypes.bool,a["default"].PropTypes.oneOf(["static"])]),onEscapeKeyUp:a["default"].PropTypes.func,onBackdropClick:a["default"].PropTypes.func,backdropStyle:a["default"].PropTypes.object,backdropClassName:a["default"].PropTypes.string,containerClassName:a["default"].PropTypes.string,keyboard:a["default"].PropTypes.bool,transition:h["default"],dialogTransitionTimeout:a["default"].PropTypes.number,backdropTransitionTimeout:a["default"].PropTypes.number,autoFocus:a["default"].PropTypes.bool,enforceFocus:a["default"].PropTypes.bool,onEnter:a["default"].PropTypes.func,onEntering:a["default"].PropTypes.func,onEntered:a["default"].PropTypes.func,onExit:a["default"].PropTypes.func,onExiting:a["default"].PropTypes.func,onExited:a["default"].PropTypes.func}),getDefaultProps:function(){var e=function(){};return{show:!1,backdrop:!0,keyboard:!0,autoFocus:!0,enforceFocus:!0,onHide:e}},getInitialState:function(){return{exited:!this.props.show}},render:function(){var e=this.props,t=(e.children,e.transition),r=e.backdrop,o=e.dialogTransitionTimeout,i=n(e,["children","transition","backdrop","dialogTransitionTimeout"]),l=i.onExit,u=i.onExiting,c=i.onEnter,p=i.onEntering,d=i.onEntered,h=!!i.show,f=a["default"].Children.only(this.props.children),y=h||t&&!this.state.exited;if(!y)return null;var g=f.props,v=g.role,w=g.tabIndex;return void 0!==v&&void 0!==w||(f=s.cloneElement(f,{role:void 0===v?"document":v,tabIndex:null==w?"-1":w})),t&&(f=a["default"].createElement(t,{transitionAppear:!0,unmountOnExit:!0,"in":h,timeout:o,onExit:l,onExiting:u,onExited:this.handleHidden,onEnter:c,onEntering:p,onEntered:d},f)),a["default"].createElement(m["default"],{ref:this.setMountNode,container:i.container},a["default"].createElement("div",{ref:"modal",role:i.role||"dialog",style:i.style,className:i.className},r&&this.renderBackdrop(),f))},renderBackdrop:function(){var e=this.props,t=e.transition,r=e.backdropTransitionTimeout,o=a["default"].createElement("div",{ref:"backdrop",style:this.props.backdropStyle,className:this.props.backdropClassName,onClick:this.handleBackdropClick});return t&&(o=a["default"].createElement(t,{transitionAppear:!0,"in":this.props.show,timeout:r},o)),o},componentWillReceiveProps:function(e){e.show?this.setState({exited:!1}):e.transition||this.setState({exited:!0})},componentWillUpdate:function(e){e.show&&this.checkForFocus()},componentDidMount:function(){this.props.show&&this.onShow()},componentDidUpdate:function(e){var t=this.props.transition;!e.show||this.props.show||t?!e.show&&this.props.show&&this.onShow():this.onHide()},componentWillUnmount:function(){var e=this.props,t=e.show,r=e.transition;(t||r&&!this.state.exited)&&this.onHide()},onShow:function(){var e=w["default"](this),t=_["default"](this.props.container,e.body);k.add(this,t,this.props.containerClassName),this._onDocumentKeyupListener=C["default"](e,"keyup",this.handleDocumentKeyUp),this._onFocusinListener=T["default"](this.enforceFocus),this.focus(),this.props.onShow&&this.props.onShow()},onHide:function(){k.remove(this),this._onDocumentKeyupListener.remove(),this._onFocusinListener.remove(),this.restoreLastFocus()},setMountNode:function(e){this.mountNode=e?e.getMountNode():e},handleHidden:function(){if(this.setState({exited:!0}),this.onHide(),this.props.onExited){var e;(e=this.props).onExited.apply(e,arguments)}},handleBackdropClick:function(e){e.target===e.currentTarget&&(this.props.onBackdropClick&&this.props.onBackdropClick(e),this.props.backdrop===!0&&this.props.onHide())},handleDocumentKeyUp:function(e){this.props.keyboard&&27===e.keyCode&&this.isTopModal()&&(this.props.onEscapeKeyUp&&this.props.onEscapeKeyUp(e),this.props.onHide())},checkForFocus:function(){R["default"]&&(this.lastFocus=E["default"]())},focus:function(){var e=this.props.autoFocus,t=this.getDialogElement(),r=E["default"](w["default"](this)),o=r&&O["default"](t,r);t&&e&&!o&&(this.lastFocus=r,t.hasAttribute("tabIndex")||(t.setAttribute("tabIndex",-1),u["default"](!1,'The modal content node does not accept focus. For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".')),t.focus())},restoreLastFocus:function(){this.lastFocus&&this.lastFocus.focus&&(this.lastFocus.focus(),this.lastFocus=null)},enforceFocus:function N(){var N=this.props.enforceFocus;if(N&&this.isMounted()&&this.isTopModal()){var e=E["default"](w["default"](this)),t=this.getDialogElement();t&&t!==e&&!O["default"](t,e)&&t.focus()}},getDialogElement:function(){var e=this.refs.modal;return e&&e.lastChild},isTopModal:function(){return k.isTopModal(this)}});I.manager=k,t["default"]=I,e.exports=t["default"]},function(e,t,r){(function(t){"use strict";var r=function(){};"production"!==t.env.NODE_ENV&&(r=function(e,t,r){var o=arguments.length;r=new Array(o>2?o-2:0);for(var n=2;o>n;n++)r[n-2]=arguments[n];if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(!e){var i=0,s="Warning: "+t.replace(/%s/g,function(){return r[i++]});"undefined"!=typeof console&&console.error(s);try{throw new Error(s)}catch(a){}}}),e.exports=r}).call(t,r(28))},function(e,t,r){"use strict";function o(e,t,r){return"object"!=typeof e[t]||"function"!=typeof e[t].render&&1!==e[t].nodeType?new Error(n.errMsg(e,t,r,", expected a DOM element or an object that has a `render` method")):void 0}t.__esModule=!0;var n=r(48);t["default"]=n.createChainableTypeChecker(o),e.exports=t["default"]},function(e,t){"use strict";function r(e,t,r,o){return"Invalid prop '"+t+"' of value '"+e[t]+"'"+(" supplied to '"+r+"'"+o)}function o(e){function t(t,r,o,n){return n=n||"<<anonymous>>",null!=r[o]?e(r,o,n):t?new Error("Required prop '"+o+"' was not specified in '"+n+"'."):void 0}var r=t.bind(null,!1);return r.isRequired=t.bind(null,!0),r}t.__esModule=!0,t.errMsg=r,t.createChainableTypeChecker=o},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t,r){var o=a.errMsg(e,t,r,". Expected an Element `type`");if("function"!=typeof e[t]){if(s["default"].isValidElement(e[t]))return new Error(o+", not an actual Element");if("string"!=typeof e[t])return new Error(o+" such as a tag name or return value of React.createClass(...)")}}t.__esModule=!0;var i=r(2),s=o(i),a=r(48);t["default"]=a.createChainableTypeChecker(n),e.exports=t["default"]},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var n=r(2),i=o(n),s=r(3),a=o(s),l=r(47),u=o(l),c=r(51),p=o(c),d=r(53),h=o(d),f=i["default"].createClass({displayName:"Portal",propTypes:{container:i["default"].PropTypes.oneOfType([u["default"],i["default"].PropTypes.func])},componentDidMount:function(){this._renderOverlay()},componentDidUpdate:function(){this._renderOverlay()},componentWillReceiveProps:function(e){this._overlayTarget&&e.container!==this.props.container&&(this._portalContainerNode.removeChild(this._overlayTarget),this._portalContainerNode=h["default"](e.container,p["default"](this).body),this._portalContainerNode.appendChild(this._overlayTarget))},componentWillUnmount:function(){this._unrenderOverlay(),this._unmountOverlayTarget()},_mountOverlayTarget:function(){this._overlayTarget||(this._overlayTarget=document.createElement("div"),this._portalContainerNode=h["default"](this.props.container,p["default"](this).body),this._portalContainerNode.appendChild(this._overlayTarget))},_unmountOverlayTarget:function(){this._overlayTarget&&(this._portalContainerNode.removeChild(this._overlayTarget),this._overlayTarget=null),this._portalContainerNode=null},_renderOverlay:function(){var e=this.props.children?i["default"].Children.only(this.props.children):null;null!==e?(this._mountOverlayTarget(),this._overlayInstance=a["default"].unstable_renderSubtreeIntoContainer(this,e,this._overlayTarget)):(this._unrenderOverlay(),this._unmountOverlayTarget())},_unrenderOverlay:function(){this._overlayTarget&&(a["default"].unmountComponentAtNode(this._overlayTarget),this._overlayInstance=null)},render:function(){return null},getMountNode:function(){return this._overlayTarget},getOverlayDOMNode:function(){if(!this.isMounted())throw new Error("getOverlayDOMNode(): A component must be mounted to have a DOM node.");return this._overlayInstance?this._overlayInstance.getWrappedDOMNode?this._overlayInstance.getWrappedDOMNode():a["default"].findDOMNode(this._overlayInstance):null; }});t["default"]=f,e.exports=t["default"]},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var n=r(3),i=o(n),s=r(52),a=o(s);t["default"]=function(e){return a["default"](i["default"].findDOMNode(e))},e.exports=t["default"]},function(e,t){"use strict";function r(e){return e&&e.ownerDocument||document}t.__esModule=!0,t["default"]=r,e.exports=t["default"]},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){return e="function"==typeof e?e():e,s["default"].findDOMNode(e)||t}t.__esModule=!0,t["default"]=n;var i=r(3),s=o(i);e.exports=t["default"]},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){var r=-1;return e.some(function(e,o){return t(e,o)?(r=o,!0):void 0}),r}function s(e,t){return i(e,function(e){return-1!==e.modals.indexOf(t)})}t.__esModule=!0;var a=r(55),l=o(a),u=r(63),c=o(u),p=r(67),d=o(p),h=r(69),f=o(h),m=r(71),y=function(){function e(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];n(this,e),this.hideSiblingNodes=t,this.modals=[],this.containers=[],this.data=[]}return e.prototype.add=function(e,t,r){var o=this.modals.indexOf(e),n=this.containers.indexOf(t);if(-1!==o)return o;if(o=this.modals.length,this.modals.push(e),this.hideSiblingNodes&&m.hideSiblings(t,e.mountNode),-1!==n)return this.data[n].modals.push(e),o;var i={modals:[e],classes:r?r.split(/\s+/):[],style:{overflow:t.style.overflow,paddingRight:t.style.paddingRight}},s={overflow:"hidden"};return i.overflowing=f["default"](t),i.overflowing&&(s.paddingRight=parseInt(l["default"](t,"paddingRight")||0,10)+d["default"]()+"px"),l["default"](t,s),i.classes.forEach(c["default"].addClass.bind(null,t)),this.containers.push(t),this.data.push(i),o},e.prototype.remove=function(e){var t=this.modals.indexOf(e);if(-1!==t){var r=s(this.data,e),o=this.data[r],n=this.containers[r];o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(t,1),0===o.modals.length?(Object.keys(o.style).forEach(function(e){return n.style[e]=o.style[e]}),o.classes.forEach(c["default"].removeClass.bind(null,n)),this.hideSiblingNodes&&m.showSiblings(n,e.mountNode),this.containers.splice(r,1),this.data.splice(r,1)):this.hideSiblingNodes&&m.ariaHidden(!1,o.modals[o.modals.length-1].mountNode)}},e.prototype.isTopModal=function(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e},e}();t["default"]=y,e.exports=t["default"]},function(e,t,r){"use strict";var o=r(56),n=r(58),i=r(60),s=r(62),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var l="",u=t;if("string"==typeof t){if(void 0===r)return e.style[o(t)]||i(e).getPropertyValue(n(t));(u={})[t]=r}for(var c in u)a.call(u,c)&&(u[c]||0===u[c]?l+=n(c)+":"+u[c]+";":s(e,n(c)));e.style.cssText+=";"+l}},function(e,t,r){"use strict";var o=r(57),n=/^-ms-/;e.exports=function(e){return o(e.replace(n,"ms-"))}},function(e,t){"use strict";var r=/-(.)/g;e.exports=function(e){return e.replace(r,function(e,t){return t.toUpperCase()})}},function(e,t,r){"use strict";var o=r(59),n=/^ms-/;e.exports=function(e){return o(e).replace(n,"-ms-")}},function(e,t){"use strict";var r=/([A-Z])/g;e.exports=function(e){return e.replace(r,"-$1").toLowerCase()}},function(e,t,r){"use strict";var o=r(61),n=r(56),i=o.interopRequireDefault(n),s=/^(top|right|bottom|left)$/,a=/^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i;e.exports=function(e){if(!e)throw new TypeError("No Element passed to `getComputedStyle()`");var t=e.ownerDocument;return"defaultView"in t?t.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):window.getComputedStyle(e,null):{getPropertyValue:function(t){var r=e.style;t=(0,i["default"])(t),"float"==t&&(t="styleFloat");var o=e.currentStyle[t]||null;if(null==o&&r&&r[t]&&(o=r[t]),a.test(o)&&!s.test(t)){var n=r.left,l=e.runtimeStyle,u=l&&l.left;u&&(l.left=e.currentStyle.left),r.left="fontSize"===t?"1em":o,o=r.pixelLeft+"px",r.left=n,u&&(l.left=u)}return o}}}},function(e,t,r){var o,n,i;!function(r,s){n=[t],o=s,i="function"==typeof o?o.apply(t,n):o,!(void 0!==i&&(e.exports=i))}(this,function(e){var t=e;t.interopRequireDefault=function(e){return e&&e.__esModule?e:{"default":e}},t._extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}})},function(e,t){"use strict";e.exports=function(e,t){return"removeProperty"in e.style?e.style.removeProperty(t):e.style.removeAttribute(t)}},function(e,t,r){"use strict";e.exports={addClass:r(64),removeClass:r(66),hasClass:r(65)}},function(e,t,r){"use strict";var o=r(65);e.exports=function(e,t){e.classList?e.classList.add(t):o(e)||(e.className=e.className+" "+t)}},function(e,t){"use strict";e.exports=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+e.className+" ").indexOf(" "+t+" ")}},function(e,t){"use strict";e.exports=function(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}},function(e,t,r){"use strict";var o,n=r(68);e.exports=function(e){if((!o||e)&&n){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),o=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return o}},function(e,t){"use strict";e.exports=!("undefined"==typeof window||!window.document||!window.document.createElement)},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e){return e&&"body"===e.tagName.toLowerCase()}function i(e){var t=c["default"](e),r=l["default"](t),o=r.innerWidth;if(!o){var n=t.documentElement.getBoundingClientRect();o=n.right-Math.abs(n.left)}return t.body.clientWidth<o}function s(e){var t=l["default"](e);return t||n(e)?i(e):e.scrollHeight>e.clientHeight}t.__esModule=!0,t["default"]=s;var a=r(70),l=o(a),u=r(52),c=o(u);e.exports=t["default"]},function(e,t){"use strict";e.exports=function(e){return e===e.window?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}},function(e,t){"use strict";function r(e,t){t&&(e?t.setAttribute("aria-hidden","true"):t.removeAttribute("aria-hidden"))}function o(e,t){a(e,t,function(e){return r(!0,e)})}function n(e,t){a(e,t,function(e){return r(!1,e)})}t.__esModule=!0,t.ariaHidden=r,t.hideSiblings=o,t.showSiblings=n;var i=["template","script","style"],s=function(e){var t=e.nodeType,r=e.tagName;return 1===t&&-1===i.indexOf(r.toLowerCase())},a=function(e,t,r){t=[].concat(t),[].forEach.call(e.children,function(e){-1===t.indexOf(e)&&s(e)&&r(e)})}},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var n=r(73),i=o(n),s=r(74),a=o(s);t["default"]=function(e,t,r){return i["default"](e,t,r),{remove:function(){a["default"](e,t,r)}}},e.exports=t["default"]},function(e,t,r){"use strict";var o=r(68),n=function(){};o&&(n=function(){return document.addEventListener?function(e,t,r,o){return e.addEventListener(t,r,o||!1)}:document.attachEvent?function(e,t,r){return e.attachEvent("on"+t,r)}:void 0}()),e.exports=n},function(e,t,r){"use strict";var o=r(68),n=function(){};o&&(n=function(){return document.addEventListener?function(e,t,r,o){return e.removeEventListener(t,r,o||!1)}:document.attachEvent?function(e,t,r){return e.detachEvent("on"+t,r)}:void 0}()),e.exports=n},function(e,t){"use strict";function r(e){var t=!document.addEventListener,r=void 0;return t?(document.attachEvent("onfocusin",e),r=function(){return document.detachEvent("onfocusin",e)}):(document.addEventListener("focus",e,!0),r=function(){return document.removeEventListener("focus",e,!0)}),{remove:r}}t.__esModule=!0,t["default"]=r,e.exports=t["default"]},function(e,t,r){"use strict";function o(){var e=void 0===arguments[0]?document:arguments[0];try{return e.activeElement}catch(t){}}var n=r(61);t.__esModule=!0,t["default"]=o;var i=r(52);n.interopRequireDefault(i);e.exports=t["default"]},function(e,t,r){"use strict";var o=r(68),n=function(){var e=o&&document.documentElement;return e&&e.contains?function(e,t){return e.contains(t)}:e&&e.compareDocumentPosition?function(e,t){return e===t||!!(16&e.compareDocumentPosition(t))}:function(e,t){if(t)do if(t===e)return!0;while(t=t.parentNode);return!1}}();e.exports=n},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t["default"]=function(e,t){return function(r){var o=r.displayName||r.name||"Component";return(0,u["default"])(e&&("string"==typeof e||"symbol"===("undefined"==typeof e?"undefined":i(e))||"function"==typeof e),"Expected identifier to be string, symbol or function. See %s",o),t&&(0,u["default"])("function"==typeof t,"Expected configure to be a function. See %s",o),a["default"].createClass({displayName:o+"ContextMenuLayer",getDefaultProps:function(){return{renderTag:"div",attributes:{}}},handleContextClick:function(r){var n="function"==typeof t?t(this.props):{};(0,u["default"])((0,p["default"])(n),"Expected configure to return an object. See %s",o),r.preventDefault(),h["default"].dispatch({type:"SET_PARAMS",data:{x:r.clientX,y:r.clientY,currentItem:n,isVisible:"function"==typeof e?e(this.props):e}})},render:function(){var e=this.props,t=e.attributes,o=t.className,i=void 0===o?"":o,s=n(t,["className"]),l=e.renderTag,u=n(e,["attributes","renderTag"]);return s.className="react-context-menu-wrapper "+i,s.onContextMenu=this.handleContextClick,a["default"].createElement(l,s,a["default"].createElement(r,u))}})}};var s=r(2),a=o(s),l=r(79),u=o(l),c=r(80),p=o(c),d=r(26),h=o(d)},function(e,t,r){(function(t){"use strict";var r=function(e,r,o,n,i,s,a,l){if("production"!==t.env.NODE_ENV&&void 0===r)throw new Error("invariant requires an error message argument");if(!e){var u;if(void 0===r)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[o,n,i,s,a,l],p=0;u=new Error(r.replace(/%s/g,function(){return c[p++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};e.exports=r}).call(t,r(28))},function(e,t){function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=r},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){var r={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o]);return r}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},s=r(2),a=o(s),l=r(82),u=o(l),c=r(42),p=o(c),d=r(44),h=o(d),f=a["default"].PropTypes,m=a["default"].createClass({displayName:"MenuItem",propTypes:{onClick:f.func.isRequired,data:f.object,disabled:f.bool,preventClose:f.bool},getDefaultProps:function(){return{disabled:!1,data:{},attributes:{}}},handleClick:function(e){var t=this.props,r=t.disabled,o=t.onClick,n=t.data,i=t.preventClose;e.preventDefault(),r||((0,p["default"])(n,h["default"].getItem()),"function"==typeof o&&o(e,n),i||h["default"].hideMenu())},render:function(){var e=this.props,t=e.disabled,r=e.children,o=e.attributes,s=o.className,l=void 0===s?"":s,c=n(o,["className"]),p="react-context-menu-item "+l,d=(0,u["default"])({"react-context-menu-link":!0,disabled:t});return a["default"].createElement("div",i({className:p},c),a["default"].createElement("a",{href:"#",className:d,onClick:this.handleClick},r))}});t["default"]=m},function(e,t,r){var o,n;!function(){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var n=typeof o;if("string"===n||"number"===n)e.push(o);else if(Array.isArray(o))e.push(r.apply(null,o));else if("object"===n)for(var s in o)i.call(o,s)&&o[s]&&e.push(s)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=r:(o=[],n=function(){return r}.apply(t,o),!(void 0!==n&&(e.exports=n)))}()},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),i=o(n),s=r(82),a=o(s),l=r(84),u=o(l),c={position:"relative",zIndex:"auto"},p=i["default"].createClass({displayName:"SubMenu",propTypes:{title:i["default"].PropTypes.string.isRequired,disabled:i["default"].PropTypes.bool,hoverDelay:i["default"].PropTypes.number},getDefaultProps:function(){return{hoverDelay:500}},getInitialState:function(){return{visible:!1}},shouldComponentUpdate:function(e,t){return this.state.isVisible!==t.visible},handleClick:function(e){e.preventDefault()},handleMouseEnter:function(){var e=this;this.closetimer&&clearTimeout(this.closetimer),this.props.disabled||this.state.visible||(this.opentimer=setTimeout(function(){return e.setState({visible:!0})},this.props.hoverDelay))},handleMouseLeave:function(){var e=this;this.opentimer&&clearTimeout(this.opentimer),this.state.visible&&(this.closetimer=setTimeout(function(){return e.setState({visible:!1})},this.props.hoverDelay))},render:function(){var e=this,t=this.props,r=t.disabled,o=t.children,n=t.title,s=this.state.visible,l=(0,a["default"])({"react-context-menu-link":!0,disabled:r,active:s}),p="react-context-menu-item submenu";return i["default"].createElement("div",{ref:function(t){return e.item=t},className:p,style:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},i["default"].createElement("a",{href:"#",className:l,onClick:this.handleClick},n),i["default"].createElement(u["default"],{visible:s},o))}});t["default"]=p},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},i=r(2),s=o(i),a=s["default"].createClass({displayName:"SubMenuWrapper",propTypes:{visible:s["default"].PropTypes.bool},getInitialState:function(){return{position:{top:!0,right:!0}}},componentWillReceiveProps:function(e){var t=this;if(e.visible){var r=window.requestAnimationFrame||setTimeout;r(function(){t.setState(t.getMenuPosition()),t.forceUpdate()})}else this.setState(this.getInitialState())},shouldComponentUpdate:function(e){return this.props.visible!==e.visible},getMenuPosition:function(){var e=window,t=e.innerWidth,r=e.innerHeight,o=this.menu.getBoundingClientRect(),n={};return o.bottom>r?n.bottom=!0:n.top=!0,o.right>t?n.left=!0:n.right=!0,{position:n}},getPositionStyles:function(){var e={},t=this.state.position;return t.top&&(e.top=0),t.bottom&&(e.bottom=0),t.right&&(e.left="100%"),t.left&&(e.right="100%"),e},render:function(){var e=this,t=this.props,r=t.children,o=t.visible,i=n({display:o?"block":"none",position:"absolute"},this.getPositionStyles());return s["default"].createElement("nav",{ref:function(t){return e.menu=t},style:i,className:"react-context-menu"},r)}});t["default"]=a},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e};t["default"]=function(e){var t=e.displayName||e.name||"Component";return s["default"].createClass({displayName:"ContextMenuConnector("+t+")",getInitialState:function(){return{item:l["default"].getState().currentItem}},componentDidMount:function(){this.unsubscribe=l["default"].subscribe(this.handleUpdate)},componentWillUnmount:function(){this.unsubscribe()},handleUpdate:function(){this.setState(this.getInitialState())},render:function(){return s["default"].createElement(e,n({},this.props,{item:this.state.item}))}})};var i=r(2),s=o(i),a=r(26),l=o(a)},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}var n=r(3),i=o(n),s={appendScrollShim:function(){if(!this._scrollShim){var e=this._scrollShimSize(),t=document.createElement("div");t.classList?t.classList.add("react-grid-ScrollShim"):t.className+=" react-grid-ScrollShim",t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.width=e.width+"px",t.style.height=e.height+"px",i["default"].findDOMNode(this).appendChild(t),this._scrollShim=t}this._scheduleRemoveScrollShim()},_scrollShimSize:function(){return{width:this.props.width,height:this.props.length*this.props.rowHeight}},_scheduleRemoveScrollShim:function(){this._scheduleRemoveScrollShimTimer&&clearTimeout(this._scheduleRemoveScrollShimTimer),this._scheduleRemoveScrollShimTimer=setTimeout(this._removeScrollShim,200)},_removeScrollShim:function(){this._scrollShim&&(this._scrollShim.parentNode.removeChild(this._scrollShim),this._scrollShim=void 0)}};e.exports=s},function(e,t,r){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},n=r(2),i=r(6),s=r(88),a=r(8),l=r(10),u=r(94),c=n.PropTypes,p=n.createClass({displayName:"Row",propTypes:{height:c.number.isRequired,columns:c.oneOfType([c.object,c.array]).isRequired,row:c.any.isRequired,cellRenderer:c.func,cellMetaData:c.shape(u),isSelected:c.bool,idx:c.number.isRequired,key:c.string,expandedRows:c.arrayOf(c.object)},mixins:[l],getDefaultProps:function(){return{cellRenderer:s,isSelected:!1,height:35}},shouldComponentUpdate:function(e){return!a.sameColumns(this.props.columns,e.columns,a.sameColumn)||this.doesRowContainSelectedCell(this.props)||this.doesRowContainSelectedCell(e)||this.willRowBeDraggedOver(e)||e.row!==this.props.row||this.hasRowBeenCopied()||this.props.isSelected!==e.isSelected||e.height!==this.props.height},handleDragEnter:function(){var e=this.props.cellMetaData.handleDragEnterRow;e&&e(this.props.idx)},getSelectedColumn:function(){var e=this.props.cellMetaData.selected;return e&&e.idx?this.getColumn(this.props.columns,e.idx):void 0},getCells:function(){var e=this,t=[],r=[],o=this.getSelectedColumn();return this.props.columns.forEach(function(i,s){var a=e.props.cellRenderer,l=n.createElement(a,{ref:s,key:i.key+"-"+s,idx:s,rowIdx:e.props.idx,value:e.getCellValue(i.key||s),column:i,height:e.getRowHeight(),formatter:i.formatter,cellMetaData:e.props.cellMetaData,rowData:e.props.row,selectedColumn:o,isRowSelected:e.props.isSelected});i.locked?r.push(l):t.push(l)}),t.concat(r)},getRowHeight:function(){var e=this.props.expandedRows||null;if(e&&this.props.key){var t=e[this.props.key]||null;if(t)return t.height}return this.props.height},getCellValue:function(e){var t=void 0;return"select-row"===e?this.props.isSelected:t="function"==typeof this.props.row.get?this.props.row.get(e):this.props.row[e]},setScrollLeft:function(e){var t=this;this.props.columns.forEach(function(r,o){if(r.locked){if(!t.refs[o])return;t.refs[o].setScrollLeft(e)}})},doesRowContainSelectedCell:function(e){var t=e.cellMetaData.selected;return!(!t||t.rowIdx!==e.idx)},isContextMenuDisplayed:function(){var e=this.props.cellMetaData.selected;return!(!e||!e.contextMenuDisplayed||e.rowIdx!==this.props.idx)},willRowBeDraggedOver:function(e){var t=e.cellMetaData.dragged;return null!=t&&(t.rowIdx>=0||t.complete===!0)},hasRowBeenCopied:function(){var e=this.props.cellMetaData.copied;return null!=e&&e.rowIdx===this.props.idx},renderCell:function(e){return"function"==typeof this.props.cellRenderer&&this.props.cellRenderer.call(this,e),n.isValidElement(this.props.cellRenderer)?n.cloneElement(this.props.cellRenderer,e):this.props.cellRenderer(e)},render:function(){var e=i("react-grid-Row","react-grid-Row--"+(this.props.idx%2===0?"even":"odd"),{"row-selected":this.props.isSelected,"row-context-menu":this.isContextMenuDisplayed()}),t={height:this.getRowHeight(this.props),overflow:"hidden"},r=this.getCells();return n.createElement("div",o({},this.props,{className:e,style:t,onDragEnter:this.handleDragEnter}),n.isValidElement(this.props.row)?this.props.row:r)}});e.exports=p},function(e,t,r){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},n=r(2),i=r(3),s=r(6),a=r(89),l=r(15),u=r(93),c=r(94),p=r(95),d=n.createClass({displayName:"Cell",propTypes:{rowIdx:n.PropTypes.number.isRequired,idx:n.PropTypes.number.isRequired,selected:n.PropTypes.shape({idx:n.PropTypes.number.isRequired}),selectedColumn:n.PropTypes.object,height:n.PropTypes.number,tabIndex:n.PropTypes.number,ref:n.PropTypes.string,column:n.PropTypes.shape(l).isRequired,value:n.PropTypes.oneOfType([n.PropTypes.string,n.PropTypes.number,n.PropTypes.object,n.PropTypes.bool]).isRequired,isExpanded:n.PropTypes.bool,isRowSelected:n.PropTypes.bool,cellMetaData:n.PropTypes.shape(c).isRequired,handleDragStart:n.PropTypes.func,className:n.PropTypes.string,cellControls:n.PropTypes.any,rowData:n.PropTypes.object.isRequired},getDefaultProps:function(){return{tabIndex:-1,ref:"cell",isExpanded:!1}},getInitialState:function(){return{isRowChanging:!1,isCellValueChanging:!1}},componentDidMount:function(){this.checkFocus()},componentWillReceiveProps:function(e){this.setState({isRowChanging:this.props.rowData!==e.rowData,isCellValueChanging:this.props.value!==e.value})},componentDidUpdate:function(){this.checkFocus();var e=this.props.cellMetaData.dragged;e&&e.complete===!0&&this.props.cellMetaData.handleTerminateDrag(),this.state.isRowChanging&&null!=this.props.selectedColumn&&this.applyUpdateClass()},shouldComponentUpdate:function(e){return this.props.column.width!==e.column.width||this.props.column.left!==e.column.left||this.props.rowData!==e.rowData||this.props.height!==e.height||this.props.rowIdx!==e.rowIdx||this.isCellSelectionChanging(e)||this.isDraggedCellChanging(e)||this.isCopyCellChanging(e)||this.props.isRowSelected!==e.isRowSelected||this.isSelected()||this.props.value!==e.value},onCellClick:function(){var e=this.props.cellMetaData;null!=e&&"function"==typeof e.onCellClick&&e.onCellClick({rowIdx:this.props.rowIdx,idx:this.props.idx})},onCellContextMenu:function(){var e=this.props.cellMetaData;null!=e&&"function"==typeof e.onCellContextMenu&&e.onCellContextMenu({rowIdx:this.props.rowIdx,idx:this.props.idx})},onCellDoubleClick:function(){var e=this.props.cellMetaData;null!=e&&"function"==typeof e.onCellDoubleClick&&e.onCellDoubleClick({rowIdx:this.props.rowIdx,idx:this.props.idx})},onDragHandleDoubleClick:function(e){e.stopPropagation();var t=this.props.cellMetaData;null!=t&&"function"==typeof(null!=t.onDragHandleDoubleClick)&&t.onDragHandleDoubleClick({rowIdx:this.props.rowIdx,idx:this.props.idx,rowData:this.getRowData()})},onDragOver:function(e){e.preventDefault()},getStyle:function(){var e={position:"absolute",width:this.props.column.width,height:this.props.height,left:this.props.column.left};return e},getFormatter:function(){var e=this.props.column;return this.isActive()?n.createElement(a,{rowData:this.getRowData(),rowIdx:this.props.rowIdx,idx:this.props.idx,cellMetaData:this.props.cellMetaData,column:e,height:this.props.height}):this.props.column.formatter},getRowData:function(){return this.props.rowData.toJSON?this.props.rowData.toJSON():this.props.rowData},getFormatterDependencies:function(){return"function"==typeof this.props.column.getRowMetaData?this.props.column.getRowMetaData(this.getRowData(),this.props.column):void 0},getCellClass:function(){var e=s(this.props.column.cellClass,"react-grid-Cell",this.props.className,this.props.column.locked?"react-grid-Cell--locked":null),t=s({"row-selected":this.props.isRowSelected,selected:this.isSelected()&&!this.isActive()&&this.isCellSelectEnabled(),editing:this.isActive(),copied:this.isCopied()||this.wasDraggedOver()||this.isDraggedOverUpwards()||this.isDraggedOverDownwards(),"active-drag-cell":this.isSelected()||this.isDraggedOver(),"is-dragged-over-up":this.isDraggedOverUpwards(),"is-dragged-over-down":this.isDraggedOverDownwards(),"was-dragged-over":this.wasDraggedOver()});return s(e,t)},getUpdateCellClass:function(){return this.props.column.getUpdateCellClass?this.props.column.getUpdateCellClass(this.props.selectedColumn,this.props.column,this.state.isCellValueChanging):""},isColumnSelected:function(){var e=this.props.cellMetaData;return null==e?!1:e.selected&&e.selected.idx===this.props.idx},isSelected:function(){var e=this.props.cellMetaData;return null==e?!1:e.selected&&e.selected.rowIdx===this.props.rowIdx&&e.selected.idx===this.props.idx},isActive:function(){var e=this.props.cellMetaData;return null==e?!1:this.isSelected()&&e.selected.active===!0},isCellSelectionChanging:function(e){var t=this.props.cellMetaData;if(null==t)return!1;var r=e.cellMetaData.selected;return t.selected&&r?this.props.idx===r.idx||this.props.idx===t.selected.idx:!0},isCellSelectEnabled:function(){var e=this.props.cellMetaData;return null==e?!1:e.enableCellSelect},applyUpdateClass:function(){var e=this.getUpdateCellClass();if(null!=e&&""!==e){var t=i.findDOMNode(this);t.classList?(t.classList.remove(e),t.classList.add(e)):-1===t.className.indexOf(e)&&(t.className=t.className+" "+e)}},setScrollLeft:function(e){var t=this;if(t.isMounted()){var r=i.findDOMNode(this),o="translate3d("+e+"px, 0px, 0px)";r.style.webkitTransform=o,r.style.transform=o}},isCopied:function(){var e=this.props.cellMetaData.copied;return e&&e.rowIdx===this.props.rowIdx&&e.idx===this.props.idx},isDraggedOver:function(){var e=this.props.cellMetaData.dragged;return e&&e.overRowIdx===this.props.rowIdx&&e.idx===this.props.idx},wasDraggedOver:function(){var e=this.props.cellMetaData.dragged;return e&&(e.overRowIdx<this.props.rowIdx&&this.props.rowIdx<e.rowIdx||e.overRowIdx>this.props.rowIdx&&this.props.rowIdx>e.rowIdx)&&e.idx===this.props.idx},isDraggedCellChanging:function(e){var t=void 0,r=this.props.cellMetaData.dragged,o=e.cellMetaData.dragged;return r?t=o&&this.props.idx===o.idx||r&&this.props.idx===r.idx:!1},isCopyCellChanging:function(e){var t=void 0,r=this.props.cellMetaData.copied,o=e.cellMetaData.copied;return r?t=o&&this.props.idx===o.idx||r&&this.props.idx===r.idx:!1},isDraggedOverUpwards:function(){var e=this.props.cellMetaData.dragged;return!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx<e.rowIdx},isDraggedOverDownwards:function(){var e=this.props.cellMetaData.dragged;return!this.isSelected()&&this.isDraggedOver()&&this.props.rowIdx>e.rowIdx},checkFocus:function(){if(this.isSelected()&&!this.isActive()){for(var e=i.findDOMNode(this);null!=e&&-1===e.className.indexOf("react-grid-Viewport");)e=e.parentElement;var t=!1;if(null==document.activeElement||document.activeElement.nodeName&&"string"==typeof document.activeElement.nodeName&&"body"===document.activeElement.nodeName.toLowerCase())t=!0;else if(e)for(var r=document.activeElement;null!=r;){if(r===e){t=!0;break}r=r.parentElement}t&&i.findDOMNode(this).focus()}},canEdit:function(){return null!=this.props.column.editor||this.props.column.editable},renderCellContent:function(e){var t=void 0,r=this.getFormatter();return n.isValidElement(r)?(e.dependentValues=this.getFormatterDependencies(),t=n.cloneElement(r,e)):t=u(r)?n.createElement(r,{value:this.props.value,dependentValues:this.getFormatterDependencies()}):n.createElement(p,{value:this.props.value}),n.createElement("div",{ref:"cell",className:"react-grid-Cell__value"},t," ",this.props.cellControls)},render:function(){var e=this.getStyle(),t=this.getCellClass(),r=this.renderCellContent({value:this.props.value,column:this.props.column,rowIdx:this.props.rowIdx,isExpanded:this.props.isExpanded}),i=!this.isActive()&&this.canEdit()?n.createElement("div",{className:"drag-handle",draggable:"true",onDoubleClick:this.onDragHandleDoubleClick},n.createElement("span",{style:{display:"none"}})):null;return n.createElement("div",o({},this.props,{className:t,style:e,onClick:this.onCellClick,onContextMenu:this.onCellContextMenu,onDoubleClick:this.onCellDoubleClick,onDragOver:this.onDragOver}),r,i)}});e.exports=d},function(e,t,r){"use strict";var o=r(2),n=r(6),i=r(90),s=r(91),a=r(93),l=o.createClass({displayName:"EditorContainer",mixins:[i],propTypes:{rowIdx:o.PropTypes.number,rowData:o.PropTypes.object.isRequired,value:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.number,o.PropTypes.object,o.PropTypes.bool]).isRequired,cellMetaData:o.PropTypes.shape({selected:o.PropTypes.object.isRequired,copied:o.PropTypes.object,dragged:o.PropTypes.object,onCellClick:o.PropTypes.func,onCellDoubleClick:o.PropTypes.func,onCommitCancel:o.PropTypes.func,onCommit:o.PropTypes.func}).isRequired,column:o.PropTypes.object.isRequired,height:o.PropTypes.number.isRequired},changeCommitted:!1,getInitialState:function(){return{isInvalid:!1}},componentDidMount:function(){var e=this.getInputNode();void 0!==e&&(this.setTextInputFocus(),this.getEditor().disableContainerStyles||(e.className+=" editor-main",e.style.height=this.props.height-1+"px"))},componentWillUnmount:function(){this.changeCommitted||this.hasEscapeBeenPressed()||this.commit({key:"Enter"})},createEditor:function(){var e=this,t=function(t){return e.editor=t},r={ref:t,column:this.props.column,value:this.getInitialValue(),onCommit:this.commit,rowMetaData:this.getRowMetaData(),height:this.props.height,onBlur:this.commit,onOverrideKeyDown:this.onKeyDown},n=this.props.column.editor;return n&&o.isValidElement(n)?o.cloneElement(n,r):o.createElement(s,{ref:t,column:this.props.column,value:this.getInitialValue(),onBlur:this.commit,rowMetaData:this.getRowMetaData(),onKeyDown:function(){},commit:function(){}})},onPressEnter:function(){this.commit({key:"Enter"})},onPressTab:function(){this.commit({key:"Tab"})},onPressEscape:function(e){this.editorIsSelectOpen()?e.stopPropagation():this.props.cellMetaData.onCommitCancel()},onPressArrowDown:function(e){this.editorHasResults()?e.stopPropagation():this.commit(e)},onPressArrowUp:function(e){this.editorHasResults()?e.stopPropagation():this.commit(e)},onPressArrowLeft:function(e){this.isCaretAtBeginningOfInput()?this.commit(e):e.stopPropagation()},onPressArrowRight:function(e){this.isCaretAtEndOfInput()?this.commit(e):e.stopPropagation()},editorHasResults:function(){return a(this.getEditor().hasResults)?this.getEditor().hasResults():!1},editorIsSelectOpen:function(){return a(this.getEditor().isSelectOpen)?this.getEditor().isSelectOpen():!1},getRowMetaData:function(){return"function"==typeof this.props.column.getRowMetaData?this.props.column.getRowMetaData(this.props.rowData,this.props.column):void 0},getEditor:function(){return this.editor},getInputNode:function(){return this.getEditor().getInputNode()},getInitialValue:function(){var e=this.props.cellMetaData.selected,t=e.initialKeyCode;if("Delete"===t||"Backspace"===t)return"";if("Enter"===t)return this.props.value;var r=t?String.fromCharCode(t):this.props.value;return r},getContainerClass:function(){return n({"has-error":this.state.isInvalid===!0})},commit:function(e){var t=e||{},r=this.getEditor().getValue();if(this.isNewValueValid(r)){this.changeCommitted=!0;var o=this.props.column.key;this.props.cellMetaData.onCommit({cellKey:o,rowIdx:this.props.rowIdx,updated:r,key:t.key})}},isNewValueValid:function(e){if(a(this.getEditor().validate)){var t=this.getEditor().validate(e);return this.setState({isInvalid:!t}),t}return!0},setCaretAtEndOfInput:function(){var e=this.getInputNode(),t=e.value.length;if(e.setSelectionRange)e.setSelectionRange(t,t);else if(e.createTextRange){var r=e.createTextRange();r.moveStart("character",t),r.collapse(),r.select()}},isCaretAtBeginningOfInput:function(){ var e=this.getInputNode();return e.selectionStart===e.selectionEnd&&0===e.selectionStart},isCaretAtEndOfInput:function(){var e=this.getInputNode();return e.selectionStart===e.value.length},setTextInputFocus:function(){var e=this.props.cellMetaData.selected,t=e.initialKeyCode,r=this.getInputNode();r.focus(),"INPUT"===r.tagName&&(this.isKeyPrintable(t)?r.select():(r.focus(),r.select()))},hasEscapeBeenPressed:function(){var e=!1,t=27;return window.event&&(window.event.keyCode===t?e=!0:window.event.which===t&&(e=!0)),e},renderStatusIcon:function(){return this.state.isInvalid===!0?o.createElement("span",{className:"glyphicon glyphicon-remove form-control-feedback"}):void 0},render:function(){return o.createElement("div",{className:this.getContainerClass(),onKeyDown:this.onKeyDown,commit:this.commit},this.createEditor(),this.renderStatusIcon())}});e.exports=l},function(e,t){"use strict";var r={onKeyDown:function(e){if(this.isCtrlKeyHeldDown(e))this.checkAndCall("onPressKeyWithCtrl",e);else if(this.isKeyExplicitlyHandled(e.key)){var t="onPress"+e.key;this.checkAndCall(t,e)}else this.isKeyPrintable(e.keyCode)&&this.checkAndCall("onPressChar",e)},isKeyPrintable:function(e){var t=e>47&&58>e||32===e||13===e||e>64&&91>e||e>95&&112>e||e>185&&193>e||e>218&&223>e;return t},isKeyExplicitlyHandled:function(e){return"function"==typeof this["onPress"+e]},isCtrlKeyHeldDown:function(e){return e.ctrlKey===!0&&"Control"!==e.key},checkAndCall:function(e,t){"function"==typeof this[e]&&this[e](t)}};e.exports=r},function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),a=r(2),l=r(92),u=function(e){function t(){return o(this,t),n(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"render",value:function(){return a.createElement("input",{ref:"input",type:"text",onBlur:this.props.onBlur,className:"form-control",defaultValue:this.props.value})}}]),t}(l);e.exports=u},function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),a=r(2),l=r(3),u=r(15),c=function(e){function t(){return o(this,t),n(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"getStyle",value:function(){return{width:"100%"}}},{key:"getValue",value:function(){var e={};return e[this.props.column.key]=this.getInputNode().value,e}},{key:"getInputNode",value:function(){var e=l.findDOMNode(this);return"INPUT"===e.tagName?e:e.querySelector("input:not([type=hidden])")}},{key:"inheritContainerStyles",value:function(){return!0}}]),t}(a.Component);c.propTypes={onKeyDown:a.PropTypes.func.isRequired,value:a.PropTypes.any.isRequired,onBlur:a.PropTypes.func.isRequired,column:a.PropTypes.shape(u).isRequired,commit:a.PropTypes.func.isRequired},e.exports=c},function(e,t){"use strict";var r=function(e){var t={};return e&&"[object Function]"===t.toString.call(e)};e.exports=r},function(e,t,r){"use strict";var o=r(2).PropTypes;e.exports={selected:o.object.isRequired,copied:o.object,dragged:o.object,onCellClick:o.func.isRequired,onCellDoubleClick:o.func.isRequired,onCommit:o.func.isRequired,onCommitCancel:o.func.isRequired,handleDragEnterRow:o.func.isRequired,handleTerminateDrag:o.func.isRequired}},function(e,t,r){"use strict";var o=r(2),n=o.createClass({displayName:"SimpleCellFormatter",propTypes:{value:o.PropTypes.oneOfType([o.PropTypes.string,o.PropTypes.number,o.PropTypes.object,o.PropTypes.bool]).isRequired},shouldComponentUpdate:function(e){return e.value!==this.props.value},render:function(){return o.createElement("div",{title:this.props.value},this.props.value)}});e.exports=n},function(e,t,r){"use strict";var o=r(2),n=r(3),i=r(97),s=Math.min,a=Math.max,l=Math.floor,u=Math.ceil;e.exports={mixins:[i.MetricsMixin],DOMMetrics:{viewportHeight:function(){return n.findDOMNode(this).offsetHeight}},propTypes:{rowHeight:o.PropTypes.number,rowsCount:o.PropTypes.number.isRequired},getDefaultProps:function(){return{rowHeight:30}},getInitialState:function(){return this.getGridState(this.props)},getGridState:function(e){var t=u((e.minHeight-e.rowHeight)/e.rowHeight),r=s(2*t,e.rowsCount);return{displayStart:0,displayEnd:r,height:e.minHeight,scrollTop:0,scrollLeft:0}},updateScroll:function(e,t,r,o,n){var i=u(r/o),c=l(e/o),p=s(c+i,n),d=a(0,c-2*i),h=s(c+2*i,n),f={visibleStart:c,visibleEnd:p,displayStart:d,displayEnd:h,height:r,scrollTop:e,scrollLeft:t};this.setState(f)},metricsUpdated:function(){var e=this.DOMMetrics.viewportHeight();e&&this.updateScroll(this.state.scrollTop,this.state.scrollLeft,e,this.props.rowHeight,this.props.rowsCount)},componentWillReceiveProps:function(e){if(this.props.rowHeight!==e.rowHeight||this.props.minHeight!==e.minHeight)this.setState(this.getGridState(e));else if(this.props.rowsCount!==e.rowsCount)this.updateScroll(this.state.scrollTop,this.state.scrollLeft,this.state.height,e.rowHeight,e.rowsCount);else if(this.props.rowOffsetHeight!==e.rowOffsetHeight){var t=this.props.rowOffsetHeight-e.rowOffsetHeight;this.updateScroll(this.state.scrollTop,this.state.scrollLeft,this.state.height+t,e.rowHeight,e.rowsCount)}}}},function(e,t,r){"use strict";var o=r(2),n=r(7),i={metricsComputator:o.PropTypes.object},s={childContextTypes:i,getChildContext:function(){return{metricsComputator:this}},getMetricImpl:function(e){return this._DOMMetrics.metrics[e].value},registerMetricsImpl:function(e,t){var r={},o=this._DOMMetrics;for(var n in t){if(void 0!==o.metrics[n])throw new Error("DOM metric "+n+" is already defined");o.metrics[n]={component:e,computator:t[n].bind(e)},r[n]=this.getMetricImpl.bind(null,n)}return-1===o.components.indexOf(e)&&o.components.push(e),r},unregisterMetricsFor:function(e){var t=this._DOMMetrics,r=t.components.indexOf(e);if(r>-1){t.components.splice(r,1);var o=void 0,n={};for(o in t.metrics)t.metrics[o].component===e&&(n[o]=!0);for(o in n)n.hasOwnProperty(o)&&delete t.metrics[o]}},updateMetrics:function(){var e=this._DOMMetrics,t=!1;for(var r in e.metrics)if(e.metrics.hasOwnProperty(r)){var o=e.metrics[r].computator();o!==e.metrics[r].value&&(t=!0),e.metrics[r].value=o}if(t)for(var n=0,i=e.components.length;i>n;n++)e.components[n].metricsUpdated&&e.components[n].metricsUpdated()},componentWillMount:function(){this._DOMMetrics={metrics:{},components:[]}},componentDidMount:function(){window.addEventListener?window.addEventListener("resize",this.updateMetrics):window.attachEvent("resize",this.updateMetrics),this.updateMetrics()},componentWillUnmount:function(){window.removeEventListener("resize",this.updateMetrics)}},a={contextTypes:i,componentWillMount:function(){if(this.DOMMetrics){this._DOMMetricsDefs=n(this.DOMMetrics),this.DOMMetrics={};for(var e in this._DOMMetricsDefs)this._DOMMetricsDefs.hasOwnProperty(e)&&(this.DOMMetrics[e]=function(){})}},componentDidMount:function(){this.DOMMetrics&&(this.DOMMetrics=this.registerMetrics(this._DOMMetricsDefs))},componentWillUnmount:function(){return this.registerMetricsImpl?void(this.hasOwnProperty("DOMMetrics")&&delete this.DOMMetrics):this.context.metricsComputator.unregisterMetricsFor(this)},registerMetrics:function(e){return this.registerMetricsImpl?this.registerMetricsImpl(this,e):this.context.metricsComputator.registerMetricsImpl(this,e)},getMetric:function(e){return this.getMetricImpl?this.getMetricImpl(e):this.context.metricsComputator.getMetricImpl(e)}};e.exports={MetricsComputatorMixin:s,MetricsMixin:a}},function(e,t){"use strict";e.exports={componentDidMount:function(){this._scrollLeft=this.refs.viewport?this.refs.viewport.getScroll().scrollLeft:0,this._onScroll()},componentDidUpdate:function(){this._onScroll()},componentWillMount:function(){this._scrollLeft=void 0},componentWillUnmount:function(){this._scrollLeft=void 0},onScroll:function(e){this._scrollLeft!==e.scrollLeft&&(this._scrollLeft=e.scrollLeft,this._onScroll())},onHeaderScroll:function(e){var t=e.target.scrollLeft;if(this._scrollLeft!==t){this._scrollLeft=t,this.refs.header.setScrollLeft(t);var r=ReactDOM.findDOMNode(this.refs.viewport.refs.canvas);r.scrollLeft=t,this.refs.viewport.refs.canvas.setScrollLeft(t)}},_onScroll:function(){void 0!==this._scrollLeft&&(this.refs.header.setScrollLeft(this._scrollLeft),this.refs.viewport&&this.refs.viewport.setScrollLeft(this._scrollLeft))}}},function(e,t,r){"use strict";var o=r(2),n=o.createClass({displayName:"CheckboxEditor",propTypes:{value:o.PropTypes.bool,rowIdx:o.PropTypes.number,column:o.PropTypes.shape({key:o.PropTypes.string,onCellChange:o.PropTypes.func}),dependentValues:o.PropTypes.object},handleChange:function(e){this.props.column.onCellChange(this.props.rowIdx,this.props.column.key,this.props.dependentValues,e)},render:function(){var e=null!=this.props.value?this.props.value:!1,t="checkbox"+this.props.rowIdx;return o.createElement("div",{className:"react-grid-checkbox-container",onClick:this.handleChange},o.createElement("input",{className:"react-grid-checkbox",type:"checkbox",name:t,checked:e}),o.createElement("label",{htmlFor:t,className:"react-grid-checkbox-label"}))}});e.exports=n},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=r(3),s=o(i),a=r(8),l=r(97);Object.assign=r(101);var u=r(2).PropTypes,c=r(10),p=function d(){n(this,d)};e.exports={mixins:[l.MetricsMixin],propTypes:{columns:u.arrayOf(p),minColumnWidth:u.number,columnEquality:u.func,onColumnResize:u.func},DOMMetrics:{gridWidth:function(){return s["default"].findDOMNode(this).parentElement.offsetWidth}},getDefaultProps:function(){return{minColumnWidth:80,columnEquality:a.sameColumn}},componentWillMount:function(){this._mounted=!0},componentWillReceiveProps:function(e){if(e.columns&&(!a.sameColumns(this.props.columns,e.columns,this.props.columnEquality)||e.minWidth!==this.props.minWidth)){var t=this.createColumnMetrics(e);this.setState({columnMetrics:t})}},getTotalWidth:function(){var e=0;return e=this._mounted?this.DOMMetrics.gridWidth():c.getSize(this.props.columns)*this.props.minColumnWidth},getColumnMetricsType:function(e){var t=e.totalWidth||this.getTotalWidth(),r={columns:e.columns,totalWidth:t,minColumnWidth:e.minColumnWidth},o=a.recalculate(r);return o},getColumn:function(e){var t=this.state.columnMetrics.columns;return Array.isArray(t)?t[e]:"undefined"!=typeof Immutable?t.get(e):void 0},getSize:function(){var e=this.state.columnMetrics.columns;return Array.isArray(e)?e.length:"undefined"!=typeof Immutable?e.size:void 0},metricsUpdated:function(){var e=this.createColumnMetrics();this.setState({columnMetrics:e})},createColumnMetrics:function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=this.setupGridColumns(e);return this.getColumnMetricsType({columns:t,minColumnWidth:this.props.minColumnWidth,totalWidth:e.minWidth})},onColumnResize:function(e,t){var r=a.resizeColumn(this.state.columnMetrics,e,t);this.setState({columnMetrics:r}),this.props.onColumnResize&&this.props.onColumnResize(e,t)}}},function(e,t){"use strict";function r(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=Object.assign||function(e,t){for(var o,n,i=r(e),s=1;s<arguments.length;s++){o=arguments[s],n=Object.keys(Object(o));for(var a=0;a<n.length;a++)i[n[a]]=o[n[a]]}return i}},function(e,t){"use strict";var r={get:function(e,t){return"function"==typeof e.get?e.get(t):e[t]}};e.exports=r},function(e,t,r){"use strict";var o={AutoComplete:r(104),DropDownEditor:r(106),SimpleTextEditor:r(91),CheckboxEditor:r(99)};e.exports=o},function(e,t,r){"use strict";var o=r(2),n=r(3),i=r(105),s=r(15),a=o.PropTypes.shape({id:o.PropTypes.required,title:o.PropTypes.string}),l=o.createClass({displayName:"AutoCompleteEditor",propTypes:{onCommit:o.PropTypes.func,options:o.PropTypes.arrayOf(a),label:o.PropTypes.any,value:o.PropTypes.any,height:o.PropTypes.number,valueParams:o.PropTypes.arrayOf(o.PropTypes.string),column:o.PropTypes.shape(s),resultIdentifier:o.PropTypes.string,search:o.PropTypes.string,onKeyDown:o.PropTypes.func,onFocus:o.PropTypes.func},getDefaultProps:function(){return{resultIdentifier:"id"}},handleChange:function(){this.props.onCommit()},getValue:function(){var e=void 0,t={};return this.hasResults()&&this.isFocusedOnSuggestion()?(e=this.getLabel(this.refs.autoComplete.state.focusedValue),this.props.valueParams&&(e=this.constuctValueFromParams(this.refs.autoComplete.state.focusedValue,this.props.valueParams))):e=this.refs.autoComplete.state.searchTerm,t[this.props.column.key]=e,t},getInputNode:function(){return n.findDOMNode(this).getElementsByTagName("input")[0]},getLabel:function(e){var t=null!=this.props.label?this.props.label:"title";return"function"==typeof t?t(e):"string"==typeof t?e[t]:void 0},hasResults:function(){return this.refs.autoComplete.state.results.length>0},isFocusedOnSuggestion:function(){var e=this.refs.autoComplete;return null!=e.state.focusedValue},constuctValueFromParams:function(e,t){if(!t)return"";for(var r=[],o=0,n=t.length;n>o;o++)r.push(e[t[o]]);return r.join("|")},render:function(){var e=null!=this.props.label?this.props.label:"title";return o.createElement("div",{height:this.props.height,onKeyDown:this.props.onKeyDown},o.createElement(i,{search:this.props.search,ref:"autoComplete",label:e,onChange:this.handleChange,onFocus:this.props.onFocus,resultIdentifier:this.props.resultIdentifier,options:this.props.options,value:{title:this.props.value}}))}});e.exports=l},function(e,t,r){!function(t,o){e.exports=o(r(2))}(this,function(e){return function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={exports:{},id:o,loaded:!1};return e[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function o(e,t,r){if(!e)return r(null,[]);t=new RegExp(t,"i");for(var o=[],n=0,i=e.length;i>n;n++)t.exec(e[n].title)&&o.push(e[n]);r(null,o)}var n=r(1),i=r(2),s=n.createClass({displayName:"Autocomplete",propTypes:{options:n.PropTypes.any,search:n.PropTypes.func,resultRenderer:n.PropTypes.oneOfType([n.PropTypes.component,n.PropTypes.func]),value:n.PropTypes.object,onChange:n.PropTypes.func,onError:n.PropTypes.func,onFocus:n.PropTypes.func},getDefaultProps:function(){return{search:o}},getInitialState:function(){var e=this.props.searchTerm?this.props.searchTerm:this.props.value?this.props.value.title:"";return{results:[],showResults:!1,showResultsInProgress:!1,searchTerm:e,focusedValue:null}},getResultIdentifier:function(e){return void 0===this.props.resultIdentifier?e.id:e[this.props.resultIdentifier]},render:function(){var e=i(this.props.className,"react-autocomplete-Autocomplete",this.state.showResults?"react-autocomplete-Autocomplete--resultsShown":void 0),t={position:"relative",outline:"none"};return n.createElement("div",{tabIndex:"1",className:e,onFocus:this.onFocus,onBlur:this.onBlur,style:t},n.createElement("input",{ref:"search",className:"react-autocomplete-Autocomplete__search",style:{width:"100%"},onClick:this.showAllResults,onChange:this.onQueryChange,onFocus:this.onSearchInputFocus,onBlur:this.onQueryBlur,onKeyDown:this.onQueryKeyDown,value:this.state.searchTerm}),n.createElement(a,{className:"react-autocomplete-Autocomplete__results",onSelect:this.onValueChange,onFocus:this.onValueFocus,results:this.state.results,focusedValue:this.state.focusedValue,show:this.state.showResults,renderer:this.props.resultRenderer,label:this.props.label,resultIdentifier:this.props.resultIdentifier}))},componentWillReceiveProps:function(e){var t=e.searchTerm?e.searchTerm:e.value?e.value.title:"";this.setState({searchTerm:t})},componentWillMount:function(){this.blurTimer=null},showResults:function(e){this.setState({showResultsInProgress:!0}),this.props.search(this.props.options,e.trim(),this.onSearchComplete)},showAllResults:function(){this.state.showResultsInProgress||this.state.showResults||this.showResults("")},onValueChange:function(e){var t={value:e,showResults:!1};e&&(t.searchTerm=e.title),this.setState(t),this.props.onChange&&this.props.onChange(e)},onSearchComplete:function(e,t){if(e){if(!this.props.onError)throw e;this.props.onError(e)}this.setState({showResultsInProgress:!1,showResults:!0,results:t})},onValueFocus:function(e){this.setState({focusedValue:e})},onQueryChange:function(e){var t=e.target.value;this.setState({searchTerm:t,focusedValue:null}),this.showResults(t)},onFocus:function(){this.blurTimer&&(clearTimeout(this.blurTimer),this.blurTimer=null),this.refs.search.getDOMNode().focus()},onSearchInputFocus:function(){this.props.onFocus&&this.props.onFocus(),this.showAllResults()},onBlur:function(){this.blurTimer=setTimeout(function(){this.isMounted()&&this.setState({showResults:!1})}.bind(this),100)},onQueryKeyDown:function(e){if("Enter"===e.key)e.preventDefault(),this.state.focusedValue&&this.onValueChange(this.state.focusedValue);else if("ArrowUp"===e.key&&this.state.showResults){e.preventDefault();var t=Math.max(this.focusedValueIndex()-1,0);this.setState({focusedValue:this.state.results[t]})}else if("ArrowDown"===e.key)if(e.preventDefault(),this.state.showResults){var r=Math.min(this.focusedValueIndex()+(this.state.showResults?1:0),this.state.results.length-1);this.setState({showResults:!0,focusedValue:this.state.results[r]})}else this.showAllResults()},focusedValueIndex:function(){if(!this.state.focusedValue)return-1;for(var e=0,t=this.state.results.length;t>e;e++)if(this.getResultIdentifier(this.state.results[e])===this.getResultIdentifier(this.state.focusedValue))return e;return-1}}),a=n.createClass({displayName:"Results",getResultIdentifier:function(e){if(void 0===this.props.resultIdentifier){if(!e.id)throw"id property not found on result. You must specify a resultIdentifier and pass as props to autocomplete component";return e.id}return e[this.props.resultIdentifier]},render:function(){var e={display:this.props.show?"block":"none",position:"absolute",listStyleType:"none"},t=this.props,r=t.className,o=function(e,t){var r={},o=Object.prototype.hasOwnProperty;if(null==e)throw new TypeError;for(var n in e)o.call(e,n)&&!o.call(t,n)&&(r[n]=e[n]);return r}(t,{className:1});return n.createElement("ul",n.__spread({},o,{style:e,className:r+" react-autocomplete-Results"}),this.props.results.map(this.renderResult))},renderResult:function(e){var t=this.props.focusedValue&&this.getResultIdentifier(this.props.focusedValue)===this.getResultIdentifier(e),r=this.props.renderer||l;return n.createElement(r,{ref:t?"focused":void 0,key:this.getResultIdentifier(e),result:e,focused:t,onMouseEnter:this.onMouseEnterResult,onClick:this.props.onSelect,label:this.props.label})},componentDidUpdate:function(){this.scrollToFocused()},componentDidMount:function(){this.scrollToFocused()},componentWillMount:function(){this.ignoreFocus=!1},scrollToFocused:function(){var e=this.refs&&this.refs.focused;if(e){var t=this.getDOMNode(),r=t.scrollTop,o=t.offsetHeight,n=e.getDOMNode(),i=n.offsetTop,s=i+n.offsetHeight;r>i?(this.ignoreFocus=!0,t.scrollTop=i):s-r>o&&(this.ignoreFocus=!0,t.scrollTop=s-o)}},onMouseEnterResult:function(e,t){if(this.ignoreFocus)this.ignoreFocus=!1;else{var r=this.getDOMNode(),o=r.scrollTop,n=r.offsetHeight,i=e.target,s=i.offsetTop,a=s+i.offsetHeight;a>o&&o+n>s&&this.props.onFocus(t)}}}),l=n.createClass({displayName:"Result",getDefaultProps:function(){return{label:function(e){return e.title}}},getLabel:function(e){return"function"==typeof this.props.label?this.props.label(e):"string"==typeof this.props.label?e[this.props.label]:void 0},render:function(){var e=i({"react-autocomplete-Result":!0,"react-autocomplete-Result--active":this.props.focused});return n.createElement("li",{style:{listStyleType:"none"},className:e,onClick:this.onClick,onMouseEnter:this.onMouseEnter},n.createElement("a",null,this.getLabel(this.props.result)))},onClick:function(){this.props.onClick(this.props.result)},onMouseEnter:function(e){this.props.onMouseEnter&&this.props.onMouseEnter(e,this.props.result)},shouldComponentUpdate:function(e){return e.result.id!==this.props.result.id||e.focused!==this.props.focused}});e.exports=s},function(t,r){t.exports=e},function(e,t,r){function o(){for(var e,t="",r=0;r<arguments.length;r++)if(e=arguments[r])if("string"==typeof e||"number"==typeof e)t+=" "+e;else if("[object Array]"===Object.prototype.toString.call(e))t+=" "+o.apply(null,e);else if("object"==typeof e)for(var n in e)e.hasOwnProperty(n)&&e[n]&&(t+=" "+n);return t.substr(1)}var n,i;"undefined"!=typeof e&&e.exports&&(e.exports=o),n=[],i=function(){return o}.apply(t,n),!(void 0!==i&&(e.exports=i))}])})},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),l=r(3),u=o(l),c=r(2),p=r(92),d=function(e){function t(){return n(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return s(t,e),a(t,[{key:"getInputNode",value:function(){return u["default"].findDOMNode(this)}},{key:"onClick",value:function(){this.getInputNode().focus()}},{key:"onDoubleClick",value:function(){this.getInputNode().focus()}},{key:"render",value:function(){return c.createElement("select",{style:this.getStyle(),defaultValue:this.props.value,onBlur:this.props.onBlur,onChange:this.onChange},this.renderOptions())}},{key:"renderOptions",value:function(){var e=[];return this.props.options.forEach(function(t){"string"==typeof t?e.push(c.createElement("option",{key:t,value:t},t)):e.push(c.createElement("option",{key:t.id,value:t.value,title:t.title},t.value))},this),e}}]),t}(p);d.propTypes={options:c.PropTypes.arrayOf(c.PropTypes.oneOfType([c.PropTypes.string,c.PropTypes.objectOf({id:c.PropTypes.string,title:c.PropTypes.string,meta:c.PropTypes.string})])).isRequired},e.exports=d},function(e,t,r){"use strict";var o=r(108),n={ImageFormatter:o};e.exports=n},function(e,t,r){"use strict";var o=r(2),n={},i={},s=o.createClass({displayName:"ImageFormatter",propTypes:{value:o.PropTypes.string.isRequired},getInitialState:function(){return{ready:!1}},componentWillMount:function(){this._load(this.props.value)},componentWillReceiveProps:function(e){e.value!==this.props.value&&(this.setState({value:null}),this._load(e.value))},_load:function(e){var t=e;if(i[t])return void this.setState({value:t});if(n[t])return void n[t].push(this._onLoad);n[t]=[this._onLoad];var r=new Image;r.onload=function(){n[t].forEach(function(e){e(t)}),delete n[t],r.onload=null,t=void 0},r.src=t},_onLoad:function(e){this.isMounted()&&e===this.props.value&&this.setState({value:e})},render:function(){var e=this.state.value?{backgroundImage:"url("+this.state.value+")"}:void 0;return o.createElement("div",{className:"react-grid-image",style:e})}});e.exports=s},function(e,t,r){"use strict";var o=r(2),n=o.createClass({displayName:"Toolbar",propTypes:{onAddRow:o.PropTypes.func,onToggleFilter:o.PropTypes.func,enableFilter:o.PropTypes.bool,numberOfRows:o.PropTypes.number},onAddRow:function(){null!==this.props.onAddRow&&this.props.onAddRow instanceof Function&&this.props.onAddRow({newRowIndex:this.props.numberOfRows})},getDefaultProps:function(){return{enableAddRow:!0}},renderAddRowButton:function(){return this.props.onAddRow?o.createElement("button",{type:"button",className:"btn",onClick:this.onAddRow},"Add Row"):void 0},renderToggleFilterButton:function(){return this.props.enableFilter?o.createElement("button",{type:"button",className:"btn",onClick:this.props.onToggleFilter},"Filter Rows"):void 0},render:function(){return o.createElement("div",{className:"react-grid-Toolbar"},o.createElement("div",{className:"tools"},this.renderAddRowButton(),this.renderToggleFilterButton()))}});e.exports=n},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.connect=t.SubMenu=t.monitor=t.MenuItem=t.MenuHeader=t.ContextMenu=void 0;var n=r(24),i=r(111),s=o(i),a=r(112),l=o(a);t.ContextMenu=s["default"],t.MenuHeader=l["default"],t.MenuItem=n.MenuItem,t.monitor=n.monitor,t.SubMenu=n.SubMenu,t.connect=n.connect},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),l=r(2),u=o(l),c=r(24),p=function(e){function t(){return n(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return s(t,e),a(t,[{key:"render",value:function(){return u["default"].createElement(c.ContextMenu,{identifier:"reactDataGridContextMenu"},this.props.children)}}]),t}(u["default"].Component);p.propTypes={children:l.PropTypes.node},t["default"]=p},function(e,t,r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),l=r(2),u=o(l),c=function(e){function t(){return n(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return s(t,e),a(t,[{key:"render",value:function(){return u["default"].createElement("div",{className:"react-context-menu-header"},this.props.children)}}]),t}(u["default"].Component);c.propTypes={children:l.PropTypes.any},t["default"]=c}])});
ajax/libs/webshim/1.15.0/dev/shims/moxie/js/moxie-swf.js
hanssens/cdnjs
/** * mOxie - multi-runtime File API & XMLHttpRequest L2 Polyfill * v1.2.1 * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing * * Date: 2014-05-14 */ /** * Compiled inline version. (Library mode) */ /*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */ /*globals $code */ (function(exports, undefined) { "use strict"; var modules = {}; function require(ids, callback) { var module, defs = []; for (var i = 0; i < ids.length; ++i) { module = modules[ids[i]] || resolve(ids[i]); if (!module) { throw 'module definition dependecy not found: ' + ids[i]; } defs.push(module); } callback.apply(null, defs); } function define(id, dependencies, definition) { if (typeof id !== 'string') { throw 'invalid module definition, module id must be defined and be a string'; } if (dependencies === undefined) { throw 'invalid module definition, dependencies must be specified'; } if (definition === undefined) { throw 'invalid module definition, definition function must be specified'; } require(dependencies, function() { modules[id] = definition.apply(null, arguments); }); } function defined(id) { return !!modules[id]; } function resolve(id) { var target = exports; var fragments = id.split(/[.\/]/); for (var fi = 0; fi < fragments.length; ++fi) { if (!target[fragments[fi]]) { return; } target = target[fragments[fi]]; } return target; } function expose(ids) { for (var i = 0; i < ids.length; i++) { var target = exports; var id = ids[i]; var fragments = id.split(/[.\/]/); for (var fi = 0; fi < fragments.length - 1; ++fi) { if (target[fragments[fi]] === undefined) { target[fragments[fi]] = {}; } target = target[fragments[fi]]; } target[fragments[fragments.length - 1]] = modules[id]; } } // Included from: src/javascript/core/utils/Basic.js /** * Basic.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/utils/Basic', [], function() { /** Gets the true type of the built-in object (better version of typeof). @author Angus Croll (http://javascriptweblog.wordpress.com/) @method typeOf @for Utils @static @param {Object} o Object to check. @return {String} Object [[Class]] */ var typeOf = function(o) { var undef; if (o === undef) { return 'undefined'; } else if (o === null) { return 'null'; } else if (o.nodeType) { return 'node'; } // the snippet below is awesome, however it fails to detect null, undefined and arguments types in IE lte 8 return ({}).toString.call(o).match(/\s([a-z|A-Z]+)/)[1].toLowerCase(); }; /** Extends the specified object with another object. @method extend @static @param {Object} target Object to extend. @param {Object} [obj]* Multiple objects to extend with. @return {Object} Same as target, the extended object. */ var extend = function(target) { var undef; each(arguments, function(arg, i) { if (i > 0) { each(arg, function(value, key) { if (value !== undef) { if (typeOf(target[key]) === typeOf(value) && !!~inArray(typeOf(value), ['array', 'object'])) { extend(target[key], value); } else { target[key] = value; } } }); } }); return target; }; /** Executes the callback function for each item in array/object. If you return false in the callback it will break the loop. @method each @static @param {Object} obj Object to iterate. @param {function} callback Callback function to execute for each item. */ var each = function(obj, callback) { var length, key, i, undef; if (obj) { try { length = obj.length; } catch(ex) { length = undef; } if (length === undef) { // Loop object items for (key in obj) { if (obj.hasOwnProperty(key)) { if (callback(obj[key], key) === false) { return; } } } } else { // Loop array items for (i = 0; i < length; i++) { if (callback(obj[i], i) === false) { return; } } } } }; /** Checks if object is empty. @method isEmptyObj @static @param {Object} o Object to check. @return {Boolean} */ var isEmptyObj = function(obj) { var prop; if (!obj || typeOf(obj) !== 'object') { return true; } for (prop in obj) { return false; } return true; }; /** Recieve an array of functions (usually async) to call in sequence, each function receives a callback as first argument that it should call, when it completes. Finally, after everything is complete, main callback is called. Passing truthy value to the callback as a first argument will interrupt the sequence and invoke main callback immediately. @method inSeries @static @param {Array} queue Array of functions to call in sequence @param {Function} cb Main callback that is called in the end, or in case of error */ var inSeries = function(queue, cb) { var i = 0, length = queue.length; if (typeOf(cb) !== 'function') { cb = function() {}; } if (!queue || !queue.length) { cb(); } function callNext(i) { if (typeOf(queue[i]) === 'function') { queue[i](function(error) { /*jshint expr:true */ ++i < length && !error ? callNext(i) : cb(error); }); } } callNext(i); }; /** Recieve an array of functions (usually async) to call in parallel, each function receives a callback as first argument that it should call, when it completes. After everything is complete, main callback is called. Passing truthy value to the callback as a first argument will interrupt the process and invoke main callback immediately. @method inParallel @static @param {Array} queue Array of functions to call in sequence @param {Function} cb Main callback that is called in the end, or in case of erro */ var inParallel = function(queue, cb) { var count = 0, num = queue.length, cbArgs = new Array(num); each(queue, function(fn, i) { fn(function(error) { if (error) { return cb(error); } var args = [].slice.call(arguments); args.shift(); // strip error - undefined or not cbArgs[i] = args; count++; if (count === num) { cbArgs.unshift(null); cb.apply(this, cbArgs); } }); }); }; /** Find an element in array and return it's index if present, otherwise return -1. @method inArray @static @param {Mixed} needle Element to find @param {Array} array @return {Int} Index of the element, or -1 if not found */ var inArray = function(needle, array) { if (array) { if (Array.prototype.indexOf) { return Array.prototype.indexOf.call(array, needle); } for (var i = 0, length = array.length; i < length; i++) { if (array[i] === needle) { return i; } } } return -1; }; /** Returns elements of first array if they are not present in second. And false - otherwise. @private @method arrayDiff @param {Array} needles @param {Array} array @return {Array|Boolean} */ var arrayDiff = function(needles, array) { var diff = []; if (typeOf(needles) !== 'array') { needles = [needles]; } if (typeOf(array) !== 'array') { array = [array]; } for (var i in needles) { if (inArray(needles[i], array) === -1) { diff.push(needles[i]); } } return diff.length ? diff : false; }; /** Find intersection of two arrays. @private @method arrayIntersect @param {Array} array1 @param {Array} array2 @return {Array} Intersection of two arrays or null if there is none */ var arrayIntersect = function(array1, array2) { var result = []; each(array1, function(item) { if (inArray(item, array2) !== -1) { result.push(item); } }); return result.length ? result : null; }; /** Forces anything into an array. @method toArray @static @param {Object} obj Object with length field. @return {Array} Array object containing all items. */ var toArray = function(obj) { var i, arr = []; for (i = 0; i < obj.length; i++) { arr[i] = obj[i]; } return arr; }; /** Generates an unique ID. This is 99.99% unique since it takes the current time and 5 random numbers. The only way a user would be able to get the same ID is if the two persons at the same exact milisecond manages to get 5 the same random numbers between 0-65535 it also uses a counter so each call will be guaranteed to be page unique. It's more probable for the earth to be hit with an ansteriod. Y @method guid @static @param {String} prefix to prepend (by default 'o' will be prepended). @method guid @return {String} Virtually unique id. */ var guid = (function() { var counter = 0; return function(prefix) { var guid = new Date().getTime().toString(32), i; for (i = 0; i < 5; i++) { guid += Math.floor(Math.random() * 65535).toString(32); } return (prefix || 'o_') + guid + (counter++).toString(32); }; }()); /** Trims white spaces around the string @method trim @static @param {String} str @return {String} */ var trim = function(str) { if (!str) { return str; } return String.prototype.trim ? String.prototype.trim.call(str) : str.toString().replace(/^\s*/, '').replace(/\s*$/, ''); }; /** Parses the specified size string into a byte value. For example 10kb becomes 10240. @method parseSizeStr @static @param {String/Number} size String to parse or number to just pass through. @return {Number} Size in bytes. */ var parseSizeStr = function(size) { if (typeof(size) !== 'string') { return size; } var muls = { t: 1099511627776, g: 1073741824, m: 1048576, k: 1024 }, mul; size = /^([0-9]+)([mgk]?)$/.exec(size.toLowerCase().replace(/[^0-9mkg]/g, '')); mul = size[2]; size = +size[1]; if (muls.hasOwnProperty(mul)) { size *= muls[mul]; } return size; }; return { guid: guid, typeOf: typeOf, extend: extend, each: each, isEmptyObj: isEmptyObj, inSeries: inSeries, inParallel: inParallel, inArray: inArray, arrayDiff: arrayDiff, arrayIntersect: arrayIntersect, toArray: toArray, trim: trim, parseSizeStr: parseSizeStr }; }); // Included from: src/javascript/core/I18n.js /** * I18n.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/core/I18n", [ "moxie/core/utils/Basic" ], function(Basic) { var i18n = {}; return { /** * Extends the language pack object with new items. * * @param {Object} pack Language pack items to add. * @return {Object} Extended language pack object. */ addI18n: function(pack) { return Basic.extend(i18n, pack); }, /** * Translates the specified string by checking for the english string in the language pack lookup. * * @param {String} str String to look for. * @return {String} Translated string or the input string if it wasn't found. */ translate: function(str) { return i18n[str] || str; }, /** * Shortcut for translate function * * @param {String} str String to look for. * @return {String} Translated string or the input string if it wasn't found. */ _: function(str) { return this.translate(str); }, /** * Pseudo sprintf implementation - simple way to replace tokens with specified values. * * @param {String} str String with tokens * @return {String} String with replaced tokens */ sprintf: function(str) { var args = [].slice.call(arguments, 1); return str.replace(/%[a-z]/g, function() { var value = args.shift(); return Basic.typeOf(value) !== 'undefined' ? value : ''; }); } }; }); // Included from: src/javascript/core/utils/Mime.js /** * Mime.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/core/utils/Mime", [ "moxie/core/utils/Basic", "moxie/core/I18n" ], function(Basic, I18n) { var mimeData = "" + "application/msword,doc dot," + "application/pdf,pdf," + "application/pgp-signature,pgp," + "application/postscript,ps ai eps," + "application/rtf,rtf," + "application/vnd.ms-excel,xls xlb," + "application/vnd.ms-powerpoint,ppt pps pot," + "application/zip,zip," + "application/x-shockwave-flash,swf swfl," + "application/vnd.openxmlformats-officedocument.wordprocessingml.document,docx," + "application/vnd.openxmlformats-officedocument.wordprocessingml.template,dotx," + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,xlsx," + "application/vnd.openxmlformats-officedocument.presentationml.presentation,pptx," + "application/vnd.openxmlformats-officedocument.presentationml.template,potx," + "application/vnd.openxmlformats-officedocument.presentationml.slideshow,ppsx," + "application/x-javascript,js," + "application/json,json," + "audio/mpeg,mp3 mpga mpega mp2," + "audio/x-wav,wav," + "audio/x-m4a,m4a," + "audio/ogg,oga ogg," + "audio/aiff,aiff aif," + "audio/flac,flac," + "audio/aac,aac," + "audio/ac3,ac3," + "audio/x-ms-wma,wma," + "image/bmp,bmp," + "image/gif,gif," + "image/jpeg,jpg jpeg jpe," + "image/photoshop,psd," + "image/png,png," + "image/svg+xml,svg svgz," + "image/tiff,tiff tif," + "text/plain,asc txt text diff log," + "text/html,htm html xhtml," + "text/css,css," + "text/csv,csv," + "text/rtf,rtf," + "video/mpeg,mpeg mpg mpe m2v," + "video/quicktime,qt mov," + "video/mp4,mp4," + "video/x-m4v,m4v," + "video/x-flv,flv," + "video/x-ms-wmv,wmv," + "video/avi,avi," + "video/webm,webm," + "video/3gpp,3gpp 3gp," + "video/3gpp2,3g2," + "video/vnd.rn-realvideo,rv," + "video/ogg,ogv," + "video/x-matroska,mkv," + "application/vnd.oasis.opendocument.formula-template,otf," + "application/octet-stream,exe"; var Mime = { mimes: {}, extensions: {}, // Parses the default mime types string into a mimes and extensions lookup maps addMimeType: function (mimeData) { var items = mimeData.split(/,/), i, ii, ext; for (i = 0; i < items.length; i += 2) { ext = items[i + 1].split(/ /); // extension to mime lookup for (ii = 0; ii < ext.length; ii++) { this.mimes[ext[ii]] = items[i]; } // mime to extension lookup this.extensions[items[i]] = ext; } }, extList2mimes: function (filters, addMissingExtensions) { var self = this, ext, i, ii, type, mimes = []; // convert extensions to mime types list for (i = 0; i < filters.length; i++) { ext = filters[i].extensions.split(/\s*,\s*/); for (ii = 0; ii < ext.length; ii++) { // if there's an asterisk in the list, then accept attribute is not required if (ext[ii] === '*') { return []; } type = self.mimes[ext[ii]]; if (!type) { if (addMissingExtensions && /^\w+$/.test(ext[ii])) { mimes.push('.' + ext[ii]); } else { return []; // accept all } } else if (Basic.inArray(type, mimes) === -1) { mimes.push(type); } } } return mimes; }, mimes2exts: function(mimes) { var self = this, exts = []; Basic.each(mimes, function(mime) { if (mime === '*') { exts = []; return false; } // check if this thing looks like mime type var m = mime.match(/^(\w+)\/(\*|\w+)$/); if (m) { if (m[2] === '*') { // wildcard mime type detected Basic.each(self.extensions, function(arr, mime) { if ((new RegExp('^' + m[1] + '/')).test(mime)) { [].push.apply(exts, self.extensions[mime]); } }); } else if (self.extensions[mime]) { [].push.apply(exts, self.extensions[mime]); } } }); return exts; }, mimes2extList: function(mimes) { var accept = [], exts = []; if (Basic.typeOf(mimes) === 'string') { mimes = Basic.trim(mimes).split(/\s*,\s*/); } exts = this.mimes2exts(mimes); accept.push({ title: I18n.translate('Files'), extensions: exts.length ? exts.join(',') : '*' }); // save original mimes string accept.mimes = mimes; return accept; }, getFileExtension: function(fileName) { var matches = fileName && fileName.match(/\.([^.]+)$/); if (matches) { return matches[1].toLowerCase(); } return ''; }, getFileMime: function(fileName) { return this.mimes[this.getFileExtension(fileName)] || ''; } }; Mime.addMimeType(mimeData); return Mime; }); // Included from: src/javascript/core/utils/Env.js /** * Env.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/core/utils/Env", [ "moxie/core/utils/Basic" ], function(Basic) { // UAParser.js v0.6.2 // Lightweight JavaScript-based User-Agent string parser // https://github.com/faisalman/ua-parser-js // // Copyright © 2012-2013 Faisalman <[email protected]> // Dual licensed under GPLv2 & MIT var UAParser = (function (undefined) { ////////////// // Constants ///////////// var EMPTY = '', UNKNOWN = '?', FUNC_TYPE = 'function', UNDEF_TYPE = 'undefined', OBJ_TYPE = 'object', MAJOR = 'major', MODEL = 'model', NAME = 'name', TYPE = 'type', VENDOR = 'vendor', VERSION = 'version', ARCHITECTURE= 'architecture', CONSOLE = 'console', MOBILE = 'mobile', TABLET = 'tablet'; /////////// // Helper ////////// var util = { has : function (str1, str2) { return str2.toLowerCase().indexOf(str1.toLowerCase()) !== -1; }, lowerize : function (str) { return str.toLowerCase(); } }; /////////////// // Map helper ////////////// var mapper = { rgx : function () { // loop through all regexes maps for (var result, i = 0, j, k, p, q, matches, match, args = arguments; i < args.length; i += 2) { var regex = args[i], // even sequence (0,2,4,..) props = args[i + 1]; // odd sequence (1,3,5,..) // construct object barebones if (typeof(result) === UNDEF_TYPE) { result = {}; for (p in props) { q = props[p]; if (typeof(q) === OBJ_TYPE) { result[q[0]] = undefined; } else { result[q] = undefined; } } } // try matching uastring with regexes for (j = k = 0; j < regex.length; j++) { matches = regex[j].exec(this.getUA()); if (!!matches) { for (p = 0; p < props.length; p++) { match = matches[++k]; q = props[p]; // check if given property is actually array if (typeof(q) === OBJ_TYPE && q.length > 0) { if (q.length == 2) { if (typeof(q[1]) == FUNC_TYPE) { // assign modified match result[q[0]] = q[1].call(this, match); } else { // assign given value, ignore regex match result[q[0]] = q[1]; } } else if (q.length == 3) { // check whether function or regex if (typeof(q[1]) === FUNC_TYPE && !(q[1].exec && q[1].test)) { // call function (usually string mapper) result[q[0]] = match ? q[1].call(this, match, q[2]) : undefined; } else { // sanitize match using given regex result[q[0]] = match ? match.replace(q[1], q[2]) : undefined; } } else if (q.length == 4) { result[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined; } } else { result[q] = match ? match : undefined; } } break; } } if(!!matches) break; // break the loop immediately if match found } return result; }, str : function (str, map) { for (var i in map) { // check if array if (typeof(map[i]) === OBJ_TYPE && map[i].length > 0) { for (var j = 0; j < map[i].length; j++) { if (util.has(map[i][j], str)) { return (i === UNKNOWN) ? undefined : i; } } } else if (util.has(map[i], str)) { return (i === UNKNOWN) ? undefined : i; } } return str; } }; /////////////// // String map ////////////// var maps = { browser : { oldsafari : { major : { '1' : ['/8', '/1', '/3'], '2' : '/4', '?' : '/' }, version : { '1.0' : '/8', '1.2' : '/1', '1.3' : '/3', '2.0' : '/412', '2.0.2' : '/416', '2.0.3' : '/417', '2.0.4' : '/419', '?' : '/' } } }, device : { sprint : { model : { 'Evo Shift 4G' : '7373KT' }, vendor : { 'HTC' : 'APA', 'Sprint' : 'Sprint' } } }, os : { windows : { version : { 'ME' : '4.90', 'NT 3.11' : 'NT3.51', 'NT 4.0' : 'NT4.0', '2000' : 'NT 5.0', 'XP' : ['NT 5.1', 'NT 5.2'], 'Vista' : 'NT 6.0', '7' : 'NT 6.1', '8' : 'NT 6.2', '8.1' : 'NT 6.3', 'RT' : 'ARM' } } } }; ////////////// // Regex map ///////////// var regexes = { browser : [[ // Presto based /(opera\smini)\/((\d+)?[\w\.-]+)/i, // Opera Mini /(opera\s[mobiletab]+).+version\/((\d+)?[\w\.-]+)/i, // Opera Mobi/Tablet /(opera).+version\/((\d+)?[\w\.]+)/i, // Opera > 9.80 /(opera)[\/\s]+((\d+)?[\w\.]+)/i // Opera < 9.80 ], [NAME, VERSION, MAJOR], [ /\s(opr)\/((\d+)?[\w\.]+)/i // Opera Webkit ], [[NAME, 'Opera'], VERSION, MAJOR], [ // Mixed /(kindle)\/((\d+)?[\w\.]+)/i, // Kindle /(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?((\d+)?[\w\.]+)*/i, // Lunascape/Maxthon/Netfront/Jasmine/Blazer // Trident based /(avant\s|iemobile|slim|baidu)(?:browser)?[\/\s]?((\d+)?[\w\.]*)/i, // Avant/IEMobile/SlimBrowser/Baidu /(?:ms|\()(ie)\s((\d+)?[\w\.]+)/i, // Internet Explorer // Webkit/KHTML based /(rekonq)((?:\/)[\w\.]+)*/i, // Rekonq /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron)\/((\d+)?[\w\.-]+)/i // Chromium/Flock/RockMelt/Midori/Epiphany/Silk/Skyfire/Bolt/Iron ], [NAME, VERSION, MAJOR], [ /(trident).+rv[:\s]((\d+)?[\w\.]+).+like\sgecko/i // IE11 ], [[NAME, 'IE'], VERSION, MAJOR], [ /(yabrowser)\/((\d+)?[\w\.]+)/i // Yandex ], [[NAME, 'Yandex'], VERSION, MAJOR], [ /(comodo_dragon)\/((\d+)?[\w\.]+)/i // Comodo Dragon ], [[NAME, /_/g, ' '], VERSION, MAJOR], [ /(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?((\d+)?[\w\.]+)/i // Chrome/OmniWeb/Arora/Tizen/Nokia ], [NAME, VERSION, MAJOR], [ /(dolfin)\/((\d+)?[\w\.]+)/i // Dolphin ], [[NAME, 'Dolphin'], VERSION, MAJOR], [ /((?:android.+)crmo|crios)\/((\d+)?[\w\.]+)/i // Chrome for Android/iOS ], [[NAME, 'Chrome'], VERSION, MAJOR], [ /((?:android.+))version\/((\d+)?[\w\.]+)\smobile\ssafari/i // Android Browser ], [[NAME, 'Android Browser'], VERSION, MAJOR], [ /version\/((\d+)?[\w\.]+).+?mobile\/\w+\s(safari)/i // Mobile Safari ], [VERSION, MAJOR, [NAME, 'Mobile Safari']], [ /version\/((\d+)?[\w\.]+).+?(mobile\s?safari|safari)/i // Safari & Safari Mobile ], [VERSION, MAJOR, NAME], [ /webkit.+?(mobile\s?safari|safari)((\/[\w\.]+))/i // Safari < 3.0 ], [NAME, [MAJOR, mapper.str, maps.browser.oldsafari.major], [VERSION, mapper.str, maps.browser.oldsafari.version]], [ /(konqueror)\/((\d+)?[\w\.]+)/i, // Konqueror /(webkit|khtml)\/((\d+)?[\w\.]+)/i ], [NAME, VERSION, MAJOR], [ // Gecko based /(navigator|netscape)\/((\d+)?[\w\.-]+)/i // Netscape ], [[NAME, 'Netscape'], VERSION, MAJOR], [ /(swiftfox)/i, // Swiftfox /(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?((\d+)?[\w\.\+]+)/i, // IceDragon/Iceweasel/Camino/Chimera/Fennec/Maemo/Minimo/Conkeror /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix)\/((\d+)?[\w\.-]+)/i, // Firefox/SeaMonkey/K-Meleon/IceCat/IceApe/Firebird/Phoenix /(mozilla)\/((\d+)?[\w\.]+).+rv\:.+gecko\/\d+/i, // Mozilla // Other /(uc\s?browser|polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|qqbrowser)[\/\s]?((\d+)?[\w\.]+)/i, // UCBrowser/Polaris/Lynx/Dillo/iCab/Doris/Amaya/w3m/NetSurf/QQBrowser /(links)\s\(((\d+)?[\w\.]+)/i, // Links /(gobrowser)\/?((\d+)?[\w\.]+)*/i, // GoBrowser /(ice\s?browser)\/v?((\d+)?[\w\._]+)/i, // ICE Browser /(mosaic)[\/\s]((\d+)?[\w\.]+)/i // Mosaic ], [NAME, VERSION, MAJOR] ], engine : [[ /(presto)\/([\w\.]+)/i, // Presto /(webkit|trident|netfront|netsurf|amaya|lynx|w3m)\/([\w\.]+)/i, // WebKit/Trident/NetFront/NetSurf/Amaya/Lynx/w3m /(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i, // KHTML/Tasman/Links /(icab)[\/\s]([23]\.[\d\.]+)/i // iCab ], [NAME, VERSION], [ /rv\:([\w\.]+).*(gecko)/i // Gecko ], [VERSION, NAME] ], os : [[ // Windows based /(windows)\snt\s6\.2;\s(arm)/i, // Windows RT /(windows\sphone(?:\sos)*|windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i ], [NAME, [VERSION, mapper.str, maps.os.windows.version]], [ /(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i ], [[NAME, 'Windows'], [VERSION, mapper.str, maps.os.windows.version]], [ // Mobile/Embedded OS /\((bb)(10);/i // BlackBerry 10 ], [[NAME, 'BlackBerry'], VERSION], [ /(blackberry)\w*\/?([\w\.]+)*/i, // Blackberry /(tizen)\/([\w\.]+)/i, // Tizen /(android|webos|palm\os|qnx|bada|rim\stablet\sos|meego)[\/\s-]?([\w\.]+)*/i // Android/WebOS/Palm/QNX/Bada/RIM/MeeGo ], [NAME, VERSION], [ /(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i // Symbian ], [[NAME, 'Symbian'], VERSION],[ /mozilla.+\(mobile;.+gecko.+firefox/i // Firefox OS ], [[NAME, 'Firefox OS'], VERSION], [ // Console /(nintendo|playstation)\s([wids3portablevu]+)/i, // Nintendo/Playstation // GNU/Linux based /(mint)[\/\s\(]?(\w+)*/i, // Mint /(joli|[kxln]?ubuntu|debian|[open]*suse|gentoo|arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk)[\/\s-]?([\w\.-]+)*/i, // Joli/Ubuntu/Debian/SUSE/Gentoo/Arch/Slackware // Fedora/Mandriva/CentOS/PCLinuxOS/RedHat/Zenwalk /(hurd|linux)\s?([\w\.]+)*/i, // Hurd/Linux /(gnu)\s?([\w\.]+)*/i // GNU ], [NAME, VERSION], [ /(cros)\s[\w]+\s([\w\.]+\w)/i // Chromium OS ], [[NAME, 'Chromium OS'], VERSION],[ // Solaris /(sunos)\s?([\w\.]+\d)*/i // Solaris ], [[NAME, 'Solaris'], VERSION], [ // BSD based /\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]+)*/i // FreeBSD/NetBSD/OpenBSD/PC-BSD/DragonFly ], [NAME, VERSION],[ /(ip[honead]+)(?:.*os\s*([\w]+)*\slike\smac|;\sopera)/i // iOS ], [[NAME, 'iOS'], [VERSION, /_/g, '.']], [ /(mac\sos\sx)\s?([\w\s\.]+\w)*/i // Mac OS ], [NAME, [VERSION, /_/g, '.']], [ // Other /(haiku)\s(\w+)/i, // Haiku /(aix)\s((\d)(?=\.|\)|\s)[\w\.]*)*/i, // AIX /(macintosh|mac(?=_powerpc)|plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos)/i, // Plan9/Minix/BeOS/OS2/AmigaOS/MorphOS/RISCOS /(unix)\s?([\w\.]+)*/i // UNIX ], [NAME, VERSION] ] }; ///////////////// // Constructor //////////////// var UAParser = function (uastring) { var ua = uastring || ((window && window.navigator && window.navigator.userAgent) ? window.navigator.userAgent : EMPTY); this.getBrowser = function () { return mapper.rgx.apply(this, regexes.browser); }; this.getEngine = function () { return mapper.rgx.apply(this, regexes.engine); }; this.getOS = function () { return mapper.rgx.apply(this, regexes.os); }; this.getResult = function() { return { ua : this.getUA(), browser : this.getBrowser(), engine : this.getEngine(), os : this.getOS() }; }; this.getUA = function () { return ua; }; this.setUA = function (uastring) { ua = uastring; return this; }; this.setUA(ua); }; return new UAParser().getResult(); })(); function version_compare(v1, v2, operator) { // From: http://phpjs.org/functions // + original by: Philippe Jausions (http://pear.php.net/user/jausions) // + original by: Aidan Lister (http://aidanlister.com/) // + reimplemented by: Kankrelune (http://www.webfaktory.info/) // + improved by: Brett Zamir (http://brett-zamir.me) // + improved by: Scott Baker // + improved by: Theriault // * example 1: version_compare('8.2.5rc', '8.2.5a'); // * returns 1: 1 // * example 2: version_compare('8.2.50', '8.2.52', '<'); // * returns 2: true // * example 3: version_compare('5.3.0-dev', '5.3.0'); // * returns 3: -1 // * example 4: version_compare('4.1.0.52','4.01.0.51'); // * returns 4: 1 // Important: compare must be initialized at 0. var i = 0, x = 0, compare = 0, // vm maps textual PHP versions to negatives so they're less than 0. // PHP currently defines these as CASE-SENSITIVE. It is important to // leave these as negatives so that they can come before numerical versions // and as if no letters were there to begin with. // (1alpha is < 1 and < 1.1 but > 1dev1) // If a non-numerical value can't be mapped to this table, it receives // -7 as its value. vm = { 'dev': -6, 'alpha': -5, 'a': -5, 'beta': -4, 'b': -4, 'RC': -3, 'rc': -3, '#': -2, 'p': 1, 'pl': 1 }, // This function will be called to prepare each version argument. // It replaces every _, -, and + with a dot. // It surrounds any nonsequence of numbers/dots with dots. // It replaces sequences of dots with a single dot. // version_compare('4..0', '4.0') == 0 // Important: A string of 0 length needs to be converted into a value // even less than an unexisting value in vm (-7), hence [-8]. // It's also important to not strip spaces because of this. // version_compare('', ' ') == 1 prepVersion = function (v) { v = ('' + v).replace(/[_\-+]/g, '.'); v = v.replace(/([^.\d]+)/g, '.$1.').replace(/\.{2,}/g, '.'); return (!v.length ? [-8] : v.split('.')); }, // This converts a version component to a number. // Empty component becomes 0. // Non-numerical component becomes a negative number. // Numerical component becomes itself as an integer. numVersion = function (v) { return !v ? 0 : (isNaN(v) ? vm[v] || -7 : parseInt(v, 10)); }; v1 = prepVersion(v1); v2 = prepVersion(v2); x = Math.max(v1.length, v2.length); for (i = 0; i < x; i++) { if (v1[i] == v2[i]) { continue; } v1[i] = numVersion(v1[i]); v2[i] = numVersion(v2[i]); if (v1[i] < v2[i]) { compare = -1; break; } else if (v1[i] > v2[i]) { compare = 1; break; } } if (!operator) { return compare; } // Important: operator is CASE-SENSITIVE. // "No operator" seems to be treated as "<." // Any other values seem to make the function return null. switch (operator) { case '>': case 'gt': return (compare > 0); case '>=': case 'ge': return (compare >= 0); case '<=': case 'le': return (compare <= 0); case '==': case '=': case 'eq': return (compare === 0); case '<>': case '!=': case 'ne': return (compare !== 0); case '': case '<': case 'lt': return (compare < 0); default: return null; } } var can = (function() { var caps = { define_property: (function() { /* // currently too much extra code required, not exactly worth it try { // as of IE8, getters/setters are supported only on DOM elements var obj = {}; if (Object.defineProperty) { Object.defineProperty(obj, 'prop', { enumerable: true, configurable: true }); return true; } } catch(ex) {} if (Object.prototype.__defineGetter__ && Object.prototype.__defineSetter__) { return true; }*/ return false; }()), create_canvas: (function() { // On the S60 and BB Storm, getContext exists, but always returns undefined // so we actually have to call getContext() to verify // github.com/Modernizr/Modernizr/issues/issue/97/ var el = document.createElement('canvas'); return !!(el.getContext && el.getContext('2d')); }()), return_response_type: function(responseType) { try { if (Basic.inArray(responseType, ['', 'text', 'document']) !== -1) { return true; } else if (window.XMLHttpRequest) { var xhr = new XMLHttpRequest(); xhr.open('get', '/'); // otherwise Gecko throws an exception if ('responseType' in xhr) { xhr.responseType = responseType; // as of 23.0.1271.64, Chrome switched from throwing exception to merely logging it to the console (why? o why?) if (xhr.responseType !== responseType) { return false; } return true; } } } catch (ex) {} return false; }, // ideas for this heavily come from Modernizr (http://modernizr.com/) use_data_uri: (function() { var du = new Image(); du.onload = function() { caps.use_data_uri = (du.width === 1 && du.height === 1); }; setTimeout(function() { du.src = "data:image/gif;base64,R0lGODlhAQABAIAAAP8AAAAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="; }, 1); return false; }()), use_data_uri_over32kb: function() { // IE8 return caps.use_data_uri && (Env.browser !== 'IE' || Env.version >= 9); }, use_data_uri_of: function(bytes) { return (caps.use_data_uri && bytes < 33000 || caps.use_data_uri_over32kb()); }, use_fileinput: function() { var el = document.createElement('input'); el.setAttribute('type', 'file'); return !el.disabled; } }; return function(cap) { var args = [].slice.call(arguments); args.shift(); // shift of cap return Basic.typeOf(caps[cap]) === 'function' ? caps[cap].apply(this, args) : !!caps[cap]; }; }()); var Env = { can: can, browser: UAParser.browser.name, version: parseFloat(UAParser.browser.major), os: UAParser.os.name, // everybody intuitively types it in a lowercase for some reason osVersion: UAParser.os.version, verComp: version_compare, swf_url: "../flash/Moxie.swf", xap_url: "../silverlight/Moxie.xap", global_event_dispatcher: "moxie.core.EventTarget.instance.dispatchEvent" }; // for backward compatibility // @deprecated Use `Env.os` instead Env.OS = Env.os; return Env; }); // Included from: src/javascript/core/utils/Dom.js /** * Dom.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/utils/Dom', ['moxie/core/utils/Env'], function(Env) { /** Get DOM Element by it's id. @method get @for Utils @param {String} id Identifier of the DOM Element @return {DOMElement} */ var get = function(id) { if (typeof id !== 'string') { return id; } return document.getElementById(id); }; /** Checks if specified DOM element has specified class. @method hasClass @static @param {Object} obj DOM element like object to add handler to. @param {String} name Class name */ var hasClass = function(obj, name) { if (!obj.className) { return false; } var regExp = new RegExp("(^|\\s+)"+name+"(\\s+|$)"); return regExp.test(obj.className); }; /** Adds specified className to specified DOM element. @method addClass @static @param {Object} obj DOM element like object to add handler to. @param {String} name Class name */ var addClass = function(obj, name) { if (!hasClass(obj, name)) { obj.className = !obj.className ? name : obj.className.replace(/\s+$/, '') + ' ' + name; } }; /** Removes specified className from specified DOM element. @method removeClass @static @param {Object} obj DOM element like object to add handler to. @param {String} name Class name */ var removeClass = function(obj, name) { if (obj.className) { var regExp = new RegExp("(^|\\s+)"+name+"(\\s+|$)"); obj.className = obj.className.replace(regExp, function($0, $1, $2) { return $1 === ' ' && $2 === ' ' ? ' ' : ''; }); } }; /** Returns a given computed style of a DOM element. @method getStyle @static @param {Object} obj DOM element like object. @param {String} name Style you want to get from the DOM element */ var getStyle = function(obj, name) { if (obj.currentStyle) { return obj.currentStyle[name]; } else if (window.getComputedStyle) { return window.getComputedStyle(obj, null)[name]; } }; /** Returns the absolute x, y position of an Element. The position will be returned in a object with x, y fields. @method getPos @static @param {Element} node HTML element or element id to get x, y position from. @param {Element} root Optional root element to stop calculations at. @return {object} Absolute position of the specified element object with x, y fields. */ var getPos = function(node, root) { var x = 0, y = 0, parent, doc = document, nodeRect, rootRect; node = node; root = root || doc.body; // Returns the x, y cordinate for an element on IE 6 and IE 7 function getIEPos(node) { var bodyElm, rect, x = 0, y = 0; if (node) { rect = node.getBoundingClientRect(); bodyElm = doc.compatMode === "CSS1Compat" ? doc.documentElement : doc.body; x = rect.left + bodyElm.scrollLeft; y = rect.top + bodyElm.scrollTop; } return { x : x, y : y }; } // Use getBoundingClientRect on IE 6 and IE 7 but not on IE 8 in standards mode if (node && node.getBoundingClientRect && Env.browser === 'IE' && (!doc.documentMode || doc.documentMode < 8)) { nodeRect = getIEPos(node); rootRect = getIEPos(root); return { x : nodeRect.x - rootRect.x, y : nodeRect.y - rootRect.y }; } parent = node; while (parent && parent != root && parent.nodeType) { x += parent.offsetLeft || 0; y += parent.offsetTop || 0; parent = parent.offsetParent; } parent = node.parentNode; while (parent && parent != root && parent.nodeType) { x -= parent.scrollLeft || 0; y -= parent.scrollTop || 0; parent = parent.parentNode; } return { x : x, y : y }; }; /** Returns the size of the specified node in pixels. @method getSize @static @param {Node} node Node to get the size of. @return {Object} Object with a w and h property. */ var getSize = function(node) { return { w : node.offsetWidth || node.clientWidth, h : node.offsetHeight || node.clientHeight }; }; return { get: get, hasClass: hasClass, addClass: addClass, removeClass: removeClass, getStyle: getStyle, getPos: getPos, getSize: getSize }; }); // Included from: src/javascript/core/Exceptions.js /** * Exceptions.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/Exceptions', [ 'moxie/core/utils/Basic' ], function(Basic) { function _findKey(obj, value) { var key; for (key in obj) { if (obj[key] === value) { return key; } } return null; } return { RuntimeError: (function() { var namecodes = { NOT_INIT_ERR: 1, NOT_SUPPORTED_ERR: 9, JS_ERR: 4 }; function RuntimeError(code) { this.code = code; this.name = _findKey(namecodes, code); this.message = this.name + ": RuntimeError " + this.code; } Basic.extend(RuntimeError, namecodes); RuntimeError.prototype = Error.prototype; return RuntimeError; }()), OperationNotAllowedException: (function() { function OperationNotAllowedException(code) { this.code = code; this.name = 'OperationNotAllowedException'; } Basic.extend(OperationNotAllowedException, { NOT_ALLOWED_ERR: 1 }); OperationNotAllowedException.prototype = Error.prototype; return OperationNotAllowedException; }()), ImageError: (function() { var namecodes = { WRONG_FORMAT: 1, MAX_RESOLUTION_ERR: 2 }; function ImageError(code) { this.code = code; this.name = _findKey(namecodes, code); this.message = this.name + ": ImageError " + this.code; } Basic.extend(ImageError, namecodes); ImageError.prototype = Error.prototype; return ImageError; }()), FileException: (function() { var namecodes = { NOT_FOUND_ERR: 1, SECURITY_ERR: 2, ABORT_ERR: 3, NOT_READABLE_ERR: 4, ENCODING_ERR: 5, NO_MODIFICATION_ALLOWED_ERR: 6, INVALID_STATE_ERR: 7, SYNTAX_ERR: 8 }; function FileException(code) { this.code = code; this.name = _findKey(namecodes, code); this.message = this.name + ": FileException " + this.code; } Basic.extend(FileException, namecodes); FileException.prototype = Error.prototype; return FileException; }()), DOMException: (function() { var namecodes = { INDEX_SIZE_ERR: 1, DOMSTRING_SIZE_ERR: 2, HIERARCHY_REQUEST_ERR: 3, WRONG_DOCUMENT_ERR: 4, INVALID_CHARACTER_ERR: 5, NO_DATA_ALLOWED_ERR: 6, NO_MODIFICATION_ALLOWED_ERR: 7, NOT_FOUND_ERR: 8, NOT_SUPPORTED_ERR: 9, INUSE_ATTRIBUTE_ERR: 10, INVALID_STATE_ERR: 11, SYNTAX_ERR: 12, INVALID_MODIFICATION_ERR: 13, NAMESPACE_ERR: 14, INVALID_ACCESS_ERR: 15, VALIDATION_ERR: 16, TYPE_MISMATCH_ERR: 17, SECURITY_ERR: 18, NETWORK_ERR: 19, ABORT_ERR: 20, URL_MISMATCH_ERR: 21, QUOTA_EXCEEDED_ERR: 22, TIMEOUT_ERR: 23, INVALID_NODE_TYPE_ERR: 24, DATA_CLONE_ERR: 25 }; function DOMException(code) { this.code = code; this.name = _findKey(namecodes, code); this.message = this.name + ": DOMException " + this.code; } Basic.extend(DOMException, namecodes); DOMException.prototype = Error.prototype; return DOMException; }()), EventException: (function() { function EventException(code) { this.code = code; this.name = 'EventException'; } Basic.extend(EventException, { UNSPECIFIED_EVENT_TYPE_ERR: 0 }); EventException.prototype = Error.prototype; return EventException; }()) }; }); // Included from: src/javascript/core/EventTarget.js /** * EventTarget.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/EventTarget', [ 'moxie/core/Exceptions', 'moxie/core/utils/Basic' ], function(x, Basic) { /** Parent object for all event dispatching components and objects @class EventTarget @constructor EventTarget */ function EventTarget() { // hash of event listeners by object uid var eventpool = {}; Basic.extend(this, { /** Unique id of the event dispatcher, usually overriden by children @property uid @type String */ uid: null, /** Can be called from within a child in order to acquire uniqie id in automated manner @method init */ init: function() { if (!this.uid) { this.uid = Basic.guid('uid_'); } }, /** Register a handler to a specific event dispatched by the object @method addEventListener @param {String} type Type or basically a name of the event to subscribe to @param {Function} fn Callback function that will be called when event happens @param {Number} [priority=0] Priority of the event handler - handlers with higher priorities will be called first @param {Object} [scope=this] A scope to invoke event handler in */ addEventListener: function(type, fn, priority, scope) { var self = this, list; type = Basic.trim(type); if (/\s/.test(type)) { // multiple event types were passed for one handler Basic.each(type.split(/\s+/), function(type) { self.addEventListener(type, fn, priority, scope); }); return; } type = type.toLowerCase(); priority = parseInt(priority, 10) || 0; list = eventpool[this.uid] && eventpool[this.uid][type] || []; list.push({fn : fn, priority : priority, scope : scope || this}); if (!eventpool[this.uid]) { eventpool[this.uid] = {}; } eventpool[this.uid][type] = list; }, /** Check if any handlers were registered to the specified event @method hasEventListener @param {String} type Type or basically a name of the event to check @return {Mixed} Returns a handler if it was found and false, if - not */ hasEventListener: function(type) { return type ? !!(eventpool[this.uid] && eventpool[this.uid][type]) : !!eventpool[this.uid]; }, /** Unregister the handler from the event, or if former was not specified - unregister all handlers @method removeEventListener @param {String} type Type or basically a name of the event @param {Function} [fn] Handler to unregister */ removeEventListener: function(type, fn) { type = type.toLowerCase(); var list = eventpool[this.uid] && eventpool[this.uid][type], i; if (list) { if (fn) { for (i = list.length - 1; i >= 0; i--) { if (list[i].fn === fn) { list.splice(i, 1); break; } } } else { list = []; } // delete event list if it has become empty if (!list.length) { delete eventpool[this.uid][type]; // and object specific entry in a hash if it has no more listeners attached if (Basic.isEmptyObj(eventpool[this.uid])) { delete eventpool[this.uid]; } } } }, /** Remove all event handlers from the object @method removeAllEventListeners */ removeAllEventListeners: function() { if (eventpool[this.uid]) { delete eventpool[this.uid]; } }, /** Dispatch the event @method dispatchEvent @param {String/Object} Type of event or event object to dispatch @param {Mixed} [...] Variable number of arguments to be passed to a handlers @return {Boolean} true by default and false if any handler returned false */ dispatchEvent: function(type) { var uid, list, args, tmpEvt, evt = {}, result = true, undef; if (Basic.typeOf(type) !== 'string') { // we can't use original object directly (because of Silverlight) tmpEvt = type; if (Basic.typeOf(tmpEvt.type) === 'string') { type = tmpEvt.type; if (tmpEvt.total !== undef && tmpEvt.loaded !== undef) { // progress event evt.total = tmpEvt.total; evt.loaded = tmpEvt.loaded; } evt.async = tmpEvt.async || false; } else { throw new x.EventException(x.EventException.UNSPECIFIED_EVENT_TYPE_ERR); } } // check if event is meant to be dispatched on an object having specific uid if (type.indexOf('::') !== -1) { (function(arr) { uid = arr[0]; type = arr[1]; }(type.split('::'))); } else { uid = this.uid; } type = type.toLowerCase(); list = eventpool[uid] && eventpool[uid][type]; if (list) { // sort event list by prority list.sort(function(a, b) { return b.priority - a.priority; }); args = [].slice.call(arguments); // first argument will be pseudo-event object args.shift(); evt.type = type; args.unshift(evt); // Dispatch event to all listeners var queue = []; Basic.each(list, function(handler) { // explicitly set the target, otherwise events fired from shims do not get it args[0].target = handler.scope; // if event is marked as async, detach the handler if (evt.async) { queue.push(function(cb) { setTimeout(function() { cb(handler.fn.apply(handler.scope, args) === false); }, 1); }); } else { queue.push(function(cb) { cb(handler.fn.apply(handler.scope, args) === false); // if handler returns false stop propagation }); } }); if (queue.length) { Basic.inSeries(queue, function(err) { result = !err; }); } } return result; }, /** Alias for addEventListener @method bind @protected */ bind: function() { this.addEventListener.apply(this, arguments); }, /** Alias for removeEventListener @method unbind @protected */ unbind: function() { this.removeEventListener.apply(this, arguments); }, /** Alias for removeAllEventListeners @method unbindAll @protected */ unbindAll: function() { this.removeAllEventListeners.apply(this, arguments); }, /** Alias for dispatchEvent @method trigger @protected */ trigger: function() { return this.dispatchEvent.apply(this, arguments); }, /** Converts properties of on[event] type to corresponding event handlers, is used to avoid extra hassle around the process of calling them back @method convertEventPropsToHandlers @private */ convertEventPropsToHandlers: function(handlers) { var h; if (Basic.typeOf(handlers) !== 'array') { handlers = [handlers]; } for (var i = 0; i < handlers.length; i++) { h = 'on' + handlers[i]; if (Basic.typeOf(this[h]) === 'function') { this.addEventListener(handlers[i], this[h]); } else if (Basic.typeOf(this[h]) === 'undefined') { this[h] = null; // object must have defined event properties, even if it doesn't make use of them } } } }); } EventTarget.instance = new EventTarget(); return EventTarget; }); // Included from: src/javascript/core/utils/Encode.js /** * Encode.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/utils/Encode', [], function() { /** Encode string with UTF-8 @method utf8_encode @for Utils @static @param {String} str String to encode @return {String} UTF-8 encoded string */ var utf8_encode = function(str) { return unescape(encodeURIComponent(str)); }; /** Decode UTF-8 encoded string @method utf8_decode @static @param {String} str String to decode @return {String} Decoded string */ var utf8_decode = function(str_data) { return decodeURIComponent(escape(str_data)); }; /** Decode Base64 encoded string (uses browser's default method if available), from: https://raw.github.com/kvz/phpjs/master/functions/url/base64_decode.js @method atob @static @param {String} data String to decode @return {String} Decoded string */ var atob = function(data, utf8) { if (typeof(window.atob) === 'function') { return utf8 ? utf8_decode(window.atob(data)) : window.atob(data); } // http://kevin.vanzonneveld.net // + original by: Tyler Akins (http://rumkin.com) // + improved by: Thunder.m // + input by: Aman Gupta // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Onno Marsman // + bugfixed by: Pellentesque Malesuada // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + input by: Brett Zamir (http://brett-zamir.me) // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // * example 1: base64_decode('S2V2aW4gdmFuIFpvbm5ldmVsZA=='); // * returns 1: 'Kevin van Zonneveld' // mozilla has this native // - but breaks in 2.0.0.12! //if (typeof this.window.atob == 'function') { // return atob(data); //} var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, dec = "", tmp_arr = []; if (!data) { return data; } data += ''; do { // unpack four hexets into three octets using index points in b64 h1 = b64.indexOf(data.charAt(i++)); h2 = b64.indexOf(data.charAt(i++)); h3 = b64.indexOf(data.charAt(i++)); h4 = b64.indexOf(data.charAt(i++)); bits = h1 << 18 | h2 << 12 | h3 << 6 | h4; o1 = bits >> 16 & 0xff; o2 = bits >> 8 & 0xff; o3 = bits & 0xff; if (h3 == 64) { tmp_arr[ac++] = String.fromCharCode(o1); } else if (h4 == 64) { tmp_arr[ac++] = String.fromCharCode(o1, o2); } else { tmp_arr[ac++] = String.fromCharCode(o1, o2, o3); } } while (i < data.length); dec = tmp_arr.join(''); return utf8 ? utf8_decode(dec) : dec; }; /** Base64 encode string (uses browser's default method if available), from: https://raw.github.com/kvz/phpjs/master/functions/url/base64_encode.js @method btoa @static @param {String} data String to encode @return {String} Base64 encoded string */ var btoa = function(data, utf8) { if (utf8) { utf8_encode(data); } if (typeof(window.btoa) === 'function') { return window.btoa(data); } // http://kevin.vanzonneveld.net // + original by: Tyler Akins (http://rumkin.com) // + improved by: Bayron Guevara // + improved by: Thunder.m // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Pellentesque Malesuada // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: Rafał Kukawski (http://kukawski.pl) // * example 1: base64_encode('Kevin van Zonneveld'); // * returns 1: 'S2V2aW4gdmFuIFpvbm5ldmVsZA==' // mozilla has this native // - but breaks in 2.0.0.12! var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, enc = "", tmp_arr = []; if (!data) { return data; } do { // pack three octets into four hexets o1 = data.charCodeAt(i++); o2 = data.charCodeAt(i++); o3 = data.charCodeAt(i++); bits = o1 << 16 | o2 << 8 | o3; h1 = bits >> 18 & 0x3f; h2 = bits >> 12 & 0x3f; h3 = bits >> 6 & 0x3f; h4 = bits & 0x3f; // use hexets to index into b64, and append result to encoded string tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4); } while (i < data.length); enc = tmp_arr.join(''); var r = data.length % 3; return (r ? enc.slice(0, r - 3) : enc) + '==='.slice(r || 3); }; return { utf8_encode: utf8_encode, utf8_decode: utf8_decode, atob: atob, btoa: btoa }; }); // Included from: src/javascript/runtime/Runtime.js /** * Runtime.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/runtime/Runtime', [ "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/EventTarget" ], function(Basic, Dom, EventTarget) { var runtimeConstructors = {}, runtimes = {}; /** Common set of methods and properties for every runtime instance @class Runtime @param {Object} options @param {String} type Sanitized name of the runtime @param {Object} [caps] Set of capabilities that differentiate specified runtime @param {Object} [modeCaps] Set of capabilities that do require specific operational mode @param {String} [preferredMode='browser'] Preferred operational mode to choose if no required capabilities were requested */ function Runtime(options, type, caps, modeCaps, preferredMode) { /** Dispatched when runtime is initialized and ready. Results in RuntimeInit on a connected component. @event Init */ /** Dispatched when runtime fails to initialize. Results in RuntimeError on a connected component. @event Error */ var self = this , _shim , _uid = Basic.guid(type + '_') , defaultMode = preferredMode || 'browser' ; options = options || {}; // register runtime in private hash runtimes[_uid] = this; /** Default set of capabilities, which can be redifined later by specific runtime @private @property caps @type Object */ caps = Basic.extend({ // Runtime can: // provide access to raw binary data of the file access_binary: false, // provide access to raw binary data of the image (image extension is optional) access_image_binary: false, // display binary data as thumbs for example display_media: false, // make cross-domain requests do_cors: false, // accept files dragged and dropped from the desktop drag_and_drop: false, // filter files in selection dialog by their extensions filter_by_extension: true, // resize image (and manipulate it raw data of any file in general) resize_image: false, // periodically report how many bytes of total in the file were uploaded (loaded) report_upload_progress: false, // provide access to the headers of http response return_response_headers: false, // support response of specific type, which should be passed as an argument // e.g. runtime.can('return_response_type', 'blob') return_response_type: false, // return http status code of the response return_status_code: true, // send custom http header with the request send_custom_headers: false, // pick up the files from a dialog select_file: false, // select whole folder in file browse dialog select_folder: false, // select multiple files at once in file browse dialog select_multiple: true, // send raw binary data, that is generated after image resizing or manipulation of other kind send_binary_string: false, // send cookies with http request and therefore retain session send_browser_cookies: true, // send data formatted as multipart/form-data send_multipart: true, // slice the file or blob to smaller parts slice_blob: false, // upload file without preloading it to memory, stream it out directly from disk stream_upload: false, // programmatically trigger file browse dialog summon_file_dialog: false, // upload file of specific size, size should be passed as argument // e.g. runtime.can('upload_filesize', '500mb') upload_filesize: true, // initiate http request with specific http method, method should be passed as argument // e.g. runtime.can('use_http_method', 'put') use_http_method: true }, caps); // default to the mode that is compatible with preferred caps if (options.preferred_caps) { defaultMode = Runtime.getMode(modeCaps, options.preferred_caps, defaultMode); } // small extension factory here (is meant to be extended with actual extensions constructors) _shim = (function() { var objpool = {}; return { exec: function(uid, comp, fn, args) { if (_shim[comp]) { if (!objpool[uid]) { objpool[uid] = { context: this, instance: new _shim[comp]() }; } if (objpool[uid].instance[fn]) { return objpool[uid].instance[fn].apply(this, args); } } }, removeInstance: function(uid) { delete objpool[uid]; }, removeAllInstances: function() { var self = this; Basic.each(objpool, function(obj, uid) { if (Basic.typeOf(obj.instance.destroy) === 'function') { obj.instance.destroy.call(obj.context); } self.removeInstance(uid); }); } }; }()); // public methods Basic.extend(this, { /** Specifies whether runtime instance was initialized or not @property initialized @type {Boolean} @default false */ initialized: false, // shims require this flag to stop initialization retries /** Unique ID of the runtime @property uid @type {String} */ uid: _uid, /** Runtime type (e.g. flash, html5, etc) @property type @type {String} */ type: type, /** Runtime (not native one) may operate in browser or client mode. @property mode @private @type {String|Boolean} current mode or false, if none possible */ mode: Runtime.getMode(modeCaps, (options.required_caps), defaultMode), /** id of the DOM container for the runtime (if available) @property shimid @type {String} */ shimid: _uid + '_container', /** Number of connected clients. If equal to zero, runtime can be destroyed @property clients @type {Number} */ clients: 0, /** Runtime initialization options @property options @type {Object} */ options: options, /** Checks if the runtime has specific capability @method can @param {String} cap Name of capability to check @param {Mixed} [value] If passed, capability should somehow correlate to the value @param {Object} [refCaps] Set of capabilities to check the specified cap against (defaults to internal set) @return {Boolean} true if runtime has such capability and false, if - not */ can: function(cap, value) { var refCaps = arguments[2] || caps; // if cap var is a comma-separated list of caps, convert it to object (key/value) if (Basic.typeOf(cap) === 'string' && Basic.typeOf(value) === 'undefined') { cap = Runtime.parseCaps(cap); } if (Basic.typeOf(cap) === 'object') { for (var key in cap) { if (!this.can(key, cap[key], refCaps)) { return false; } } return true; } // check the individual cap if (Basic.typeOf(refCaps[cap]) === 'function') { return refCaps[cap].call(this, value); } else { return (value === refCaps[cap]); } }, /** Returns container for the runtime as DOM element @method getShimContainer @return {DOMElement} */ getShimContainer: function() { var container, shimContainer = Dom.get(this.shimid); // if no container for shim, create one if (!shimContainer) { container = this.options.container ? Dom.get(this.options.container) : document.body; // create shim container and insert it at an absolute position into the outer container shimContainer = document.createElement('div'); shimContainer.id = this.shimid; shimContainer.className = 'moxie-shim moxie-shim-' + this.type; Basic.extend(shimContainer.style, { position: 'absolute', top: '0px', left: '0px', width: '1px', height: '1px', overflow: 'hidden' }); container.appendChild(shimContainer); container = null; } return shimContainer; }, /** Returns runtime as DOM element (if appropriate) @method getShim @return {DOMElement} */ getShim: function() { return _shim; }, /** Invokes a method within the runtime itself (might differ across the runtimes) @method shimExec @param {Mixed} [] @protected @return {Mixed} Depends on the action and component */ shimExec: function(component, action) { var args = [].slice.call(arguments, 2); return self.getShim().exec.call(this, this.uid, component, action, args); }, /** Operaional interface that is used by components to invoke specific actions on the runtime (is invoked in the scope of component) @method exec @param {Mixed} []* @protected @return {Mixed} Depends on the action and component */ exec: function(component, action) { // this is called in the context of component, not runtime var args = [].slice.call(arguments, 2); if (self[component] && self[component][action]) { return self[component][action].apply(this, args); } return self.shimExec.apply(this, arguments); }, /** Destroys the runtime (removes all events and deletes DOM structures) @method destroy */ destroy: function() { if (!self) { return; // obviously already destroyed } var shimContainer = Dom.get(this.shimid); if (shimContainer) { shimContainer.parentNode.removeChild(shimContainer); } if (_shim) { _shim.removeAllInstances(); } this.unbindAll(); delete runtimes[this.uid]; this.uid = null; // mark this runtime as destroyed _uid = self = _shim = shimContainer = null; } }); // once we got the mode, test against all caps if (this.mode && options.required_caps && !this.can(options.required_caps)) { this.mode = false; } } /** Default order to try different runtime types @property order @type String @static */ Runtime.order = 'html5,flash,silverlight,html4'; /** Retrieves runtime from private hash by it's uid @method getRuntime @private @static @param {String} uid Unique identifier of the runtime @return {Runtime|Boolean} Returns runtime, if it exists and false, if - not */ Runtime.getRuntime = function(uid) { return runtimes[uid] ? runtimes[uid] : false; }; /** Register constructor for the Runtime of new (or perhaps modified) type @method addConstructor @static @param {String} type Runtime type (e.g. flash, html5, etc) @param {Function} construct Constructor for the Runtime type */ Runtime.addConstructor = function(type, constructor) { constructor.prototype = EventTarget.instance; runtimeConstructors[type] = constructor; }; /** Get the constructor for the specified type. method getConstructor @static @param {String} type Runtime type (e.g. flash, html5, etc) @return {Function} Constructor for the Runtime type */ Runtime.getConstructor = function(type) { return runtimeConstructors[type] || null; }; /** Get info about the runtime (uid, type, capabilities) @method getInfo @static @param {String} uid Unique identifier of the runtime @return {Mixed} Info object or null if runtime doesn't exist */ Runtime.getInfo = function(uid) { var runtime = Runtime.getRuntime(uid); if (runtime) { return { uid: runtime.uid, type: runtime.type, mode: runtime.mode, can: function() { return runtime.can.apply(runtime, arguments); } }; } return null; }; /** Convert caps represented by a comma-separated string to the object representation. @method parseCaps @static @param {String} capStr Comma-separated list of capabilities @return {Object} */ Runtime.parseCaps = function(capStr) { var capObj = {}; if (Basic.typeOf(capStr) !== 'string') { return capStr || {}; } Basic.each(capStr.split(','), function(key) { capObj[key] = true; // we assume it to be - true }); return capObj; }; /** Test the specified runtime for specific capabilities. @method can @static @param {String} type Runtime type (e.g. flash, html5, etc) @param {String|Object} caps Set of capabilities to check @return {Boolean} Result of the test */ Runtime.can = function(type, caps) { var runtime , constructor = Runtime.getConstructor(type) , mode ; if (constructor) { runtime = new constructor({ required_caps: caps }); mode = runtime.mode; runtime.destroy(); return !!mode; } return false; }; /** Figure out a runtime that supports specified capabilities. @method thatCan @static @param {String|Object} caps Set of capabilities to check @param {String} [runtimeOrder] Comma-separated list of runtimes to check against @return {String} Usable runtime identifier or null */ Runtime.thatCan = function(caps, runtimeOrder) { var types = (runtimeOrder || Runtime.order).split(/\s*,\s*/); for (var i in types) { if (Runtime.can(types[i], caps)) { return types[i]; } } return null; }; /** Figure out an operational mode for the specified set of capabilities. @method getMode @static @param {Object} modeCaps Set of capabilities that depend on particular runtime mode @param {Object} [requiredCaps] Supplied set of capabilities to find operational mode for @param {String|Boolean} [defaultMode='browser'] Default mode to use @return {String|Boolean} Compatible operational mode */ Runtime.getMode = function(modeCaps, requiredCaps, defaultMode) { var mode = null; if (Basic.typeOf(defaultMode) === 'undefined') { // only if not specified defaultMode = 'browser'; } if (requiredCaps && !Basic.isEmptyObj(modeCaps)) { // loop over required caps and check if they do require the same mode Basic.each(requiredCaps, function(value, cap) { if (modeCaps.hasOwnProperty(cap)) { var capMode = modeCaps[cap](value); // make sure we always have an array if (typeof(capMode) === 'string') { capMode = [capMode]; } if (!mode) { mode = capMode; } else if (!(mode = Basic.arrayIntersect(mode, capMode))) { // if cap requires conflicting mode - runtime cannot fulfill required caps return (mode = false); } } }); if (mode) { return Basic.inArray(defaultMode, mode) !== -1 ? defaultMode : mode[0]; } else if (mode === false) { return false; } } return defaultMode; }; /** Capability check that always returns true @private @static @return {True} */ Runtime.capTrue = function() { return true; }; /** Capability check that always returns false @private @static @return {False} */ Runtime.capFalse = function() { return false; }; /** Evaluate the expression to boolean value and create a function that always returns it. @private @static @param {Mixed} expr Expression to evaluate @return {Function} Function returning the result of evaluation */ Runtime.capTest = function(expr) { return function() { return !!expr; }; }; return Runtime; }); // Included from: src/javascript/runtime/RuntimeClient.js /** * RuntimeClient.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/runtime/RuntimeClient', [ 'moxie/core/Exceptions', 'moxie/core/utils/Basic', 'moxie/runtime/Runtime' ], function(x, Basic, Runtime) { /** Set of methods and properties, required by a component to acquire ability to connect to a runtime @class RuntimeClient */ return function RuntimeClient() { var runtime; Basic.extend(this, { /** Connects to the runtime specified by the options. Will either connect to existing runtime or create a new one. Increments number of clients connected to the specified runtime. @method connectRuntime @param {Mixed} options Can be a runtme uid or a set of key-value pairs defining requirements and pre-requisites */ connectRuntime: function(options) { var comp = this, ruid; function initialize(items) { var type, constructor; // if we ran out of runtimes if (!items.length) { comp.trigger('RuntimeError', new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR)); runtime = null; return; } type = items.shift(); constructor = Runtime.getConstructor(type); if (!constructor) { initialize(items); return; } // try initializing the runtime runtime = new constructor(options); runtime.bind('Init', function() { // mark runtime as initialized runtime.initialized = true; // jailbreak ... setTimeout(function() { runtime.clients++; // this will be triggered on component comp.trigger('RuntimeInit', runtime); }, 1); }); runtime.bind('Error', function() { runtime.destroy(); // runtime cannot destroy itself from inside at a right moment, thus we do it here initialize(items); }); /*runtime.bind('Exception', function() { });*/ // check if runtime managed to pick-up operational mode if (!runtime.mode) { runtime.trigger('Error'); return; } runtime.init(); } // check if a particular runtime was requested if (Basic.typeOf(options) === 'string') { ruid = options; } else if (Basic.typeOf(options.ruid) === 'string') { ruid = options.ruid; } if (ruid) { runtime = Runtime.getRuntime(ruid); if (runtime) { runtime.clients++; return runtime; } else { // there should be a runtime and there's none - weird case throw new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR); } } // initialize a fresh one, that fits runtime list and required features best initialize((options.runtime_order || Runtime.order).split(/\s*,\s*/)); }, /** Returns the runtime to which the client is currently connected. @method getRuntime @return {Runtime} Runtime or null if client is not connected */ getRuntime: function() { if (runtime && runtime.uid) { return runtime; } runtime = null; // make sure we do not leave zombies rambling around return null; }, /** Disconnects from the runtime. Decrements number of clients connected to the specified runtime. @method disconnectRuntime */ disconnectRuntime: function() { if (runtime && --runtime.clients <= 0) { runtime.destroy(); runtime = null; } } }); }; }); // Included from: src/javascript/file/Blob.js /** * Blob.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/file/Blob', [ 'moxie/core/utils/Basic', 'moxie/core/utils/Encode', 'moxie/runtime/RuntimeClient' ], function(Basic, Encode, RuntimeClient) { var blobpool = {}; /** @class Blob @constructor @param {String} ruid Unique id of the runtime, to which this blob belongs to @param {Object} blob Object "Native" blob object, as it is represented in the runtime */ function Blob(ruid, blob) { function _sliceDetached(start, end, type) { var blob, data = blobpool[this.uid]; if (Basic.typeOf(data) !== 'string' || !data.length) { return null; // or throw exception } blob = new Blob(null, { type: type, size: end - start }); blob.detach(data.substr(start, blob.size)); return blob; } RuntimeClient.call(this); if (ruid) { this.connectRuntime(ruid); } if (!blob) { blob = {}; } else if (Basic.typeOf(blob) === 'string') { // dataUrl or binary string blob = { data: blob }; } Basic.extend(this, { /** Unique id of the component @property uid @type {String} */ uid: blob.uid || Basic.guid('uid_'), /** Unique id of the connected runtime, if falsy, then runtime will have to be initialized before this Blob can be used, modified or sent @property ruid @type {String} */ ruid: ruid, /** Size of blob @property size @type {Number} @default 0 */ size: blob.size || 0, /** Mime type of blob @property type @type {String} @default '' */ type: blob.type || '', /** @method slice @param {Number} [start=0] */ slice: function(start, end, type) { if (this.isDetached()) { return _sliceDetached.apply(this, arguments); } return this.getRuntime().exec.call(this, 'Blob', 'slice', this.getSource(), start, end, type); }, /** Returns "native" blob object (as it is represented in connected runtime) or null if not found @method getSource @return {Blob} Returns "native" blob object or null if not found */ getSource: function() { if (!blobpool[this.uid]) { return null; } return blobpool[this.uid]; }, /** Detaches blob from any runtime that it depends on and initialize with standalone value @method detach @protected @param {DOMString} [data=''] Standalone value */ detach: function(data) { if (this.ruid) { this.getRuntime().exec.call(this, 'Blob', 'destroy'); this.disconnectRuntime(); this.ruid = null; } data = data || ''; // if dataUrl, convert to binary string var matches = data.match(/^data:([^;]*);base64,/); if (matches) { this.type = matches[1]; data = Encode.atob(data.substring(data.indexOf('base64,') + 7)); } this.size = data.length; blobpool[this.uid] = data; }, /** Checks if blob is standalone (detached of any runtime) @method isDetached @protected @return {Boolean} */ isDetached: function() { return !this.ruid && Basic.typeOf(blobpool[this.uid]) === 'string'; }, /** Destroy Blob and free any resources it was using @method destroy */ destroy: function() { this.detach(); delete blobpool[this.uid]; } }); if (blob.data) { this.detach(blob.data); // auto-detach if payload has been passed } else { blobpool[this.uid] = blob; } } return Blob; }); // Included from: src/javascript/file/File.js /** * File.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/file/File', [ 'moxie/core/utils/Basic', 'moxie/core/utils/Mime', 'moxie/file/Blob' ], function(Basic, Mime, Blob) { /** @class File @extends Blob @constructor @param {String} ruid Unique id of the runtime, to which this blob belongs to @param {Object} file Object "Native" file object, as it is represented in the runtime */ function File(ruid, file) { var name, type; if (!file) { // avoid extra errors in case we overlooked something file = {}; } // figure out the type if (file.type && file.type !== '') { type = file.type; } else { type = Mime.getFileMime(file.name); } // sanitize file name or generate new one if (file.name) { name = file.name.replace(/\\/g, '/'); name = name.substr(name.lastIndexOf('/') + 1); } else { var prefix = type.split('/')[0]; name = Basic.guid((prefix !== '' ? prefix : 'file') + '_'); if (Mime.extensions[type]) { name += '.' + Mime.extensions[type][0]; // append proper extension if possible } } Blob.apply(this, arguments); Basic.extend(this, { /** File mime type @property type @type {String} @default '' */ type: type || '', /** File name @property name @type {String} @default UID */ name: name || Basic.guid('file_'), /** Relative path to the file inside a directory @property relativePath @type {String} @default '' */ relativePath: '', /** Date of last modification @property lastModifiedDate @type {String} @default now */ lastModifiedDate: file.lastModifiedDate || (new Date()).toLocaleString() // Thu Aug 23 2012 19:40:00 GMT+0400 (GET) }); } File.prototype = Blob.prototype; return File; }); // Included from: src/javascript/file/FileInput.js /** * FileInput.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/file/FileInput', [ 'moxie/core/utils/Basic', 'moxie/core/utils/Mime', 'moxie/core/utils/Dom', 'moxie/core/Exceptions', 'moxie/core/EventTarget', 'moxie/core/I18n', 'moxie/file/File', 'moxie/runtime/Runtime', 'moxie/runtime/RuntimeClient' ], function(Basic, Mime, Dom, x, EventTarget, I18n, File, Runtime, RuntimeClient) { /** Provides a convenient way to create cross-browser file-picker. Generates file selection dialog on click, converts selected files to _File_ objects, to be used in conjunction with _Image_, preloaded in memory with _FileReader_ or uploaded to a server through _XMLHttpRequest_. @class FileInput @constructor @extends EventTarget @uses RuntimeClient @param {Object|String|DOMElement} options If options is string or node, argument is considered as _browse\_button_. @param {String|DOMElement} options.browse_button DOM Element to turn into file picker. @param {Array} [options.accept] Array of mime types to accept. By default accepts all. @param {String} [options.file='file'] Name of the file field (not the filename). @param {Boolean} [options.multiple=false] Enable selection of multiple files. @param {Boolean} [options.directory=false] Turn file input into the folder input (cannot be both at the same time). @param {String|DOMElement} [options.container] DOM Element to use as a container for file-picker. Defaults to parentNode for _browse\_button_. @param {Object|String} [options.required_caps] Set of required capabilities, that chosen runtime must support. @example <div id="container"> <a id="file-picker" href="javascript:;">Browse...</a> </div> <script> var fileInput = new mOxie.FileInput({ browse_button: 'file-picker', // or document.getElementById('file-picker') container: 'container', accept: [ {title: "Image files", extensions: "jpg,gif,png"} // accept only images ], multiple: true // allow multiple file selection }); fileInput.onchange = function(e) { // do something to files array console.info(e.target.files); // or this.files or fileInput.files }; fileInput.init(); // initialize </script> */ var dispatches = [ /** Dispatched when runtime is connected and file-picker is ready to be used. @event ready @param {Object} event */ 'ready', /** Dispatched right after [ready](#event_ready) event, and whenever [refresh()](#method_refresh) is invoked. Check [corresponding documentation entry](#method_refresh) for more info. @event refresh @param {Object} event */ /** Dispatched when selection of files in the dialog is complete. @event change @param {Object} event */ 'change', 'cancel', // TODO: might be useful /** Dispatched when mouse cursor enters file-picker area. Can be used to style element accordingly. @event mouseenter @param {Object} event */ 'mouseenter', /** Dispatched when mouse cursor leaves file-picker area. Can be used to style element accordingly. @event mouseleave @param {Object} event */ 'mouseleave', /** Dispatched when functional mouse button is pressed on top of file-picker area. @event mousedown @param {Object} event */ 'mousedown', /** Dispatched when functional mouse button is released on top of file-picker area. @event mouseup @param {Object} event */ 'mouseup' ]; function FileInput(options) { var self = this, container, browseButton, defaults; // if flat argument passed it should be browse_button id if (Basic.inArray(Basic.typeOf(options), ['string', 'node']) !== -1) { options = { browse_button : options }; } // this will help us to find proper default container browseButton = Dom.get(options.browse_button); if (!browseButton) { // browse button is required throw new x.DOMException(x.DOMException.NOT_FOUND_ERR); } // figure out the options defaults = { accept: [{ title: I18n.translate('All Files'), extensions: '*' }], name: 'file', multiple: false, required_caps: false, container: browseButton.parentNode || document.body }; options = Basic.extend({}, defaults, options); // convert to object representation if (typeof(options.required_caps) === 'string') { options.required_caps = Runtime.parseCaps(options.required_caps); } // normalize accept option (could be list of mime types or array of title/extensions pairs) if (typeof(options.accept) === 'string') { options.accept = Mime.mimes2extList(options.accept); } container = Dom.get(options.container); // make sure we have container if (!container) { container = document.body; } // make container relative, if it's not if (Dom.getStyle(container, 'position') === 'static') { container.style.position = 'relative'; } container = browseButton = null; // IE RuntimeClient.call(self); Basic.extend(self, { /** Unique id of the component @property uid @protected @readOnly @type {String} @default UID */ uid: Basic.guid('uid_'), /** Unique id of the connected runtime, if any. @property ruid @protected @type {String} */ ruid: null, /** Unique id of the runtime container. Useful to get hold of it for various manipulations. @property shimid @protected @type {String} */ shimid: null, /** Array of selected mOxie.File objects @property files @type {Array} @default null */ files: null, /** Initializes the file-picker, connects it to runtime and dispatches event ready when done. @method init */ init: function() { self.convertEventPropsToHandlers(dispatches); self.bind('RuntimeInit', function(e, runtime) { self.ruid = runtime.uid; self.shimid = runtime.shimid; self.bind("Ready", function() { self.trigger("Refresh"); }, 999); self.bind("Change", function() { var files = runtime.exec.call(self, 'FileInput', 'getFiles'); self.files = []; Basic.each(files, function(file) { // ignore empty files (IE10 for example hangs if you try to send them via XHR) if (file.size === 0) { return true; } self.files.push(new File(self.ruid, file)); }); }, 999); // re-position and resize shim container self.bind('Refresh', function() { var pos, size, browseButton, shimContainer; browseButton = Dom.get(options.browse_button); shimContainer = Dom.get(runtime.shimid); // do not use runtime.getShimContainer(), since it will create container if it doesn't exist if (browseButton) { pos = Dom.getPos(browseButton, Dom.get(options.container)); size = Dom.getSize(browseButton); if (shimContainer) { Basic.extend(shimContainer.style, { top : pos.y + 'px', left : pos.x + 'px', width : size.w + 'px', height : size.h + 'px' }); } } shimContainer = browseButton = null; }); runtime.exec.call(self, 'FileInput', 'init', options); }); // runtime needs: options.required_features, options.runtime_order and options.container self.connectRuntime(Basic.extend({}, options, { required_caps: { select_file: true } })); }, /** Disables file-picker element, so that it doesn't react to mouse clicks. @method disable @param {Boolean} [state=true] Disable component if - true, enable if - false */ disable: function(state) { var runtime = this.getRuntime(); if (runtime) { runtime.exec.call(this, 'FileInput', 'disable', Basic.typeOf(state) === 'undefined' ? true : state); } }, /** Reposition and resize dialog trigger to match the position and size of browse_button element. @method refresh */ refresh: function() { self.trigger("Refresh"); }, /** Destroy component. @method destroy */ destroy: function() { var runtime = this.getRuntime(); if (runtime) { runtime.exec.call(this, 'FileInput', 'destroy'); this.disconnectRuntime(); } if (Basic.typeOf(this.files) === 'array') { // no sense in leaving associated files behind Basic.each(this.files, function(file) { file.destroy(); }); } this.files = null; } }); } FileInput.prototype = EventTarget.instance; return FileInput; }); // Included from: src/javascript/runtime/RuntimeTarget.js /** * RuntimeTarget.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/runtime/RuntimeTarget', [ 'moxie/core/utils/Basic', 'moxie/runtime/RuntimeClient', "moxie/core/EventTarget" ], function(Basic, RuntimeClient, EventTarget) { /** Instance of this class can be used as a target for the events dispatched by shims, when allowing them onto components is for either reason inappropriate @class RuntimeTarget @constructor @protected @extends EventTarget */ function RuntimeTarget() { this.uid = Basic.guid('uid_'); RuntimeClient.call(this); this.destroy = function() { this.disconnectRuntime(); this.unbindAll(); }; } RuntimeTarget.prototype = EventTarget.instance; return RuntimeTarget; }); // Included from: src/javascript/file/FileReader.js /** * FileReader.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/file/FileReader', [ 'moxie/core/utils/Basic', 'moxie/core/utils/Encode', 'moxie/core/Exceptions', 'moxie/core/EventTarget', 'moxie/file/Blob', 'moxie/file/File', 'moxie/runtime/RuntimeTarget' ], function(Basic, Encode, x, EventTarget, Blob, File, RuntimeTarget) { /** Utility for preloading o.Blob/o.File objects in memory. By design closely follows [W3C FileReader](http://www.w3.org/TR/FileAPI/#dfn-filereader) interface. Where possible uses native FileReader, where - not falls back to shims. @class FileReader @constructor FileReader @extends EventTarget @uses RuntimeClient */ var dispatches = [ /** Dispatched when the read starts. @event loadstart @param {Object} event */ 'loadstart', /** Dispatched while reading (and decoding) blob, and reporting partial Blob data (progess.loaded/progress.total). @event progress @param {Object} event */ 'progress', /** Dispatched when the read has successfully completed. @event load @param {Object} event */ 'load', /** Dispatched when the read has been aborted. For instance, by invoking the abort() method. @event abort @param {Object} event */ 'abort', /** Dispatched when the read has failed. @event error @param {Object} event */ 'error', /** Dispatched when the request has completed (either in success or failure). @event loadend @param {Object} event */ 'loadend' ]; function FileReader() { var self = this, _fr; Basic.extend(this, { /** UID of the component instance. @property uid @type {String} */ uid: Basic.guid('uid_'), /** Contains current state of FileReader object. Can take values of FileReader.EMPTY, FileReader.LOADING and FileReader.DONE. @property readyState @type {Number} @default FileReader.EMPTY */ readyState: FileReader.EMPTY, /** Result of the successful read operation. @property result @type {String} */ result: null, /** Stores the error of failed asynchronous read operation. @property error @type {DOMError} */ error: null, /** Initiates reading of File/Blob object contents to binary string. @method readAsBinaryString @param {Blob|File} blob Object to preload */ readAsBinaryString: function(blob) { _read.call(this, 'readAsBinaryString', blob); }, /** Initiates reading of File/Blob object contents to dataURL string. @method readAsDataURL @param {Blob|File} blob Object to preload */ readAsDataURL: function(blob) { _read.call(this, 'readAsDataURL', blob); }, /** Initiates reading of File/Blob object contents to string. @method readAsText @param {Blob|File} blob Object to preload */ readAsText: function(blob) { _read.call(this, 'readAsText', blob); }, /** Aborts preloading process. @method abort */ abort: function() { this.result = null; if (Basic.inArray(this.readyState, [FileReader.EMPTY, FileReader.DONE]) !== -1) { return; } else if (this.readyState === FileReader.LOADING) { this.readyState = FileReader.DONE; } if (_fr) { _fr.getRuntime().exec.call(this, 'FileReader', 'abort'); } this.trigger('abort'); this.trigger('loadend'); }, /** Destroy component and release resources. @method destroy */ destroy: function() { this.abort(); if (_fr) { _fr.getRuntime().exec.call(this, 'FileReader', 'destroy'); _fr.disconnectRuntime(); } self = _fr = null; } }); function _read(op, blob) { _fr = new RuntimeTarget(); function error(err) { self.readyState = FileReader.DONE; self.error = err; self.trigger('error'); loadEnd(); } function loadEnd() { _fr.destroy(); _fr = null; self.trigger('loadend'); } function exec(runtime) { _fr.bind('Error', function(e, err) { error(err); }); _fr.bind('Progress', function(e) { self.result = runtime.exec.call(_fr, 'FileReader', 'getResult'); self.trigger(e); }); _fr.bind('Load', function(e) { self.readyState = FileReader.DONE; self.result = runtime.exec.call(_fr, 'FileReader', 'getResult'); self.trigger(e); loadEnd(); }); runtime.exec.call(_fr, 'FileReader', 'read', op, blob); } this.convertEventPropsToHandlers(dispatches); if (this.readyState === FileReader.LOADING) { return error(new x.DOMException(x.DOMException.INVALID_STATE_ERR)); } this.readyState = FileReader.LOADING; this.trigger('loadstart'); // if source is o.Blob/o.File if (blob instanceof Blob) { if (blob.isDetached()) { var src = blob.getSource(); switch (op) { case 'readAsText': case 'readAsBinaryString': this.result = src; break; case 'readAsDataURL': this.result = 'data:' + blob.type + ';base64,' + Encode.btoa(src); break; } this.readyState = FileReader.DONE; this.trigger('load'); loadEnd(); } else { exec(_fr.connectRuntime(blob.ruid)); } } else { error(new x.DOMException(x.DOMException.NOT_FOUND_ERR)); } } } /** Initial FileReader state @property EMPTY @type {Number} @final @static @default 0 */ FileReader.EMPTY = 0; /** FileReader switches to this state when it is preloading the source @property LOADING @type {Number} @final @static @default 1 */ FileReader.LOADING = 1; /** Preloading is complete, this is a final state @property DONE @type {Number} @final @static @default 2 */ FileReader.DONE = 2; FileReader.prototype = EventTarget.instance; return FileReader; }); // Included from: src/javascript/core/utils/Url.js /** * Url.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/core/utils/Url', [], function() { /** Parse url into separate components and fill in absent parts with parts from current url, based on https://raw.github.com/kvz/phpjs/master/functions/url/parse_url.js @method parseUrl @for Utils @static @param {String} url Url to parse (defaults to empty string if undefined) @return {Object} Hash containing extracted uri components */ var parseUrl = function(url, currentUrl) { var key = ['source', 'scheme', 'authority', 'userInfo', 'user', 'pass', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'fragment'] , i = key.length , ports = { http: 80, https: 443 } , uri = {} , regex = /^(?:([^:\/?#]+):)?(?:\/\/()(?:(?:()(?:([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?()(?:(()(?:(?:[^?#\/]*\/)*)()(?:[^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/ , m = regex.exec(url || '') ; while (i--) { if (m[i]) { uri[key[i]] = m[i]; } } // when url is relative, we set the origin and the path ourselves if (!uri.scheme) { // come up with defaults if (!currentUrl || typeof(currentUrl) === 'string') { currentUrl = parseUrl(currentUrl || document.location.href); } uri.scheme = currentUrl.scheme; uri.host = currentUrl.host; uri.port = currentUrl.port; var path = ''; // for urls without trailing slash we need to figure out the path if (/^[^\/]/.test(uri.path)) { path = currentUrl.path; // if path ends with a filename, strip it if (!/(\/|\/[^\.]+)$/.test(path)) { path = path.replace(/\/[^\/]+$/, '/'); } else { path += '/'; } } uri.path = path + (uri.path || ''); // site may reside at domain.com or domain.com/subdir } if (!uri.port) { uri.port = ports[uri.scheme] || 80; } uri.port = parseInt(uri.port, 10); if (!uri.path) { uri.path = "/"; } delete uri.source; return uri; }; /** Resolve url - among other things will turn relative url to absolute @method resolveUrl @static @param {String} url Either absolute or relative @return {String} Resolved, absolute url */ var resolveUrl = function(url) { var ports = { // we ignore default ports http: 80, https: 443 } , urlp = parseUrl(url) ; return urlp.scheme + '://' + urlp.host + (urlp.port !== ports[urlp.scheme] ? ':' + urlp.port : '') + urlp.path + (urlp.query ? urlp.query : ''); }; /** Check if specified url has the same origin as the current document @method hasSameOrigin @param {String|Object} url @return {Boolean} */ var hasSameOrigin = function(url) { function origin(url) { return [url.scheme, url.host, url.port].join('/'); } if (typeof url === 'string') { url = parseUrl(url); } return origin(parseUrl()) === origin(url); }; return { parseUrl: parseUrl, resolveUrl: resolveUrl, hasSameOrigin: hasSameOrigin }; }); // Included from: src/javascript/file/FileReaderSync.js /** * FileReaderSync.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define('moxie/file/FileReaderSync', [ 'moxie/core/utils/Basic', 'moxie/runtime/RuntimeClient', 'moxie/core/utils/Encode' ], function(Basic, RuntimeClient, Encode) { /** Synchronous FileReader implementation. Something like this is available in WebWorkers environment, here it can be used to read only preloaded blobs/files and only below certain size (not yet sure what that'd be, but probably < 1mb). Not meant to be used directly by user. @class FileReaderSync @private @constructor */ return function() { RuntimeClient.call(this); Basic.extend(this, { uid: Basic.guid('uid_'), readAsBinaryString: function(blob) { return _read.call(this, 'readAsBinaryString', blob); }, readAsDataURL: function(blob) { return _read.call(this, 'readAsDataURL', blob); }, /*readAsArrayBuffer: function(blob) { return _read.call(this, 'readAsArrayBuffer', blob); },*/ readAsText: function(blob) { return _read.call(this, 'readAsText', blob); } }); function _read(op, blob) { if (blob.isDetached()) { var src = blob.getSource(); switch (op) { case 'readAsBinaryString': return src; case 'readAsDataURL': return 'data:' + blob.type + ';base64,' + Encode.btoa(src); case 'readAsText': var txt = ''; for (var i = 0, length = src.length; i < length; i++) { txt += String.fromCharCode(src[i]); } return txt; } } else { var result = this.connectRuntime(blob.ruid).exec.call(this, 'FileReaderSync', 'read', op, blob); this.disconnectRuntime(); return result; } } }; }); // Included from: src/javascript/xhr/FormData.js /** * FormData.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/xhr/FormData", [ "moxie/core/Exceptions", "moxie/core/utils/Basic", "moxie/file/Blob" ], function(x, Basic, Blob) { /** FormData @class FormData @constructor */ function FormData() { var _blob, _fields = []; Basic.extend(this, { /** Append another key-value pair to the FormData object @method append @param {String} name Name for the new field @param {String|Blob|Array|Object} value Value for the field */ append: function(name, value) { var self = this, valueType = Basic.typeOf(value); // according to specs value might be either Blob or String if (value instanceof Blob) { _blob = { name: name, value: value // unfortunately we can only send single Blob in one FormData }; } else if ('array' === valueType) { name += '[]'; Basic.each(value, function(value) { self.append(name, value); }); } else if ('object' === valueType) { Basic.each(value, function(value, key) { self.append(name + '[' + key + ']', value); }); } else if ('null' === valueType || 'undefined' === valueType || 'number' === valueType && isNaN(value)) { self.append(name, "false"); } else { _fields.push({ name: name, value: value.toString() }); } }, /** Checks if FormData contains Blob. @method hasBlob @return {Boolean} */ hasBlob: function() { return !!this.getBlob(); }, /** Retrieves blob. @method getBlob @return {Object} Either Blob if found or null */ getBlob: function() { return _blob && _blob.value || null; }, /** Retrieves blob field name. @method getBlobName @return {String} Either Blob field name or null */ getBlobName: function() { return _blob && _blob.name || null; }, /** Loop over the fields in FormData and invoke the callback for each of them. @method each @param {Function} cb Callback to call for each field */ each: function(cb) { Basic.each(_fields, function(field) { cb(field.value, field.name); }); if (_blob) { cb(_blob.value, _blob.name); } }, destroy: function() { _blob = null; _fields = []; } }); } return FormData; }); // Included from: src/javascript/xhr/XMLHttpRequest.js /** * XMLHttpRequest.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/xhr/XMLHttpRequest", [ "moxie/core/utils/Basic", "moxie/core/Exceptions", "moxie/core/EventTarget", "moxie/core/utils/Encode", "moxie/core/utils/Url", "moxie/runtime/Runtime", "moxie/runtime/RuntimeTarget", "moxie/file/Blob", "moxie/file/FileReaderSync", "moxie/xhr/FormData", "moxie/core/utils/Env", "moxie/core/utils/Mime" ], function(Basic, x, EventTarget, Encode, Url, Runtime, RuntimeTarget, Blob, FileReaderSync, FormData, Env, Mime) { var httpCode = { 100: 'Continue', 101: 'Switching Protocols', 102: 'Processing', 200: 'OK', 201: 'Created', 202: 'Accepted', 203: 'Non-Authoritative Information', 204: 'No Content', 205: 'Reset Content', 206: 'Partial Content', 207: 'Multi-Status', 226: 'IM Used', 300: 'Multiple Choices', 301: 'Moved Permanently', 302: 'Found', 303: 'See Other', 304: 'Not Modified', 305: 'Use Proxy', 306: 'Reserved', 307: 'Temporary Redirect', 400: 'Bad Request', 401: 'Unauthorized', 402: 'Payment Required', 403: 'Forbidden', 404: 'Not Found', 405: 'Method Not Allowed', 406: 'Not Acceptable', 407: 'Proxy Authentication Required', 408: 'Request Timeout', 409: 'Conflict', 410: 'Gone', 411: 'Length Required', 412: 'Precondition Failed', 413: 'Request Entity Too Large', 414: 'Request-URI Too Long', 415: 'Unsupported Media Type', 416: 'Requested Range Not Satisfiable', 417: 'Expectation Failed', 422: 'Unprocessable Entity', 423: 'Locked', 424: 'Failed Dependency', 426: 'Upgrade Required', 500: 'Internal Server Error', 501: 'Not Implemented', 502: 'Bad Gateway', 503: 'Service Unavailable', 504: 'Gateway Timeout', 505: 'HTTP Version Not Supported', 506: 'Variant Also Negotiates', 507: 'Insufficient Storage', 510: 'Not Extended' }; function XMLHttpRequestUpload() { this.uid = Basic.guid('uid_'); } XMLHttpRequestUpload.prototype = EventTarget.instance; /** Implementation of XMLHttpRequest @class XMLHttpRequest @constructor @uses RuntimeClient @extends EventTarget */ var dispatches = ['loadstart', 'progress', 'abort', 'error', 'load', 'timeout', 'loadend']; // & readystatechange (for historical reasons) var NATIVE = 1, RUNTIME = 2; function XMLHttpRequest() { var self = this, // this (together with _p() @see below) is here to gracefully upgrade to setter/getter syntax where possible props = { /** The amount of milliseconds a request can take before being terminated. Initially zero. Zero means there is no timeout. @property timeout @type Number @default 0 */ timeout: 0, /** Current state, can take following values: UNSENT (numeric value 0) The object has been constructed. OPENED (numeric value 1) The open() method has been successfully invoked. During this state request headers can be set using setRequestHeader() and the request can be made using the send() method. HEADERS_RECEIVED (numeric value 2) All redirects (if any) have been followed and all HTTP headers of the final response have been received. Several response members of the object are now available. LOADING (numeric value 3) The response entity body is being received. DONE (numeric value 4) @property readyState @type Number @default 0 (UNSENT) */ readyState: XMLHttpRequest.UNSENT, /** True when user credentials are to be included in a cross-origin request. False when they are to be excluded in a cross-origin request and when cookies are to be ignored in its response. Initially false. @property withCredentials @type Boolean @default false */ withCredentials: false, /** Returns the HTTP status code. @property status @type Number @default 0 */ status: 0, /** Returns the HTTP status text. @property statusText @type String */ statusText: "", /** Returns the response type. Can be set to change the response type. Values are: the empty string (default), "arraybuffer", "blob", "document", "json", and "text". @property responseType @type String */ responseType: "", /** Returns the document response entity body. Throws an "InvalidStateError" exception if responseType is not the empty string or "document". @property responseXML @type Document */ responseXML: null, /** Returns the text response entity body. Throws an "InvalidStateError" exception if responseType is not the empty string or "text". @property responseText @type String */ responseText: null, /** Returns the response entity body (http://www.w3.org/TR/XMLHttpRequest/#response-entity-body). Can become: ArrayBuffer, Blob, Document, JSON, Text @property response @type Mixed */ response: null }, _async = true, _url, _method, _headers = {}, _user, _password, _encoding = null, _mimeType = null, // flags _sync_flag = false, _send_flag = false, _upload_events_flag = false, _upload_complete_flag = false, _error_flag = false, _same_origin_flag = false, // times _start_time, _timeoutset_time, _finalMime = null, _finalCharset = null, _options = {}, _xhr, _responseHeaders = '', _responseHeadersBag ; Basic.extend(this, props, { /** Unique id of the component @property uid @type String */ uid: Basic.guid('uid_'), /** Target for Upload events @property upload @type XMLHttpRequestUpload */ upload: new XMLHttpRequestUpload(), /** Sets the request method, request URL, synchronous flag, request username, and request password. Throws a "SyntaxError" exception if one of the following is true: method is not a valid HTTP method. url cannot be resolved. url contains the "user:password" format in the userinfo production. Throws a "SecurityError" exception if method is a case-insensitive match for CONNECT, TRACE or TRACK. Throws an "InvalidAccessError" exception if one of the following is true: Either user or password is passed as argument and the origin of url does not match the XMLHttpRequest origin. There is an associated XMLHttpRequest document and either the timeout attribute is not zero, the withCredentials attribute is true, or the responseType attribute is not the empty string. @method open @param {String} method HTTP method to use on request @param {String} url URL to request @param {Boolean} [async=true] If false request will be done in synchronous manner. Asynchronous by default. @param {String} [user] Username to use in HTTP authentication process on server-side @param {String} [password] Password to use in HTTP authentication process on server-side */ open: function(method, url, async, user, password) { var urlp; // first two arguments are required if (!method || !url) { throw new x.DOMException(x.DOMException.SYNTAX_ERR); } // 2 - check if any code point in method is higher than U+00FF or after deflating method it does not match the method if (/[\u0100-\uffff]/.test(method) || Encode.utf8_encode(method) !== method) { throw new x.DOMException(x.DOMException.SYNTAX_ERR); } // 3 if (!!~Basic.inArray(method.toUpperCase(), ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT', 'TRACE', 'TRACK'])) { _method = method.toUpperCase(); } // 4 - allowing these methods poses a security risk if (!!~Basic.inArray(_method, ['CONNECT', 'TRACE', 'TRACK'])) { throw new x.DOMException(x.DOMException.SECURITY_ERR); } // 5 url = Encode.utf8_encode(url); // 6 - Resolve url relative to the XMLHttpRequest base URL. If the algorithm returns an error, throw a "SyntaxError". urlp = Url.parseUrl(url); _same_origin_flag = Url.hasSameOrigin(urlp); // 7 - manually build up absolute url _url = Url.resolveUrl(url); // 9-10, 12-13 if ((user || password) && !_same_origin_flag) { throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); } _user = user || urlp.user; _password = password || urlp.pass; // 11 _async = async || true; if (_async === false && (_p('timeout') || _p('withCredentials') || _p('responseType') !== "")) { throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); } // 14 - terminate abort() // 15 - terminate send() // 18 _sync_flag = !_async; _send_flag = false; _headers = {}; _reset.call(this); // 19 _p('readyState', XMLHttpRequest.OPENED); // 20 this.convertEventPropsToHandlers(['readystatechange']); // unify event handlers this.dispatchEvent('readystatechange'); }, /** Appends an header to the list of author request headers, or if header is already in the list of author request headers, combines its value with value. Throws an "InvalidStateError" exception if the state is not OPENED or if the send() flag is set. Throws a "SyntaxError" exception if header is not a valid HTTP header field name or if value is not a valid HTTP header field value. @method setRequestHeader @param {String} header @param {String|Number} value */ setRequestHeader: function(header, value) { var uaHeaders = [ // these headers are controlled by the user agent "accept-charset", "accept-encoding", "access-control-request-headers", "access-control-request-method", "connection", "content-length", "cookie", "cookie2", "content-transfer-encoding", "date", "expect", "host", "keep-alive", "origin", "referer", "te", "trailer", "transfer-encoding", "upgrade", "user-agent", "via" ]; // 1-2 if (_p('readyState') !== XMLHttpRequest.OPENED || _send_flag) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 3 if (/[\u0100-\uffff]/.test(header) || Encode.utf8_encode(header) !== header) { throw new x.DOMException(x.DOMException.SYNTAX_ERR); } // 4 /* this step is seemingly bypassed in browsers, probably to allow various unicode characters in header values if (/[\u0100-\uffff]/.test(value) || Encode.utf8_encode(value) !== value) { throw new x.DOMException(x.DOMException.SYNTAX_ERR); }*/ header = Basic.trim(header).toLowerCase(); // setting of proxy-* and sec-* headers is prohibited by spec if (!!~Basic.inArray(header, uaHeaders) || /^(proxy\-|sec\-)/.test(header)) { return false; } // camelize // browsers lowercase header names (at least for custom ones) // header = header.replace(/\b\w/g, function($1) { return $1.toUpperCase(); }); if (!_headers[header]) { _headers[header] = value; } else { // http://tools.ietf.org/html/rfc2616#section-4.2 (last paragraph) _headers[header] += ', ' + value; } return true; }, /** Returns all headers from the response, with the exception of those whose field name is Set-Cookie or Set-Cookie2. @method getAllResponseHeaders @return {String} reponse headers or empty string */ getAllResponseHeaders: function() { return _responseHeaders || ''; }, /** Returns the header field value from the response of which the field name matches header, unless the field name is Set-Cookie or Set-Cookie2. @method getResponseHeader @param {String} header @return {String} value(s) for the specified header or null */ getResponseHeader: function(header) { header = header.toLowerCase(); if (_error_flag || !!~Basic.inArray(header, ['set-cookie', 'set-cookie2'])) { return null; } if (_responseHeaders && _responseHeaders !== '') { // if we didn't parse response headers until now, do it and keep for later if (!_responseHeadersBag) { _responseHeadersBag = {}; Basic.each(_responseHeaders.split(/\r\n/), function(line) { var pair = line.split(/:\s+/); if (pair.length === 2) { // last line might be empty, omit pair[0] = Basic.trim(pair[0]); // just in case _responseHeadersBag[pair[0].toLowerCase()] = { // simply to retain header name in original form header: pair[0], value: Basic.trim(pair[1]) }; } }); } if (_responseHeadersBag.hasOwnProperty(header)) { return _responseHeadersBag[header].header + ': ' + _responseHeadersBag[header].value; } } return null; }, /** Sets the Content-Type header for the response to mime. Throws an "InvalidStateError" exception if the state is LOADING or DONE. Throws a "SyntaxError" exception if mime is not a valid media type. @method overrideMimeType @param String mime Mime type to set */ overrideMimeType: function(mime) { var matches, charset; // 1 if (!!~Basic.inArray(_p('readyState'), [XMLHttpRequest.LOADING, XMLHttpRequest.DONE])) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 2 mime = Basic.trim(mime.toLowerCase()); if (/;/.test(mime) && (matches = mime.match(/^([^;]+)(?:;\scharset\=)?(.*)$/))) { mime = matches[1]; if (matches[2]) { charset = matches[2]; } } if (!Mime.mimes[mime]) { throw new x.DOMException(x.DOMException.SYNTAX_ERR); } // 3-4 _finalMime = mime; _finalCharset = charset; }, /** Initiates the request. The optional argument provides the request entity body. The argument is ignored if request method is GET or HEAD. Throws an "InvalidStateError" exception if the state is not OPENED or if the send() flag is set. @method send @param {Blob|Document|String|FormData} [data] Request entity body @param {Object} [options] Set of requirements and pre-requisities for runtime initialization */ send: function(data, options) { if (Basic.typeOf(options) === 'string') { _options = { ruid: options }; } else if (!options) { _options = {}; } else { _options = options; } this.convertEventPropsToHandlers(dispatches); this.upload.convertEventPropsToHandlers(dispatches); // 1-2 if (this.readyState !== XMLHttpRequest.OPENED || _send_flag) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 3 // sending Blob if (data instanceof Blob) { _options.ruid = data.ruid; _mimeType = data.type || 'application/octet-stream'; } // FormData else if (data instanceof FormData) { if (data.hasBlob()) { var blob = data.getBlob(); _options.ruid = blob.ruid; _mimeType = blob.type || 'application/octet-stream'; } } // DOMString else if (typeof data === 'string') { _encoding = 'UTF-8'; _mimeType = 'text/plain;charset=UTF-8'; // data should be converted to Unicode and encoded as UTF-8 data = Encode.utf8_encode(data); } // if withCredentials not set, but requested, set it automatically if (!this.withCredentials) { this.withCredentials = (_options.required_caps && _options.required_caps.send_browser_cookies) && !_same_origin_flag; } // 4 - storage mutex // 5 _upload_events_flag = (!_sync_flag && this.upload.hasEventListener()); // DSAP // 6 _error_flag = false; // 7 _upload_complete_flag = !data; // 8 - Asynchronous steps if (!_sync_flag) { // 8.1 _send_flag = true; // 8.2 // this.dispatchEvent('loadstart'); // will be dispatched either by native or runtime xhr // 8.3 //if (!_upload_complete_flag) { // this.upload.dispatchEvent('loadstart'); // will be dispatched either by native or runtime xhr //} } // 8.5 - Return the send() method call, but continue running the steps in this algorithm. _doXHR.call(this, data); }, /** Cancels any network activity. @method abort */ abort: function() { _error_flag = true; _sync_flag = false; if (!~Basic.inArray(_p('readyState'), [XMLHttpRequest.UNSENT, XMLHttpRequest.OPENED, XMLHttpRequest.DONE])) { _p('readyState', XMLHttpRequest.DONE); _send_flag = false; if (_xhr) { _xhr.getRuntime().exec.call(_xhr, 'XMLHttpRequest', 'abort', _upload_complete_flag); } else { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } _upload_complete_flag = true; } else { _p('readyState', XMLHttpRequest.UNSENT); } }, destroy: function() { if (_xhr) { if (Basic.typeOf(_xhr.destroy) === 'function') { _xhr.destroy(); } _xhr = null; } this.unbindAll(); if (this.upload) { this.upload.unbindAll(); this.upload = null; } } }); /* this is nice, but maybe too lengthy // if supported by JS version, set getters/setters for specific properties o.defineProperty(this, 'readyState', { configurable: false, get: function() { return _p('readyState'); } }); o.defineProperty(this, 'timeout', { configurable: false, get: function() { return _p('timeout'); }, set: function(value) { if (_sync_flag) { throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); } // timeout still should be measured relative to the start time of request _timeoutset_time = (new Date).getTime(); _p('timeout', value); } }); // the withCredentials attribute has no effect when fetching same-origin resources o.defineProperty(this, 'withCredentials', { configurable: false, get: function() { return _p('withCredentials'); }, set: function(value) { // 1-2 if (!~o.inArray(_p('readyState'), [XMLHttpRequest.UNSENT, XMLHttpRequest.OPENED]) || _send_flag) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 3-4 if (_anonymous_flag || _sync_flag) { throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); } // 5 _p('withCredentials', value); } }); o.defineProperty(this, 'status', { configurable: false, get: function() { return _p('status'); } }); o.defineProperty(this, 'statusText', { configurable: false, get: function() { return _p('statusText'); } }); o.defineProperty(this, 'responseType', { configurable: false, get: function() { return _p('responseType'); }, set: function(value) { // 1 if (!!~o.inArray(_p('readyState'), [XMLHttpRequest.LOADING, XMLHttpRequest.DONE])) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 2 if (_sync_flag) { throw new x.DOMException(x.DOMException.INVALID_ACCESS_ERR); } // 3 _p('responseType', value.toLowerCase()); } }); o.defineProperty(this, 'responseText', { configurable: false, get: function() { // 1 if (!~o.inArray(_p('responseType'), ['', 'text'])) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 2-3 if (_p('readyState') !== XMLHttpRequest.DONE && _p('readyState') !== XMLHttpRequest.LOADING || _error_flag) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } return _p('responseText'); } }); o.defineProperty(this, 'responseXML', { configurable: false, get: function() { // 1 if (!~o.inArray(_p('responseType'), ['', 'document'])) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // 2-3 if (_p('readyState') !== XMLHttpRequest.DONE || _error_flag) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } return _p('responseXML'); } }); o.defineProperty(this, 'response', { configurable: false, get: function() { if (!!~o.inArray(_p('responseType'), ['', 'text'])) { if (_p('readyState') !== XMLHttpRequest.DONE && _p('readyState') !== XMLHttpRequest.LOADING || _error_flag) { return ''; } } if (_p('readyState') !== XMLHttpRequest.DONE || _error_flag) { return null; } return _p('response'); } }); */ function _p(prop, value) { if (!props.hasOwnProperty(prop)) { return; } if (arguments.length === 1) { // get return Env.can('define_property') ? props[prop] : self[prop]; } else { // set if (Env.can('define_property')) { props[prop] = value; } else { self[prop] = value; } } } /* function _toASCII(str, AllowUnassigned, UseSTD3ASCIIRules) { // TODO: http://tools.ietf.org/html/rfc3490#section-4.1 return str.toLowerCase(); } */ function _doXHR(data) { var self = this; _start_time = new Date().getTime(); _xhr = new RuntimeTarget(); function loadEnd() { if (_xhr) { // it could have been destroyed by now _xhr.destroy(); _xhr = null; } self.dispatchEvent('loadend'); self = null; } function exec(runtime) { _xhr.bind('LoadStart', function(e) { _p('readyState', XMLHttpRequest.LOADING); self.dispatchEvent('readystatechange'); self.dispatchEvent(e); if (_upload_events_flag) { self.upload.dispatchEvent(e); } }); _xhr.bind('Progress', function(e) { if (_p('readyState') !== XMLHttpRequest.LOADING) { _p('readyState', XMLHttpRequest.LOADING); // LoadStart unreliable (in Flash for example) self.dispatchEvent('readystatechange'); } self.dispatchEvent(e); }); _xhr.bind('UploadProgress', function(e) { if (_upload_events_flag) { self.upload.dispatchEvent({ type: 'progress', lengthComputable: false, total: e.total, loaded: e.loaded }); } }); _xhr.bind('Load', function(e) { _p('readyState', XMLHttpRequest.DONE); _p('status', Number(runtime.exec.call(_xhr, 'XMLHttpRequest', 'getStatus') || 0)); _p('statusText', httpCode[_p('status')] || ""); _p('response', runtime.exec.call(_xhr, 'XMLHttpRequest', 'getResponse', _p('responseType'))); if (!!~Basic.inArray(_p('responseType'), ['text', ''])) { _p('responseText', _p('response')); } else if (_p('responseType') === 'document') { _p('responseXML', _p('response')); } _responseHeaders = runtime.exec.call(_xhr, 'XMLHttpRequest', 'getAllResponseHeaders'); self.dispatchEvent('readystatechange'); if (_p('status') > 0) { // status 0 usually means that server is unreachable if (_upload_events_flag) { self.upload.dispatchEvent(e); } self.dispatchEvent(e); } else { _error_flag = true; self.dispatchEvent('error'); } loadEnd(); }); _xhr.bind('Abort', function(e) { self.dispatchEvent(e); loadEnd(); }); _xhr.bind('Error', function(e) { _error_flag = true; _p('readyState', XMLHttpRequest.DONE); self.dispatchEvent('readystatechange'); _upload_complete_flag = true; self.dispatchEvent(e); loadEnd(); }); runtime.exec.call(_xhr, 'XMLHttpRequest', 'send', { url: _url, method: _method, async: _async, user: _user, password: _password, headers: _headers, mimeType: _mimeType, encoding: _encoding, responseType: self.responseType, withCredentials: self.withCredentials, options: _options }, data); } // clarify our requirements if (typeof(_options.required_caps) === 'string') { _options.required_caps = Runtime.parseCaps(_options.required_caps); } _options.required_caps = Basic.extend({}, _options.required_caps, { return_response_type: self.responseType }); if (data instanceof FormData) { _options.required_caps.send_multipart = true; } if (!_same_origin_flag) { _options.required_caps.do_cors = true; } if (_options.ruid) { // we do not need to wait if we can connect directly exec(_xhr.connectRuntime(_options)); } else { _xhr.bind('RuntimeInit', function(e, runtime) { exec(runtime); }); _xhr.bind('RuntimeError', function(e, err) { self.dispatchEvent('RuntimeError', err); }); _xhr.connectRuntime(_options); } } function _reset() { _p('responseText', ""); _p('responseXML', null); _p('response', null); _p('status', 0); _p('statusText', ""); _start_time = _timeoutset_time = null; } } XMLHttpRequest.UNSENT = 0; XMLHttpRequest.OPENED = 1; XMLHttpRequest.HEADERS_RECEIVED = 2; XMLHttpRequest.LOADING = 3; XMLHttpRequest.DONE = 4; XMLHttpRequest.prototype = EventTarget.instance; return XMLHttpRequest; }); // Included from: src/javascript/runtime/Transporter.js /** * Transporter.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/runtime/Transporter", [ "moxie/core/utils/Basic", "moxie/core/utils/Encode", "moxie/runtime/RuntimeClient", "moxie/core/EventTarget" ], function(Basic, Encode, RuntimeClient, EventTarget) { function Transporter() { var mod, _runtime, _data, _size, _pos, _chunk_size; RuntimeClient.call(this); Basic.extend(this, { uid: Basic.guid('uid_'), state: Transporter.IDLE, result: null, transport: function(data, type, options) { var self = this; options = Basic.extend({ chunk_size: 204798 }, options); // should divide by three, base64 requires this if ((mod = options.chunk_size % 3)) { options.chunk_size += 3 - mod; } _chunk_size = options.chunk_size; _reset.call(this); _data = data; _size = data.length; if (Basic.typeOf(options) === 'string' || options.ruid) { _run.call(self, type, this.connectRuntime(options)); } else { // we require this to run only once var cb = function(e, runtime) { self.unbind("RuntimeInit", cb); _run.call(self, type, runtime); }; this.bind("RuntimeInit", cb); this.connectRuntime(options); } }, abort: function() { var self = this; self.state = Transporter.IDLE; if (_runtime) { _runtime.exec.call(self, 'Transporter', 'clear'); self.trigger("TransportingAborted"); } _reset.call(self); }, destroy: function() { this.unbindAll(); _runtime = null; this.disconnectRuntime(); _reset.call(this); } }); function _reset() { _size = _pos = 0; _data = this.result = null; } function _run(type, runtime) { var self = this; _runtime = runtime; //self.unbind("RuntimeInit"); self.bind("TransportingProgress", function(e) { _pos = e.loaded; if (_pos < _size && Basic.inArray(self.state, [Transporter.IDLE, Transporter.DONE]) === -1) { _transport.call(self); } }, 999); self.bind("TransportingComplete", function() { _pos = _size; self.state = Transporter.DONE; _data = null; // clean a bit self.result = _runtime.exec.call(self, 'Transporter', 'getAsBlob', type || ''); }, 999); self.state = Transporter.BUSY; self.trigger("TransportingStarted"); _transport.call(self); } function _transport() { var self = this, chunk, bytesLeft = _size - _pos; if (_chunk_size > bytesLeft) { _chunk_size = bytesLeft; } chunk = Encode.btoa(_data.substr(_pos, _chunk_size)); _runtime.exec.call(self, 'Transporter', 'receive', chunk, _size); } } Transporter.IDLE = 0; Transporter.BUSY = 1; Transporter.DONE = 2; Transporter.prototype = EventTarget.instance; return Transporter; }); // Included from: src/javascript/image/Image.js /** * Image.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ define("moxie/image/Image", [ "moxie/core/utils/Basic", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/file/FileReaderSync", "moxie/xhr/XMLHttpRequest", "moxie/runtime/Runtime", "moxie/runtime/RuntimeClient", "moxie/runtime/Transporter", "moxie/core/utils/Env", "moxie/core/EventTarget", "moxie/file/Blob", "moxie/file/File", "moxie/core/utils/Encode" ], function(Basic, Dom, x, FileReaderSync, XMLHttpRequest, Runtime, RuntimeClient, Transporter, Env, EventTarget, Blob, File, Encode) { /** Image preloading and manipulation utility. Additionally it provides access to image meta info (Exif, GPS) and raw binary data. @class Image @constructor @extends EventTarget */ var dispatches = [ 'progress', /** Dispatched when loading is complete. @event load @param {Object} event */ 'load', 'error', /** Dispatched when resize operation is complete. @event resize @param {Object} event */ 'resize', /** Dispatched when visual representation of the image is successfully embedded into the corresponsing container. @event embedded @param {Object} event */ 'embedded' ]; function Image() { RuntimeClient.call(this); Basic.extend(this, { /** Unique id of the component @property uid @type {String} */ uid: Basic.guid('uid_'), /** Unique id of the connected runtime, if any. @property ruid @type {String} */ ruid: null, /** Name of the file, that was used to create an image, if available. If not equals to empty string. @property name @type {String} @default "" */ name: "", /** Size of the image in bytes. Actual value is set only after image is preloaded. @property size @type {Number} @default 0 */ size: 0, /** Width of the image. Actual value is set only after image is preloaded. @property width @type {Number} @default 0 */ width: 0, /** Height of the image. Actual value is set only after image is preloaded. @property height @type {Number} @default 0 */ height: 0, /** Mime type of the image. Currently only image/jpeg and image/png are supported. Actual value is set only after image is preloaded. @property type @type {String} @default "" */ type: "", /** Holds meta info (Exif, GPS). Is populated only for image/jpeg. Actual value is set only after image is preloaded. @property meta @type {Object} @default {} */ meta: {}, /** Alias for load method, that takes another mOxie.Image object as a source (see load). @method clone @param {Image} src Source for the image @param {Boolean} [exact=false] Whether to activate in-depth clone mode */ clone: function() { this.load.apply(this, arguments); }, /** Loads image from various sources. Currently the source for new image can be: mOxie.Image, mOxie.Blob/mOxie.File, native Blob/File, dataUrl or URL. Depending on the type of the source, arguments - differ. When source is URL, Image will be downloaded from remote destination and loaded in memory. @example var img = new mOxie.Image(); img.onload = function() { var blob = img.getAsBlob(); var formData = new mOxie.FormData(); formData.append('file', blob); var xhr = new mOxie.XMLHttpRequest(); xhr.onload = function() { // upload complete }; xhr.open('post', 'upload.php'); xhr.send(formData); }; img.load("http://www.moxiecode.com/images/mox-logo.jpg"); // notice file extension (.jpg) @method load @param {Image|Blob|File|String} src Source for the image @param {Boolean|Object} [mixed] */ load: function() { // this is here because to bind properly we need an uid first, which is created above this.bind('Load Resize', function() { _updateInfo.call(this); }, 999); this.convertEventPropsToHandlers(dispatches); _load.apply(this, arguments); }, /** Downsizes the image to fit the specified width/height. If crop is supplied, image will be cropped to exact dimensions. @method downsize @param {Number} width Resulting width @param {Number} [height=width] Resulting height (optional, if not supplied will default to width) @param {Boolean} [crop=false] Whether to crop the image to exact dimensions @param {Boolean} [preserveHeaders=true] Whether to preserve meta headers (on JPEGs after resize) */ downsize: function(opts) { var defaults = { width: this.width, height: this.height, crop: false, preserveHeaders: true }; if (typeof(opts) === 'object') { opts = Basic.extend(defaults, opts); } else { opts = Basic.extend(defaults, { width: arguments[0], height: arguments[1], crop: arguments[2], preserveHeaders: arguments[3] }); } try { if (!this.size) { // only preloaded image objects can be used as source throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } // no way to reliably intercept the crash due to high resolution, so we simply avoid it if (this.width > Image.MAX_RESIZE_WIDTH || this.height > Image.MAX_RESIZE_HEIGHT) { throw new x.ImageError(x.ImageError.MAX_RESOLUTION_ERR); } this.getRuntime().exec.call(this, 'Image', 'downsize', opts.width, opts.height, opts.crop, opts.preserveHeaders); } catch(ex) { // for now simply trigger error event this.trigger('error', ex.code); } }, /** Alias for downsize(width, height, true). (see downsize) @method crop @param {Number} width Resulting width @param {Number} [height=width] Resulting height (optional, if not supplied will default to width) @param {Boolean} [preserveHeaders=true] Whether to preserve meta headers (on JPEGs after resize) */ crop: function(width, height, preserveHeaders) { this.downsize(width, height, true, preserveHeaders); }, getAsCanvas: function() { if (!Env.can('create_canvas')) { throw new x.RuntimeError(x.RuntimeError.NOT_SUPPORTED_ERR); } var runtime = this.connectRuntime(this.ruid); return runtime.exec.call(this, 'Image', 'getAsCanvas'); }, /** Retrieves image in it's current state as mOxie.Blob object. Cannot be run on empty or image in progress (throws DOMException.INVALID_STATE_ERR). @method getAsBlob @param {String} [type="image/jpeg"] Mime type of resulting blob. Can either be image/jpeg or image/png @param {Number} [quality=90] Applicable only together with mime type image/jpeg @return {Blob} Image as Blob */ getAsBlob: function(type, quality) { if (!this.size) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } if (!type) { type = 'image/jpeg'; } if (type === 'image/jpeg' && !quality) { quality = 90; } return this.getRuntime().exec.call(this, 'Image', 'getAsBlob', type, quality); }, /** Retrieves image in it's current state as dataURL string. Cannot be run on empty or image in progress (throws DOMException.INVALID_STATE_ERR). @method getAsDataURL @param {String} [type="image/jpeg"] Mime type of resulting blob. Can either be image/jpeg or image/png @param {Number} [quality=90] Applicable only together with mime type image/jpeg @return {String} Image as dataURL string */ getAsDataURL: function(type, quality) { if (!this.size) { throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } return this.getRuntime().exec.call(this, 'Image', 'getAsDataURL', type, quality); }, /** Retrieves image in it's current state as binary string. Cannot be run on empty or image in progress (throws DOMException.INVALID_STATE_ERR). @method getAsBinaryString @param {String} [type="image/jpeg"] Mime type of resulting blob. Can either be image/jpeg or image/png @param {Number} [quality=90] Applicable only together with mime type image/jpeg @return {String} Image as binary string */ getAsBinaryString: function(type, quality) { var dataUrl = this.getAsDataURL(type, quality); return Encode.atob(dataUrl.substring(dataUrl.indexOf('base64,') + 7)); }, /** Embeds a visual representation of the image into the specified node. Depending on the runtime, it might be a canvas, an img node or a thrid party shim object (Flash or SilverLight - very rare, can be used in legacy browsers that do not have canvas or proper dataURI support). @method embed @param {DOMElement} el DOM element to insert the image object into @param {Object} [options] @param {Number} [options.width] The width of an embed (defaults to the image width) @param {Number} [options.height] The height of an embed (defaults to the image height) @param {String} [type="image/jpeg"] Mime type @param {Number} [quality=90] Quality of an embed, if mime type is image/jpeg @param {Boolean} [crop=false] Whether to crop an embed to the specified dimensions */ embed: function(el) { var self = this , imgCopy , type, quality, crop , options = arguments[1] || {} , width = this.width , height = this.height , runtime // this has to be outside of all the closures to contain proper runtime ; function onResize() { // if possible, embed a canvas element directly if (Env.can('create_canvas')) { var canvas = imgCopy.getAsCanvas(); if (canvas) { el.appendChild(canvas); canvas = null; imgCopy.destroy(); self.trigger('embedded'); return; } } var dataUrl = imgCopy.getAsDataURL(type, quality); if (!dataUrl) { throw new x.ImageError(x.ImageError.WRONG_FORMAT); } if (Env.can('use_data_uri_of', dataUrl.length)) { el.innerHTML = '<img src="' + dataUrl + '" width="' + imgCopy.width + '" height="' + imgCopy.height + '" />'; imgCopy.destroy(); self.trigger('embedded'); } else { var tr = new Transporter(); tr.bind("TransportingComplete", function() { runtime = self.connectRuntime(this.result.ruid); self.bind("Embedded", function() { // position and size properly Basic.extend(runtime.getShimContainer().style, { //position: 'relative', top: '0px', left: '0px', width: imgCopy.width + 'px', height: imgCopy.height + 'px' }); // some shims (Flash/SilverLight) reinitialize, if parent element is hidden, reordered or it's // position type changes (in Gecko), but since we basically need this only in IEs 6/7 and // sometimes 8 and they do not have this problem, we can comment this for now /*tr.bind("RuntimeInit", function(e, runtime) { tr.destroy(); runtime.destroy(); onResize.call(self); // re-feed our image data });*/ runtime = null; }, 999); runtime.exec.call(self, "ImageView", "display", this.result.uid, width, height); imgCopy.destroy(); }); tr.transport(Encode.atob(dataUrl.substring(dataUrl.indexOf('base64,') + 7)), type, Basic.extend({}, options, { required_caps: { display_media: true }, runtime_order: 'flash,silverlight', container: el })); } } try { if (!(el = Dom.get(el))) { throw new x.DOMException(x.DOMException.INVALID_NODE_TYPE_ERR); } if (!this.size) { // only preloaded image objects can be used as source throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } if (this.width > Image.MAX_RESIZE_WIDTH || this.height > Image.MAX_RESIZE_HEIGHT) { throw new x.ImageError(x.ImageError.MAX_RESOLUTION_ERR); } type = options.type || this.type || 'image/jpeg'; quality = options.quality || 90; crop = Basic.typeOf(options.crop) !== 'undefined' ? options.crop : false; // figure out dimensions for the thumb if (options.width) { width = options.width; height = options.height || width; } else { // if container element has measurable dimensions, use them var dimensions = Dom.getSize(el); if (dimensions.w && dimensions.h) { // both should be > 0 width = dimensions.w; height = dimensions.h; } } imgCopy = new Image(); imgCopy.bind("Resize", function() { onResize.call(self); }); imgCopy.bind("Load", function() { imgCopy.downsize(width, height, crop, false); }); imgCopy.clone(this, false); return imgCopy; } catch(ex) { // for now simply trigger error event this.trigger('error', ex.code); } }, /** Properly destroys the image and frees resources in use. If any. Recommended way to dispose mOxie.Image object. @method destroy */ destroy: function() { if (this.ruid) { this.getRuntime().exec.call(this, 'Image', 'destroy'); this.disconnectRuntime(); } this.unbindAll(); } }); function _updateInfo(info) { if (!info) { info = this.getRuntime().exec.call(this, 'Image', 'getInfo'); } this.size = info.size; this.width = info.width; this.height = info.height; this.type = info.type; this.meta = info.meta; // update file name, only if empty if (this.name === '') { this.name = info.name; } } function _load(src) { var srcType = Basic.typeOf(src); try { // if source is Image if (src instanceof Image) { if (!src.size) { // only preloaded image objects can be used as source throw new x.DOMException(x.DOMException.INVALID_STATE_ERR); } _loadFromImage.apply(this, arguments); } // if source is o.Blob/o.File else if (src instanceof Blob) { if (!~Basic.inArray(src.type, ['image/jpeg', 'image/png'])) { throw new x.ImageError(x.ImageError.WRONG_FORMAT); } _loadFromBlob.apply(this, arguments); } // if native blob/file else if (Basic.inArray(srcType, ['blob', 'file']) !== -1) { _load.call(this, new File(null, src), arguments[1]); } // if String else if (srcType === 'string') { // if dataUrl String if (/^data:[^;]*;base64,/.test(src)) { _load.call(this, new Blob(null, { data: src }), arguments[1]); } // else assume Url, either relative or absolute else { _loadFromUrl.apply(this, arguments); } } // if source seems to be an img node else if (srcType === 'node' && src.nodeName.toLowerCase() === 'img') { _load.call(this, src.src, arguments[1]); } else { throw new x.DOMException(x.DOMException.TYPE_MISMATCH_ERR); } } catch(ex) { // for now simply trigger error event this.trigger('error', ex.code); } } function _loadFromImage(img, exact) { var runtime = this.connectRuntime(img.ruid); this.ruid = runtime.uid; runtime.exec.call(this, 'Image', 'loadFromImage', img, (Basic.typeOf(exact) === 'undefined' ? true : exact)); } function _loadFromBlob(blob, options) { var self = this; self.name = blob.name || ''; function exec(runtime) { self.ruid = runtime.uid; runtime.exec.call(self, 'Image', 'loadFromBlob', blob); } if (blob.isDetached()) { this.bind('RuntimeInit', function(e, runtime) { exec(runtime); }); // convert to object representation if (options && typeof(options.required_caps) === 'string') { options.required_caps = Runtime.parseCaps(options.required_caps); } this.connectRuntime(Basic.extend({ required_caps: { access_image_binary: true, resize_image: true } }, options)); } else { exec(this.connectRuntime(blob.ruid)); } } function _loadFromUrl(url, options) { var self = this, xhr; xhr = new XMLHttpRequest(); xhr.open('get', url); xhr.responseType = 'blob'; xhr.onprogress = function(e) { self.trigger(e); }; xhr.onload = function() { _loadFromBlob.call(self, xhr.response, true); }; xhr.onerror = function(e) { self.trigger(e); }; xhr.onloadend = function() { xhr.destroy(); }; xhr.bind('RuntimeError', function(e, err) { self.trigger('RuntimeError', err); }); xhr.send(null, options); } } // virtual world will crash on you if image has a resolution higher than this: Image.MAX_RESIZE_WIDTH = 6500; Image.MAX_RESIZE_HEIGHT = 6500; Image.prototype = EventTarget.instance; return Image; }); // Included from: src/javascript/runtime/flash/Runtime.js /** * Runtime.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /*global ActiveXObject:true */ /** Defines constructor for Flash runtime. @class moxie/runtime/flash/Runtime @private */ define("moxie/runtime/flash/Runtime", [ "moxie/core/utils/Basic", "moxie/core/utils/Env", "moxie/core/utils/Dom", "moxie/core/Exceptions", "moxie/runtime/Runtime" ], function(Basic, Env, Dom, x, Runtime) { var type = 'flash', extensions = {}; /** Get the version of the Flash Player @method getShimVersion @private @return {Number} Flash Player version */ function getShimVersion() { var version; try { version = navigator.plugins['Shockwave Flash']; version = version.description; } catch (e1) { try { version = new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version'); } catch (e2) { version = '0.0'; } } version = version.match(/\d+/g); return parseFloat(version[0] + '.' + version[1]); } /** Constructor for the Flash Runtime @class FlashRuntime @extends Runtime */ function FlashRuntime(options) { var I = this, initTimer; options = Basic.extend({ swf_url: Env.swf_url }, options); Runtime.call(this, options, type, { access_binary: function(value) { return value && I.mode === 'browser'; }, access_image_binary: function(value) { return value && I.mode === 'browser'; }, display_media: Runtime.capTrue, do_cors: Runtime.capTrue, drag_and_drop: false, report_upload_progress: function() { return I.mode === 'client'; }, resize_image: Runtime.capTrue, return_response_headers: false, return_response_type: function(responseType) { if (responseType === 'json' && !!window.JSON) { return true; } return !Basic.arrayDiff(responseType, ['', 'text', 'document']) || I.mode === 'browser'; }, return_status_code: function(code) { return I.mode === 'browser' || !Basic.arrayDiff(code, [200, 404]); }, select_file: Runtime.capTrue, select_multiple: Runtime.capTrue, send_binary_string: function(value) { return value && I.mode === 'browser'; }, send_browser_cookies: function(value) { return value && I.mode === 'browser'; }, send_custom_headers: function(value) { return value && I.mode === 'browser'; }, send_multipart: Runtime.capTrue, slice_blob: function(value) { return value && I.mode === 'browser'; }, stream_upload: function(value) { return value && I.mode === 'browser'; }, summon_file_dialog: false, upload_filesize: function(size) { return Basic.parseSizeStr(size) <= 2097152 || I.mode === 'client'; }, use_http_method: function(methods) { return !Basic.arrayDiff(methods, ['GET', 'POST']); } }, { // capabilities that require specific mode access_binary: function(value) { return value ? 'browser' : 'client'; }, access_image_binary: function(value) { return value ? 'browser' : 'client'; }, report_upload_progress: function(value) { return value ? 'browser' : 'client'; }, return_response_type: function(responseType) { return Basic.arrayDiff(responseType, ['', 'text', 'json', 'document']) ? 'browser' : ['client', 'browser']; }, return_status_code: function(code) { return Basic.arrayDiff(code, [200, 404]) ? 'browser' : ['client', 'browser']; }, send_binary_string: function(value) { return value ? 'browser' : 'client'; }, send_browser_cookies: function(value) { return value ? 'browser' : 'client'; }, send_custom_headers: function(value) { return value ? 'browser' : 'client'; }, stream_upload: function(value) { return value ? 'client' : 'browser'; }, upload_filesize: function(size) { return Basic.parseSizeStr(size) >= 2097152 ? 'client' : 'browser'; } }, 'client'); // minimal requirement for Flash Player version if (getShimVersion() < 10) { this.mode = false; // with falsy mode, runtime won't operable, no matter what the mode was before } Basic.extend(this, { getShim: function() { return Dom.get(this.uid); }, shimExec: function(component, action) { var args = [].slice.call(arguments, 2); return I.getShim().exec(this.uid, component, action, args); }, init: function() { var html, el, container; container = this.getShimContainer(); // if not the minimal height, shims are not initialized in older browsers (e.g FF3.6, IE6,7,8, Safari 4.0,5.0, etc) Basic.extend(container.style, { position: 'absolute', top: '-8px', left: '-8px', width: '9px', height: '9px', overflow: 'hidden' }); // insert flash object html = '<object id="' + this.uid + '" type="application/x-shockwave-flash" data="' + options.swf_url + '" '; if (Env.browser === 'IE') { html += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '; } html += 'width="100%" height="100%" style="outline:0">' + '<param name="movie" value="' + options.swf_url + '" />' + '<param name="flashvars" value="uid=' + escape(this.uid) + '&target=' + Env.global_event_dispatcher + '" />' + '<param name="wmode" value="transparent" />' + '<param name="allowscriptaccess" value="always" />' + '</object>'; if (Env.browser === 'IE') { el = document.createElement('div'); container.appendChild(el); el.outerHTML = html; el = container = null; // just in case } else { container.innerHTML = html; } // Init is dispatched by the shim initTimer = setTimeout(function() { if (I && !I.initialized) { // runtime might be already destroyed by this moment I.trigger("Error", new x.RuntimeError(x.RuntimeError.NOT_INIT_ERR)); } }, 5000); }, destroy: (function(destroy) { // extend default destroy method return function() { destroy.call(I); clearTimeout(initTimer); // initialization check might be still onwait options = initTimer = destroy = I = null; }; }(this.destroy)) }, extensions); } Runtime.addConstructor(type, FlashRuntime); return extensions; }); // Included from: src/javascript/runtime/flash/file/Blob.js /** * Blob.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/file/Blob @private */ define("moxie/runtime/flash/file/Blob", [ "moxie/runtime/flash/Runtime", "moxie/file/Blob" ], function(extensions, Blob) { var FlashBlob = { slice: function(blob, start, end, type) { var self = this.getRuntime(); if (start < 0) { start = Math.max(blob.size + start, 0); } else if (start > 0) { start = Math.min(start, blob.size); } if (end < 0) { end = Math.max(blob.size + end, 0); } else if (end > 0) { end = Math.min(end, blob.size); } blob = self.shimExec.call(this, 'Blob', 'slice', start, end, type || ''); if (blob) { blob = new Blob(self.uid, blob); } return blob; } }; return (extensions.Blob = FlashBlob); }); // Included from: src/javascript/runtime/flash/file/FileInput.js /** * FileInput.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/file/FileInput @private */ define("moxie/runtime/flash/file/FileInput", [ "moxie/runtime/flash/Runtime" ], function(extensions) { var FileInput = { init: function(options) { this.getRuntime().shimExec.call(this, 'FileInput', 'init', { name: options.name, accept: options.accept, multiple: options.multiple }); this.trigger('ready'); } }; return (extensions.FileInput = FileInput); }); // Included from: src/javascript/runtime/flash/file/FileReader.js /** * FileReader.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/file/FileReader @private */ define("moxie/runtime/flash/file/FileReader", [ "moxie/runtime/flash/Runtime", "moxie/core/utils/Encode" ], function(extensions, Encode) { var _result = ''; function _formatData(data, op) { switch (op) { case 'readAsText': return Encode.atob(data, 'utf8'); case 'readAsBinaryString': return Encode.atob(data); case 'readAsDataURL': return data; } return null; } var FileReader = { read: function(op, blob) { var target = this, self = target.getRuntime(); // special prefix for DataURL read mode if (op === 'readAsDataURL') { _result = 'data:' + (blob.type || '') + ';base64,'; } target.bind('Progress', function(e, data) { if (data) { _result += _formatData(data, op); } }); return self.shimExec.call(this, 'FileReader', 'readAsBase64', blob.uid); }, getResult: function() { return _result; }, destroy: function() { _result = null; } }; return (extensions.FileReader = FileReader); }); // Included from: src/javascript/runtime/flash/file/FileReaderSync.js /** * FileReaderSync.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/file/FileReaderSync @private */ define("moxie/runtime/flash/file/FileReaderSync", [ "moxie/runtime/flash/Runtime", "moxie/core/utils/Encode" ], function(extensions, Encode) { function _formatData(data, op) { switch (op) { case 'readAsText': return Encode.atob(data, 'utf8'); case 'readAsBinaryString': return Encode.atob(data); case 'readAsDataURL': return data; } return null; } var FileReaderSync = { read: function(op, blob) { var result, self = this.getRuntime(); result = self.shimExec.call(this, 'FileReaderSync', 'readAsBase64', blob.uid); if (!result) { return null; // or throw ex } // special prefix for DataURL read mode if (op === 'readAsDataURL') { result = 'data:' + (blob.type || '') + ';base64,' + result; } return _formatData(result, op, blob.type); } }; return (extensions.FileReaderSync = FileReaderSync); }); // Included from: src/javascript/runtime/flash/xhr/XMLHttpRequest.js /** * XMLHttpRequest.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/xhr/XMLHttpRequest @private */ define("moxie/runtime/flash/xhr/XMLHttpRequest", [ "moxie/runtime/flash/Runtime", "moxie/core/utils/Basic", "moxie/file/Blob", "moxie/file/File", "moxie/file/FileReaderSync", "moxie/xhr/FormData", "moxie/runtime/Transporter" ], function(extensions, Basic, Blob, File, FileReaderSync, FormData, Transporter) { var XMLHttpRequest = { send: function(meta, data) { var target = this, self = target.getRuntime(); function send() { meta.transport = self.mode; self.shimExec.call(target, 'XMLHttpRequest', 'send', meta, data); } function appendBlob(name, blob) { self.shimExec.call(target, 'XMLHttpRequest', 'appendBlob', name, blob.uid); data = null; send(); } function attachBlob(blob, cb) { var tr = new Transporter(); tr.bind("TransportingComplete", function() { cb(this.result); }); tr.transport(blob.getSource(), blob.type, { ruid: self.uid }); } // copy over the headers if any if (!Basic.isEmptyObj(meta.headers)) { Basic.each(meta.headers, function(value, header) { self.shimExec.call(target, 'XMLHttpRequest', 'setRequestHeader', header, value.toString()); // Silverlight doesn't accept integers into the arguments of type object }); } // transfer over multipart params and blob itself if (data instanceof FormData) { var blobField; data.each(function(value, name) { if (value instanceof Blob) { blobField = name; } else { self.shimExec.call(target, 'XMLHttpRequest', 'append', name, value); } }); if (!data.hasBlob()) { data = null; send(); } else { var blob = data.getBlob(); if (blob.isDetached()) { attachBlob(blob, function(attachedBlob) { blob.destroy(); appendBlob(blobField, attachedBlob); }); } else { appendBlob(blobField, blob); } } } else if (data instanceof Blob) { if (data.isDetached()) { attachBlob(data, function(attachedBlob) { data.destroy(); data = attachedBlob.uid; send(); }); } else { data = data.uid; send(); } } else { send(); } }, getResponse: function(responseType) { var frs, blob, self = this.getRuntime(); blob = self.shimExec.call(this, 'XMLHttpRequest', 'getResponseAsBlob'); if (blob) { blob = new File(self.uid, blob); if ('blob' === responseType) { return blob; } try { frs = new FileReaderSync(); if (!!~Basic.inArray(responseType, ["", "text"])) { return frs.readAsText(blob); } else if ('json' === responseType && !!window.JSON) { return JSON.parse(frs.readAsText(blob)); } } finally { blob.destroy(); } } return null; }, abort: function(upload_complete_flag) { var self = this.getRuntime(); self.shimExec.call(this, 'XMLHttpRequest', 'abort'); this.dispatchEvent('readystatechange'); // this.dispatchEvent('progress'); this.dispatchEvent('abort'); //if (!upload_complete_flag) { // this.dispatchEvent('uploadprogress'); //} } }; return (extensions.XMLHttpRequest = XMLHttpRequest); }); // Included from: src/javascript/runtime/flash/runtime/Transporter.js /** * Transporter.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/runtime/Transporter @private */ define("moxie/runtime/flash/runtime/Transporter", [ "moxie/runtime/flash/Runtime", "moxie/file/Blob" ], function(extensions, Blob) { var Transporter = { getAsBlob: function(type) { var self = this.getRuntime() , blob = self.shimExec.call(this, 'Transporter', 'getAsBlob', type) ; if (blob) { return new Blob(self.uid, blob); } return null; } }; return (extensions.Transporter = Transporter); }); // Included from: src/javascript/runtime/flash/image/Image.js /** * Image.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /** @class moxie/runtime/flash/image/Image @private */ define("moxie/runtime/flash/image/Image", [ "moxie/runtime/flash/Runtime", "moxie/core/utils/Basic", "moxie/runtime/Transporter", "moxie/file/Blob", "moxie/file/FileReaderSync" ], function(extensions, Basic, Transporter, Blob, FileReaderSync) { var Image = { loadFromBlob: function(blob) { var comp = this, self = comp.getRuntime(); function exec(srcBlob) { self.shimExec.call(comp, 'Image', 'loadFromBlob', srcBlob.uid); comp = self = null; } if (blob.isDetached()) { // binary string var tr = new Transporter(); tr.bind("TransportingComplete", function() { exec(tr.result.getSource()); }); tr.transport(blob.getSource(), blob.type, { ruid: self.uid }); } else { exec(blob.getSource()); } }, loadFromImage: function(img) { var self = this.getRuntime(); return self.shimExec.call(this, 'Image', 'loadFromImage', img.uid); }, getAsBlob: function(type, quality) { var self = this.getRuntime() , blob = self.shimExec.call(this, 'Image', 'getAsBlob', type, quality) ; if (blob) { return new Blob(self.uid, blob); } return null; }, getAsDataURL: function() { var self = this.getRuntime() , blob = self.Image.getAsBlob.apply(this, arguments) , frs ; if (!blob) { return null; } frs = new FileReaderSync(); return frs.readAsDataURL(blob); } }; return (extensions.Image = Image); }); expose(["moxie/core/utils/Basic","moxie/core/I18n","moxie/core/utils/Mime","moxie/core/utils/Env","moxie/core/utils/Dom","moxie/core/Exceptions","moxie/core/EventTarget","moxie/core/utils/Encode","moxie/runtime/Runtime","moxie/runtime/RuntimeClient","moxie/file/Blob","moxie/file/File","moxie/file/FileInput","moxie/runtime/RuntimeTarget","moxie/file/FileReader","moxie/core/utils/Url","moxie/file/FileReaderSync","moxie/xhr/FormData","moxie/xhr/XMLHttpRequest","moxie/runtime/Transporter","moxie/image/Image"]); })(this);/** * o.js * * Copyright 2013, Moxiecode Systems AB * Released under GPL License. * * License: http://www.plupload.com/license * Contributing: http://www.plupload.com/contributing */ /*global moxie:true */ /** Globally exposed namespace with the most frequently used public classes and handy methods. @class o @static @private */ (function(exports) { "use strict"; var o = {}, inArray = exports.moxie.core.utils.Basic.inArray; // directly add some public classes // (we do it dynamically here, since for custom builds we cannot know beforehand what modules were included) (function addAlias(ns) { var name, itemType; for (name in ns) { itemType = typeof(ns[name]); if (itemType === 'object' && !~inArray(name, ['Exceptions', 'Env', 'Mime'])) { addAlias(ns[name]); } else if (itemType === 'function') { o[name] = ns[name]; } } })(exports.moxie); // add some manually o.Env = exports.moxie.core.utils.Env; o.Mime = exports.moxie.core.utils.Mime; o.Exceptions = exports.moxie.core.Exceptions; // expose globally exports.mOxie = o; if (!exports.o) { exports.o = o; } return o; })(this);
src/ModalHeader.js
lzcmaro/react-ratchet
import React from 'react'; import classnames from 'classnames'; import NavBar from './NavBar'; import Link from './Link'; let ModalHeader = React.createClass({ propTypes: { closeButton: React.PropTypes.bool }, getDefaultProps() { return { closeButton: true } }, contextTypes: { onModalHide: React.PropTypes.func }, render() { return ( <NavBar {...this.props} className={classnames('modal-header', this.props.className)}> {this.props.closeButton ? this.renderCloseButton() : null} {this.props.children} </NavBar> ); }, renderCloseButton() { return ( <Link right icon="close" onTouchEnd={this.context.onModalHide || this.props.onHide} /> ) } }); export default ModalHeader;
packages/reactor-boilerplate/src/Home/Home.js
markbrocato/extjs-reactor
import React, { Component } from 'react'; import { Grid, Toolbar, Button, Column, SearchField } from '@extjs/ext-react'; import data from './data'; import { small, medium } from '../responsiveFormulas' export default class Home extends Component { store = Ext.create('Ext.data.Store', { fields: ['name', 'email', 'phone', 'hoursTaken', 'hoursRemaining'], data }); render() { return ( <Grid store={this.store}> <Toolbar docked="top"> <SearchField ui="faded" ref={field => this.query = field} placeholder="Search..." onChange={this.onSearch.bind(this)} responsiveConfig={{ [small]: { flex: 1 }, [medium]: { flex: undefined } }} /> </Toolbar> <Column text="Name" dataIndex="name" flex={2} resizable /> <Column text="Email" dataIndex="email" flex={3} resizable responsiveConfig={{ [small]: { hidden: true }, [medium]: { hidden: false } }} /> <Column text="Phone" dataIndex="phone" flex={2} resizable /> </Grid> ) } /** * Filter the store when the user types in the search box */ onSearch = () => { const query = this.query.getValue().toLowerCase(); this.store.clearFilter(); if (query.length) this.store.filterBy(record => { const { name, email, phone } = record.data; return name.toLowerCase().indexOf(query) !== -1 || email.toLowerCase().indexOf(query) !== -1 || phone.toLowerCase().indexOf(query) !== -1; }); } }
ajax/libs/semantic-ui-react/0.56.6/semantic-ui-react.min.js
sreym/cdnjs
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.semanticUIReact=t(require("React"),require("ReactDOM")):e.semanticUIReact=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="/",t(0)}([/*!********************!*\ !*** ./src/umd.js ***! \********************/ function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a=r(/*! ./index */296),s=n(a);e.exports=o({},s)},/*!************************!*\ !*** external "React" ***! \************************/ function(t,r){t.exports=e},/*!**************************!*\ !*** ./src/lib/index.js ***! \**************************/ function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.objectDiff=t.numberToWord=t.numberToWordMap=t.keyboardKey=t.SUI=t.META=t.getElementType=t.getUnhandledProps=t.makeDebugger=t.debug=t.customPropTypes=t.useVerticalAlignProp=t.useTextAlignProp=t.useWidthProp=t.useKeyOrValueAndKey=t.useValueAndKey=t.useKeyOnly=t.childrenUtils=t.AutoControlledComponent=void 0;var a=r(/*! ./AutoControlledComponent */297);Object.defineProperty(t,"AutoControlledComponent",{enumerable:!0,get:function(){return o(a)["default"]}});var s=r(/*! ./classNameBuilders */301);Object.defineProperty(t,"useKeyOnly",{enumerable:!0,get:function(){return s.useKeyOnly}}),Object.defineProperty(t,"useValueAndKey",{enumerable:!0,get:function(){return s.useValueAndKey}}),Object.defineProperty(t,"useKeyOrValueAndKey",{enumerable:!0,get:function(){return s.useKeyOrValueAndKey}}),Object.defineProperty(t,"useWidthProp",{enumerable:!0,get:function(){return s.useWidthProp}}),Object.defineProperty(t,"useTextAlignProp",{enumerable:!0,get:function(){return s.useTextAlignProp}}),Object.defineProperty(t,"useVerticalAlignProp",{enumerable:!0,get:function(){return s.useVerticalAlignProp}});var l=r(/*! ./debug */303);Object.defineProperty(t,"debug",{enumerable:!0,get:function(){return l.debug}}),Object.defineProperty(t,"makeDebugger",{enumerable:!0,get:function(){return l.makeDebugger}});var u=r(/*! ./factories */304);Object.keys(u).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})});var i=r(/*! ./getUnhandledProps */306);Object.defineProperty(t,"getUnhandledProps",{enumerable:!0,get:function(){return o(i)["default"]}});var c=r(/*! ./getElementType */305);Object.defineProperty(t,"getElementType",{enumerable:!0,get:function(){return o(c)["default"]}});var p=r(/*! ./keyboardKey */307);Object.defineProperty(t,"keyboardKey",{enumerable:!0,get:function(){return o(p)["default"]}});var d=r(/*! ./numberToWord */82);Object.defineProperty(t,"numberToWordMap",{enumerable:!0,get:function(){return d.numberToWordMap}}),Object.defineProperty(t,"numberToWord",{enumerable:!0,get:function(){return d.numberToWord}});var f=r(/*! ./objectDiff */308);Object.defineProperty(t,"objectDiff",{enumerable:!0,get:function(){return f.objectDiff}});var y=r(/*! ./childrenUtils */300),m=n(y),v=r(/*! ./customPropTypes */302),h=n(v),g=r(/*! ./META */298),b=n(g),P=r(/*! ./SUI */299),T=n(P);t.childrenUtils=m,t.customPropTypes=h,t.META=b,t.SUI=T},/*!*******************************!*\ !*** ./~/classnames/index.js ***! \*******************************/ function(e,t,r){var n,o;/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n))e.push(r.apply(null,n));else if("object"===o)for(var s in n)a.call(n,s)&&n[s]&&e.push(s)}}return e.join(" ")}var a={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=r:(n=[],o=function(){return r}.apply(t,n),!(void 0!==o&&(e.exports=o)))}()},/*!*****************************!*\ !*** ./~/lodash/isArray.js ***! \*****************************/ function(e,t){var r=Array.isArray;e.exports=r},/*!************************************!*\ !*** ./~/lodash/fp/placeholder.js ***! \************************************/ function(e,t){e.exports={}},/*!*****************************!*\ !*** ./~/lodash/without.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./_baseDifference */105),o=r(/*! ./_baseRest */12),a=r(/*! ./isArrayLikeObject */38),s=o(function(e,t){return a(e)?n(e,t):[]});e.exports=s},/*!********************************!*\ !*** ./~/lodash/fp/convert.js ***! \********************************/ function(e,t,r){function n(e,t,r){return o(a,e,t,r)}var o=r(/*! ./_baseConvert */450),a=r(/*! ./_util */452);e.exports=n},/*!**************************!*\ !*** ./~/lodash/keys.js ***! \**************************/ function(e,t,r){function n(e){return s(e)?o(e):a(e)}var o=r(/*! ./_arrayLikeKeys */208),a=r(/*! ./_baseKeys */216),s=r(/*! ./isArrayLike */15);e.exports=n},/*!*************************!*\ !*** ./~/lodash/map.js ***! \*************************/ function(e,t,r){function n(e,t){var r=l(e)?o:s;return r(e,a(t,3))}var o=r(/*! ./_arrayMap */18),a=r(/*! ./_baseIteratee */14),s=r(/*! ./_baseMap */354),l=r(/*! ./isArray */4);e.exports=n},/*!************************************!*\ !*** ./src/elements/Icon/index.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Icon */43),a=n(o);t["default"]=a["default"]},/*!***************************!*\ !*** ./~/lodash/_root.js ***! \***************************/ function(e,t,r){var n=r(/*! ./_freeGlobal */227),o="object"==typeof self&&self&&self.Object===Object&&self,a=n||o||Function("return this")();e.exports=a},/*!*******************************!*\ !*** ./~/lodash/_baseRest.js ***! \*******************************/ function(e,t,r){function n(e,t){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,n=-1,s=a(r.length-t,0),l=Array(s);++n<s;)l[n]=r[t+n];n=-1;for(var u=Array(t+1);++n<t;)u[n]=r[n];return u[t]=l,o(e,this,u)}}var o=r(/*! ./_apply */29),a=Math.max;e.exports=n},/*!******************************!*\ !*** ./~/lodash/isObject.js ***! \******************************/ function(e,t){function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_baseIteratee.js ***! \***********************************/ function(e,t,r){function n(e){return"function"==typeof e?e:null==e?s:"object"==typeof e?l(e)?a(e[0],e[1]):o(e):u(e)}var o=r(/*! ./_baseMatches */355),a=r(/*! ./_baseMatchesProperty */356),s=r(/*! ./identity */123),l=r(/*! ./isArray */4),u=r(/*! ./property */481);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/isArrayLike.js ***! \*********************************/ function(e,t,r){function n(e){return null!=e&&a(e.length)&&!o(e)}var o=r(/*! ./isFunction */24),a=r(/*! ./isLength */125);e.exports=n},/*!*******************************************!*\ !*** ./src/collections/Form/FormField.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=e.children,n=e.className,s=e.disabled,p=e.error,f=e.inline,m=e.label,v=e.required,h=e.type,g=e.width,b=(0,l["default"])((0,c.useKeyOnly)(p,"error"),(0,c.useKeyOnly)(s,"disabled"),(0,c.useKeyOnly)(f,"inline"),(0,c.useKeyOnly)(v,"required"),(0,c.useWidthProp)(g,"wide"),"field",n),P=(0,c.getUnhandledProps)(o,e),T=(0,c.getElementType)(o,e);if(!t)return m?i["default"].createElement(T,a({},P,{className:b}),i["default"].createElement("label",null,m)):i["default"].createElement(T,a({},P,{className:b}),r);var O=a({},P,{children:r,type:h});return"input"!==t||"checkbox"!==h&&"radio"!==h?t===d["default"]||t===y["default"]?i["default"].createElement(T,{className:b},(0,u.createElement)(t,a({},O,{label:m}))):t&&m?i["default"].createElement(T,{className:b},i["default"].createElement("label",null,m),(0,u.createElement)(t,O)):t&&!m?i["default"].createElement(T,{className:b},(0,u.createElement)(t,O)):void 0:i["default"].createElement(T,{className:b},i["default"].createElement("label",null,(0,u.createElement)(t,O)," ",m))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ../../modules/Checkbox */46),d=n(p),f=r(/*! ../../addons/Radio */71),y=n(f);o._meta={name:"FormField",parent:"Form",type:c.META.TYPES.COLLECTION,props:{width:c.SUI.WIDTHS,control:["button","input","select","textarea"]}},o.propTypes={as:c.customPropTypes.as,control:c.customPropTypes.some([u.PropTypes.func,u.PropTypes.oneOf(o._meta.props.control)]),children:u.PropTypes.node,className:u.PropTypes.string,disabled:u.PropTypes.bool,error:u.PropTypes.bool,inline:u.PropTypes.bool,label:u.PropTypes.string,required:c.customPropTypes.every([c.customPropTypes.demand(["label"]),u.PropTypes.bool]),type:c.customPropTypes.every([c.customPropTypes.demand(["control"])]),width:u.PropTypes.oneOf(o._meta.props.width)},t["default"]=o},/*!*******************************!*\ !*** ./~/lodash/toInteger.js ***! \*******************************/ function(e,t,r){function n(e){var t=o(e),r=t%1;return t===t?r?t-r:t:0}var o=r(/*! ./toFinite */256);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_arrayMap.js ***! \*******************************/ function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}e.exports=r},/*!****************************!*\ !*** ./~/lodash/_toKey.js ***! \****************************/ function(e,t,r){function n(e){if("string"==typeof e||o(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}var o=r(/*! ./isSymbol */39),a=1/0;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/isObjectLike.js ***! \**********************************/ function(e,t){function r(e){return!!e&&"object"==typeof e}e.exports=r},/*!********************************!*\ !*** ./~/lodash/_getNative.js ***! \********************************/ function(e,t,r){function n(e,t){var r=a(e,t);return o(r)?r:void 0}var o=r(/*! ./_baseIsNative */351),a=r(/*! ./_getValue */396);e.exports=n},/*!**************************************!*\ !*** ./~/lodash/fp/_falseOptions.js ***! \**************************************/ function(e,t){e.exports={cap:!1,curry:!1,fixed:!1,immutable:!1,rearg:!1}},/*!*************************!*\ !*** ./~/lodash/has.js ***! \*************************/ function(e,t,r){function n(e,t){return null!=e&&a(e,t,o)}var o=r(/*! ./_baseHas */343),a=r(/*! ./_hasPath */229);e.exports=n},/*!********************************!*\ !*** ./~/lodash/isFunction.js ***! \********************************/ function(e,t,r){function n(e){var t=o(e)?u.call(e):"";return t==a||t==s}var o=r(/*! ./isObject */13),a="[object Function]",s="[object GeneratorFunction]",l=Object.prototype,u=l.toString;e.exports=n},/*!******************************!*\ !*** ./~/lodash/toString.js ***! \******************************/ function(e,t,r){function n(e){return null==e?"":o(e)}var o=r(/*! ./_baseToString */220);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_baseEach.js ***! \*******************************/ function(e,t,r){var n=r(/*! ./_baseForOwn */106),o=r(/*! ./_createBaseEach */377),a=o(n);e.exports=a},/*!**********************************!*\ !*** ./~/lodash/_baseFlatten.js ***! \**********************************/ function(e,t,r){function n(e,t,r,s,l){var u=-1,i=e.length;for(r||(r=a),l||(l=[]);++u<i;){var c=e[u];t>0&&r(c)?t>1?n(c,t-1,r,s,l):o(l,c):s||(l[l.length]=c)}return l}var o=r(/*! ./_arrayPush */52),a=r(/*! ./_isFlattenable */408);e.exports=n},/*!*************************************!*\ !*** ./src/elements/Image/index.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Image */159),a=n(o);t["default"]=a["default"]},/*!****************************!*\ !*** ./~/lodash/_apply.js ***! \****************************/ function(e,t){function r(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}e.exports=r},/*!********************************!*\ !*** ./~/lodash/_arrayEach.js ***! \********************************/ function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_baseCreate.js ***! \*********************************/ function(e,t,r){function n(e){return o(e)?a(e):{}}var o=r(/*! ./isObject */13),a=Object.create;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_createWrap.js ***! \*********************************/ function(e,t,r){function n(e,t,r,n,O,_,E,j){var w=t&v;if(!w&&"function"!=typeof e)throw new TypeError(y);var M=n?n.length:0;if(M||(t&=~(b|P),n=O=void 0),E=void 0===E?E:T(f(E),0),j=void 0===j?j:f(j),M-=O?O.length:0,t&P){var S=n,x=O;n=O=void 0}var A=w?void 0:i(e),N=[e,t,r,n,O,S,x,_,E,j];if(A&&c(N,A),e=N[0],t=N[1],r=N[2],n=N[3],O=N[4],j=N[9]=null==N[9]?w?0:e.length:T(N[9]-M,0),!j&&t&(h|g)&&(t&=~(h|g)),t&&t!=m)k=t==h||t==g?s(e,t,j):t!=b&&t!=(m|b)||O.length?l.apply(void 0,N):u(e,t,r,n);else var k=a(e,t,r);var C=A?o:p;return d(C(k,N),e,t)}var o=r(/*! ./_baseSetData */218),a=r(/*! ./_createBind */379),s=r(/*! ./_createCurry */382),l=r(/*! ./_createHybrid */224),u=r(/*! ./_createPartial */385),i=r(/*! ./_getData */116),c=r(/*! ./_mergeData */421),p=r(/*! ./_setData */237),d=r(/*! ./_setWrapToString */238),f=r(/*! ./toInteger */17),y="Expected a function",m=1,v=2,h=8,g=16,b=32,P=64,T=Math.max;e.exports=n},/*!****************************!*\ !*** ./~/lodash/_isKey.js ***! \****************************/ function(e,t,r){function n(e,t){if(o(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!a(e))||(l.test(e)||!s.test(e)||null!=t&&e in Object(t))}var o=r(/*! ./isArray */4),a=r(/*! ./isSymbol */39),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_isPrototype.js ***! \**********************************/ function(e,t){function r(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||n;return e===r}var n=Object.prototype;e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_replaceHolders.js ***! \*************************************/ function(e,t){function r(e,t){for(var r=-1,o=e.length,a=0,s=[];++r<o;){var l=e[r];l!==t&&l!==n||(e[r]=n,s[a++]=r)}return s}var n="__lodash_placeholder__";e.exports=r},/*!************************!*\ !*** ./~/lodash/eq.js ***! \************************/ function(e,t){function r(e,t){return e===t||e!==e&&t!==t}e.exports=r},/*!*************************!*\ !*** ./~/lodash/get.js ***! \*************************/ function(e,t,r){function n(e,t,r){var n=null==e?void 0:o(e,t);return void 0===n?r:n}var o=r(/*! ./_baseGet */107);e.exports=n},/*!***************************************!*\ !*** ./~/lodash/isArrayLikeObject.js ***! \***************************************/ function(e,t,r){function n(e){return a(e)&&o(e)}var o=r(/*! ./isArrayLike */15),a=r(/*! ./isObjectLike */20);e.exports=n},/*!******************************!*\ !*** ./~/lodash/isSymbol.js ***! \******************************/ function(e,t,r){function n(e){return"symbol"==typeof e||o(e)&&l.call(e)==a}var o=r(/*! ./isObjectLike */20),a="[object Symbol]",s=Object.prototype,l=s.toString;e.exports=n},/*!**************************!*\ !*** ./~/lodash/omit.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_arrayMap */18),o=r(/*! ./_baseDifference */105),a=r(/*! ./_baseFlatten */27),s=r(/*! ./_basePick */217),l=r(/*! ./_baseRest */12),u=r(/*! ./_getAllKeysIn */393),i=r(/*! ./_toKey */19),c=l(function(e,t){return null==e?{}:(t=n(a(t,1),i),s(e,o(u(e),t)))});e.exports=c},/*!**************************!*\ !*** ./~/lodash/pick.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_arrayMap */18),o=r(/*! ./_baseFlatten */27),a=r(/*! ./_basePick */217),s=r(/*! ./_baseRest */12),l=r(/*! ./_toKey */19),u=s(function(e,t){return null==e?{}:a(e,n(o(t,1),l))});e.exports=u},/*!********************************************!*\ !*** ./src/collections/Table/TableCell.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,s=e.collapsing,u=e.content,p=e.disabled,f=e.error,y=e.icon,m=e.negative,v=e.positive,h=e.singleLine,g=e.textAlign,b=e.verticalAlign,P=e.warning,T=e.width,O=(0,l["default"])((0,c.useKeyOnly)(t,"active"),(0,c.useKeyOnly)(s,"collapsing"),(0,c.useKeyOnly)(p,"disabled"),(0,c.useKeyOnly)(f,"error"),(0,c.useKeyOnly)(m,"negative"),(0,c.useKeyOnly)(v,"positive"),(0,c.useKeyOnly)(h,"single line"),(0,c.useKeyOnly)(P,"warning"),(0,c.useTextAlignProp)(g),(0,c.useVerticalAlignProp)(b),(0,c.useWidthProp)(T,"wide"),n),_=(0,c.getUnhandledProps)(o,e),E=(0,c.getElementType)(o,e);return r?i["default"].createElement(E,a({},_,{className:O}),r):i["default"].createElement(E,a({},_,{className:O}),d["default"].create(y),u)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ../../elements/Icon */10),d=n(p);o._meta={name:"TableCell",type:c.META.TYPES.COLLECTION,parent:"Table",props:{textAlign:c.SUI.TEXT_ALIGNMENTS,verticalAlign:c.SUI.VERTICAL_ALIGNMENTS,width:c.SUI.WIDTHS}},o.defaultProps={as:"td"},o.propTypes={as:c.customPropTypes.as,active:u.PropTypes.bool,children:u.PropTypes.node,className:u.PropTypes.string,collapsing:u.PropTypes.bool,content:c.customPropTypes.contentShorthand,disabled:u.PropTypes.bool,error:u.PropTypes.bool,icon:c.customPropTypes.itemShorthand,negative:u.PropTypes.bool,positive:u.PropTypes.bool,singleLine:u.PropTypes.bool,textAlign:u.PropTypes.oneOf(o._meta.props.textAlign),verticalAlign:u.PropTypes.oneOf(o._meta.props.verticalAlign),warning:u.PropTypes.bool,width:u.PropTypes.oneOf(o._meta.props.width)},o.create=(0,c.createShorthandFactory)(o,function(e){return{content:e}}),t["default"]=o},/*!***********************************!*\ !*** ./src/elements/Icon/Icon.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.bordered,r=e.className,n=e.circular,s=e.color,u=e.corner,p=e.disabled,d=e.fitted,f=e.flipped,y=e.inverted,m=e.link,v=e.loading,h=e.name,g=e.rotated,b=e.size,P=(0,l["default"])(b,s,(0,c.useKeyOnly)(t,"bordered"),(0,c.useKeyOnly)(n,"circular"),(0,c.useKeyOnly)(u,"corner"),(0,c.useKeyOnly)(p,"disabled"),(0,c.useKeyOnly)(d,"fitted"),(0,c.useValueAndKey)(f,"flipped"),(0,c.useKeyOnly)(y,"inverted"),(0,c.useKeyOnly)(m,"link"),(0,c.useKeyOnly)(v,"loading"),(0,c.useValueAndKey)(g,"rotated"),h,r,"icon"),T=(0,c.getUnhandledProps)(o,e),O=(0,c.getElementType)(o,e);return i["default"].createElement(O,a({},T,{className:P}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ./IconGroup */158),d=n(p);o.Group=d["default"],o._meta={name:"Icon",type:c.META.TYPES.ELEMENT,props:{color:c.SUI.COLORS,flipped:["horizontally","vertically"],name:c.SUI.ICONS,rotated:["clockwise","counterclockwise"],size:c.SUI.SIZES}},o.propTypes={as:c.customPropTypes.as,bordered:u.PropTypes.bool,className:u.PropTypes.string,circular:u.PropTypes.bool,color:u.PropTypes.oneOf(o._meta.props.color),corner:u.PropTypes.bool,disabled:u.PropTypes.bool,fitted:u.PropTypes.bool,flipped:u.PropTypes.oneOf(o._meta.props.flipped),inverted:u.PropTypes.bool,name:u.PropTypes.string,link:u.PropTypes.bool,loading:u.PropTypes.bool,rotated:u.PropTypes.oneOf(o._meta.props.rotated),size:u.PropTypes.oneOf(o._meta.props.size)},o.defaultProps={as:"i"},o.create=(0,c.createShorthandFactory)(o,function(e){return{name:e}}),t["default"]=o},/*!**********************************************!*\ !*** ./src/elements/List/ListDescription.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"description"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ListDescription",parent:"List",type:c.META.TYPES.ELEMENT},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},o.create=(0,c.createShorthandFactory)(o,function(e){return{content:e}}),t["default"]=o},/*!*****************************************!*\ !*** ./src/elements/List/ListHeader.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"header"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ListHeader",parent:"List",type:c.META.TYPES.ELEMENT},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},o.create=(0,c.createShorthandFactory)(o,function(e){return{content:e}}),t["default"]=o},/*!***************************************!*\ !*** ./src/modules/Checkbox/index.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Checkbox */310),a=n(o);t["default"]=a["default"]},/*!************************************!*\ !*** ./src/views/Feed/FeedDate.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"date"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"FeedDate",parent:"Feed",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},t["default"]=o},/*!********************************!*\ !*** ./~/lodash/_ListCache.js ***! \********************************/ function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(/*! ./_listCacheClear */411),a=r(/*! ./_listCacheDelete */412),s=r(/*! ./_listCacheGet */413),l=r(/*! ./_listCacheHas */414),u=r(/*! ./_listCacheSet */415);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=s,n.prototype.has=l,n.prototype.set=u,e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_SetCache.js ***! \*******************************/ function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.__data__=new o;++t<r;)this.add(e[t])}var o=r(/*! ./_MapCache */101),a=r(/*! ./_setCacheAdd */427),s=r(/*! ./_setCacheHas */428);n.prototype.add=n.prototype.push=a,n.prototype.has=s,e.exports=n},/*!*****************************!*\ !*** ./~/lodash/_Symbol.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./_root */11),o=n.Symbol;e.exports=o},/*!************************************!*\ !*** ./~/lodash/_arrayIncludes.js ***! \************************************/ function(e,t,r){function n(e,t){var r=e?e.length:0;return!!r&&o(e,t,0)>-1}var o=r(/*! ./_baseIndexOf */215);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_arrayPush.js ***! \********************************/ function(e,t){function r(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_arrayReduce.js ***! \**********************************/ function(e,t){function r(e,t,r,n){var o=-1,a=e?e.length:0;for(n&&a&&(r=e[++o]);++o<a;)r=t(r,e[o],o,e);return r}e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_assocIndexOf.js ***! \***********************************/ function(e,t,r){function n(e,t){for(var r=e.length;r--;)if(o(e[r][0],t))return r;return-1}var o=r(/*! ./eq */36);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_copyArray.js ***! \********************************/ function(e,t){function r(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_createCtor.js ***! \*********************************/ function(e,t,r){function n(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=o(e.prototype),n=e.apply(r,t);return a(n)?n:r}}var o=r(/*! ./_baseCreate */31),a=r(/*! ./isObject */13);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_getHolder.js ***! \********************************/ function(e,t){function r(e){var t=e;return t.placeholder}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_getMapData.js ***! \*********************************/ function(e,t,r){function n(e,t){var r=e.__data__;return o(t)?r["string"==typeof t?"string":"hash"]:r.map}var o=r(/*! ./_isKeyable */409);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_getPrototype.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./_overArg */120),o=n(Object.getPrototypeOf,Object);e.exports=o},/*!***********************************!*\ !*** ./~/lodash/_isHostObject.js ***! \***********************************/ function(e,t){function r(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}e.exports=r},/*!******************************!*\ !*** ./~/lodash/_isIndex.js ***! \******************************/ function(e,t){function r(e,t){return t=null==t?n:t,!!t&&("number"==typeof e||o.test(e))&&e>-1&&e%1==0&&e<t}var n=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_nativeCreate.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./_getNative */21),o=n(Object,"create");e.exports=o},/*!*********************************!*\ !*** ./~/lodash/_setToArray.js ***! \*********************************/ function(e,t){function r(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}e.exports=r},/*!**************************!*\ !*** ./~/lodash/each.js ***! \**************************/ function(e,t,r){e.exports=r(/*! ./forEach */449)},/*!******************************!*\ !*** ./~/lodash/includes.js ***! \******************************/ function(e,t,r){function n(e,t,r,n){e=a(e)?e:u(e),r=r&&!n?l(r):0;var c=e.length;return r<0&&(r=i(c+r,0)),s(e)?r<=c&&e.indexOf(t,r)>-1:!!c&&o(e,t,r)>-1}var o=r(/*! ./_baseIndexOf */215),a=r(/*! ./isArrayLike */15),s=r(/*! ./isString */249),l=r(/*! ./toInteger */17),u=r(/*! ./values */127),i=Math.max;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/isArguments.js ***! \*********************************/ function(e,t,r){function n(e){return o(e)&&l.call(e,"callee")&&(!i.call(e,"callee")||u.call(e)==a)}var o=r(/*! ./isArrayLikeObject */38),a="[object Arguments]",s=Object.prototype,l=s.hasOwnProperty,u=s.toString,i=s.propertyIsEnumerable;e.exports=n},/*!*****************************!*\ !*** ./~/lodash/isEqual.js ***! \*****************************/ function(e,t,r){function n(e,t){return o(e,t)}var o=r(/*! ./_baseIsEqual */108);e.exports=n},/*!******************************!*\ !*** ./~/lodash/toNumber.js ***! \******************************/ function(e,t,r){function n(e){if("number"==typeof e)return e;if(a(e))return s;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(l,"");var r=i.test(e);return r||c.test(e)?p(e.slice(2),r?2:8):u.test(e)?s:+e}var o=r(/*! ./isObject */13),a=r(/*! ./isSymbol */39),s=NaN,l=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,c=/^0o[0-7]+$/i,p=parseInt;e.exports=n},/*!**************************************************!*\ !*** ./~/node-libs-browser/~/process/browser.js ***! \**************************************************/ function(e,t){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function o(e){if(c===setTimeout)return setTimeout(e,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===n||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function s(){m&&f&&(m=!1,f.length?y=f.concat(y):v=-1,y.length&&l())}function l(){if(!m){var e=o(s);m=!0;for(var t=y.length;t;){for(f=y,y=[];++v<t;)f&&f[v].run();v=-1,t=y.length}f=null,m=!1,a(e)}}function u(e,t){this.fun=e,this.array=t}function i(){}var c,p,d=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:r}catch(e){c=r}try{p="function"==typeof clearTimeout?clearTimeout:n}catch(e){p=n}}();var f,y=[],m=!1,v=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];y.push(new u(e,t)),1!==y.length||m||o(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=i,d.addListener=i,d.once=i,d.off=i,d.removeListener=i,d.removeAllListeners=i,d.emit=i,d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},/*!************************************!*\ !*** ./src/addons/Portal/index.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Portal */262),a=n(o);t["default"]=a["default"]},/*!***********************************!*\ !*** ./src/addons/Radio/index.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Radio */263),a=n(o);t["default"]=a["default"]},/*!************************************************!*\ !*** ./src/collections/Message/MessageItem.js ***! \************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,l["default"])("content",r),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"MessageItem",parent:"Message",type:c.META.TYPES.COLLECTION},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string},o.defaultProps={as:"li"},t["default"]=o},/*!**********************************************!*\ !*** ./src/collections/Table/TableHeader.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.fullWidth,s=(0,l["default"])((0,c.useKeyOnly)(n,"full-width"),r),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"TableHeader",type:c.META.TYPES.COLLECTION,parent:"Table"},o.defaultProps={as:"thead"},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,fullWidth:u.PropTypes.bool},t["default"]=o},/*!**************************************!*\ !*** ./src/elements/Button/index.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Button */152),a=n(o);t["default"]=a["default"]},/*!*************************************!*\ !*** ./src/elements/Input/index.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Input */286),a=n(o);t["default"]=a["default"]},/*!*************************************!*\ !*** ./src/elements/Label/Label.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(/*! classnames */3),c=n(i),p=r(/*! react */1),d=n(p),f=r(/*! ../../lib */2),y=r(/*! ../Icon/Icon */43),m=n(y),v=r(/*! ../Image/Image */159),h=n(v),g=r(/*! ./LabelDetail */161),b=n(g),P=r(/*! ./LabelGroup */162),T=n(P),O={name:"Label",type:f.META.TYPES.ELEMENT,props:{attached:["top","bottom","top right","top left","bottom left","bottom right"],color:f.SUI.COLORS,corner:["left","right"],pointing:["above","below","left","right"],ribbon:["right"],size:f.SUI.SIZES}},_=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.handleClick=function(e){var t=n.props.onClick;t&&t(e,n.props)},n.handleRemove=function(e){var t=n.props.onRemove;t&&t(e,n.props)},s=r,a(n,s)}return s(t,e),u(t,[{key:"render",value:function(){var e=this.props,r=e.attached,n=e.basic,o=e.children,a=e.circular,s=e.className,u=e.color,i=e.content,p=e.corner,y=e.detail,v=e.empty,g=e.floating,P=e.horizontal,T=e.icon,O=e.image,_=e.onRemove,E=e.pointing,j=e.removable,w=e.ribbon,M=e.size,S=e.tag,x=E===!0&&"pointing"||("left"===E||"right"===E)&&E+" pointing"||("above"===E||"below"===E)&&"pointing "+E,A=(0,c["default"])("ui",u,x,M,(0,f.useKeyOnly)(n,"basic"),(0,f.useKeyOnly)(a,"circular"),(0,f.useKeyOnly)(v,"empty"),(0,f.useKeyOnly)(g,"floating"),(0,f.useKeyOnly)(P,"horizontal"),(0,f.useKeyOnly)(O===!0,"image"),(0,f.useKeyOnly)(S,"tag"),(0,f.useKeyOrValueAndKey)(p,"corner"),(0,f.useKeyOrValueAndKey)(w,"ribbon"),(0,f.useValueAndKey)(r,"attached"),"label",s),N=(0,f.getUnhandledProps)(t,this.props),k=(0,f.getElementType)(t,this.props);return o?d["default"].createElement(k,l({},N,{className:A,onClick:this.handleClick}),o):d["default"].createElement(k,l({className:A,onClick:this.handleClick},N),m["default"].create(T),"boolean"!=typeof O&&h["default"].create(O),i,(0,f.createShorthand)(b["default"],function(e){return{content:e}},y),(j||_)&&d["default"].createElement(m["default"],{name:"delete",onClick:this.handleRemove}))}}]),t}(p.Component);_.propTypes={as:f.customPropTypes.as,attached:p.PropTypes.oneOf(O.props.attached),basic:p.PropTypes.bool,children:p.PropTypes.node,circular:p.PropTypes.bool,className:p.PropTypes.string,color:p.PropTypes.oneOf(O.props.color),content:f.customPropTypes.contentShorthand,corner:p.PropTypes.oneOfType([p.PropTypes.bool,p.PropTypes.oneOf(O.props.corner)]),detail:f.customPropTypes.itemShorthand,empty:f.customPropTypes.every([f.customPropTypes.demand(["circular"]),p.PropTypes.bool]),floating:p.PropTypes.bool,horizontal:p.PropTypes.bool,icon:f.customPropTypes.itemShorthand,image:p.PropTypes.oneOfType([p.PropTypes.bool,f.customPropTypes.itemShorthand]),pointing:p.PropTypes.oneOfType([p.PropTypes.bool,p.PropTypes.oneOf(O.props.pointing)]),onClick:p.PropTypes.func,onRemove:p.PropTypes.func,removable:p.PropTypes.bool,ribbon:p.PropTypes.oneOfType([p.PropTypes.bool,p.PropTypes.oneOf(O.props.ribbon)]),size:p.PropTypes.oneOf(O.props.size),tag:p.PropTypes.bool},_._meta=O,_.Detail=b["default"],_.Group=T["default"],t["default"]=_,_.create=(0,f.createShorthandFactory)(_,function(e){return{content:e}})},/*!*************************************!*\ !*** ./src/elements/Label/index.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Label */76),a=n(o);t["default"]=a["default"]},/*!******************************************!*\ !*** ./src/elements/List/ListContent.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.description,u=e.floated,p=e.header,f=e.verticalAlign,m=(0,l["default"])((0,c.useValueAndKey)(u,"floated"),(0,c.useVerticalAlignProp)(f),"content",r),v=(0,c.getUnhandledProps)(o,e),h=(0,c.getElementType)(o,e);return t?i["default"].createElement(h,a({},v,{className:m}),t):i["default"].createElement(h,a({},v,{className:m}),y["default"].create(p),d["default"].create(s),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ./ListDescription */44),d=n(p),f=r(/*! ./ListHeader */45),y=n(f);o._meta={name:"ListContent",parent:"List",type:c.META.TYPES.ELEMENT,props:{floated:c.SUI.FLOATS,verticalAlign:c.SUI.VERTICAL_ALIGNMENTS}},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand,description:c.customPropTypes.itemShorthand,floated:u.PropTypes.oneOf(o._meta.props.floated),header:c.customPropTypes.itemShorthand,verticalAlign:u.PropTypes.oneOf(o._meta.props.verticalAlign)},o.create=(0,c.createShorthandFactory)(o,function(e){return{content:e}}),t["default"]=o},/*!***************************************!*\ !*** ./src/elements/List/ListIcon.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.verticalAlign,n=(0,l["default"])((0,c.useVerticalAlignProp)(r),t),s=(0,c.getUnhandledProps)(o,e);return i["default"].createElement(d["default"],a({},s,{className:n}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ../Icon/Icon */43),d=n(p);o._meta={name:"ListIcon",parent:"List",type:c.META.TYPES.ELEMENT,props:{verticalAlign:c.SUI.VERTICAL_ALIGNMENTS}},o.propTypes={className:u.PropTypes.string,verticalAlign:u.PropTypes.oneOf(o._meta.props.verticalAlign)},o.create=(0,c.createShorthandFactory)(o,function(e){return{name:e}}),t["default"]=o},/*!**********************************************!*\ !*** ./src/elements/Step/StepDescription.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.description,s=(0,l["default"])(r,"description"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"StepDescription",parent:"Step",type:c.META.TYPES.ELEMENT},o.propTypes={as:c.customPropTypes.as,className:u.PropTypes.string,children:u.PropTypes.node,description:c.customPropTypes.contentShorthand},t["default"]=o},/*!****************************************!*\ !*** ./src/elements/Step/StepTitle.js ***! \****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.title,s=(0,l["default"])(r,"title"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"StepTitle",parent:"Step",type:c.META.TYPES.ELEMENT},o.propTypes={as:c.customPropTypes.as,className:u.PropTypes.string,children:u.PropTypes.node,title:c.customPropTypes.contentShorthand},t["default"]=o},/*!*********************************!*\ !*** ./src/lib/numberToWord.js ***! \*********************************/ function(e,t){"use strict";function r(e){var t="undefined"==typeof e?"undefined":n(e);return"string"===t||"number"===t?o[e]||e:""}Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.numberToWord=r;var o=t.numberToWordMap={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"}},/*!***************************************!*\ !*** ./src/modules/Dropdown/index.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Dropdown */311),a=n(o);t["default"]=a["default"]},/*!*******************************************!*\ !*** ./src/views/Card/CardDescription.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"description"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"CardDescription",parent:"Card",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},t["default"]=o},/*!**************************************!*\ !*** ./src/views/Card/CardHeader.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"header"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"CardHeader",parent:"Card",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},t["default"]=o},/*!************************************!*\ !*** ./src/views/Card/CardMeta.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"meta"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"CardMeta",parent:"Card",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},t["default"]=o},/*!***************************************!*\ !*** ./src/views/Feed/FeedContent.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.extraImages,u=e.extraText,p=e.date,f=e.meta,m=e.summary,h=(0,l["default"])(r,"content"),b=(0,c.getUnhandledProps)(o,e),P=(0,c.getElementType)(o,e);return t?i["default"].createElement(P,a({},b,{className:h}),t):i["default"].createElement(P,a({},b,{className:h}),(0,c.createShorthand)(d["default"],function(e){return{content:e}},p),(0,c.createShorthand)(g["default"],function(e){return{content:e}},m),n,(0,c.createShorthand)(y["default"],function(e){return{text:!0,content:e}},u),(0,c.createShorthand)(y["default"],function(e){return{images:e}},s),(0,c.createShorthand)(v["default"],function(e){return{content:e}},f))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ./FeedDate */47),d=n(p),f=r(/*! ./FeedExtra */88),y=n(f),m=r(/*! ./FeedMeta */91),v=n(m),h=r(/*! ./FeedSummary */92),g=n(h);o._meta={name:"FeedContent",parent:"Feed",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand,date:c.customPropTypes.itemShorthand,extraImages:y["default"].propTypes.images,extraText:c.customPropTypes.itemShorthand,meta:c.customPropTypes.itemShorthand,summary:c.customPropTypes.itemShorthand},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Feed/FeedExtra.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,a=e.images,u=e.text,c=(0,i["default"])(r,(0,d.useKeyOnly)(a,"images"),(0,d.useKeyOnly)(n||u,"text"),"extra"),f=(0,d.getUnhandledProps)(o,e),y=(0,d.getElementType)(o,e);if(t)return p["default"].createElement(y,l({},f,{className:c}),t);var m=(0,s["default"])(a,function(e,t){var r=[t,e].join("-");return(0,d.createHTMLImage)(e,{key:r})});return p["default"].createElement(y,l({},f,{className:c}),n,m)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/map */9),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2);o._meta={name:"FeedExtra",parent:"Feed",type:d.META.TYPES.VIEW},o.propTypes={as:d.customPropTypes.as,children:c.PropTypes.node,className:c.PropTypes.string,content:d.customPropTypes.contentShorthand,images:d.customPropTypes.every([d.customPropTypes.disallow(["text"]),c.PropTypes.oneOfType([c.PropTypes.bool,d.customPropTypes.collectionShorthand])]),text:c.PropTypes.bool},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Feed/FeedLabel.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.icon,u=e.image,p=(0,l["default"])(r,"label"),f=(0,c.getUnhandledProps)(o,e),y=(0,c.getElementType)(o,e);return t?i["default"].createElement(y,a({},f,{className:p}),t):i["default"].createElement(y,a({},f,{className:p}),n,d["default"].create(s),(0,c.createHTMLImage)(u))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ../../elements/Icon */10),d=n(p);o._meta={name:"FeedLabel",parent:"Feed",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand,icon:c.customPropTypes.itemShorthand,image:c.customPropTypes.itemShorthand},t["default"]=o},/*!************************************!*\ !*** ./src/views/Feed/FeedLike.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.icon,u=(0,l["default"])(r,"like"),p=(0,c.getUnhandledProps)(o,e),f=(0,c.getElementType)(o,e);return t?i["default"].createElement(f,a({},p,{className:u}),t):i["default"].createElement(f,a({},p,{className:u}),d["default"].create(s),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ../../elements/Icon */10),d=n(p);o._meta={name:"FeedLike",parent:"Feed",type:c.META.TYPES.VIEW},o.defaultProps={as:"a"},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand,icon:c.customPropTypes.itemShorthand},t["default"]=o},/*!************************************!*\ !*** ./src/views/Feed/FeedMeta.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.like,u=(0,l["default"])(r,"meta"),p=(0,c.getUnhandledProps)(o,e),f=(0,c.getElementType)(o,e);return t?i["default"].createElement(f,a({},p,{className:u}),t):i["default"].createElement(f,a({},p,{className:u}),(0,c.createShorthand)(d["default"],function(e){return{content:e}},s),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ./FeedLike */90),d=n(p);o._meta={name:"FeedMeta",parent:"Feed",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand,like:c.customPropTypes.itemShorthand},t["default"]=o},/*!***************************************!*\ !*** ./src/views/Feed/FeedSummary.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.date,u=e.user,p=(0,l["default"])(r,"summary"),f=(0,c.getUnhandledProps)(o,e),m=(0,c.getElementType)(o,e);return t?i["default"].createElement(m,a({},f,{className:p}),t):i["default"].createElement(m,a({},f,{className:p}),(0,c.createShorthand)(y["default"],function(e){return{content:e}},u),n,(0,c.createShorthand)(d["default"],function(e){return{content:e}},s))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ./FeedDate */47),d=n(p),f=r(/*! ./FeedUser */93),y=n(f);o._meta={name:"FeedSummary",parent:"Feed",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand,date:c.customPropTypes.itemShorthand,user:c.customPropTypes.itemShorthand},t["default"]=o},/*!************************************!*\ !*** ./src/views/Feed/FeedUser.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"user"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"FeedUser",parent:"Feed",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},o.defaultProps={as:"a"},t["default"]=o},/*!*******************************************!*\ !*** ./src/views/Item/ItemDescription.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"description"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ItemDescription",parent:"Item",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Item/ItemExtra.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"extra"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ItemExtra",parent:"Item",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},t["default"]=o},/*!**************************************!*\ !*** ./src/views/Item/ItemHeader.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"header"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ItemHeader",parent:"Item",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},t["default"]=o},/*!************************************!*\ !*** ./src/views/Item/ItemMeta.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"meta"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ItemMeta",parent:"Item",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},t["default"]=o},/*!**********************************!*\ !*** ./~/lodash/_LazyWrapper.js ***! \**********************************/ function(e,t,r){function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=s,this.__views__=[]}var o=r(/*! ./_baseCreate */31),a=r(/*! ./_baseLodash */109),s=4294967295;n.prototype=o(a.prototype),n.prototype.constructor=n,e.exports=n},/*!************************************!*\ !*** ./~/lodash/_LodashWrapper.js ***! \************************************/ function(e,t,r){function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}var o=r(/*! ./_baseCreate */31),a=r(/*! ./_baseLodash */109);n.prototype=o(a.prototype),n.prototype.constructor=n,e.exports=n},/*!**************************!*\ !*** ./~/lodash/_Map.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_getNative */21),o=r(/*! ./_root */11),a=n(o,"Map");e.exports=a},/*!*******************************!*\ !*** ./~/lodash/_MapCache.js ***! \*******************************/ function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(/*! ./_mapCacheClear */416),a=r(/*! ./_mapCacheDelete */417),s=r(/*! ./_mapCacheGet */418),l=r(/*! ./_mapCacheHas */419),u=r(/*! ./_mapCacheSet */420);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=s,n.prototype.has=l,n.prototype.set=u,e.exports=n},/*!****************************!*\ !*** ./~/lodash/_Stack.js ***! \****************************/ function(e,t,r){function n(e){this.__data__=new o(e)}var o=r(/*! ./_ListCache */48),a=r(/*! ./_stackClear */429),s=r(/*! ./_stackDelete */430),l=r(/*! ./_stackGet */431),u=r(/*! ./_stackHas */432),i=r(/*! ./_stackSet */433);n.prototype.clear=a,n.prototype["delete"]=s,n.prototype.get=l,n.prototype.has=u,n.prototype.set=i,e.exports=n},/*!****************************************!*\ !*** ./~/lodash/_arrayIncludesWith.js ***! \****************************************/ function(e,t){function r(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)if(r(t,e[n]))return!0;return!1}e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_assignValue.js ***! \**********************************/ function(e,t,r){function n(e,t,r){var n=e[t];s.call(e,t)&&o(n,r)&&(void 0!==r||t in e)||(e[t]=r)}var o=r(/*! ./eq */36),a=Object.prototype,s=a.hasOwnProperty;e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_baseDifference.js ***! \*************************************/ function(e,t,r){function n(e,t,r,n){var p=-1,d=a,f=!0,y=e.length,m=[],v=t.length;if(!y)return m;r&&(t=l(t,u(r))),n?(d=s,f=!1):t.length>=c&&(d=i,f=!1,t=new o(t));e:for(;++p<y;){var h=e[p],g=r?r(h):h;if(h=n||0!==h?h:0,f&&g===g){for(var b=v;b--;)if(t[b]===g)continue e;m.push(h)}else d(t,g,n)||m.push(h)}return m}var o=r(/*! ./_SetCache */49),a=r(/*! ./_arrayIncludes */51),s=r(/*! ./_arrayIncludesWith */103),l=r(/*! ./_arrayMap */18),u=r(/*! ./_baseUnary */111),i=r(/*! ./_cacheHas */112),c=200;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseForOwn.js ***! \*********************************/ function(e,t,r){function n(e,t){return e&&o(e,t,a)}var o=r(/*! ./_baseFor */341),a=r(/*! ./keys */8);e.exports=n},/*!******************************!*\ !*** ./~/lodash/_baseGet.js ***! \******************************/ function(e,t,r){function n(e,t){t=a(t,e)?[t]:o(t);for(var r=0,n=t.length;null!=e&&r<n;)e=e[s(t[r++])];return r&&r==n?e:void 0}var o=r(/*! ./_castPath */113),a=r(/*! ./_isKey */33),s=r(/*! ./_toKey */19);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_baseIsEqual.js ***! \**********************************/ function(e,t,r){function n(e,t,r,l,u){return e===t||(null==e||null==t||!a(e)&&!s(t)?e!==e&&t!==t:o(e,t,n,r,l,u))}var o=r(/*! ./_baseIsEqualDeep */348),a=r(/*! ./isObject */13),s=r(/*! ./isObjectLike */20);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseLodash.js ***! \*********************************/ function(e,t){function r(){}e.exports=r},/*!********************************!*\ !*** ./~/lodash/_baseSlice.js ***! \********************************/ function(e,t){function r(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}e.exports=r},/*!********************************!*\ !*** ./~/lodash/_baseUnary.js ***! \********************************/ function(e,t){function r(e){return function(t){return e(t)}}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_cacheHas.js ***! \*******************************/ function(e,t){function r(e,t){return e.has(t)}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_castPath.js ***! \*******************************/ function(e,t,r){function n(e){return o(e)?e:a(e)}var o=r(/*! ./isArray */4),a=r(/*! ./_stringToPath */239);e.exports=n},/*!***************************************!*\ !*** ./~/lodash/_cloneArrayBuffer.js ***! \***************************************/ function(e,t,r){function n(e){var t=new e.constructor(e.byteLength);return new o(t).set(new o(e)),t}var o=r(/*! ./_Uint8Array */206);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_copyObject.js ***! \*********************************/ function(e,t,r){function n(e,t,r,n){r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],u=n?n(r[l],e[l],l,r,e):void 0;o(r,l,void 0===u?e[l]:u)}return r}var o=r(/*! ./_assignValue */104);e.exports=n},/*!******************************!*\ !*** ./~/lodash/_getData.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_metaMap */235),o=r(/*! ./noop */251),a=n?function(e){return n.get(e)}:o;e.exports=a},/*!*********************************!*\ !*** ./~/lodash/_getSymbols.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./_overArg */120),o=r(/*! ./stubArray */254),a=Object.getOwnPropertySymbols,s=a?n(a,Object):o;e.exports=s},/*!*****************************!*\ !*** ./~/lodash/_getTag.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./_DataView */330),o=r(/*! ./_Map */100),a=r(/*! ./_Promise */332),s=r(/*! ./_Set */205),l=r(/*! ./_WeakMap */207),u=r(/*! ./_baseGetTag */342),i=r(/*! ./_toSource */240),c="[object Map]",p="[object Object]",d="[object Promise]",f="[object Set]",y="[object WeakMap]",m="[object DataView]",v=Object.prototype,h=v.toString,g=i(n),b=i(o),P=i(a),T=i(s),O=i(l),_=u;(n&&_(new n(new ArrayBuffer(1)))!=m||o&&_(new o)!=c||a&&_(a.resolve())!=d||s&&_(new s)!=f||l&&_(new l)!=y)&&(_=function(e){var t=h.call(e),r=t==p?e.constructor:void 0,n=r?i(r):void 0;if(n)switch(n){case g:return m;case b:return c;case P:return d;case T:return f;case O:return y}return t}),e.exports=_},/*!*************************************!*\ !*** ./~/lodash/_isIterateeCall.js ***! \*************************************/ function(e,t,r){function n(e,t,r){if(!l(r))return!1;var n=typeof t;return!!("number"==n?a(r)&&s(t,r.length):"string"==n&&t in r)&&o(r[t],e)}var o=r(/*! ./eq */36),a=r(/*! ./isArrayLike */15),s=r(/*! ./_isIndex */61),l=r(/*! ./isObject */13);e.exports=n},/*!******************************!*\ !*** ./~/lodash/_overArg.js ***! \******************************/ function(e,t){function r(e,t){return function(r){return e(t(r))}}e.exports=r},/*!****************************!*\ !*** ./~/lodash/filter.js ***! \****************************/ function(e,t,r){function n(e,t){var r=l(e)?o:a;return r(e,s(t,3))}var o=r(/*! ./_arrayFilter */336),a=r(/*! ./_baseFilter */340),s=r(/*! ./_baseIteratee */14),l=r(/*! ./isArray */4);e.exports=n},/*!**************************!*\ !*** ./~/lodash/find.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_createFind */383),o=r(/*! ./findIndex */244),a=n(o);e.exports=a},/*!******************************!*\ !*** ./~/lodash/identity.js ***! \******************************/ function(e,t){function r(e){return e}e.exports=r},/*!*****************************!*\ !*** ./~/lodash/isEmpty.js ***! \*****************************/ function(e,t,r){function n(e){if(l(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||u(e)||a(e)))return!e.length;var t=o(e);if(t==p||t==d)return!e.size;if(v||i(e))return!c(e).length;for(var r in e)if(y.call(e,r))return!1;return!0}var o=r(/*! ./_getTag */118),a=r(/*! ./isArguments */66),s=r(/*! ./isArray */4),l=r(/*! ./isArrayLike */15),u=r(/*! ./isBuffer */247),i=r(/*! ./_isPrototype */34),c=r(/*! ./_nativeKeys */236),p="[object Map]",d="[object Set]",f=Object.prototype,y=f.hasOwnProperty,m=f.propertyIsEnumerable,v=!m.call({valueOf:1},"valueOf");e.exports=n},/*!******************************!*\ !*** ./~/lodash/isLength.js ***! \******************************/ function(e,t){function r(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=r},/*!***********************************!*\ !*** ./~/lodash/isPlainObject.js ***! \***********************************/ function(e,t,r){function n(e){if(!s(e)||f.call(e)!=l||a(e))return!1;var t=o(e);if(null===t)return!0;var r=p.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==d}var o=r(/*! ./_getPrototype */59),a=r(/*! ./_isHostObject */60),s=r(/*! ./isObjectLike */20),l="[object Object]",u=Function.prototype,i=Object.prototype,c=u.toString,p=i.hasOwnProperty,d=c.call(Object),f=i.toString;e.exports=n},/*!****************************!*\ !*** ./~/lodash/values.js ***! \****************************/ function(e,t,r){function n(e){return e?o(e,a(e)):[]}var o=r(/*! ./_baseValues */364),a=r(/*! ./keys */8);e.exports=n},/*!************************************!*\ !*** ./src/addons/Select/index.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Select */264),a=n(o);t["default"]=a["default"]},/*!**************************************!*\ !*** ./src/addons/TextArea/index.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./TextArea */265),a=n(o);t["default"]=a["default"]},/*!*********************************************************!*\ !*** ./src/collections/Breadcrumb/BreadcrumbDivider.js ***! \*********************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.icon,n=e.className,s=(0,l["default"])(n,"divider"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return r?d["default"].create(r,a({},u,{className:s})):i["default"].createElement(p,a({},u,{className:s}),t||"/")}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ../../elements/Icon */10),d=n(p);o._meta={name:"BreadcrumbDivider",type:c.META.TYPES.COLLECTION,parent:"Breadcrumb"},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,icon:c.customPropTypes.itemShorthand},t["default"]=o},/*!*********************************************************!*\ !*** ./src/collections/Breadcrumb/BreadcrumbSection.js ***! \*********************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(/*! classnames */3),c=n(i),p=r(/*! react */1),d=n(p),f=r(/*! ../../lib */2),y=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.handleClick=function(e){var t=n.props.onClick;t&&t(e)},s=r,a(n,s)}return s(t,e),u(t,[{key:"render",value:function(){var e=this.props,r=e.active,n=e.children,o=e.className,a=e.href,s=e.link,u=e.onClick,i=(0,c["default"])((0,f.useKeyOnly)(r,"active"),"section",o),p=(0,f.getUnhandledProps)(t,this.props),y=(0,f.getElementType)(t,this.props,function(){if(s||u)return"a"});return d["default"].createElement(y,l({},p,{className:i,href:a,onClick:this.handleClick}),n)}}]),t}(p.Component);y.propTypes={as:f.customPropTypes.as,active:p.PropTypes.bool,children:p.PropTypes.node,className:p.PropTypes.string,link:f.customPropTypes.every([f.customPropTypes.disallow(["href"]),p.PropTypes.bool]),href:f.customPropTypes.every([f.customPropTypes.disallow(["link"]),p.PropTypes.string]),onClick:p.PropTypes.func},y._meta={name:"BreadcrumbSection",type:f.META.TYPES.COLLECTION,parent:"Breadcrumb"},t["default"]=y},/*!********************************************!*\ !*** ./src/collections/Form/FormButton.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,u.getUnhandledProps)(o,e),n=(0,u.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! ../../lib */2),i=r(/*! ../../elements/Button */74),c=n(i),p=r(/*! ./FormField */16),d=n(p);o._meta={name:"FormButton",parent:"Form",type:u.META.TYPES.COLLECTION},o.propTypes={as:u.customPropTypes.as,control:d["default"].propTypes.control},o.defaultProps={as:d["default"],control:c["default"]},t["default"]=o},/*!**********************************************!*\ !*** ./src/collections/Form/FormCheckbox.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,u.getUnhandledProps)(o,e),n=(0,u.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! ../../lib */2),i=r(/*! ../../modules/Checkbox */46),c=n(i),p=r(/*! ./FormField */16),d=n(p);o._meta={name:"FormCheckbox",parent:"Form",type:u.META.TYPES.COLLECTION},o.propTypes={as:u.customPropTypes.as,control:d["default"].propTypes.control},o.defaultProps={as:d["default"],control:c["default"]},t["default"]=o},/*!**********************************************!*\ !*** ./src/collections/Form/FormDropdown.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,u.getUnhandledProps)(o,e),n=(0,u.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! ../../lib */2),i=r(/*! ../../modules/Dropdown */83),c=n(i),p=r(/*! ./FormField */16),d=n(p);o._meta={name:"FormDropdown",parent:"Form",type:u.META.TYPES.COLLECTION},o.propTypes={as:u.customPropTypes.as,control:d["default"].propTypes.control},o.defaultProps={as:d["default"],control:c["default"]},t["default"]=o},/*!*******************************************!*\ !*** ./src/collections/Form/FormGroup.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function a(e){var t=e.children,r=e.className,n=e.grouped,o=e.inline,l=e.widths,i=(0,c["default"])((0,p.useWidthProp)(l,null,!0),(0,p.useKeyOnly)(o,"inline"),(0,p.useKeyOnly)(n,"grouped"),"fields",r),d=(0,p.getUnhandledProps)(a,e),f=(0,p.getElementType)(a,e);return u["default"].createElement(f,s({},d,{className:i}),t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l=r(/*! react */1),u=n(l),i=r(/*! classnames */3),c=n(i),p=r(/*! ../../lib */2);a._meta={name:"FormGroup",parent:"Form",type:p.META.TYPES.COLLECTION,props:{widths:[].concat(o(p.SUI.WIDTHS),["equal"])}},a.propTypes={as:p.customPropTypes.as,children:l.PropTypes.node,className:l.PropTypes.string,grouped:p.customPropTypes.every([p.customPropTypes.disallow(["inline"]),l.PropTypes.bool]),inline:p.customPropTypes.every([p.customPropTypes.disallow(["grouped"]),l.PropTypes.bool]),widths:l.PropTypes.oneOf(a._meta.props.widths)},a.defaultProps={as:"div"},t["default"]=a},/*!*******************************************!*\ !*** ./src/collections/Form/FormInput.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,u.getUnhandledProps)(o,e),n=(0,u.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! ../../lib */2),i=r(/*! ../../elements/Input */75),c=n(i),p=r(/*! ./FormField */16),d=n(p);o._meta={name:"FormInput",parent:"Form",type:u.META.TYPES.COLLECTION},o.propTypes={as:u.customPropTypes.as,control:d["default"].propTypes.control},o.defaultProps={as:d["default"],control:c["default"]},t["default"]=o},/*!*******************************************!*\ !*** ./src/collections/Form/FormRadio.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,u.getUnhandledProps)(o,e),n=(0,u.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! ../../lib */2),i=r(/*! ../../addons/Radio */71),c=n(i),p=r(/*! ./FormField */16),d=n(p);o._meta={name:"FormRadio",parent:"Form",type:u.META.TYPES.COLLECTION},o.propTypes={as:u.customPropTypes.as,control:d["default"].propTypes.control},o.defaultProps={as:d["default"],control:c["default"]},t["default"]=o},/*!********************************************!*\ !*** ./src/collections/Form/FormSelect.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,u.getUnhandledProps)(o,e),n=(0,u.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! ../../lib */2),i=r(/*! ../../addons/Select */128),c=n(i),p=r(/*! ./FormField */16),d=n(p);o._meta={name:"FormSelect",parent:"Form",type:u.META.TYPES.COLLECTION},o.propTypes={as:u.customPropTypes.as,control:d["default"].propTypes.control},o.defaultProps={as:d["default"],control:c["default"]},t["default"]=o},/*!**********************************************!*\ !*** ./src/collections/Form/FormTextArea.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.control,r=(0,u.getUnhandledProps)(o,e),n=(0,u.getElementType)(o,e);return l["default"].createElement(n,a({},r,{control:t}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! ../../lib */2),i=r(/*! ../../addons/TextArea */129),c=n(i),p=r(/*! ./FormField */16),d=n(p);o._meta={name:"FormTextArea",parent:"Form",type:u.META.TYPES.COLLECTION},o.propTypes={as:u.customPropTypes.as,control:d["default"].propTypes.control},o.defaultProps={as:d["default"],control:c["default"]},t["default"]=o},/*!********************************************!*\ !*** ./src/collections/Grid/GridColumn.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.computer,s=e.color,u=e.floated,p=e.largeScreen,d=e.mobile,f=e.only,y=e.stretched,m=e.tablet,v=e.textAlign,h=e.verticalAlign,g=e.widescreen,b=e.width,P=(0,l["default"])(s,(0,c.useKeyOnly)(y,"stretched"),(0,c.useTextAlignProp)(v),(0,c.useValueAndKey)(u,"floated"),(0,c.useValueAndKey)(f,"only"),(0,c.useVerticalAlignProp)(h),(0,c.useWidthProp)(n,"wide computer"),(0,c.useWidthProp)(p,"wide large screen"),(0,c.useWidthProp)(d,"wide mobile"),(0,c.useWidthProp)(m,"wide tablet"),(0,c.useWidthProp)(g,"wide widescreen"),(0,c.useWidthProp)(b,"wide"),"column",r),T=(0,c.getUnhandledProps)(o,e),O=(0,c.getElementType)(o,e);return i["default"].createElement(O,a({},T,{className:P}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"GridColumn",parent:"Grid",type:c.META.TYPES.COLLECTION,props:{color:c.SUI.COLORS,computer:c.SUI.WIDTHS,floated:c.SUI.FLOATS,largeScreen:c.SUI.WIDTHS,mobile:c.SUI.WIDTHS,only:["computer","large screen","mobile","tablet mobile","tablet","widescreen"],tablet:c.SUI.WIDTHS,textAlign:c.SUI.TEXT_ALIGNMENTS,verticalAlign:c.SUI.VERTICAL_ALIGNMENTS,widescreen:c.SUI.WIDTHS,width:c.SUI.WIDTHS}},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,computer:u.PropTypes.oneOf(o._meta.props.width),color:u.PropTypes.oneOf(o._meta.props.color),floated:u.PropTypes.oneOf(o._meta.props.floated),largeScreen:u.PropTypes.oneOf(o._meta.props.width),mobile:u.PropTypes.oneOf(o._meta.props.width),only:u.PropTypes.oneOf(o._meta.props.only),stretched:u.PropTypes.bool,tablet:u.PropTypes.oneOf(o._meta.props.width),textAlign:u.PropTypes.oneOf(o._meta.props.textAlign),verticalAlign:u.PropTypes.oneOf(o._meta.props.verticalAlign),widescreen:u.PropTypes.oneOf(o._meta.props.width),width:u.PropTypes.oneOf(o._meta.props.width)},t["default"]=o},/*!*****************************************!*\ !*** ./src/collections/Grid/GridRow.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function a(e){var t=e.centered,r=e.children,n=e.className,o=e.color,l=e.columns,i=e.divided,d=e.only,f=e.reversed,y=e.stretched,m=e.textAlign,v=e.verticalAlign,h=(0,u["default"])(o,(0,p.useKeyOnly)(t,"centered"),(0,p.useKeyOnly)(i,"divided"),(0,p.useKeyOnly)(y,"stretched"),(0,p.useTextAlignProp)(m),(0,p.useValueAndKey)(d,"only"),(0,p.useValueAndKey)(f,"reversed"),(0,p.useVerticalAlignProp)(v),(0,p.useWidthProp)(l,"column",!0),"row",n),g=(0,p.getUnhandledProps)(a,e),b=(0,p.getElementType)(a,e);return c["default"].createElement(b,s({},g,{className:h}),r)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l=r(/*! classnames */3),u=n(l),i=r(/*! react */1),c=n(i),p=r(/*! ../../lib */2);a._meta={name:"GridRow",parent:"Grid",type:p.META.TYPES.COLLECTION,props:{color:p.SUI.COLORS,columns:[].concat(o(p.SUI.WIDTHS),["equal"]),only:["computer","large screen","mobile","tablet mobile","tablet","widescreen"],reversed:["computer","computer vertically","mobile","mobile vertically","tablet","tablet vertically"],textAlign:p.SUI.TEXT_ALIGNMENTS,verticalAlign:p.SUI.VERTICAL_ALIGNMENTS}},a.propTypes={as:p.customPropTypes.as,centered:i.PropTypes.bool,children:i.PropTypes.node,className:i.PropTypes.string,color:i.PropTypes.oneOf(a._meta.props.color),columns:i.PropTypes.oneOf(a._meta.props.columns),divided:i.PropTypes.bool,only:i.PropTypes.oneOf(a._meta.props.only),reversed:i.PropTypes.oneOf(a._meta.props.reversed),stretched:i.PropTypes.bool,textAlign:i.PropTypes.oneOf(a._meta.props.textAlign),verticalAlign:i.PropTypes.oneOf(a._meta.props.verticalAlign)},t["default"]=a},/*!********************************************!*\ !*** ./src/collections/Menu/MenuHeader.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])(r,"header"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"MenuHeader",type:c.META.TYPES.COLLECTION,parent:"Menu"},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},t["default"]=o},/*!******************************************!*\ !*** ./src/collections/Menu/MenuItem.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/startCase */485),u=n(l),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),p=r(/*! classnames */3),d=n(p),f=r(/*! react */1),y=n(f),m=r(/*! ../../lib */2),v=r(/*! ../../elements/Icon */10),h=n(v),g={name:"MenuItem",type:m.META.TYPES.COLLECTION,parent:"Menu",props:{color:m.SUI.COLORS,fitted:["horizontally","vertically"],position:["right"]}},b=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.handleClick=function(e){var t=n.props,r=t.index,o=t.name,a=t.onClick;a&&a(e,{name:o,index:r})},s=r,a(n,s)}return s(t,e),c(t,[{key:"render",value:function(){var e=this.props,r=e.active,n=e.children,o=e.className,a=e.color,s=e.content,l=e.fitted,c=e.header,p=e.icon,f=e.link,v=e.name,g=e.onClick,b=e.position,P=(0,d["default"])(a,b,(0,m.useKeyOnly)(r,"active"),(0,m.useKeyOnly)(p===!0||p&&!(v||s),"icon"),(0,m.useKeyOnly)(c,"header"),(0,m.useKeyOnly)(f,"link"),(0,m.useKeyOrValueAndKey)(l,"fitted"),"item",o),T=(0,m.getElementType)(t,this.props,function(){if(g)return"a"}),O=(0,m.getUnhandledProps)(t,this.props);return n?y["default"].createElement(T,i({},O,{className:P,onClick:this.handleClick}),n):y["default"].createElement(T,i({},O,{className:P,onClick:this.handleClick}),h["default"].create(p),s||(0,u["default"])(v))}}]),t}(f.Component);b.propTypes={as:m.customPropTypes.as,active:f.PropTypes.bool,children:f.PropTypes.node,className:f.PropTypes.string,color:f.PropTypes.oneOf(g.props.color),content:m.customPropTypes.contentShorthand,fitted:f.PropTypes.oneOfType([f.PropTypes.bool,f.PropTypes.oneOf(g.props.fitted)]),header:f.PropTypes.bool,icon:f.PropTypes.oneOfType([f.PropTypes.bool,m.customPropTypes.itemShorthand]),index:f.PropTypes.number,link:f.PropTypes.bool,name:f.PropTypes.string,onClick:f.PropTypes.func,position:f.PropTypes.oneOf(g.props.position)},b._meta=g,t["default"]=b},/*!******************************************!*\ !*** ./src/collections/Menu/MenuMenu.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.position,s=(0,l["default"])(r,n,"menu"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"MenuMenu",type:c.META.TYPES.COLLECTION,parent:"Menu",props:{position:["right"]}},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,position:u.PropTypes.oneOf(o._meta.props.position)},t["default"]=o},/*!***************************************************!*\ !*** ./src/collections/Message/MessageContent.js ***! \***************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,l["default"])("content",r),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"MessageContent",parent:"Message",type:c.META.TYPES.COLLECTION},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string},t["default"]=o},/*!**************************************************!*\ !*** ./src/collections/Message/MessageHeader.js ***! \**************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,l["default"])("header",r),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"MessageHeader",parent:"Message",type:c.META.TYPES.COLLECTION},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string},t["default"]=o},/*!************************************************!*\ !*** ./src/collections/Message/MessageList.js ***! \************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.items,a=(0,i["default"])("list",r),u=(0,d.getUnhandledProps)(o,e),c=(0,d.getElementType)(o,e);if(t)return p["default"].createElement(c,l({},u,{className:a}),t);var f=(0,s["default"])(n,function(e){return p["default"].createElement(y["default"],{key:e},e)});return p["default"].createElement(c,l({},u,{className:a}),f)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/map */9),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2),f=r(/*! ./MessageItem */72),y=n(f);o._meta={name:"MessageList",parent:"Message",type:d.META.TYPES.COLLECTION},o.propTypes={as:d.customPropTypes.as,children:c.PropTypes.node,className:c.PropTypes.string,items:c.PropTypes.arrayOf(c.PropTypes.string)},o.defaultProps={as:"ul"},t["default"]=o},/*!********************************************!*\ !*** ./src/collections/Table/TableBody.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,l["default"])(r),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"TableBody",type:c.META.TYPES.COLLECTION,parent:"Table"},o.defaultProps={as:"tbody"},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string},t["default"]=o},/*!**********************************************!*\ !*** ./src/collections/Table/TableFooter.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return s["default"].createElement(i["default"],e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! react */1),s=n(a),l=r(/*! ../../lib */2),u=r(/*! ./TableHeader */73),i=n(u);o._meta={name:"TableFooter",type:l.META.TYPES.COLLECTION,parent:"Table"},o.defaultProps={as:"tfoot"},t["default"]=o},/*!**************************************************!*\ !*** ./src/collections/Table/TableHeaderCell.js ***! \**************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return s["default"].createElement(i["default"],e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! react */1),s=n(a),l=r(/*! ../../lib */2),u=r(/*! ./TableCell */42),i=n(u);o._meta={name:"TableHeaderCell",type:l.META.TYPES.COLLECTION,parent:"Table"},o.defaultProps={as:"th"},t["default"]=o},/*!*******************************************!*\ !*** ./src/collections/Table/TableRow.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.cellAs,n=e.cells,a=e.children,u=e.className,c=e.disabled,f=e.error,m=e.negative,v=e.positive,h=e.textAlign,g=e.verticalAlign,b=e.warning,P=(0,i["default"])((0,d.useKeyOnly)(t,"active"),(0,d.useKeyOnly)(c,"disabled"),(0,d.useKeyOnly)(f,"error"),(0,d.useKeyOnly)(m,"negative"),(0,d.useKeyOnly)(v,"positive"),(0,d.useKeyOnly)(b,"warning"),(0,d.useTextAlignProp)(h),(0,d.useVerticalAlignProp)(g),u),T=(0,d.getUnhandledProps)(o,e),O=(0,d.getElementType)(o,e);return a?p["default"].createElement(O,l({},T,{className:P}),a):p["default"].createElement(O,l({},T,{className:P}),(0,s["default"])(n,function(e){return y["default"].create(e,{as:r})}))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/map */9),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2),f=r(/*! ./TableCell */42),y=n(f);o._meta={name:"TableRow",type:d.META.TYPES.COLLECTION,parent:"Table",props:{textAlign:d.SUI.TEXT_ALIGNMENTS,verticalAlign:d.SUI.VERTICAL_ALIGNMENTS}},o.defaultProps={as:"tr",cellAs:"td"},o.propTypes={as:d.customPropTypes.as,active:c.PropTypes.bool,cellAs:d.customPropTypes.as,cells:d.customPropTypes.collectionShorthand,children:c.PropTypes.node,className:c.PropTypes.string,disabled:c.PropTypes.bool,error:c.PropTypes.bool,negative:c.PropTypes.bool,positive:c.PropTypes.bool,textAlign:c.PropTypes.oneOf(o._meta.props.textAlign),verticalAlign:c.PropTypes.oneOf(o._meta.props.verticalAlign),warning:c.PropTypes.bool},o.create=(0,d.createShorthandFactory)(o,function(e){return{cells:e}}),t["default"]=o},/*!***************************************!*\ !*** ./src/elements/Button/Button.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function a(e){var t=e.active,r=e.animated,n=e.attached,o=e.basic,l=e.children,i=e.circular,d=e.className,y=e.color,v=e.compact,h=e.content,g=e.disabled,b=e.floated,P=e.fluid,T=e.icon,_=e.inverted,E=e.label,j=e.labelPosition,w=e.loading,M=e.negative,S=e.positive,x=e.primary,A=e.secondary,N=e.size,k=e.toggle,C=(0,u["default"])((0,p.useKeyOrValueAndKey)(j||!!E,"labeled")),I=(0,u["default"])(y,N,(0,p.useKeyOnly)(t,"active"),(0,p.useKeyOrValueAndKey)(r,"animated"),(0,p.useKeyOrValueAndKey)(n,"attached"),(0,p.useKeyOnly)(o,"basic"),(0,p.useKeyOnly)(i,"circular"),(0,p.useKeyOnly)(v,"compact"),(0,p.useKeyOnly)(g,"disabled"),(0,p.useValueAndKey)(b,"floated"),(0,p.useKeyOnly)(P,"fluid"),(0,p.useKeyOnly)(T===!0||T&&(j||!l&&!h),"icon"),(0,p.useKeyOnly)(_,"inverted"),(0,p.useKeyOnly)(w,"loading"),(0,p.useKeyOnly)(M,"negative"),(0,p.useKeyOnly)(S,"positive"),(0,p.useKeyOnly)(x,"primary"),(0,p.useKeyOnly)(A,"secondary"),(0,p.useKeyOnly)(k,"toggle")),K=(0,p.getUnhandledProps)(a,e),L=(0,p.getElementType)(a,e,function(){if(E||n)return"div"}),U="div"===L?0:void 0;if(l){var D=(0,u["default"])("ui",I,C,"button",d);return O("render children:",{classes:D}),c["default"].createElement(L,s({},K,{className:D,tabIndex:U}),l)}if(E){var R=(0,u["default"])("ui",I,"button",d),z=(0,u["default"])("ui",C,"button",d);O("render label:",{classes:R,containerClasses:z},e);var W=m["default"].create(E,{basic:!0,pointing:"left"===j?"right":"left"});return c["default"].createElement(L,s({},K,{className:z}),"left"===j&&W,c["default"].createElement("button",{className:R},f["default"].create(T)," ",h),("right"===j||!j)&&W)}if(T&&!E){var F=(0,u["default"])("ui",C,I,"button",d);return O("render icon && !label:",{classes:F}),c["default"].createElement(L,s({},K,{className:F,tabIndex:U}),f["default"].create(T)," ",h)}var V=(0,u["default"])("ui",C,I,"button",d);return O("render default:",{classes:V}),c["default"].createElement(L,s({},K,{className:V,tabIndex:U}),h)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l=r(/*! classnames */3),u=n(l),i=r(/*! react */1),c=n(i),p=r(/*! ../../lib */2),d=r(/*! ../Icon/Icon */43),f=n(d),y=r(/*! ../Label/Label */76),m=n(y),v=r(/*! ./ButtonContent */153),h=n(v),g=r(/*! ./ButtonGroup */154),b=n(g),P=r(/*! ./ButtonOr */155),T=n(P),O=(0,p.makeDebugger)("button");a.Content=h["default"],a.Group=b["default"],a.Or=T["default"],a._meta={name:"Button",type:p.META.TYPES.ELEMENT,props:{animated:["fade","vertical"],attached:["left","right","top","bottom"],color:[].concat(o(p.SUI.COLORS),["facebook","twitter","google plus","vk","linkedin","instagram","youtube"]),floated:p.SUI.FLOATS,labelPosition:["right","left"],size:p.SUI.SIZES}},a.propTypes={as:p.customPropTypes.as,active:i.PropTypes.bool,animated:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(a._meta.props.animated)]),attached:i.PropTypes.oneOf(a._meta.props.attached),basic:i.PropTypes.bool,children:p.customPropTypes.every([i.PropTypes.node,p.customPropTypes.disallow(["label"]),p.customPropTypes.givenProps({icon:i.PropTypes.oneOfType([i.PropTypes.string.isRequired,i.PropTypes.object.isRequired,i.PropTypes.element.isRequired])},p.customPropTypes.disallow(["icon"]))]),circular:i.PropTypes.bool,className:i.PropTypes.string,content:p.customPropTypes.contentShorthand,color:i.PropTypes.oneOf(a._meta.props.color),compact:i.PropTypes.bool,disabled:i.PropTypes.bool,floated:i.PropTypes.oneOf(a._meta.props.floated),fluid:i.PropTypes.bool,icon:p.customPropTypes.some([i.PropTypes.bool,i.PropTypes.string,i.PropTypes.object,i.PropTypes.element]),inverted:i.PropTypes.bool,labelPosition:i.PropTypes.oneOf(a._meta.props.labelPosition),label:p.customPropTypes.some([i.PropTypes.string,i.PropTypes.object,i.PropTypes.element]),loading:i.PropTypes.bool,negative:i.PropTypes.bool,positive:i.PropTypes.bool,primary:i.PropTypes.bool,secondary:i.PropTypes.bool,toggle:i.PropTypes.bool,size:i.PropTypes.oneOf(a._meta.props.size)},a.defaultProps={as:"button"},a.create=(0,p.createShorthandFactory)(a,function(e){return{content:e}}),t["default"]=a},/*!**********************************************!*\ !*** ./src/elements/Button/ButtonContent.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.hidden,s=e.visible,u=(0,l["default"])((0,c.useKeyOnly)(s,"visible"),(0,c.useKeyOnly)(n,"hidden"),"content",r),p=(0,c.getUnhandledProps)(o,e),d=(0,c.getElementType)(o,e);return i["default"].createElement(d,a({},p,{className:u}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ButtonContent",parent:"Button",type:c.META.TYPES.ELEMENT},o.propTypes={as:c.customPropTypes.as,className:u.PropTypes.string,children:u.PropTypes.node,hidden:u.PropTypes.bool,visible:u.PropTypes.bool},t["default"]=o},/*!********************************************!*\ !*** ./src/elements/Button/ButtonGroup.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.attached,r=e.basic,n=e.children,s=e.className,u=e.color,p=e.compact,d=e.fluid,f=e.icon,y=e.inverted,m=e.labeled,v=e.negative,h=e.positive,g=e.primary,b=e.secondary,P=e.size,T=e.toggle,O=e.vertical,_=e.widths,E=(0,l["default"])("ui",P,u,(0,c.useValueAndKey)(t,"attached"),(0,c.useKeyOnly)(r,"basic"),(0,c.useKeyOnly)(p,"compact"),(0,c.useKeyOnly)(d,"fluid"),(0,c.useKeyOnly)(f,"icon"),(0,c.useKeyOnly)(y,"inverted"),(0,c.useKeyOnly)(m,"labeled"),(0,c.useKeyOnly)(v,"negative"),(0,c.useKeyOnly)(h,"positive"),(0,c.useKeyOnly)(g,"primary"),(0,c.useKeyOnly)(b,"secondary"),(0,c.useKeyOnly)(T,"toggle"),(0,c.useKeyOnly)(O,"vertical"),(0,c.useWidthProp)(_),"buttons",s),j=(0,c.getUnhandledProps)(o,e),w=(0,c.getElementType)(o,e);return i["default"].createElement(w,a({},j,{className:E}),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ButtonGroup",parent:"Button",type:c.META.TYPES.ELEMENT,props:{attached:["left","right","top","bottom"],color:c.SUI.COLORS,size:c.SUI.SIZES,widths:c.SUI.WIDTHS}},o.propTypes={as:c.customPropTypes.as,attached:u.PropTypes.oneOf(o._meta.props.attached),basic:u.PropTypes.bool,className:u.PropTypes.string,children:u.PropTypes.node,color:u.PropTypes.oneOf(o._meta.props.color),compact:u.PropTypes.bool,fluid:u.PropTypes.bool,icon:u.PropTypes.bool,inverted:u.PropTypes.bool,labeled:u.PropTypes.bool,negative:u.PropTypes.bool,positive:u.PropTypes.bool,primary:u.PropTypes.bool,secondary:u.PropTypes.bool,size:u.PropTypes.oneOf(o._meta.props.size),toggle:u.PropTypes.bool,vertical:u.PropTypes.bool,widths:u.PropTypes.oneOf(o._meta.props.widths)},t["default"]=o},/*!*****************************************!*\ !*** ./src/elements/Button/ButtonOr.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=(0,l["default"])("or",t),n=(0,c.getUnhandledProps)(o,e),s=(0,c.getElementType)(o,e);return i["default"].createElement(s,a({},n,{className:r}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ButtonOr",parent:"Button",type:c.META.TYPES.ELEMENT},o.propTypes={as:c.customPropTypes.as,className:u.PropTypes.string},t["default"]=o},/*!**********************************************!*\ !*** ./src/elements/Header/HeaderContent.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,l["default"])(r,"content"),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"HeaderContent",parent:"Header",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string},t["default"]=o},/*!************************************************!*\ !*** ./src/elements/Header/HeaderSubheader.js ***! \************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])("sub header",r),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"HeaderSubheader",parent:"Header",type:c.META.TYPES.ELEMENT},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},t["default"]=o},/*!****************************************!*\ !*** ./src/elements/Icon/IconGroup.js ***! \****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.size,s=(0,l["default"])(n,"icons",r),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"IconGroup",parent:"Icon",type:c.META.TYPES.ELEMENT,props:{size:c.SUI.SIZES}},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,size:u.PropTypes.oneOf(o._meta.props.size)},o.defaultProps={as:"i"},t["default"]=o},/*!*************************************!*\ !*** ./src/elements/Image/Image.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.alt,r=e.avatar,n=e.bordered,s=e.centered,u=e.className,p=e.disabled,f=e.floated,y=e.fluid,m=e.height,v=e.hidden,h=e.href,g=e.inline,b=e.label,P=e.shape,T=e.size,O=e.spaced,_=e.src,E=e.verticalAlign,j=e.width,w=e.wrapped,M=e.ui,S=(0,l["default"])((0,c.useKeyOnly)(M,"ui"),T,(0,c.useVerticalAlignProp)(E,"aligned"),(0,c.useKeyOnly)(r,"avatar"),(0,c.useKeyOnly)(n,"bordered"),(0,c.useKeyOnly)(s,"centered"),(0,c.useKeyOnly)(p,"disabled"),(0,c.useValueAndKey)(f,"floated"),(0,c.useKeyOnly)(y,"fluid"),(0,c.useKeyOnly)(v,"hidden"),(0,c.useKeyOnly)(g,"inline"),(0,c.useKeyOrValueAndKey)(O,"spaced"),P,u,"image"),x=(0,c.getUnhandledProps)(o,e),A=a({className:S},x),N={src:_,alt:t,width:j,height:m},k=(0,c.getElementType)(o,e,function(){if(b||w)return"div"});return"img"===k?i["default"].createElement(k,a({},A,N)):i["default"].createElement(k,a({},A,{href:h}),d["default"].create(b),i["default"].createElement("img",N))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ../Label/Label */76),d=n(p),f=r(/*! ./ImageGroup */160),y=n(f);o.Group=y["default"],o._meta={name:"Image",type:c.META.TYPES.ELEMENT,props:{verticalAlign:c.SUI.VERTICAL_ALIGNMENTS,floated:c.SUI.FLOATS,shape:["rounded","circular"],size:c.SUI.SIZES,spaced:["left","right"]}},o.propTypes={as:c.customPropTypes.as,verticalAlign:u.PropTypes.oneOf(o._meta.props.verticalAlign),alt:u.PropTypes.string,avatar:u.PropTypes.bool,bordered:u.PropTypes.bool,centered:u.PropTypes.bool,className:u.PropTypes.string,disabled:u.PropTypes.bool,floated:u.PropTypes.oneOf(o._meta.props.floated),fluid:c.customPropTypes.every([u.PropTypes.bool,c.customPropTypes.disallow(["size"])]),hidden:u.PropTypes.bool,height:u.PropTypes.oneOfType([u.PropTypes.string,u.PropTypes.number]),href:u.PropTypes.string,inline:u.PropTypes.bool,label:c.customPropTypes.itemShorthand,shape:u.PropTypes.oneOf(o._meta.props.shape),size:u.PropTypes.oneOf(o._meta.props.size),spaced:u.PropTypes.oneOfType([u.PropTypes.bool,u.PropTypes.oneOf(o._meta.props.spaced)]),src:u.PropTypes.string,ui:u.PropTypes.bool,width:u.PropTypes.oneOfType([u.PropTypes.string,u.PropTypes.number]),wrapped:c.customPropTypes.every([u.PropTypes.bool,c.customPropTypes.disallow(["href"])])},o.defaultProps={as:"img",ui:!0},o.create=(0,c.createShorthandFactory)(o,function(e){return{src:e}}),t["default"]=o},/*!******************************************!*\ !*** ./src/elements/Image/ImageGroup.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.size,s=(0,i["default"])("ui",n,r,"images"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return l["default"].createElement(p,a({},u,{className:s}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ImageGroup",parent:"Image",type:c.META.TYPES.ELEMENT,props:{size:c.SUI.SIZES}},o.propTypes={as:c.customPropTypes.as,children:s.PropTypes.node,className:s.PropTypes.string,size:s.PropTypes.oneOf(o._meta.props.size)},t["default"]=o},/*!*******************************************!*\ !*** ./src/elements/Label/LabelDetail.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=(0,l["default"])("detail",r),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"LabelDetail",parent:"Label",type:c.META.TYPES.ELEMENT},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand},t["default"]=o},/*!******************************************!*\ !*** ./src/elements/Label/LabelGroup.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.circular,n=e.className,s=e.color,u=e.size,p=e.tag,d=(0,l["default"])("ui",s,u,(0,c.useKeyOnly)(r,"circular"),(0,c.useKeyOnly)(p,"tag"),"labels",n),f=(0,c.getUnhandledProps)(o,e),y=(0,c.getElementType)(o,e);return i["default"].createElement(y,a({},f,{className:d}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"LabelGroup",parent:"Label",type:c.META.TYPES.ELEMENT,props:{color:c.SUI.COLORS,size:c.SUI.SIZES}},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,circular:u.PropTypes.bool,className:u.PropTypes.string,color:u.PropTypes.oneOf(o._meta.props.color),size:u.PropTypes.oneOf(o._meta.props.size),tag:u.PropTypes.bool},t["default"]=o},/*!***************************************!*\ !*** ./src/elements/List/ListItem.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,a=e.content,u=e.description,f=e.disabled,m=e.header,h=e.icon,b=e.image,T=e.value,_=(0,d.getElementType)(o,e),E=(0,i["default"])((0,d.useKeyOnly)(t,"active"),(0,d.useKeyOnly)(f,"disabled"),(0,d.useKeyOnly)("li"!==_,"item"),n),j=(0,d.getUnhandledProps)(o,e),w="li"===_?{value:T}:{"data-value":T};if(r)return p["default"].createElement(_,l({},j,{className:E},w),r);var M=O["default"].create(h),S=y["default"].create(b);if(!(0,c.isValidElement)(a)&&(0,s["default"])(a))return p["default"].createElement(_,l({},j,{className:E},w),M||S,v["default"].create(a,{header:m,description:u}));var x=P["default"].create(m),A=g["default"].create(u);return M||S?p["default"].createElement(_,l({},j,{className:E},w),M||S,(a||x||A)&&p["default"].createElement(v["default"],null,x,A,a)):p["default"].createElement(_,l({},j,{className:E},w),x,A,a)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/isPlainObject */126),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2),f=r(/*! ../../elements/Image */28),y=n(f),m=r(/*! ./ListContent */78),v=n(m),h=r(/*! ./ListDescription */44),g=n(h),b=r(/*! ./ListHeader */45),P=n(b),T=r(/*! ./ListIcon */79),O=n(T);o._meta={name:"ListItem",parent:"List",type:d.META.TYPES.ELEMENT},o.propTypes={as:d.customPropTypes.as,active:c.PropTypes.bool,children:c.PropTypes.node,className:c.PropTypes.string,content:d.customPropTypes.itemShorthand,description:d.customPropTypes.itemShorthand,disabled:c.PropTypes.bool,header:d.customPropTypes.itemShorthand,icon:d.customPropTypes.every([d.customPropTypes.disallow(["image"]),d.customPropTypes.itemShorthand]),image:d.customPropTypes.every([d.customPropTypes.disallow(["icon"]),d.customPropTypes.itemShorthand]),value:c.PropTypes.string},o.create=(0,d.createShorthandFactory)(o,function(e){return{content:e}}),t["default"]=o},/*!***************************************!*\ !*** ./src/elements/List/ListList.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,c.getUnhandledProps)(o,e),s=(0,c.getElementType)(o,e),u=(0,l["default"])((0,c.useKeyOnly)("ul"!==s&&"ol"!==s,"list"),r);return i["default"].createElement(s,a({},n,{className:u}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ListList",parent:"List",type:c.META.TYPES.ELEMENT},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string},t["default"]=o},/*!**********************************************!*\ !*** ./src/elements/Segment/SegmentGroup.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.compact,a=e.horizontal,s=e.piled,u=e.raised,c=e.size,f=e.stacked,y=(0,i["default"])("ui",c,(0,d.useKeyOnly)(a,"horizontal"),(0,d.useKeyOnly)(n,"compact"),(0,d.useKeyOnly)(s,"piled"),(0,d.useKeyOnly)(u,"raised"),(0,d.useKeyOnly)(f,"stacked"),r,"segments"),m=(0,d.getUnhandledProps)(o,e),v=(0,d.getElementType)(o,e);return p["default"].createElement(v,l({},m,{className:y}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */6),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2);o._meta={name:"SegmentGroup",parent:"Segment",type:d.META.TYPES.ELEMENT,props:{size:(0,s["default"])(d.SUI.SIZES,"medium")}},o.propTypes={as:d.customPropTypes.as,className:c.PropTypes.string,children:c.PropTypes.node,compact:c.PropTypes.bool,horizontal:c.PropTypes.bool,piled:c.PropTypes.bool,raised:c.PropTypes.bool,size:c.PropTypes.oneOf(o._meta.props.size),stacked:c.PropTypes.bool},t["default"]=o},/*!***********************************!*\ !*** ./src/elements/Step/Step.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(/*! classnames */3),c=n(i),p=r(/*! react */1),d=n(p),f=r(/*! ../../lib */2),y=r(/*! ../../elements/Icon */10),m=n(y),v=r(/*! ./StepContent */167),h=n(v),g=r(/*! ./StepDescription */80),b=n(g),P=r(/*! ./StepGroup */168),T=n(P),O=r(/*! ./StepTitle */81),_=n(O),E=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.handleClick=function(e){var t=n.props.onClick;t&&t(e)},s=r,a(n,s)}return s(t,e),u(t,[{key:"render",value:function(){var e=this.props,r=e.active,n=e.children,o=e.className,a=e.completed,s=e.description,u=e.disabled,i=e.href,p=e.icon,y=e.link,v=e.onClick,g=e.title,b=(0,c["default"])((0,f.useKeyOnly)(r,"active"),(0,f.useKeyOnly)(a,"completed"),(0,f.useKeyOnly)(u,"disabled"),(0,f.useKeyOnly)(y,"link"),"step",o),P=(0,f.getUnhandledProps)(t,this.props),T=(0,f.getElementType)(t,this.props,function(){if(v)return"a"});return n?d["default"].createElement(T,l({},P,{className:b,href:i,onClick:this.handleClick}),n):d["default"].createElement(T,l({},P,{className:b,href:i,onClick:this.handleClick}),m["default"].create(p),d["default"].createElement(h["default"],{description:s,title:g}))}}]),t}(p.Component);E.propTypes={as:f.customPropTypes.as,active:p.PropTypes.bool,className:p.PropTypes.string,children:p.PropTypes.node,completed:p.PropTypes.bool,description:f.customPropTypes.itemShorthand,disabled:p.PropTypes.bool,icon:f.customPropTypes.itemShorthand,link:p.PropTypes.bool,href:p.PropTypes.string,onClick:p.PropTypes.func,ordered:p.PropTypes.bool,title:f.customPropTypes.itemShorthand},E._meta={name:"Step",type:f.META.TYPES.ELEMENT},E.Content=h["default"],E.Description=b["default"],E.Group=T["default"],E.Title=_["default"],t["default"]=E},/*!******************************************!*\ !*** ./src/elements/Step/StepContent.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.description,s=e.title,u=(0,i["default"])(r,"content"),p=(0,c.getUnhandledProps)(o,e),f=(0,c.getElementType)(o,e);return t?l["default"].createElement(f,a({},p,{className:u}),t):l["default"].createElement(f,a({},p,{className:u}),(0,c.createShorthand)(y["default"],function(e){return{title:e}},s),(0,c.createShorthand)(d["default"],function(e){return{description:e}},n))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ./StepDescription */80),d=n(p),f=r(/*! ./StepTitle */81),y=n(f);o._meta={name:"StepContent",parent:"Step",type:c.META.TYPES.ELEMENT},o.propTypes={as:c.customPropTypes.as,className:s.PropTypes.string,children:s.PropTypes.node,description:c.customPropTypes.itemShorthand,title:c.customPropTypes.itemShorthand},t["default"]=o},/*!****************************************!*\ !*** ./src/elements/Step/StepGroup.js ***! \****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.fluid,a=e.items,s=e.ordered,l=e.size,c=e.stackable,d=e.vertical,m=(0,p["default"])("ui",(0,y.useKeyOnly)(n,"fluid"),(0,y.useKeyOnly)(s,"ordered"),(0,y.useValueAndKey)(c,"stackable"),(0,y.useKeyOnly)(d,"vertical"),l,r,"steps"),h=(0,y.getUnhandledProps)(o,e),g=(0,y.getElementType)(o,e);if(t)return f["default"].createElement(g,i({},h,{className:m}),t);var b=(0,u["default"])(a,function(e){var t=e.key||[e.title,e.description].join("-");return f["default"].createElement(v["default"],i({key:t},e))});return f["default"].createElement(g,i({},h,{className:m}),b)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */6),s=n(a),l=r(/*! lodash/map */9),u=n(l),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=r(/*! classnames */3),p=n(c),d=r(/*! react */1),f=n(d),y=r(/*! ../../lib */2),m=r(/*! ./Step */166),v=n(m);o._meta={name:"StepGroup",parent:"Step",props:{sizes:(0,s["default"])(y.SUI.SIZES,"medium"),stackable:["tablet"]},type:y.META.TYPES.ELEMENT},o.propTypes={as:y.customPropTypes.as,className:d.PropTypes.string,children:d.PropTypes.node,fluid:d.PropTypes.bool,items:y.customPropTypes.collectionShorthand,ordered:d.PropTypes.bool,size:d.PropTypes.oneOf(o._meta.props.sizes),stackable:d.PropTypes.oneOf(o._meta.props.stackable),vertical:d.PropTypes.bool},t["default"]=o},/*!***************************************************!*\ !*** ./src/modules/Accordion/AccordionContent.js ***! \***************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,s=(0,i["default"])("content",(0,c.useKeyOnly)(t,"active"),n),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return l["default"].createElement(p,a({},u,{className:s}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2);o.displayName="AccordionContent",o.propTypes={as:c.customPropTypes.as,active:s.PropTypes.bool,children:s.PropTypes.node,className:s.PropTypes.string},o._meta={name:"AccordionContent",type:c.META.TYPES.MODULE,parent:"Accordion"},t["default"]=o},/*!*************************************************!*\ !*** ./src/modules/Accordion/AccordionTitle.js ***! \*************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(/*! classnames */3),c=n(i),p=r(/*! react */1),d=n(p),f=r(/*! ../../lib */2),y=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.handleClick=function(e){var t=n.props.onClick;t&&t(e)},s=r,a(n,s)}return s(t,e),u(t,[{key:"render",value:function(){var e=this.props,r=e.active,n=e.children,o=e.className,a=(0,c["default"])((0,f.useKeyOnly)(r,"active"),"title",o),s=(0,f.getUnhandledProps)(t,this.props),u=(0,f.getElementType)(t,this.props);return d["default"].createElement(u,l({},s,{className:a,onClick:this.handleClick}),n)}}]),t}(p.Component);y.displayName="AccordionTitle",y.propTypes={as:f.customPropTypes.as,active:p.PropTypes.bool,children:p.PropTypes.node,className:p.PropTypes.string,onClick:p.PropTypes.func},y._meta={name:"AccordionTitle",type:f.META.TYPES.MODULE,parent:"Accordion"},t["default"]=y},/*!*************************************************!*\ !*** ./src/modules/Dropdown/DropdownDivider.js ***! \*************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=(0,l["default"])("divider",t),n=(0,c.getUnhandledProps)(o,e),s=(0,c.getElementType)(o,e);return i["default"].createElement(s,a({},n,{className:r}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"DropdownDivider",parent:"Dropdown",type:c.META.TYPES.MODULE},o.propTypes={as:c.customPropTypes.as,className:u.PropTypes.string},t["default"]=o},/*!************************************************!*\ !*** ./src/modules/Dropdown/DropdownHeader.js ***! \************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.icon,u=(0,l["default"])("header",r),p=(0,c.getUnhandledProps)(o,e),f=(0,c.getElementType)(o,e);return t?i["default"].createElement(f,a({},p,{className:u}),t):i["default"].createElement(f,a({},p,{className:u}),d["default"].create(s),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ../../elements/Icon */10),d=n(p);o._meta={name:"DropdownHeader",parent:"Dropdown",type:c.META.TYPES.MODULE},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand,icon:c.customPropTypes.itemShorthand},t["default"]=o},/*!**********************************************!*\ !*** ./src/modules/Dropdown/DropdownItem.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(/*! classnames */3),c=n(i),p=r(/*! react */1),d=n(p),f=r(/*! ../../lib */2),y=r(/*! ../../elements/Icon */10),m=n(y),v=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.handleClick=function(e){var t=n.props,r=t.onClick,o=t.value;r&&r(e,o)},s=r,a(n,s)}return s(t,e),u(t,[{key:"render",value:function(){var e=this.props,r=e.active,n=e.children,o=e.className,a=e.disabled,s=e.description,u=e.icon,i=e.selected,p=e.text,y=(0,c["default"])((0,f.useKeyOnly)(r,"active"),(0,f.useKeyOnly)(a,"disabled"),(0,f.useKeyOnly)(i,"selected"),"item",o),v=u||f.childrenUtils.someByType(n,"DropdownMenu")&&"dropdown",h=(0,f.getUnhandledProps)(t,this.props),g=(0,f.getElementType)(t,this.props);return d["default"].createElement(g,l({},h,{className:y,onClick:this.handleClick}),(0,f.createShorthand)("span",function(e){return{className:"description",children:e}},s),m["default"].create(v),n||p)}}]),t}(p.Component);v.propTypes={as:f.customPropTypes.as,active:p.PropTypes.bool,children:p.PropTypes.node,className:p.PropTypes.string,description:f.customPropTypes.itemShorthand,disabled:p.PropTypes.bool,icon:p.PropTypes.string,selected:p.PropTypes.bool,text:f.customPropTypes.contentShorthand,value:p.PropTypes.oneOfType([p.PropTypes.number,p.PropTypes.string]),onClick:p.PropTypes.func},v._meta={name:"DropdownItem",parent:"Dropdown",type:f.META.TYPES.MODULE},t["default"]=v},/*!**********************************************!*\ !*** ./src/modules/Dropdown/DropdownMenu.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,i["default"])("menu transition",r),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return l["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"DropdownMenu",parent:"Dropdown",type:c.META.TYPES.MODULE},o.propTypes={as:c.customPropTypes.as,children:s.PropTypes.node,className:s.PropTypes.string},t["default"]=o},/*!*******************************************!*\ !*** ./src/modules/Modal/ModalActions.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,i["default"])(r,"actions"),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return l["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ModalActions",type:c.META.TYPES.MODULE,parent:"Modal"},o.propTypes={as:c.customPropTypes.as,children:s.PropTypes.node,className:s.PropTypes.string},t["default"]=o},/*!*******************************************!*\ !*** ./src/modules/Modal/ModalContent.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.image,n=e.className,s=(0,i["default"])(n,(0,c.useKeyOnly)(r,"image"),"content"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return l["default"].createElement(p,a({},u,{className:s}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ModalContent",type:c.META.TYPES.MODULE,parent:"Modal"},o.propTypes={as:c.customPropTypes.as,children:s.PropTypes.node,className:s.PropTypes.string,image:s.PropTypes.bool},t["default"]=o},/*!***********************************************!*\ !*** ./src/modules/Modal/ModalDescription.js ***! \***********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,i["default"])(r,"description"),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return l["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ModalDescription",type:c.META.TYPES.MODULE,parent:"Modal"},o.propTypes={as:c.customPropTypes.as,children:s.PropTypes.node,className:s.PropTypes.string},t["default"]=o},/*!******************************************!*\ !*** ./src/modules/Modal/ModalHeader.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,i["default"])(r,"header"),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return l["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"ModalHeader",type:c.META.TYPES.MODULE,parent:"Modal"},o.propTypes={as:c.customPropTypes.as,children:s.PropTypes.node,className:s.PropTypes.string},t["default"]=o},/*!************************************!*\ !*** ./src/modules/Modal/index.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Modal */312),a=n(o);t["default"]=a["default"]},/*!*******************************************!*\ !*** ./src/modules/Popup/PopupContent.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,i["default"])("content",r),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return l["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t["default"]=o;var s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2);o.create=(0,c.createShorthandFactory)(o,function(e){return{children:e}}),o.propTypes={children:s.PropTypes.node,className:s.PropTypes.string},o._meta={name:"PopupContent",type:c.META.TYPES.MODULE,parent:"Popup"}},/*!******************************************!*\ !*** ./src/modules/Popup/PopupHeader.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,i["default"])("header",r),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return l["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t["default"]=o;var s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2);o.create=(0,c.createShorthandFactory)(o,function(e){return{children:e}}),o.propTypes={children:s.PropTypes.node,className:s.PropTypes.string},o._meta={name:"PopupHeader",type:c.META.TYPES.MODULE,parent:"Popup"}},/*!**********************************************!*\ !*** ./src/modules/Search/SearchCategory.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,s=e.renderer,u=(0,i["default"])((0,c.useKeyOnly)(t,"active"),"category",n),d=(0,c.getUnhandledProps)(o,e),f=(0,c.getElementType)(o,e);return l["default"].createElement(f,a({},d,{className:u}),l["default"].createElement("div",{className:"name"},s?s(e):p(e)),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2),p=function(e){var t=e.name;return t};o._meta={name:"SearchCategory",parent:"Search",type:c.META.TYPES.MODULE},o.propTypes={as:c.customPropTypes.as,active:s.PropTypes.bool,children:s.PropTypes.node,className:s.PropTypes.string,name:s.PropTypes.string,renderer:s.PropTypes.func,results:s.PropTypes.array},t["default"]=o},/*!********************************************!*\ !*** ./src/modules/Search/SearchResult.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(/*! react */1),c=n(i),p=r(/*! classnames */3),d=n(p),f=r(/*! ../../lib */2),y=function(e){var t=e.image,r=e.price,n=e.title,o=e.description;return[t&&c["default"].createElement("div",{key:"image",className:"image"},(0,f.createHTMLImage)(t)),c["default"].createElement("div",{key:"content",className:"content"},r&&c["default"].createElement("div",{className:"price"},r),n&&c["default"].createElement("div",{className:"title"},n),o&&c["default"].createElement("div",{className:"description"},o))]},m=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.handleClick=function(e){var t=n.props,r=t.id,o=t.onClick;o&&o(e,r)},s=r,a(n,s)}return s(t,e),u(t,[{key:"render",value:function(){var e=this.props,r=e.active,n=e.className,o=e.renderer,a=(0,d["default"])((0,f.useKeyOnly)(r,"active"),"result",n),s=(0,f.getUnhandledProps)(t,this.props),u=(0,f.getElementType)(t,this.props);return c["default"].createElement(u,l({},s,{className:a,onClick:this.handleClick}),o?o(this.props):y(this.props))}}]),t}(i.Component);m.propTypes={as:f.customPropTypes.as,active:i.PropTypes.bool,className:i.PropTypes.string,description:i.PropTypes.string,id:i.PropTypes.number,image:i.PropTypes.string,onClick:i.PropTypes.func,price:i.PropTypes.string,renderer:i.PropTypes.func,title:i.PropTypes.string},m._meta={name:"SearchResult",parent:"Search",type:f.META.TYPES.MODULE},t["default"]=m},/*!*********************************************!*\ !*** ./src/modules/Search/SearchResults.js ***! \*********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=(0,i["default"])("results transition",r),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return l["default"].createElement(u,a({},s,{className:n}),t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! classnames */3),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"SearchResults",parent:"Search",type:c.META.TYPES.MODULE},o.propTypes={as:c.customPropTypes.as,children:s.PropTypes.node,className:s.PropTypes.string},t["default"]=o},/*!********************************!*\ !*** ./src/views/Card/Card.js ***! \********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(/*! classnames */3),c=n(i),p=r(/*! react */1),d=n(p),f=r(/*! ../../lib */2),y=r(/*! ../../elements/Image */28),m=n(y),v=r(/*! ./CardContent */186),h=n(v),g=r(/*! ./CardDescription */84),b=n(g),P=r(/*! ./CardGroup */187),T=n(P),O=r(/*! ./CardHeader */85),_=n(O),E=r(/*! ./CardMeta */86),j=n(E),w={name:"Card",type:f.META.TYPES.VIEW,props:{color:f.SUI.COLORS}},M=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.handleClick=function(e){var t=n.props.onClick;t&&t(e)},s=r,a(n,s)}return s(t,e),u(t,[{key:"render",value:function(){var e=this.props,r=e.centered,n=e.children,o=e.className,a=e.color,s=e.description,u=e.extra,i=e.fluid,p=e.header,y=e.href,v=e.image,g=e.meta,b=e.onClick,P=e.raised,T=(0,c["default"])("ui",a,(0,f.useKeyOnly)(r,"centered"),(0,f.useKeyOnly)(i,"fluid"),(0,f.useKeyOnly)(P,"raised"),"card",o),O=(0,f.getUnhandledProps)(t,this.props),_=(0,f.getElementType)(t,this.props,function(){if(b)return"a"});return n?d["default"].createElement(_,l({},O,{className:T,href:y,onClick:this.handleClick}),n):d["default"].createElement(_,l({},O,{className:T,href:y,onClick:this.handleClick}),m["default"].create(v),(s||p||g)&&d["default"].createElement(h["default"],{description:s,header:p,meta:g}),u&&d["default"].createElement(h["default"],{extra:!0},u))}}]),t}(p.Component);M.propTypes={as:f.customPropTypes.as,centered:p.PropTypes.bool,children:p.PropTypes.node,className:p.PropTypes.string,color:p.PropTypes.oneOf(w.props.color),description:f.customPropTypes.itemShorthand,extra:f.customPropTypes.contentShorthand,fluid:p.PropTypes.bool,header:f.customPropTypes.itemShorthand,href:p.PropTypes.string,image:f.customPropTypes.itemShorthand,meta:f.customPropTypes.itemShorthand,onClick:p.PropTypes.func,raised:p.PropTypes.bool},M._meta=w,M.Content=h["default"],M.Description=b["default"],M.Group=T["default"],M.Header=_["default"],M.Meta=j["default"],t["default"]=M},/*!***************************************!*\ !*** ./src/views/Card/CardContent.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.description,s=e.extra,u=e.header,p=e.meta,f=(0,l["default"])(r,(0,c.useKeyOnly)(s,"extra"),"content"),m=(0,c.getUnhandledProps)(o,e),h=(0,c.getElementType)(o,e);return t?i["default"].createElement(h,a({},m,{className:f}),t):i["default"].createElement(h,a({},m,{className:f}),(0,c.createShorthand)(y["default"],function(e){return{content:e}},u),(0,c.createShorthand)(v["default"],function(e){return{content:e}},p),(0,c.createShorthand)(d["default"],function(e){return{content:e}},n))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ./CardDescription */84),d=n(p),f=r(/*! ./CardHeader */85),y=n(f),m=r(/*! ./CardMeta */86),v=n(m);o._meta={name:"CardContent",parent:"Card",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,description:c.customPropTypes.itemShorthand,extra:u.PropTypes.bool,header:c.customPropTypes.itemShorthand,meta:c.customPropTypes.itemShorthand},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Card/CardGroup.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.doubling,a=e.items,u=e.itemsPerRow,c=e.stackable,f=(0,i["default"])("ui",(0,d.useWidthProp)(u),(0,d.useKeyOnly)(n,"doubling"),(0,d.useKeyOnly)(c,"stackable"),r,"cards"),m=(0,d.getUnhandledProps)(o,e),v=(0,d.getElementType)(o,e);if(t)return p["default"].createElement(v,l({},m,{className:f}),t);var h=(0,s["default"])(a,function(e){var t=e.key||[e.header,e.description].join("-");return p["default"].createElement(y["default"],l({key:t},e))});return p["default"].createElement(v,l({},m,{className:f}),h)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/map */9),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2),f=r(/*! ./Card */185),y=n(f);o._meta={name:"CardGroup",parent:"Card",props:{itemsPerRow:d.SUI.WIDTHS},type:d.META.TYPES.VIEW},o.propTypes={as:d.customPropTypes.as,children:c.PropTypes.node,className:c.PropTypes.string,doubling:c.PropTypes.bool,items:d.customPropTypes.collectionShorthand,itemsPerRow:c.PropTypes.oneOf(o._meta.props.itemsPerRow),stackable:c.PropTypes.bool},t["default"]=o},/*!********************************************!*\ !*** ./src/views/Comment/CommentAction.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.className,n=e.children,s=(0,l["default"])((0,c.useKeyOnly)(t,"active"),r),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"CommentAction",parent:"Comment",type:c.META.TYPES.VIEW},o.defaultProps={as:"a"},o.propTypes={as:c.customPropTypes.as,active:u.PropTypes.bool,children:u.PropTypes.node,className:u.PropTypes.string},t["default"]=o},/*!*********************************************!*\ !*** ./src/views/Comment/CommentActions.js ***! \*********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=(0,l["default"])("actions",t),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"CommentActions",parent:"Comment",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string},t["default"]=o},/*!********************************************!*\ !*** ./src/views/Comment/CommentAuthor.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=(0,l["default"])("author",t),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"CommentAuthor",parent:"Comment",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string},t["default"]=o},/*!********************************************!*\ !*** ./src/views/Comment/CommentAvatar.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.src,n=(0,l["default"])("avatar",t),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}),(0,c.createHTMLImage)(r))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"CommentAvatar",parent:"Comment",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,className:u.PropTypes.string,src:u.PropTypes.string},t["default"]=o},/*!*********************************************!*\ !*** ./src/views/Comment/CommentContent.js ***! \*********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=(0,l["default"])("content",t),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"CommentContent",parent:"Comment",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string},t["default"]=o},/*!*******************************************!*\ !*** ./src/views/Comment/CommentGroup.js ***! \*******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.collapsed,s=e.minimal,u=e.threaded,p=(0,l["default"])("ui",(0,c.useKeyOnly)(n,"collapsed"),(0,c.useKeyOnly)(s,"minimal"),(0,c.useKeyOnly)(u,"threaded"),"comments",t),d=(0,c.getUnhandledProps)(o,e),f=(0,c.getElementType)(o,e);return i["default"].createElement(f,a({},d,{className:p}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"CommentGroup",parent:"Comment",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,collapsed:u.PropTypes.bool,minimal:u.PropTypes.bool,threaded:u.PropTypes.bool},t["default"]=o},/*!**********************************************!*\ !*** ./src/views/Comment/CommentMetadata.js ***! \**********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=(0,l["default"])("metadata",t),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"CommentMetadata",parent:"Comment",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string},t["default"]=o},/*!******************************************!*\ !*** ./src/views/Comment/CommentText.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=(0,l["default"])("text",t),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"CommentText",parent:"Comment",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Feed/FeedEvent.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.content,r=e.children,n=e.className,s=e.date,u=e.extraImages,p=e.extraText,f=e.image,m=e.icon,v=e.meta,h=e.summary,g=(0,l["default"])(n,"event"),b=(0,c.getUnhandledProps)(o,e),P=(0,c.getElementType)(o,e),T=t||s||u||p||v||h,O={content:t,date:s,extraImages:u,extraText:p,meta:v,summary:h};return i["default"].createElement(P,a({},b,{className:g}),(0,c.createShorthand)(y["default"],function(e){return{icon:e}},m),(0,c.createShorthand)(y["default"],function(e){return{image:e}},f),T&&i["default"].createElement(d["default"],O),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ./FeedContent */87),d=n(p),f=r(/*! ./FeedLabel */89),y=n(f);o._meta={name:"FeedEvent",parent:"Feed",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:d["default"].propTypes.content,date:d["default"].propTypes.date,extraImages:d["default"].propTypes.extraImages,extraText:d["default"].propTypes.extraText,icon:c.customPropTypes.itemShorthand,image:c.customPropTypes.itemShorthand,meta:d["default"].propTypes.meta,summary:d["default"].propTypes.summary},t["default"]=o},/*!********************************!*\ !*** ./src/views/Item/Item.js ***! \********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.description,u=e.extra,p=e.header,f=e.image,y=e.meta,m=(0,l["default"])(r,"item"),v=(0,c.getUnhandledProps)(o,e),h=(0,c.getElementType)(o,e);return t?i["default"].createElement(h,a({},v,{className:m}),t):i["default"].createElement(h,a({},v,{className:m}),(0,c.createShorthand)(O["default"],function(e){return{src:e}},f),i["default"].createElement(d["default"],{content:n,description:s,extra:u,header:p,meta:y}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ./ItemContent */198),d=n(p),f=r(/*! ./ItemDescription */94),y=n(f),m=r(/*! ./ItemExtra */95),v=n(m),h=r(/*! ./ItemGroup */199),g=n(h),b=r(/*! ./ItemHeader */96),P=n(b),T=r(/*! ./ItemImage */200),O=n(T),_=r(/*! ./ItemMeta */97),E=n(_);o._meta={name:"Item",type:c.META.TYPES.VIEW},o.Content=d["default"],o.Description=y["default"],o.Extra=v["default"],o.Group=g["default"],o.Header=P["default"],o.Image=O["default"],o.Meta=E["default"],o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand,description:c.customPropTypes.itemShorthand,extra:c.customPropTypes.itemShorthand,image:c.customPropTypes.itemShorthand,header:c.customPropTypes.itemShorthand,meta:c.customPropTypes.itemShorthand},t["default"]=o},/*!***************************************!*\ !*** ./src/views/Item/ItemContent.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,s=e.description,u=e.extra,p=e.header,f=e.meta,m=e.verticalAlign,h=(0,l["default"])(r,(0,c.useVerticalAlignProp)(m),"content"),b=(0,c.getUnhandledProps)(o,e),P=(0,c.getElementType)(o,e);return t?i["default"].createElement(P,a({},b,{className:h}),t):i["default"].createElement(P,a({},b,{className:h}),(0,c.createShorthand)(d["default"],function(e){return{content:e}},p),(0,c.createShorthand)(g["default"],function(e){return{content:e}},f),(0,c.createShorthand)(y["default"],function(e){return{content:e}},s),(0,c.createShorthand)(v["default"],function(e){return{content:e}},u),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ./ItemHeader */96),d=n(p),f=r(/*! ./ItemDescription */94),y=n(f),m=r(/*! ./ItemExtra */95),v=n(m),h=r(/*! ./ItemMeta */97),g=n(h);o._meta={name:"ItemContent",parent:"Item",type:c.META.TYPES.VIEW,props:{verticalAlign:c.SUI.VERTICAL_ALIGNMENTS}},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand,description:c.customPropTypes.itemShorthand,extra:c.customPropTypes.itemShorthand,header:c.customPropTypes.itemShorthand,meta:c.customPropTypes.itemShorthand,verticalAlign:u.PropTypes.oneOf(o._meta.props.verticalAlign)},t["default"]=o},/*!*************************************!*\ !*** ./src/views/Item/ItemGroup.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e){var t=e.children,r=e.className,n=e.divided,s=e.items,i=e.link,p=e.relaxed,y=(0,c["default"])("ui",r,(0,f.useKeyOnly)(n,"divided"),(0,f.useKeyOnly)(i,"link"),(0,f.useKeyOrValueAndKey)(p,"relaxed"),"items"),v=(0,f.getUnhandledProps)(a,e),h=(0,f.getElementType)(a,e);if(t)return d["default"].createElement(h,u({},v,{className:y}),t);var g=(0,l["default"])(s,function(e){var t=e.childKey,r=o(e,["childKey"]),n=t||[r.content,r.description,r.header,r.meta].join("-");return d["default"].createElement(m["default"],u({},r,{key:n}))});return d["default"].createElement(h,u({},v,{className:y}),g)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(/*! lodash/map */9),l=n(s),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(/*! classnames */3),c=n(i),p=r(/*! react */1),d=n(p),f=r(/*! ../../lib */2),y=r(/*! ./Item */197),m=n(y);a._meta={name:"ItemGroup",type:f.META.TYPES.VIEW,parent:"Item",props:{relaxed:["very"]}},a.propTypes={as:f.customPropTypes.as,children:p.PropTypes.node,className:p.PropTypes.string,divided:p.PropTypes.bool,items:f.customPropTypes.collectionShorthand,link:p.PropTypes.bool,relaxed:p.PropTypes.oneOfType([p.PropTypes.bool,p.PropTypes.oneOf(a._meta.props.relaxed)])},t["default"]=a},/*!*************************************!*\ !*** ./src/views/Item/ItemImage.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return l["default"].createElement(c["default"],a({},e,{ui:!1,wrapped:!0}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! ../../lib */2),i=r(/*! ../../elements/Image */28),c=n(i);o._meta={name:"ItemImage",parent:"Item",type:u.META.TYPES.VIEW},t["default"]=o},/*!******************************************!*\ !*** ./src/views/Statistic/Statistic.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.color,a=e.floated,s=e.horizontal,u=e.inverted,c=e.label,f=e.size,y=e.text,m=e.value,h=(0,i["default"])("ui",n,(0,d.useValueAndKey)(a,"floated"),(0,d.useKeyOnly)(s,"horizontal"),(0,d.useKeyOnly)(u,"inverted"),f,r,"statistic"),b=(0,d.getUnhandledProps)(o,e),P=(0,d.getElementType)(o,e);return t?p["default"].createElement(P,l({},b,{className:h}),t):p["default"].createElement(P,l({},b,{className:h}),p["default"].createElement(g["default"],{text:y,value:m}),p["default"].createElement(v["default"],{label:c}))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */6),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2),f=r(/*! ./StatisticGroup */202),y=n(f),m=r(/*! ./StatisticLabel */203),v=n(m),h=r(/*! ./StatisticValue */204),g=n(h);o._meta={name:"Statistic",type:d.META.TYPES.VIEW,props:{color:d.SUI.COLORS,floated:d.SUI.FLOATS,size:(0,s["default"])(d.SUI.SIZES,"big","massive","medium")}},o.propTypes={as:d.customPropTypes.as,children:c.PropTypes.node,className:c.PropTypes.string,color:c.PropTypes.oneOf(o._meta.props.color),floated:c.PropTypes.oneOf(o._meta.props.floated),horizontal:c.PropTypes.bool,inverted:c.PropTypes.bool,label:d.customPropTypes.contentShorthand,size:c.PropTypes.oneOf(o._meta.props.size),text:c.PropTypes.bool,value:d.customPropTypes.contentShorthand},o.Group=y["default"],o.Label=v["default"],o.Value=g["default"],t["default"]=o},/*!***********************************************!*\ !*** ./src/views/Statistic/StatisticGroup.js ***! \***********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.horizontal,a=e.items,u=e.widths,c=(0,i["default"])("ui",(0,d.useKeyOnly)(n,"horizontal"),(0,d.useWidthProp)(u),"statistics",r),f=(0,d.getUnhandledProps)(o,e),m=(0,d.getElementType)(o,e);if(t)return p["default"].createElement(m,l({},f,{className:c}),t);var v=(0,s["default"])(a,function(e){return p["default"].createElement(y["default"],l({key:e.childKey||[e.label,e.title].join("-")},e))});return p["default"].createElement(m,l({},f,{className:c}),v)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/map */9),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2),f=r(/*! ./Statistic */201),y=n(f);o._meta={name:"StatisticGroup",type:d.META.TYPES.VIEW,parent:"Statistic",props:{widths:d.SUI.WIDTHS}},o.propTypes={as:d.customPropTypes.as,children:c.PropTypes.node,className:c.PropTypes.string,horizontal:c.PropTypes.bool,items:d.customPropTypes.collectionShorthand,widths:c.PropTypes.oneOf(o._meta.props.widths)},t["default"]=o},/*!***********************************************!*\ !*** ./src/views/Statistic/StatisticLabel.js ***! \***********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.label,s=(0,l["default"])(r,"label"),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),t||n)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"StatisticLabel",parent:"Statistic",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,label:c.customPropTypes.contentShorthand},t["default"]=o},/*!***********************************************!*\ !*** ./src/views/Statistic/StatisticValue.js ***! \***********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.text,s=e.value,u=(0,l["default"])((0,c.useKeyOnly)(n,"text"),r,"value"),p=(0,c.getUnhandledProps)(o,e),d=(0,c.getElementType)(o,e);return i["default"].createElement(d,a({},p,{className:u}),t||s)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"StatisticValue",parent:"Statistic",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,text:u.PropTypes.bool,value:c.customPropTypes.contentShorthand},t["default"]=o},/*!**************************!*\ !*** ./~/lodash/_Set.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_getNative */21),o=r(/*! ./_root */11),a=n(o,"Set");e.exports=a},/*!*********************************!*\ !*** ./~/lodash/_Uint8Array.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./_root */11),o=n.Uint8Array;e.exports=o},/*!******************************!*\ !*** ./~/lodash/_WeakMap.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_getNative */21),o=r(/*! ./_root */11),a=n(o,"WeakMap");e.exports=a},/*!************************************!*\ !*** ./~/lodash/_arrayLikeKeys.js ***! \************************************/ function(e,t,r){function n(e,t){var r=s(e)||a(e)?o(e.length,String):[],n=r.length,u=!!n;for(var c in e)!t&&!i.call(e,c)||u&&("length"==c||l(c,n))||r.push(c);return r}var o=r(/*! ./_baseTimes */219),a=r(/*! ./isArguments */66),s=r(/*! ./isArray */4),l=r(/*! ./_isIndex */61),u=Object.prototype,i=u.hasOwnProperty;e.exports=n},/*!********************************!*\ !*** ./~/lodash/_arraySome.js ***! \********************************/ function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_baseAssign.js ***! \*********************************/ function(e,t,r){function n(e,t){return e&&o(t,a(t),e)}var o=r(/*! ./_copyObject */115),a=r(/*! ./keys */8);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_baseClamp.js ***! \********************************/ function(e,t){function r(e,t,r){return e===e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e}e.exports=r},/*!********************************!*\ !*** ./~/lodash/_baseClone.js ***! \********************************/ function(e,t,r){function n(e,t,r,O,_,E,j){var S;if(O&&(S=E?O(e,_,E,j):O(e)),void 0!==S)return S;if(!b(e))return e;var x=v(e);if(x){if(S=f(e),!t)return i(e,S)}else{var N=d(e),k=N==w||N==M;if(h(e))return u(e,t);if(N==A||N==T||k&&!E){if(g(e))return E?e:{};if(S=m(k?{}:e),!t)return c(e,l(S,e))}else{if(!H[N])return E?e:{};S=y(e,N,n,t)}}j||(j=new o);var C=j.get(e);if(C)return C;if(j.set(e,S),!x)var I=r?p(e):P(e);return a(I||e,function(o,a){I&&(a=o,o=e[a]),s(S,a,n(o,t,r,O,a,e,j))}),S}var o=r(/*! ./_Stack */102),a=r(/*! ./_arrayEach */30),s=r(/*! ./_assignValue */104),l=r(/*! ./_baseAssign */210),u=r(/*! ./_cloneBuffer */366),i=r(/*! ./_copyArray */55),c=r(/*! ./_copySymbols */373),p=r(/*! ./_getAllKeys */392),d=r(/*! ./_getTag */118),f=r(/*! ./_initCloneArray */404),y=r(/*! ./_initCloneByTag */405),m=r(/*! ./_initCloneObject */406),v=r(/*! ./isArray */4),h=r(/*! ./isBuffer */247),g=r(/*! ./_isHostObject */60),b=r(/*! ./isObject */13),P=r(/*! ./keys */8),T="[object Arguments]",O="[object Array]",_="[object Boolean]",E="[object Date]",j="[object Error]",w="[object Function]",M="[object GeneratorFunction]",S="[object Map]",x="[object Number]",A="[object Object]",N="[object RegExp]",k="[object Set]",C="[object String]",I="[object Symbol]",K="[object WeakMap]",L="[object ArrayBuffer]",U="[object DataView]",D="[object Float32Array]",R="[object Float64Array]",z="[object Int8Array]",W="[object Int16Array]",F="[object Int32Array]",V="[object Uint8Array]",B="[object Uint8ClampedArray]",Y="[object Uint16Array]",q="[object Uint32Array]",H={};H[T]=H[O]=H[L]=H[U]=H[_]=H[E]=H[D]=H[R]=H[z]=H[W]=H[F]=H[S]=H[x]=H[A]=H[N]=H[k]=H[C]=H[I]=H[V]=H[B]=H[Y]=H[q]=!0,H[j]=H[w]=H[K]=!1,e.exports=n},/*!************************************!*\ !*** ./~/lodash/_baseFindIndex.js ***! \************************************/ function(e,t){function r(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1}e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_baseGetAllKeys.js ***! \*************************************/ function(e,t,r){function n(e,t,r){var n=t(e);return a(e)?n:o(n,r(e))}var o=r(/*! ./_arrayPush */52),a=r(/*! ./isArray */4);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_baseIndexOf.js ***! \**********************************/ function(e,t,r){function n(e,t,r){if(t!==t)return o(e,a,r);for(var n=r-1,s=e.length;++n<s;)if(e[n]===t)return n;return-1}var o=r(/*! ./_baseFindIndex */213),a=r(/*! ./_baseIsNaN */350);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_baseKeys.js ***! \*******************************/ function(e,t,r){function n(e){if(!o(e))return a(e);var t=[];for(var r in Object(e))l.call(e,r)&&"constructor"!=r&&t.push(r);return t}var o=r(/*! ./_isPrototype */34),a=r(/*! ./_nativeKeys */236),s=Object.prototype,l=s.hasOwnProperty;e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_basePick.js ***! \*******************************/ function(e,t,r){function n(e,t){return e=Object(e),o(e,t,function(t,r){return r in e})}var o=r(/*! ./_basePickBy */357);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_baseSetData.js ***! \**********************************/ function(e,t,r){var n=r(/*! ./identity */123),o=r(/*! ./_metaMap */235),a=o?function(e,t){return o.set(e,t),e}:n;e.exports=a},/*!********************************!*\ !*** ./~/lodash/_baseTimes.js ***! \********************************/ function(e,t){function r(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_baseToString.js ***! \***********************************/ function(e,t,r){function n(e){if("string"==typeof e)return e;if(a(e))return u?u.call(e):"";var t=e+"";return"0"==t&&1/e==-s?"-0":t}var o=r(/*! ./_Symbol */50),a=r(/*! ./isSymbol */39),s=1/0,l=o?o.prototype:void 0,u=l?l.toString:void 0;e.exports=n},/*!********************************!*\ !*** ./~/lodash/_castSlice.js ***! \********************************/ function(e,t,r){function n(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:o(e,t,r)}var o=r(/*! ./_baseSlice */110);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_composeArgs.js ***! \**********************************/ function(e,t){function r(e,t,r,o){for(var a=-1,s=e.length,l=r.length,u=-1,i=t.length,c=n(s-l,0),p=Array(i+c),d=!o;++u<i;)p[u]=t[u];for(;++a<l;)(d||a<s)&&(p[r[a]]=e[a]);for(;c--;)p[u++]=e[a++];return p}var n=Math.max;e.exports=r},/*!***************************************!*\ !*** ./~/lodash/_composeArgsRight.js ***! \***************************************/ function(e,t){function r(e,t,r,o){for(var a=-1,s=e.length,l=-1,u=r.length,i=-1,c=t.length,p=n(s-u,0),d=Array(p+c),f=!o;++a<p;)d[a]=e[a];for(var y=a;++i<c;)d[y+i]=t[i];for(;++l<u;)(f||a<s)&&(d[y+r[l]]=e[a++]);return d}var n=Math.max;e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_createHybrid.js ***! \***********************************/ function(e,t,r){function n(e,t,r,b,P,T,O,_,E,j){function w(){for(var f=arguments.length,y=Array(f),m=f;m--;)y[m]=arguments[m];if(A)var v=i(w),h=s(y,v);if(b&&(y=o(y,b,P,A)),T&&(y=a(y,T,O,A)),f-=h,A&&f<j){var g=p(y,v);return u(e,t,n,w.placeholder,r,y,g,_,E,j-f)}var C=S?r:this,I=x?C[e]:e;return f=y.length,_?y=c(y,_):N&&f>1&&y.reverse(),M&&E<f&&(y.length=E),this&&this!==d&&this instanceof w&&(I=k||l(I)),I.apply(C,y)}var M=t&h,S=t&f,x=t&y,A=t&(m|v),N=t&g,k=x?void 0:l(e);return w}var o=r(/*! ./_composeArgs */222),a=r(/*! ./_composeArgsRight */223),s=r(/*! ./_countHolders */375),l=r(/*! ./_createCtor */56),u=r(/*! ./_createRecurry */225),i=r(/*! ./_getHolder */57),c=r(/*! ./_reorder */426),p=r(/*! ./_replaceHolders */35),d=r(/*! ./_root */11),f=1,y=2,m=8,v=16,h=128,g=512;e.exports=n},/*!************************************!*\ !*** ./~/lodash/_createRecurry.js ***! \************************************/ function(e,t,r){function n(e,t,r,n,f,y,m,v,h,g){var b=t&c,P=b?m:void 0,T=b?void 0:m,O=b?y:void 0,_=b?void 0:y;t|=b?p:d,t&=~(b?d:p),t&i||(t&=~(l|u));var E=[e,t,f,O,P,_,T,v,h,g],j=r.apply(void 0,E);return o(e)&&a(j,E),j.placeholder=n,s(j,e,t)}var o=r(/*! ./_isLaziable */231),a=r(/*! ./_setData */237),s=r(/*! ./_setWrapToString */238),l=1,u=2,i=4,c=8,p=32,d=64;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_equalArrays.js ***! \**********************************/ function(e,t,r){function n(e,t,r,n,u,i){var c=u&l,p=e.length,d=t.length;if(p!=d&&!(c&&d>p))return!1;var f=i.get(e);if(f&&i.get(t))return f==t;var y=-1,m=!0,v=u&s?new o:void 0;for(i.set(e,t),i.set(t,e);++y<p;){var h=e[y],g=t[y];if(n)var b=c?n(g,h,y,t,e,i):n(h,g,y,e,t,i);if(void 0!==b){if(b)continue;m=!1;break}if(v){if(!a(t,function(e,t){if(!v.has(t)&&(h===e||r(h,e,n,u,i)))return v.add(t)})){m=!1;break}}else if(h!==g&&!r(h,g,n,u,i)){m=!1;break}}return i["delete"](e),i["delete"](t),m}var o=r(/*! ./_SetCache */49),a=r(/*! ./_arraySome */209),s=1,l=2;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_freeGlobal.js ***! \*********************************/ function(e,t){(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.exports=r}).call(t,function(){return this}())},/*!**********************************!*\ !*** ./~/lodash/_getFuncName.js ***! \**********************************/ function(e,t,r){function n(e){for(var t=e.name+"",r=o[t],n=s.call(o,t)?r.length:0;n--;){var a=r[n],l=a.func;if(null==l||l==e)return a.name}return t}var o=r(/*! ./_realNames */425),a=Object.prototype,s=a.hasOwnProperty;e.exports=n},/*!******************************!*\ !*** ./~/lodash/_hasPath.js ***! \******************************/ function(e,t,r){function n(e,t,r){t=u(t,e)?[t]:o(t);for(var n,p=-1,d=t.length;++p<d;){var f=c(t[p]);if(!(n=null!=e&&r(e,f)))break;e=e[f]}if(n)return n;var d=e?e.length:0;return!!d&&i(d)&&l(f,d)&&(s(e)||a(e))}var o=r(/*! ./_castPath */113),a=r(/*! ./isArguments */66),s=r(/*! ./isArray */4),l=r(/*! ./_isIndex */61),u=r(/*! ./_isKey */33),i=r(/*! ./isLength */125),c=r(/*! ./_toKey */19);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_hasUnicode.js ***! \*********************************/ function(e,t){function r(e){return u.test(e)}var n="\\ud800-\\udfff",o="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",s="\\ufe0e\\ufe0f",l="\\u200d",u=RegExp("["+l+n+o+a+s+"]");e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_isLaziable.js ***! \*********************************/ function(e,t,r){function n(e){var t=s(e),r=l[t];if("function"!=typeof r||!(t in o.prototype))return!1;if(e===r)return!0;var n=a(r);return!!n&&e===n[0]}var o=r(/*! ./_LazyWrapper */98),a=r(/*! ./_getData */116),s=r(/*! ./_getFuncName */228),l=r(/*! ./wrapperLodash */491);e.exports=n},/*!*****************************************!*\ !*** ./~/lodash/_isStrictComparable.js ***! \*****************************************/ function(e,t,r){function n(e){return e===e&&!o(e)}var o=r(/*! ./isObject */13);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_mapToArray.js ***! \*********************************/ function(e,t){function r(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}e.exports=r},/*!**********************************************!*\ !*** ./~/lodash/_matchesStrictComparable.js ***! \**********************************************/ function(e,t){function r(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}e.exports=r},/*!******************************!*\ !*** ./~/lodash/_metaMap.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_WeakMap */207),o=n&&new n;e.exports=o},/*!*********************************!*\ !*** ./~/lodash/_nativeKeys.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./_overArg */120),o=n(Object.keys,Object);e.exports=o},/*!******************************!*\ !*** ./~/lodash/_setData.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_baseSetData */218),o=r(/*! ./now */478),a=150,s=16,l=function(){var e=0,t=0;return function(r,l){var u=o(),i=s-(u-t);if(t=u,i>0){if(++e>=a)return r}else e=0;return n(r,l)}}();e.exports=l},/*!**************************************!*\ !*** ./~/lodash/_setWrapToString.js ***! \**************************************/ function(e,t,r){var n=r(/*! ./constant */443),o=r(/*! ./_defineProperty */389),a=r(/*! ./_getWrapDetails */397),s=r(/*! ./identity */123),l=r(/*! ./_insertWrapDetails */407),u=r(/*! ./_updateWrapDetails */437),i=o?function(e,t,r){var s=t+"";return o(e,"toString",{configurable:!0,enumerable:!1,value:n(l(s,u(a(s),r)))})}:s;e.exports=i},/*!***********************************!*\ !*** ./~/lodash/_stringToPath.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./memoize */477),o=r(/*! ./toString */25),a=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g,u=n(function(e){e=o(e);var t=[];return a.test(e)&&t.push(""),e.replace(s,function(e,r,n,o){t.push(n?o.replace(l,"$1"):r||e)}),t});e.exports=u},/*!*******************************!*\ !*** ./~/lodash/_toSource.js ***! \*******************************/ function(e,t){function r(e){if(null!=e){try{return o.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var n=Function.prototype,o=n.toString;e.exports=r},/*!*****************************!*\ !*** ./~/lodash/compact.js ***! \*****************************/ function(e,t){function r(e){for(var t=-1,r=e?e.length:0,n=0,o=[];++t<r;){var a=e[t];a&&(o[n++]=a)}return o}e.exports=r},/*!***************************!*\ !*** ./~/lodash/curry.js ***! \***************************/ function(e,t,r){function n(e,t,r){t=r?void 0:t;var s=o(e,a,void 0,void 0,void 0,void 0,void 0,t);return s.placeholder=n.placeholder,s}var o=r(/*! ./_createWrap */32),a=8;n.placeholder={},e.exports=n},/*!***************************!*\ !*** ./~/lodash/every.js ***! \***************************/ function(e,t,r){function n(e,t,r){var n=l(e)?o:a;return r&&u(e,t,r)&&(t=void 0),n(e,s(t,3))}var o=r(/*! ./_arrayEvery */335),a=r(/*! ./_baseEvery */339),s=r(/*! ./_baseIteratee */14),l=r(/*! ./isArray */4),u=r(/*! ./_isIterateeCall */119);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/findIndex.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=e?e.length:0;if(!n)return-1;var u=null==r?0:s(r);return u<0&&(u=l(n+u,0)),o(e,a(t,3),u)}var o=r(/*! ./_baseFindIndex */213),a=r(/*! ./_baseIteratee */14),s=r(/*! ./toInteger */17),l=Math.max;e.exports=n},/*!*****************************!*\ !*** ./~/lodash/fp/flow.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("flow",r(/*! ../flow */448));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!****************************!*\ !*** ./~/lodash/invoke.js ***! \****************************/ function(e,t,r){var n=r(/*! ./_baseInvoke */347),o=r(/*! ./_baseRest */12),a=o(n);e.exports=a},/*!******************************!*\ !*** ./~/lodash/isBuffer.js ***! \******************************/ function(e,t,r){(function(e){var n=r(/*! ./_root */11),o=r(/*! ./stubFalse */487),a="object"==typeof t&&t&&!t.nodeType&&t,s=a&&"object"==typeof e&&e&&!e.nodeType&&e,l=s&&s.exports===a,u=l?n.Buffer:void 0,i=u?u.isBuffer:void 0,c=i||o;e.exports=c}).call(t,r(/*! ./../webpack/buildin/module.js */259)(e))},/*!******************************!*\ !*** ./~/lodash/isNumber.js ***! \******************************/ function(e,t,r){function n(e){return"number"==typeof e||o(e)&&l.call(e)==a}var o=r(/*! ./isObjectLike */20),a="[object Number]",s=Object.prototype,l=s.toString;e.exports=n},/*!******************************!*\ !*** ./~/lodash/isString.js ***! \******************************/ function(e,t,r){function n(e){return"string"==typeof e||!o(e)&&a(e)&&u.call(e)==s}var o=r(/*! ./isArray */4),a=r(/*! ./isObjectLike */20),s="[object String]",l=Object.prototype,u=l.toString;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/isTypedArray.js ***! \**********************************/ function(e,t,r){var n=r(/*! ./_baseIsTypedArray */352),o=r(/*! ./_baseUnary */111),a=r(/*! ./_nodeUtil */423),s=a&&a.isTypedArray,l=s?o(s):n;e.exports=l},/*!**************************!*\ !*** ./~/lodash/noop.js ***! \**************************/ function(e,t){function r(){}e.exports=r},/*!****************************!*\ !*** ./~/lodash/reduce.js ***! \****************************/ function(e,t,r){function n(e,t,r){var n=u(e)?o:l,i=arguments.length<3;return n(e,s(t,4),r,i,a)}var o=r(/*! ./_arrayReduce */53),a=r(/*! ./_baseEach */26),s=r(/*! ./_baseIteratee */14),l=r(/*! ./_baseReduce */361),u=r(/*! ./isArray */4);e.exports=n},/*!**************************!*\ !*** ./~/lodash/some.js ***! \**************************/ function(e,t,r){function n(e,t,r){var n=l(e)?o:s;return r&&u(e,t,r)&&(t=void 0),n(e,a(t,3))}var o=r(/*! ./_arraySome */209),a=r(/*! ./_baseIteratee */14),s=r(/*! ./_baseSome */362),l=r(/*! ./isArray */4),u=r(/*! ./_isIterateeCall */119);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/stubArray.js ***! \*******************************/ function(e,t){function r(){return[]}e.exports=r},/*!***************************!*\ !*** ./~/lodash/times.js ***! \***************************/ function(e,t,r){function n(e,t){if(e=s(e),e<1||e>l)return[];var r=u,n=i(e,u);t=o(t),e-=u;for(var c=a(n,t);++r<e;)t(r);return c}var o=r(/*! ./_baseIteratee */14),a=r(/*! ./_baseTimes */219),s=r(/*! ./toInteger */17),l=9007199254740991,u=4294967295,i=Math.min;e.exports=n},/*!******************************!*\ !*** ./~/lodash/toFinite.js ***! \******************************/ function(e,t,r){function n(e){if(!e)return 0===e?e:0;if(e=o(e),e===a||e===-a){var t=e<0?-1:1;return t*s}return e===e?e:0}var o=r(/*! ./toNumber */68),a=1/0,s=1.7976931348623157e308;e.exports=n},/*!*******************************!*\ !*** ./~/lodash/transform.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=i(e)||d(e);if(t=l(t,4),null==r)if(n||p(e)){var f=e.constructor;r=n?i(e)?new f:[]:c(f)?a(u(e)):{}}else r={};return(n?o:s)(e,function(e,n,o){return t(r,e,n,o)}),r}var o=r(/*! ./_arrayEach */30),a=r(/*! ./_baseCreate */31),s=r(/*! ./_baseForOwn */106),l=r(/*! ./_baseIteratee */14),u=r(/*! ./_getPrototype */59),i=r(/*! ./isArray */4),c=r(/*! ./isFunction */24),p=r(/*! ./isObject */13),d=r(/*! ./isTypedArray */250);e.exports=n},/*!***************************!*\ !*** ./~/lodash/union.js ***! \***************************/ function(e,t,r){var n=r(/*! ./_baseFlatten */27),o=r(/*! ./_baseRest */12),a=r(/*! ./_baseUniq */363),s=r(/*! ./isArrayLikeObject */38),l=o(function(e){return a(n(e,1,s,!0))});e.exports=l},/*!***********************************!*\ !*** (webpack)/buildin/module.js ***! \***********************************/ function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},/*!***************************************!*\ !*** ./src/addons/Confirm/Confirm.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.open,r=e.cancelButton,n=e.confirmButton,a=e.header,u=e.content,p=e.onConfirm,f=e.onCancel,m=(0,c.getUnhandledProps)(o,e),v={};return(0,s["default"])(e,"open")&&(v.open=t),i["default"].createElement(y["default"],l({},v,{size:"small",onClose:f},m),a&&i["default"].createElement(y["default"].Header,null,a),u&&i["default"].createElement(y["default"].Content,null,u),i["default"].createElement(y["default"].Actions,null,i["default"].createElement(d["default"],{onClick:f},r),i["default"].createElement(d["default"],{primary:!0,onClick:p},n)))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/has */23),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ../../elements/Button */74),d=n(p),f=r(/*! ../../modules/Modal */179),y=n(f);o._meta={name:"Confirm",type:c.META.TYPES.ADDON},o.propTypes={open:u.PropTypes.bool,cancelButton:u.PropTypes.string,confirmButton:u.PropTypes.string,header:u.PropTypes.string,content:u.PropTypes.string,onConfirm:u.PropTypes.func,onCancel:u.PropTypes.func},o.defaultProps={cancelButton:"Cancel",confirmButton:"OK",content:"Are you sure?"},t["default"]=o},/*!*************************************!*\ !*** ./src/addons/Confirm/index.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Confirm */260),a=n(o);t["default"]=a["default"]},/*!*************************************!*\ !*** ./src/addons/Portal/Portal.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/invoke */246),u=n(l),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),p=r(/*! react */1),d=n(p),f=r(/*! react-dom */493),y=n(f),m=r(/*! ../../lib */2),v=(0,m.makeDebugger)("portal"),h={name:"Portal",type:m.META.TYPES.ADDON},g=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,c=Array(l),p=0;p<l;p++)c[p]=arguments[p];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),n.handleDocumentClick=function(e){var t=n.props,r=t.closeOnDocumentClick,o=t.closeOnRootNodeClick;n.portal.contains(e.target)||(r||o&&n.node.contains(e.target))&&(v("handleDocumentClick()"),e.stopPropagation(),n.close(e))},n.handleEscape=function(e){n.props.closeOnEscape&&m.keyboardKey.getCode(e)===m.keyboardKey.Escape&&(v("handleEscape()"),e.preventDefault(),n.close(e))},n.handlePortalMouseLeave=function(e){var t=n.props,r=t.closeOnPortalMouseLeave,o=t.mouseLeaveDelay;r&&(v("handlePortalMouseLeave()"),n.mouseLeaveTimer=n.closeWithTimeout(e,o))},n.handlePortalMouseOver=function(e){var t=n.props.closeOnPortalMouseLeave;t&&(v("handlePortalMouseOver()"),clearTimeout(n.mouseLeaveTimer))},n.handleTriggerBlur=function(e){var t=n.props,r=t.trigger,o=t.closeOnTriggerBlur;(0,u["default"])(r,"props.onBlur",e),o&&(v("handleTriggerBlur()"),n.close(e))},n.handleTriggerClick=function(e){var t=n.props,r=t.trigger,o=t.closeOnTriggerClick,a=t.openOnTriggerClick,s=n.state.open;(0,u["default"])(r,"props.onClick",e),s&&o?(v("handleTriggerClick() - close"),e.stopPropagation(),n.close(e)):!s&&a&&(v("handleTriggerClick() - open"),e.stopPropagation(),n.open(e)),e.nativeEvent.stopImmediatePropagation()},n.handleTriggerFocus=function(e){var t=n.props,r=t.trigger,o=t.openOnTriggerFocus;(0,u["default"])(r,"props.onFocus",e),o&&(v("handleTriggerFocus()"),n.open(e))},n.handleTriggerMouseLeave=function(e){clearTimeout(n.mouseOverTimer);var t=n.props,r=t.trigger,o=t.closeOnTriggerMouseLeave,a=t.mouseLeaveDelay;(0,u["default"])(r,"props.onMouseLeave",e),o&&(v("handleTriggerMouseLeave()"),n.mouseLeaveTimer=n.closeWithTimeout(e,a))},n.handleTriggerMouseOver=function(e){clearTimeout(n.mouseLeaveTimer);var t=n.props,r=t.trigger,o=t.mouseOverDelay,a=t.openOnTriggerMouseOver;(0,u["default"])(r,"props.onMouseOver",e),a&&(v("handleTriggerMouseOver()"),n.mouseOverTimer=n.openWithTimeout(e,o))},n.open=function(e){v("open()");var t=n.props.onOpen;t&&t(e),n.trySetState({open:!0})},n.openWithTimeout=function(e,t){var r=i({},e);return setTimeout(function(){return n.open(r)},t||0)},n.close=function(e){v("close()");var t=n.props.onClose;t&&t(e),n.trySetState({open:!1})},n.closeWithTimeout=function(e,t){var r=i({},e);return setTimeout(function(){return n.close(r)},t||0)},n.mountPortal=function(){if(!n.node){v("mountPortal()");var e=n.props,t=e.mountNode,r=void 0===t?document.body:t,o=e.prepend;n.node=document.createElement("div"),o?r.insertBefore(n.node,r.firstElementChild):r.appendChild(n.node),document.addEventListener("click",n.handleDocumentClick),document.addEventListener("keydown",n.handleEscape);var a=n.props.onMount;a&&a()}},n.unmountPortal=function(){if(n.node){v("unmountPortal()"),y["default"].unmountComponentAtNode(n.node),n.node.parentNode.removeChild(n.node),n.portal.removeEventListener("mouseleave",n.handlePortalMouseLeave),n.portal.removeEventListener("mouseover",n.handlePortalMouseOver),n.node=null,n.portal=null,document.removeEventListener("click",n.handleDocumentClick),document.removeEventListener("keydown",n.handleEscape);var e=n.props.onUnmount;e&&e()}},s=r,a(n,s)}return s(t,e),c(t,[{key:"componentDidMount",value:function(){this.state.open&&this.renderPortal()}},{key:"componentDidUpdate",value:function(e,t){this.state.open&&this.renderPortal(),t.open&&!this.state.open&&(v("portal closed"),this.unmountPortal())}},{key:"componentWillUnmount",value:function(){this.unmountPortal(),clearTimeout(this.mouseOverTimer),clearTimeout(this.mouseLeaveTimer)}},{key:"renderPortal",value:function(){var e=this.props,t=e.children,r=e.className;this.mountPortal(),this.node.className=r||"",y["default"].unstable_renderSubtreeIntoContainer(this,p.Children.only(t),this.node),this.portal=this.node.firstElementChild,this.portal.addEventListener("mouseleave",this.handlePortalMouseLeave),this.portal.addEventListener("mouseover",this.handlePortalMouseOver)}},{key:"render",value:function(){var e=this.props.trigger;return e?d["default"].cloneElement(e,{onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onFocus:this.handleTriggerFocus,onMouseLeave:this.handleTriggerMouseLeave,onMouseOver:this.handleTriggerMouseOver}):null}}]),t}(m.AutoControlledComponent);g.propTypes={children:p.PropTypes.node.isRequired,className:p.PropTypes.string,closeOnRootNodeClick:m.customPropTypes.every([m.customPropTypes.disallow(["closeOnDocumentClick"]),p.PropTypes.bool]),closeOnDocumentClick:m.customPropTypes.every([m.customPropTypes.disallow(["closeOnRootNodeClick"]),p.PropTypes.bool]),closeOnEscape:p.PropTypes.bool,closeOnPortalMouseLeave:p.PropTypes.bool,closeOnTriggerBlur:p.PropTypes.bool,closeOnTriggerClick:p.PropTypes.bool,closeOnTriggerMouseLeave:p.PropTypes.bool,defaultOpen:p.PropTypes.bool,mountNode:p.PropTypes.any,mouseLeaveDelay:p.PropTypes.number,mouseOverDelay:p.PropTypes.number,onClose:p.PropTypes.func,onMount:p.PropTypes.func,onOpen:p.PropTypes.func,onUnmount:p.PropTypes.func,open:p.PropTypes.bool,openOnTriggerClick:p.PropTypes.bool,openOnTriggerFocus:p.PropTypes.bool,openOnTriggerMouseOver:p.PropTypes.bool,prepend:p.PropTypes.bool,trigger:p.PropTypes.node},g.defaultProps={closeOnDocumentClick:!0,closeOnEscape:!0,openOnTriggerClick:!0},g.autoControlledProps=["open"],g._meta=h,t["default"]=g},/*!***********************************!*\ !*** ./src/addons/Radio/Radio.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.slider,r=e.toggle,n=e.type,s=(0,u.getUnhandledProps)(o,e),i=!(t||r)||void 0;return l["default"].createElement(c["default"],a({},s,{type:n,radio:i,slider:t,toggle:r}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! ../../lib */2),i=r(/*! ../../modules/Checkbox */46),c=n(i);o._meta={name:"Radio",type:u.META.TYPES.ADDON,props:{type:c["default"]._meta.props.type}},o.propTypes={slider:c["default"].propTypes.slider,toggle:c["default"].propTypes.toggle,type:s.PropTypes.oneOf(o._meta.props.type)},o.defaultProps={type:"radio"},t["default"]=o},/*!*************************************!*\ !*** ./src/addons/Select/Select.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return l["default"].createElement(c["default"],a({},e,{selection:!0}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! react */1),l=n(s),u=r(/*! ../../lib */2),i=r(/*! ../../modules/Dropdown */83),c=n(i);o._meta={name:"Select",type:u.META.TYPES.ADDON},t["default"]=o},/*!*****************************************!*\ !*** ./src/addons/TextArea/TextArea.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=(0,l.getUnhandledProps)(o,e),r=(0,l.getElementType)(o,e);return s["default"].createElement(r,t)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! react */1),s=n(a),l=r(/*! ../../lib */2);o._meta={name:"TextArea",type:l.META.TYPES.ADDON},o.propTypes={as:l.customPropTypes.as},o.defaultProps={as:"textarea"},t["default"]=o},/*!**************************************************!*\ !*** ./src/collections/Breadcrumb/Breadcrumb.js ***! \**************************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e){var t=e.children,r=e.className,n=e.divider,s=e.icon,l=e.size,u=e.sections,p=(0,d["default"])("ui",r,l,"breadcrumb"),f=(0,m.getUnhandledProps)(a,e),v=(0,m.getElementType)(a,e);if(t)return y["default"].createElement(v,c({},f,{className:p}),t);var g=y["default"].createElement(h["default"],{icon:s},n),P=[];return(0,i["default"])(u,function(e,t){var r=e.text,n=e.key,a=o(e,["text","key"]),s=n||r,l=s+"-divider";P.push(y["default"].createElement(b["default"],c({},a,{key:s}),r)),t!==u.length-1&&P.push(y["default"].cloneElement(g,{key:l}))}),y["default"].createElement(v,c({},f,{className:p}),P)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(/*! lodash/without */6),l=n(s),u=r(/*! lodash/each */64),i=n(u),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=r(/*! classnames */3),d=n(p),f=r(/*! react */1),y=n(f),m=r(/*! ../../lib */2),v=r(/*! ./BreadcrumbDivider */130),h=n(v),g=r(/*! ./BreadcrumbSection */131),b=n(g);a._meta={name:"Breadcrumb",type:m.META.TYPES.COLLECTION,props:{size:(0,l["default"])(m.SUI.SIZES,"medium")}},a.propTypes={as:m.customPropTypes.as,children:f.PropTypes.node,className:f.PropTypes.string,divider:m.customPropTypes.every([m.customPropTypes.disallow(["icon"]),m.customPropTypes.contentShorthand]),icon:m.customPropTypes.every([m.customPropTypes.disallow(["divider"]),m.customPropTypes.itemShorthand]),sections:m.customPropTypes.collectionShorthand,size:f.PropTypes.oneOf(a._meta.props.size)},a.Divider=h["default"],a.Section=b["default"],t["default"]=a},/*!*********************************************!*\ !*** ./src/collections/Breadcrumb/index.js ***! \*********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Breadcrumb */266),a=n(o);t["default"]=a["default"]},/*!**************************************!*\ !*** ./src/collections/Form/Form.js ***! \**************************************/ function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(t){B("formSerializer()");var r={};return t?((0,g["default"])(t.querySelectorAll('input[type="checkbox"]'),function(n,o,a){var s=Y(n),l=(0,v["default"])(a,{name:s});if(1===l.length)return r[s]=n.checked&&"on"!==n.value?n.value:n.checked,void q(r,s,n);if(Array.isArray(r[s])||(r[s]=[]),n.checked&&r[s].push(n.value),q(r,s,n),"production"!==e.NODE_ENV&&"on"===n.value){var u=["Encountered a checkbox in a group with the default browser value 'on'.","Each checkbox in a group should have a unique value.","Otherwise, the checkbox value will serialize as ['on', ...]."].join(" ");console.error(u,n,t)}}),(0,g["default"])(t.querySelectorAll('input[type="radio"]'),function(n,o,a){var s=Y(n),l=(0,y["default"])(a,{name:s,checked:!0});if(l?r[s]=l.value:r[s]=null,q(r,s,n),"production"!==e.NODE_ENV&&"on"===n.value){var u=["Encountered a radio with the default browser value 'on'.","Each radio should have a unique value.","Otherwise, the radio value will serialize as { [name]: 'on' }."].join(" ");console.error(u,n,t)}}),(0,g["default"])(t.querySelectorAll('input:not([type="radio"]):not([type="checkbox"])'),function(e){var t=Y(e);r[t]=e.value,q(r,t,e)}),(0,g["default"])(t.querySelectorAll("textarea"),function(e){var t=Y(e);r[t]=e.value,q(r,t,e)}),(0,g["default"])(t.querySelectorAll("select"),function(e){var t=Y(e);e.multiple?r[t]=(0,d["default"])((0,v["default"])(e.querySelectorAll("option"),"selected"),"value"):r[t]=e.value,q(r,t,e)}),r):r}Object.defineProperty(t,"__esModule",{value:!0});var i=r(/*! lodash/without */6),c=n(i),p=r(/*! lodash/map */9),d=n(p),f=r(/*! lodash/find */122),y=n(f),m=r(/*! lodash/filter */121),v=n(m),h=r(/*! lodash/each */64),g=n(h),b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},P=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),T=r(/*! classnames */3),O=n(T),_=r(/*! react */1),E=n(_),j=r(/*! ../../lib */2),w=r(/*! ./FormButton */132),M=n(w),S=r(/*! ./FormCheckbox */133),x=n(S),A=r(/*! ./FormDropdown */134),N=n(A),k=r(/*! ./FormField */16),C=n(k),I=r(/*! ./FormGroup */135),K=n(I),L=r(/*! ./FormInput */136),U=n(L),D=r(/*! ./FormRadio */137),R=n(D),z=r(/*! ./FormSelect */138),W=n(z),F=r(/*! ./FormTextArea */139),V=n(F),B=(0,j.makeDebugger)("form"),Y=function(e){var t=e.name;return t},q=function(){};"production"!==e.NODE_ENV&&(q=function(e,t,r){B("serialized "+JSON.stringify(l({},t,e[t]))+" from:",r)},Y=function(e){var t=e.name;if(!t){var r=["Encountered a form control node without a name attribute.","Each node in a group should have a name.",'Otherwise, the node will serialize as { "undefined": <value> }.'].join(" ");console.error(r,e)}return t});var H={name:"Form",type:j.META.TYPES.COLLECTION,props:{widths:["equal"],size:(0,c["default"])(j.SUI.SIZES,"medium")}},G=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n._form=null,n.handleRef=function(e){return n._form=n._form||e},n.handleSubmit=function(e){var t=n.props,r=t.onSubmit,o=t.serializer;r&&r(e,o(n._form))},s=r,a(n,s)}return s(t,e),P(t,[{key:"render",value:function(){var e=this.props,r=e.children,n=e.className,o=e.error,a=e.loading,s=e.reply,l=e.size,u=e.success,i=e.warning,c=e.widths,p=(0,O["default"])("ui",l,(0,j.useKeyOnly)(o,"error"),(0,j.useKeyOnly)(a,"loading"),(0,j.useKeyOnly)(s,"reply"),(0,j.useKeyOnly)(u,"success"),(0,j.useKeyOnly)(i,"warning"),(0,j.useWidthProp)(c,null,!0),"form",n),d=(0,j.getUnhandledProps)(t,this.props),f=(0,j.getElementType)(t,this.props);return E["default"].createElement(f,b({},d,{className:p,ref:this.handleRef,onSubmit:this.handleSubmit}),r)}}]),t}(_.Component);G.defaultProps={as:"form",serializer:u},G.propTypes={as:j.customPropTypes.as,children:_.PropTypes.node,className:_.PropTypes.string,error:_.PropTypes.bool,loading:_.PropTypes.bool,onSubmit:_.PropTypes.func,reply:_.PropTypes.bool,serializer:_.PropTypes.func,size:_.PropTypes.oneOf(H.props.size),success:_.PropTypes.bool,warning:_.PropTypes.bool,widths:_.PropTypes.oneOf(H.props.widths)},G._meta=H,G.Field=C["default"],G.Button=M["default"],G.Checkbox=x["default"],G.Dropdown=N["default"],G.Group=K["default"],G.Input=U["default"],G.Radio=R["default"],G.Select=W["default"],G.TextArea=V["default"],t["default"]=G}).call(t,r(/*! ./~/node-libs-browser/~/process/browser.js */69))},/*!***************************************!*\ !*** ./src/collections/Form/index.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Form */268),a=n(o);t["default"]=a["default"]},/*!**************************************!*\ !*** ./src/collections/Grid/Grid.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function a(e){var t=e.celled,r=e.centered,n=e.children,o=e.className,l=e.columns,i=e.divided,d=e.doubling,f=e.padded,y=e.relaxed,m=e.reversed,v=e.stackable,h=e.stretched,g=e.textAlign,b=e.verticalAlign,P=(0,u["default"])("ui",(0,p.useKeyOnly)(r,"centered"),(0,p.useKeyOnly)(d,"doubling"),(0,p.useKeyOnly)(v,"stackable"),(0,p.useKeyOnly)(h,"stretched"),(0,p.useKeyOrValueAndKey)(t,"celled"),(0,p.useKeyOrValueAndKey)(i,"divided"),(0,p.useKeyOrValueAndKey)(f,"padded"),(0,p.useKeyOrValueAndKey)(y,"relaxed"),(0,p.useTextAlignProp)(g),(0,p.useValueAndKey)(m,"reversed"),(0,p.useVerticalAlignProp)(b),(0,p.useWidthProp)(l,"column",!0),"grid",o),T=(0,p.getUnhandledProps)(a,e),O=(0,p.getElementType)(a,e);return c["default"].createElement(O,s({},T,{className:P}),n)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l=r(/*! classnames */3),u=n(l),i=r(/*! react */1),c=n(i),p=r(/*! ../../lib */2),d=r(/*! ./GridColumn */140),f=n(d),y=r(/*! ./GridRow */141),m=n(y);a.Column=f["default"],a.Row=m["default"],a._meta={name:"Grid",type:p.META.TYPES.COLLECTION,props:{celled:["internally"],columns:[].concat(o(p.SUI.WIDTHS),["equal"]),divided:["vertically"],padded:["horizontally","vertically"],relaxed:["very"],reversed:["computer","computer vertically","mobile","mobile vertically","tablet","tablet vertically"],textAlign:p.SUI.TEXT_ALIGNMENTS,verticalAlign:p.SUI.VERTICAL_ALIGNMENTS}},a.propTypes={as:p.customPropTypes.as,celled:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(a._meta.props.celled)]),centered:i.PropTypes.bool,children:i.PropTypes.node,className:i.PropTypes.string,columns:i.PropTypes.oneOf(a._meta.props.columns),divided:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(a._meta.props.divided)]),doubling:i.PropTypes.bool,padded:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(a._meta.props.padded)]),relaxed:i.PropTypes.oneOfType([i.PropTypes.bool,i.PropTypes.oneOf(a._meta.props.relaxed)]),reversed:i.PropTypes.oneOf(a._meta.props.reversed),stackable:i.PropTypes.bool,stretched:i.PropTypes.bool,textAlign:i.PropTypes.oneOf(a._meta.props.textAlign),verticalAlign:i.PropTypes.oneOf(f["default"]._meta.props.verticalAlign)},t["default"]=a},/*!***************************************!*\ !*** ./src/collections/Grid/index.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Grid */270),a=n(o);t["default"]=a["default"]},/*!**************************************!*\ !*** ./src/collections/Menu/Menu.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/map */9),u=n(l),i=r(/*! lodash/get */37),c=n(i),p=r(/*! lodash/without */6),d=n(p),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),m=r(/*! classnames */3),v=n(m),h=r(/*! react */1),g=n(h),b=r(/*! ../../lib */2),P=r(/*! ./MenuHeader */142),T=n(P),O=r(/*! ./MenuItem */143),_=n(O),E=r(/*! ./MenuMenu */144),j=n(E),w={name:"Menu",type:b.META.TYPES.COLLECTION,props:{attached:["top","bottom"],color:b.SUI.COLORS,floated:["right"],icon:["labeled"],fixed:["left","right","bottom","top"],size:(0,d["default"])(b.SUI.SIZES,"medium","big"),tabular:["right"],widths:b.SUI.WIDTHS}},M=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.handleItemClick=function(e,t){var r=t.name,o=t.index;n.trySetState({activeIndex:o});var a=n.props,s=a.items,l=a.onItemClick;(0,c["default"])(s[o],"onClick")&&s[o].onClick(e,{name:r,index:o}),l&&l(e,{name:r,index:o})},s=r,a(n,s)}return s(t,e),y(t,[{key:"renderItems",value:function(){var e=this,t=this.props.items,r=this.state.activeIndex;return(0,u["default"])(t,function(t,n){return(0,b.createShorthand)(_["default"],function(e){return{content:e}},t,{active:r===n,childKey:function(e){var t=e.content,r=e.name;return[t,r].join("-")},index:n,onClick:e.handleItemClick})})}},{key:"render",value:function(){var e=this.props,r=e.attached,n=e.borderless,o=e.children,a=e.className,s=e.color,l=e.compact,u=e.fixed,i=e.floated,c=e.fluid,p=e.icon,d=e.inverted,y=e.pagination,m=e.pointing,h=e.secondary,P=e.stackable,T=e.tabular,O=e.text,_=e.vertical,E=e.size,j=e.widths,w=(0,v["default"])("ui",s,E,(0,b.useWidthProp)(j,"item"),(0,b.useKeyOrValueAndKey)(r,"attached"),(0,b.useKeyOnly)(n,"borderless"),(0,b.useKeyOnly)(l,"compact"),(0,b.useValueAndKey)(u,"fixed"),(0,b.useKeyOrValueAndKey)(i,"floated"),(0,b.useKeyOnly)(c,"fluid"),(0,b.useKeyOrValueAndKey)(p,"icon"),(0,b.useKeyOnly)(d,"inverted"),(0,b.useKeyOnly)(y,"pagination"),(0,b.useKeyOnly)(m,"pointing"),(0,b.useKeyOnly)(h,"secondary"),(0,b.useKeyOnly)(P,"stackable"),(0,b.useKeyOrValueAndKey)(T,"tabular"),(0,b.useKeyOnly)(O,"text"),(0,b.useKeyOnly)(_,"vertical"),a,"menu"),M=(0,b.getUnhandledProps)(t,this.props),S=(0,b.getElementType)(t,this.props);return g["default"].createElement(S,f({},M,{className:w}),o||this.renderItems())}}]),t}(b.AutoControlledComponent);M.propTypes={as:b.customPropTypes.as,activeIndex:h.PropTypes.number,attached:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.oneOf(w.props.attached)]),borderless:h.PropTypes.bool,children:h.PropTypes.node,className:h.PropTypes.string,color:h.PropTypes.oneOf(w.props.color),compact:h.PropTypes.bool,defaultActiveIndex:h.PropTypes.number,fixed:h.PropTypes.oneOf(w.props.fixed),floated:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.oneOf(w.props.floated)]),fluid:h.PropTypes.bool,icon:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.oneOf(w.props.icon)]),inverted:h.PropTypes.bool,items:b.customPropTypes.collectionShorthand,onItemClick:b.customPropTypes.every([b.customPropTypes.disallow(["children"]),h.PropTypes.func]),pagination:h.PropTypes.bool,pointing:h.PropTypes.bool,secondary:h.PropTypes.bool,stackable:h.PropTypes.bool,tabular:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.oneOf(w.props.tabular)]),text:h.PropTypes.bool,vertical:h.PropTypes.bool,size:h.PropTypes.oneOf(w.props.size),widths:h.PropTypes.oneOf(w.props.widths)},M._meta=w,M.autoControlledProps=["activeIndex"],M.Header=T["default"],M.Item=_["default"],M.Menu=j["default"],t["default"]=M},/*!***************************************!*\ !*** ./src/collections/Menu/index.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Menu */272),a=n(o);t["default"]=a["default"]},/*!********************************************!*\ !*** ./src/collections/Message/Message.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.children,r=e.className,n=e.content,a=e.header,s=e.icon,u=e.list,c=e.onDismiss,f=e.hidden,m=e.visible,h=e.floating,b=e.compact,T=e.attached,O=e.warning,_=e.info,E=e.positive,j=e.success,w=e.negative,M=e.error,S=e.color,x=e.size,A=(0,p["default"])("ui",x,S,(0,d.useKeyOnly)(s,"icon"),(0,d.useKeyOnly)(f,"hidden"),(0,d.useKeyOnly)(m,"visible"),(0,d.useKeyOnly)(h,"floating"),(0,d.useKeyOnly)(b,"compact"),(0,d.useKeyOrValueAndKey)(T,"attached"),(0,d.useKeyOnly)(O,"warning"),(0,d.useKeyOnly)(_,"info"),(0,d.useKeyOnly)(E,"positive"),(0,d.useKeyOnly)(j,"success"),(0,d.useKeyOnly)(w,"negative"),(0,d.useKeyOnly)(M,"error"),"message",r),N=c&&i["default"].createElement(y["default"],{name:"close",onClick:c}),k=(0,d.getUnhandledProps)(o,e),C=(0,d.getElementType)(o,e);return t?i["default"].createElement(C,l({},k,{className:A}),N,t):i["default"].createElement(C,l({},k,{className:A}),N,y["default"].create(s),(a||n||u)&&i["default"].createElement(v["default"],null,(0,d.createShorthand)(g["default"],function(e){return{children:e}},a),(0,d.createShorthand)(P["default"],function(e){return{items:e}},u),(0,d.createShorthand)("p",function(e){return{children:e}},n)))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */6),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! react */1),i=n(u),c=r(/*! classnames */3),p=n(c),d=r(/*! ../../lib */2),f=r(/*! ../../elements/Icon */10),y=n(f),m=r(/*! ./MessageContent */145),v=n(m),h=r(/*! ./MessageHeader */146),g=n(h),b=r(/*! ./MessageList */147),P=n(b),T=r(/*! ./MessageItem */72),O=n(T);o._meta={name:"Message",type:d.META.TYPES.COLLECTION,props:{attached:["bottom"],color:d.SUI.COLORS,size:(0,s["default"])(d.SUI.SIZES,"medium")}},o.propTypes={as:d.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,content:d.customPropTypes.contentShorthand,header:d.customPropTypes.itemShorthand,icon:u.PropTypes.oneOfType([u.PropTypes.bool,d.customPropTypes.itemShorthand]),list:d.customPropTypes.collectionShorthand,onDismiss:u.PropTypes.func,hidden:u.PropTypes.bool,visible:u.PropTypes.bool,floating:u.PropTypes.bool,compact:u.PropTypes.bool,attached:u.PropTypes.oneOfType([u.PropTypes.bool,u.PropTypes.oneOf(o._meta.props.attached)]),warning:u.PropTypes.bool,info:u.PropTypes.bool,positive:u.PropTypes.bool,success:u.PropTypes.bool,negative:u.PropTypes.bool,error:u.PropTypes.bool,color:u.PropTypes.oneOf(o._meta.props.color),size:u.PropTypes.oneOf(o._meta.props.size)},o.Content=v["default"],o.Header=g["default"],o.List=P["default"],o.Item=O["default"],t["default"]=o},/*!******************************************!*\ !*** ./src/collections/Message/index.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Message */274),a=n(o);t["default"]=a["default"]},/*!****************************************!*\ !*** ./src/collections/Table/Table.js ***! \****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.basic,r=e.attached,n=e.renderBodyRow,a=e.celled,s=e.children,l=e.className,c=e.collapsing,d=e.color,m=e.columns,h=e.compact,g=e.definition,b=e.fixed,T=e.footerRow,_=e.headerRow,E=e.inverted,j=e.padded,M=e.selectable,S=e.singleLine,x=e.size,A=e.stackable,N=e.striped,k=e.structured,C=e.tableData,I=e.unstackable,K=(0,p["default"])("ui",d,x,(0,y.useKeyOrValueAndKey)(r,"attached"),(0,y.useKeyOrValueAndKey)(t,"basic"),(0,y.useKeyOnly)(a,"celled"),(0,y.useKeyOnly)(c,"collapsing"),(0,y.useKeyOrValueAndKey)(h,"compact"),(0,y.useKeyOnly)(g,"definition"),(0,y.useKeyOnly)(b,"fixed"),(0,y.useKeyOnly)(E,"inverted"),(0,y.useKeyOrValueAndKey)(j,"padded"),(0,y.useKeyOnly)(M,"selectable"),(0,y.useKeyOnly)(S,"single line"),(0,y.useKeyOnly)(A,"stackable"),(0,y.useKeyOnly)(N,"striped"),(0,y.useKeyOnly)(k,"structured"),(0,y.useKeyOnly)(I,"unstackable"),(0,y.useWidthProp)(m,"column"),l,"table"),L=(0,y.getUnhandledProps)(o,e),U=(0,y.getElementType)(o,e);return s?f["default"].createElement(U,i({},L,{className:K}),s):f["default"].createElement(U,i({},L,{className:K}),_&&f["default"].createElement(O["default"],null,w["default"].create(_,{cellAs:"th"})),f["default"].createElement(v["default"],null,n&&(0,u["default"])(C,function(e,t){return w["default"].create(n(e,t))})),T&&f["default"].createElement(P["default"],null,w["default"].create(T)))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */6),s=n(a),l=r(/*! lodash/map */9),u=n(l),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=r(/*! classnames */3),p=n(c),d=r(/*! react */1),f=n(d),y=r(/*! ../../lib */2),m=r(/*! ./TableBody */148),v=n(m),h=r(/*! ./TableCell */42),g=n(h),b=r(/*! ./TableFooter */149),P=n(b),T=r(/*! ./TableHeader */73),O=n(T),_=r(/*! ./TableHeaderCell */150),E=n(_),j=r(/*! ./TableRow */151),w=n(j);o._meta={name:"Table",type:y.META.TYPES.COLLECTION,props:{attached:["top","bottom"],basic:["very"],color:y.SUI.COLORS,columns:y.SUI.WIDTHS,compact:["very"],padded:["very"],size:(0,s["default"])(y.SUI.SIZES,"mini","tiny","medium","big","huge","massive")}},o.defaultProps={as:"table"},o.propTypes={as:y.customPropTypes.as,attached:d.PropTypes.oneOfType([d.PropTypes.oneOf(o._meta.props.attached),d.PropTypes.bool]),basic:d.PropTypes.oneOfType([d.PropTypes.bool,d.PropTypes.oneOf(o._meta.props.basic)]),celled:d.PropTypes.bool,children:d.PropTypes.node,className:d.PropTypes.string,collapsing:d.PropTypes.bool,color:d.PropTypes.oneOf(o._meta.props.color),columns:d.PropTypes.oneOf(o._meta.props.columns),compact:d.PropTypes.oneOfType([d.PropTypes.bool,d.PropTypes.oneOf(o._meta.props.compact)]),definition:d.PropTypes.bool,fixed:d.PropTypes.bool,footerRow:y.customPropTypes.itemShorthand,headerRow:y.customPropTypes.itemShorthand,inverted:d.PropTypes.bool,padded:d.PropTypes.oneOfType([d.PropTypes.bool,d.PropTypes.oneOf(o._meta.props.padded)]),renderBodyRow:y.customPropTypes.every([y.customPropTypes.disallow(["children"]),y.customPropTypes.demand(["tableData"]),d.PropTypes.func]),selectable:d.PropTypes.bool,singleLine:d.PropTypes.bool,size:d.PropTypes.oneOf(o._meta.props.size),stackable:d.PropTypes.bool,striped:d.PropTypes.bool,structured:d.PropTypes.bool,tableData:y.customPropTypes.every([y.customPropTypes.disallow(["children"]),y.customPropTypes.demand(["renderBodyRow"]),d.PropTypes.array]),unstackable:d.PropTypes.bool},o.Body=v["default"],o.Cell=g["default"],o.Footer=P["default"],o.Header=O["default"],o.HeaderCell=E["default"],o.Row=w["default"],t["default"]=o},/*!****************************************!*\ !*** ./src/collections/Table/index.js ***! \****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Table */276),a=n(o);t["default"]=a["default"]},/*!*********************************************!*\ !*** ./src/elements/Container/Container.js ***! \*********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.text,r=e.textAlign,n=e.fluid,s=e.children,u=e.className,p=(0,l["default"])("ui",(0,c.useKeyOnly)(t,"text"),(0,c.useKeyOnly)(n,"fluid"),(0,c.useTextAlignProp)(r),"container",u),d=(0,c.getUnhandledProps)(o,e),f=(0,c.getElementType)(o,e);return i["default"].createElement(f,a({},d,{className:p}),s)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"Container",type:c.META.TYPES.ELEMENT,props:{textAlign:c.SUI.TEXT_ALIGNMENTS}},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,text:u.PropTypes.bool,fluid:u.PropTypes.bool,textAlign:u.PropTypes.oneOf(o._meta.props.textAlign)},t["default"]=o},/*!*****************************************!*\ !*** ./src/elements/Container/index.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Container */278),a=n(o);t["default"]=a["default"]},/*!*****************************************!*\ !*** ./src/elements/Divider/Divider.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.horizontal,r=e.vertical,n=e.inverted,s=e.fitted,u=e.hidden,p=e.section,d=e.clearing,f=e.children,y=e.className,m=(0,l["default"])("ui",(0,c.useKeyOnly)(t,"horizontal"),(0,c.useKeyOnly)(r,"vertical"),(0,c.useKeyOnly)(n,"inverted"),(0,c.useKeyOnly)(s,"fitted"),(0,c.useKeyOnly)(u,"hidden"),(0,c.useKeyOnly)(p,"section"),(0,c.useKeyOnly)(d,"clearing"),"divider",y),v=(0,c.getUnhandledProps)(o,e),h=(0,c.getElementType)(o,e);return i["default"].createElement(h,a({},v,{className:m}),f)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"Divider",type:c.META.TYPES.ELEMENT},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,horizontal:u.PropTypes.bool,vertical:u.PropTypes.bool,inverted:u.PropTypes.bool,fitted:u.PropTypes.bool,hidden:u.PropTypes.bool,section:u.PropTypes.bool,clearing:u.PropTypes.bool},t["default"]=o},/*!***************************************!*\ !*** ./src/elements/Divider/index.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Divider */280),a=n(o);t["default"]=a["default"]},/*!***********************************!*\ !*** ./src/elements/Flag/Flag.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.name,n=(0,l["default"])(r,t,"flag"),s=(0,c.getUnhandledProps)(o,e),u=(0,c.getElementType)(o,e);return i["default"].createElement(u,a({},s,{className:n}))}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=["ad","andorra","ae","united arab emirates","uae","af","afghanistan","ag","antigua","ai","anguilla","al","albania","am","armenia","an","netherlands antilles","ao","angola","ar","argentina","as","american samoa","at","austria","au","australia","aw","aruba","ax","aland islands","az","azerbaijan","ba","bosnia","bb","barbados","bd","bangladesh","be","belgium","bf","burkina faso","bg","bulgaria","bh","bahrain","bi","burundi","bj","benin","bm","bermuda","bn","brunei","bo","bolivia","br","brazil","bs","bahamas","bt","bhutan","bv","bouvet island","bw","botswana","by","belarus","bz","belize","ca","canada","cc","cocos islands","cd","congo","cf","central african republic","cg","congo brazzaville","ch","switzerland","ci","cote divoire","ck","cook islands","cl","chile","cm","cameroon","cn","china","co","colombia","cr","costa rica","cs","cu","cuba","cv","cape verde","cx","christmas island","cy","cyprus","cz","czech republic","de","germany","dj","djibouti","dk","denmark","dm","dominica","do","dominican republic","dz","algeria","ec","ecuador","ee","estonia","eg","egypt","eh","western sahara","er","eritrea","es","spain","et","ethiopia","eu","european union","fi","finland","fj","fiji","fk","falkland islands","fm","micronesia","fo","faroe islands","fr","france","ga","gabon","gb","united kingdom","gd","grenada","ge","georgia","gf","french guiana","gh","ghana","gi","gibraltar","gl","greenland","gm","gambia","gn","guinea","gp","guadeloupe","gq","equatorial guinea","gr","greece","gs","sandwich islands","gt","guatemala","gu","guam","gw","guinea-bissau","gy","guyana","hk","hong kong","hm","heard island","hn","honduras","hr","croatia","ht","haiti","hu","hungary","id","indonesia","ie","ireland","il","israel","in","india","io","indian ocean territory","iq","iraq","ir","iran","is","iceland","it","italy","jm","jamaica","jo","jordan","jp","japan","ke","kenya","kg","kyrgyzstan","kh","cambodia","ki","kiribati","km","comoros","kn","saint kitts and nevis","kp","north korea","kr","south korea","kw","kuwait","ky","cayman islands","kz","kazakhstan","la","laos","lb","lebanon","lc","saint lucia","li","liechtenstein","lk","sri lanka","lr","liberia","ls","lesotho","lt","lithuania","lu","luxembourg","lv","latvia","ly","libya","ma","morocco","mc","monaco","md","moldova","me","montenegro","mg","madagascar","mh","marshall islands","mk","macedonia","ml","mali","mm","myanmar","burma","mn","mongolia","mo","macau","mp","northern mariana islands","mq","martinique","mr","mauritania","ms","montserrat","mt","malta","mu","mauritius","mv","maldives","mw","malawi","mx","mexico","my","malaysia","mz","mozambique","na","namibia","nc","new caledonia","ne","niger","nf","norfolk island","ng","nigeria","ni","nicaragua","nl","netherlands","no","norway","np","nepal","nr","nauru","nu","niue","nz","new zealand","om","oman","pa","panama","pe","peru","pf","french polynesia","pg","new guinea","ph","philippines","pk","pakistan","pl","poland","pm","saint pierre","pn","pitcairn islands","pr","puerto rico","ps","palestine","pt","portugal","pw","palau","py","paraguay","qa","qatar","re","reunion","ro","romania","rs","serbia","ru","russia","rw","rwanda","sa","saudi arabia","sb","solomon islands","sc","seychelles","gb sct","scotland","sd","sudan","se","sweden","sg","singapore","sh","saint helena","si","slovenia","sj","svalbard","jan mayen","sk","slovakia","sl","sierra leone","sm","san marino","sn","senegal","so","somalia","sr","suriname","st","sao tome","sv","el salvador","sy","syria","sz","swaziland","tc","caicos islands","td","chad","tf","french territories","tg","togo","th","thailand","tj","tajikistan","tk","tokelau","tl","timorleste","tm","turkmenistan","tn","tunisia","to","tonga","tr","turkey","tt","trinidad","tv","tuvalu","tw","taiwan","tz","tanzania","ua","ukraine","ug","uganda","um","us minor islands","us","america","united states","uy","uruguay","uz","uzbekistan","va","vatican city","vc","saint vincent","ve","venezuela","vg","british virgin islands","vi","us virgin islands","vn","vietnam","vu","vanuatu","gb wls","wales","wf","wallis and futuna","ws","samoa","ye","yemen","yt","mayotte","za","south africa","zm","zambia","zw","zimbabwe"];o._meta={name:"Flag",type:c.META.TYPES.ELEMENT,props:{name:p}},o.propTypes={as:c.customPropTypes.as,className:u.PropTypes.string,name:u.PropTypes.oneOf(o._meta.props.name).isRequired},o.defaultProps={as:"i"},t["default"]=o},/*!************************************!*\ !*** ./src/elements/Flag/index.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Flag */282),a=n(o);t["default"]=a["default"]},/*!***************************************!*\ !*** ./src/elements/Header/Header.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.color,r=e.content,n=e.dividing,a=e.block,s=e.attached,u=e.floated,c=e.inverted,f=e.disabled,m=e.sub,h=e.size,b=e.textAlign,T=e.icon,O=e.image,_=e.children,E=e.className,j=e.subheader,w=(0,i["default"])("ui",h,t,(0,d.useKeyOrValueAndKey)(s,"attached"),(0,d.useKeyOnly)(a,"block"),(0,d.useKeyOnly)(f,"disabled"),(0,d.useKeyOnly)(n,"dividing"),(0,d.useValueAndKey)(u,"floated"),(0,d.useKeyOnly)(T===!0,"icon"),(0,d.useKeyOnly)(O===!0,"image"),(0,d.useKeyOnly)(c,"inverted"),(0,d.useKeyOnly)(m,"sub"),(0,d.useTextAlignProp)(b),E,"header"),M=(0,d.getUnhandledProps)(o,e),S=(0,d.getElementType)(o,e);if(_)return p["default"].createElement(S,l({},M,{className:w}),_);var x=y["default"].create(T),A=v["default"].create(O);return x||A?p["default"].createElement(S,l({},M,{className:w}),x||A,(r||j)&&p["default"].createElement(P["default"],null,r,(0,d.createShorthand)(g["default"],function(e){return{content:e}},j))):p["default"].createElement(S,l({},M,{className:w}),r,(0,d.createShorthand)(g["default"],function(e){return{content:e}},j))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */6),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2),f=r(/*! ../../elements/Icon */10),y=n(f),m=r(/*! ../../elements/Image */28),v=n(m),h=r(/*! ./HeaderSubheader */157),g=n(h),b=r(/*! ./HeaderContent */156),P=n(b);o._meta={name:"Header",type:d.META.TYPES.ELEMENT,props:{attached:["top","bottom"],color:d.SUI.COLORS,size:(0,s["default"])(d.SUI.SIZES,"big","massive"),floated:d.SUI.FLOATS,textAlign:d.SUI.TEXT_ALIGNMENTS}},o.propTypes={as:d.customPropTypes.as,className:c.PropTypes.string,children:c.PropTypes.node,content:d.customPropTypes.contentShorthand,icon:d.customPropTypes.every([d.customPropTypes.disallow(["image"]),c.PropTypes.oneOfType([c.PropTypes.bool,d.customPropTypes.itemShorthand])]),image:d.customPropTypes.every([d.customPropTypes.disallow(["icon"]),c.PropTypes.oneOfType([c.PropTypes.bool,d.customPropTypes.itemShorthand])]),color:c.PropTypes.oneOf(o._meta.props.color),dividing:c.PropTypes.bool,block:c.PropTypes.bool,attached:c.PropTypes.oneOfType([c.PropTypes.oneOf(o._meta.props.attached),c.PropTypes.bool]),floated:c.PropTypes.oneOf(o._meta.props.floated),inverted:c.PropTypes.bool,disabled:c.PropTypes.bool,sub:c.PropTypes.bool,size:c.PropTypes.oneOf(o._meta.props.size),subheader:d.customPropTypes.itemShorthand,textAlign:c.PropTypes.oneOf(o._meta.props.textAlign)},o.Content=P["default"],o.Subheader=g["default"],t["default"]=o},/*!**************************************!*\ !*** ./src/elements/Header/index.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Header */284),a=n(o);t["default"]=a["default"]},/*!*************************************!*\ !*** ./src/elements/Input/Input.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.action,r=e.actionPosition,n=e.children,a=e.className,l=e.disabled,i=e.error,d=e.focus,y=e.fluid,h=e.icon,b=e.iconPosition,T=e.inverted,E=e.label,j=e.labelPosition,w=e.loading,M=e.size,S=e.type,x=e.input,A=e.transparent,N=(0,m["default"])("ui",M,(0,v.useValueAndKey)(r,"action")||(0,v.useKeyOnly)(t,"action"),(0,v.useKeyOnly)(l,"disabled"),(0,v.useKeyOnly)(i,"error"),(0,v.useKeyOnly)(d,"focus"),(0,v.useKeyOnly)(y,"fluid"),(0,v.useKeyOnly)(T,"inverted"),(0,v.useValueAndKey)(j,"labeled")||(0,v.useKeyOnly)(E,"labeled"),(0,v.useKeyOnly)(w,"loading"),(0,v.useKeyOnly)(A,"transparent"),(0,v.useValueAndKey)(b,"icon")||(0,v.useKeyOnly)(h,"icon"),a,"input"),k=(0,v.getUnhandledProps)(o,e),C=(0,c["default"])(k,_),I=(0,u["default"])(e,_),K=(0,v.getElementType)(o,e);if(n)return f["default"].createElement(K,p({},C,{className:N}),n);var L=g["default"].create(t,function(e){return{className:(0,m["default"])(!(0,s["default"])(e.className,"button")&&"button")}}),U=P["default"].create(h),D=O["default"].create(E,function(e){return{className:(0,m["default"])(!(0,s["default"])(e.className,"label")&&"label",(0,s["default"])(j,"corner")&&j)}});return f["default"].createElement(K,p({},C,{className:N}),"left"===r&&L,"left"===b&&U,"right"!==j&&D,(0,v.createHTMLInput)(x||S,I),"left"!==r&&L,"left"!==b&&U,"right"===j&&D)}Object.defineProperty(t,"__esModule",{value:!0}),t.htmlInputPropNames=void 0;var a=r(/*! lodash/includes */65),s=n(a),l=r(/*! lodash/pick */41),u=n(l),i=r(/*! lodash/omit */40),c=n(i),p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d=r(/*! react */1),f=n(d),y=r(/*! classnames */3),m=n(y),v=r(/*! ../../lib */2),h=r(/*! ../../elements/Button */74),g=n(h),b=r(/*! ../../elements/Icon */10),P=n(b),T=r(/*! ../../elements/Label */77),O=n(T),_=t.htmlInputPropNames=["selected","defaultValue","defaultChecked","autoComplete","autoFocus","checked","form","max","maxLength","min","name","onChange","pattern","placeholder","readOnly","required","step","type","value"];o._meta={name:"Input",type:v.META.TYPES.ELEMENT,props:{actionPosition:["left"],iconPosition:["left"],labelPosition:["left","right","left corner","right corner"],size:v.SUI.SIZES}},o.defaultProps={type:"text"},o.propTypes={as:v.customPropTypes.as,action:d.PropTypes.oneOfType([d.PropTypes.bool,v.customPropTypes.itemShorthand]),actionPosition:d.PropTypes.oneOf(o._meta.props.actionPosition),children:d.PropTypes.node,className:d.PropTypes.string,disabled:d.PropTypes.bool,error:d.PropTypes.bool,focus:d.PropTypes.bool,fluid:d.PropTypes.bool,icon:d.PropTypes.oneOfType([d.PropTypes.bool,v.customPropTypes.itemShorthand]),iconPosition:d.PropTypes.oneOf(o._meta.props.iconPosition),inverted:d.PropTypes.bool,input:v.customPropTypes.itemShorthand,label:v.customPropTypes.itemShorthand,labelPosition:d.PropTypes.oneOf(o._meta.props.labelPosition),loading:d.PropTypes.bool,size:d.PropTypes.oneOf(o._meta.props.size),transparent:d.PropTypes.bool,type:d.PropTypes.string},t["default"]=o},/*!***********************************!*\ !*** ./src/elements/List/List.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.animated,r=e.bulleted,n=e.celled,a=e.children,u=e.className,c=e.divided,f=e.floated,y=e.horizontal,m=e.inverted,v=e.items,h=e.link,g=e.ordered,b=e.relaxed,P=e.size,T=e.selection,_=e.verticalAlign,E=(0,i["default"])("ui",P,(0,d.useKeyOnly)(t,"animated"),(0,d.useKeyOnly)(r,"bulleted"),(0,d.useKeyOnly)(n,"celled"),(0,d.useKeyOnly)(c,"divided"),(0,d.useKeyOnly)(y,"horizontal"),(0,d.useKeyOnly)(m,"inverted"),(0,d.useKeyOnly)(h,"link"),(0,d.useKeyOnly)(g,"ordered"),(0,d.useKeyOnly)(T,"selection"),(0,d.useKeyOrValueAndKey)(b,"relaxed"),(0,d.useValueAndKey)(f,"floated"),(0,d.useVerticalAlignProp)(_),"list",u),j=(0,d.getUnhandledProps)(o,e),w=(0,d.getElementType)(o,e);return a?p["default"].createElement(w,l({},j,{className:E}),a):p["default"].createElement(w,l({},j,{className:E}),(0,s["default"])(v,function(e){return O["default"].create(e)}))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/map */9),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2),f=r(/*! ./ListContent */78),y=n(f),m=r(/*! ./ListDescription */44),v=n(m),h=r(/*! ./ListHeader */45),g=n(h),b=r(/*! ./ListIcon */79),P=n(b),T=r(/*! ./ListItem */163),O=n(T),_=r(/*! ./ListList */164),E=n(_);o._meta={name:"List",type:d.META.TYPES.ELEMENT,props:{floated:d.SUI.FLOATS,relaxed:["very"],size:d.SUI.SIZES,verticalAlign:d.SUI.VERTICAL_ALIGNMENTS}},o.propTypes={as:d.customPropTypes.as,animated:c.PropTypes.bool,bulleted:c.PropTypes.bool,celled:c.PropTypes.bool,children:c.PropTypes.node,className:c.PropTypes.string,divided:c.PropTypes.bool,floated:c.PropTypes.oneOf(o._meta.props.floated),horizontal:c.PropTypes.bool,inverted:c.PropTypes.bool,items:d.customPropTypes.collectionShorthand,link:c.PropTypes.bool,ordered:c.PropTypes.bool,relaxed:c.PropTypes.oneOfType([c.PropTypes.bool,c.PropTypes.oneOf(o._meta.props.relaxed)]),selection:c.PropTypes.bool,size:c.PropTypes.oneOf(o._meta.props.size),verticalAlign:c.PropTypes.oneOf(o._meta.props.verticalAlign)},o.Content=y["default"],o.Description=v["default"],o.Header=g["default"],o.Icon=P["default"],o.Item=O["default"],o.List=E["default"],t["default"]=o},/*!************************************!*\ !*** ./src/elements/List/index.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./List */287),a=n(o);t["default"]=a["default"]},/*!***************************************!*\ !*** ./src/elements/Loader/Loader.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.children,n=e.className,s=e.content,u=e.disabled,p=e.indeterminate,d=e.inline,f=e.inverted,y=e.size,m=(0,l["default"])("ui",y,(0,c.useKeyOnly)(t,"active"),(0,c.useKeyOnly)(u,"disabled"),(0,c.useKeyOnly)(p,"indeterminate"),(0,c.useKeyOnly)(f,"inverted"),(0,c.useKeyOnly)(r||s,"text"),(0,c.useKeyOrValueAndKey)(d,"inline"),"loader",n),v=(0,c.getUnhandledProps)(o,e),h=(0,c.getElementType)(o,e);return i["default"].createElement(h,a({},v,{className:m}),r||s)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2);o._meta={name:"Loader",type:c.META.TYPES.ELEMENT,props:{inline:["centered"],size:c.SUI.SIZES}},o.propTypes={as:c.customPropTypes.as,active:u.PropTypes.bool,children:u.PropTypes.node,className:u.PropTypes.string,content:c.customPropTypes.contentShorthand,disabled:u.PropTypes.bool,indeterminate:u.PropTypes.bool,inline:u.PropTypes.oneOfType([u.PropTypes.bool,u.PropTypes.oneOf(o._meta.props.inline)]),inverted:u.PropTypes.bool,size:u.PropTypes.oneOf(o._meta.props.size)},t["default"]=o},/*!**************************************!*\ !*** ./src/elements/Loader/index.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Loader */289),a=n(o);t["default"]=a["default"]},/*!***********************************!*\ !*** ./src/elements/Rail/Rail.js ***! \***********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.attached,r=e.children,n=e.className,a=e.close,s=e.dividing,u=e.internal,c=e.position,f=e.size,y=(0,i["default"])("ui",c,f,(0,d.useKeyOnly)(t,"attached"),(0,d.useKeyOnly)(s,"dividing"),(0,d.useKeyOnly)(u,"internal"),(0,d.useKeyOrValueAndKey)(a,"close"),"rail",n),m=(0,d.getUnhandledProps)(o,e),v=(0,d.getElementType)(o,e);return p["default"].createElement(v,l({},m,{className:y}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */6),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2);o._meta={name:"Rail",type:d.META.TYPES.ELEMENT,props:{close:["very"],position:d.SUI.FLOATS,size:(0,s["default"])(d.SUI.SIZES,"medium")}},o.propTypes={as:d.customPropTypes.as,attached:c.PropTypes.bool,children:c.PropTypes.node,className:c.PropTypes.string,close:c.PropTypes.oneOfType([c.PropTypes.bool,c.PropTypes.oneOf(o._meta.props.close)]),dividing:c.PropTypes.bool,internal:c.PropTypes.bool,position:c.PropTypes.oneOf(o._meta.props.position).isRequired,size:c.PropTypes.oneOf(o._meta.props.size)},t["default"]=o},/*!************************************!*\ !*** ./src/elements/Rail/index.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Rail */291),a=n(o);t["default"]=a["default"]},/*!*****************************************!*\ !*** ./src/elements/Segment/Segment.js ***! \*****************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.attached,r=e.basic,n=e.children,a=e.circular,s=e.className,u=e.clearing,c=e.color,f=e.compact,y=e.disabled,m=e.floated,v=e.inverted,h=e.loading,g=e.padded,b=e.piled,P=e.raised,T=e.secondary,O=e.size,_=e.stacked,E=e.tertiary,j=e.textAlign,w=e.vertical,M=(0,i["default"])("ui",c,O,(0,d.useKeyOrValueAndKey)(t,"attached"),(0,d.useKeyOnly)(r,"basic"),(0,d.useKeyOnly)(a,"circular"),(0,d.useKeyOnly)(u,"clearing"),(0,d.useKeyOnly)(f,"compact"),(0,d.useKeyOnly)(y,"disabled"),(0,d.useValueAndKey)(m,"floated"),(0,d.useKeyOnly)(v,"inverted"),(0,d.useKeyOnly)(h,"loading"),(0,d.useKeyOrValueAndKey)(g,"padded"),(0,d.useKeyOnly)(b,"piled"),(0,d.useKeyOnly)(P,"raised"),(0,d.useKeyOnly)(T,"secondary"),(0,d.useKeyOnly)(_,"stacked"),(0,d.useKeyOnly)(E,"tertiary"),(0,d.useTextAlignProp)(j),(0,d.useKeyOnly)(w,"vertical"),s,"segment"),S=(0,d.getUnhandledProps)(o,e),x=(0,d.getElementType)(o,e);return p["default"].createElement(x,l({},S,{className:M}),n)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */6),s=n(a),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2),f=r(/*! ./SegmentGroup */165),y=n(f);o.Group=y["default"],o._meta={name:"Segment",type:d.META.TYPES.ELEMENT,props:{attached:["top","bottom"],color:d.SUI.COLORS,floated:d.SUI.FLOATS,padded:["very"],size:(0,s["default"])(d.SUI.SIZES,"medium"),textAlign:d.SUI.TEXT_ALIGNMENTS}},o.propTypes={as:d.customPropTypes.as,attached:c.PropTypes.oneOfType([c.PropTypes.oneOf(o._meta.props.attached),c.PropTypes.bool]),basic:c.PropTypes.bool,children:c.PropTypes.node,circular:c.PropTypes.bool,className:c.PropTypes.string,clearing:c.PropTypes.bool,color:c.PropTypes.oneOf(o._meta.props.color),compact:c.PropTypes.bool,disabled:c.PropTypes.bool,floated:c.PropTypes.oneOf(o._meta.props.floated),inverted:c.PropTypes.bool,loading:c.PropTypes.bool,padded:c.PropTypes.oneOfType([c.PropTypes.bool,c.PropTypes.oneOf(o._meta.props.padded)]),piled:c.PropTypes.bool,raised:c.PropTypes.bool,secondary:c.PropTypes.bool,size:c.PropTypes.oneOf(o._meta.props.size),stacked:c.PropTypes.bool,tertiary:c.PropTypes.bool,textAlign:c.PropTypes.oneOf(o._meta.props.textAlign),vertical:c.PropTypes.bool},t["default"]=o},/*!***************************************!*\ !*** ./src/elements/Segment/index.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Segment */293),a=n(o);t["default"]=a["default"]},/*!************************************!*\ !*** ./src/elements/Step/index.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Step */166),a=n(o);t["default"]=a["default"]},/*!**********************!*\ !*** ./src/index.js ***! \**********************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! ./addons/Confirm */261);Object.defineProperty(t,"Confirm",{enumerable:!0,get:function(){return n(o)["default"]}});var a=r(/*! ./addons/Portal */70);Object.defineProperty(t,"Portal",{enumerable:!0,get:function(){return n(a)["default"]}});var s=r(/*! ./addons/Radio */71);Object.defineProperty(t,"Radio",{enumerable:!0,get:function(){return n(s)["default"]}});var l=r(/*! ./addons/Select */128);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return n(l)["default"]}});var u=r(/*! ./addons/TextArea */129);Object.defineProperty(t,"TextArea",{enumerable:!0,get:function(){return n(u)["default"]}});var i=r(/*! ./collections/Breadcrumb */267);Object.defineProperty(t,"Breadcrumb",{enumerable:!0,get:function(){return n(i)["default"]}});var c=r(/*! ./collections/Breadcrumb/BreadcrumbDivider */130);Object.defineProperty(t,"BreadcrumbDivider",{enumerable:!0,get:function(){return n(c)["default"]}});var p=r(/*! ./collections/Breadcrumb/BreadcrumbSection */131);Object.defineProperty(t,"BreadcrumbSection",{enumerable:!0,get:function(){return n(p)["default"]}});var d=r(/*! ./collections/Form */269);Object.defineProperty(t,"Form",{enumerable:!0,get:function(){return n(d)["default"]}});var f=r(/*! ./collections/Form/FormButton */132);Object.defineProperty(t,"FormButton",{enumerable:!0,get:function(){return n(f)["default"]}});var y=r(/*! ./collections/Form/FormCheckbox */133);Object.defineProperty(t,"FormCheckbox",{enumerable:!0,get:function(){return n(y)["default"]}});var m=r(/*! ./collections/Form/FormDropdown */134);Object.defineProperty(t,"FormDropdown",{enumerable:!0,get:function(){return n(m)["default"]}});var v=r(/*! ./collections/Form/FormField */16);Object.defineProperty(t,"FormField",{enumerable:!0,get:function(){return n(v)["default"]}});var h=r(/*! ./collections/Form/FormGroup */135);Object.defineProperty(t,"FormGroup",{enumerable:!0,get:function(){return n(h)["default"]}});var g=r(/*! ./collections/Form/FormInput */136);Object.defineProperty(t,"FormInput",{enumerable:!0,get:function(){return n(g)["default"]}});var b=r(/*! ./collections/Form/FormRadio */137);Object.defineProperty(t,"FormRadio",{enumerable:!0,get:function(){return n(b)["default"]}});var P=r(/*! ./collections/Form/FormSelect */138);Object.defineProperty(t,"FormSelect",{enumerable:!0,get:function(){return n(P)["default"]}});var T=r(/*! ./collections/Form/FormTextArea */139);Object.defineProperty(t,"FormTextArea",{enumerable:!0,get:function(){return n(T)["default"]}});var O=r(/*! ./collections/Grid */271);Object.defineProperty(t,"Grid",{enumerable:!0,get:function(){return n(O)["default"]}});var _=r(/*! ./collections/Grid/GridColumn */140);Object.defineProperty(t,"GridColumn",{enumerable:!0,get:function(){return n(_)["default"]}});var E=r(/*! ./collections/Grid/GridRow */141);Object.defineProperty(t,"GridRow",{enumerable:!0,get:function(){return n(E)["default"]}});var j=r(/*! ./collections/Menu */273);Object.defineProperty(t,"Menu",{enumerable:!0,get:function(){return n(j)["default"]}});var w=r(/*! ./collections/Menu/MenuHeader */142);Object.defineProperty(t,"MenuHeader",{enumerable:!0,get:function(){return n(w)["default"]}});var M=r(/*! ./collections/Menu/MenuItem */143);Object.defineProperty(t,"MenuItem",{enumerable:!0,get:function(){return n(M)["default"]}});var S=r(/*! ./collections/Menu/MenuMenu */144);Object.defineProperty(t,"MenuMenu",{enumerable:!0,get:function(){return n(S)["default"]}});var x=r(/*! ./collections/Message */275);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return n(x)["default"]}});var A=r(/*! ./collections/Message/MessageContent */145);Object.defineProperty(t,"MessageContent",{enumerable:!0,get:function(){return n(A)["default"]}});var N=r(/*! ./collections/Message/MessageHeader */146);Object.defineProperty(t,"MessageHeader",{enumerable:!0,get:function(){return n(N)["default"]}});var k=r(/*! ./collections/Message/MessageItem */72);Object.defineProperty(t,"MessageItem",{enumerable:!0,get:function(){return n(k)["default"]}});var C=r(/*! ./collections/Message/MessageList */147);Object.defineProperty(t,"MessageList",{enumerable:!0,get:function(){return n(C)["default"]}});var I=r(/*! ./collections/Table */277);Object.defineProperty(t,"Table",{enumerable:!0,get:function(){return n(I)["default"]}});var K=r(/*! ./collections/Table/TableBody */148);Object.defineProperty(t,"TableBody",{enumerable:!0,get:function(){return n(K)["default"]}});var L=r(/*! ./collections/Table/TableCell */42);Object.defineProperty(t,"TableCell",{enumerable:!0,get:function(){return n(L)["default"]}});var U=r(/*! ./collections/Table/TableFooter */149);Object.defineProperty(t,"TableFooter",{enumerable:!0,get:function(){return n(U)["default"]}});var D=r(/*! ./collections/Table/TableHeader */73);Object.defineProperty(t,"TableHeader",{enumerable:!0,get:function(){return n(D)["default"]}});var R=r(/*! ./collections/Table/TableHeaderCell */150);Object.defineProperty(t,"TableHeaderCell",{enumerable:!0,get:function(){return n(R)["default"]}});var z=r(/*! ./collections/Table/TableRow */151);Object.defineProperty(t,"TableRow",{enumerable:!0,get:function(){return n(z)["default"]}});var W=r(/*! ./elements/Button/Button */152);Object.defineProperty(t,"Button",{enumerable:!0,get:function(){return n(W)["default"]}});var F=r(/*! ./elements/Button/ButtonContent */153);Object.defineProperty(t,"ButtonContent",{enumerable:!0,get:function(){return n(F)["default"]}});var V=r(/*! ./elements/Button/ButtonGroup */154);Object.defineProperty(t,"ButtonGroup",{enumerable:!0,get:function(){return n(V)["default"]}});var B=r(/*! ./elements/Button/ButtonOr */155);Object.defineProperty(t,"ButtonOr",{enumerable:!0,get:function(){return n(B)["default"]}});var Y=r(/*! ./elements/Container */279);Object.defineProperty(t,"Container",{enumerable:!0,get:function(){return n(Y)["default"]}});var q=r(/*! ./elements/Divider */281);Object.defineProperty(t,"Divider",{enumerable:!0,get:function(){return n(q)["default"]}});var H=r(/*! ./elements/Flag */283);Object.defineProperty(t,"Flag",{enumerable:!0,get:function(){return n(H)["default"]}});var G=r(/*! ./elements/Header */285);Object.defineProperty(t,"Header",{enumerable:!0,get:function(){return n(G)["default"]}});var Z=r(/*! ./elements/Header/HeaderContent */156);Object.defineProperty(t,"HeaderContent",{enumerable:!0,get:function(){return n(Z)["default"]}});var $=r(/*! ./elements/Header/HeaderSubheader */157);Object.defineProperty(t,"HeaderSubheader",{enumerable:!0,get:function(){return n($)["default"]}});var X=r(/*! ./elements/Icon */10);Object.defineProperty(t,"Icon",{enumerable:!0,get:function(){return n(X)["default"]}});var Q=r(/*! ./elements/Icon/IconGroup */158);Object.defineProperty(t,"IconGroup",{enumerable:!0,get:function(){return n(Q)["default"]}});var J=r(/*! ./elements/Image */28);Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return n(J)["default"]}});var ee=r(/*! ./elements/Image/ImageGroup */160);Object.defineProperty(t,"ImageGroup",{enumerable:!0,get:function(){return n(ee)["default"]}});var te=r(/*! ./elements/Input */75);Object.defineProperty(t,"Input",{enumerable:!0,get:function(){return n(te)["default"]}});var re=r(/*! ./elements/Label */77);Object.defineProperty(t,"Label",{enumerable:!0,get:function(){return n(re)["default"]}});var ne=r(/*! ./elements/Label/LabelDetail */161);Object.defineProperty(t,"LabelDetail",{enumerable:!0,get:function(){return n(ne)["default"]}});var oe=r(/*! ./elements/Label/LabelGroup */162);Object.defineProperty(t,"LabelGroup",{enumerable:!0,get:function(){return n(oe)["default"]}});var ae=r(/*! ./elements/List */288);Object.defineProperty(t,"List",{enumerable:!0,get:function(){return n(ae)["default"]}});var se=r(/*! ./elements/List/ListContent */78);Object.defineProperty(t,"ListContent",{enumerable:!0,get:function(){return n(se)["default"]}});var le=r(/*! ./elements/List/ListDescription */44);Object.defineProperty(t,"ListDescription",{enumerable:!0,get:function(){return n(le)["default"]}});var ue=r(/*! ./elements/List/ListHeader */45);Object.defineProperty(t,"ListHeader",{enumerable:!0,get:function(){return n(ue)["default"]}});var ie=r(/*! ./elements/List/ListIcon */79);Object.defineProperty(t,"ListIcon",{enumerable:!0,get:function(){return n(ie)["default"]}});var ce=r(/*! ./elements/List/ListItem */163);Object.defineProperty(t,"ListItem",{enumerable:!0,get:function(){return n(ce)["default"]}});var pe=r(/*! ./elements/List/ListList */164);Object.defineProperty(t,"ListList",{enumerable:!0,get:function(){return n(pe)["default"]}});var de=r(/*! ./elements/Loader */290);Object.defineProperty(t,"Loader",{enumerable:!0,get:function(){return n(de)["default"]}});var fe=r(/*! ./elements/Rail */292);Object.defineProperty(t,"Rail",{enumerable:!0,get:function(){return n(fe)["default"]}});var ye=r(/*! ./elements/Segment */294);Object.defineProperty(t,"Segment",{enumerable:!0,get:function(){return n(ye)["default"]}});var me=r(/*! ./elements/Segment/SegmentGroup */165);Object.defineProperty(t,"SegmentGroup",{enumerable:!0,get:function(){return n(me)["default"]}});var ve=r(/*! ./elements/Step */295);Object.defineProperty(t,"Step",{enumerable:!0,get:function(){return n(ve)["default"]}});var he=r(/*! ./elements/Step/StepContent */167);Object.defineProperty(t,"StepContent",{enumerable:!0,get:function(){return n(he)["default"]}});var ge=r(/*! ./elements/Step/StepDescription */80);Object.defineProperty(t,"StepDescription",{enumerable:!0,get:function(){return n(ge)["default"]}});var be=r(/*! ./elements/Step/StepGroup */168);Object.defineProperty(t,"StepGroup",{enumerable:!0,get:function(){return n(be)["default"]}});var Pe=r(/*! ./elements/Step/StepTitle */81);Object.defineProperty(t,"StepTitle",{enumerable:!0,get:function(){return n(Pe)["default"]}});var Te=r(/*! ./modules/Accordion/Accordion */309);Object.defineProperty(t,"Accordion",{enumerable:!0,get:function(){return n(Te)["default"]}});var Oe=r(/*! ./modules/Accordion/AccordionContent */169);Object.defineProperty(t,"AccordionContent",{enumerable:!0,get:function(){return n(Oe)["default"]}});var _e=r(/*! ./modules/Accordion/AccordionTitle */170);Object.defineProperty(t,"AccordionTitle",{enumerable:!0,get:function(){return n(_e)["default"]}});var Ee=r(/*! ./modules/Checkbox */46);Object.defineProperty(t,"Checkbox",{enumerable:!0,get:function(){return n(Ee)["default"]}});var je=r(/*! ./modules/Dropdown */83);Object.defineProperty(t,"Dropdown",{enumerable:!0,get:function(){return n(je)["default"]}});var we=r(/*! ./modules/Dropdown/DropdownDivider */171);Object.defineProperty(t,"DropdownDivider",{enumerable:!0,get:function(){return n(we)["default"]}});var Me=r(/*! ./modules/Dropdown/DropdownHeader */172);Object.defineProperty(t,"DropdownHeader",{enumerable:!0,get:function(){return n(Me)["default"]}});var Se=r(/*! ./modules/Dropdown/DropdownItem */173);Object.defineProperty(t,"DropdownItem",{enumerable:!0,get:function(){return n(Se)["default"]}});var xe=r(/*! ./modules/Dropdown/DropdownMenu */174);Object.defineProperty(t,"DropdownMenu",{enumerable:!0,get:function(){return n(xe)["default"]}});var Ae=r(/*! ./modules/Modal */179);Object.defineProperty(t,"Modal",{enumerable:!0,get:function(){return n(Ae)["default"]}});var Ne=r(/*! ./modules/Modal/ModalActions */175);Object.defineProperty(t,"ModalActions",{enumerable:!0,get:function(){return n(Ne)["default"]}});var ke=r(/*! ./modules/Modal/ModalContent */176);Object.defineProperty(t,"ModalContent",{enumerable:!0,get:function(){return n(ke)["default"]}});var Ce=r(/*! ./modules/Modal/ModalDescription */177);Object.defineProperty(t,"ModalDescription",{enumerable:!0,get:function(){return n(Ce)["default"]}});var Ie=r(/*! ./modules/Modal/ModalHeader */178);Object.defineProperty(t,"ModalHeader",{enumerable:!0,get:function(){return n(Ie)["default"]}});var Ke=r(/*! ./modules/Popup */314);Object.defineProperty(t,"Popup",{enumerable:!0,get:function(){return n(Ke)["default"]}});var Le=r(/*! ./modules/Popup/PopupContent */180);Object.defineProperty(t,"PopupContent",{enumerable:!0,get:function(){return n(Le)["default"]}});var Ue=r(/*! ./modules/Popup/PopupHeader */181);Object.defineProperty(t,"PopupHeader",{enumerable:!0,get:function(){return n(Ue)["default"]}});var De=r(/*! ./modules/Progress */316);Object.defineProperty(t,"Progress",{enumerable:!0,get:function(){return n(De)["default"]}});var Re=r(/*! ./modules/Rating */319);Object.defineProperty(t,"Rating",{enumerable:!0,get:function(){return n(Re)["default"]}});var ze=r(/*! ./modules/Search */321);Object.defineProperty(t,"Search",{enumerable:!0,get:function(){return n(ze)["default"]}});var We=r(/*! ./modules/Search/SearchCategory */182);Object.defineProperty(t,"SearchCategory",{enumerable:!0,get:function(){return n(We)["default"]}});var Fe=r(/*! ./modules/Search/SearchResult */183);Object.defineProperty(t,"SearchResult",{enumerable:!0,get:function(){return n(Fe)["default"]}});var Ve=r(/*! ./modules/Search/SearchResults */184);Object.defineProperty(t,"SearchResults",{enumerable:!0,get:function(){return n(Ve)["default"]}});var Be=r(/*! ./views/Card/Card */185);Object.defineProperty(t,"Card",{enumerable:!0,get:function(){return n(Be)["default"]}});var Ye=r(/*! ./views/Card/CardContent */186);Object.defineProperty(t,"CardContent",{enumerable:!0,get:function(){return n(Ye)["default"]}});var qe=r(/*! ./views/Card/CardDescription */84);Object.defineProperty(t,"CardDescription",{enumerable:!0,get:function(){return n(qe)["default"]}});var He=r(/*! ./views/Card/CardGroup */187);Object.defineProperty(t,"CardGroup",{enumerable:!0,get:function(){return n(He)["default"]}});var Ge=r(/*! ./views/Card/CardHeader */85);Object.defineProperty(t,"CardHeader",{enumerable:!0,get:function(){return n(Ge)["default"]}});var Ze=r(/*! ./views/Card/CardMeta */86);Object.defineProperty(t,"CardMeta",{enumerable:!0,get:function(){return n(Ze)["default"]}});var $e=r(/*! ./views/Comment */323);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return n($e)["default"]}});var Xe=r(/*! ./views/Comment/CommentAction */188);Object.defineProperty(t,"CommentAction",{enumerable:!0,get:function(){return n(Xe)["default"]}});var Qe=r(/*! ./views/Comment/CommentActions */189);Object.defineProperty(t,"CommentActions",{enumerable:!0,get:function(){return n(Qe)["default"]}});var Je=r(/*! ./views/Comment/CommentAuthor */190);Object.defineProperty(t,"CommentAuthor",{enumerable:!0,get:function(){return n(Je)["default"]}});var et=r(/*! ./views/Comment/CommentAvatar */191);Object.defineProperty(t,"CommentAvatar",{enumerable:!0,get:function(){return n(et)["default"]}});var tt=r(/*! ./views/Comment/CommentContent */192);Object.defineProperty(t,"CommentContent",{enumerable:!0,get:function(){return n(tt)["default"]}});var rt=r(/*! ./views/Comment/CommentGroup */193);Object.defineProperty(t,"CommentGroup",{enumerable:!0,get:function(){return n(rt)["default"]}});var nt=r(/*! ./views/Comment/CommentMetadata */194);Object.defineProperty(t,"CommentMetadata",{enumerable:!0,get:function(){return n(nt)["default"]}});var ot=r(/*! ./views/Comment/CommentText */195);Object.defineProperty(t,"CommentText",{enumerable:!0,get:function(){return n(ot)["default"]}});var at=r(/*! ./views/Feed */325);Object.defineProperty(t,"Feed",{enumerable:!0,get:function(){return n(at)["default"]}});var st=r(/*! ./views/Feed/FeedContent */87);Object.defineProperty(t,"FeedContent",{enumerable:!0,get:function(){return n(st)["default"]}});var lt=r(/*! ./views/Feed/FeedDate */47);Object.defineProperty(t,"FeedDate",{enumerable:!0,get:function(){return n(lt)["default"]}});var ut=r(/*! ./views/Feed/FeedEvent */196);Object.defineProperty(t,"FeedEvent",{enumerable:!0,get:function(){return n(ut)["default"]}});var it=r(/*! ./views/Feed/FeedExtra */88);Object.defineProperty(t,"FeedExtra",{enumerable:!0,get:function(){return n(it)["default"]}});var ct=r(/*! ./views/Feed/FeedLabel */89);Object.defineProperty(t,"FeedLabel",{enumerable:!0,get:function(){return n(ct)["default"]}});var pt=r(/*! ./views/Feed/FeedLike */90);Object.defineProperty(t,"FeedLike",{enumerable:!0,get:function(){return n(pt)["default"]}});var dt=r(/*! ./views/Feed/FeedMeta */91);Object.defineProperty(t,"FeedMeta",{enumerable:!0,get:function(){return n(dt)["default"]}});var ft=r(/*! ./views/Feed/FeedSummary */92);Object.defineProperty(t,"FeedSummary",{enumerable:!0,get:function(){return n(ft)["default"]}});var yt=r(/*! ./views/Feed/FeedUser */93);Object.defineProperty(t,"FeedUser",{enumerable:!0,get:function(){return n(yt)["default"]}});var mt=r(/*! ./views/Item */326);Object.defineProperty(t,"Item",{enumerable:!0,get:function(){return n(mt)["default"]}});var vt=r(/*! ./views/Item/ItemContent */198);Object.defineProperty(t,"ItemContent",{enumerable:!0,get:function(){return n(vt)["default"]}});var ht=r(/*! ./views/Item/ItemDescription */94);Object.defineProperty(t,"ItemDescription",{enumerable:!0,get:function(){return n(ht)["default"]}});var gt=r(/*! ./views/Item/ItemExtra */95);Object.defineProperty(t,"ItemExtra",{enumerable:!0,get:function(){return n(gt)["default"]}});var bt=r(/*! ./views/Item/ItemGroup */199);Object.defineProperty(t,"ItemGroup",{enumerable:!0,get:function(){return n(bt)["default"]}});var Pt=r(/*! ./views/Item/ItemHeader */96);Object.defineProperty(t,"ItemHeader",{enumerable:!0,get:function(){return n(Pt)["default"]}});var Tt=r(/*! ./views/Item/ItemImage */200);Object.defineProperty(t,"ItemImage",{enumerable:!0,get:function(){return n(Tt)["default"]}});var Ot=r(/*! ./views/Item/ItemMeta */97);Object.defineProperty(t,"ItemMeta",{enumerable:!0,get:function(){return n(Ot)["default"]}});var _t=r(/*! ./views/Statistic */327);Object.defineProperty(t,"Statistic",{enumerable:!0,get:function(){return n(_t)["default"]}});var Et=r(/*! ./views/Statistic/StatisticGroup */202);Object.defineProperty(t,"StatisticGroup",{enumerable:!0,get:function(){return n(Et)["default"]}});var jt=r(/*! ./views/Statistic/StatisticLabel */203);Object.defineProperty(t,"StatisticLabel",{enumerable:!0,get:function(){return n(jt)["default"]}});var wt=r(/*! ./views/Statistic/StatisticValue */204);Object.defineProperty(t,"StatisticValue",{enumerable:!0,get:function(){return n(wt)["default"]}})},/*!********************************************!*\ !*** ./src/lib/AutoControlledComponent.js ***! \********************************************/ function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/omit */40),u=n(l),i=r(/*! lodash/difference */445),c=n(i),p=r(/*! lodash/pick */41),d=n(p),f=r(/*! lodash/filter */121),y=n(f),m=r(/*! lodash/isEmpty */124),v=n(m),h=r(/*! lodash/keys */8),g=n(h),b=r(/*! lodash/intersection */470),P=n(b),T=r(/*! lodash/each */64),O=n(T),_=r(/*! lodash/has */23),E=n(_),j=r(/*! lodash/transform */257),w=n(j),M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),x=function C(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:C(o,t,r)}if("value"in n)return n.value;var a=n.get;if(void 0!==a)return a.call(r)},A=r(/*! react */1),N=function(e){return"default"+(e[0].toUpperCase()+e.slice(1))},k=function(t){function r(){var t,n,s,l;o(this,r);for(var i=arguments.length,p=Array(i),f=0;f<i;f++)p[f]=arguments[f];return n=s=a(this,(t=r.__proto__||Object.getPrototypeOf(r)).call.apply(t,[this].concat(p))),s.trySetState=function(t,r){var n=s.constructor.autoControlledProps;if("production"!==e.env.NODE_ENV){var o=s.constructor.name,a=(0,c["default"])((0,g["default"])(t),n);(0,v["default"])(a)||console.error([o+' called trySetState() with controlled props: "'+a+'".',"State will not be set.","Only props in static autoControlledProps will be set on state."].join(" "))}var l=(0,u["default"])((0,d["default"])(t,n),(0,g["default"])(s.props));r&&(l=M({},l,r)),(0,v["default"])(l)||s.setState(l)},l=n,a(s,l)}return s(r,t),S(r,[{key:"componentWillMount",value:function(){var t=this;x(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillMount",this)&&x(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillMount",this).call(this);var n=this.constructor.autoControlledProps;this.state=(0,w["default"])(n,function(r,n){var o=N(n);if((0,E["default"])(t.props,o)?r[n]=t.props[o]:(0,E["default"])(t.props,n)?r[n]=t.props[n]:"checked"===n?r[n]=!1:"value"===n&&(r[n]=t.props.multiple?[]:""),"production"!==e.env.NODE_ENV){var a=t.constructor.name;o in t.props&&n in t.props&&console.error(a+' prop "'+n+'" is auto controlled. Specify either '+o+" or "+n+", but not both.")}},{}),"production"!==e.env.NODE_ENV&&!function(){var e=t.constructor,r=e.defaultProps,o=e.name,a=e.propTypes;n||console.error("Auto controlled "+o+" must specify a static autoControlledProps array."),(0,O["default"])(n,function(e){var t=N(e);(0,E["default"])(a,t)||console.error(o+' is missing "'+t+'" propTypes validation for auto controlled prop "'+e+'".'),(0,E["default"])(a,e)||console.error(o+' is missing propTypes validation for auto controlled prop "'+e+'".')});var s=(0,P["default"])(n,(0,g["default"])(r));(0,v["default"])(s)||console.error(["Do not set defaultProps for autoControlledProps,","use trySetState() in constructor() or componentWillMount() instead.","See "+o+' props: "'+s+'".'].join(" "));var l=(0,y["default"])(n,function(e){return e.startsWith("default")});(0,v["default"])(l)||console.error(["Do not add default props to autoControlledProps.","Default props are automatically handled.","See "+o+' autoControlledProps: "'+l+'".'].join(" "))}()}},{key:"componentWillReceiveProps",value:function(e){x(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillReceiveProps",this)&&x(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillReceiveProps",this).call(this,e);var t=(0,d["default"])(e,this.constructor.autoControlledProps);(0,v["default"])(t)||this.setState(t)}}]),r}(A.Component);t["default"]=k}).call(t,r(/*! ./~/node-libs-browser/~/process/browser.js */69))},/*!*************************!*\ !*** ./src/lib/META.js ***! \*************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.isPrivate=t.isChild=t.isParent=t.isModule=t.isView=t.isElement=t.isCollection=t.isAddon=t.isType=t.isMeta=t.TYPES=void 0;var o=r(/*! lodash/fp/startsWith */466),a=n(o),s=r(/*! lodash/fp/has */457),l=n(s),u=r(/*! lodash/fp/eq */455),i=n(u),c=r(/*! lodash/fp/flow */245),p=n(c),d=r(/*! lodash/fp/curry */454),f=n(d),y=r(/*! lodash/fp/get */456),m=n(y),v=r(/*! lodash/fp/includes */458),h=n(v),g=r(/*! lodash/fp/values */467),b=n(g),P=t.TYPES={ADDON:"addon",COLLECTION:"collection",ELEMENT:"element",VIEW:"view",MODULE:"module"},T=(0,b["default"])(P),O=t.isMeta=function(e){return(0,h["default"])((0,m["default"])("type",e),T)},_=function(e){return O(e)?e:O((0,m["default"])("_meta",e))?e._meta:O((0,m["default"])("constructor._meta",e))?e.constructor._meta:void 0},E=(0,f["default"])(function(e,t,r){return(0,p["default"])(_,(0,m["default"])(e),(0,i["default"])(t))(r)}),j=t.isType=E("type");t.isAddon=j(P.ADDON),t.isCollection=j(P.COLLECTION),t.isElement=j(P.ELEMENT),t.isView=j(P.VIEW),t.isModule=j(P.MODULE),t.isParent=(0,p["default"])(_,(0,l["default"])("parent"),(0,i["default"])(!1)),t.isChild=(0,p["default"])(_,(0,l["default"])("parent")),t.isPrivate=(0,p["default"])(_,(0,m["default"])("name"),(0,a["default"])("_"))},/*!************************!*\ !*** ./src/lib/SUI.js ***! \************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.ICONS=t.WIDTHS=t.VERTICAL_ALIGNMENTS=t.TEXT_ALIGNMENTS=t.SIZES=t.FLOATS=t.COLORS=void 0;var a=r(/*! lodash/values */127),s=n(a),l=r(/*! lodash/keys */8),u=n(l),i=r(/*! ./numberToWord */82);t.COLORS=["red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","black"],t.FLOATS=["left","right"],t.SIZES=["mini","tiny","small","medium","large","big","huge","massive"],t.TEXT_ALIGNMENTS=["left","center","right","justified"],t.VERTICAL_ALIGNMENTS=["bottom","middle","top"],t.WIDTHS=[].concat(o((0,u["default"])(i.numberToWordMap)),o((0,u["default"])(i.numberToWordMap).map(Number)),o((0,s["default"])(i.numberToWordMap))),t.ICONS=["add to calendar","alarm outline","alarm mute outline","alarm mute","alarm","at","browser","bug","calendar outline","calendar","checked calendar","cloud","code","comment outline","comment","comments outline","comments","copyright","creative commons","dashboard","delete calendar","external square","external","eyedropper","feed","find","hand pointer","hashtag","heartbeat","history","home","hourglass empty","hourglass end","hourglass full","hourglass half","hourglass start","idea","image","inbox","industry","lab","mail outline","mail square","mail","mouse pointer","options","paint brush","payment","percent","privacy","protect","registered","remove from calendar","search","setting","settings","shop","shopping bag","shopping basket","signal","sitemap","tag","tags","tasks","terminal","text telephone","ticket","trademark","trophy","wifi","add to cart","add user","adjust","archive","ban","bookmark","call","call square","clone","cloud download","cloud upload","talk","talk outline","compress","configure","download","edit","erase","exchange","expand","external share","filter","hide","in cart","lock","mail forward","object group","object ungroup","pin","print","random","recycle","refresh","remove bookmark","remove user","repeat","reply all","reply","retweet","send","send outline","share alternate","share alternate square","share","share square","sign in","sign out","theme","translate","undo","unhide","unlock alternate","unlock","upload","wait","wizard","write","write square","announcement","birthday","help circle","help","info circle","info","warning circle","warning","warning sign","child","doctor","handicap","spy","student","user","users","female","gay","genderless","heterosexual","intergender","lesbian","male","man","neuter","non binary transgender","other gender horizontal","other gender","other gender vertical","transgender","woman","block layout","crop","grid layout","list layout","maximize","resize horizontal","resize vertical","zoom","zoom out","anchor","bar","bomb","book","bullseye","calculator","cocktail","diamond","fax","fire extinguisher","fire","flag checkered","flag","flag outline","gift","hand lizard","hand peace","hand paper","hand rock","hand scissors","hand spock","law","leaf","legal","lemon","life ring","lightning","magnet","money","moon","plane","puzzle","road","rocket","shipping","soccer","sticky note","sticky note outline","suitcase","sun","travel","treatment","umbrella","world","asterisk","certificate","circle","circle notched","circle thin","crosshairs","cube","cubes","ellipsis horizontal","ellipsis vertical","quote left","quote right","spinner","square","square outline","add circle","add square","check circle","check circle outline","check square","checkmark box","checkmark","minus circle","minus","minus square","minus square outline","move","plus","plus square outline","radio","remove circle","remove circle outline","remove","selected radio","toggle off","toggle on","area chart","bar chart","camera retro","film","line chart","newspaper","photo","pie chart","sound","angle double down","angle double left","angle double right","angle double up","angle down","angle left","angle right","angle up","arrow circle down","arrow circle left","arrow circle outline down","arrow circle outline left","arrow circle outline right","arrow circle outline up","arrow circle right","arrow circle up","arrow down","arrow left","arrow right","arrow up","caret down","caret left","caret right","caret up","chevron circle down","chevron circle left","chevron circle right","chevron circle up","chevron down","chevron left","chevron right","chevron up","long arrow down","long arrow left","long arrow right","long arrow up","pointing down","pointing left","pointing right","pointing up","toggle down","toggle left","toggle right","toggle up","mobile","tablet","battery empty","battery full","battery low","battery medium","desktop","disk outline","game","high battery","keyboard","laptop","plug","power","file archive outline","file audio outline","file code outline","file excel outline","file","file image outline","file outline","file pdf outline","file powerpoint outline","file text","file text outline","file video outline","file word outline","folder","folder open","folder open outline","folder outline","level down","level up","trash","trash outline","barcode","bluetooth alternative","bluetooth","css3","database","fork","html5","openid","qrcode","rss","rss square","server","usb","empty heart","empty star","frown","heart","meh","smile","star half empty","star half","star","thumbs down","thumbs outline down","thumbs outline up","thumbs up","backward","closed captioning","eject","fast backward","fast forward","forward","music","mute","pause circle","pause circle outline","pause","play","record","step backward","step forward","stop circle","stop circle outline","stop","unmute","video play","video play outline","volume down","volume off","volume up","bicycle","building","building outline","bus","car","coffee","compass","emergency","first aid","food","h","hospital","hotel","location arrow","map","map outline","map pin","map signs","marker","military","motorcycle","paw","ship","space shuttle","spoon","street view","subway","taxi","train","television","tree","university","columns","sort alphabet ascending","sort alphabet descending","sort ascending","sort content ascending","sort content descending","sort descending","sort","sort numeric ascending","sort numeric descending","table","align center","align justify","align left","align right","attach","bold","content","copy","cut","font","header","indent","italic","linkify","list","ordered list","outdent","paragraph","paste","save","strikethrough","subscript","superscript","text cursor","text height","text width","underline","unlinkify","unordered list","bitcoin","dollar","euro","lira","pound","ruble","rupee","shekel","won","yen","american express","credit card alternative","diners club","discover","google wallet","japan credit bureau","mastercard","paypal card","paypal","stripe","visa","wheelchair","asl interpreting","assistive listening systems","audio description","blind","braille","deafness","low vision","sign language","universal access","volume control phone","500px","adn","amazon","android","angellist","apple","behance","behance square","bitbucket","bitbucket square","black tie","buysellads","chrome","codepen","codiepie","connectdevelop","contao","dashcube","delicious","deviantart","digg","dribbble","dropbox","drupal","empire","envira gallery","expeditedssl","facebook","facebook f","facebook square","firefox","first order","flickr","font awesome","fonticons","fort awesome","forumbee","foursquare","gg","gg circle","git","git square","github","github alternate","github square","gitlab","gittip","glide","glide g","google","google plus","google plus circle","google plus square","hacker news","houzz","instagram","internet explorer","ioxhost","joomla","jsfiddle","lastfm","lastfm square","leanpub","linkedin","linkedin square","linux","maxcdn","meanpath","medium","microsoft edge","mixcloud","modx","odnoklassniki","odnoklassniki square","opencart","opera","optinmonster","pagelines","pied piper","pied piper alternate","pied piper hat","pinterest","pinterest square","pocket","product hunt","qq","rebel","reddit","reddit alien","reddit square","renren","safari","scribd","sellsy","shirtsinbulk","simplybuilt","skyatlas","skype","slack","slideshare","snapchat","snapchat ghost","snapchat square","soundcloud","spotify","stack exchange","stack overflow","steam","steam square","stumbleupon","stumbleupon circle","tencent weibo","themeisle","trello","tripadvisor","tumblr","tumblr square","twitch","twitter","twitter square","viacoin","viadeo","viadeo square","vimeo","vimeo square","vine","vk","wechat","weibo","whatsapp","wikipedia","windows","wordpress","wpbeginner","wpforms","xing","xing square","y combinator","yahoo","yelp","yoast","youtube","youtube play","youtube square"]},/*!**********************************!*\ !*** ./src/lib/childrenUtils.js ***! \**********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.findByType=t.someByType=void 0;var o=r(/*! lodash/find */122),a=n(o),s=r(/*! lodash/some */253),l=n(s),u=r(/*! react */1);t.someByType=function(e,t){return(0,l["default"])(u.Children.toArray(e),{type:t})},t.findByType=function(e,t){return(0,a["default"])(u.Children.toArray(e),{type:t})}},/*!**************************************!*\ !*** ./src/lib/classNameBuilders.js ***! \**************************************/ function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useVerticalAlignProp=t.useTextAlignProp=t.useWidthProp=t.useKeyOrValueAndKey=t.useValueAndKey=t.useKeyOnly=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},o=r(/*! ./numberToWord */82),a=(t.useKeyOnly=function(e,t){return e&&t},t.useValueAndKey=function(e,t){return e&&e!==!0&&e+" "+t});t.useKeyOrValueAndKey=function(e,t){return e&&(e===!0?t:e+" "+t)},t.useWidthProp=function(e){var t=arguments.length<=1||void 0===arguments[1]?"":arguments[1],r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];if(r&&"equal"===e)return"equal width";var a="undefined"==typeof e?"undefined":n(e);return"string"!==a&&"number"!==a||!t?(0,o.numberToWord)(e):(0,o.numberToWord)(e)+" "+t},t.useTextAlignProp=function(e){return"justified"===e?"justified":a(e,"aligned")},t.useVerticalAlignProp=function(e){return a(e,"aligned")}},/*!************************************!*\ !*** ./src/lib/customPropTypes.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function a(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.deprecate=t.collectionShorthand=t.itemShorthand=t.contentShorthand=t.demand=t.givenProps=t.some=t.every=t.disallow=t.as=void 0;var s=r(/*! lodash/fp/isObject */461),l=n(s),u=r(/*! lodash/fp/pick */465),i=n(u),c=r(/*! lodash/fp/keys */463),p=n(c),d=r(/*! lodash/fp/isPlainObject */462),f=n(d),y=r(/*! lodash/fp/isFunction */459),m=n(y),v=r(/*! lodash/fp/compact */453),h=n(v),g=r(/*! lodash/fp/map */464),b=n(g),P=r(/*! lodash/fp/flow */245),T=n(P),O=r(/*! lodash/fp/isNil */460),_=n(O),E=a([" See `","` prop in `","`."],[" See \\`","\\` prop in \\`","\\`."]),j=r(/*! react */1),w=function(){var e;return(e=Object.prototype.toString).call.apply(e,arguments)},M=(t.as=function(){return j.PropTypes.oneOfType([j.PropTypes.string,j.PropTypes.func]).apply(void 0,arguments)},t.disallow=function(e){return function(t,r,n){if(!Array.isArray(e))throw new Error(["Invalid argument supplied to disallow, expected an instance of array."(E,r,n)].join(""));if(!(0,_["default"])(t[r])&&t[r]!==!1){var a=e.reduce(function(e,r){return(0,_["default"])(t[r])||t[r]===!1?e:[].concat(o(e),[r])},[]);return a.length>0?new Error(["Prop `"+r+"` in `"+n+"` conflicts with props: `"+a.join("`, `")+"`.","They cannot be defined together, choose one or the other."].join(" ")):void 0}}}),S=t.every=function(e){return function(t,r,n){for(var o=arguments.length,a=Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];if(!Array.isArray(e))throw new Error(["Invalid argument supplied to every, expected an instance of array.","See `"+r+"` prop in `"+n+"`."].join(" "));var l=(0,T["default"])((0,b["default"])(function(e){if("function"!=typeof e)throw new Error('every() argument "validators" should contain functions, found: '+w(e)+".");return e.apply(void 0,[t,r,n].concat(a))}),h["default"])(e);return l[0]}},x=(t.some=function(e){return function(t,r,n){for(var o=arguments.length,a=Array(o>3?o-3:0),s=3;s<o;s++)a[s-3]=arguments[s];if(!Array.isArray(e))throw new Error(["Invalid argument supplied to some, expected an instance of array.","See `"+r+"` prop in `"+n+"`."].join(" "));var l=(0,h["default"])((0,b["default"])(e,function(e){if(!(0,m["default"])(e))throw new Error('some() argument "validators" should contain functions, found: '+w(e)+".");return e.apply(void 0,[t,r,n].concat(a))}));if(l.length===e.length){var u=new Error("One of these validators must pass:");return u.message+="\n"+(0,b["default"])(l,function(e,t){return"["+(t+1)+"]: "+e.message}).join("\n"),u}}},t.givenProps=function(e,t){return function(r,n,o){for(var a=arguments.length,s=Array(a>3?a-3:0),u=3;u<a;u++)s[u-3]=arguments[u];if(!(0,f["default"])(e))throw new Error(["Invalid argument supplied to givenProps, expected an object.","See `"+n+"` prop in `"+o+"`."].join(" "));if("function"!=typeof t)throw new Error(["Invalid argument supplied to givenProps, expected a function.","See `"+n+"` prop in `"+o+"`."].join(" "));var c=(0,p["default"])(e).every(function(t){var a=e[t];return"function"==typeof a?!a.apply(void 0,[r,t,o].concat(s)):a===r[n]});if(c){var d=t.apply(void 0,[r,n,o].concat(s));if(d){var y="{ "+(0,p["default"])((0,i["default"])((0,p["default"])(e),r)).map(function(e){var t=r[e],n=t;return"string"==typeof t?n='"'+t+'"':Array.isArray(t)?n="["+t.join(", ")+"]":(0,l["default"])(t)&&(n="{...}"),e+": "+n}).join(", ")+" }";return d.message="Given props "+y+": "+d.message,d}}}},t.demand=function(e){return function(t,r,n){if(!Array.isArray(e))throw new Error(["Invalid `requiredProps` argument supplied to require, expected an instance of array."(E,r,n)].join(""));if(void 0!==t[r]){var o=e.filter(function(e){return void 0===t[e]});return o.length>0?new Error("`"+r+"` prop in `"+n+"` requires props: `"+o.join("`, `")+"`."):void 0}}},t.contentShorthand=function(){return S([M(["children"]),j.PropTypes.node]).apply(void 0,arguments)},t.itemShorthand=function(){return S([M(["children"]),j.PropTypes.oneOfType([j.PropTypes.node,j.PropTypes.object])]).apply(void 0,arguments)});t.collectionShorthand=function(){return S([M(["children"]),j.PropTypes.arrayOf(x)]).apply(void 0,arguments)},t.deprecate=function(e,t){return function(r,n,o){for(var a=arguments.length,s=Array(a>3?a-3:0),l=3;l<a;l++)s[l-3]=arguments[l];if("string"!=typeof e)throw new Error(["Invalid `help` argument supplied to deprecate, expected a string.","See `"+n+"` prop in `"+o+"`."].join(" "));if(void 0!==r[n]){var u=new Error("The `"+n+"` prop in `"+o+"` is deprecated.");if(e&&(u.message+=" "+e),t){if("function"!=typeof t)throw new Error(["Invalid argument supplied to deprecate, expected a function.","See `"+n+"` prop in `"+o+"`."].join(" "));var i=t.apply(void 0,[r,n,o].concat(s));i&&(u.message=u.message+" "+i.message)}return u}}}},/*!**************************!*\ !*** ./src/lib/debug.js ***! \**************************/ function(e,t,r){(function(e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=void 0,o=function(){};n="production"!==e.env.NODE_ENV&&"test"!==e.env.NODE_ENV?r(/*! debug */328):function(){return o};var a=t.makeDebugger=function(e){return n("semanticUIReact:"+e)};t.debug=a("log")}).call(t,r(/*! ./~/node-libs-browser/~/process/browser.js */69))},/*!******************************!*\ !*** ./src/lib/factories.js ***! \******************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t,r){var n=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];if("function"!=typeof e&&"string"!=typeof e)throw new Error("createShorthandFactory() Component must be a string or function.");if(null===r)return null;var o=void 0,a={};(0,E.isValidElement)(r)?(o="element",a=r.props):(0,v["default"])(r)?(o="props",a=r):((0,y["default"])(r)||(0,d["default"])(r)||(0,c["default"])(r))&&(o="literal",a=t(r)),n=(0,g["default"])(n)?n(a):n;var s=w(n,a);return"element"===o?(0,E.cloneElement)(r,s):"props"===o||"literal"===o?j["default"].createElement(e,s):null}function s(e,t){if("function"!=typeof e&&"string"!=typeof e)throw new Error("createShorthandFactory() Component must be a string or function.");return(0,u["default"])(a,e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.createHTMLInput=t.createHTMLImage=void 0;var l=r(/*! lodash/partial */479),u=n(l),i=r(/*! lodash/isArray */4),c=n(i),p=r(/*! lodash/isNumber */248),d=n(p),f=r(/*! lodash/isString */249),y=n(f),m=r(/*! lodash/isPlainObject */126),v=n(m),h=r(/*! lodash/isFunction */24),g=n(h),b=r(/*! lodash/has */23),P=n(b),T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.createShorthand=a,t.createShorthandFactory=s;var O=r(/*! classnames */3),_=n(O),E=r(/*! react */1),j=n(E),w=function(e,t){var r=T({},e,t),n=r.childKey,a=o(r,["childKey"]);return((0,P["default"])(t,"className")||(0,P["default"])(e.className))&&(a.className=(0,_["default"])(e.className,t.className)),!a.key&&n&&(a.key=(0,g["default"])(n)?n(a):n),a};t.createHTMLImage=s("img",function(e){return{src:e}}),t.createHTMLInput=s("input",function(e){return{type:e}})},/*!***********************************!*\ !*** ./src/lib/getElementType.js ***! \***********************************/ function(e,t){"use strict";function r(e,t,r){var n=e.defaultProps,o=void 0===n?{}:n;if(t.as&&t.as!==o.as)return t.as;if(r){var a=r();if(a)return a}return t.href?"a":o.as||"div"}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=r},/*!**************************************!*\ !*** ./src/lib/getUnhandledProps.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! lodash/omit */40),a=n(o),s=r(/*! lodash/keys */8),l=n(s),u=r(/*! lodash/union */258),i=n(u),c=function(e,t){var r=(0,i["default"])(e.autoControlledProps,(0,l["default"])(e.defaultProps),(0,l["default"])(e.propTypes));return(0,a["default"])(t,r)};t["default"]=c},/*!********************************!*\ !*** ./src/lib/keyboardKey.js ***! \********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=r(/*! lodash/isObject */13),a=n(o),s=r(/*! lodash/times */255),l=n(s),u={3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"};(0,l["default"])(24,function(e){return u[112+e]="F"+(e+1)}),(0,l["default"])(26,function(e){var t=e+65;u[t]=[String.fromCharCode(t+32),String.fromCharCode(t)]});var i={codes:u,getCode:function(e){return(0,a["default"])(e)?e.keyCode||e.which||this[e.key]:this[e]},getName:function(e){var t=(0,a["default"])(e),r=u[t?e.keyCode||e.which:e];return Array.isArray(r)&&(r=t?r[e.shiftKey?1:0]:r[0]),r},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};i.Spacebar=i[" "],i.Digit0=i[0],i.Digit1=i[1],i.Digit2=i[2],i.Digit3=i[3],i.Digit4=i[4],i.Digit5=i[5],i.Digit6=i[6],i.Digit7=i[7],i.Digit8=i[8],i.Digit9=i[9],i.Tilde=i["~"],i.GraveAccent=i["`"],i.ExclamationPoint=i["!"],i.AtSign=i["@"],i.PoundSign=i["#"],i.PercentSign=i["%"],i.Caret=i["^"],i.Ampersand=i["&"],i.PlusSign=i["+"],i.MinusSign=i["-"],i.EqualsSign=i["="],i.DivisionSign=i["/"],i.MultiplicationSign=i["*"],i.Comma=i[","],i.Decimal=i["."],i.Colon=i[":"],i.Semicolon=i[";"],i.Pipe=i["|"],i.BackSlash=i["\\"],i.QuestionMark=i["?"],i.SingleQuote=i['"'],i.DoubleQuote=i['"'],i.LeftCurlyBrace=i["{"],i.RightCurlyBrace=i["}"],i.LeftParenthesis=i["("],i.RightParenthesis=i[")"],i.LeftAngleBracket=i["<"],i.RightAngleBracket=i[">"],i.LeftSquareBracket=i["["],i.RightSquareBracket=i["]"],t["default"]=i},/*!*******************************!*\ !*** ./src/lib/objectDiff.js ***! \*******************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.objectDiff=void 0;var o=r(/*! lodash/isEqual */67),a=n(o),s=r(/*! lodash/has */23),l=n(s),u=r(/*! lodash/transform */257),i=n(u);t.objectDiff=function(e,t){return(0,i["default"])(e,function(e,r,n){(0,l["default"])(t,n)?(0,a["default"])(r,t[n])||(e[n]=t[n]):e[n]="[DELETED]"},{})}},/*!********************************************!*\ !*** ./src/modules/Accordion/Accordion.js ***! \********************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/keys */8),u=n(l),i=r(/*! lodash/omit */40),c=n(i),p=r(/*! lodash/each */64),d=n(p),f=r(/*! lodash/has */23),y=n(f),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),h=function A(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:A(o,t,r)}if("value"in n)return n.value;var a=n.get;if(void 0!==a)return a.call(r)},g=r(/*! classnames */3),b=n(g),P=r(/*! react */1),T=n(P),O=r(/*! ../../lib */2),_=r(/*! ../../elements/Icon */10),E=n(_),j=r(/*! ./AccordionContent */169),w=n(j),M=r(/*! ./AccordionTitle */170),S=n(M),x=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.state={},n.handleTitleClick=function(e,t){var r=n.props.onTitleClick,o=n.state.activeIndex;n.trySetState({activeIndex:t===o?-1:t}),r&&r(e,t)},n.renderChildren=function(){var e=n.props.children,t=n.state.activeIndex;return P.Children.map(e,function(e,r){var o=e.type===S["default"],a=e.type===w["default"];if(o){var s=(0,y["default"])(e,"props.active")?e.props.active:t===r,l=function(t){n.handleTitleClick(t,r),e.props.onClick&&e.props.onClick(t,r)};return(0,P.cloneElement)(e,m({},e.props,{active:s,onClick:l}))}if(a){var u=(0,y["default"])(e,"props.active")?e.props.active:t===r-1;return(0,P.cloneElement)(e,m({},e.props,{active:u}))}return e})},n.renderPanels=function(){var e=n.props.panels,t=n.state.activeIndex,r=[];return(0,d["default"])(e,function(e,o){var a=(0,y["default"])(e,"active")?e.active:t===o,s=function(t){n.handleTitleClick(t,o),e.onClick&&e.onClick(t,o)};r.push(T["default"].createElement(S["default"],{key:e.title+"-title",active:a,onClick:s},T["default"].createElement(E["default"],{name:"dropdown"}),e.title)),r.push(T["default"].createElement(w["default"],{key:e.title+"-content",active:a},e.content))}),r},s=r,a(n,s)}return s(t,e),v(t,[{key:"componentWillMount",value:function(){h(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillMount",this).call(this),this.trySetState({activeIndex:-1})}},{key:"render",value:function(){var e=this.props,r=e.className,n=e.fluid,o=e.inverted,a=e.panels,s=e.styled,l=(0,b["default"])("ui",(0,O.useKeyOnly)(n,"fluid"),(0,O.useKeyOnly)(o,"inverted"),(0,O.useKeyOnly)(s,"styled"),"accordion",r),i=(0,c["default"])(this.props,(0,u["default"])(t.propTypes)),p=(0,O.getElementType)(t,this.props);return T["default"].createElement(p,m({},i,{className:l}),a?this.renderPanels():this.renderChildren())}}]),t}(O.AutoControlledComponent);x.autoControlledProps=["activeIndex"],x.propTypes={as:O.customPropTypes.as,activeIndex:P.PropTypes.number,children:P.PropTypes.node,className:P.PropTypes.string,defaultActiveIndex:P.PropTypes.number,fluid:P.PropTypes.bool,inverted:P.PropTypes.bool,onTitleClick:P.PropTypes.func,panels:O.customPropTypes.every([O.customPropTypes.disallow(["children"]),P.PropTypes.arrayOf(P.PropTypes.shape({active:P.PropTypes.bool,title:P.PropTypes.string,content:P.PropTypes.string,onClick:P.PropTypes.func}))]),styled:P.PropTypes.bool},x._meta={name:"Accordion",type:O.META.TYPES.MODULE},x.Content=w["default"],x.Title=S["default"],t["default"]=x},/*!******************************************!*\ !*** ./src/modules/Checkbox/Checkbox.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(/*! react */1),c=n(i),p=r(/*! classnames */3),d=n(p),f=r(/*! ../../lib */2),y=(0,f.makeDebugger)("checkbox"),m={name:"Checkbox",type:f.META.TYPES.MODULE,props:{type:["checkbox","radio"]}},v=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.state={},n.canToggle=function(){var e=n.props,t=e.disabled,r=e.radio,o=e.readOnly,a=n.state.checked;return!(t||o||r&&a)},n.handleClick=function(e){y("handleClick()");var t=n.props,r=t.onChange,o=t.onClick,a=t.name,s=t.value,l=n.state.checked;y(" name: "+a),y(" value: "+s),y(" checked: "+l),n.canToggle()&&(o&&o(e,{name:a,value:s,checked:!!l}),r&&r(e,{name:a,value:s,checked:!l}),n.trySetState({checked:!l}))},s=r,a(n,s)}return s(t,e),u(t,[{key:"render",value:function(){var e=this.props,r=e.className,n=e.label,o=e.name,a=e.radio,s=e.slider,u=e.toggle,i=e.type,p=e.value,y=e.disabled,m=e.readOnly,v=this.state.checked,h=(0,d["default"])("ui",(0,f.useKeyOnly)(v,"checked"),(0,f.useKeyOnly)(!n,"fitted"),(0,f.useKeyOnly)(a,"radio"),(0,f.useKeyOnly)(s,"slider"),(0,f.useKeyOnly)(u,"toggle"),(0,f.useKeyOnly)(y,"disabled"),(0,f.useKeyOnly)(m,"read-only"),"checkbox",r),g=(0,f.getUnhandledProps)(t,this.props),b=(0,f.getElementType)(t,this.props);return c["default"].createElement(b,l({},g,{className:h,onClick:this.handleClick,onChange:this.handleClick}),c["default"].createElement("input",{type:i,name:o,checked:v,className:"hidden",readOnly:!0,tabIndex:0,value:p}),c["default"].createElement("label",null,n))}}]),t}(f.AutoControlledComponent);v.propTypes={as:f.customPropTypes.as,className:i.PropTypes.string,checked:i.PropTypes.bool,defaultChecked:i.PropTypes.bool,slider:f.customPropTypes.every([i.PropTypes.bool,f.customPropTypes.disallow(["radio","toggle"])]),radio:f.customPropTypes.every([i.PropTypes.bool,f.customPropTypes.disallow(["slider","toggle"])]),toggle:f.customPropTypes.every([i.PropTypes.bool,f.customPropTypes.disallow(["radio","slider"])]),disabled:i.PropTypes.bool,fitted:i.PropTypes.bool,label:i.PropTypes.string,type:i.PropTypes.oneOf(m.props.type),name:i.PropTypes.string,onChange:i.PropTypes.func,onClick:i.PropTypes.func,readOnly:i.PropTypes.bool,value:i.PropTypes.string},v.defaultProps={type:"checkbox"},v.autoControlledProps=["checked"],v._meta=m,t["default"]=v},/*!******************************************!*\ !*** ./src/modules/Dropdown/Dropdown.js ***! \******************************************/ function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/compact */241),u=n(l),i=r(/*! lodash/map */9),c=n(i),p=r(/*! lodash/every */243),d=n(p),f=r(/*! lodash/without */6),y=n(f),m=r(/*! lodash/findIndex */244),v=n(m),h=r(/*! lodash/find */122),g=n(h),b=r(/*! lodash/reduce */252),P=n(b),T=r(/*! lodash/escapeRegExp */447),O=n(T),_=r(/*! lodash/isFunction */24),E=n(_),j=r(/*! lodash/filter */121),w=n(j),M=r(/*! lodash/dropRight */446),S=n(M),x=r(/*! lodash/isEmpty */124),A=n(x),N=r(/*! lodash/union */258),k=n(N),C=r(/*! lodash/some */253),I=n(C),K=r(/*! lodash/get */37),L=n(K),U=r(/*! lodash/includes */65),D=n(U),R=r(/*! lodash/has */23),z=n(R),W=r(/*! lodash/isEqual */67),F=n(W),V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),Y=function de(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:de(o,t,r)}if("value"in n)return n.value;var a=n.get;if(void 0!==a)return a.call(r)},q=r(/*! classnames */3),H=n(q),G=r(/*! react */1),Z=n(G),$=r(/*! ../../lib */2),X=r(/*! ../../elements/Icon */10),Q=n(X),J=r(/*! ../../elements/Label */77),ee=n(J),te=r(/*! ./DropdownDivider */171),re=n(te),ne=r(/*! ./DropdownItem */173),oe=n(ne),ae=r(/*! ./DropdownHeader */172),se=n(ae),le=r(/*! ./DropdownMenu */174),ue=n(le),ie=(0,$.makeDebugger)("dropdown"),ce={name:"Dropdown",type:$.META.TYPES.MODULE,props:{pointing:["left","right","top","top left","top right","bottom","bottom left","bottom right"],additionPosition:["top","bottom"]}},pe=function(t){function r(){var e,t,n,s;o(this,r);for(var l=arguments.length,i=Array(l),p=0;p<l;p++)i[p]=arguments[p];return t=n=a(this,(e=r.__proto__||Object.getPrototypeOf(r)).call.apply(e,[this].concat(i))),n.handleChange=function(e,t){ie("handleChange()"),ie(t);var r=n.props,o=r.name,a=r.onChange;a&&a(e,{name:o,value:t})},n.closeOnEscape=function(e){$.keyboardKey.getCode(e)===$.keyboardKey.Escape&&(e.preventDefault(),n.close())},n.moveSelectionOnKeyDown=function(e){switch(ie("moveSelectionOnKeyDown()"),ie($.keyboardKey.getName(e)),$.keyboardKey.getCode(e)){case $.keyboardKey.ArrowDown:e.preventDefault(),n.moveSelectionBy(1);break;case $.keyboardKey.ArrowUp:e.preventDefault(),n.moveSelectionBy(-1)}},n.openOnSpace=function(e){ie("openOnSpace()"),$.keyboardKey.getCode(e)===$.keyboardKey.Spacebar&&(n.state.open||(e.preventDefault(),n.trySetState({open:!0})))},n.openOnArrow=function(e){var t=$.keyboardKey.getCode(e);ie("openOnArrow()"),(0,D["default"])([$.keyboardKey.ArrowDown,$.keyboardKey.ArrowUp],t)&&(n.state.open||(e.preventDefault(),n.trySetState({open:!0})))},n.selectHighlightedItem=function(e){var t=n.state.open,r=n.props,o=r.multiple,a=r.name,s=r.onAddItem,l=r.options,u=(0,L["default"])(n.getSelectedItem(),"value");if(u&&t)if(s&&!(0,I["default"])(l,{text:u})&&s(e,{name:a,value:u}),o){var i=(0,k["default"])(n.state.value,[u]);n.setValue(i),n.handleChange(e,i)}else n.setValue(u),n.handleChange(e,u),n.close()},n.selectItemOnEnter=function(e){ie("selectItemOnEnter()"),ie($.keyboardKey.getName(e)),$.keyboardKey.getCode(e)===$.keyboardKey.Enter&&(e.preventDefault(),n.selectHighlightedItem(e))},n.removeItemOnBackspace=function(e){if(ie("removeItemOnBackspace()"),ie($.keyboardKey.getName(e)),$.keyboardKey.getCode(e)===$.keyboardKey.Backspace){var t=n.props,r=t.multiple,o=t.search,a=n.state,s=a.searchQuery,l=a.value;if(!s&&o&&r&&!(0,A["default"])(l)){e.preventDefault();var u=(0,S["default"])(l);n.setValue(u),n.handleChange(e,u)}}},n.closeOnDocumentClick=function(e){ie("closeOnDocumentClick()"),ie(e),n.close()},n.handleMouseDown=function(e){ie("handleMouseDown()");var t=n.props.onMouseDown;t&&t(e),n.isMouseDown=!0,document.addEventListener("mouseup",n.handleDocumentMouseUp)},n.handleDocumentMouseUp=function(){ie("handleDocumentMouseUp()"),n.isMouseDown=!1,document.removeEventListener("mouseup",n.handleDocumentMouseUp)},n.handleClick=function(e){ie("handleClick()",e);var t=n.props.onClick;t&&t(e),e.stopPropagation(),n.toggle()},n.handleItemClick=function(e,t){ie("handleItemClick()"),ie(t);var r=n.props,o=r.multiple,a=r.name,s=r.onAddItem,l=r.options,u=n.getItemByValue(t)||{};if(e.stopPropagation(),(o||u.disabled)&&e.nativeEvent.stopImmediatePropagation(),!u.disabled)if(s&&!(0,I["default"])(l,{text:t})&&s(e,{name:a,value:t}),o){var i=(0,k["default"])(n.state.value,[t]);n.setValue(i),n.handleChange(e,i)}else n.setValue(t),n.handleChange(e,t),n.close()},n.handleFocus=function(e){ie("handleFocus()");var t=n.props.onFocus;t&&t(e),n.setState({focus:!0})},n.handleBlur=function(e){ie("handleBlur()");var t=n.props,r=t.multiple,o=t.onBlur,a=t.selectOnBlur;n.isMouseDown||(o&&o(e),a&&!r&&n.selectHighlightedItem(e),n.setState({focus:!1}))},n.handleSearchChange=function(e){ie("handleSearchChange()"),ie(e.target.value),e.stopPropagation();var t=n.props,r=t.search,o=t.onSearchChange,a=n.state.open,s=e.target.value;o&&o(e,s),r&&s&&!a&&n.open(),n.setState({selectedIndex:n.getEnabledIndices()[0],searchQuery:s})},n.getMenuOptions=function(){var e=arguments.length<=0||void 0===arguments[0]?n.state.value:arguments[0],t=n.props,r=t.multiple,o=t.search,a=t.allowAdditions,s=t.additionPosition,l=t.additionLabel,u=t.options,i=n.state.searchQuery,c=u;if(r&&(c=(0,w["default"])(c,function(t){return!(0,D["default"])(e,t.value)})),o&&i&&((0,E["default"])(o)?c=o(c,i):!function(){var e=new RegExp((0,O["default"])(i),"i");c=(0,w["default"])(c,function(t){return e.test(t.text)})}()),a&&o&&i&&!(0,I["default"])(c,{text:i})){var p={text:l?l+" "+i:i,value:i};"top"===s?c.unshift(p):c.push(p)}return c},n.getSelectedItem=function(){var e=n.state.selectedIndex,t=n.getMenuOptions();return(0,L["default"])(t,"["+e+"]")},n.getEnabledIndices=function(e){var t=e||n.getMenuOptions();return(0,P["default"])(t,function(e,t,r){return t.disabled||e.push(r),e},[])},n.getItemByValue=function(e){var t=n.props.options;return(0,g["default"])(t,{value:e})},n.getMenuItemIndexByValue=function(e){var t=n.getMenuOptions();return(0,v["default"])(t,["value",e])},n.setValue=function(e){ie("setValue()"),ie("value",e);var t=n.props.multiple,r=n.state.selectedIndex,o=n.getMenuOptions(e),a=n.getEnabledIndices(o),s={searchQuery:""};if(r)if(t)r>=o.length-1&&(s.selectedIndex=a[a.length-1]);else{var l=n.getMenuItemIndexByValue(e);s.selectedIndex=(0,D["default"])(a,l)?l:void 0}else{var u=a[0];s.selectedIndex=t?u:n.getMenuItemIndexByValue(e||(0,L["default"])(o,"["+u+"].value"))}n.trySetState({value:e},s)},n.handleLabelRemove=function(e,t){ie("handleLabelRemove()"),e.stopPropagation();var r=n.state.value,o=(0,y["default"])(r,t.value);ie("label props:",t),ie("current value:",r),ie("remove value:",t.value),ie("new value:",o),n.setValue(o),n.handleChange(e,o)},n.moveSelectionBy=function(e){var t=arguments.length<=1||void 0===arguments[1]?n.state.selectedIndex:arguments[1];ie("moveSelectionBy()"),ie("offset: "+e);var r=n.getMenuOptions(),o=r.length-1;if(!(0,d["default"])(r,"disabled")){var a=t+e;if(a>o?a=0:a<0&&(a=o),r[a].disabled)return n.moveSelectionBy(e,a);n.setState({selectedIndex:a}),n.scrollSelectedItemIntoView()}},n.scrollSelectedItemIntoView=function(){ie("scrollSelectedItemIntoView()");var e=document.querySelector(".ui.dropdown.active.visible .menu.visible"),t=e.querySelector(".item.selected");ie("menu: "+e),ie("item: "+t);var r=t.offsetTop<e.scrollTop,n=t.offsetTop+t.clientHeight>e.scrollTop+e.clientHeight;(r||n)&&(e.scrollTop=t.offsetTop)},n.open=function(){ie("open()");var e=n.props.search;e&&n._search.focus(),n.trySetState({open:!0})},n.close=function(){ie("close()"),n.trySetState({open:!1})},n.handleClose=function(){ie("handleClose()"),n._dropdown.blur(),n.setState({focus:!1})},n.toggle=function(){return n.state.open?n.close():n.open()},n.renderText=function(){var e=n.props,t=e.multiple,r=e.placeholder,o=e.search,a=e.text,s=n.state,l=s.searchQuery,u=s.value,i=s.open,c=t?!(0,A["default"])(u):!!u,p=(0,H["default"])(r&&!c&&"default","text",o&&l&&"filtered"),d=r;return l?d=null:a?d=a:i&&!t?d=(0,L["default"])(n.getSelectedItem(),"text"):c&&(d=(0,L["default"])(n.getItemByValue(u),"text")),Z["default"].createElement("div",{className:p},d)},n.renderHiddenInput=function(){ie("renderHiddenInput()");var e=n.state.value,t=n.props,r=t.multiple,o=t.name,a=t.options,s=t.selection;return ie("name: "+o),ie("selection: "+s),ie("value: "+e),s?Z["default"].createElement("select",{type:"hidden",name:o,value:e,multiple:r},(0,c["default"])(a,function(e){return Z["default"].createElement("option",{key:e.value,value:e.value},e.text)})):null},n.renderSearchInput=function(){var e=n.props,t=e.search,r=e.name,o=n.state.searchQuery;if(!t)return null;var a=void 0;return n._sizer&&o&&(n._sizer.style.display="inline",n._sizer.textContent=o,a=Math.ceil(n._sizer.getBoundingClientRect().width),n._sizer.style.removeProperty("display")),Z["default"].createElement("input",{value:o,onChange:n.handleSearchChange,className:"search",name:[r,"search"].join("-"),autoComplete:"off",tabIndex:"0",style:{width:a},ref:function(e){return n._search=e}})},n.renderSearchSizer=function(){var e=n.props,t=e.search,r=e.multiple;return t&&r?Z["default"].createElement("span",{className:"sizer",ref:function(e){return n._sizer=e}}):null},n.renderLabels=function(){ie("renderLabels()");var e=n.props.multiple,t=n.state.value;if(e&&!(0,A["default"])(t)){var r=(0,c["default"])(t,n.getItemByValue);return ie("selectedItems",r),(0,c["default"])((0,u["default"])(r),function(e){return Z["default"].createElement(ee["default"],{key:e.value,as:"a",content:e.text,value:e.value,onRemove:n.handleLabelRemove})})}},n.renderOptions=function(){var e=n.props,t=e.multiple,r=e.search,o=e.noResultsMessage,a=n.state,s=a.selectedIndex,l=a.value,u=n.getMenuOptions();if(r&&(0,A["default"])(u))return Z["default"].createElement("div",{className:"message"},o);var i=t?function(e){return(0,D["default"])(l,e)}:function(e){return e===l};return(0,c["default"])(u,function(e,t){return Z["default"].createElement(oe["default"],V({key:e.value+"-"+t,active:i(e.value),onClick:n.handleItemClick,selected:s===t},e,{style:V({},e.style,{pointerEvents:"all"})}))})},n.renderMenu=function(){var e=n.props,t=e.children,r=e.header,o=n.state.open,a=o?"visible":"";if(t){var s=G.Children.only(t),l=(0,H["default"])(a,s.props.className);return(0,G.cloneElement)(s,{className:l})}return Z["default"].createElement(ue["default"],{className:a},(0,$.createShorthand)(se["default"],function(e){return{content:e}},r),n.renderOptions())},s=t,a(n,s)}return s(r,t),B(r,[{key:"componentWillMount",value:function(){Y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillMount",this)&&Y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillMount",this).call(this),ie("componentWillMount()");var e=this.state,t=e.open,n=e.value;this.setValue(n),t&&this.open()}},{key:"shouldComponentUpdate",value:function(e,t){return!(0,F["default"])(e,this.props)||!(0,F["default"])(t,this.state)}},{key:"componentWillReceiveProps",value:function(t){if(Y(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"componentWillReceiveProps",this).call(this,t),ie("componentWillReceiveProps()"),ie("to props:",(0,$.objectDiff)(this.props,t)),"production"!==e.env.NODE_ENV){var n=Array.isArray(t.value),o=(0,z["default"])(t,"value");o&&t.multiple&&!n?console.error("Dropdown `value` must be an array when `multiple` is set."+(" Received type: `"+Object.prototype.toString.call(t.value)+"`.")):o&&!t.multiple&&n&&console.error("Dropdown `value` must not be an array when `multiple` is not set. Either set `multiple={true}` or use a string or number value.")}(0,F["default"])(t.value,this.props.value)||(ie("value changed, setting",t.value),this.setValue(t.value))}},{key:"componentDidUpdate",value:function(e,t){ie("componentDidUpdate()"),ie("to state:",(0,$.objectDiff)(t,this.state)),!t.focus&&this.state.focus?(ie("dropdown focused"),this.isMouseDown||(ie("mouse is not down, opening"),this.open()),this.state.open?(document.addEventListener("keydown",this.moveSelectionOnKeyDown),document.addEventListener("keydown",this.selectItemOnEnter),document.addEventListener("keydown",this.removeItemOnBackspace)):(document.addEventListener("keydown",this.openOnArrow),document.addEventListener("keydown",this.openOnSpace))):t.focus&&!this.state.focus&&(ie("dropdown blurred"),this.isMouseDown||(ie("mouse is not down, closing"),this.close()),document.removeEventListener("keydown",this.openOnArrow),document.removeEventListener("keydown",this.openOnSpace),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter),document.removeEventListener("keydown",this.removeItemOnBackspace)),!t.open&&this.state.open?(ie("dropdown opened"),document.addEventListener("keydown",this.closeOnEscape),document.addEventListener("keydown",this.moveSelectionOnKeyDown),document.addEventListener("keydown",this.selectItemOnEnter),document.addEventListener("keydown",this.removeItemOnBackspace),document.addEventListener("click",this.closeOnDocumentClick),document.removeEventListener("keydown",this.openOnArrow),document.removeEventListener("keydown",this.openOnSpace)):t.open&&!this.state.open&&(ie("dropdown closed"),this.handleClose(),document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter),document.removeEventListener("keydown",this.removeItemOnBackspace),document.removeEventListener("click",this.closeOnDocumentClick))}},{key:"componentWillUnmount",value:function(){ie("componentWillUnmount()"),document.removeEventListener("keydown",this.openOnArrow),document.removeEventListener("keydown",this.openOnSpace),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter),document.removeEventListener("keydown",this.removeItemOnBackspace),document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("click",this.closeOnDocumentClick)}},{key:"render",value:function(){var e=this;ie("render()"),ie("props",this.props),ie("state",this.state);var t=this.state.open,n=this.props,o=n.basic,a=n.button,s=n.className,l=n.compact,u=n.fluid,i=n.floating,c=n.icon,p=n.inline,d=n.labeled,f=n.multiple,y=n.pointing,m=n.search,v=n.selection,h=n.simple,g=n.loading,b=n.error,P=n.disabled,T=n.scrolling,O=n.trigger,_=(0,H["default"])("ui",(0,$.useKeyOnly)(t,"active visible"),(0,$.useKeyOnly)(P,"disabled"),(0,$.useKeyOnly)(b,"error"),(0,$.useKeyOnly)(g,"loading"),(0,$.useKeyOnly)(o,"basic"),(0,$.useKeyOnly)(a,"button"),(0,$.useKeyOnly)(l,"compact"),(0,$.useKeyOnly)(u,"fluid"),(0,$.useKeyOnly)(i,"floating"),(0,$.useKeyOnly)(p,"inline"),(0,$.useKeyOnly)(d,"labeled"),(0,$.useKeyOnly)(f,"multiple"),(0,$.useKeyOnly)(m,"search"),(0,$.useKeyOnly)(v,"selection"),(0,$.useKeyOnly)(h,"simple"),(0,$.useKeyOnly)(T,"scrolling"),(0,$.useKeyOrValueAndKey)(y,"pointing"),s,"dropdown"),E=(0,$.getUnhandledProps)(r,this.props),j=(0,$.getElementType)(r,this.props);return Z["default"].createElement(j,V({},E,{className:_,onBlur:this.handleBlur,onClick:this.handleClick,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:m?void 0:0,ref:function(t){return e._dropdown=t}}),this.renderHiddenInput(),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),O||this.renderText(),Q["default"].create(c),this.renderMenu())}}]),r}($.AutoControlledComponent);pe.propTypes={as:$.customPropTypes.as,icon:G.PropTypes.oneOfType([G.PropTypes.element,G.PropTypes.string]),options:$.customPropTypes.every([$.customPropTypes.disallow(["children"]),G.PropTypes.arrayOf(G.PropTypes.shape(oe["default"].propTypes))]),open:G.PropTypes.bool,defaultOpen:G.PropTypes.bool,children:$.customPropTypes.every([$.customPropTypes.disallow(["options","selection"]),$.customPropTypes.givenProps({children:G.PropTypes.any.isRequired},Z["default"].PropTypes.element.isRequired)]),value:G.PropTypes.oneOfType([G.PropTypes.string,G.PropTypes.number,G.PropTypes.arrayOf(G.PropTypes.oneOfType([G.PropTypes.string,G.PropTypes.number]))]),defaultValue:G.PropTypes.oneOfType([G.PropTypes.string,G.PropTypes.number,G.PropTypes.arrayOf(G.PropTypes.oneOfType([G.PropTypes.string,G.PropTypes.number]))]),placeholder:G.PropTypes.string,name:G.PropTypes.string,trigger:$.customPropTypes.every([$.customPropTypes.disallow(["selection","text"]),G.PropTypes.node]),allowAdditions:$.customPropTypes.every([$.customPropTypes.demand(["options","selection","search"]),G.PropTypes.bool]),additionPosition:G.PropTypes.oneOf(ce.props.additionPosition),additionLabel:G.PropTypes.string,noResultsMessage:G.PropTypes.string,selectOnBlur:G.PropTypes.bool,search:G.PropTypes.oneOfType([G.PropTypes.bool,G.PropTypes.func]),onAddItem:G.PropTypes.func,onBlur:G.PropTypes.func,onChange:G.PropTypes.func,onSearchChange:G.PropTypes.func,onClick:G.PropTypes.func,onFocus:G.PropTypes.func,onMouseDown:G.PropTypes.func,basic:G.PropTypes.bool,button:G.PropTypes.bool,className:G.PropTypes.string,compact:G.PropTypes.bool,fluid:G.PropTypes.bool,floating:G.PropTypes.bool,header:G.PropTypes.node,inline:G.PropTypes.bool,labeled:G.PropTypes.bool,multiple:G.PropTypes.bool,pointing:G.PropTypes.oneOfType([G.PropTypes.bool,G.PropTypes.oneOf(ce.props.pointing)]),text:G.PropTypes.string,selection:$.customPropTypes.every([$.customPropTypes.disallow(["children"]),$.customPropTypes.demand(["options"]),G.PropTypes.bool]),simple:G.PropTypes.bool,loading:G.PropTypes.bool,error:G.PropTypes.bool,disabled:G.PropTypes.bool,scrolling:G.PropTypes.bool},pe.defaultProps={icon:"dropdown",additionLabel:"Add:",noResultsMessage:"No results found.",selectOnBlur:!0},pe.autoControlledProps=["open","value"],pe._meta=ce,pe.Divider=re["default"],pe.Header=se["default"],pe.Item=oe["default"],pe.Menu=ue["default"],t["default"]=pe}).call(t,r(/*! ./~/node-libs-browser/~/process/browser.js */69))},/*!************************************!*\ !*** ./src/modules/Modal/Modal.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/pick */41),u=n(l),i=r(/*! lodash/omit */40),c=n(i),p=r(/*! lodash/keys */8),d=n(p),f=r(/*! lodash/isEqual */67),y=n(f),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),h=r(/*! react */1),g=n(h),b=r(/*! classnames */3),P=n(b),T=r(/*! ./ModalHeader */178),O=n(T),_=r(/*! ./ModalContent */176),E=n(_),j=r(/*! ./ModalActions */175),w=n(j),M=r(/*! ./ModalDescription */177),S=n(M),x=r(/*! ../../addons/Portal */70),A=n(x),N=r(/*! ../../lib */2),k=(0,N.makeDebugger)("modal"),C={name:"Modal",type:N.META.TYPES.MODULE,props:{size:["fullscreen","large","small"],dimmer:["inverted","blurring"]}},I=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.state={},n.handleMount=function(){k("handleOpen()");var e=n.props.dimmer,t=n.getMountNode();e&&(k("adding dimmer"),t.classList.add("dimmable","dimmed"),"blurring"===e&&(k("adding blurred dimmer"),t.classList.add("blurring")))},n.handleUnmount=function(){k("handleUnmount()");var e=n.getMountNode();e.classList.remove("blurring","dimmable","dimmed","scrollable")},n.getMountNode=function(){return n.props.mountNode||document.body},n.setPosition=function(){if(n._modalNode){var e=n.getMountNode(),t=n._modalNode.getBoundingClientRect(),r=t.height,o=r>=window.innerHeight,a={marginTop:-Math.round(r/2),scrolling:o};!n.state.scrolling&&o?e.classList.add("scrolling"):n.state.scrolling&&!o&&e.classList.remove("scrolling"),(0,y["default"])(a,n.state)||n.setState(a)}requestAnimationFrame(n.setPosition)},s=r,a(n,s)}return s(t,e),v(t,[{key:"componentDidMount",value:function(){k("componentDidMount()"),this.setPosition()}},{key:"componentWillUnmount",value:function(){k("componentWillUnmount()"),this.handleUnmount()}},{key:"render",value:function(){var e=this,r=this.props,n=r.basic,o=r.children,a=r.className,s=r.dimmer,l=r.size,i=this.state,p=i.marginTop,f=i.scrolling,y=(0,P["default"])("ui",l,(0,N.useKeyOnly)(n,"basic"),(0,N.useKeyOnly)(f,"scrolling"),"modal transition visible active",a),v=(0,N.getUnhandledProps)(t,this.props),h=(0,d["default"])(A["default"].propTypes),b=(0,c["default"])(v,h),T=(0,u["default"])(v,h),O=(0,N.getElementType)(t,this.props),_=g["default"].createElement(O,m({},b,{className:y,style:{marginTop:p},ref:function(t){return e._modalNode=t}}),o),E=s?(0,P["default"])("ui","inverted"===s&&"inverted","page modals dimmer transition visible active"):null;return g["default"].createElement(A["default"],m({closeOnRootNodeClick:!0,closeOnDocumentClick:!1},T,{className:E,mountNode:this.getMountNode(),onMount:this.handleMount,onUnmount:this.handleUnmount}),_)}}]),t}(h.Component);I.propTypes={as:N.customPropTypes.as,children:h.PropTypes.node,className:h.PropTypes.string,basic:h.PropTypes.bool,dimmer:h.PropTypes.oneOfType([h.PropTypes.bool,h.PropTypes.oneOf(C.props.dimmer)]),mountNode:h.PropTypes.any,size:h.PropTypes.oneOf(C.props.size)},I.defaultProps={dimmer:!0},I._meta=C,I.Header=O["default"],I.Content=E["default"],I.Description=S["default"],I.Actions=w["default"],t["default"]=I},/*!************************************!*\ !*** ./src/modules/Popup/Popup.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/keys */8),u=n(l),i=r(/*! lodash/pick */41),c=n(i),p=r(/*! lodash/assign */440),d=n(p),f=r(/*! lodash/mapValues */476),y=n(f),m=r(/*! lodash/isNumber */248),v=n(m),h=r(/*! lodash/includes */65),g=n(h),b=r(/*! lodash/without */6),P=n(b),T=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},O=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_=r(/*! react */1),E=n(_),j=r(/*! classnames */3),w=n(j),M=r(/*! ../../lib */2),S=r(/*! ../../addons/Portal */70),x=n(S),A=r(/*! ./PopupContent */180),N=n(A),k=r(/*! ./PopupHeader */181),C=n(k),I={name:"Popup",type:M.META.TYPES.MODULE,props:{content:[_.PropTypes.string,_.PropTypes.node],on:["hover","click","focus"],positioning:["top left","top right","bottom right","bottom left","right center","left center","top center","bottom center"],size:(0,P["default"])(M.SUI.SIZES,"medium","big","massive"),wide:[!0,!1,"very"]}},K=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.state={},n.hideOnScroll=function(e){n.setState({closed:!0}),window.removeEventListener("scroll",n.hideOnScroll),setTimeout(function(){return n.setState({closed:!1})},50)},n.onOpen=function(e){n.coords=e.currentTarget.getBoundingClientRect(),n.props.hideOnScroll&&window.addEventListener("scroll",n.hideOnScroll)},n.popupMounted=function(e){n.popupCoords=e?e.getBoundingClientRect():null,n.setPopupStyle()},s=r,a(n,s)}return s(t,e),O(t,[{key:"computePopupStyle",value:function(e){var t={position:"absolute"},r=this.props.offset,n=window,o=n.pageYOffset,a=n.pageXOffset,s=document.documentElement,l=s.clientWidth,u=s.clientHeight;if((0,g["default"])(e,"right"))t.right=Math.round(l-(this.coords.right+a)),t.left="auto";else if((0,g["default"])(e,"left"))t.left=Math.round(this.coords.left+a),t.right="auto";else{var i=(this.coords.width-this.popupCoords.width)/2;t.left=Math.round(this.coords.left+i+a),t.right="auto"}if((0,g["default"])(e,"top"))t.bottom=Math.round(u-(this.coords.top+o)),t.top="auto";else if((0,g["default"])(e,"bottom"))t.top=Math.round(this.coords.bottom+o),t.bottom="auto";else{var c=(this.coords.height+this.popupCoords.height)/2;t.top=Math.round(this.coords.bottom+o-c),t.bottom="auto";var p=this.popupCoords.width+8;(0,g["default"])(e,"right")?t.right-=p:t.left-=p}return r&&((0,v["default"])(t.right)?t.right-=r:t.left-=r),t}},{key:"isStyleInViewport",value:function(e){var t=window,r=t.pageYOffset,n=t.pageXOffset,o=document.documentElement,a=o.clientWidth,s=o.clientHeight,l={top:e.top,left:e.left,width:this.popupCoords.width,height:this.popupCoords.height};return(0,v["default"])(e.right)&&(l.left=a-e.right-l.width),(0,v["default"])(e.bottom)&&(l.top=s-e.bottom-l.height),!(l.top<r)&&(!(l.top+l.height>r+s)&&(!(l.left<n)&&!(l.left+l.width>n+a)))}},{key:"setPopupStyle",value:function(){if(this.coords&&this.popupCoords){for(var e=this.props.positioning,t=this.computePopupStyle(e),r=(0,P["default"])(I.props.positioning,e),n=0;!this.isStyleInViewport(t)&&n<r.length;n++)t=this.computePopupStyle(r[n]),e=r[n];t=(0,y["default"])(t,function(e){return(0,v["default"])(e)?e+"px":e}),this.setState({style:t,positioning:e})}}},{key:"getPortalProps",value:function(){var e={onOpen:this.onOpen},t=this.props,r=t.on,n=t.hoverable;switch(r){case"click":e.openOnTriggerClick=!0,e.closeOnTriggerClick=!0,e.closeOnDocumentClick=!0;break;case"focus":e.openOnTriggerFocus=!0,e.closeOnTriggerBlur=!0;break;default:e.openOnTriggerMouseOver=!0,e.closeOnTriggerMouseLeave=!0,e.mouseLeaveDelay=70,e.mouseOverDelay=50}return n&&(e.closeOnPortalMouseLeave=!0,e.mouseLeaveDelay=300),e}},{key:"render",value:function(){var e=this.props,r=e.basic,n=e.children,o=e.className,a=e.content,s=e.flowing,l=e.header,i=e.inverted,p=e.size,f=e.trigger,y=e.wide,m=this.state,v=m.positioning,h=m.closed,g=(0,d["default"])({},this.state.style,this.props.style),b=(0,w["default"])("ui",v,p,(0,M.useKeyOrValueAndKey)(y,"wide"),(0,M.useKeyOnly)(r,"basic"),(0,M.useKeyOnly)(s,"flowing"),(0,M.useKeyOnly)(i,"inverted"),"popup transition visible",o);if(h)return f;var P=(0,M.getUnhandledProps)(t,this.props),O=(0,M.getElementType)(t,this.props),_=(0,c["default"])(P,(0,u["default"])(x["default"].propTypes)),j=E["default"].createElement(O,T({},P,{className:b,style:g,ref:this.popupMounted}),n,!n&&C["default"].create(l),!n&&N["default"].create(a));return E["default"].createElement(x["default"],T({},_,{trigger:f},this.getPortalProps()),j)}}]),t}(_.Component);K.propTypes={basic:_.PropTypes.bool,children:_.PropTypes.node,className:_.PropTypes.string,content:_.PropTypes.oneOfType(I.props.content),flowing:_.PropTypes.bool,header:_.PropTypes.string,hoverable:_.PropTypes.bool,inverted:_.PropTypes.bool,hideOnScroll:_.PropTypes.bool,offset:_.PropTypes.number,on:_.PropTypes.oneOf(I.props.on),positioning:_.PropTypes.oneOf(I.props.positioning),size:_.PropTypes.oneOf(I.props.size),style:_.PropTypes.object,trigger:_.PropTypes.node,wide:_.PropTypes.oneOf(I.props.wide)},K.defaultProps={positioning:"top left",on:"hover"},K._meta=I,K.Content=N["default"],K.Header=C["default"],t["default"]=K},/*!************************************!*\ !*** ./src/modules/Popup/index.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Popup */313),a=n(o);t["default"]=a["default"]},/*!******************************************!*\ !*** ./src/modules/Progress/Progress.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.active,r=e.attached,n=e.autoSuccess,a=e.color,s=e.children,l=e.className,i=e.disabled,p=e.error,f=e.indicating,v=e.inverted,g=e.label,T=e.percent,O=e.precision,_=e.progress,E=e.size,j=e.success,w=e.total,M=e.value,S=e.warning,x=n&&(T>=100||M>=w),A=_||g||!(0,y["default"])(O)||!(0,d["default"])([w,M],y["default"]),N=void 0;(0,y["default"])(T)?(0,y["default"])(w)||(0,y["default"])(M)||(N=M/w*100):N=T,N=(0,c["default"])(N,0,100),(0,y["default"])(O)||(N=(0,u["default"])(N,O));var k=void 0;"percent"===g||g===!0||(0,y["default"])(g)?k=N+"%":"ratio"===g&&(k=M+"/"+w);var C=(0,h["default"])("ui",E,a,(0,P.useKeyOnly)(t||f,"active"),(0,P.useKeyOnly)(x||j,"success"),(0,P.useKeyOnly)(S,"warning"),(0,P.useKeyOnly)(p,"error"),(0,P.useKeyOnly)(i,"disabled"),(0,P.useKeyOnly)(f,"indicating"),(0,P.useKeyOnly)(v,"inverted"),(0,P.useValueAndKey)(r,"attached"),l,"progress"),I=(0,P.getUnhandledProps)(o,e),K=(0,P.getElementType)(o,e);return b["default"].createElement(K,m({},I,{className:C}),b["default"].createElement("div",{className:"bar",style:{width:N+"%"}},A&&b["default"].createElement("div",{className:"progress"},k)),s&&b["default"].createElement("div",{className:"label"},s))}Object.defineProperty(t,"__esModule",{value:!0});var a=r(/*! lodash/without */6),s=n(a),l=r(/*! lodash/round */483),u=n(l),i=r(/*! lodash/clamp */441),c=n(i),p=r(/*! lodash/every */243),d=n(p),f=r(/*! lodash/isUndefined */472),y=n(f),m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},v=r(/*! classnames */3),h=n(v),g=r(/*! react */1),b=n(g),P=r(/*! ../../lib */2);o._meta={name:"Progress",type:P.META.TYPES.MODULE,props:{attached:["top","bottom"],color:P.SUI.COLORS,label:["ratio","percent"],size:(0,s["default"])(P.SUI.SIZES,"mini","huge","massive")}},o.propTypes={as:P.customPropTypes.as,active:g.PropTypes.bool,attached:g.PropTypes.oneOf(o._meta.props.attached),autoSuccess:g.PropTypes.bool,color:g.PropTypes.oneOf(o._meta.props.color),children:g.PropTypes.node,className:g.PropTypes.string,disabled:g.PropTypes.bool,error:g.PropTypes.bool,indicating:g.PropTypes.bool,inverted:g.PropTypes.bool,label:P.customPropTypes.every([P.customPropTypes.some([P.customPropTypes.demand(["percent"]),P.customPropTypes.demand(["total","value"])]),g.PropTypes.oneOfType([g.PropTypes.bool,g.PropTypes.oneOf(o._meta.props.label)])]),percent:P.customPropTypes.every([P.customPropTypes.disallow(["total","value"]),g.PropTypes.oneOfType([g.PropTypes.string,g.PropTypes.number])]),progress:g.PropTypes.bool,precision:g.PropTypes.number,size:g.PropTypes.oneOf(o._meta.props.size),success:g.PropTypes.bool,total:P.customPropTypes.every([P.customPropTypes.demand(["value"]),P.customPropTypes.disallow(["percent"]),g.PropTypes.oneOfType([g.PropTypes.string,g.PropTypes.number])]),value:P.customPropTypes.every([P.customPropTypes.demand(["total"]),P.customPropTypes.disallow(["percent"]),g.PropTypes.oneOfType([g.PropTypes.string,g.PropTypes.number])]),warning:g.PropTypes.bool},t["default"]=o},/*!***************************************!*\ !*** ./src/modules/Progress/index.js ***! \***************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Progress */315),a=n(o);t["default"]=a["default"]},/*!**************************************!*\ !*** ./src/modules/Rating/Rating.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=r(/*! lodash/times */255),u=n(l),i=r(/*! lodash/invoke */246),c=n(i),p=r(/*! lodash/without */6),d=n(p),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),m=r(/*! classnames */3),v=n(m),h=r(/*! react */1),g=n(h),b=r(/*! ../../lib */2),P=r(/*! ./RatingIcon */318),T=n(P),O={name:"Rating",type:b.META.TYPES.MODULE,props:{clearable:["auto"],icon:["star","heart"],size:(0,d["default"])(b.SUI.SIZES,"medium","big")}},_=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),E.call(n),s=r,a(n,s)}return s(t,e),y(t,[{key:"render",value:function(){var e=this,r=this.props,n=r.className,o=r.disabled,a=r.icon,s=r.maxRating,l=r.size,i=this.state,c=i.rating,p=i.selectedIndex,d=i.isSelecting,y=(0,v["default"])("ui",a,l,(0,b.useKeyOnly)(o,"disabled"),(0,b.useKeyOnly)(d&&!o&&p>=0,"selected"),"rating",n),m=(0,b.getUnhandledProps)(t,this.props),h=(0,b.getElementType)(t,this.props);return g["default"].createElement(h,f({},m,{className:y,onMouseLeave:this.handleMouseLeave}),(0,u["default"])(s,function(t){return g["default"].createElement(T["default"],{active:c>=t+1,index:t,key:t,onClick:e.handleIconClick,onMouseEnter:e.handleIconMouseEnter,selected:p>=t&&d})}))}}]),t}(b.AutoControlledComponent);_.autoControlledProps=["rating"],_.defaultProps={clearable:"auto",maxRating:1},_.propTypes={as:b.customPropTypes.as,className:h.PropTypes.string,clearable:h.PropTypes.oneOfType([h.PropTypes.oneOf(O.props.clearable),h.PropTypes.bool]),defaultRating:h.PropTypes.oneOfType([h.PropTypes.string,h.PropTypes.number]),disabled:h.PropTypes.bool,icon:h.PropTypes.oneOf(O.props.icon),maxRating:h.PropTypes.oneOfType([h.PropTypes.string,h.PropTypes.number]),onRate:h.PropTypes.func,rating:h.PropTypes.oneOfType([h.PropTypes.string,h.PropTypes.number]),size:h.PropTypes.oneOf(O.props.size)},_._meta=O;var E=function(){var e=this;this.handleIconClick=function(t,r){var n=e.props,o=n.clearable,a=n.disabled,s=n.maxRating,l=n.onRate,u=e.state.rating;if(!a){var i=r+1;"auto"===o&&1===s?i=+!u:o===!0&&i===u&&(i=0),e.trySetState({rating:i},{isSelecting:!1}),l&&l(t,{rating:i,maxRating:s})}},this.handleIconMouseEnter=function(t){e.props.disabled||e.setState({selectedIndex:t,isSelecting:!0})},this.handleMouseLeave=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];c["default"].apply(void 0,[e.props,"onMouseLeave"].concat(r)),e.props.disabled||e.setState({selectedIndex:-1,isSelecting:!1})}};t["default"]=_},/*!******************************************!*\ !*** ./src/modules/Rating/RatingIcon.js ***! \******************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),u=r(/*! classnames */3),i=n(u),c=r(/*! react */1),p=n(c),d=r(/*! ../../lib */2),f=function(e){function t(){var e,r,n,s;o(this,t);for(var l=arguments.length,u=Array(l),i=0;i<l;i++)u[i]=arguments[i];return r=n=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.handleClick=function(e){var t=n.props,r=t.onClick,o=t.index;r&&r(e,o)},n.handleMouseEnter=function(){var e=n.props,t=e.onMouseEnter,r=e.index;t&&t(r)},s=r,a(n,s)}return s(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.active,r=e.selected,n=(0,i["default"])((0,d.useKeyOnly)(t,"active"),(0,d.useKeyOnly)(r,"selected"),"icon");return p["default"].createElement("i",{className:n,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter})}}]),t}(c.Component);f.propTypes={active:c.PropTypes.bool,index:c.PropTypes.number,onClick:c.PropTypes.func,onMouseEnter:c.PropTypes.func,selected:c.PropTypes.bool},f._meta={name:"RatingIcon",parent:"Rating",type:d.META.TYPES.MODULE},t["default"]=f},/*!*************************************!*\ !*** ./src/modules/Rating/index.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Rating */317),a=n(o);t["default"]=a["default"]},/*!**************************************!*\ !*** ./src/modules/Search/Search.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=r(/*! lodash/isEmpty */124),i=n(u),c=r(/*! lodash/partialRight */480),p=n(c),d=r(/*! lodash/inRange */469),f=n(d),y=r(/*! lodash/map */9),m=n(y),v=r(/*! lodash/get */37),h=n(v),g=r(/*! lodash/reduce */252),b=n(g),P=r(/*! lodash/isEqual */67),T=n(P),O=r(/*! lodash/without */6),_=n(O),E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},j=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),w=function V(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var o=Object.getPrototypeOf(e);return null===o?void 0:V(o,t,r)}if("value"in n)return n.value;var a=n.get;if(void 0!==a)return a.call(r)},M=r(/*! classnames */3),S=n(M),x=r(/*! react */1),A=n(x),N=r(/*! ../../lib */2),k=r(/*! ../../elements/Input */75),C=n(k),I=r(/*! ./SearchCategory */182),K=n(I),L=r(/*! ./SearchResult */183),U=n(L),D=r(/*! ./SearchResults */184),R=n(D),z=(0,N.makeDebugger)("search"),W={name:"Search",type:N.META.TYPES.MODULE,props:{size:(0,_["default"])(N.SUI.SIZES,"medium")}},F=function(e){function t(){var e,r,n,l;a(this,t);for(var u=arguments.length,c=Array(u),d=0;d<u;d++)c[d]=arguments[d];return r=n=s(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),n.handleChange=function(e,t){z("handleChange()"),z(t);var r=n.props.onChange;r&&r(e,t)},n.closeOnEscape=function(e){N.keyboardKey.getCode(e)===N.keyboardKey.Escape&&(e.preventDefault(),n.close())},n.moveSelectionOnKeyDown=function(e){switch(z("moveSelectionOnKeyDown()"),z(N.keyboardKey.getName(e)),N.keyboardKey.getCode(e)){case N.keyboardKey.ArrowDown:e.preventDefault(),n.moveSelectionBy(1);break;case N.keyboardKey.ArrowUp:e.preventDefault(),n.moveSelectionBy(-1)}},n.selectItemOnEnter=function(e){if(z("selectItemOnEnter()"),z(N.keyboardKey.getName(e)),N.keyboardKey.getCode(e)===N.keyboardKey.Enter){e.preventDefault();var t=n.getSelectedResult();t&&(n.setValue(t.title),n.handleChange(e,t),n.close())}},n.closeOnDocumentClick=function(e){z("closeOnDocumentClick()"),z(e),n.close()},n.handleMouseDown=function(e){z("handleMouseDown()");var t=n.props.onMouseDown;t&&t(e),n.isMouseDown=!0,document.addEventListener("mouseup",n.handleDocumentMouseUp)},n.handleDocumentMouseUp=function(){z("handleDocumentMouseUp()"),n.isMouseDown=!1,document.removeEventListener("mouseup",n.handleDocumentMouseUp)},n.handleInputClick=function(e){z("handleInputClick()",e),e.nativeEvent.stopImmediatePropagation(),n.tryOpen()},n.handleItemClick=function(e,t){z("handleItemClick()"),z(t);var r=n.getSelectedResult(t);e.nativeEvent.stopImmediatePropagation(),n.setValue(r.title),n.handleChange(e,r),n.close()},n.handleFocus=function(e){z("handleFocus()");var t=n.props.onFocus;t&&t(e),n.setState({focus:!0})},n.handleBlur=function(e){z("handleBlur()");var t=n.props.onBlur;t&&t(e),n.setState({focus:!1})},n.handleSearchChange=function(e){z("handleSearchChange()"),z(e.target.value),e.stopPropagation();var t=n.props,r=t.onSearchChange,o=t.minCharacters,a=n.state.open,s=e.target.value;r&&r(e,s),s.length<o?n.close():a||n.tryOpen(s),n.setValue(s)},n.getFlattenedResults=function(){var e=n.props,t=e.category,r=e.results;return t?(0,b["default"])(r,function(e,t){return e.concat(t.results)},[]):r},n.getSelectedResult=function(){var e=arguments.length<=0||void 0===arguments[0]?n.state.selectedIndex:arguments[0],t=n.getFlattenedResults();return(0,h["default"])(t,e)},n.setValue=function(e){z("setValue()"),z("value",e);var t=n.props.selectFirstResult;n.trySetState({value:e},{selectedIndex:t?0:-1})},n.moveSelectionBy=function(e){z("moveSelectionBy()"),z("offset: "+e);var t=n.state.selectedIndex,r=n.getFlattenedResults(),o=r.length-1,a=t+e;a>o?a=0:a<0&&(a=o),n.setState({selectedIndex:a}),n.scrollSelectedItemIntoView()},n.scrollSelectedItemIntoView=function(){z("scrollSelectedItemIntoView()");var e=document.querySelector(".ui.search.active.visible .results.visible"),t=e.querySelector(".result.active");z("menu (results): "+e),z("item (result): "+t);var r=t.offsetTop<e.scrollTop,n=t.offsetTop+t.clientHeight>e.scrollTop+e.clientHeight;(r||n)&&(e.scrollTop=t.offsetTop)},n.tryOpen=function(){var e=arguments.length<=0||void 0===arguments[0]?n.state.value:arguments[0];z("open()");var t=n.props.minCharacters;e.length<t||n.open()},n.open=function(){z("open()"),n.trySetState({open:!0})},n.close=function(){z("close()"),n.trySetState({open:!1})},n.renderSearchInput=function(){var e=n.props,t=e.icon,r=e.placeholder,o=n.state.value;return A["default"].createElement(C["default"],{value:o,placeholder:r,onBlur:n.handleBlur,onChange:n.handleSearchChange,onFocus:n.handleFocus,onClick:n.handleInputClick,input:{className:"prompt",tabIndex:"0",autoComplete:"off"},icon:t})},n.renderNoResults=function(){var e=n.props,t=e.noResultsMessage,r=e.noResultsDescription;return A["default"].createElement("div",{className:"message empty"},A["default"].createElement("div",{className:"header"},t),r&&A["default"].createElement("div",{className:"description"},r))},n.renderResult=function(e,t,r){var a=e.childKey,s=o(e,["childKey"]),l=arguments.length<=3||void 0===arguments[3]?0:arguments[3],u=n.props.resultRenderer,i=n.state.selectedIndex,c=t+l;return A["default"].createElement(U["default"],E({key:a||s.title,active:i===c,onClick:n.handleItemClick,onMouseDown:function(e){return e.preventDefault()},renderer:u},s,{id:c}))},n.renderResults=function(){var e=n.props.results;return(0,m["default"])(e,n.renderResult)},n.renderCategories=function(){var e=n.props,t=e.categoryRenderer,r=e.results,a=n.state.selectedIndex,s=0;return(0,m["default"])(r,function(e,r,l){var u=e.childKey,i=o(e,["childKey"]),c=E({key:u||i.name,active:(0,f["default"])(a,s,s+i.results.length),renderer:t},i),d=(0,p["default"])(n.renderResult,s);return s+=i.results.length,A["default"].createElement(K["default"],c,i.results.map(d))})},n.renderMenuContent=function(){var e=n.props,t=e.category,r=e.showNoResults,o=e.results;return(0,i["default"])(o)?r?n.renderNoResults():null:t?n.renderCategories():n.renderResults()},n.renderResultsMenu=function(){var e=n.state.open,t=e?"visible":"",r=n.renderMenuContent();if(r)return A["default"].createElement(R["default"],{className:t},r)},l=r,s(n,l)}return l(t,e),j(t,[{key:"componentWillMount",value:function(){w(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillMount",this)&&w(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillMount",this).call(this),z("componentWillMount()");var e=this.state,r=e.open,n=e.value;this.setValue(n),r&&this.open()}},{key:"shouldComponentUpdate",value:function(e,t){return!(0,T["default"])(e,this.props)||!(0,T["default"])(t,this.state)}},{key:"componentWillReceiveProps",value:function(e){w(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"componentWillReceiveProps",this).call(this,e),z("componentWillReceiveProps()"),z("changed props:",(0,N.objectDiff)(e,this.props)),(0,T["default"])(e.value,this.props.value)||(z("value changed, setting",e.value),this.setValue(e.value))}},{key:"componentDidUpdate",value:function(e,t){z("componentDidUpdate()"),z("to state:",(0,N.objectDiff)(t,this.state)),!t.focus&&this.state.focus?(z("search focused"),this.isMouseDown||(z("mouse is not down, opening"),this.tryOpen()),this.state.open&&(document.addEventListener("keydown",this.moveSelectionOnKeyDown),document.addEventListener("keydown",this.selectItemOnEnter))):t.focus&&!this.state.focus&&(z("search blurred"),this.isMouseDown||(z("mouse is not down, closing"),this.close()),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter)),!t.open&&this.state.open?(z("search opened"),this.open(),document.addEventListener("keydown",this.closeOnEscape),document.addEventListener("keydown",this.moveSelectionOnKeyDown),document.addEventListener("keydown",this.selectItemOnEnter),document.addEventListener("click",this.closeOnDocumentClick)):t.open&&!this.state.open&&(z("search closed"),this.close(),document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter),document.removeEventListener("click",this.closeOnDocumentClick))}},{key:"componentWillUnmount",value:function(){z("componentWillUnmount()"),document.removeEventListener("keydown",this.moveSelectionOnKeyDown),document.removeEventListener("keydown",this.selectItemOnEnter),document.removeEventListener("keydown",this.closeOnEscape),document.removeEventListener("click",this.closeOnDocumentClick)}},{key:"render",value:function(){z("render()"),z("props",this.props),z("state",this.state);var e=this.state,r=e.searchClasses,n=e.focus,o=e.open,a=this.props,s=a.aligned,l=a.category,u=a.className,i=a.fluid,c=a.loading,p=a.size,d=(0,S["default"])("ui",o&&"active visible",p,r,(0,N.useKeyOnly)(c,"loading"),(0,N.useValueAndKey)(s,"aligned"),(0,N.useKeyOnly)(l,"category"),(0,N.useKeyOnly)(n,"focus"),(0,N.useKeyOnly)(i,"fluid"),u,"search"),f=(0,N.getUnhandledProps)(t,this.props),y=(0,N.getElementType)(t,this.props);return A["default"].createElement(y,E({},f,{className:d,onBlur:this.handleBlur,onFocus:this.handleFocus,onChange:this.handleChange,onMouseDown:this.handleMouseDown}),this.renderSearchInput(),this.renderResultsMenu())}}]),t}(N.AutoControlledComponent);F.propTypes={as:N.customPropTypes.as,icon:x.PropTypes.oneOfType([x.PropTypes.element,x.PropTypes.string]),results:x.PropTypes.oneOfType([x.PropTypes.arrayOf(x.PropTypes.shape(U["default"].propTypes)),x.PropTypes.object]),open:x.PropTypes.bool,defaultOpen:x.PropTypes.bool,value:x.PropTypes.string,defaultValue:x.PropTypes.string,placeholder:x.PropTypes.string,minCharacters:x.PropTypes.number,noResultsMessage:x.PropTypes.string,noResultsDescription:x.PropTypes.string,selectFirstResult:x.PropTypes.bool,showNoResults:x.PropTypes.bool,categoryRenderer:x.PropTypes.func,resultRenderer:x.PropTypes.func,onBlur:x.PropTypes.func,onChange:x.PropTypes.func,onSearchChange:x.PropTypes.func,onFocus:x.PropTypes.func,onMouseDown:x.PropTypes.func,aligned:x.PropTypes.string,category:x.PropTypes.bool,className:x.PropTypes.string,fluid:x.PropTypes.bool,size:x.PropTypes.oneOf(W.props.size),loading:x.PropTypes.bool},F.defaultProps={icon:"search",minCharacters:1,noResultsMessage:"No results found.",showNoResults:!0},F.autoControlledProps=["open","value"],F._meta=W,F.Result=U["default"],F.Results=R["default"],F.Category=K["default"],t["default"]=F},/*!*************************************!*\ !*** ./src/modules/Search/index.js ***! \*************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Search */320),a=n(o);t["default"]=a["default"]},/*!**************************************!*\ !*** ./src/views/Comment/Comment.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.className,r=e.children,n=e.collapsed,s=(0,l["default"])((0,c.useKeyOnly)(n,"collapsed"),"comment",t),u=(0,c.getUnhandledProps)(o,e),p=(0,c.getElementType)(o,e);return i["default"].createElement(p,a({},u,{className:s}),r)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s=r(/*! classnames */3),l=n(s),u=r(/*! react */1),i=n(u),c=r(/*! ../../lib */2),p=r(/*! ./CommentAction */188),d=n(p),f=r(/*! ./CommentActions */189),y=n(f),m=r(/*! ./CommentAuthor */190),v=n(m),h=r(/*! ./CommentAvatar */191),g=n(h),b=r(/*! ./CommentContent */192),P=n(b),T=r(/*! ./CommentGroup */193),O=n(T),_=r(/*! ./CommentMetadata */194),E=n(_),j=r(/*! ./CommentText */195),w=n(j);o._meta={name:"Comment",type:c.META.TYPES.VIEW},o.propTypes={as:c.customPropTypes.as,children:u.PropTypes.node,className:u.PropTypes.string,collapsed:u.PropTypes.bool},o.Author=v["default"],o.Action=d["default"],o.Actions=y["default"],o.Avatar=g["default"],o.Content=P["default"],o.Group=O["default"],o.Metadata=E["default"],o.Text=w["default"],t["default"]=o},/*!************************************!*\ !*** ./src/views/Comment/index.js ***! \************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Comment */322),a=n(o);t["default"]=a["default"]},/*!********************************!*\ !*** ./src/views/Feed/Feed.js ***! \********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e){var t=e.children,r=e.className,n=e.events,s=e.size,l=(0,d["default"])("ui",r,s,"feed"),u=(0,m.getUnhandledProps)(a,e),p=(0,m.getElementType)(a,e);if(t)return y["default"].createElement(p,c({},u,{className:l}),t);var f=(0,i["default"])(n,function(e){var t=e.childKey,r=e.date,n=e.meta,a=e.summary,s=o(e,["childKey","date","meta","summary"]),l=t||[r,n,a].join("-");return y["default"].createElement(T["default"],c({date:r,key:l,meta:n,summary:a},s))});return y["default"].createElement(p,c({},u,{className:l}),f)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(/*! lodash/without */6),l=n(s),u=r(/*! lodash/map */9),i=n(u),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},p=r(/*! classnames */3),d=n(p),f=r(/*! react */1),y=n(f),m=r(/*! ../../lib */2),v=r(/*! ./FeedContent */87),h=n(v),g=r(/*! ./FeedDate */47),b=n(g),P=r(/*! ./FeedEvent */196),T=n(P),O=r(/*! ./FeedExtra */88),_=n(O),E=r(/*! ./FeedLabel */89),j=n(E),w=r(/*! ./FeedLike */90),M=n(w),S=r(/*! ./FeedMeta */91),x=n(S),A=r(/*! ./FeedSummary */92),N=n(A),k=r(/*! ./FeedUser */93),C=n(k);a._meta={name:"Feed",type:m.META.TYPES.VIEW,props:{size:(0,l["default"])(m.SUI.SIZES,"mini","tiny","medium","big","huge","massive")}},a.propTypes={as:m.customPropTypes.as,children:f.PropTypes.node,className:f.PropTypes.string,events:m.customPropTypes.collectionShorthand,size:f.PropTypes.oneOf(a._meta.props.size)},a.Content=h["default"],a.Date=b["default"],a.Event=T["default"],a.Extra=_["default"],a.Label=j["default"],a.Like=M["default"],a.Meta=x["default"],a.Summary=N["default"],a.User=C["default"],t["default"]=a},/*!*********************************!*\ !*** ./src/views/Feed/index.js ***! \*********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Feed */324),a=n(o);t["default"]=a["default"]},/*!*********************************!*\ !*** ./src/views/Item/index.js ***! \*********************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Item */197),a=n(o);t["default"]=a["default"]},/*!**************************************!*\ !*** ./src/views/Statistic/index.js ***! \**************************************/ function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=r(/*! ./Statistic */201),a=n(o);t["default"]=a["default"]},/*!****************************!*\ !*** ./~/debug/browser.js ***! \****************************/ function(e,t,r){function n(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return e;var n="color: "+this.color;e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,a=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(a=o))}),e.splice(a,0,n),e}function a(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(r){}}function l(){var e;try{e=t.storage.debug}catch(r){}return e}function u(){try{return window.localStorage}catch(e){}}t=e.exports=r(/*! ./debug */329),t.log=a,t.formatArgs=o,t.save=s,t.load=l,t.useColors=n,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(l())},/*!**************************!*\ !*** ./~/debug/debug.js ***! \**************************/ function(e,t,r){function n(){return t.colors[c++%t.colors.length]}function o(e){function r(){}function o(){var e=o,r=+new Date,a=r-(i||r);e.diff=a,e.prev=i,e.curr=r,i=r,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=n());var s=Array.prototype.slice.call(arguments);s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var l=0;s[0]=s[0].replace(/%([a-z%])/g,function(r,n){if("%%"===r)return r;l++;var o=t.formatters[n];if("function"==typeof o){var a=s[l];r=o.call(e,a),s.splice(l,1),l--}return r}),"function"==typeof t.formatArgs&&(s=t.formatArgs.apply(e,s));var u=o.log||t.log||console.log.bind(console);u.apply(e,s)}r.enabled=!1,o.enabled=!0;var a=t.enabled(e)?o:r;return a.namespace=e,a}function a(e){t.save(e);for(var r=(e||"").split(/[\s,]+/),n=r.length,o=0;o<n;o++)r[o]&&(e=r[o].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function s(){t.enable("")}function l(e){var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=o,t.coerce=u,t.disable=s,t.enable=a,t.enabled=l,t.humanize=r(/*! ms */492),t.names=[],t.skips=[],t.formatters={};var i,c=0},/*!*******************************!*\ !*** ./~/lodash/_DataView.js ***! \*******************************/ function(e,t,r){var n=r(/*! ./_getNative */21),o=r(/*! ./_root */11),a=n(o,"DataView");e.exports=a},/*!***************************!*\ !*** ./~/lodash/_Hash.js ***! \***************************/ function(e,t,r){function n(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}var o=r(/*! ./_hashClear */399),a=r(/*! ./_hashDelete */400),s=r(/*! ./_hashGet */401),l=r(/*! ./_hashHas */402),u=r(/*! ./_hashSet */403);n.prototype.clear=o,n.prototype["delete"]=a,n.prototype.get=s,n.prototype.has=l,n.prototype.set=u,e.exports=n},/*!******************************!*\ !*** ./~/lodash/_Promise.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_getNative */21),o=r(/*! ./_root */11),a=n(o,"Promise");e.exports=a},/*!**********************************!*\ !*** ./~/lodash/_addMapEntry.js ***! \**********************************/ function(e,t){function r(e,t){return e.set(t[0],t[1]),e}e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_addSetEntry.js ***! \**********************************/ function(e,t){function r(e,t){return e.add(t),e}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_arrayEvery.js ***! \*********************************/ function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(!t(e[r],r,e))return!1;return!0}e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_arrayFilter.js ***! \**********************************/ function(e,t){function r(e,t){for(var r=-1,n=e?e.length:0,o=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[o++]=s)}return a}e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_asciiToArray.js ***! \***********************************/ function(e,t){function r(e){return e.split("")}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_asciiWords.js ***! \*********************************/ function(e,t){function r(e){return e.match(n)||[]}var n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=r},/*!********************************!*\ !*** ./~/lodash/_baseEvery.js ***! \********************************/ function(e,t,r){function n(e,t){var r=!0;return o(e,function(e,n,o){return r=!!t(e,n,o)}),r}var o=r(/*! ./_baseEach */26);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseFilter.js ***! \*********************************/ function(e,t,r){function n(e,t){var r=[];return o(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}var o=r(/*! ./_baseEach */26);e.exports=n},/*!******************************!*\ !*** ./~/lodash/_baseFor.js ***! \******************************/ function(e,t,r){var n=r(/*! ./_createBaseFor */378),o=n();e.exports=o},/*!*********************************!*\ !*** ./~/lodash/_baseGetTag.js ***! \*********************************/ function(e,t){function r(e){return o.call(e)}var n=Object.prototype,o=n.toString;e.exports=r},/*!******************************!*\ !*** ./~/lodash/_baseHas.js ***! \******************************/ function(e,t){function r(e,t){return null!=e&&o.call(e,t)}var n=Object.prototype,o=n.hasOwnProperty;e.exports=r},/*!********************************!*\ !*** ./~/lodash/_baseHasIn.js ***! \********************************/ function(e,t){function r(e,t){return null!=e&&t in Object(e)}e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_baseInRange.js ***! \**********************************/ function(e,t){function r(e,t,r){return e>=o(t,r)&&e<n(t,r)}var n=Math.max,o=Math.min;e.exports=r},/*!***************************************!*\ !*** ./~/lodash/_baseIntersection.js ***! \***************************************/ function(e,t,r){function n(e,t,r){for(var n=r?s:a,p=e[0].length,d=e.length,f=d,y=Array(d),m=1/0,v=[];f--;){var h=e[f];f&&t&&(h=l(h,u(t))),m=c(h.length,m),y[f]=!r&&(t||p>=120&&h.length>=120)?new o(f&&h):void 0}h=e[0];var g=-1,b=y[0];e:for(;++g<p&&v.length<m;){var P=h[g],T=t?t(P):P;if(P=r||0!==P?P:0,!(b?i(b,T):n(v,T,r))){for(f=d;--f;){var O=y[f];if(!(O?i(O,T):n(e[f],T,r)))continue e}b&&b.push(T),v.push(P)}}return v}var o=r(/*! ./_SetCache */49),a=r(/*! ./_arrayIncludes */51),s=r(/*! ./_arrayIncludesWith */103),l=r(/*! ./_arrayMap */18),u=r(/*! ./_baseUnary */111),i=r(/*! ./_cacheHas */112),c=Math.min;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseInvoke.js ***! \*********************************/ function(e,t,r){function n(e,t,r){s(t,e)||(t=a(t),e=u(e,t),t=l(t));var n=null==e?e:e[i(t)];return null==n?void 0:o(n,e,r)}var o=r(/*! ./_apply */29),a=r(/*! ./_castPath */113),s=r(/*! ./_isKey */33),l=r(/*! ./last */475),u=r(/*! ./_parent */424),i=r(/*! ./_toKey */19);e.exports=n},/*!**************************************!*\ !*** ./~/lodash/_baseIsEqualDeep.js ***! \**************************************/ function(e,t,r){function n(e,t,r,n,v,g){var b=i(e),P=i(t),T=y,O=y;b||(T=u(e),T=T==f?m:T),P||(O=u(t),O=O==f?m:O);var _=T==m&&!c(e),E=O==m&&!c(t),j=T==O;if(j&&!_)return g||(g=new o),b||p(e)?a(e,t,r,n,v,g):s(e,t,T,r,n,v,g);if(!(v&d)){var w=_&&h.call(e,"__wrapped__"),M=E&&h.call(t,"__wrapped__");if(w||M){var S=w?e.value():e,x=M?t.value():t;return g||(g=new o),r(S,x,n,v,g)}}return!!j&&(g||(g=new o),l(e,t,r,n,v,g))}var o=r(/*! ./_Stack */102),a=r(/*! ./_equalArrays */226),s=r(/*! ./_equalByTag */390),l=r(/*! ./_equalObjects */391),u=r(/*! ./_getTag */118),i=r(/*! ./isArray */4),c=r(/*! ./_isHostObject */60),p=r(/*! ./isTypedArray */250),d=2,f="[object Arguments]",y="[object Array]",m="[object Object]",v=Object.prototype,h=v.hasOwnProperty;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_baseIsMatch.js ***! \**********************************/ function(e,t,r){function n(e,t,r,n){var u=r.length,i=u,c=!n;if(null==e)return!i;for(e=Object(e);u--;){var p=r[u];if(c&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++u<i;){p=r[u];var d=p[0],f=e[d],y=p[1];if(c&&p[2]){if(void 0===f&&!(d in e))return!1}else{var m=new o;if(n)var v=n(f,y,d,e,t,m);if(!(void 0===v?a(y,f,n,s|l,m):v))return!1}}return!0}var o=r(/*! ./_Stack */102),a=r(/*! ./_baseIsEqual */108),s=1,l=2;e.exports=n},/*!********************************!*\ !*** ./~/lodash/_baseIsNaN.js ***! \********************************/ function(e,t){function r(e){return e!==e}e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_baseIsNative.js ***! \***********************************/ function(e,t,r){function n(e){if(!l(e)||s(e))return!1;var t=o(e)||a(e)?m:c;return t.test(u(e))}var o=r(/*! ./isFunction */24),a=r(/*! ./_isHostObject */60),s=r(/*! ./_isMasked */410),l=r(/*! ./isObject */13),u=r(/*! ./_toSource */240),i=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,p=Function.prototype,d=Object.prototype,f=p.toString,y=d.hasOwnProperty,m=RegExp("^"+f.call(y).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=n},/*!***************************************!*\ !*** ./~/lodash/_baseIsTypedArray.js ***! \***************************************/ function(e,t,r){function n(e){return a(e)&&o(e.length)&&!!A[k.call(e)]}var o=r(/*! ./isLength */125),a=r(/*! ./isObjectLike */20),s="[object Arguments]",l="[object Array]",u="[object Boolean]",i="[object Date]",c="[object Error]",p="[object Function]",d="[object Map]",f="[object Number]",y="[object Object]",m="[object RegExp]",v="[object Set]",h="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",P="[object DataView]",T="[object Float32Array]",O="[object Float64Array]",_="[object Int8Array]",E="[object Int16Array]",j="[object Int32Array]",w="[object Uint8Array]",M="[object Uint8ClampedArray]",S="[object Uint16Array]",x="[object Uint32Array]",A={};A[T]=A[O]=A[_]=A[E]=A[j]=A[w]=A[M]=A[S]=A[x]=!0,A[s]=A[l]=A[b]=A[u]=A[P]=A[i]=A[c]=A[p]=A[d]=A[f]=A[y]=A[m]=A[v]=A[h]=A[g]=!1;var N=Object.prototype,k=N.toString;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseKeysIn.js ***! \*********************************/ function(e,t,r){function n(e){if(!o(e))return s(e);var t=a(e),r=[];for(var n in e)("constructor"!=n||!t&&u.call(e,n))&&r.push(n);return r}var o=r(/*! ./isObject */13),a=r(/*! ./_isPrototype */34),s=r(/*! ./_nativeKeysIn */422),l=Object.prototype,u=l.hasOwnProperty;e.exports=n},/*!******************************!*\ !*** ./~/lodash/_baseMap.js ***! \******************************/ function(e,t,r){function n(e,t){var r=-1,n=a(e)?Array(e.length):[];return o(e,function(e,o,a){n[++r]=t(e,o,a)}),n}var o=r(/*! ./_baseEach */26),a=r(/*! ./isArrayLike */15);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_baseMatches.js ***! \**********************************/ function(e,t,r){function n(e){var t=a(e);return 1==t.length&&t[0][2]?s(t[0][0],t[0][1]):function(r){return r===e||o(r,e,t)}}var o=r(/*! ./_baseIsMatch */349),a=r(/*! ./_getMatchData */394),s=r(/*! ./_matchesStrictComparable */234);e.exports=n},/*!******************************************!*\ !*** ./~/lodash/_baseMatchesProperty.js ***! \******************************************/ function(e,t,r){function n(e,t){return l(e)&&u(t)?i(c(e),t):function(r){var n=a(r,e);return void 0===n&&n===t?s(r,e):o(t,n,void 0,p|d)}}var o=r(/*! ./_baseIsEqual */108),a=r(/*! ./get */37),s=r(/*! ./hasIn */468),l=r(/*! ./_isKey */33),u=r(/*! ./_isStrictComparable */232),i=r(/*! ./_matchesStrictComparable */234),c=r(/*! ./_toKey */19),p=1,d=2;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_basePickBy.js ***! \*********************************/ function(e,t){function r(e,t,r){for(var n=-1,o=t.length,a={};++n<o;){var s=t[n],l=e[s];r(l,s)&&(a[s]=l)}return a}e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_baseProperty.js ***! \***********************************/ function(e,t){function r(e){return function(t){return null==t?void 0:t[e]}}e.exports=r},/*!***************************************!*\ !*** ./~/lodash/_basePropertyDeep.js ***! \***************************************/ function(e,t,r){function n(e){return function(t){return o(t,e)}}var o=r(/*! ./_baseGet */107);e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_basePropertyOf.js ***! \*************************************/ function(e,t){function r(e){return function(t){return null==e?void 0:e[t]}}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_baseReduce.js ***! \*********************************/ function(e,t){function r(e,t,r,n,o){return o(e,function(e,o,a){r=n?(n=!1,e):t(r,e,o,a)}),r}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_baseSome.js ***! \*******************************/ function(e,t,r){function n(e,t){var r;return o(e,function(e,n,o){return r=t(e,n,o),!r}),!!r}var o=r(/*! ./_baseEach */26);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_baseUniq.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=-1,p=a,d=e.length,f=!0,y=[],m=y;if(r)f=!1,p=s;else if(d>=c){var v=t?null:u(e);if(v)return i(v);f=!1,p=l,m=new o}else m=t?[]:y;e:for(;++n<d;){var h=e[n],g=t?t(h):h;if(h=r||0!==h?h:0,f&&g===g){for(var b=m.length;b--;)if(m[b]===g)continue e;t&&m.push(g),y.push(h)}else p(m,g,r)||(m!==y&&m.push(g),y.push(h))}return y}var o=r(/*! ./_SetCache */49),a=r(/*! ./_arrayIncludes */51),s=r(/*! ./_arrayIncludesWith */103),l=r(/*! ./_cacheHas */112),u=r(/*! ./_createSet */387),i=r(/*! ./_setToArray */63),c=200;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_baseValues.js ***! \*********************************/ function(e,t,r){function n(e,t){return o(t,function(t){return e[t]})}var o=r(/*! ./_arrayMap */18);e.exports=n},/*!******************************************!*\ !*** ./~/lodash/_castArrayLikeObject.js ***! \******************************************/ function(e,t,r){function n(e){return o(e)?e:[]}var o=r(/*! ./isArrayLikeObject */38);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_cloneBuffer.js ***! \**********************************/ function(e,t){function r(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}e.exports=r},/*!************************************!*\ !*** ./~/lodash/_cloneDataView.js ***! \************************************/ function(e,t,r){function n(e,t){var r=t?o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var o=r(/*! ./_cloneArrayBuffer */114);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/_cloneMap.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=t?r(s(e),!0):s(e);return a(n,o,new e.constructor)}var o=r(/*! ./_addMapEntry */333),a=r(/*! ./_arrayReduce */53),s=r(/*! ./_mapToArray */233);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_cloneRegExp.js ***! \**********************************/ function(e,t){function r(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}var n=/\w*$/;e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_cloneSet.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=t?r(s(e),!0):s(e);return a(n,o,new e.constructor)}var o=r(/*! ./_addSetEntry */334),a=r(/*! ./_arrayReduce */53),s=r(/*! ./_setToArray */63);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_cloneSymbol.js ***! \**********************************/ function(e,t,r){function n(e){return s?Object(s.call(e)):{}}var o=r(/*! ./_Symbol */50),a=o?o.prototype:void 0,s=a?a.valueOf:void 0;e.exports=n},/*!**************************************!*\ !*** ./~/lodash/_cloneTypedArray.js ***! \**************************************/ function(e,t,r){function n(e,t){var r=t?o(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var o=r(/*! ./_cloneArrayBuffer */114);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_copySymbols.js ***! \**********************************/ function(e,t,r){function n(e,t){return o(e,a(e),t)}var o=r(/*! ./_copyObject */115),a=r(/*! ./_getSymbols */117);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_coreJsData.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./_root */11),o=n["__core-js_shared__"];e.exports=o},/*!***********************************!*\ !*** ./~/lodash/_countHolders.js ***! \***********************************/ function(e,t){function r(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&n++;return n}e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_createAssigner.js ***! \*************************************/ function(e,t,r){function n(e){return o(function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,l=o>2?r[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,l&&a(r[0],r[1],l)&&(s=o<3?void 0:s,o=1),t=Object(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t})}var o=r(/*! ./_baseRest */12),a=r(/*! ./_isIterateeCall */119);e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_createBaseEach.js ***! \*************************************/ function(e,t,r){function n(e,t){return function(r,n){if(null==r)return r;if(!o(r))return e(r,n);for(var a=r.length,s=t?a:-1,l=Object(r);(t?s--:++s<a)&&n(l[s],s,l)!==!1;);return r}}var o=r(/*! ./isArrayLike */15);e.exports=n},/*!************************************!*\ !*** ./~/lodash/_createBaseFor.js ***! \************************************/ function(e,t){function r(e){return function(t,r,n){for(var o=-1,a=Object(t),s=n(t),l=s.length;l--;){var u=s[e?l:++o];if(r(a[u],u,a)===!1)break}return t}}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_createBind.js ***! \*********************************/ function(e,t,r){function n(e,t,r){function n(){var t=this&&this!==a&&this instanceof n?u:e;return t.apply(l?r:this,arguments)}var l=t&s,u=o(e);return n}var o=r(/*! ./_createCtor */56),a=r(/*! ./_root */11),s=1;e.exports=n},/*!**************************************!*\ !*** ./~/lodash/_createCaseFirst.js ***! \**************************************/ function(e,t,r){function n(e){return function(t){t=l(t);var r=a(t)?s(t):void 0,n=r?r[0]:t.charAt(0),u=r?o(r,1).join(""):t.slice(1);return n[e]()+u}}var o=r(/*! ./_castSlice */221),a=r(/*! ./_hasUnicode */230),s=r(/*! ./_stringToArray */434),l=r(/*! ./toString */25);e.exports=n},/*!***************************************!*\ !*** ./~/lodash/_createCompounder.js ***! \***************************************/ function(e,t,r){function n(e){return function(t){return o(s(a(t).replace(u,"")),e,"")}}var o=r(/*! ./_arrayReduce */53),a=r(/*! ./deburr */444),s=r(/*! ./words */490),l="['’]",u=RegExp(l,"g");e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_createCurry.js ***! \**********************************/ function(e,t,r){function n(e,t,r){function n(){for(var a=arguments.length,d=Array(a),f=a,y=u(n);f--;)d[f]=arguments[f];var m=a<3&&d[0]!==y&&d[a-1]!==y?[]:i(d,y);if(a-=m.length,a<r)return l(e,t,s,n.placeholder,void 0,d,m,void 0,void 0,r-a);var v=this&&this!==c&&this instanceof n?p:e;return o(v,this,d)}var p=a(e);return n}var o=r(/*! ./_apply */29),a=r(/*! ./_createCtor */56),s=r(/*! ./_createHybrid */224),l=r(/*! ./_createRecurry */225),u=r(/*! ./_getHolder */57),i=r(/*! ./_replaceHolders */35),c=r(/*! ./_root */11);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_createFind.js ***! \*********************************/ function(e,t,r){function n(e){return function(t,r,n){var l=Object(t);if(!a(t)){var u=o(r,3);t=s(t),r=function(e){return u(l[e],e,l)}}var i=e(t,r,n);return i>-1?l[u?t[i]:i]:void 0}}var o=r(/*! ./_baseIteratee */14),a=r(/*! ./isArrayLike */15),s=r(/*! ./keys */8);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_createFlow.js ***! \*********************************/ function(e,t,r){function n(e){return s(function(t){t=a(t,1);var r=t.length,n=r,s=o.prototype.thru;for(e&&t.reverse();n--;){var h=t[n];if("function"!=typeof h)throw new TypeError(d);if(s&&!g&&"wrapper"==u(h))var g=new o([],(!0))}for(n=g?n:r;++n<r;){h=t[n];var b=u(h),P="wrapper"==b?l(h):void 0;g=P&&c(P[0])&&P[1]==(m|f|y|v)&&!P[4].length&&1==P[9]?g[u(P[0])].apply(g,P[3]):1==h.length&&c(h)?g[b]():g.thru(h)}return function(){var e=arguments,n=e[0];if(g&&1==e.length&&i(n)&&n.length>=p)return g.plant(n).value();for(var o=0,a=r?t[o].apply(this,e):n;++o<r;)a=t[o].call(this,a);return a}})}var o=r(/*! ./_LodashWrapper */99),a=r(/*! ./_baseFlatten */27),s=r(/*! ./_baseRest */12),l=r(/*! ./_getData */116),u=r(/*! ./_getFuncName */228),i=r(/*! ./isArray */4),c=r(/*! ./_isLaziable */231),p=200,d="Expected a function",f=8,y=32,m=128,v=256;e.exports=n},/*!************************************!*\ !*** ./~/lodash/_createPartial.js ***! \************************************/ function(e,t,r){function n(e,t,r,n){function u(){for(var t=-1,a=arguments.length,l=-1,p=n.length,d=Array(p+a),f=this&&this!==s&&this instanceof u?c:e;++l<p;)d[l]=n[l];for(;a--;)d[l++]=arguments[++t];return o(f,i?r:this,d)}var i=t&l,c=a(e);return u}var o=r(/*! ./_apply */29),a=r(/*! ./_createCtor */56),s=r(/*! ./_root */11),l=1;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_createRound.js ***! \**********************************/ function(e,t,r){function n(e){var t=Math[e];return function(e,r){if(e=a(e),r=l(o(r),292)){var n=(s(e)+"e").split("e"),u=t(n[0]+"e"+(+n[1]+r));return n=(s(u)+"e").split("e"),+(n[0]+"e"+(+n[1]-r))}return t(e)}}var o=r(/*! ./toInteger */17),a=r(/*! ./toNumber */68),s=r(/*! ./toString */25),l=Math.min;e.exports=n},/*!********************************!*\ !*** ./~/lodash/_createSet.js ***! \********************************/ function(e,t,r){var n=r(/*! ./_Set */205),o=r(/*! ./noop */251),a=r(/*! ./_setToArray */63),s=1/0,l=n&&1/a(new n([,-0]))[1]==s?function(e){return new n(e)}:o;e.exports=l},/*!***********************************!*\ !*** ./~/lodash/_deburrLetter.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./_basePropertyOf */360),o={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},a=n(o);e.exports=a},/*!*************************************!*\ !*** ./~/lodash/_defineProperty.js ***! \*************************************/ function(e,t,r){var n=r(/*! ./_getNative */21),o=function(){var e=n(Object,"defineProperty"),t=n.name;return t&&t.length>2?e:void 0}();e.exports=o},/*!*********************************!*\ !*** ./~/lodash/_equalByTag.js ***! \*********************************/ function(e,t,r){function n(e,t,r,n,o,_,j){switch(r){case O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case T:return!(e.byteLength!=t.byteLength||!n(new a(e),new a(t)));case d:case f:case v:return s(+e,+t);case y:return e.name==t.name&&e.message==t.message;case h:case b:return e==t+"";case m:var w=u;case g:var M=_&p;if(w||(w=i),e.size!=t.size&&!M)return!1;var S=j.get(e);if(S)return S==t;_|=c,j.set(e,t);var x=l(w(e),w(t),n,o,_,j);return j["delete"](e),x;case P:if(E)return E.call(e)==E.call(t)}return!1}var o=r(/*! ./_Symbol */50),a=r(/*! ./_Uint8Array */206),s=r(/*! ./eq */36),l=r(/*! ./_equalArrays */226),u=r(/*! ./_mapToArray */233),i=r(/*! ./_setToArray */63),c=1,p=2,d="[object Boolean]",f="[object Date]",y="[object Error]",m="[object Map]",v="[object Number]",h="[object RegExp]",g="[object Set]",b="[object String]",P="[object Symbol]",T="[object ArrayBuffer]",O="[object DataView]",_=o?o.prototype:void 0,E=_?_.valueOf:void 0;e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_equalObjects.js ***! \***********************************/ function(e,t,r){function n(e,t,r,n,s,u){var i=s&a,c=o(e),p=c.length,d=o(t),f=d.length;if(p!=f&&!i)return!1;for(var y=p;y--;){var m=c[y];if(!(i?m in t:l.call(t,m)))return!1}var v=u.get(e);if(v&&u.get(t))return v==t;var h=!0;u.set(e,t),u.set(t,e);for(var g=i;++y<p;){m=c[y];var b=e[m],P=t[m];if(n)var T=i?n(P,b,m,t,e,u):n(b,P,m,e,t,u);if(!(void 0===T?b===P||r(b,P,n,s,u):T)){h=!1;break}g||(g="constructor"==m)}if(h&&!g){var O=e.constructor,_=t.constructor;O!=_&&"constructor"in e&&"constructor"in t&&!("function"==typeof O&&O instanceof O&&"function"==typeof _&&_ instanceof _)&&(h=!1)}return u["delete"](e),u["delete"](t),h}var o=r(/*! ./keys */8),a=2,s=Object.prototype,l=s.hasOwnProperty;e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_getAllKeys.js ***! \*********************************/ function(e,t,r){function n(e){return o(e,s,a)}var o=r(/*! ./_baseGetAllKeys */214),a=r(/*! ./_getSymbols */117),s=r(/*! ./keys */8);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_getAllKeysIn.js ***! \***********************************/ function(e,t,r){function n(e){return o(e,s,a)}var o=r(/*! ./_baseGetAllKeys */214),a=r(/*! ./_getSymbolsIn */395),s=r(/*! ./keysIn */474);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_getMatchData.js ***! \***********************************/ function(e,t,r){function n(e){for(var t=a(e),r=t.length;r--;){var n=t[r],s=e[n];t[r]=[n,s,o(s)]}return t}var o=r(/*! ./_isStrictComparable */232),a=r(/*! ./keys */8);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_getSymbolsIn.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./_arrayPush */52),o=r(/*! ./_getPrototype */59),a=r(/*! ./_getSymbols */117),s=r(/*! ./stubArray */254),l=Object.getOwnPropertySymbols,u=l?function(e){for(var t=[];e;)n(t,a(e)),e=o(e);return t}:s;e.exports=u},/*!*******************************!*\ !*** ./~/lodash/_getValue.js ***! \*******************************/ function(e,t){function r(e,t){return null==e?void 0:e[t]}e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_getWrapDetails.js ***! \*************************************/ function(e,t){function r(e){var t=e.match(n);return t?t[1].split(o):[]}var n=/\{\n\/\* \[wrapped with (.+)\] \*/,o=/,? & /;e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_hasUnicodeWord.js ***! \*************************************/ function(e,t){function r(e){return n.test(e)}var n=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=r},/*!********************************!*\ !*** ./~/lodash/_hashClear.js ***! \********************************/ function(e,t,r){function n(){this.__data__=o?o(null):{}}var o=r(/*! ./_nativeCreate */62);e.exports=n},/*!*********************************!*\ !*** ./~/lodash/_hashDelete.js ***! \*********************************/ function(e,t){function r(e){return this.has(e)&&delete this.__data__[e]}e.exports=r},/*!******************************!*\ !*** ./~/lodash/_hashGet.js ***! \******************************/ function(e,t,r){function n(e){var t=this.__data__;if(o){var r=t[e];return r===a?void 0:r}return l.call(t,e)?t[e]:void 0}var o=r(/*! ./_nativeCreate */62),a="__lodash_hash_undefined__",s=Object.prototype,l=s.hasOwnProperty;e.exports=n},/*!******************************!*\ !*** ./~/lodash/_hashHas.js ***! \******************************/ function(e,t,r){function n(e){var t=this.__data__;return o?void 0!==t[e]:s.call(t,e)}var o=r(/*! ./_nativeCreate */62),a=Object.prototype,s=a.hasOwnProperty;e.exports=n},/*!******************************!*\ !*** ./~/lodash/_hashSet.js ***! \******************************/ function(e,t,r){function n(e,t){var r=this.__data__;return r[e]=o&&void 0===t?a:t,this}var o=r(/*! ./_nativeCreate */62),a="__lodash_hash_undefined__";e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_initCloneArray.js ***! \*************************************/ function(e,t){function r(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&o.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var n=Object.prototype,o=n.hasOwnProperty;e.exports=r},/*!*************************************!*\ !*** ./~/lodash/_initCloneByTag.js ***! \*************************************/ function(e,t,r){function n(e,t,r,n){var A=e.constructor;switch(t){case b:return o(e);case p:case d:return new A((+e));case P:return a(e,n);case T:case O:case _:case E:case j:case w:case M:case S:case x:return c(e,n);case f:return s(e,n,r);case y:case h:return new A(e);case m:return l(e);case v:return u(e,n,r);case g:return i(e)}}var o=r(/*! ./_cloneArrayBuffer */114),a=r(/*! ./_cloneDataView */367),s=r(/*! ./_cloneMap */368),l=r(/*! ./_cloneRegExp */369),u=r(/*! ./_cloneSet */370),i=r(/*! ./_cloneSymbol */371),c=r(/*! ./_cloneTypedArray */372),p="[object Boolean]",d="[object Date]",f="[object Map]",y="[object Number]",m="[object RegExp]",v="[object Set]",h="[object String]",g="[object Symbol]",b="[object ArrayBuffer]",P="[object DataView]",T="[object Float32Array]",O="[object Float64Array]",_="[object Int8Array]",E="[object Int16Array]",j="[object Int32Array]",w="[object Uint8Array]",M="[object Uint8ClampedArray]",S="[object Uint16Array]",x="[object Uint32Array]";e.exports=n},/*!**************************************!*\ !*** ./~/lodash/_initCloneObject.js ***! \**************************************/ function(e,t,r){function n(e){return"function"!=typeof e.constructor||s(e)?{}:o(a(e))}var o=r(/*! ./_baseCreate */31),a=r(/*! ./_getPrototype */59),s=r(/*! ./_isPrototype */34);e.exports=n},/*!****************************************!*\ !*** ./~/lodash/_insertWrapDetails.js ***! \****************************************/ function(e,t){function r(e,t){var r=t.length,o=r-1;return t[o]=(r>1?"& ":"")+t[o],t=t.join(r>2?", ":" "),e.replace(n,"{\n/* [wrapped with "+t+"] */\n")}var n=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=r},/*!************************************!*\ !*** ./~/lodash/_isFlattenable.js ***! \************************************/ function(e,t,r){function n(e){return s(e)||a(e)||!!(l&&e&&e[l])}var o=r(/*! ./_Symbol */50),a=r(/*! ./isArguments */66),s=r(/*! ./isArray */4),l=o?o.isConcatSpreadable:void 0;e.exports=n},/*!********************************!*\ !*** ./~/lodash/_isKeyable.js ***! \********************************/ function(e,t){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_isMasked.js ***! \*******************************/ function(e,t,r){function n(e){return!!a&&a in e}var o=r(/*! ./_coreJsData */374),a=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_listCacheClear.js ***! \*************************************/ function(e,t){function r(){this.__data__=[]}e.exports=r},/*!**************************************!*\ !*** ./~/lodash/_listCacheDelete.js ***! \**************************************/ function(e,t,r){function n(e){var t=this.__data__,r=o(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():s.call(t,r,1),!0}var o=r(/*! ./_assocIndexOf */54),a=Array.prototype,s=a.splice;e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_listCacheGet.js ***! \***********************************/ function(e,t,r){function n(e){var t=this.__data__,r=o(t,e);return r<0?void 0:t[r][1]}var o=r(/*! ./_assocIndexOf */54);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_listCacheHas.js ***! \***********************************/ function(e,t,r){function n(e){return o(this.__data__,e)>-1}var o=r(/*! ./_assocIndexOf */54);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_listCacheSet.js ***! \***********************************/ function(e,t,r){function n(e,t){var r=this.__data__,n=o(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}var o=r(/*! ./_assocIndexOf */54);e.exports=n},/*!************************************!*\ !*** ./~/lodash/_mapCacheClear.js ***! \************************************/ function(e,t,r){function n(){this.__data__={hash:new o,map:new(s||a),string:new o}}var o=r(/*! ./_Hash */331),a=r(/*! ./_ListCache */48),s=r(/*! ./_Map */100);e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_mapCacheDelete.js ***! \*************************************/ function(e,t,r){function n(e){return o(this,e)["delete"](e)}var o=r(/*! ./_getMapData */58);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_mapCacheGet.js ***! \**********************************/ function(e,t,r){function n(e){return o(this,e).get(e)}var o=r(/*! ./_getMapData */58);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_mapCacheHas.js ***! \**********************************/ function(e,t,r){function n(e){return o(this,e).has(e)}var o=r(/*! ./_getMapData */58);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_mapCacheSet.js ***! \**********************************/ function(e,t,r){function n(e,t){return o(this,e).set(e,t),this}var o=r(/*! ./_getMapData */58);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_mergeData.js ***! \********************************/ function(e,t,r){function n(e,t){var r=e[1],n=t[1],m=r|n,v=m<(u|i|d),h=n==d&&r==p||n==d&&r==f&&e[7].length<=t[8]||n==(d|f)&&t[7].length<=t[8]&&r==p;if(!v&&!h)return e;n&u&&(e[2]=t[2],m|=r&u?0:c);var g=t[3];if(g){var b=e[3];e[3]=b?o(b,g,t[4]):g,e[4]=b?s(e[3],l):t[4]}return g=t[5],g&&(b=e[5],e[5]=b?a(b,g,t[6]):g,e[6]=b?s(e[5],l):t[6]),g=t[7],g&&(e[7]=g),n&d&&(e[8]=null==e[8]?t[8]:y(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=m,e}var o=r(/*! ./_composeArgs */222),a=r(/*! ./_composeArgsRight */223),s=r(/*! ./_replaceHolders */35),l="__lodash_placeholder__",u=1,i=2,c=4,p=8,d=128,f=256,y=Math.min;e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_nativeKeysIn.js ***! \***********************************/ function(e,t){function r(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_nodeUtil.js ***! \*******************************/ function(e,t,r){(function(e){var n=r(/*! ./_freeGlobal */227),o="object"==typeof t&&t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===o,l=s&&n.process,u=function(){try{return l&&l.binding("util")}catch(e){}}();e.exports=u}).call(t,r(/*! ./../webpack/buildin/module.js */259)(e))},/*!*****************************!*\ !*** ./~/lodash/_parent.js ***! \*****************************/ function(e,t,r){function n(e,t){return 1==t.length?e:o(e,a(t,0,-1))}var o=r(/*! ./_baseGet */107),a=r(/*! ./_baseSlice */110);e.exports=n},/*!********************************!*\ !*** ./~/lodash/_realNames.js ***! \********************************/ function(e,t){var r={};e.exports=r},/*!******************************!*\ !*** ./~/lodash/_reorder.js ***! \******************************/ function(e,t,r){function n(e,t){for(var r=e.length,n=s(t.length,r),l=o(e);n--;){var u=t[n];e[n]=a(u,r)?l[u]:void 0}return e}var o=r(/*! ./_copyArray */55),a=r(/*! ./_isIndex */61),s=Math.min;e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_setCacheAdd.js ***! \**********************************/ function(e,t){function r(e){return this.__data__.set(e,n),this}var n="__lodash_hash_undefined__";e.exports=r},/*!**********************************!*\ !*** ./~/lodash/_setCacheHas.js ***! \**********************************/ function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/_stackClear.js ***! \*********************************/ function(e,t,r){function n(){this.__data__=new o}var o=r(/*! ./_ListCache */48);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/_stackDelete.js ***! \**********************************/ function(e,t){function r(e){return this.__data__["delete"](e)}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_stackGet.js ***! \*******************************/ function(e,t){function r(e){return this.__data__.get(e)}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_stackHas.js ***! \*******************************/ function(e,t){function r(e){return this.__data__.has(e)}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/_stackSet.js ***! \*******************************/ function(e,t,r){function n(e,t){var r=this.__data__;if(r instanceof o){var n=r.__data__;if(!a||n.length<l-1)return n.push([e,t]),this;r=this.__data__=new s(n)}return r.set(e,t),this}var o=r(/*! ./_ListCache */48),a=r(/*! ./_Map */100),s=r(/*! ./_MapCache */101),l=200;e.exports=n},/*!************************************!*\ !*** ./~/lodash/_stringToArray.js ***! \************************************/ function(e,t,r){function n(e){return a(e)?s(e):o(e)}var o=r(/*! ./_asciiToArray */337),a=r(/*! ./_hasUnicode */230),s=r(/*! ./_unicodeToArray */435);e.exports=n},/*!*************************************!*\ !*** ./~/lodash/_unicodeToArray.js ***! \*************************************/ function(e,t){function r(e){return e.match(P)||[]}var n="\\ud800-\\udfff",o="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",s="\\ufe0e\\ufe0f",l="["+n+"]",u="["+o+a+"]",i="\\ud83c[\\udffb-\\udfff]",c="(?:"+u+"|"+i+")",p="[^"+n+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",y="\\u200d",m=c+"?",v="["+s+"]?",h="(?:"+y+"(?:"+[p,d,f].join("|")+")"+v+m+")*",g=v+m+h,b="(?:"+[p+u+"?",u,d,f,l].join("|")+")",P=RegExp(i+"(?="+i+")|"+b+g,"g");e.exports=r},/*!***********************************!*\ !*** ./~/lodash/_unicodeWords.js ***! \***********************************/ function(e,t){function r(e){return e.match(D)||[]}var n="\\ud800-\\udfff",o="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",s="\\u2700-\\u27bf",l="a-z\\xdf-\\xf6\\xf8-\\xff",u="\\xac\\xb1\\xd7\\xf7",i="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",c="\\u2000-\\u206f",p=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",d="A-Z\\xc0-\\xd6\\xd8-\\xde",f="\\ufe0e\\ufe0f",y=u+i+c+p,m="['’]",v="["+y+"]",h="["+o+a+"]",g="\\d+",b="["+s+"]",P="["+l+"]",T="[^"+n+y+g+s+l+d+"]",O="\\ud83c[\\udffb-\\udfff]",_="(?:"+h+"|"+O+")",E="[^"+n+"]",j="(?:\\ud83c[\\udde6-\\uddff]){2}",w="[\\ud800-\\udbff][\\udc00-\\udfff]",M="["+d+"]",S="\\u200d",x="(?:"+P+"|"+T+")",A="(?:"+M+"|"+T+")",N="(?:"+m+"(?:d|ll|m|re|s|t|ve))?",k="(?:"+m+"(?:D|LL|M|RE|S|T|VE))?",C=_+"?",I="["+f+"]?",K="(?:"+S+"(?:"+[E,j,w].join("|")+")"+I+C+")*",L=I+C+K,U="(?:"+[b,j,w].join("|")+")"+L,D=RegExp([M+"?"+P+"+"+N+"(?="+[v,M,"$"].join("|")+")",A+"+"+k+"(?="+[v,M+x,"$"].join("|")+")",M+"?"+x+"+"+N,M+"+"+k,g,U].join("|"),"g");e.exports=r},/*!****************************************!*\ !*** ./~/lodash/_updateWrapDetails.js ***! \****************************************/ function(e,t,r){function n(e,t){return o(m,function(r){var n="_."+r[0];t&r[1]&&!a(e,n)&&e.push(n)}),e.sort()}var o=r(/*! ./_arrayEach */30),a=r(/*! ./_arrayIncludes */51),s=1,l=2,u=8,i=16,c=32,p=64,d=128,f=256,y=512,m=[["ary",d],["bind",s],["bindKey",l],["curry",u],["curryRight",i],["flip",y],["partial",c],["partialRight",p],["rearg",f]];e.exports=n},/*!***********************************!*\ !*** ./~/lodash/_wrapperClone.js ***! \***********************************/ function(e,t,r){function n(e){if(e instanceof o)return e.clone();var t=new a(e.__wrapped__,e.__chain__);return t.__actions__=s(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var o=r(/*! ./_LazyWrapper */98),a=r(/*! ./_LodashWrapper */99),s=r(/*! ./_copyArray */55);e.exports=n},/*!*************************!*\ !*** ./~/lodash/ary.js ***! \*************************/ function(e,t,r){function n(e,t,r){return t=r?void 0:t,t=e&&null==t?e.length:t,o(e,a,void 0,void 0,void 0,void 0,t)}var o=r(/*! ./_createWrap */32),a=128;e.exports=n},/*!****************************!*\ !*** ./~/lodash/assign.js ***! \****************************/ function(e,t,r){var n=r(/*! ./_assignValue */104),o=r(/*! ./_copyObject */115),a=r(/*! ./_createAssigner */376),s=r(/*! ./isArrayLike */15),l=r(/*! ./_isPrototype */34),u=r(/*! ./keys */8),i=Object.prototype,c=i.hasOwnProperty,p=i.propertyIsEnumerable,d=!p.call({valueOf:1},"valueOf"),f=a(function(e,t){if(d||l(t)||s(t))return void o(t,u(t),e);for(var r in t)c.call(t,r)&&n(e,r,t[r])});e.exports=f},/*!***************************!*\ !*** ./~/lodash/clamp.js ***! \***************************/ function(e,t,r){function n(e,t,r){return void 0===r&&(r=t,t=void 0),void 0!==r&&(r=a(r),r=r===r?r:0),void 0!==t&&(t=a(t),t=t===t?t:0),o(a(e),t,r)}var o=r(/*! ./_baseClamp */211),a=r(/*! ./toNumber */68);e.exports=n},/*!***************************!*\ !*** ./~/lodash/clone.js ***! \***************************/ function(e,t,r){function n(e){return o(e,!1,!0)}var o=r(/*! ./_baseClone */212);e.exports=n},/*!******************************!*\ !*** ./~/lodash/constant.js ***! \******************************/ function(e,t){function r(e){return function(){return e}}e.exports=r},/*!****************************!*\ !*** ./~/lodash/deburr.js ***! \****************************/ function(e,t,r){function n(e){return e=a(e),e&&e.replace(s,o).replace(c,"")}var o=r(/*! ./_deburrLetter */388),a=r(/*! ./toString */25),s=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,l="\\u0300-\\u036f\\ufe20-\\ufe23",u="\\u20d0-\\u20f0",i="["+l+u+"]",c=RegExp(i,"g");e.exports=n},/*!********************************!*\ !*** ./~/lodash/difference.js ***! \********************************/ function(e,t,r){var n=r(/*! ./_baseDifference */105),o=r(/*! ./_baseFlatten */27),a=r(/*! ./_baseRest */12),s=r(/*! ./isArrayLikeObject */38),l=a(function(e,t){return s(e)?n(e,o(t,1,s,!0)):[]});e.exports=l},/*!*******************************!*\ !*** ./~/lodash/dropRight.js ***! \*******************************/ function(e,t,r){function n(e,t,r){var n=e?e.length:0;return n?(t=r||void 0===t?1:a(t),t=n-t,o(e,0,t<0?0:t)):[]}var o=r(/*! ./_baseSlice */110),a=r(/*! ./toInteger */17);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/escapeRegExp.js ***! \**********************************/ function(e,t,r){function n(e){return e=o(e),e&&s.test(e)?e.replace(a,"\\$&"):e}var o=r(/*! ./toString */25),a=/[\\^$.*+?()[\]{}|]/g,s=RegExp(a.source);e.exports=n},/*!**************************!*\ !*** ./~/lodash/flow.js ***! \**************************/ function(e,t,r){var n=r(/*! ./_createFlow */384),o=n();e.exports=o},/*!*****************************!*\ !*** ./~/lodash/forEach.js ***! \*****************************/ function(e,t,r){function n(e,t){var r=l(e)?o:a;return r(e,s(t,3))}var o=r(/*! ./_arrayEach */30),a=r(/*! ./_baseEach */26),s=r(/*! ./_baseIteratee */14),l=r(/*! ./isArray */4);e.exports=n},/*!*************************************!*\ !*** ./~/lodash/fp/_baseConvert.js ***! \*************************************/ function(e,t,r){function n(e,t){return 2==t?function(t,r){return e.apply(void 0,arguments)}:function(t){return e.apply(void 0,arguments)}}function o(e,t){return 2==t?function(t,r){return e(t,r)}:function(t){return e(t)}}function a(e){for(var t=e?e.length:0,r=Array(t);t--;)r[t]=e[t];return r}function s(e){return function(t){return e({},t)}}function l(e,t){return function(){var r=arguments.length;if(r){for(var n=Array(r);r--;)n[r]=arguments[r];var o=n[0]=t.apply(void 0,n);return e.apply(void 0,n),o}}}function u(e,t,r,d){function f(e,t){if(M.cap){var r=i.iterateeRearg[e];if(r)return T(t,r);var n=!j&&i.iterateeAry[e];if(n)return P(t,n)}return t}function y(e,t,r){return S||M.curry&&r>1?U(t,r):t}function m(e,t,r){if(M.fixed&&(x||!i.skipFixed[e])){var n=i.methodSpread[e],o=n&&n.start;return void 0===o?I(t,r):V(t,o)}return t}function v(e,t,r){return M.rearg&&r>1&&(A||!i.skipRearg[e])?F(t,i.methodRearg[e]||i.aryRearg[r]):t}function h(e,t){t=Y(t);for(var r=-1,n=t.length,o=n-1,a=L(Object(e)),s=a;null!=s&&++r<n;){var l=t[r],u=s[l];null!=u&&(s[t[r]]=L(r==o?u:Object(u))),s=s[l]}return a}function g(e){return G.runInContext.convert(e)(void 0)}function b(e,t){var r=d;return function(n){var o=j?k:C,a=j?k[e]:t,s=K(K({},r),n);return u(o,e,a,s)}}function P(e,t){return O(e,function(e){return"function"==typeof e?o(e,t):e})}function T(e,t){return O(e,function(e){var r=t.length;return n(F(o(e,r),t),r)})}function O(e,t){return function(){var r=arguments.length;if(!r)return e();for(var n=Array(r);r--;)n[r]=arguments[r];var o=M.rearg?0:r-1;return n[o]=t(n[o]),e.apply(void 0,n)}}function _(e,t){e=i.aliasToReal[e]||e;var r,n=t,o=H[e];return o?n=o(t):M.immutable&&(c.array[e]?n=l(t,a):c.object[e]?n=l(t,s(t)):c.set[e]&&(n=l(t,h))),D(q,function(t){return D(i.aryMethod[t],function(o){if(e==o){var a=i.methodSpread[e],s=a&&a.afterRearg;return r=s?m(e,v(e,n,t),t):v(e,m(e,n,t),t),r=f(e,r),r=y(e,r,t),!1}}),!r}),r||(r=n),r==t&&(r=S?U(r,1):function(){return t.apply(this,arguments)}),r.convert=b(e,t),i.placeholder[e]&&(E=!0,r.placeholder=t.placeholder=N),r}var E,j="function"==typeof t,w=t===Object(t);if(w&&(d=r,r=t,t=void 0),null==r)throw new TypeError;d||(d={});var M={cap:!("cap"in d)||d.cap,curry:!("curry"in d)||d.curry,fixed:!("fixed"in d)||d.fixed,immutable:!("immutable"in d)||d.immutable,rearg:!("rearg"in d)||d.rearg},S="curry"in d&&d.curry,x="fixed"in d&&d.fixed,A="rearg"in d&&d.rearg,N=j?r:p,k=j?r.runInContext():void 0,C=j?r:{ary:e.ary,assign:e.assign,clone:e.clone,curry:e.curry,forEach:e.forEach,isArray:e.isArray,isFunction:e.isFunction,iteratee:e.iteratee,keys:e.keys,rearg:e.rearg,spread:e.spread,toInteger:e.toInteger,toPath:e.toPath},I=C.ary,K=C.assign,L=C.clone,U=C.curry,D=C.forEach,R=C.isArray,z=C.isFunction,W=C.keys,F=C.rearg,V=C.spread,B=C.toInteger,Y=C.toPath,q=W(i.aryMethod),H={castArray:function(e){return function(){var t=arguments[0];return R(t)?e(a(t)):e.apply(void 0,arguments)}},iteratee:function(e){return function(){var t=arguments[0],r=arguments[1],n=e(t,r),a=n.length;return M.cap&&"number"==typeof r?(r=r>2?r-2:1,a&&a<=r?n:o(n,r)):n}},mixin:function(e){return function(t){var r=this;if(!z(r))return e(r,Object(t));var n=[];return D(W(t),function(e){z(t[e])&&n.push([e,r.prototype[e]])}),e(r,Object(t)),D(n,function(e){var t=e[1];z(t)?r.prototype[e[0]]=t:delete r.prototype[e[0]]}),r}},nthArg:function(e){return function(t){var r=t<0?1:B(t)+1;return U(e(t),r)}},rearg:function(e){return function(t,r){var n=r?r.length:0;return U(e(t,r),n)}},runInContext:function(t){return function(r){return u(e,t(r),d)}}};if(!w)return _(t,r);var G=r,Z=[];return D(q,function(e){D(i.aryMethod[e],function(e){var t=G[i.remap[e]||e];t&&Z.push([e,_(e,t)])})}),D(W(G),function(e){var t=G[e];if("function"==typeof t){for(var r=Z.length;r--;)if(Z[r][0]==e)return;t.convert=b(e,t),Z.push([e,t])}}),D(Z,function(e){G[e[0]]=e[1]}),G.convert=g,E&&(G.placeholder=N),D(W(G),function(e){D(i.realToAlias[e]||[],function(t){G[t]=G[e]})}),G}var i=r(/*! ./_mapping */451),c=i.mutate,p=r(/*! ./placeholder */5);e.exports=u},/*!*********************************!*\ !*** ./~/lodash/fp/_mapping.js ***! \*********************************/ function(e,t){t.aliasToReal={each:"forEach",eachRight:"forEachRight",entries:"toPairs",entriesIn:"toPairsIn",extend:"assignIn",extendAll:"assignInAll",extendAllWith:"assignInAllWith",extendWith:"assignInWith",first:"head",conforms:"conformsTo",matches:"isMatch",property:"get",__:"placeholder",F:"stubFalse",T:"stubTrue",all:"every",allPass:"overEvery",always:"constant",any:"some",anyPass:"overSome",apply:"spread",assoc:"set",assocPath:"set",complement:"negate",compose:"flowRight",contains:"includes",dissoc:"unset",dissocPath:"unset",dropLast:"dropRight",dropLastWhile:"dropRightWhile",equals:"isEqual",identical:"eq",indexBy:"keyBy",init:"initial",invertObj:"invert",juxt:"over",omitAll:"omit",nAry:"ary",path:"get",pathEq:"matchesProperty",pathOr:"getOr",paths:"at",pickAll:"pick",pipe:"flow",pluck:"map",prop:"get",propEq:"matchesProperty",propOr:"getOr",props:"at",symmetricDifference:"xor",symmetricDifferenceBy:"xorBy",symmetricDifferenceWith:"xorWith",takeLast:"takeRight",takeLastWhile:"takeRightWhile",unapply:"rest",unnest:"flatten",useWith:"overArgs",where:"conformsTo",whereEq:"isMatch",zipObj:"zipObject"},t.aryMethod={1:["assignAll","assignInAll","attempt","castArray","ceil","create","curry","curryRight","defaultsAll","defaultsDeepAll","floor","flow","flowRight","fromPairs","invert","iteratee","memoize","method","mergeAll","methodOf","mixin","nthArg","over","overEvery","overSome","rest","reverse","round","runInContext","spread","template","trim","trimEnd","trimStart","uniqueId","words","zipAll"],2:["add","after","ary","assign","assignAllWith","assignIn","assignInAllWith","at","before","bind","bindAll","bindKey","chunk","cloneDeepWith","cloneWith","concat","conformsTo","countBy","curryN","curryRightN","debounce","defaults","defaultsDeep","defaultTo","delay","difference","divide","drop","dropRight","dropRightWhile","dropWhile","endsWith","eq","every","filter","find","findIndex","findKey","findLast","findLastIndex","findLastKey","flatMap","flatMapDeep","flattenDepth","forEach","forEachRight","forIn","forInRight","forOwn","forOwnRight","get","groupBy","gt","gte","has","hasIn","includes","indexOf","intersection","invertBy","invoke","invokeMap","isEqual","isMatch","join","keyBy","lastIndexOf","lt","lte","map","mapKeys","mapValues","matchesProperty","maxBy","meanBy","merge","mergeAllWith","minBy","multiply","nth","omit","omitBy","overArgs","pad","padEnd","padStart","parseInt","partial","partialRight","partition","pick","pickBy","propertyOf","pull","pullAll","pullAt","random","range","rangeRight","rearg","reject","remove","repeat","restFrom","result","sampleSize","some","sortBy","sortedIndex","sortedIndexOf","sortedLastIndex","sortedLastIndexOf","sortedUniqBy","split","spreadFrom","startsWith","subtract","sumBy","take","takeRight","takeRightWhile","takeWhile","tap","throttle","thru","times","trimChars","trimCharsEnd","trimCharsStart","truncate","union","uniqBy","uniqWith","unset","unzipWith","without","wrap","xor","zip","zipObject","zipObjectDeep"],3:["assignInWith","assignWith","clamp","differenceBy","differenceWith","findFrom","findIndexFrom","findLastFrom","findLastIndexFrom","getOr","includesFrom","indexOfFrom","inRange","intersectionBy","intersectionWith","invokeArgs","invokeArgsMap","isEqualWith","isMatchWith","flatMapDepth","lastIndexOfFrom","mergeWith","orderBy","padChars","padCharsEnd","padCharsStart","pullAllBy","pullAllWith","reduce","reduceRight","replace","set","slice","sortedIndexBy","sortedLastIndexBy","transform","unionBy","unionWith","update","xorBy","xorWith","zipWith"],4:["fill","setWith","updateWith"]},t.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},t.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},t.iterateeRearg={mapKeys:[1]},t.methodRearg={assignInAllWith:[1,2,0],assignInWith:[1,2,0],assignAllWith:[1,2,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,2,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},t.methodSpread={assignAll:{start:0},assignAllWith:{afterRearg:!0,start:1},assignInAll:{start:0},assignInAllWith:{afterRearg:!0,start:1},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{afterRearg:!0,start:1},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},t.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},t.placeholder={bind:!0,bindKey:!0,curry:!0,curryRight:!0,partial:!0,partialRight:!0},t.realToAlias=function(){var e=Object.prototype.hasOwnProperty,r=t.aliasToReal,n={};for(var o in r){var a=r[o];e.call(n,a)?n[a].push(o):n[a]=[o]}return n}(),t.remap={assignAll:"assign",assignAllWith:"assignWith",assignInAll:"assignIn",assignInAllWith:"assignInWith",curryN:"curry",curryRightN:"curryRight",defaultsAll:"defaults",defaultsDeepAll:"defaultsDeep",findFrom:"find",findIndexFrom:"findIndex",findLastFrom:"findLast",findLastIndexFrom:"findLastIndex",getOr:"get",includesFrom:"includes",indexOfFrom:"indexOf",invokeArgs:"invoke",invokeArgsMap:"invokeMap",lastIndexOfFrom:"lastIndexOf",mergeAll:"merge",mergeAllWith:"mergeWith",padChars:"pad",padCharsEnd:"padEnd",padCharsStart:"padStart",propertyOf:"get",restFrom:"rest",spreadFrom:"spread",trimChars:"trim",trimCharsEnd:"trimEnd",trimCharsStart:"trimStart",zipAll:"zip"},t.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},t.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},/*!******************************!*\ !*** ./~/lodash/fp/_util.js ***! \******************************/ function(e,t,r){e.exports={ary:r(/*! ../ary */439),assign:r(/*! ../_baseAssign */210),clone:r(/*! ../clone */442),curry:r(/*! ../curry */242),forEach:r(/*! ../_arrayEach */30),isArray:r(/*! ../isArray */4),isFunction:r(/*! ../isFunction */24),iteratee:r(/*! ../iteratee */473),keys:r(/*! ../_baseKeys */216),rearg:r(/*! ../rearg */482),spread:r(/*! ../spread */484),toInteger:r(/*! ../toInteger */17),toPath:r(/*! ../toPath */488)}},/*!********************************!*\ !*** ./~/lodash/fp/compact.js ***! \********************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("compact",r(/*! ../compact */241),r(/*! ./_falseOptions */22));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!******************************!*\ !*** ./~/lodash/fp/curry.js ***! \******************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("curry",r(/*! ../curry */242));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!***************************!*\ !*** ./~/lodash/fp/eq.js ***! \***************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("eq",r(/*! ../eq */36));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!****************************!*\ !*** ./~/lodash/fp/get.js ***! \****************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("get",r(/*! ../get */37));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!****************************!*\ !*** ./~/lodash/fp/has.js ***! \****************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("has",r(/*! ../has */23));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!*********************************!*\ !*** ./~/lodash/fp/includes.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("includes",r(/*! ../includes */65));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!***********************************!*\ !*** ./~/lodash/fp/isFunction.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("isFunction",r(/*! ../isFunction */24),r(/*! ./_falseOptions */22));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!******************************!*\ !*** ./~/lodash/fp/isNil.js ***! \******************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("isNil",r(/*! ../isNil */471),r(/*! ./_falseOptions */22));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!*********************************!*\ !*** ./~/lodash/fp/isObject.js ***! \*********************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("isObject",r(/*! ../isObject */13),r(/*! ./_falseOptions */22));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!**************************************!*\ !*** ./~/lodash/fp/isPlainObject.js ***! \**************************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("isPlainObject",r(/*! ../isPlainObject */126),r(/*! ./_falseOptions */22));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!*****************************!*\ !*** ./~/lodash/fp/keys.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("keys",r(/*! ../keys */8),r(/*! ./_falseOptions */22));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!****************************!*\ !*** ./~/lodash/fp/map.js ***! \****************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("map",r(/*! ../map */9));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!*****************************!*\ !*** ./~/lodash/fp/pick.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("pick",r(/*! ../pick */41));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!***********************************!*\ !*** ./~/lodash/fp/startsWith.js ***! \***********************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("startsWith",r(/*! ../startsWith */486));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!*******************************!*\ !*** ./~/lodash/fp/values.js ***! \*******************************/ function(e,t,r){var n=r(/*! ./convert */7),o=n("values",r(/*! ../values */127),r(/*! ./_falseOptions */22));o.placeholder=r(/*! ./placeholder */5),e.exports=o},/*!***************************!*\ !*** ./~/lodash/hasIn.js ***! \***************************/ function(e,t,r){function n(e,t){return null!=e&&a(e,t,o)}var o=r(/*! ./_baseHasIn */344),a=r(/*! ./_hasPath */229);e.exports=n},/*!*****************************!*\ !*** ./~/lodash/inRange.js ***! \*****************************/ function(e,t,r){function n(e,t,r){return t=a(t),void 0===r?(r=t,t=0):r=a(r),e=s(e),o(e,t,r)}var o=r(/*! ./_baseInRange */345),a=r(/*! ./toFinite */256),s=r(/*! ./toNumber */68);e.exports=n},/*!**********************************!*\ !*** ./~/lodash/intersection.js ***! \**********************************/ function(e,t,r){var n=r(/*! ./_arrayMap */18),o=r(/*! ./_baseIntersection */346),a=r(/*! ./_baseRest */12),s=r(/*! ./_castArrayLikeObject */365),l=a(function(e){var t=n(e,s);return t.length&&t[0]===e[0]?o(t):[]});e.exports=l},/*!***************************!*\ !*** ./~/lodash/isNil.js ***! \***************************/ function(e,t){function r(e){return null==e}e.exports=r},/*!*********************************!*\ !*** ./~/lodash/isUndefined.js ***! \*********************************/ function(e,t){function r(e){return void 0===e}e.exports=r},/*!******************************!*\ !*** ./~/lodash/iteratee.js ***! \******************************/ function(e,t,r){function n(e){return a("function"==typeof e?e:o(e,!0))}var o=r(/*! ./_baseClone */212),a=r(/*! ./_baseIteratee */14);e.exports=n},/*!****************************!*\ !*** ./~/lodash/keysIn.js ***! \****************************/ function(e,t,r){function n(e){return s(e)?o(e,!0):a(e)}var o=r(/*! ./_arrayLikeKeys */208),a=r(/*! ./_baseKeysIn */353),s=r(/*! ./isArrayLike */15);e.exports=n},/*!**************************!*\ !*** ./~/lodash/last.js ***! \**************************/ function(e,t){function r(e){var t=e?e.length:0;return t?e[t-1]:void 0}e.exports=r},/*!*******************************!*\ !*** ./~/lodash/mapValues.js ***! \*******************************/ function(e,t,r){function n(e,t){var r={};return t=a(t,3),o(e,function(e,n,o){r[n]=t(e,n,o)}),r}var o=r(/*! ./_baseForOwn */106),a=r(/*! ./_baseIteratee */14);e.exports=n},/*!*****************************!*\ !*** ./~/lodash/memoize.js ***! \*****************************/ function(e,t,r){function n(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(a);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var s=e.apply(this,n);return r.cache=a.set(o,s),s};return r.cache=new(n.Cache||o),r}var o=r(/*! ./_MapCache */101),a="Expected a function";n.Cache=o,e.exports=n},/*!*************************!*\ !*** ./~/lodash/now.js ***! \*************************/ function(e,t,r){var n=r(/*! ./_root */11),o=function(){return n.Date.now()};e.exports=o},/*!*****************************!*\ !*** ./~/lodash/partial.js ***! \*****************************/ function(e,t,r){var n=r(/*! ./_baseRest */12),o=r(/*! ./_createWrap */32),a=r(/*! ./_getHolder */57),s=r(/*! ./_replaceHolders */35),l=32,u=n(function(e,t){var r=s(t,a(u));return o(e,l,void 0,t,r)});u.placeholder={},e.exports=u},/*!**********************************!*\ !*** ./~/lodash/partialRight.js ***! \**********************************/ function(e,t,r){var n=r(/*! ./_baseRest */12),o=r(/*! ./_createWrap */32),a=r(/*! ./_getHolder */57),s=r(/*! ./_replaceHolders */35),l=64,u=n(function(e,t){var r=s(t,a(u));return o(e,l,void 0,t,r)});u.placeholder={},e.exports=u},/*!******************************!*\ !*** ./~/lodash/property.js ***! \******************************/ function(e,t,r){function n(e){return s(e)?o(l(e)):a(e)}var o=r(/*! ./_baseProperty */358),a=r(/*! ./_basePropertyDeep */359),s=r(/*! ./_isKey */33),l=r(/*! ./_toKey */19);e.exports=n},/*!***************************!*\ !*** ./~/lodash/rearg.js ***! \***************************/ function(e,t,r){var n=r(/*! ./_baseFlatten */27),o=r(/*! ./_baseRest */12),a=r(/*! ./_createWrap */32),s=256,l=o(function(e,t){return a(e,s,void 0,void 0,void 0,n(t,1))});e.exports=l},/*!***************************!*\ !*** ./~/lodash/round.js ***! \***************************/ function(e,t,r){var n=r(/*! ./_createRound */386),o=n("round");e.exports=o},/*!****************************!*\ !*** ./~/lodash/spread.js ***! \****************************/ function(e,t,r){function n(e,t){if("function"!=typeof e)throw new TypeError(i);return t=void 0===t?0:c(u(t),0),s(function(r){var n=r[t],s=l(r,0,t);return n&&a(s,n),o(e,this,s)})}var o=r(/*! ./_apply */29),a=r(/*! ./_arrayPush */52),s=r(/*! ./_baseRest */12),l=r(/*! ./_castSlice */221),u=r(/*! ./toInteger */17),i="Expected a function",c=Math.max;e.exports=n},/*!*******************************!*\ !*** ./~/lodash/startCase.js ***! \*******************************/ function(e,t,r){var n=r(/*! ./_createCompounder */381),o=r(/*! ./upperFirst */489),a=n(function(e,t,r){return e+(r?" ":"")+o(t)});e.exports=a},/*!********************************!*\ !*** ./~/lodash/startsWith.js ***! \********************************/ function(e,t,r){function n(e,t,r){return e=l(e),r=o(s(r),0,e.length),t=a(t),e.slice(r,r+t.length)==t}var o=r(/*! ./_baseClamp */211),a=r(/*! ./_baseToString */220),s=r(/*! ./toInteger */17),l=r(/*! ./toString */25);e.exports=n},/*!*******************************!*\ !*** ./~/lodash/stubFalse.js ***! \*******************************/ function(e,t){function r(){return!1}e.exports=r},/*!****************************!*\ !*** ./~/lodash/toPath.js ***! \****************************/ function(e,t,r){function n(e){return s(e)?o(e,i):l(e)?[e]:a(u(e))}var o=r(/*! ./_arrayMap */18),a=r(/*! ./_copyArray */55),s=r(/*! ./isArray */4),l=r(/*! ./isSymbol */39),u=r(/*! ./_stringToPath */239),i=r(/*! ./_toKey */19);e.exports=n},/*!********************************!*\ !*** ./~/lodash/upperFirst.js ***! \********************************/ function(e,t,r){var n=r(/*! ./_createCaseFirst */380),o=n("toUpperCase");e.exports=o},/*!***************************!*\ !*** ./~/lodash/words.js ***! \***************************/ function(e,t,r){function n(e,t,r){return e=s(e),t=r?void 0:t,void 0===t?a(e)?l(e):o(e):e.match(t)||[]}var o=r(/*! ./_asciiWords */338),a=r(/*! ./_hasUnicodeWord */398),s=r(/*! ./toString */25),l=r(/*! ./_unicodeWords */436);e.exports=n},/*!***********************************!*\ !*** ./~/lodash/wrapperLodash.js ***! \***********************************/ function(e,t,r){function n(e){if(u(e)&&!l(e)&&!(e instanceof o)){if(e instanceof a)return e;if(p.call(e,"__wrapped__"))return i(e)}return new a(e)}var o=r(/*! ./_LazyWrapper */98),a=r(/*! ./_LodashWrapper */99),s=r(/*! ./_baseLodash */109),l=r(/*! ./isArray */4),u=r(/*! ./isObjectLike */20),i=r(/*! ./_wrapperClone */438),c=Object.prototype,p=c.hasOwnProperty;n.prototype=s.prototype,n.prototype.constructor=n,e.exports=n},/*!***********************!*\ !*** ./~/ms/index.js ***! \***********************/ function(e,t){function r(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*c;case"days":case"day":case"d":return r*i;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*l;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function n(e){return e>=i?Math.round(e/i)+"d":e>=u?Math.round(e/u)+"h":e>=l?Math.round(e/l)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function o(e){return a(e,i,"day")||a(e,u,"hour")||a(e,l,"minute")||a(e,s,"second")||e+" ms"}function a(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var s=1e3,l=60*s,u=60*l,i=24*u,c=365.25*i;e.exports=function(e,t){return t=t||{},"string"==typeof e?r(e):t["long"]?o(e):n(e)}},/*!***************************!*\ !*** external "ReactDOM" ***! \***************************/ function(e,r){e.exports=t}])});
src/svg-icons/communication/call-made.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationCallMade = (props) => ( <SvgIcon {...props}> <path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"/> </SvgIcon> ); CommunicationCallMade = pure(CommunicationCallMade); CommunicationCallMade.displayName = 'CommunicationCallMade'; CommunicationCallMade.muiName = 'SvgIcon'; export default CommunicationCallMade;
imports/plugins/core/ui/client/components/slider/slider.js
spestushko/reaction
/** * Implementing No UI Slider * https://www.npmjs.com/package/react-nouislider */ import React, { Component } from "react"; import PropTypes from "prop-types"; import Nouislider from "react-nouislider"; class Slider extends Component { render() { return ( <Nouislider range={this.props.range} start={this.props.start} tooltips={this.props.tooltips} connect={this.props.connect} step={this.props.step} orientation={this.props.orientation} margin={this.props.margin} padding={this.props.padding} onChange={this.props.onChange} onSlide={this.props.onSlide} /> ); } } Slider.propTypes = { connect: PropTypes.oneOfType([PropTypes.array, PropTypes.bool]), margin: PropTypes.number, onChange: PropTypes.func, onSlide: PropTypes.func, orientation: PropTypes.string, padding: PropTypes.number, range: PropTypes.object, start: PropTypes.arrayOf(PropTypes.number), step: PropTypes.number, tooltips: PropTypes.oneOfType([PropTypes.array, PropTypes.bool]) }; Slider.defaultProps = { range: { min: 0, max: 100 }, start: [0, 100], step: 5, orientation: "horizontal", tooltips: true, margin: 0, padding: 0 }; export default Slider;
js/components/singleMap/index.js
kondoSoft/que_hacer_movil
import React, { Component } from 'react'; import MapView from 'react-native-maps'; import { connect } from 'react-redux'; import { actions } from 'react-native-navigation-redux-helpers'; import { Image, TouchableOpacity, Dimensions, Linking, Platform } from 'react-native' import { Container, Header, Content, Fab, Text,Thumbnail, Button, Icon, Item, Input, Left, Right, Body, H3, View } from 'native-base'; import { openDrawer } from '../../actions/drawer'; import styles from './styles'; import { Grid, Row, Col } from 'react-native-easy-grid'; import markerMerida from '../../../assets/img/marker-merida.png'; import ActionButton from 'react-native-action-button'; import { setLoading } from '../../actions/listZone' import Spinner from 'react-native-loading-spinner-overlay'; const { reset, popRoute, } = actions; const { width, height } = Dimensions.get('window'); const ASPECT_RATIO = width / height; const LATITUDE = 20.986035; const LONGITUDE = -89.619899; const LATITUDE_DELTA = 0.0053; const LONGITUDE_DELTA = LATITUDE_DELTA * ASPECT_RATIO; class SingleMap extends Component { constructor(props) { super(props); this.state = { region: { latitude: '', longitude: '', latitudeDelta: LATITUDE_DELTA, longitudeDelta: LONGITUDE_DELTA, }, active: false, establishment:{ }, } this.handleMaps = this.handleMaps.bind(this) } static propTypes = { name: React.PropTypes.string, index: React.PropTypes.number, listEstablishment: React.PropTypes.arrayOf(React.PropTypes.object), openDrawer: React.PropTypes.func, popRoute: React.PropTypes.func, reset: React.PropTypes.func, navigation: React.PropTypes.shape({ key: React.PropTypes.string, }), } componentWillMount(){ this.getEstablishment() } componentDidMount(){ setTimeout(()=>{ this.props.setLoading() }, 3000) } getEstablishment(){ this.props.listEstablishment.map((item, i)=>{ if (item.id == this.props.index) { this.setState({ establishment: item, region:{ latitude: item.coor.latitude, longitude: item.coor.longitude }, }) } }) } popRoute() { this.props.popRoute(this.props.navigation.key); } handleMaps(id){ var lat = this.state.establishment.coor.latitude var long = this.state.establishment.coor.longitude if(Platform.OS === 'ios'){ var url = 'http://maps.apple.com/maps?daddr=' + lat + ',' + long }else{ var url = 'http://maps.google.com/maps?daddr=' + lat + ',' + long } Linking.openURL(url); } goToURL(url){ Linking.canOpenURL(url).then(supported => { if(supported){ Linking.openURL(url) }else{ alert('Hay un error, por favor contactanos...') } }); } render() { const id = this.props.index const activeFab = this.state.active const { props: { name, index, listEstablishment } } = this; return ( <Container > <Header searchBar style={{ backgroundColor: '#ffa726' }}> <Left> <Button transparent onPress={() => this.popRoute()}> <Icon style={{ color: 'dimgray' }} name="arrow-round-back" /> </Button> </Left> <Right style={styles.headerRight}> </Right> </Header> <Grid style={{ flex: 1, shadowColor: 'dimgray', shadowOffset: {width: 0, height: 7}, shadowOpacity: 1, shadowRadius: 1,}}> <View style={styles.container}> <MapView provider={this.props.provider} style={styles.map} initialRegion={this.state.establishment.coor} > <MapView.Marker title={this.state.establishment.name} key={this.state.establishment.id} coordinate={this.state.establishment.coor} image={markerMerida} onPress={() => this.handleMaps(id)} /> </MapView> </View> </Grid> {/* <Content scrollEnabled={false}> */} <Grid style={styles.gridDescription}> <View style={{ flex: 1}}> <Spinner visible={this.props.loading} textStyle={{color: '#FFF'}} /> </View> <Row style={styles.rowDescription}> <H3>{this.state.establishment.name}</H3> </Row> <Row style={styles.rowMain}> <Icon style={styles.iconGray} name="md-pin" /> <Text style={styles.textRow}>{this.state.establishment.address}</Text> </Row> <Row style={styles.rowDescription}> <Col style={styles.colDescription}> <Icon style={styles.iconGray} name="md-call" /> <Text style={styles.textRow}>{this.state.establishment.phone}</Text> </Col> </Row> <Row> <Right> { activeFab ? ( <Text style={styles.fontFooter}>Estoy en: "{this.state.establishment.name}" a traves de Que Hacer? Merida</Text> ):( <Text></Text> )} </Right> </Row> </Grid> {/* </Content> */} {this.state.establishment.web ? ( <ActionButton active={this.state.active} onPress={() => this.setState({ active: !this.state.active })} buttonColor='#5067FF' icon={<Icon name="md-share" style={{ color: 'white'}}/>} > <ActionButton.Item buttonColor='#3B5998' // title='facebook' onPress={()=> this.goToURL(`https://www.facebook.com/sharer/sharer.php?u=${this.state.establishment.web}`)} > <Icon name="logo-facebook" style={styles.buttonF}/> </ActionButton.Item> <ActionButton.Item buttonColor='#3B5998' // title='facebook' onPress={()=> this.goToURL(`https://twitter.com/intent/tweet?text=Estoy en ${this.state.establishment.name} ${this.state.establishment.web} a traves de QueHacerMerida`)} > <Icon name="logo-twitter" style={styles.buttonF}/> </ActionButton.Item> </ActionButton> ):( console.log("no hay web") )} </Container> ); } } SingleMap.propTypes = { provider: MapView.ProviderPropType, }; function bindAction(dispatch) { return { openDrawer: () => dispatch(openDrawer()), popRoute: key => dispatch(popRoute(key)), reset: key => dispatch(reset([{ key: 'home' }], key, 0)), setLoading: () => dispatch(setLoading()) }; } const mapStateToProps = state => ({ navigation: state.cardNavigation, name: state.user.name, index: state.listEstablishment.selectedEstablishment, listEstablishment: state.listEstablishment.results, loading: state.listZone.loading, }); export default connect(mapStateToProps, bindAction)(SingleMap);
web-app/ext/src/view/Table.js
department-of-veterans-affairs/ChartReview
/** * This class encapsulates the user interface for a tabular data set. * It acts as a centralized manager for controlling the various interface * elements of the view. This includes handling events, such as row and cell * level based DOM events. It also reacts to events from the underlying {@link Ext.selection.Model} * to provide visual feedback to the user. * * This class does not provide ways to manipulate the underlying data of the configured * {@link Ext.data.Store}. * * This is the base class for both {@link Ext.grid.View} and {@link Ext.tree.View} and is not * to be used directly. */ Ext.define('Ext.view.Table', { extend: 'Ext.view.View', xtype: [ 'tableview', 'gridview' ], alternateClassName: 'Ext.grid.View', requires: [ 'Ext.grid.CellContext', 'Ext.view.TableLayout', 'Ext.grid.locking.RowSynchronizer', 'Ext.view.NodeCache', 'Ext.util.DelayedTask', 'Ext.util.MixedCollection' ], /* * @property {Boolean} * `true` in this class to identify an object as an instantiated Ext.view.TableView, or subclass thereof. */ isTableView: true, config: { selectionModel: { type: 'rowmodel' } }, inheritableStatics: { // Events a TableView may fire. // Used by Ext.grid.locking.View to relay view events to user code events: [ "blur", "focus", "move", "resize", "destroy", "beforedestroy", "boxready", "afterrender", "render", "beforerender", "removed", "hide", "beforehide", "show", "beforeshow", "enable", "disable", "added", "deactivate", "beforedeactivate", "activate", "beforeactivate", "cellkeydown", "beforecellkeydown", "cellmouseup", "beforecellmouseup", "cellmousedown", "beforecellmousedown", "cellcontextmenu", "beforecellcontextmenu", "celldblclick", "beforecelldblclick", "cellclick", "beforecellclick", "refresh", "itemremove", "itemadd", "itemupdate", "viewready", "beforerefresh", "unhighlightitem", "highlightitem", "focuschange", "deselect", "select", "beforedeselect", "beforeselect", "selectionchange", "containerkeydown", "containercontextmenu", "containerdblclick", "containerclick", "containermouseout", "containermouseover", "containermouseup", "containermousedown", "beforecontainerkeydown", "beforecontainercontextmenu", "beforecontainerdblclick", "beforecontainerclick", "beforecontainermouseout", "beforecontainermouseover", "beforecontainermouseup", "beforecontainermousedown", "itemkeydown", "itemcontextmenu", "itemdblclick", "itemclick", "itemmouseleave", "itemmouseenter", "itemmouseup", "itemmousedown", "rowclick", "rowcontextmenu", "rowdblclick", "rowkeydown", "rowmouseup", "rowmousedown", "rowkeydown", "beforeitemkeydown", "beforeitemcontextmenu", "beforeitemdblclick", "beforeitemclick", "beforeitemmouseleave", "beforeitemmouseenter", "beforeitemmouseup", "beforeitemmousedown", "statesave", "beforestatesave", "staterestore", "beforestaterestore", "uievent", "groupcollapse", "groupexpand" ] }, scrollable: true, componentLayout: 'tableview', baseCls: Ext.baseCSSPrefix + 'grid-view', unselectableCls: Ext.baseCSSPrefix + 'unselectable', /** * @cfg {String} [firstCls='x-grid-cell-first'] * A CSS class to add to the *first* cell in every row to enable special styling for the first column. * If no styling is needed on the first column, this may be configured as `null`. */ firstCls: Ext.baseCSSPrefix + 'grid-cell-first', /** * @cfg {String} [lastCls='x-grid-cell-last'] * A CSS class to add to the *last* cell in every row to enable special styling for the last column. * If no styling is needed on the last column, this may be configured as `null`. */ lastCls: Ext.baseCSSPrefix + 'grid-cell-last', itemCls: Ext.baseCSSPrefix + 'grid-item', selectedItemCls: Ext.baseCSSPrefix + 'grid-item-selected', selectedCellCls: Ext.baseCSSPrefix + 'grid-cell-selected', focusedItemCls: Ext.baseCSSPrefix + 'grid-item-focused', overItemCls: Ext.baseCSSPrefix + 'grid-item-over', altRowCls: Ext.baseCSSPrefix + 'grid-item-alt', dirtyCls: Ext.baseCSSPrefix + 'grid-dirty-cell', rowClsRe: new RegExp('(?:^|\\s*)' + Ext.baseCSSPrefix + 'grid-item-alt(?:\\s+|$)', 'g'), cellRe: new RegExp(Ext.baseCSSPrefix + 'grid-cell-([^\\s]+)(?:\\s|$)', ''), positionBody: true, positionCells: false, stripeOnUpdate: null, // cfg docs inherited trackOver: true, /** * Override this function to apply custom CSS classes to rows during rendering. This function should return the * CSS class name (or empty string '' for none) that will be added to the row's wrapping div. To apply multiple * class names, simply return them space-delimited within the string (e.g. 'my-class another-class'). * Example usage: * * viewConfig: { * getRowClass: function(record, rowIndex, rowParams, store){ * return record.get("valid") ? "row-valid" : "row-error"; * } * } * * @param {Ext.data.Model} record The record corresponding to the current row. * @param {Number} index The row index. * @param {Object} rowParams **DEPRECATED.** For row body use the * {@link Ext.grid.feature.RowBody#getAdditionalData getAdditionalData} method of the rowbody feature. * @param {Ext.data.Store} store The store this grid is bound to * @return {String} a CSS class name to add to the row. * @method */ getRowClass: null, /** * @cfg {Boolean} stripeRows * True to stripe the rows. * * This causes the CSS class **`x-grid-row-alt`** to be added to alternate rows of * the grid. A default CSS rule is provided which sets a background color, but you can override this * with a rule which either overrides the **background-color** style using the `!important` * modifier, or which uses a CSS selector of higher specificity. */ stripeRows: true, /** * @cfg {Boolean} markDirty * True to show the dirty cell indicator when a cell has been modified. */ markDirty : true, /** * @cfg {Boolean} enableTextSelection * True to enable text selections. */ ariaRole: 'grid', /** * @property {Ext.view.Table} ownerGrid * A reference to the top-level owning grid component. This is actually the TablePanel * so it could be a tree. * @readonly * @private * @since 5.0.0 */ /** * @method disable * Disable this view. * * Disables interaction with, and masks this view. * * Note that the encapsulating {@link Ext.panel.Table} panel is *not* disabled, and other *docked* * components such as the panel header, the column header container, and docked toolbars will still be enabled. * The panel itself can be disabled if that is required, or individual docked components could be disabled. * * See {@link Ext.panel.Table #disableColumnHeaders disableColumnHeaders} and {@link Ext.panel.Table #enableColumnHeaders enableColumnHeaders}. * * @param {Boolean} [silent=false] Passing `true` will suppress the `disable` event from being fired. * @since 1.1.0 */ /** * @private * Outer tpl for TableView just to satisfy the validation within AbstractView.initComponent. */ tpl: [ '{%', 'view = values.view;', 'if (!(columns = values.columns)) {', 'columns = values.columns = view.ownerCt.getVisibleColumnManager().getColumns();', '}', 'values.fullWidth = 0;', // Stamp cellWidth into the columns 'for (i = 0, len = columns.length; i < len; i++) {', 'column = columns[i];', 'values.fullWidth += (column.cellWidth = column.lastBox ? column.lastBox.width : column.width || column.minWidth);', '}', // Add the row/column line classes to the container element. 'tableCls=values.tableCls=[];', '%}', '<div class="' + Ext.baseCSSPrefix + 'grid-item-container" style="width:{fullWidth}px">', '{[view.renderTHead(values, out, parent)]}', '{%', 'view.renderRows(values.rows, values.columns, values.viewStartIndex, out);', '%}', '{[view.renderTFoot(values, out, parent)]}', '</div>', { definitions: 'var view, tableCls, columns, i, len, column;', priority: 0 } ], outerRowTpl: [ '<table id="{rowId}" ', 'data-boundView="{view.id}" ', 'data-recordId="{record.internalId}" ', 'data-recordIndex="{recordIndex}" ', 'class="{[values.itemClasses.join(" ")]}" cellPadding="0" cellSpacing="0" {ariaTableAttr} style="{itemStyle};width:0">', // Do NOT emit a <TBODY> tag in case the nextTpl has to emit a <COLGROUP> column sizer element. // Browser will create a tbody tag when it encounters the first <TR> '{%', 'this.nextTpl.applyOut(values, out, parent)', '%}', '</table>', { priority: 9999 } ], rowTpl: [ '{%', 'var dataRowCls = values.recordIndex === -1 ? "" : " ' + Ext.baseCSSPrefix + 'grid-row";', '%}', '<tr class="{[values.rowClasses.join(" ")]} {[dataRowCls]}" {rowAttr:attributes} {ariaRowAttr}>', '<tpl for="columns">' + '{%', 'parent.view.renderCell(values, parent.record, parent.recordIndex, parent.rowIndex, xindex - 1, out, parent)', '%}', '</tpl>', '</tr>', { priority: 0 } ], cellTpl: [ '<td class="{tdCls}" {tdAttr} {[Ext.aria ? "id=\\"" + Ext.id() + "\\"" : ""]} style="width:{column.cellWidth}px;<tpl if="tdStyle">{tdStyle}</tpl>" tabindex="-1" {ariaCellAttr} data-columnid="{[values.column.getItemId()]}">', '<div {unselectableAttr} class="' + Ext.baseCSSPrefix + 'grid-cell-inner {innerCls}" ', 'style="text-align:{align};<tpl if="style">{style}</tpl>" {ariaCellInnerAttr}>{value}</div>', '</td>', { priority: 0 } ], /** * @private * Flag to disable refreshing SelectionModel on view refresh. Table views render rows with selected CSS class already added if necessary. */ refreshSelmodelOnRefresh: false, tableValues: {}, // Private properties used during the row and cell render process. // They are allocated here on the prototype, and cleared/re-used to avoid GC churn during repeated rendering. rowValues: { itemClasses: [], rowClasses: [] }, cellValues: { classes: [ Ext.baseCSSPrefix + 'grid-cell ' + Ext.baseCSSPrefix + 'grid-td' // for styles shared between cell and rowwrap ] }, /** * @event beforecellclick * Fired before the cell click is processed. Return false to cancel the default action. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event cellclick * Fired when table cell is clicked. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event beforecelldblclick * Fired before the cell double click is processed. Return false to cancel the default action. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event celldblclick * Fired when table cell is double clicked. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event beforecellcontextmenu * Fired before the cell right click is processed. Return false to cancel the default action. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event cellcontextmenu * Fired when table cell is right clicked. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event beforecellmousedown * Fired before the cell mouse down is processed. Return false to cancel the default action. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event cellmousedown * Fired when the mousedown event is captured on the cell. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event beforecellmouseup * Fired before the cell mouse up is processed. Return false to cancel the default action. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event cellmouseup * Fired when the mouseup event is captured on the cell. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event beforecellkeydown * Fired before the cell key down is processed. Return false to cancel the default action. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event cellkeydown * Fired when the keydown event is captured on the cell. * @param {Ext.view.Table} this * @param {HTMLElement} td The TD element for the cell. * @param {Number} cellIndex * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event rowclick * Fired when table cell is clicked. * @param {Ext.view.Table} this * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event rowdblclick * Fired when table cell is double clicked. * @param {Ext.view.Table} this * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event rowcontextmenu * Fired when table cell is right clicked. * @param {Ext.view.Table} this * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event rowmousedown * Fired when the mousedown event is captured on the cell. * @param {Ext.view.Table} this * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event rowmouseup * Fired when the mouseup event is captured on the cell. * @param {Ext.view.Table} this * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ /** * @event rowkeydown * Fired when the keydown event is captured on the cell. * @param {Ext.view.Table} this * @param {Ext.data.Model} record * @param {HTMLElement} tr The TR element for the cell. * @param {Number} rowIndex * @param {Ext.event.Event} e * @param {Ext.grid.CellContext} e.position A CellContext object which defines the target cell. */ constructor: function(config) { // Adjust our base class if we are inside a TreePanel if (config.grid.isTree) { config.baseCls = Ext.baseCSSPrefix + 'tree-view'; } this.callParent([config]); }, /** * @private * Returns `true` if this view has been configured with variableRowHeight (or this has been set by a plugin/feature) * which might insert arbitrary markup into a grid item. Or if at least one visible column has been configured * with variableRowHeight. Or if the store is grouped. */ hasVariableRowHeight: function(fromLockingPartner) { var me = this; return me.variableRowHeight || me.store.isGrouped() || me.getVisibleColumnManager().hasVariableRowHeight() || // If not already called from a locking partner, and there is a locking partner, // and the partner has variableRowHeight, then WE have variableRowHeight too. (!fromLockingPartner && me.lockingPartner && me.lockingPartner.hasVariableRowHeight(true)); }, initComponent: function() { var me = this; if (me.columnLines) { me.addCls(me.grid.colLinesCls); } if (me.rowLines) { me.addCls(me.grid.rowLinesCls); } /** * @private * @property {Ext.dom.Fly} body * A flyweight Ext.Element which encapsulates a reference to the view's main row containing element. * *Note that the `dom` reference will not be present until the first data refresh* */ me.body = new Ext.dom.Fly(); me.body.id = me.id + 'gridBody'; // If trackOver has been turned off, null out the overCls because documented behaviour // in AbstractView is to turn trackOver on if overItemCls is set. if (!me.trackOver) { me.overItemCls = null; } me.headerCt.view = me; // Features need a reference to the grid. // Grid needs an immediate reference to its view so that the view can reliably be got from the grid during initialization me.grid.view = me; me.initFeatures(me.grid); me.itemSelector = me.getItemSelector(); me.all = new Ext.view.NodeCache(me); me.callParent(); }, // Private // Create a config object for this view's selection model based upon the passed grid's configurations applySelectionModel: function(selModel, oldSelModel) { var me = this, grid = me.ownerGrid, defaultType = selModel.type; // If this is the initial configuration, pull overriding configs in from the owning TablePanel. if (!oldSelModel) { // Favour a passed instance if (!(selModel && selModel.isSelectionModel)) { selModel = grid.selModel || selModel; } } if (selModel) { if (selModel.isSelectionModel) { selModel.allowDeselect = grid.allowDeselect || selModel.selectionMode !== 'SINGLE'; selModel.locked = grid.disableSelection; } else { if (typeof selModel === 'string') { selModel = { type: selModel }; } // Copy obsolete selType property to type property now that selection models are Factoryable // TODO: Remove selType config after deprecation period else { selModel.type = grid.selType || selModel.selType || selModel.type || defaultType; } if (!selModel.mode) { if (grid.simpleSelect) { selModel.mode = 'SIMPLE'; } else if (grid.multiSelect) { selModel.mode = 'MULTI'; } } selModel = Ext.Factory.selection(Ext.apply({ allowDeselect: grid.allowDeselect, locked: grid.disableSelection }, selModel)); } } return selModel; }, updateSelectionModel: function(selModel, oldSelModel) { var me = this; if (oldSelModel) { oldSelModel.un('selectionchange', me.updateBindSelection, me); Ext.destroy(me.selModelRelayer); } me.selModelRelayer = me.relayEvents(selModel, [ 'selectionchange', 'beforeselect', 'beforedeselect', 'select', 'deselect', 'focuschange' ]); selModel.on('selectionchange', me.updateBindSelection, me); me.selModel = selModel; }, getVisibleColumnManager: function() { return this.ownerCt.getVisibleColumnManager(); }, getColumnManager: function() { return this.ownerCt.getColumnManager(); }, getTopLevelVisibleColumnManager: function() { // ownerGrid refers to the topmost responsible Ext.panel.Grid. // This could be this view's ownerCt, or if part of a locking arrangement, the locking grid return this.ownerGrid.getVisibleColumnManager(); }, /** * @private * Move a grid column from one position to another * @param {Number} fromIdx The index from which to move columns * @param {Number} toIdx The index at which to insert columns. * @param {Number} [colsToMove=1] The number of columns to move beginning at the `fromIdx` */ moveColumn: function(fromIdx, toIdx, colsToMove) { var me = this, multiMove = colsToMove > 1, range = multiMove && document.createRange ? document.createRange() : null, fragment = multiMove && !range ? document.createDocumentFragment() : null, destinationCellIdx = toIdx, colCount = me.getGridColumns().length, lastIndex = colCount - 1, doFirstLastClasses = (me.firstCls || me.lastCls) && (toIdx === 0 || toIdx === colCount || fromIdx === 0 || fromIdx === lastIndex), i, j, rows, len, tr, cells, colGroups; // Dragging between locked and unlocked side first refreshes the view, and calls onHeaderMoved with // fromIndex and toIndex the same. if (me.rendered && toIdx !== fromIdx) { // Grab all rows which have column cells in. // That is data rows. rows = me.el.query(me.rowSelector); if (toIdx > fromIdx && fragment) { destinationCellIdx -= 1; } for (i = 0, len = rows.length; i < len; i++) { tr = rows[i]; cells = tr.childNodes; // Keep first cell class and last cell class correct *only if needed* if (doFirstLastClasses) { if (cells.length === 1) { Ext.fly(cells[0]).addCls(me.firstCls); Ext.fly(cells[0]).addCls(me.lastCls); continue; } if (fromIdx === 0) { Ext.fly(cells[0]).removeCls(me.firstCls); Ext.fly(cells[1]).addCls(me.firstCls); } else if (fromIdx === lastIndex) { Ext.fly(cells[lastIndex]).removeCls(me.lastCls); Ext.fly(cells[lastIndex - 1]).addCls(me.lastCls); } if (toIdx === 0) { Ext.fly(cells[0]).removeCls(me.firstCls); Ext.fly(cells[fromIdx]).addCls(me.firstCls); } else if (toIdx === colCount) { Ext.fly(cells[lastIndex]).removeCls(me.lastCls); Ext.fly(cells[fromIdx]).addCls(me.lastCls); } } // Move multi using the best technique. // Extract a range straight into a fragment if possible. if (multiMove) { if (range) { range.setStartBefore(cells[fromIdx]); range.setEndAfter(cells[fromIdx + colsToMove - 1]); fragment = range.extractContents(); } else { for (j = 0; j < colsToMove; j++) { fragment.appendChild(cells[fromIdx]); } } tr.insertBefore(fragment, cells[destinationCellIdx] || null); } else { tr.insertBefore(cells[fromIdx], cells[destinationCellIdx] || null); } } // Shuffle the <col> elements in all <colgroup>s colGroups = me.el.query('colgroup'); for (i = 0, len = colGroups.length; i < len; i++) { // Extract the colgroup tr = colGroups[i]; // Move multi using the best technique. // Extract a range straight into a fragment if possible. if (multiMove) { if (range) { range.setStartBefore(tr.childNodes[fromIdx]); range.setEndAfter(tr.childNodes[fromIdx + colsToMove - 1]); fragment = range.extractContents(); } else { for (j = 0; j < colsToMove; j++) { fragment.appendChild(tr.childNodes[fromIdx]); } } tr.insertBefore(fragment, tr.childNodes[destinationCellIdx] || null); } else { tr.insertBefore(tr.childNodes[fromIdx], tr.childNodes[destinationCellIdx] || null); } } } }, // scroll the view to the top scrollToTop: Ext.emptyFn, /** * Add a listener to the main view element. It will be destroyed with the view. * @private */ addElListener: function(eventName, fn, scope){ this.mon(this, eventName, fn, scope, { element: 'el' }); }, /** * Get the leaf columns used for rendering the grid rows. * @private */ getGridColumns: function() { return this.ownerCt.getVisibleColumnManager().getColumns(); }, /** * Get a leaf level header by index regardless of what the nesting * structure is. * @private * @param {Number} index The index */ getHeaderAtIndex: function(index) { return this.ownerCt.getVisibleColumnManager().getHeaderAtIndex(index); }, /** * Get the cell (td) for a particular record and column. * @param {Ext.data.Model} record * @param {Ext.grid.column.Column} column * @private */ getCell: function(record, column) { var row = this.getRow(record); return Ext.fly(row).down(column.getCellSelector()); }, /** * Get a reference to a feature * @param {String} id The id of the feature * @return {Ext.grid.feature.Feature} The feature. Undefined if not found */ getFeature: function(id) { var features = this.featuresMC; if (features) { return features.get(id); } }, // @private // Finds a features by ftype in the features array findFeature: function(ftype) { if (this.features) { return Ext.Array.findBy(this.features, function(feature) { if (feature.ftype === ftype) { return true; } }); } }, /** * Initializes each feature and bind it to this view. * @private */ initFeatures: function(grid) { var me = this, i, features, feature, len; // Row container element emitted by tpl me.tpl = Ext.XTemplate.getTpl(this, 'tpl'); // The rowTpl emits a <div> me.rowTpl = Ext.XTemplate.getTpl(this, 'rowTpl'); me.addRowTpl(Ext.XTemplate.getTpl(this, 'outerRowTpl')); // Each cell is emitted by the cellTpl me.cellTpl = Ext.XTemplate.getTpl(this, 'cellTpl'); me.featuresMC = new Ext.util.MixedCollection(); features = me.features = me.constructFeatures(); len = features ? features.length : 0; for (i = 0; i < len; i++) { feature = features[i]; // inject a reference to view and grid - Features need both feature.view = me; feature.grid = grid; me.featuresMC.add(feature); feature.init(grid); } }, renderTHead: function(values, out, parent) { var headers = values.view.headerFns, len, i; if (headers) { for (i = 0, len = headers.length; i < len; ++i) { headers[i].call(this, values, out, parent); } } }, // Currently, we don't have ordering support for header/footer functions, // they will be pushed on at construction time. If the need does arise, // we can add this functionality in the future, but for now it's not // really necessary since currently only the summary feature uses this. addHeaderFn: function(fn) { var headers = this.headerFns; if (!headers) { headers = this.headerFns = []; } headers.push(fn); }, renderTFoot: function(values, out, parent){ var footers = values.view.footerFns, len, i; if (footers) { for (i = 0, len = footers.length; i < len; ++i) { footers[i].call(this, values, out, parent); } } }, addFooterFn: function(fn) { var footers = this.footerFns; if (!footers) { footers = this.footerFns = []; } footers.push(fn); }, addTpl: function(newTpl) { return this.insertTpl('tpl', newTpl); }, addRowTpl: function(newTpl) { return this.insertTpl('rowTpl', newTpl); }, addCellTpl: function(newTpl) { return this.insertTpl('cellTpl', newTpl); }, insertTpl: function(which, newTpl) { var me = this, tpl, prevTpl; // Clone an instantiated XTemplate if (newTpl.isTemplate) { newTpl = Ext.Object.chain(newTpl); } // If we have been passed an object of the form // { // before: fn // after: fn // } // Create a template from it using the object as the member configuration else { newTpl = new Ext.XTemplate('{%this.nextTpl.applyOut(values, out, parent);%}', newTpl); } // Stop at the first TPL who's priority is less than the passed rowTpl for (tpl = me[which]; newTpl.priority < tpl.priority; tpl = tpl.nextTpl) { prevTpl = tpl; } // If we had skipped over some, link the previous one to the passed rowTpl if (prevTpl) { prevTpl.nextTpl = newTpl; } // First one else { me[which] = newTpl; } newTpl.nextTpl = tpl; return newTpl; }, tplApplyOut: function(values, out, parent) { if (this.before) { if (this.before(values, out, parent) === false) { return; } } this.nextTpl.applyOut(values, out, parent); if (this.after) { this.after(values, out, parent); } }, /** * @private * Converts the features array as configured, into an array of instantiated Feature objects. * * Must have no side effects other than Feature instantiation. * * MUST NOT update the this.features property, and MUST NOT update the instantiated Features. */ constructFeatures: function() { var me = this, features = me.features, feature, result, i = 0, len; if (features) { result = []; len = features.length; for (; i < len; i++) { feature = features[i]; if (!feature.isFeature) { feature = Ext.create('feature.' + feature.ftype, feature); } result[i] = feature; } } return result; }, beforeRender: function() { var me = this; me.callParent(); if (!me.enableTextSelection) { me.protoEl.unselectable(); } }, onBindStore: function(store) { var me = this, bufferedRenderer = me.bufferedRenderer; if (bufferedRenderer && bufferedRenderer.store !== store) { bufferedRenderer.bindStore(store); } // Reset virtual scrolling. if (me.all && me.all.getCount()) { if (bufferedRenderer) { bufferedRenderer.setBodyTop(0); } me.clearViewEl(); } me.callParent(arguments); }, getStoreListeners: function() { var result = this.callParent(); result.beforepageremove = this.beforePageRemove; return result; }, beforePageRemove: function(pageMap, pageNumber) { var rows = this.all, pageSize = pageMap.getPageSize(); // If the rendered block needs the page, access it which moves it to the end of the LRU cache, and veto removal. if (rows.startIndex >= (pageNumber - 1) * pageSize && rows.endIndex <= (pageNumber * pageSize - 1)) { pageMap.get(pageNumber); return false; } }, // Private template method implemented starting at the AbstractView class. onViewScroll: function(scroller, x, y) { // We ignore scrolling caused by focusing if (!this.ignoreScroll) { this.callParent([scroller, x, y]); } }, // private // Create the DOM element which enapsulates the passed record. // Used when updating existing rows, so drills down into resulting structure . createRowElement: function(record, index, updateColumns) { var me = this, div = me.renderBuffer, tplData = me.collectData([record], index); tplData.columns = updateColumns; me.tpl.overwrite(div, tplData); // Return first element within node containing element return Ext.fly(div).down(me.getNodeContainerSelector(), true).firstChild; }, // private // Override so that we can use a quicker way to access the row nodes. // They are simply all child nodes of the nodeContainer element. bufferRender: function(records, index) { var me = this, div = me.renderBuffer, result, range = document.createRange ? document.createRange() : null; me.tpl.overwrite(div, me.collectData(records, index)); div = Ext.fly(div).down(me.getNodeContainerSelector(), true); if (range) { range.selectNodeContents(div); result = range.extractContents(); } else { result = document.createDocumentFragment(); while (div.firstChild) { result.appendChild(div.firstChild); } } result.childrenArray = Ext.Array.toArray(result.childNodes); return result; }, collectData: function(records, startIndex) { var me = this; me.rowValues.view = me; me.tableValues.view = me; me.tableValues.rows = records; me.tableValues.columns = null; me.tableValues.viewStartIndex = startIndex; me.tableValues.touchScroll = me.touchScroll; me.tableValues.tableStyle = 'width:' + me.headerCt.getTableWidth() + 'px'; return me.tableValues; }, // Overridden implementation. // Called by refresh to collect the view item nodes. // Note that these may be wrapping rows which *contain* rows which map to records collectNodes: function(targetEl) { this.all.fill(this.getNodeContainer().childNodes, this.all.startIndex); }, // Private. Called when the table changes height. // For example, see examples/grid/group-summary-grid.html // If we have flexed column headers, we need to update the header layout // because it may have to accommodate (or cease to accommodate) a vertical scrollbar. // Only do this on platforms which have a space-consuming scrollbar. // Only do it when vertical scrolling is enabled. refreshSize: function(forceLayout) { var me = this, bodySelector = me.getBodySelector(); // On every update of the layout system due to data update, capture the view's main element in our private flyweight. // IF there *is* a main element. Some TplFactories emit naked rows. if (bodySelector) { // use "down" instead of "child" because the grid table element is not a direct // child of the view element when a touch scroller is in use. me.body.attach(me.el.down(bodySelector, true)); } if (!me.hasLoadingHeight) { // Suspend layouts in case the superclass requests a layout. We might too, so they // must be coalesced. Ext.suspendLayouts(); me.callParent(arguments); // We only need to adjust for height changes in the data if we, or any visible columns have been configured with // variableRowHeight: true // OR, if we are being passed the forceUpdate flag which is passed when the view's item count changes. if (forceLayout || (me.hasVariableRowHeight() && me.dataSource.getCount())) { me.grid.updateLayout(); } Ext.resumeLayouts(true); } }, clearViewEl: function(leaveNodeContainer) { var me = this, all = me.all, store = me.getStore(), i, item, nodeContainer, targetEl; // The purpose of this is to allow boilerplate HTML nodes to remain in place inside a View // while the transient, templated data can be discarded and recreated. // // In particular, this is used in infinite grid scrolling: A very tall "stretcher" element is // inserted into the View's element to create a scrollbar of the correct proportion. // // Also we must ensure that the itemremove event is fired EVERY time an item is removed from the // view. This is so that widgets rendered into a view by a WidgetColumn can be recycled. for (i = all.startIndex; i <= all.endIndex; i++) { item = all.item(i, true); me.fireEvent('itemremove', store.getByInternalId(item.getAttribute('data-recordId')), i, item, me); } // AbstractView will clear the view correctly // It also resets the scrollrange. me.callParent(); nodeContainer = Ext.fly(me.getNodeContainer()); if (nodeContainer && !leaveNodeContainer) { targetEl = me.getTargetEl(); if (targetEl.dom !== nodeContainer.dom) { nodeContainer.destroy(); } } }, getMaskTarget: function() { // Masking a TableView masks its IMMEDIATE parent GridPanel's body. // Disabling/enabling a locking view relays the call to both child views. return this.ownerCt.body; }, statics: { getBoundView: function(node) { return Ext.getCmp(node.getAttribute('data-boundView')); } }, getRecord: function(node) { var me = this, recordIndex; // If store.destroy has been called before some delayed event fires on a node, we must ignore the event. if (me.store.isDestroyed) { return; } if (node.isModel) { return node; } node = me.getNode(node); if (node) { // The indices may be off because of collapsed groups (if we're grouping) or row wrapping, so just grab it by id. if (!me.hasActiveFeature()) { recordIndex = node.getAttribute('data-recordIndex'); if (recordIndex) { recordIndex = parseInt(recordIndex, 10); if (recordIndex > -1) { // The index is the index in the original Store, not in a GroupStore // The Grouping Feature increments the index to skip over unrendered records in collapsed groups return me.store.data.getAt(recordIndex); } } } return me.dataSource.getByInternalId(node.getAttribute('data-recordId')); } }, indexOf: function(node) { node = this.getNode(node); if (!node && node !== 0) { return -1; } return this.all.indexOf(node); }, indexInStore: function(node) { // We cannot use the stamped in data-recordindex because that is the index in the original configured store // NOT the index in the dataSource that is being used - that may be a GroupStore. return node ? this.dataSource.indexOf(this.getRecord(node)) : -1; }, renderRows: function(rows, columns, viewStartIndex, out) { var rowValues = this.rowValues, rowCount = rows.length, i; rowValues.view = this; rowValues.columns = columns; for (i = 0; i < rowCount; i++, viewStartIndex++) { rowValues.itemClasses.length = rowValues.rowClasses.length = 0; this.renderRow(rows[i], viewStartIndex, out); } // Dereference objects since rowValues is a persistent on our prototype rowValues.view = rowValues.columns = rowValues.record = null; }, /* Alternative column sizer element renderer. renderTHeadColumnSizer: function(values, out) { var columns = this.getGridColumns(), len = columns.length, i, column, width; out.push('<thead><tr class="' + Ext.baseCSSPrefix + 'grid-header-row">'); for (i = 0; i < len; i++) { column = columns[i]; width = column.lastBox ? column.lastBox.width : Ext.grid.header.Container.prototype.defaultWidth; out.push('<th class="', Ext.baseCSSPrefix, 'grid-cell-', columns[i].getItemId(), '" style="width:' + width + 'px"></th>'); } out.push('</tr></thead>'); }, */ renderColumnSizer: function(values, out) { var columns = values.columns || this.getGridColumns(), len = columns.length, i, column, width; out.push('<colgroup role="presentation">'); for (i = 0; i < len; i++) { column = columns[i]; width = column.cellWidth ? column.cellWidth : Ext.grid.header.Container.prototype.defaultWidth; out.push('<col role="presentation" class="', Ext.baseCSSPrefix, 'grid-cell-', columns[i].getItemId(), '" style="width:' + width + 'px">'); } out.push('</colgroup>'); }, /** * @private * Renders the HTML markup string for a single row into the passed array as a sequence of strings, or * returns the HTML markup for a single row. * * @param {Ext.data.Model} record The record to render. * @param {String[]} [out] A string array onto which to append the resulting HTML string. If omitted, * the resulting HTML string is returned. * @return {String} **only when the out parameter is omitted** The resulting HTML string. */ renderRow: function(record, rowIdx, out) { var me = this, isMetadataRecord = rowIdx === -1, selModel = me.selectionModel, rowValues = me.rowValues, itemClasses = rowValues.itemClasses, rowClasses = rowValues.rowClasses, itemCls = me.itemCls, cls, rowTpl = me.rowTpl; // Define the rowAttr object now. We don't want to do it in the treeview treeRowTpl because anything // this is processed in a deferred callback (such as deferring initial view refresh in gridview) could // poke rowAttr that are then shared in tableview.rowTpl. See EXTJSIV-9341. // // For example, the following shows the shared ref between a treeview's rowTpl nextTpl and the superclass // tableview.rowTpl: // // tree.view.rowTpl.nextTpl === grid.view.rowTpl // rowValues.rowAttr = {}; // Set up mandatory properties on rowValues rowValues.record = record; rowValues.recordId = record.internalId; // recordIndex is index in true store (NOT the data source - possibly a GroupStore) rowValues.recordIndex = me.store.indexOf(record); // rowIndex is the row number in the view. rowValues.rowIndex = rowIdx; rowValues.rowId = me.getRowId(record); rowValues.itemCls = rowValues.rowCls = ''; if (!rowValues.columns) { rowValues.columns = me.ownerCt.getVisibleColumnManager().getColumns(); } itemClasses.length = rowClasses.length = 0; // If it's a metadata record such as a summary record. // So do not decorate it with the regular CSS. // The Feature which renders it must know how to decorate it. if (!isMetadataRecord) { itemClasses[0] = itemCls; if (!me.ownerCt.disableSelection && selModel.isRowSelected) { // Selection class goes on the outermost row, so it goes into itemClasses if (selModel.isRowSelected(record)) { itemClasses.push(me.selectedItemCls); } } if (me.stripeRows && rowIdx % 2 !== 0) { itemClasses.push(me.altRowCls); } if (me.getRowClass) { cls = me.getRowClass(record, rowIdx, null, me.dataSource); if (cls) { rowClasses.push(cls); } } } if (out) { rowTpl.applyOut(rowValues, out, me.tableValues); } else { return rowTpl.apply(rowValues, me.tableValues); } }, /** * @private * Emits the HTML representing a single grid cell into the passed output stream (which is an array of strings). * * @param {Ext.grid.column.Column} column The column definition for which to render a cell. * @param {Number} recordIndex The row index (zero based within the {@link #store}) for which to render the cell. * @param {Number} rowIndex The row index (zero based within this view for which to render the cell. * @param {Number} columnIndex The column index (zero based) for which to render the cell. * @param {String[]} out The output stream into which the HTML strings are appended. */ renderCell: function (column, record, recordIndex, rowIndex, columnIndex, out) { var me = this, fullIndex, selModel = me.selectionModel, cellValues = me.cellValues, classes = cellValues.classes, fieldValue = record.data[column.dataIndex], cellTpl = me.cellTpl, value, clsInsertPoint, lastFocused = me.navigationModel.getPosition(); cellValues.record = record; cellValues.column = column; cellValues.recordIndex = recordIndex; cellValues.rowIndex = rowIndex; cellValues.columnIndex = columnIndex; cellValues.cellIndex = columnIndex; cellValues.align = column.align; cellValues.innerCls = column.innerCls; cellValues.tdCls = cellValues.tdStyle = cellValues.tdAttr = cellValues.style = ""; cellValues.unselectableAttr = me.enableTextSelection ? '' : 'unselectable="on"'; // Begin setup of classes to add to cell classes[1] = column.getCellId(); // On IE8, array[len] = 'foo' is twice as fast as array.push('foo') // So keep an insertion point and use assignment to help IE! clsInsertPoint = 2; if (column.renderer && column.renderer.call) { fullIndex = me.ownerCt.columnManager.getHeaderIndex(column); value = column.renderer.call(column.usingDefaultRenderer ? column : column.scope || me.ownerCt, fieldValue, cellValues, record, recordIndex, fullIndex, me.dataSource, me); if (cellValues.css) { // This warning attribute is used by the compat layer // TODO: remove when compat layer becomes deprecated record.cssWarning = true; cellValues.tdCls += ' ' + cellValues.css; cellValues.css = null; } // Add any tdCls which was added to the cellValues by the renderer. if (cellValues.tdCls) { classes[clsInsertPoint++] = cellValues.tdCls; } } else { value = fieldValue; } cellValues.value = (value == null || value === '') ? column.emptyCellText : value; if (column.tdCls) { classes[clsInsertPoint++] = column.tdCls; } if (me.markDirty && record.dirty && record.isModified(column.dataIndex)) { classes[clsInsertPoint++] = me.dirtyCls; } if (column.isFirstVisible) { classes[clsInsertPoint++] = me.firstCls; } if (column.isLastVisible) { classes[clsInsertPoint++] = me.lastCls; } if (!me.enableTextSelection) { classes[clsInsertPoint++] = me.unselectableCls; } if (selModel && (selModel.isCellModel || selModel.isSpreadsheetModel) && selModel.isCellSelected(me, recordIndex, column)) { classes[clsInsertPoint++] = me.selectedCellCls; } if (lastFocused && lastFocused.record.id === record.id && lastFocused.column === column) { classes[clsInsertPoint++] = me.focusedItemCls; } // Chop back array to only what we've set classes.length = clsInsertPoint; cellValues.tdCls = classes.join(' '); cellTpl.applyOut(cellValues, out); // Dereference objects since cellValues is a persistent var in the XTemplate's scope chain cellValues.column = null; }, /** * Returns the table row given the passed Record, or index or node. * @param {HTMLElement/String/Number/Ext.data.Model} nodeInfo The node or record, or row index. * to return the top level row. * @return {HTMLElement} The node or null if it wasn't found */ getRow: function(nodeInfo) { var fly; if ((!nodeInfo && nodeInfo !== 0) || !this.rendered) { return null; } // An event if (nodeInfo.target) { nodeInfo = nodeInfo.target; } // An id if (Ext.isString(nodeInfo)) { return Ext.fly(nodeInfo).down(this.rowSelector,true); } // Row index if (Ext.isNumber(nodeInfo)) { fly = this.all.item(nodeInfo); return fly && fly.down(this.rowSelector, true); } // Record if (nodeInfo.isModel) { return this.getRowByRecord(nodeInfo); } fly = Ext.fly(nodeInfo); // Passed an item, go down and get the row if (fly.is(this.itemSelector)) { return this.getRowFromItem(fly); } // Passed a child element of a row return fly.findParent(this.rowSelector, this.getTargetEl()); // already an HTMLElement }, getRowId: function(record){ return this.id + '-record-' + record.internalId; }, constructRowId: function(internalId){ return this.id + '-record-' + internalId; }, getNodeById: function(id){ id = this.constructRowId(id); return this.retrieveNode(id, false); }, getRowById: function(id){ id = this.constructRowId(id); return this.retrieveNode(id, true); }, getNodeByRecord: function(record) { return this.retrieveNode(this.getRowId(record), false); }, getRowByRecord: function(record) { return this.retrieveNode(this.getRowId(record), true); }, getRowFromItem: function(item) { var rows = Ext.getDom(item).tBodies[0].childNodes, len = rows.length, i; for (i = 0; i < len; i++) { if (Ext.fly(rows[i]).is(this.rowSelector)) { return rows[i]; } } }, retrieveNode: function(id, dataRow){ var result = this.el.getById(id, true); if (dataRow && result) { return Ext.fly(result).down(this.rowSelector, true); } return result; }, // Links back from grid rows are installed by the XTemplate as data attributes updateIndexes: Ext.emptyFn, // Outer table bodySelector: 'div.' + Ext.baseCSSPrefix + 'grid-item-container', // Element which contains rows nodeContainerSelector: 'div.' + Ext.baseCSSPrefix + 'grid-item-container', // view item. This wraps a data row itemSelector: 'table.' + Ext.baseCSSPrefix + 'grid-item', // Grid row which contains cells as opposed to wrapping item. rowSelector: 'tr.' + Ext.baseCSSPrefix + 'grid-row', // cell cellSelector: 'td.' + Ext.baseCSSPrefix + 'grid-cell', // Select column sizers and cells. // This may target `<COL>` elements as well as `<TD>` elements // `<COLGROUP>` element is inserted if the first row does not have the regular cell patten (eg is a colspanning group header row) sizerSelector: '.' + Ext.baseCSSPrefix + 'grid-cell', innerSelector: 'div.' + Ext.baseCSSPrefix + 'grid-cell-inner', /** * Returns a CSS selector which selects the outermost element(s) in this view. */ getBodySelector: function() { return this.bodySelector; }, /** * Returns a CSS selector which selects the element(s) which define the width of a column. * * This is used by the {@link Ext.view.TableLayout} when resizing columns. * */ getColumnSizerSelector: function(header) { var selector = this.sizerSelector + '-' + header.getItemId(); return 'td' + selector + ',col' + selector; }, /** * Returns a CSS selector which selects items of the view rendered by the outerRowTpl */ getItemSelector: function() { return this.itemSelector; }, /** * Returns a CSS selector which selects a particular column if the desired header is passed, * or a general cell selector is no parameter is passed. * * @param {Ext.grid.column.Column} [header] The column for which to return the selector. If * omitted, the general cell selector which matches **ant cell** will be returned. * */ getCellSelector: function(header) { return header ? header.getCellSelector() : this.cellSelector; }, /* * Returns a CSS selector which selects the content carrying element within cells. */ getCellInnerSelector: function(header) { return this.getCellSelector(header) + ' ' + this.innerSelector; }, /** * Adds a CSS Class to a specific row. * @param {HTMLElement/String/Number/Ext.data.Model} rowInfo An HTMLElement, index or instance of a model * representing this row * @param {String} cls */ addRowCls: function(rowInfo, cls) { var row = this.getRow(rowInfo); if (row) { Ext.fly(row).addCls(cls); } }, /** * Removes a CSS Class from a specific row. * @param {HTMLElement/String/Number/Ext.data.Model} rowInfo An HTMLElement, index or instance of a model * representing this row * @param {String} cls */ removeRowCls: function(rowInfo, cls) { var row = this.getRow(rowInfo); if (row) { Ext.fly(row).removeCls(cls); } }, // GridSelectionModel invokes onRowSelect as selection changes onRowSelect: function(rowIdx) { var me = this; me.addItemCls(rowIdx, me.selectedItemCls); //<feature legacyBrowser> if (Ext.isIE8) { me.repaintBorder(rowIdx + 1); } //</feature> }, // GridSelectionModel invokes onRowDeselect as selection changes onRowDeselect: function(rowIdx) { var me = this; me.removeItemCls(rowIdx, me.selectedItemCls); //<feature legacyBrowser> if (Ext.isIE8) { me.repaintBorder(rowIdx + 1); } //</feature> }, onCellSelect: function(position) { var cell = this.getCellByPosition(position); if (cell) { cell.addCls(this.selectedCellCls); } }, onCellDeselect: function(position) { var cell = this.getCellByPosition(position, true); if (cell) { Ext.fly(cell).removeCls(this.selectedCellCls); } }, // Old API. Used by tests now to test coercion of navigation from hidden column to closest visible. // Position.column includes all columns including hidden ones. getCellInclusive: function(position, returnDom) { if (position) { var row = this.getRow(position.row), header = this.ownerCt.getColumnManager().getHeaderAtIndex(position.column); if (header && row) { return Ext.fly(row).down(this.getCellSelector(header), returnDom); } } return false; }, getCellByPosition: function(position, returnDom) { if (position) { var view = position.view || this, row = view.getRow(position.record || position.row), header = position.column.isColumn ? position.column : view.getVisibleColumnManager().getHeaderAtIndex(position.column); if (header && row) { return Ext.fly(row).down(view.getCellSelector(header), returnDom); } } return false; }, onFocusEnter: function(e) { var me = this, targetView, navigationModel = me.getNavigationModel(), lastFocused, focusPosition, br = me.bufferedRenderer, firstRecord, focusTarget; // The underlying DOM event e = e.event; // We can only focus if there are rows in the row cache to focus *and* records // in the store to back them. Buffered Stores can produce a state where // the view is not cleared on the leading end of a reload operation, but the // store can be empty. if (!me.cellFocused && me.all.getCount() && me.dataSource.getCount()) { focusTarget = e.getTarget(null, null, true); // If what is being focused an interior element, but is not a cell, allow it to proceed. // The position silently restores to what it was when we were focused last. if (focusTarget && me.el.contains(focusTarget) && focusTarget !== me.el && !focusTarget.is(me.getCellSelector())) { if (navigationModel.lastFocused) { navigationModel.position = navigationModel.lastFocused; } me.cellFocused = true; } else { lastFocused = focusPosition = me.getLastFocused(); // Default to the first cell if the NavigationModel has never focused anything if (!focusPosition) { targetView = me.isLockingView ? (me.lockedGrid.isVisible() ? me.lockedView : me.normalView) : me; firstRecord = me.dataSource.getAt(br ? br.getFirstVisibleRowIndex() : 0); // A non-row producing record like a collapsed placeholder. // We cannot focus these yet. if (!firstRecord.isNonData) { focusPosition = new Ext.grid.CellContext(targetView).setPosition({ row: firstRecord, column: 0 }); } } // Not a descendant which we allow to carry focus. Blur it. if (!focusPosition) { e.stopEvent(); e.getTarget().blur(); return; } navigationModel.setPosition(focusPosition, null, e, null, true); // We now contain focus is that was successful me.cellFocused = !!navigationModel.getPosition(); } } if (me.cellFocused) { me.el.dom.setAttribute('tabindex', '-1'); } }, onFocusLeave: function(e) { var me = this; // Ignore this event if we do not actually contain focus. // CellEditors are rendered into the view's encapculating element, // So focusleave will fire when they are programatically blurred. // We will not have focus at that point. if (me.cellFocused) { // Blur the focused cell unless we are navigating into a locking partner, // in which case, the focus of that will setPosition to the target // without an intervening position to null. if (e.toComponent !== me.lockingPartner) { me.getNavigationModel().setPosition(null, null, e.event, null, true); } me.cellFocused = false; me.focusEl = me.el; me.focusEl.dom.setAttribute('tabindex', 0); } }, // GridSelectionModel invokes onRowFocus to 'highlight' // the last row focused onRowFocus: function(rowIdx, highlight, supressFocus) { var me = this; if (highlight) { me.addItemCls(rowIdx, me.focusedItemCls); if (!supressFocus) { me.focusRow(rowIdx); } //this.el.dom.setAttribute('aria-activedescendant', row.id); } else { me.removeItemCls(rowIdx, me.focusedItemCls); } //<feature legacyBrowser> if (Ext.isIE8) { me.repaintBorder(rowIdx + 1); } //</feature> }, /** * Focuses a particular row and brings it into view. Will fire the rowfocus event. * @param {HTMLElement/String/Number/Ext.data.Model} row An HTMLElement template node, index of a template node, the id of a template node or the * @param {Boolean/Number} [delay] Delay the focus this number of milliseconds (true for 10 milliseconds). * record associated with the node. */ focusRow: function(row, delay) { var me = this, focusTask = me.getFocusTask(); if (delay) { focusTask.delay(Ext.isNumber(delay) ? delay : 10, me.focusRow, me, [row, false]); return; } // An immediate focus call must cancel any outstanding delayed focus calls. focusTask.cancel(); // Do not attempt to focus if hidden or within collapsed Panel. if (me.isVisible(true)) { me.getNavigationModel().setPosition(me.getRecord(row)); } }, // Override the version in Ext.view.View because the focusable elements are the grid cells. /** * @override * Focuses a particular row and brings it into view. Will fire the rowfocus event. * @param {HTMLElement/String/Number/Ext.data.Model} row An HTMLElement template node, index of a template node, the id of a template node or the * @param {Boolean/Number} [delay] Delay the focus this number of milliseconds (true for 10 milliseconds). * record associated with the node. */ focusNode: function(row, delay) { this.focusRow(row, delay); }, scrollRowIntoView: function(row, animate) { row = this.getRow(row); if (row) { this.scrollElIntoView(row, false, animate); } }, /** * Focuses a particular cell and brings it into view. Will fire the rowfocus event. * @param {Ext.grid.CellContext} pos The cell to select * @param {Boolean/Number} [delay] Delay the focus this number of milliseconds (true for 10 milliseconds). */ focusCell: function(position, delay) { var me = this, cell, focusTask = me.getFocusTask(); if (delay) { focusTask.delay(Ext.isNumber(delay) ? delay : 10, me.focusCell, me, [position, false]); return; } // An immediate focus call must cancel any outstanding delayed focus calls. focusTask.cancel(); // Do not attempt to focus if hidden or within collapsed Panel // Maintainer: Note that to avoid an unnecessary call to me.getCellByPosition if not visible, or another, nested if test, // the assignment of the cell var is embedded inside the condition expression. if (me.isVisible(true) && (cell = me.getCellByPosition(position))) { me.getNavigationModel().setPosition(position); } }, getLastFocused: function() { var me = this, lastFocused = me.lastFocused; if (lastFocused && lastFocused.record && lastFocused.column) { // If the last focused record or column has gone away, or the record is no longer in the visible rendered block, we have no lastFocused if (me.dataSource.indexOf(lastFocused.record) !== -1 && me.getVisibleColumnManager().indexOf(lastFocused.column) !== -1 && me.getNode(lastFocused.record)) { return lastFocused; } } }, scrollCellIntoView: function(cell, animate) { if (cell.isCellContext) { cell = this.getCellByPosition(cell); } if (cell) { this.scrollElIntoView(cell, null, animate); } }, scrollElIntoView: function(el, hscroll, animate) { var scroller = this.getScrollable(); if (scroller) { scroller.scrollIntoView(el, hscroll, animate); } }, syncRowHeightBegin: function () { var me = this, itemEls = me.all, ln = itemEls.count, synchronizer = [], RowSynchronizer = Ext.grid.locking.RowSynchronizer, i, j, rowSync; for (i = 0, j = itemEls.startIndex; i < ln; i++, j++) { synchronizer[i] = rowSync = new RowSynchronizer(me, itemEls.elements[j]); rowSync.reset(); } return synchronizer; }, syncRowHeightClear: function (synchronizer) { var me = this, itemEls = me.all, ln = itemEls.count, i; for (i = 0; i < ln; i++) { synchronizer[i].reset(); } }, syncRowHeightMeasure: function (synchronizer) { var ln = synchronizer.length, i; for (i = 0; i < ln; i++) { synchronizer[i].measure(); } }, syncRowHeightFinish: function (synchronizer, otherSynchronizer) { var ln = synchronizer.length, i; for (i = 0; i < ln; i++) { synchronizer[i].finish(otherSynchronizer[i]); } }, // private handleUpdate: function(store, record, operation, changedFieldNames) { var me = this, rowTpl = me.rowTpl, markDirty = me.markDirty, dirtyCls = me.dirtyCls, columnsToUpdate = [], hasVariableRowHeight = me.variableRowHeight, updateTypeFlags = 0, ownerCt = me.ownerCt, oldItem, oldItemDom, oldDataRow, newItemDom, newAttrs, attLen, attName, attrIndex, overItemCls, columns, column, len, i, cellUpdateFlag, cell, fieldName, value, defaultRenderer, scope, elData; if (me.viewReady) { // Table row being updated oldItemDom = me.getNodeByRecord(record); // Row might not be rendered due to buffered rendering or being part of a collapsed group... if (oldItemDom) { overItemCls = me.overItemCls; columns = me.ownerCt.getVisibleColumnManager().getColumns(); // Collect an array of the columns which must be updated. // If the field at this column index was changed, or column has a custom renderer // (which means value could rely on any other changed field) we include the column. for (i = 0, len = columns.length; i < len; i++) { column = columns[i]; // 0 = Column doesn't need update. // 1 = Column needs update, and renderer has > 1 argument; We need to render a whole new HTML item. // 2 = Column needs update, but renderer has 1 argument or column uses an updater. cellUpdateFlag = me.shouldUpdateCell(record, column, changedFieldNames); if (cellUpdateFlag) { // Track if any of the updating columns yields a flag with the 1 bit set. // This means that there is a custom renderer involved and a new TableView item // will need rendering. updateTypeFlags = updateTypeFlags | cellUpdateFlag; columnsToUpdate[columnsToUpdate.length] = column; hasVariableRowHeight = hasVariableRowHeight || column.variableRowHeight; } } // If there's no data row (some other rowTpl has been used; eg group header) // or one or more columns has a custom renderer // or there's more than one <TR>, we must use the full render pathway to create a whole new TableView item if (!me.getRowFromItem(oldItemDom) || (updateTypeFlags & 1) || (oldItemDom.tBodies[0].childNodes.length > 1)) { oldItem = Ext.fly(oldItemDom, '_internal'); elData = oldItemDom._extData; newItemDom = me.createRowElement(record, me.dataSource.indexOf(record), columnsToUpdate); if (oldItem.hasCls(overItemCls)) { Ext.fly(newItemDom).addCls(overItemCls); } // Copy new row attributes across. Use IE-specific method if possible. // In IE10, there is a problem where the className will not get updated // in the view, even though the className on the dom element is correct. // See EXTJSIV-9462 if (Ext.isIE9m && oldItemDom.mergeAttributes) { oldItemDom.mergeAttributes(newItemDom, true); } else { newAttrs = newItemDom.attributes; attLen = newAttrs.length; for (attrIndex = 0; attrIndex < attLen; attrIndex++) { attName = newAttrs[attrIndex].name; if (attName !== 'id') { oldItemDom.setAttribute(attName, newAttrs[attrIndex].value); } } } // The element's data is no longer synchronized. We just overwrite it in the DOM if (elData) { elData.isSynchronized = false; } // If we have columns which may *need* updating (think locked side of lockable grid with all columns unlocked) // and the changed record is within our view, then update the view. if (columns.length && (oldDataRow = me.getRow(oldItemDom))) { me.updateColumns(oldDataRow, Ext.fly(newItemDom).down(me.rowSelector, true), columnsToUpdate); } // Loop thru all of rowTpls asking them to sync the content they are responsible for if any. while (rowTpl) { if (rowTpl.syncContent) { // *IF* we are selectively updating columns (have been passed changedFieldNames), then pass the column set, else // pass null, and it will sync all content. if (rowTpl.syncContent(oldItemDom, newItemDom, changedFieldNames ? columnsToUpdate : null) === false) { break; } } rowTpl = rowTpl.nextTpl; } } // No custom renderers found in columns to be updated, we can simply update the existing cells. else { // Flyweight for manipulation of the update cell if (!me.cellFly) { me.cellFly = new Ext.dom.Fly(); } // Loop through columns which need updating. for (i = 0, len = columnsToUpdate.length; i < len; i++) { column = columnsToUpdate[i]; // The dataIndex of the column is the field name fieldName = column.dataIndex; value = record.get(fieldName); cell = oldItemDom.firstChild.firstChild.childNodes[column.getVisibleIndex()]; // Mark the field's dirty status if we are configured to do so (defaults to true) if (markDirty) { me.cellFly.attach(cell); if (record.isModified(column.dataIndex)) { me.cellFly.addCls(dirtyCls); } else { me.cellFly.removeCls(dirtyCls); } } defaultRenderer = column.usingDefaultRenderer; scope = defaultRenderer ? column : column.scope; // Call the column updater which gets passed the TD element if (column.updater) { Ext.callback(column.updater, scope, [cell, value, record, me, me.dataSource], 0, column, ownerCt); } else { if (column.renderer) { value = Ext.callback(column.renderer, scope, [value, null, record, 0, 0, me.dataSource, me], 0, column, ownerCt); } // Update the value of the cell's inner in the best way. // We only use innerHTML of the cell's inner DIV if the renderer produces HTML // Otherwise we change the value of the single text node within the inner DIV if (column.producesHTML) { cell.childNodes[0].innerHTML = value; } else { cell.childNodes[0].childNodes[0].data = value; } } // Add the highlight class if there is one if (me.highlightClass) { Ext.fly(cell).addCls(me.highlightClass); // Start up a DelayedTask which will purge the changedCells stack, removing the highlight class // after the expiration time if (!me.changedCells) { me.self.prototype.changedCells = []; me.prototype.clearChangedTask = new Ext.util.DelayedTask(me.clearChangedCells, me.prototype); me.clearChangedTask.delay(me.unhighlightDelay); } // Post a changed cell to the stack along with expiration time me.changedCells.push({ cell: cell, cls: me.highlightClass, expires: Ext.Date.now() + 1000 }); } } // If we have a commit or a reject, some fields may no longer be dirty but may // not appear in the modified field names. Remove all the dirty class here to be sure. if (markDirty && !record.dirty) { Ext.fly(oldItemDom, '_internal').select('.' + dirtyCls).removeCls(dirtyCls); } } // Coalesce any layouts which happen due to any itemupdate handlers (eg Widget columns) with the final refreshSize layout. if (hasVariableRowHeight) { Ext.suspendLayouts(); } // Since we don't actually replace the row, we need to fire the event with the old row // because it's the thing that is still in the DOM me.fireEvent('itemupdate', record, me.store.indexOf(record), oldItemDom); // We only need to update the layout if any of the columns can change the row height. if (hasVariableRowHeight) { if (me.bufferedRenderer) { me.bufferedRenderer.refreshSize(); // Must climb to ownerGrid in case we've only updated one field in one side of a lockable assembly. // ownerGrid is always the topmost GridPanel. me.ownerGrid.updateLayout(); } else { me.refreshSize(); } // Ensure any layouts queued by itemupdate handlers and/or the refreshSize call are executed. Ext.resumeLayouts(true); } } } }, clearChangedCells: function() { var me = this, now = Ext.Date.now(), changedCell; for (var i = 0, len = me.changedCells.length; i < len; ) { changedCell = me.changedCells[i]; if (changedCell.expires <= now) { Ext.fly(changedCell.cell).removeCls(changedCell.highlightClass); Ext.Array.erase(me.changedCells, i, 1); len--; } else { break; } } // Keep repeating the delay until all highlighted cells have been cleared if (len) { me.clearChangedTask.delay(me.unhighlightDelay); } }, updateColumns: function(oldRowDom, newRowDom, columnsToUpdate) { var me = this, newAttrs, attLen, attName, attrIndex, colCount = columnsToUpdate.length, colIndex, column, oldCell, newCell, cellSelector = me.getCellSelector(); // Copy new row attributes across. Use IE-specific method if possible. // Must do again at this level because the row DOM passed here may be the nested row in a row wrap. if (oldRowDom.mergeAttributes) { oldRowDom.mergeAttributes(newRowDom, true); } else { newAttrs = newRowDom.attributes; attLen = newAttrs.length; for (attrIndex = 0; attrIndex < attLen; attrIndex++) { attName = newAttrs[attrIndex].name; if (attName !== 'id') { oldRowDom.setAttribute(attName, newAttrs[attrIndex].value); } } } // Replace changed cells in the existing row structure with the new version from the rendered row. for (colIndex = 0; colIndex < colCount; colIndex++) { column = columnsToUpdate[colIndex]; // Pluck out cells using the column's unique cell selector. // Becuse in a wrapped row, there may be several TD elements. cellSelector = me.getCellSelector(column); oldCell = Ext.fly(oldRowDom).selectNode(cellSelector); newCell = Ext.fly(newRowDom).selectNode(cellSelector); // Carefully replace just the *contents* of the cell. Ext.fly(oldCell).syncContent(newCell); } }, /** * @private * Decides whether the column needs updating * @return {Number} 0 = Doesn't need update. * 1 = Column needs update, and renderer has > 1 argument; We need to render a whole new HTML item. * 2 = Column needs update, but renderer has 1 argument or column uses an updater. */ shouldUpdateCell: function(record, column, changedFieldNames) { // We should not update certain columns (widget column) if (!column.preventUpdate) { // The passed column has a renderer which peeks and pokes at other data. // Return 1 which means that a whole new TableView item must be rendered. if (column.hasCustomRenderer) { return 1; } // If there is a changed field list, and it's NOT a custom column renderer // (meaning it doesn't peek at other data, but just uses the raw field value) // We only have to update it if the column's field is amobg those changes. if (changedFieldNames) { var len = changedFieldNames.length, i, field; for (i = 0; i < len; ++i) { field = changedFieldNames[i]; if (field === column.dataIndex || field === record.idProperty) { return 2; } } } else { return 2; } } return 0; }, /** * Refreshes the grid view. Sets the sort state and focuses the previously focused row. */ refresh: function() { var me = this, scroller; me.callParent(arguments); me.headerCt.setSortState(); // Create horizontal stretcher element if no records in view and there is overflow of the header container. // Element will be transient and destroyed by the next refresh. if (me.touchScroll && me.el && !me.all.getCount() && me.headerCt && me.headerCt.tooNarrow) { scroller = me.getScrollable(); if (scroller) { scroller.setSize({ x: me.headerCt.getTableWidth(), y: scroller.getSize().y }); } } }, processContainerEvent: function(e) { // If we find a component & it belongs to our grid, don't fire the event. // For example, grid editors resolve to the parent grid var cmp = Ext.ComponentManager.byElement(e.target.parentNode); if (cmp && cmp.up(this.ownerCt)) { return false; } }, processItemEvent: function(record, item, rowIndex, e) { var me = this, self = me.self, map = self.EventMap, type = e.type, row, cell, selModel, features = me.features, len = features.length, i, cellIndex, result, feature, column, navModel = me.getNavigationModel(), focusPosition, eventPosition = e.position = me.eventPosition || (me.eventPosition = new Ext.grid.CellContext()); // IE has a bug whereby if you mousedown in a cell editor in one side of a locking grid and then // drag out of that, and mouseup in *the other side*, the mousedowned side still receives the event! // Even though the mouseup target is *not* within it! Ignore the mouseup in this case. if (Ext.isIE && type === 'mouseup' && !e.within(me.el)) { return false; } // Only process the event if it occurred within an item which maps to a record in the store if (me.indexInStore(item) !== -1) { row = eventPosition.rowElement = Ext.fly(item).down(me.rowSelector, true); // For key events, pull context from NavigationModel if (Ext.String.startsWith(e.type, 'key') && (focusPosition = navModel.getPosition())) { cell = (cell = navModel.getCell()) && cell.dom; column = focusPosition.column; } // Even with a NavigationModel, synthetic click events might be recieved before focus // is received, so attempt to access the cell from the target. if (!cell) { cell = e.getTarget(me.getCellSelector(), row); } type = self.TouchEventMap[type] || type; if (cell) { if (!cell.parentNode) { // If we have no parentNode, the td has been removed from the DOM, probably via an update, // so just jump out since the target for the event isn't valid return false; } if (!column) { column = me.getHeaderByCell(cell); } // Find the index of the header in the *full* (including hidden columns) leaf column set. // Because In 4.0.0 we rendered hidden cells, and the cellIndex included the hidden ones. cellIndex = me.ownerCt.getColumnManager().getHeaderIndex(column); } else { cellIndex = -1; } eventPosition.setAll( me, rowIndex, column ? me.getVisibleColumnManager().getHeaderIndex(column) : -1, record, column ); eventPosition.cellElement = cell; result = me.fireEvent('uievent', type, me, cell, rowIndex, cellIndex, e, record, row); // If the event has been stopped by a handler, tell the selModel (if it is interested) and return early. // For example, action columns by default will stop event propagation by returning `false` from its // 'uievent' event handler. if ((result === false || me.callParent(arguments) === false)) { selModel = me.getSelectionModel(); if (selModel.onVetoUIEvent) { selModel.onVetoUIEvent(type, me, cell, rowIndex, cellIndex, e, record, row); } return false; } for (i = 0; i < len; ++i) { feature = features[i]; // In some features, the first/last row might be wrapped to contain extra info, // such as grouping or summary, so we may need to stop the event if (feature.wrapsItem) { if (feature.vetoEvent(record, row, rowIndex, e) === false) { // If the feature is vetoing the event, there's a good chance that // it's for some feature action in the wrapped row. me.processSpecialEvent(e); // Prevent focus/selection here until proper focus handling is added for non-data rows // This should probably be removed once this is implemented. e.preventDefault(); return false; } } } // if the element whose event is being processed is not an actual cell (for example if using a rowbody // feature and the rowbody element's event is being processed) then do not fire any "cell" events // Don't handle cellmouseenter and cellmouseleave events for now if (cell && type !== 'mouseover' && type !== 'mouseout') { result = !( // We are adding cell and feature events (me['onBeforeCell' + map[type]](cell, cellIndex, record, row, rowIndex, e) === false) || (me.fireEvent('beforecell' + type, me, cell, cellIndex, record, row, rowIndex, e) === false) || (me['onCell' + map[type]](cell, cellIndex, record, row, rowIndex, e) === false) || (me.fireEvent('cell' + type, me, cell, cellIndex, record, row, rowIndex, e) === false) ); } if (result !== false) { result = me.fireEvent('row' + type, me, record, row, rowIndex, e); } return result; } else { // If it's not in the store, it could be a feature event, so check here this.processSpecialEvent(e); // Prevent focus/selection here until proper focus handling is added for non-data rows // This should probably be removed once this is implemented. e.preventDefault(); return false; } }, processSpecialEvent: function(e) { var me = this, features = me.features, ln = features.length, type = e.type, i, feature, prefix, featureTarget, beforeArgs, args, panel = me.ownerCt; me.callParent(arguments); if (type == 'mouseover' || type == 'mouseout') { return; } type = me.self.TouchEventMap[type] || type; for (i = 0; i < ln; i++) { feature = features[i]; if (feature.hasFeatureEvent) { featureTarget = e.getTarget(feature.eventSelector, me.getTargetEl()); if (featureTarget) { prefix = feature.eventPrefix; // allows features to implement getFireEventArgs to change the // fireEvent signature beforeArgs = feature.getFireEventArgs('before' + prefix + type, me, featureTarget, e); args = feature.getFireEventArgs(prefix + type, me, featureTarget, e); if ( // before view event (me.fireEvent.apply(me, beforeArgs) === false) || // panel grid event (panel.fireEvent.apply(panel, beforeArgs) === false) || // view event (me.fireEvent.apply(me, args) === false) || // panel event (panel.fireEvent.apply(panel, args) === false) ) { return false; } } } } return true; }, onCellMouseDown: Ext.emptyFn, onCellLongPress: Ext.emptyFn, onCellMouseUp: Ext.emptyFn, onCellClick: Ext.emptyFn, onCellDblClick: Ext.emptyFn, onCellContextMenu: Ext.emptyFn, onCellKeyDown: Ext.emptyFn, onCellKeyUp: Ext.emptyFn, onCellKeyPress: Ext.emptyFn, onBeforeCellMouseDown: Ext.emptyFn, onBeforeCellLongPress: Ext.emptyFn, onBeforeCellMouseUp: Ext.emptyFn, onBeforeCellClick: Ext.emptyFn, onBeforeCellDblClick: Ext.emptyFn, onBeforeCellContextMenu: Ext.emptyFn, onBeforeCellKeyDown: Ext.emptyFn, onBeforeCellKeyUp: Ext.emptyFn, onBeforeCellKeyPress: Ext.emptyFn, /** * Expands a particular header to fit the max content width. * @deprecated Use {@link #autoSizeColumn} instead. */ expandToFit: function(header) { this.autoSizeColumn(header); }, /** * Sizes the passed header to fit the max content width. * *Note that group columns shrinkwrap around the size of leaf columns. Auto sizing a group column * autosizes descendant leaf columns.* * @param {Ext.grid.column.Column/Number} header The header (or index of header) to auto size. */ autoSizeColumn: function(header) { if (Ext.isNumber(header)) { header = this.getGridColumns[header]; } if (header) { if (header.isGroupHeader) { header.autoSize(); return; } delete header.flex; header.setWidth(this.getMaxContentWidth(header)); } }, /** * Returns the max contentWidth of the header's text and all cells * in the grid under this header. * @private */ getMaxContentWidth: function(header) { var me = this, cells = me.el.query(header.getCellInnerSelector()), originalWidth = header.getWidth(), i = 0, ln = cells.length, columnSizer = me.body.select(me.getColumnSizerSelector(header)), max = Math.max, widthAdjust = 0, maxWidth; if (ln > 0) { if (Ext.supports.ScrollWidthInlinePaddingBug) { widthAdjust += me.getCellPaddingAfter(cells[0]); } if (me.columnLines) { widthAdjust += Ext.fly(cells[0].parentNode).getBorderWidth('lr'); } } // Set column width to 1px so we can detect the content width by measuring scrollWidth columnSizer.setWidth(1); // We are about to measure the offsetWidth of the textEl to determine how much // space the text occupies, but it will not report the correct width if the titleEl // has text-overflow:ellipsis. Set text-overflow to 'clip' before proceeding to // ensure we get the correct measurement. header.titleEl.setStyle('text-overflow', 'clip'); // Allow for padding round text of header maxWidth = header.textEl.dom.offsetWidth + header.titleEl.getPadding('lr'); // revert to using text-overflow defined by the stylesheet header.titleEl.setStyle('text-overflow', ''); for (; i < ln; i++) { maxWidth = max(maxWidth, cells[i].scrollWidth); } // in some browsers, the "after" padding is not accounted for in the scrollWidth maxWidth += widthAdjust; // 40 is the minimum column width. TODO: should this be configurable? maxWidth = max(maxWidth, 40); // Set column width back to original width columnSizer.setWidth(originalWidth); return maxWidth; }, getPositionByEvent: function(e) { var me = this, cellNode = e.getTarget(me.cellSelector), rowNode = e.getTarget(me.itemSelector), record = me.getRecord(rowNode), header = me.getHeaderByCell(cellNode); return me.getPosition(record, header); }, getHeaderByCell: function(cell) { if (cell) { return this.ownerCt.getVisibleColumnManager().getHeaderById(cell.getAttribute('data-columnId')); } return false; }, /** * @param {Object} position The current row and column: an object containing the following properties: * * - row - The row index * - column - The column index * * @param {String} direction 'up', 'down', 'right' and 'left' * @param {Ext.event.Event} e event * @param {Boolean} preventWrap Set to true to prevent wrap around to the next or previous row. * @param {Function} verifierFn A function to verify the validity of the calculated position. * When using this function, you must return true to allow the newPosition to be returned. * @param {Object} scope Scope to run the verifierFn in * @returns {Ext.grid.CellContext} An object encapsulating the unique cell position. * * @private */ walkCells: function(pos, direction, e, preventWrap, verifierFn, scope) { // Caller (probably CellModel) had no current position. This can happen // if the main el is focused and any navigation key is presssed. if (!pos) { return false; } var me = this, // Use original, documented row/column properties if passed. // The object should be a CellContext with rowIdx & colIdx row = typeof pos.row === 'number' ? pos.row : pos.rowIdx, column = typeof pos.column === 'number' ? pos.column : pos.colIdx, rowCount = me.dataSource.getCount(), columns = me.ownerCt.getVisibleColumnManager(), firstIndex = columns.getHeaderIndex(columns.getFirst()), lastIndex = columns.getHeaderIndex(columns.getLast()), newRow = row, newColumn = column, activeHeader = columns.getHeaderAtIndex(column); // no active header or its currently hidden if (!activeHeader || activeHeader.hidden || !rowCount) { return false; } e = e || {}; direction = direction.toLowerCase(); switch (direction) { case 'right': // has the potential to wrap if its last if (column === lastIndex) { // if bottom row and last column, deny right if (preventWrap || row === rowCount - 1) { return false; } if (!e.ctrlKey) { // otherwise wrap to nextRow and firstCol newRow = me.walkRows(row, 1); if (newRow !== row) { newColumn = firstIndex; } } // go right } else { if (!e.ctrlKey) { newColumn = columns.getHeaderIndex(columns.getNextSibling(activeHeader)); } else { newColumn = lastIndex; } } break; case 'left': // has the potential to wrap if (column === firstIndex) { // if top row and first column, deny left if (preventWrap || row === 0) { return false; } if (!e.ctrlKey) { // otherwise wrap to prevRow and lastIndex newRow = me.walkRows(row, -1); if (newRow !== row) { newColumn = lastIndex; } } // go left } else { if (!e.ctrlKey) { newColumn = columns.getHeaderIndex(columns.getPreviousSibling(activeHeader)); } else { newColumn = firstIndex; } } break; case 'up': // if top row, deny up if (row === 0) { return false; // go up } else { if (!e.ctrlKey) { newRow = me.walkRows(row, -1); } else { // Go to first row by walking down from row -1 newRow = me.walkRows(-1, 1); } } break; case 'down': // if bottom row, deny down if (row === rowCount - 1) { return false; // go down } else { if (!e.ctrlKey) { newRow = me.walkRows(row, 1); } else { // Go to first row by walking up from beyond the last row newRow = me.walkRows(rowCount, -1); } } break; } if (verifierFn && verifierFn.call(scope || me, {row: newRow, column: newColumn}) !== true) { return false; } newColumn = columns.getHeaderAtIndex(newColumn); return new Ext.grid.CellContext(me).setPosition(newRow, newColumn); }, /** * Increments the passed row index by the passed increment which may be +ve or -ve * * Skips hidden rows. * * If no row is visible in the specified direction, returns the input row index unchanged. * @param {Number} startRow The zero-based row index to start from. * @param {Number} distance The distance to move the row by. May be +ve or -ve. */ walkRows: function(startRow, distance) { // Note that we use the **dataSource** here because row indices mean view row indices // so records in collapsed groups must be omitted. var me = this, store = me.dataSource, moved = 0, lastValid = startRow, node, limit = (distance < 0) ? 0 : (store.isBufferedStore ? store.getTotalCount() : store.getCount()) - 1, increment = limit ? 1 : -1, result = startRow; do { // Walked off the end: return the last encountered valid row if (limit ? result >= limit : result <= limit) { return lastValid || limit; } // Move the result pointer on by one position. We have to count intervening VISIBLE nodes result += increment; // Stepped onto VISIBLE record: Increment the moved count. // We must not count stepping onto a non-rendered record as a move. if ((node = Ext.fly(me.getRow(result))) && node.isVisible(true)) { moved += increment; lastValid = result; } } while (moved !== distance); return result; }, /** * Navigates from the passed record by the passed increment which may be +ve or -ve * * Skips hidden records. * * If no record is visible in the specified direction, returns the starting record index unchanged. * @param {Ext.data.Model} startRec The Record to start from. * @param {Number} distance The distance to move from the record. May be +ve or -ve. */ walkRecs: function(startRec, distance) { // Note that we use the **store** to access the records by index because the dataSource omits records in collapsed groups. // This is used by selection models which use the **store** var me = this, store = me.dataSource, moved = 0, lastValid = startRec, node, limit = (distance < 0) ? 0 : (store.isBufferedStore ? store.getTotalCount() : store.getCount()) - 1, increment = limit ? 1 : -1, testIndex = store.indexOf(startRec), rec; do { // Walked off the end: return the last encountered valid record if (limit ? testIndex >= limit : testIndex <= limit) { return lastValid; } // Move the result pointer on by one position. We have to count intervening VISIBLE nodes testIndex += increment; // Stepped onto VISIBLE record: Increment the moved count. // We must not count stepping onto a non-rendered record as a move. rec = store.getAt(testIndex); if (!rec.isCollapsedPlaceholder && (node = Ext.fly(me.getNodeByRecord(rec))) && node.isVisible(true)) { moved += increment; lastValid = rec; } } while (moved !== distance); return lastValid; }, /** * Returns the index of the first row in your table view deemed to be visible. * @return {Number} * @private */ getFirstVisibleRowIndex: function() { var me = this, count = (me.dataSource.isBufferedStore ? me.dataSource.getTotalCount() : me.dataSource.getCount()), result = me.indexOf(me.all.first()) - 1; do { result += 1; if (result === count) { return; } } while (!Ext.fly(me.getRow(result)).isVisible(true)); return result; }, /** * Returns the index of the last row in your table view deemed to be visible. * @return {Number} * @private */ getLastVisibleRowIndex: function() { var me = this, result = me.indexOf(me.all.last()); do { result -= 1; if (result === -1) { return; } } while (!Ext.fly(me.getRow(result)).isVisible(true)); return result; }, getHeaderCt: function() { return this.headerCt; }, getPosition: function(record, header) { return new Ext.grid.CellContext(this).setPosition(record, header); }, onDestroy: function() { var me = this, features = me.featuresMC, len, i; if (features) { for (i = 0, len = features.getCount(); i < len; ++i) { features.getAt(i).destroy(); } } me.cellFly = me.featuresMC = null; me.callParent(arguments); }, // Private. // Respond to store replace event which is fired by GroupStore group expand/collapse operations. // This saves a layout because a remove and add operation are coalesced in this operation. onReplace: function(store, startIndex, oldRecords, newRecords) { var me = this, bufferedRenderer = me.bufferedRenderer; // If there's a buffered renderer and the removal range falls inside the current view... if (me.rendered && bufferedRenderer) { bufferedRenderer.onReplace(store, startIndex, oldRecords, newRecords); } else { me.callParent(arguments); } me.setPendingStripe(startIndex); }, // after adding a row stripe rows from then on onAdd: function(store, records, index) { var me = this, bufferedRenderer = me.bufferedRenderer; if (me.rendered && bufferedRenderer) { bufferedRenderer.onReplace(store, index, [], records); } else { me.callParent(arguments); } me.setPendingStripe(index); }, // after removing a row stripe rows from then on onRemove: function(store, records, index) { var me = this, bufferedRenderer = me.bufferedRenderer; // If there's a BufferedRenderer... if (me.rendered && bufferedRenderer) { bufferedRenderer.onReplace(store, index, records, []); } else { me.callParent(arguments); } me.setPendingStripe(index); }, // When there's a buffered renderer present, store refresh events cause TableViews to go to scrollTop:0 onDataRefresh: function() { var me = this, owner = me.ownerCt; // If triggered during an animation, refresh once we're done if (owner && owner.isCollapsingOrExpanding === 2) { owner.on('expand', me.onDataRefresh, me, {single: true}); return; } me.callParent(); }, getViewRange: function() { var me = this; if (me.bufferedRenderer) { return me.bufferedRenderer.getViewRange(); } return me.callParent(); }, setPendingStripe: function(index) { var current = this.stripeOnUpdate; if (current === null) { current = index; } else { current = Math.min(current, index); } this.stripeOnUpdate = current; }, onEndUpdate: function() { var me = this, stripeOnUpdate = me.stripeOnUpdate, startIndex = me.all.startIndex; if (me.rendered && (stripeOnUpdate || stripeOnUpdate === 0)) { if (stripeOnUpdate < startIndex) { stripeOnUpdate = startIndex; } me.doStripeRows(stripeOnUpdate); me.stripeOnUpdate = null; } me.callParent(arguments); }, /** * Stripes rows from a particular row index. * @param {Number} startRow * @param {Number} [endRow] argument specifying the last row to process. * By default process up to the last row. * @private */ doStripeRows: function(startRow, endRow) { var me = this, rows, rowsLn, i, row; // ensure stripeRows configuration is turned on if (me.rendered && me.stripeRows) { rows = me.getNodes(startRow, endRow); for (i = 0, rowsLn = rows.length; i < rowsLn; i++) { row = rows[i]; // Remove prior applied row classes. row.className = row.className.replace(me.rowClsRe, ' '); startRow++; // Every odd row will get an additional cls if (startRow % 2 === 0) { row.className += (' ' + me.altRowCls); } } } }, hasActiveFeature: function(){ return (this.isGrouping && this.store.isGrouped()) || this.isRowWrapped; }, getCellPaddingAfter: function(cell) { return Ext.fly(cell).getPadding('r'); }, privates: { refreshScroll: function () { var me = this, bufferedRenderer = me.bufferedRenderer; // If there is a BufferedRenderer, we must refresh the scroller using BufferedRenderer methods // which take account of the full virtual scroll range. if (bufferedRenderer) { bufferedRenderer.refreshSize(); } else { me.callParent(); } } } });
docs/app/Examples/modules/Embed/Variations/EmbedExampleAspectRatio.js
Rohanhacker/Semantic-UI-React
import React from 'react' import { Embed } from 'semantic-ui-react' const EmbedExampleAspectRatio = () => ( <Embed aspectRatio='4:3' id='HTZudKi36bo' placeholder='http://semantic-ui.com/images/4by3.jpg' source='youtube' /> ) export default EmbedExampleAspectRatio
test/control-component-spec.js
davidkpiano/redux-simple-form
/* eslint react/no-multi-comp:0 react/jsx-no-bind:0 */ import { assert } from 'chai'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-dom/test-utils'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import sinon from 'sinon'; import capitalize from '../src/utils/capitalize'; import _get from 'lodash.get'; import toPath from 'lodash.topath'; import i from 'icepick'; import Immutable from 'immutable'; import { testCreateStore, testRender } from './utils'; import { controls as _controls, modelReducer as _modelReducer, formReducer as _formReducer, Control as _Control, actions as _actions, combineForms as _combineForms, } from '../src'; import { controls as immutableControls, modelReducer as immutableModelReducer, formReducer as immutableFormReducer, Control as immutableControl, actions as immutableActions, combineForms as immutableCombineForms, } from '../immutable'; const testContexts = { standard: { controls: _controls, modelReducer: _modelReducer, formReducer: _formReducer, Control: _Control, actions: _actions, object: {}, get: _get, set: (state, path, value) => i.setIn(state, path, value), getInitialState: (state) => state, combineForms: _combineForms, }, immutable: { controls: immutableControls, modelReducer: immutableModelReducer, formReducer: immutableFormReducer, Control: immutableControl, actions: immutableActions, object: new Immutable.Map(), get: (value, path) => { const result = value.getIn(toPath(path)); try { return result.toJS(); } catch (e) { return result; } }, set: (state, path, value) => state.setIn(path, value), getInitialState: (state) => Immutable.fromJS(state), combineForms: immutableCombineForms, }, }; Object.keys(testContexts).forEach((testKey) => { const testContext = testContexts[testKey]; const controls = testContext.controls; const modelReducer = testContext.modelReducer; const formReducer = testContext.formReducer; const Control = testContext.Control; const actions = testContext.actions; const object = testContext.object; const get = testContext.get; const getInitialState = testContext.getInitialState; const combineForms = testContext.combineForms; describe(`<Control> component (${testKey} context)`, () => { describe('existence check', () => { it('should exist', () => { assert.ok(Control); }); }); describe('basic functionality', () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ testForm: formReducer('test'), test: modelReducer('test', initialState), }); const form = TestUtils.renderIntoDocument( <Provider store={store}> <Control model="test.foo" mapProps={controls.text} component="input" /> </Provider> ); const input = TestUtils.findRenderedDOMComponentWithTag(form, 'input'); it('should work as expected with a model (happy path)', () => { assert.ok(input); assert.equal(input.value, 'bar'); }); it('should handle changes properly', () => { input.value = 'new'; TestUtils.Simulate.change(input); assert.equal(get(store.getState().test, 'foo'), 'new'); }); }); describe('render prop', () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const callback = sinon.spy(() => ( <div /> )); TestUtils.renderIntoDocument( <Provider store={store}> <Control model="test.foo" render={callback} /> </Provider> ); const renderPropObject = callback.args[0][0]; it('should call render callback with an object containing all relevant properties', () => { assert.equal(renderPropObject.viewValue, 'bar'); assert.equal(renderPropObject.modelValue, 'bar'); assert.deepEqual(renderPropObject.fieldValue, store.getState().testForm.foo); assert.property(renderPropObject, 'onFocus'); assert.property(renderPropObject, 'onBlur'); assert.property(renderPropObject, 'onChange'); assert.property(renderPropObject, 'onKeyPress'); }); }); describe('onLoad prop', () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const handleLoad = sinon.spy(); const form = TestUtils.renderIntoDocument( <Provider store={store}> <Control model="test.foo" mapProps={controls.text} component="input" onLoad={handleLoad} /> </Provider> ); const input = TestUtils.findRenderedDOMComponentWithTag(form, 'input'); it('should call the onLoad function', () => { assert.ok(handleLoad.calledOnce); assert.equal(handleLoad.args[0][0], 'bar'); assert.containSubset(handleLoad.args[0][1], { initialValue: 'bar', }); assert.instanceOf(handleLoad.args[0][2], window.HTMLInputElement); assert.equal(handleLoad.args[0][2], input); }); }); }); describe('Extended Control components', () => { const textFieldElements = [ [''], ['text'], ['password'], ['text', 'email'], ['input', 'text'], ['input', 'password'], ['input', 'number'], ['input', 'color'], ['textarea'], ]; textFieldElements.forEach(([controlType, type]) => { describe(`with <Control.${controlType}> ${type ? `and type="${type}"` : ''}`, () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ testForm: formReducer('test'), test: modelReducer('test', initialState), }); const TestControl = Control[controlType] || Control; const field = TestUtils.renderIntoDocument( <Provider store={store}> <TestControl model="test.foo" type={type} /> </Provider> ); const node = TestUtils.findRenderedDOMComponentWithTag(field, controlType === 'textarea' ? 'textarea' : 'input'); it('should have an initial value from the model\'s initialState', () => { assert.equal( node.value, 'bar'); }); it('should dispatch a focus event when focused', () => { TestUtils.Simulate.focus(node); assert.containSubset( store.getState().testForm.foo, { focus: true }); }); it('should dispatch a blur event when blurred', () => { TestUtils.Simulate.blur(node); assert.containSubset( store.getState().testForm.foo, { focus: false }); }); it('should dispatch a change event when changed', () => { node.value = 'testing'; TestUtils.Simulate.change(node); assert.equal( get(store.getState().test, 'foo'), 'testing'); node.value = 'testing again'; TestUtils.Simulate.change(node); assert.equal( get(store.getState().test, 'foo'), 'testing again'); }); if ((controlType === 'text' || controlType === 'password') && !type) { it(`should have a type="${controlType}"`, () => { assert.equal(node.getAttribute('type'), controlType); }); } else { it('should have the appropriate type attribute', () => { assert.equal(node.getAttribute('type'), type); }); } }); }); describe('with <Control.radio />', () => { const initialState = getInitialState({ foo: 'two' }); const store = testCreateStore({ testForm: formReducer('test'), test: modelReducer('test', initialState), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <div> <Control.radio model="test.foo" value="one" /> <Control.radio model="test.foo" value="two" /> </div> </Provider> ); const [radioOne, radioTwo] = TestUtils.scryRenderedDOMComponentsWithTag(field, 'input'); it('should initially set the radio button matching the initial state to checked', () => { assert.equal(radioTwo.checked, true); assert.equal(radioOne.checked, false); }); it('should give each radio input a name attribute of the model', () => { assert.equal(radioOne.name, 'test.foo'); assert.equal(radioTwo.name, 'test.foo'); }); it('should dispatch a change event when changed', () => { TestUtils.Simulate.change(radioOne); assert.equal( get(store.getState().test, 'foo'), 'one'); TestUtils.Simulate.change(radioTwo); assert.equal( get(store.getState().test, 'foo'), 'two'); }); it('should check the appropriate radio button when model is externally changed', () => { store.dispatch(actions.change('test.foo', 'one')); assert.equal(radioOne.checked, true); assert.equal(radioTwo.checked, false); store.dispatch(actions.change('test.foo', 'two')); assert.equal(radioTwo.checked, true); assert.equal(radioOne.checked, false); }); it('should uncheck all radio buttons that are not equal to the value', () => { store.dispatch(actions.change('test.foo', 'three')); assert.equal(radioOne.checked, false); assert.equal(radioTwo.checked, false); }); }); describe('with <Control.checkbox /> (single toggle)', () => { const initialState = getInitialState({ single: true }); const store = testCreateStore({ testForm: formReducer('test'), test: modelReducer('test', initialState), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.checkbox model="test.single" /> </Provider> ); const checkbox = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); it('should initially set the checkbox to checked if the model is truthy', () => { assert.equal(checkbox.checked, true); }); it('should give each radio input a name attribute of the model', () => { assert.equal(checkbox.name, 'test.single'); }); it('should dispatch a change event when changed', () => { TestUtils.Simulate.change(checkbox); assert.equal( get(store.getState().test, 'single'), false, 'false'); assert.equal(checkbox.checked, false); TestUtils.Simulate.change(checkbox); assert.equal( get(store.getState().test, 'single'), true, 'true'); assert.equal(checkbox.checked, true); }); it('should check/uncheck the checkbox when model is externally changed', () => { store.dispatch(actions.change('test.single', true)); assert.equal(checkbox.checked, true); store.dispatch(actions.change('test.single', false)); assert.equal(checkbox.checked, false); }); it('should uncheck the checkbox for any falsey value', () => { store.dispatch(actions.change('test.single', '')); assert.equal(checkbox.checked, false); }); }); describe('with <Control.checkbox /> (single toggle, dynamic form, defaultChecked)', () => { const initialState = getInitialState({ single: true }); const store = testCreateStore({ testForm: formReducer('test'), test: modelReducer('test', initialState), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.checkbox model="test.other" defaultChecked /> </Provider> ); const checkbox = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); it('should initially set the checkbox to checked when defaultChecked is true', () => { assert.equal(checkbox.checked, true); }); it('should give each radio input a name attribute of the model', () => { assert.equal(checkbox.name, 'test.other'); }); it('should dispatch a change event when changed', () => { TestUtils.Simulate.change(checkbox); assert.equal( get(store.getState().test, 'other'), false, 'false'); assert.equal(checkbox.checked, false); TestUtils.Simulate.change(checkbox); assert.equal( get(store.getState().test, 'other'), true, 'true'); assert.equal(checkbox.checked, true); }); it('should check/uncheck the checkbox when model is externally changed', () => { store.dispatch(actions.change('test.other', true)); assert.equal(checkbox.checked, true); store.dispatch(actions.change('test.other', false)); assert.equal(checkbox.checked, false); }); it('should uncheck the checkbox for any falsey value', () => { store.dispatch(actions.change('test.other', '')); assert.equal(checkbox.checked, false); }); }); describe('with <Control.checkbox /> (single toggle, dynamic form, !defaultChecked)', () => { const initialState = getInitialState({ single: true }); const store = testCreateStore({ testForm: formReducer('test'), test: modelReducer('test', initialState), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.checkbox model="test.other" defaultChecked={false} /> </Provider> ); const checkbox = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); it('should initially set the checkbox to unchecked when defaultChecked is false', () => { assert.equal(checkbox.checked, false); }); it('should give each radio input a name attribute of the model', () => { assert.equal(checkbox.name, 'test.other'); }); it('should dispatch a change event when changed', () => { TestUtils.Simulate.change(checkbox); assert.equal( get(store.getState().test, 'other'), true, 'true'); TestUtils.Simulate.change(checkbox); assert.equal( get(store.getState().test, 'other'), false, 'false'); }); it('should check/uncheck the checkbox when model is externally changed', () => { store.dispatch(actions.change('test.other', false)); assert.equal(checkbox.checked, false); store.dispatch(actions.change('test.other', true)); assert.equal(checkbox.checked, true); }); it('should uncheck the checkbox for any falsey value', () => { store.dispatch(actions.change('test.other', '')); assert.equal(checkbox.checked, false); }); }); describe('with <Control.checkbox /> (multi toggle)', () => { const initialState = getInitialState({ foo: [1] }); const store = testCreateStore({ testForm: formReducer('test'), test: modelReducer('test', initialState), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <div> <Control.checkbox model="test.foo[]" value={1} /> <Control.checkbox model="test.foo[]" value={2} /> <Control.checkbox model="test.foo[]" value={3} /> </div> </Provider> ); const checkboxes = TestUtils.scryRenderedDOMComponentsWithTag(field, 'input'); it('should initially set the checkbox to checked if the model is truthy', () => { assert.equal(checkboxes[0].checked, true); }); it('should give each checkbox a name attribute of the model', () => { checkboxes.forEach(checkbox => { assert.equal(checkbox.name, 'test.foo[]'); }); }); it('should dispatch a change event when changed', () => { TestUtils.Simulate.change(checkboxes[0]); assert.sameMembers( get(store.getState().test, 'foo'), [], 'all unchecked'); TestUtils.Simulate.change(checkboxes[1]); assert.sameMembers( get(store.getState().test, 'foo'), [2], 'one checked'); TestUtils.Simulate.change(checkboxes[0]); assert.sameMembers( get(store.getState().test, 'foo'), [1, 2], 'two checked'); TestUtils.Simulate.change(checkboxes[2]); assert.sameMembers( get(store.getState().test, 'foo'), [1, 2, 3], 'all checked'); TestUtils.Simulate.change(checkboxes[0]); assert.sameMembers( get(store.getState().test, 'foo'), [2, 3], 'one unchecked'); }); it('should check the appropriate checkboxes when model is externally changed', () => { store.dispatch(actions.change('test.foo', [1, 2])); assert.isTrue(checkboxes[0].checked); assert.isTrue(checkboxes[1].checked); assert.isFalse(checkboxes[2].checked); }); }); describe('with <Control.checkbox /> (custom onChange)', () => { const initialState = getInitialState({ foo: true }); const store = testCreateStore({ testForm: formReducer('test'), test: modelReducer('test', initialState), }); const handleOnChange = sinon.spy((e) => e); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.checkbox model="test.foo" onChange={handleOnChange} /> </Provider> ); const checkbox = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); TestUtils.Simulate.change(checkbox); it('should call the custom onChange event handler', () => { assert.ok(handleOnChange.calledOnce); }); it('should update the state as expected', () => { assert.isFalse(get(store.getState().test, 'foo')); }); }); describe('with <Control.file />', () => { it('should update with an array of files', () => { const initialState = getInitialState({ foo: [] }); const store = testCreateStore({ testForm: formReducer('test'), test: modelReducer('test', initialState), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.file model="test.foo" /> </Provider> ); const input = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); TestUtils.Simulate.change(input, { target: { type: 'file', files: [ { name: 'first.jpg' }, { name: 'second.jpg' }, ], }, }); assert.deepEqual( get(store.getState().test, 'foo'), [ { name: 'first.jpg' }, { name: 'second.jpg' }, ]); }); }); describe('with <Control.select />', () => { const initialState = getInitialState({ foo: 'one' }); const store = testCreateStore({ testForm: formReducer('test'), test: modelReducer('test', initialState), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.select model="test.foo"> <option value="one" /> <option value="two" /> <option value="three" /> <optgroup> <option value="four" /> <option value="five" /> <option value="six" /> </optgroup> </Control.select> </Provider> ); const select = TestUtils.findRenderedDOMComponentWithTag(field, 'select'); const options = TestUtils.scryRenderedDOMComponentsWithTag(field, 'option'); it('should select the option that matches the initial state of the model', () => { assert.isTrue(options[0].selected); assert.isFalse(options[1].selected); assert.equal(select.value, 'one'); }); it('should dispatch a change event when changed', () => { TestUtils.Simulate.change(options[1]); assert.equal( get(store.getState().test, 'foo'), 'two'); }); it('should select the appropriate <option> when model is externally changed', () => { store.dispatch(actions.change('test.foo', 'three')); assert.isTrue(options[2].selected); assert.equal(select.value, 'three'); }); it('should work with <optgroup>', () => { TestUtils.Simulate.change(options[3]); assert.isTrue(options[3].selected); assert.equal( get(store.getState().test, 'foo'), 'four'); }); }); describe('ignoring events with ignore prop', () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const control = testRender( <Control.text model="test.foo" ignore={['focus', 'blur']} />, store); const input = TestUtils.findRenderedDOMComponentWithTag(control, 'input'); it('ignores the events specified in the ignore prop', () => { assert.isFalse(store.getState().testForm.foo.focus); TestUtils.Simulate.focus(input); assert.isFalse(store.getState().testForm.foo.focus, 'focus event should be ignored'); TestUtils.Simulate.blur(input); assert.isFalse(store.getState().testForm.foo.touched, 'blur event should be ignored'); }); }); describe('validators and validateOn property', () => { const initialState = getInitialState({ foo: '', blur: '', external: '', }); const store = testCreateStore({ testForm: formReducer('test'), test: modelReducer('test', initialState), }); it('should set the proper field state for validation', () => { const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" validators={{ good: () => true, bad: () => false, custom: val => val !== 'invalid', }} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); control.value = 'valid'; TestUtils.Simulate.change(control); assert.deepEqual( store.getState().testForm.foo.errors, { good: false, bad: true, custom: false, }); control.value = 'invalid'; TestUtils.Simulate.change(control); assert.deepEqual( store.getState().testForm.foo.errors, { good: false, bad: true, custom: true, }); }); it('should validate on blur when validateOn prop is "blur"', () => { let timesValidationCalled = 0; const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.blur" validators={{ good: () => true, bad: () => false, custom: (val) => { timesValidationCalled += 1; return val !== 'invalid'; }, }} validateOn="blur" /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); control.value = 'valid'; assert.equal(timesValidationCalled, 1, 'validation should only be called once upon load'); TestUtils.Simulate.change(control); assert.equal(timesValidationCalled, 1, 'validation should not be called upon change'); TestUtils.Simulate.blur(control); assert.equal(timesValidationCalled, 2, 'validation should be called upon blur'); assert.deepEqual( store.getState().testForm.blur.errors, { good: false, bad: true, custom: false, }, 'should only validate upon blur'); }); it('should validate on external change', () => { let timesValidationCalled = 0; TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.external" validators={{ required: (val) => { timesValidationCalled += 1; return val && val.length; }, }} /> </Provider> ); assert.equal(timesValidationCalled, 1, 'validation called on load'); assert.isFalse(store.getState().testForm.external.valid); store.dispatch(actions.change('test.external', 'valid')); assert.isTrue(store.getState().testForm.external.valid); assert.equal(timesValidationCalled, 2, 'validation called because of external change'); }); }); describe('validateOn != updateOn', () => { const initialState = { foo: 'one', }; const radioStore = testCreateStore({ testForm: formReducer('test', initialState), test: modelReducer('test', initialState), }); const app = TestUtils.renderIntoDocument( <Provider store={radioStore}> <Control.radio model="test.foo" value="two" validateOn="focus" validators={{ isOne: (val) => val === 'one', }} /> </Provider> ); const input = TestUtils.findRenderedDOMComponentWithTag(app, 'input'); it('should initially be valid', () => { assert.isTrue(radioStore.getState().testForm.foo.valid); }); it('should still be valid after focusing', () => { TestUtils.Simulate.focus(input); assert.isTrue(radioStore.getState().testForm.foo.valid); assert.isTrue(radioStore.getState().testForm.foo.focus); }); }); describe('asyncValidators and asyncValidateOn property', () => { const reducer = formReducer('test'); const store = testCreateStore({ testForm: reducer, test: modelReducer('test', object), }); it('should set the proper field state for a valid async validation', done => { const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" asyncValidators={{ testValid: (val, _done) => setTimeout(() => _done(true), 10), }} asyncValidateOn="blur" /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); const expectedStates = [ (state) => state.focus === false, // initially valid (state) => state.validating === true && state.valid, // true after validating (state) => state.validating === false && state.valid, ]; const actualStates = []; store.subscribe(() => { const state = store.getState(); actualStates.push(state.testForm.foo); if (actualStates.length === expectedStates.length) { expectedStates.map((expectedFn, index) => assert.ok(expectedFn(actualStates[index]), `${index}`) ); done(); } }); TestUtils.Simulate.blur(control); }); it('should set the proper field state for an invalid async validation', done => { const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" asyncValidators={{ testValid: (val, _done) => setTimeout(() => _done(false), 10), }} asyncValidateOn="blur" /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); const expectedStates = [ (state) => state.focus === false, // initially valid (state) => state.validating === true && state.valid, // false after validating (state) => state.validating === false && !state.valid, ]; const actualStates = []; store.subscribe(() => { const state = store.getState(); actualStates.push(state.testForm.foo); if (actualStates.length === expectedStates.length) { expectedStates.map((expectedFn, index) => assert.ok(expectedFn(actualStates[index]), `${index}`) ); done(); } }); TestUtils.Simulate.blur(control); }); }); describe('sync and async validators', () => { const reducer = formReducer('test'); const store = testCreateStore({ testForm: reducer, test: modelReducer('test', object), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <div> <Control.text model="test.foo" validators={{ required: (val) => val && val.length, }} asyncValidators={{ asyncValid: (_, asyncDone) => asyncDone(false), }} /> <Control.text model="test.bar" validators={{ required: (val) => val && val.length, }} asyncValidators={{ asyncValid: (_, asyncDone) => asyncDone(false), }} validateOn="change" asyncValidateOn="change" /> </div> </Provider> ); const [input, concurrentInput] = TestUtils.scryRenderedDOMComponentsWithTag(field, 'input'); it('async validation should not run when field is invalid', () => { input.value = ''; TestUtils.Simulate.change(input); TestUtils.Simulate.blur(input); assert.deepEqual( store.getState().testForm.foo.validity, { required: false, }); assert.isUndefined(store.getState().testForm.foo.validity.asyncValid); }); it('async validation should run on invalid field ' + 'when concurrent with sync validation', () => { concurrentInput.value = ''; TestUtils.Simulate.change(concurrentInput); assert.deepEqual( store.getState().testForm.bar.validity, { required: false, asyncValid: false, }); assert.isDefined(store.getState().testForm.bar.validity.asyncValid); concurrentInput.value = 'changed'; TestUtils.Simulate.change(concurrentInput); assert.deepEqual( store.getState().testForm.bar.validity, { required: true, asyncValid: false, }); concurrentInput.value = ''; TestUtils.Simulate.change(concurrentInput); assert.deepEqual( store.getState().testForm.bar.validity, { required: false, asyncValid: false, }); }); it('async validation should not override sync validity', () => { input.value = 'asdf'; TestUtils.Simulate.change(input); TestUtils.Simulate.blur(input); assert.isDefined(store.getState().testForm.foo.validity.asyncValid); assert.deepEqual( store.getState().testForm.foo.validity, { required: true, asyncValid: false, }); }); }); describe('simultaneous sync and async validation', () => { it('should execute sync and async validation simultaneously' + ' if specified', () => { const initialState = getInitialState({ foo: '' }); const reducer = formReducer('test'); const store = testCreateStore({ testForm: reducer, test: modelReducer('test', initialState), }); const syncValid = () => true; const asyncValid = () => true; const syncValidSpy = sinon.spy(syncValid); const asyncValidSpy = sinon.spy(asyncValid); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" validators={{ syncValidSpy }} validateOn="change" asyncValidators={{ asyncValidSpy }} asyncValidateOn="change" /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); control.value = 'testing'; TestUtils.Simulate.change(control); assert.isTrue(syncValidSpy.called); assert.isTrue(asyncValidSpy.called); }); it('should execute sync and async validation simultaneously' + ' if specified (with default validateOn)', () => { const initialState = getInitialState({ foo: '' }); const reducer = formReducer('test'); const store = testCreateStore({ testForm: reducer, test: modelReducer('test', initialState), }); const syncValid = () => true; const asyncValid = () => true; const syncValidSpy = sinon.spy(syncValid); const asyncValidSpy = sinon.spy(asyncValid); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" validators={{ syncValidSpy }} asyncValidators={{ asyncValidSpy }} asyncValidateOn="change" /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); control.value = 'testing'; TestUtils.Simulate.change(control); assert.isTrue(syncValidSpy.called); assert.isTrue(asyncValidSpy.called); }); }); describe('validation after reset', () => { const initialState = getInitialState({ foo: '' }); const reducer = formReducer('test'); const store = testCreateStore({ testForm: reducer, test: modelReducer('test', initialState), }); TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" validators={{ required: (val) => val && val.length, }} /> </Provider> ); it('should initially be invalid', () => { assert.deepEqual( store.getState().testForm.foo.validity, { required: false, }); }); it('should still be invalid after resetting the form model', () => { store.dispatch(actions.reset('test')); assert.deepEqual( store.getState().testForm.foo.validity, { required: false, }); }); it('should still be invalid after resetting the field model', () => { store.dispatch(actions.reset('test.foo')); assert.deepEqual( store.getState().testForm.foo.validity, { required: false, }); }); }); describe('initial value after reset', () => { const initialState = getInitialState({ foo: '' }); const store = testCreateStore({ testForm: formReducer('test', initialState), test: modelReducer('test', initialState), }); it('should reset the control to the last loaded value', () => { TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" /> </Provider> ); store.dispatch(actions.load('test.foo', 'new foo')); store.dispatch(actions.reset('test.foo')); assert.equal(get(store.getState().test, 'foo'), 'new foo'); }); const onEvents = [ 'change', 'focus', 'blur', ]; onEvents.forEach((updateOn) => { onEvents.forEach((validateOn) => { const condition = `updateOn="${updateOn}", validateOn="${validateOn}"`; it(`should clear reset intent when ${condition}`, () => { TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" updateOn={updateOn} validateOn={validateOn} /> </Provider> ); store.dispatch(actions.reset('test.foo')); const hasResetIntent = store.getState().testForm.foo.intents .some(intent => intent.type === 'reset'); assert.equal(hasResetIntent, false, 'has no pending reset intents'); }); }); }); }); describe('deep initial value after reset', () => { const initialState = getInitialState({ nest: { name: 'initial name', email: 'initial email', }, }); const store = createStore(combineForms({ user: initialState, })); TestUtils.renderIntoDocument( <Provider store={store}> <div> <Control.text model="user.nest.name" /> <Control.text type="email" model="user.nest.email" /> </div> </Provider> ); it('should reset the control to the last deeply loaded value', () => { store.dispatch(actions.load('user', getInitialState({ nest: { name: 'loaded name', email: 'loaded email', }, }))); store.dispatch(actions.reset('user.nest')); assert.equal(get(store.getState().user, 'nest.name'), 'loaded name'); assert.equal(get(store.getState().user, 'nest.email'), 'loaded email'); }); }); describe('errors property', () => { const reducer = formReducer('test'); it('should set the proper field state for errors', () => { const initialState = getInitialState({ foo: '' }); const store = testCreateStore({ testForm: reducer, test: modelReducer('test', initialState), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" errors={{ length: (val) => val.length > 8 && 'too long', valid: (val) => val !== 'valid' && 'not valid', }} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); control.value = 'valid'; TestUtils.Simulate.change(control); assert.deepEqual( store.getState().testForm.foo.errors, { length: false, valid: false, }); control.value = 'invalid string'; TestUtils.Simulate.change(control); assert.deepEqual( store.getState().testForm.foo.errors, { length: 'too long', valid: 'not valid', }); }); it('should only validate errors on blur if validateOn="blur"', () => { const initialState = getInitialState({ foo: '' }); const store = testCreateStore({ testForm: reducer, test: modelReducer('test', initialState), }); let timesValidationCalled = 0; const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" errors={{ length: (val) => val.length > 8 && 'too long', valid: (val) => { timesValidationCalled += 1; return val !== 'valid' && 'not valid'; }, }} validateOn="blur" required /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); assert.equal(timesValidationCalled, 1, 'validation should be called on load'); control.value = 'valid'; TestUtils.Simulate.change(control); assert.equal(timesValidationCalled, 1, 'validation should not be called again on change'); TestUtils.Simulate.blur(control); assert.equal(timesValidationCalled, 2, 'validation should be called again on blur'); assert.deepEqual( store.getState().testForm.foo.errors, { length: false, valid: false, }); control.value = 'invalid string'; TestUtils.Simulate.change(control); assert.deepEqual( store.getState().testForm.foo.errors, { length: false, valid: false, }); TestUtils.Simulate.blur(control); assert.deepEqual( store.getState().testForm.foo.errors, { length: 'too long', valid: 'not valid', }); }); it('should handle a validator function for errors', () => { const initialState = getInitialState({ foo: '' }); const store = testCreateStore({ testForm: reducer, test: modelReducer('test', initialState), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" errors={(val) => !val && !val.length && 'Required'} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); assert.equal( store.getState().testForm.foo.errors, 'Required'); control.value = 'valid'; TestUtils.Simulate.change(control); assert.deepEqual( store.getState().testForm.foo.errors, false); }); }); describe('dynamic components', () => { const reducer = formReducer('test'); const store = testCreateStore({ testForm: reducer, test: modelReducer('test', object), }); class DynamicSelectForm extends React.Component { constructor() { super(); this.state = { options: [1, 2] }; } render() { return ( <div> <button onClick={() => this.setState({ options: [1, 2, 3] })} /> <Control.select model="test.foo" dynamic> {this.state.options.map((option, index) => <option key={index} value={option} /> )} </Control.select> </div> ); } } it('should properly update dynamic components inside <Field>', () => { const field = TestUtils.renderIntoDocument( <Provider store={store}> <DynamicSelectForm /> </Provider> ); let options = TestUtils.scryRenderedDOMComponentsWithTag(field, 'option'); const button = TestUtils.findRenderedDOMComponentWithTag(field, 'button'); assert.equal(options.length, 2); TestUtils.Simulate.click(button); options = TestUtils.scryRenderedDOMComponentsWithTag(field, 'option'); assert.equal(options.length, 3); }); }); describe('dynamic model', () => { const initialState = getInitialState({ foo: 'initial', bar: 'initial', }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test'), }); class DynamicModelControl extends React.Component { constructor() { super(); this.state = { model: 'foo' }; } render() { const { model } = this.state; return ( <div> <button onClick={() => this.setState({ model: 'bar' })} /> <Control.text model={`test.${model}`} /> </div> ); } } it('updates the proper field on change', () => { const field = TestUtils.renderIntoDocument( <Provider store={store}> <DynamicModelControl /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); const button = TestUtils.findRenderedDOMComponentWithTag(field, 'button'); control.value = 'value1'; TestUtils.Simulate.change(control); TestUtils.Simulate.click(button); control.value = 'value2'; TestUtils.Simulate.change(control); assert.equal(get(store.getState().test, 'foo'), 'value1'); assert.equal(get(store.getState().test, 'bar'), 'value2'); }); it('updates the proper form state of field on focus/blur', () => { const field = TestUtils.renderIntoDocument( <Provider store={store}> <DynamicModelControl /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); const button = TestUtils.findRenderedDOMComponentWithTag(field, 'button'); TestUtils.Simulate.focus(control); assert.equal(store.getState().testForm.foo.focus, true); assert.equal(store.getState().testForm.bar.focus, false); TestUtils.Simulate.blur(control); assert.equal(store.getState().testForm.foo.focus, false); assert.equal(store.getState().testForm.bar.focus, false); TestUtils.Simulate.click(button); TestUtils.Simulate.focus(control); assert.equal(store.getState().testForm.foo.focus, false, 'Second field should be focused instead, we switched the model'); assert.equal(store.getState().testForm.bar.focus, true); TestUtils.Simulate.blur(control); assert.equal(store.getState().testForm.foo.focus, false); assert.equal(store.getState().testForm.bar.focus, false); }); }); describe('updateOn prop', () => { const onEvents = [ 'change', 'focus', 'blur', ]; onEvents.forEach((onEvent) => { const initialState = getInitialState({ foo: 'initial' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test'), }); it(`should update the store when updateOn="${onEvent}"`, () => { const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" updateOn={onEvent} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); assert.equal(get(store.getState().test, 'foo'), 'initial'); const testValue = `${onEvent} test`; control.value = testValue; assert.equal(get(store.getState().test, 'foo'), 'initial', 'Model value should not change yet'); TestUtils.Simulate[onEvent](control); assert.equal(get(store.getState().test, 'foo'), testValue); }); }); }); describe('validation on load', () => { const initialState = getInitialState({ foo: 'invalid' }); const reducer = formReducer('test'); const store = testCreateStore({ testForm: reducer, test: modelReducer('test', initialState), }); it('should always validate the model initially', () => { TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" validators={{ initial: (val) => val !== 'invalid', }} /> </Provider> ); assert.containSubset( store.getState().testForm.foo, { validity: { initial: false, }, errors: { initial: true, }, }); assert.isFalse(store.getState().testForm.foo.valid); }); }); describe('syncing control defaultValue on load', () => { const initialState = getInitialState({ foo: '' }); const reducer = modelReducer('test', initialState); const store = testCreateStore({ test: reducer, testForm: formReducer('test'), }); it('should change the model to the defaultValue on load', () => { TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" defaultValue="testing" /> </Provider> ); assert.equal( get(store.getState().test, 'foo'), 'testing'); }); }); describe('change on enter', () => { it('should change the model upon pressing Enter', () => { const reducer = modelReducer('test'); const store = testCreateStore({ test: reducer, testForm: formReducer('test'), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" updateOn="blur" /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); control.value = 'testing'; TestUtils.Simulate.keyPress(control, { key: 'Enter', keyCode: 13, which: 13, }); assert.equal( get(store.getState().test, 'foo'), 'testing'); }); it('should validate the model upon pressing Enter', () => { const reducer = modelReducer('test'); const store = testCreateStore({ test: reducer, testForm: formReducer('test'), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" updateOn="blur" validators={{ isNotBar: v => v !== 'bar', }} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); control.value = 'bar'; TestUtils.Simulate.keyPress(control, { key: 'Enter', keyCode: 13, which: 13, }); assert.equal( get(store.getState().test, 'foo'), 'bar'); assert.deepEqual( store.getState().testForm.foo.errors, { isNotBar: true }); assert.isFalse(store.getState().testForm.foo.valid); }); it('should not change blur-updated textareas upon pressing Enter', () => { const reducer = modelReducer('test'); const store = testCreateStore({ test: reducer, testForm: formReducer('test'), }); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.textarea model="test.foo" updateOn="blur" /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'textarea'); control.value = 'testing'; TestUtils.Simulate.keyPress(control, { key: 'Enter', keyCode: 13, which: 13, }); assert.isUndefined( get(store.getState().test, 'foo')); }); }); describe('handling onKeyPress', () => { const eventData = { key: 'a', keyCode: 65, which: 65, }; const reducer = modelReducer('test'); const store = testCreateStore({ test: reducer, testForm: formReducer('test'), }); it('should pass keyPress events to onKeyPress', (done) => { function handleKeyPress(event) { assert.containSubset(event, eventData); done(); } const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" onKeyPress={handleKeyPress} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); TestUtils.Simulate.keyPress(control, eventData); }); }); describe('changeAction prop', () => { const initialState = getInitialState({ foo: '', checked: false, }); const reducer = modelReducer('test', initialState); const store = testCreateStore({ test: reducer, testForm: formReducer('test'), }); it('should execute the custom change action', () => { let customChanged = false; const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" changeAction={(model, value) => { customChanged = true; return actions.change(model, value); }} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); control.value = 'testing'; TestUtils.Simulate.change(control); assert.isTrue(customChanged); assert.equal( get(store.getState().test, 'foo'), 'testing'); }); it('should execute the custom change action (checkbox)', () => { let customChanged = false; const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.checkbox model="test.checked" changeAction={() => { customChanged = true; }} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); TestUtils.Simulate.change(control); assert.isTrue(customChanged); }); it('should provide the inverse of the model value (checkbox)', (done) => { const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.checkbox model="test.customChecked" changeAction={(model, value) => { assert.equal(model, 'test.customChecked'); assert.equal(value, true); // initial value is false done(); }} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); TestUtils.Simulate.change(control); }); }); describe('event handlers on control', () => { const initialState = getInitialState({ foo: '', bar: '', }); const reducer = modelReducer('test', initialState); const store = testCreateStore({ test: reducer, testForm: formReducer('test'), }); it('should execute the custom change action', () => { const onChangeFn = (val) => val; const onChangeFnSpy = sinon.spy(onChangeFn); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" onChange={onChangeFnSpy} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); control.value = 'testing'; TestUtils.Simulate.change(control); assert.isTrue(onChangeFnSpy.calledOnce); assert.isObject(onChangeFnSpy.returnValues[0]); assert.equal( onChangeFnSpy.returnValues[0].constructor.name, 'SyntheticEvent'); assert.equal( onChangeFnSpy.returnValues[0].target.value, 'testing'); }); it('should not execute custom onChange functions of unchanged controls', () => { const onChangeFn = (val) => val; const onChangeFnSpy = sinon.spy(onChangeFn); const field = TestUtils.renderIntoDocument( <Provider store={store}> <div> <Control.text model="test.foo" onChange={onChangeFnSpy} /> <Control.text model="test.bar" /> </div> </Provider> ); const [_, controlBar] = TestUtils.scryRenderedDOMComponentsWithTag(field, 'input'); controlBar.value = 'testing'; TestUtils.Simulate.change(controlBar); assert.isFalse(onChangeFnSpy.called); }); it('should only execute custom onChange function pertaining to the changed input', () => { const onChangeFnFoo = (val) => val; const onChangeFnBar = (val) => val; const onChangeFnFooSpy = sinon.spy(onChangeFnFoo); const onChangeFnBarSpy = sinon.spy(onChangeFnBar); const field = TestUtils.renderIntoDocument( <Provider store={store}> <div> <Control.text model="test.foo" onChange={onChangeFnFooSpy} /> <Control.text model="test.bar" onChange={onChangeFnBarSpy} /> </div> </Provider> ); const [_, controlBar] = TestUtils.scryRenderedDOMComponentsWithTag(field, 'input'); controlBar.value = 'testing'; TestUtils.Simulate.change(controlBar); assert.isFalse(onChangeFnFooSpy.called); assert.isTrue(onChangeFnBarSpy.called); }); it('should persist and return the event even when not returned', () => { const onChangeFn = () => { }; const onChangeFnSpy = sinon.spy(onChangeFn); const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" onChange={onChangeFnSpy} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); control.value = 'testing 2'; TestUtils.Simulate.change(control); assert.isTrue(onChangeFnSpy.calledOnce); assert.isUndefined(onChangeFnSpy.returnValues[0]); assert.equal( get(store.getState().test, 'foo'), 'testing 2'); }); ['focus', 'blur'].forEach((event) => { const eventHandler = `on${capitalize(event)}`; it(`should execute the custom ${event} action`, () => { let targetValue; const onEvent = (e) => { targetValue = e.target.value; return e; }; const onEventSpy = sinon.spy(onEvent); const prop = { [eventHandler]: onEventSpy }; const field = TestUtils.renderIntoDocument( <Provider store={store}> <Control.text model="test.foo" {...prop} /> </Provider> ); const control = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); control.value = `testing ${event}`; TestUtils.Simulate[event](control); assert.isTrue(onEventSpy.calledOnce); assert.isObject(onEventSpy.returnValues[0]); assert.equal( onEventSpy.returnValues[0].constructor.name, 'SyntheticEvent'); assert.equal(targetValue, `testing ${event}`); }); }); }); describe('unmounting', () => { it('should set the validity of the model to true when umounted', () => { const initialState = getInitialState({ foo: '' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const container = document.createElement('div'); const field = ReactDOM.render( <Provider store={store}> <Control.input model="test.foo" /> </Provider>, container); const input = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); store.dispatch(actions.setValidity('test.foo', false)); assert.isFalse(store.getState().testForm.foo.valid); ReactDOM.unmountComponentAtNode(container); assert.isTrue(store.getState().testForm.foo.valid); }); it('should only reset the validity of field-specific validators', () => { const initialState = getInitialState({ foo: '' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const container = document.createElement('div'); const field = ReactDOM.render( <Provider store={store}> <Control.input model="test.foo" validators={{ internal: () => false, }} /> </Provider>, container); const input = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); assert.isFalse(store.getState().testForm.foo.valid); store.dispatch(actions.setValidity('test.foo', { ...store.getState().testForm.foo.validity, external: false, })); assert.isFalse(store.getState().testForm.foo.valid); ReactDOM.unmountComponentAtNode(container); assert.isFalse(store.getState().testForm.foo.valid); store.dispatch(actions.setValidity('test.foo', { ...store.getState().testForm.foo.validity, external: true, })); assert.isTrue(store.getState().testForm.foo.valid); }); it('should not clobber other non-field-specific validators', () => { const initialState = getInitialState({}); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); store.dispatch(actions.setValidity('test.foo', { validator: false, })); const container = document.createElement('div'); class WrappedControl extends React.Component { componentWillUnmount() { store.dispatch(actions.setErrors('test.foo', {})); } render() { return <Control.input model="test.foo" />; } } ReactDOM.render( <Provider store={store}> <WrappedControl /> </Provider>, container); assert.isFalse(store.getState().testForm.foo.validity.validator); ReactDOM.unmountComponentAtNode(container); assert.isUndefined(store.getState().testForm.foo.validity.validator); }); }); describe('with <Control.reset>', () => { it('should reset the given model', () => { const initialState = getInitialState({ foo: '' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const container = document.createElement('div'); const field = ReactDOM.render( <Provider store={store}> <div> <Control.input model="test.foo" /> <Control.reset model="test.foo" /> </div> </Provider>, container); const input = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); const reset = TestUtils.findRenderedDOMComponentWithTag(field, 'button'); input.value = 'changed'; TestUtils.Simulate.change(input); assert.equal(get(store.getState().test, 'foo'), 'changed'); TestUtils.Simulate.click(reset); assert.equal(get(store.getState().test, 'foo'), ''); }); }); describe('with <Control.button>', () => { it('should exist', () => { assert.isFunction(Control.button); }); const disabledProps = [ true, { valid: false }, (fieldValue) => !fieldValue.valid, ]; disabledProps.forEach((disabled) => { it(`should be disabled with ${typeof disabled} as disabled prop value`, () => { const initialState = getInitialState({ foo: '' }); const store = testCreateStore({ testForm: formReducer('test', initialState), }); const field = testRender( <Control.button model="test" disabled={disabled} />, store); const button = TestUtils.findRenderedDOMComponentWithTag(field, 'button'); store.dispatch(actions.setValidity('test', false)); assert.isTrue(button.disabled); if (disabled !== true) { store.dispatch(actions.setValidity('test', true)); assert.isFalse(button.disabled); } }); }); }); describe('manual focus/blur', () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const control = testRender( <Control.text model="test.foo" />, store); const input = TestUtils.findRenderedDOMComponentWithTag(control, 'input'); it('should manually focus the control', () => { store.dispatch(actions.focus('test.foo')); assert.equal(document.activeElement, input); }); xit('should manually blur the control', () => { store.dispatch(actions.focus('test.foo')); assert.equal(document.activeElement, input); store.dispatch(actions.blur('test.foo')); assert.notEqual(document.activeElement, input); }); }); describe('handling on multiple events', () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const control = testRender( <Control.text model="test.foo" updateOn={['change', 'blur']} />, store); const input = TestUtils.findRenderedDOMComponentWithTag(control, 'input'); it('should update on change', () => { input.value = 'update on change'; TestUtils.Simulate.change(input); assert.equal(get(store.getState().test, 'foo'), 'update on change'); }); it('should update on blur', () => { input.value = 'update on blur'; TestUtils.Simulate.blur(input); assert.equal(get(store.getState().test, 'foo'), 'update on blur'); }); }); describe('withField prop', () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); [undefined, true].forEach((withField) => { it('should pass the fieldValue as the second argument to event' + ` handlers ${withField ? '' : 'by default'}`, (done) => { const handleChange = (_, fieldValue) => { assert.ok(fieldValue); assert.containSubset(fieldValue, { model: 'test.foo', }); done(); }; const control = testRender( <Control.text model="test.foo" onChange={handleChange} withField={withField} />, store); const input = TestUtils.findRenderedDOMComponentWithTag( control, 'input'); TestUtils.Simulate.change(input); }); }); it('should not pass fieldValue if withField = false', (done) => { const handleChange = (_, fieldValue) => { assert.isUndefined(fieldValue); done(); }; const control = testRender( <Control.text model="test.foo" onChange={handleChange} withField={false} />, store); const input = TestUtils.findRenderedDOMComponentWithTag( control, 'input'); TestUtils.Simulate.change(input); }); }); describe('debouncing', () => { it('should not update immediately on change', (done) => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const control = testRender( <Control.text model="test.foo" debounce={10} />, store); const input = TestUtils.findRenderedDOMComponentWithTag(control, 'input'); input.value = 'debounced'; TestUtils.Simulate.change(input); assert.equal(get(store.getState().test, 'foo'), 'bar'); setTimeout(() => { assert.equal(get(store.getState().test, 'foo'), 'debounced'); done(); }, 15); // 5ms buffer to eliminate race conditions }); it('should always update viewValue immediately', () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const control = testRender( <Control.text model="test.foo" debounce={10} />, store); const input = TestUtils.findRenderedDOMComponentWithTag(control, 'input'); input.value = 'debounced'; TestUtils.Simulate.change(input); assert.equal(get(store.getState().test, 'foo'), 'bar'); assert.equal(input.value, 'debounced'); }); it('should flush debounced changes when control is unmounted', () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const container = document.createElement('div'); const control = ReactDOM.render( <Provider store={store}> <Control.text model="test.foo" debounce={1000} /> </Provider>, container); const input = TestUtils.findRenderedDOMComponentWithTag(control, 'input'); input.value = 'debounced'; TestUtils.Simulate.change(input); ReactDOM.unmountComponentAtNode(container); assert.equal(get(store.getState().test, 'foo'), 'debounced'); assert.equal(input.value, 'debounced'); }); it('should cancel debounced changes when control is reset', (done) => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const control = testRender( <Control.text model="test.foo" debounce={10} />, store); const input = TestUtils.findRenderedDOMComponentWithTag(control, 'input'); input.value = 'debounced'; TestUtils.Simulate.change(input); store.dispatch(actions.reset('test')); setTimeout(() => { assert.equal(get(store.getState().test, 'foo'), 'bar'); assert.equal(input.value, 'bar'); done(); }, 20); }); it('should cancel debounced changes when control is reset then unmounted', (done) => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); const container = document.createElement('div'); const control = ReactDOM.render( <Provider store={store}> <Control.text model="test.foo" debounce={10} /> </Provider>, container); const input = TestUtils.findRenderedDOMComponentWithTag(control, 'input'); input.value = 'debounced'; TestUtils.Simulate.change(input); store.dispatch(actions.reset('test')); ReactDOM.unmountComponentAtNode(container); setTimeout(() => { assert.equal(get(store.getState().test, 'foo'), 'bar'); assert.equal(input.value, 'bar'); done(); }, 20); }); }); describe('persist prop', () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ test: modelReducer('test', initialState), testForm: formReducer('test', initialState), }); it('should persist validation on unmount when persist = true', () => { const container = document.createElement('div'); const field = ReactDOM.render( <Provider store={store}> <Control.input model="test.foo" validators={{ valid: () => false }} persist /> </Provider>, container); const input = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); ReactDOM.unmountComponentAtNode(container); assert.isFalse(store.getState().testForm.foo.valid); assert.deepEqual(store.getState().testForm.foo.validity, { valid: false }); }); it('should not persist validation on unmount when persist = false (default)', () => { const container = document.createElement('div'); const field = ReactDOM.render( <Provider store={store}> <Control.input model="test.foo" validators={{ valid: () => false }} persist={false} /> </Provider>, container); const input = TestUtils.findRenderedDOMComponentWithTag(field, 'input'); ReactDOM.unmountComponentAtNode(container); assert.isTrue(store.getState().testForm.foo.valid); assert.deepEqual(store.getState().testForm.foo.validity, {}); }); }); describe('mixing controlProps and props', () => { const initialState = getInitialState({ foo: 'bar' }); const store = testCreateStore({ user: modelReducer('user', initialState), userForm: formReducer('user', initialState), }); const control = testRender( <Control.button model="user" controlProps={{ className: 'button-class' }} lang="en" > Go </Control.button>, store); const button = TestUtils.findRenderedDOMComponentWithTag(control, 'button'); it('should have controlProps on the rendered control', () => { assert.equal(button.getAttribute('class'), 'button-class'); }); it('should have normal, non-RRF-specific props passed to the rendered control', () => { assert.equal(button.getAttribute('lang'), 'en'); assert.equal(button.textContent, 'Go'); }); }); describe('non-string values for custom controls', () => { const initialState = getInitialState({ extraData: { address: '221B Baker Street' }, }); const store = testCreateStore({ user: modelReducer('user', initialState), userForm: formReducer('user', initialState), }); /* eslint-disable react/prop-types */ const ExtraData = ({ value }) => <div>{JSON.stringify(value)}</div>; /* eslint-enable */ const control = testRender( <Control model="user.extraData" component={ExtraData} mapProps={{ value: ({ modelValue }) => modelValue, }} />, store); const div = TestUtils.findRenderedDOMComponentWithTag(control, 'div'); it('should render complex values correctly', () => { assert.equal(div.textContent, '{"address":"221B Baker Street"}'); }); }); }); });
test/helpers/shallowRenderHelper.js
moaiqin/react-web2
/** * Function to get the shallow output for a given component * As we are using phantom.js, we also need to include the fn.proto.bind shim! * * @see http://simonsmith.io/unit-testing-react-components-without-a-dom/ * @author somonsmith */ import React from 'react'; import TestUtils from 'react-addons-test-utils'; /** * Get the shallow rendered component * * @param {Object} component The component to return the output for * @param {Object} props [optional] The components properties * @param {Mixed} ...children [optional] List of children * @return {Object} Shallow rendered output */ export default function createComponent(component, props = {}, ...children) { const shallowRenderer = TestUtils.createRenderer(); shallowRenderer.render(React.createElement(component, props, children.length > 1 ? children : children[0])); return shallowRenderer.getRenderOutput(); }
__tests__/ReactMapboxAutocomplete.spec.js
localvore-today/react-mapbox-autocomplete
'use strict'; import 'whatwg-fetch'; import React from 'react'; import { shallow, mount } from 'enzyme'; import mockResponse from '../mocks/mock-response'; import mapboxResponse from '../mocks/mapbox-response'; import ReactMapboxAutocomplete from '../ReactMapboxAutocomplete'; let state; let event = { target: { value: 'Waitsfield' } }; beforeEach(() => { window.fetch = jest.fn().mockImplementation(() => Promise.resolve(mockResponse(200, null, JSON.stringify(mapboxResponse)))); state = { publicKey: '', onSuggestionSelect: jest.fn(), query: '' }; }); describe('render', () => { it('should render component with query results', () => { const wrapper = mount(<ReactMapboxAutocomplete {...state} />); wrapper.setState({ query: event.target.value, queryResults: mapboxResponse.features }); expect(wrapper).toMatchSnapshot(); }); it('should render component in an error state', () => { const wrapper = mount(<ReactMapboxAutocomplete {...state} />); wrapper.setState({ error: true, errorMsg: 'There was a problem retrieving data from mapbox' }); expect(wrapper).toMatchSnapshot(); }); }); describe('_updateQuery', () => { it('should have no query results', () => { const wrapper = shallow(<ReactMapboxAutocomplete {...state} />); expect(wrapper.state('queryResults')).toEqual([]); expect(wrapper.find('.react-mapbox-ac-suggestion')).toHaveLength(0); }); it('should save the query to state and have query results', () => { const wrapper = shallow(<ReactMapboxAutocomplete {...state} />); wrapper.instance()._updateQuery(event) .then(() => { expect(wrapper.state('error')).toBeFalsy(); expect(wrapper.state('query')).toEqual('Waitsfield'); expect(wrapper.state('queryResults')).toEqual(mapboxResponse.features) expect(wrapper.find('.react-mapbox-ac-suggestion')).toHaveLength(1); }); }); it('should handle a failed fetch request', () => { // override fetch mock with failure window.fetch = jest.fn().mockImplementation(() => Promise.resolve(mockResponse(400, 'Test Error', '{"status": 400, "statusText": Test Error}'))); const wrapper = mount(<ReactMapboxAutocomplete {...state} />); wrapper.instance()._updateQuery(event) .then(() => { expect(wrapper.state('error')).toBeTruthy(); expect(wrapper.state('errorMsg')).toBe('There was a problem retrieving data from mapbox'); expect(wrapper.state('queryResults')).toEqual([]); expect(wrapper.find('.react-mapbox-ac-suggestion').first().text()).toBe('There was a problem retrieving data from mapbox'); }); }); }); describe('_resetSearch', () => { it('should reset the queryResults', () => { const wrapper = shallow(<ReactMapboxAutocomplete {...state} />); wrapper.instance()._updateQuery(event) .then(() => { wrapper.find('.react-mapbox-ac-menu').simulate('click'); expect(wrapper.state('query')).toEqual('Waitsfield'); expect(wrapper.state('queryResults')).toEqual([]); }); }); it('should reset the query and queryResults', () => { state.resetSearch = true; const wrapper = shallow(<ReactMapboxAutocomplete {...state} />); wrapper.instance()._updateQuery(event) .then(() => { wrapper.find('.react-mapbox-ac-menu').simulate('click'); expect(wrapper.state('query')).toEqual(''); expect(wrapper.state('queryResults')).toEqual([]); }); }); }); describe('_onSuggestionSelect', () => { it('should set query to dataset suggestion and invoke callback', () => { const wrapper = mount(<ReactMapboxAutocomplete {...state} />); wrapper.instance()._updateQuery(event) .then(() => { wrapper.find('.react-mapbox-ac-suggestion').first().simulate('click'); expect(wrapper.state('query')).toEqual(mapboxResponse.features[0].place_name); expect(wrapper.prop('onSuggestionSelect')).toHaveBeenCalledWith( mapboxResponse.features[0].place_name, mapboxResponse.features[0].center[1].toString(), mapboxResponse.features[0].center[0].toString(), mapboxResponse.features[0].text ); }); }); });
src/svg-icons/action/view-column.js
rscnt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionViewColumn = (props) => ( <SvgIcon {...props}> <path d="M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z"/> </SvgIcon> ); ActionViewColumn = pure(ActionViewColumn); ActionViewColumn.displayName = 'ActionViewColumn'; export default ActionViewColumn;
packages/cf-component-dropdown/src/Dropdown.js
mdno/mdno.github.io
import React from 'react'; import PropTypes from 'prop-types'; import { canUseDOM } from 'exenv'; import { createComponent } from 'cf-style-container'; import DropdownRegistry from './DropdownRegistry'; const styles = ({ theme, align }) => ({ position: 'absolute', zIndex: 1, minWidth: '10.66667rem', margin: '0.5em 0 0', padding: '0.33333rem 0', listStyle: 'none', background: theme.colorWhite, border: `1px solid ${theme.colorGrayLight}`, borderRadius: theme.borderRadius, boxShadow: '0 3px 10px rgba(0, 0, 0, 0.2)', left: align === 'left' ? 0 : 'initial', right: align === 'right' ? 0 : 'initial', textAlign: theme.textAlign, animationName: { '0%': { display: 'none', opacity: 0 }, '1%': { display: 'block', opacity: 0, top: '80%' }, '100%': { display: 'none', opacity: 1, top: '102%' } }, animationDuration: '150ms', animationTimingFunction: 'ease-out', '&::before': { content: "''", display: 'block', position: 'absolute', bottom: '100%', border: 'solid transparent', borderWidth: '10px', borderTopWidth: 0, borderBottomColor: theme.colorWhite, left: align === 'left' ? '10px' : 'initial', right: align === 'right' ? '10px' : 'initial' } }); class Dropdown extends React.Component { getChildContext() { return { dropdownRegistry: this.dropdownRegistry }; } constructor(props, context) { super(props, context); this.dropdownRegistry = new DropdownRegistry(); this.handleDocumentClick = this.handleDocumentClick.bind(this); this.handleDocumentKeydown = this.handleDocumentKeydown.bind(this); } componentDidMount() { if (canUseDOM) { global.document.addEventListener('keydown', this.handleDocumentKeydown); global.document.addEventListener('click', this.handleDocumentClick); } } componentWillUnmount() { if (canUseDOM) { global.document.removeEventListener( 'keydown', this.handleDocumentKeydown ); global.document.removeEventListener('click', this.handleDocumentClick); } } handleDocumentKeydown(event) { const keyCode = event.keyCode; if (keyCode === 40) { // down event.preventDefault(); this.dropdownRegistry.focusNext(); } else if (keyCode === 38) { // up event.preventDefault(); this.dropdownRegistry.focusPrev(); } else if (keyCode === 27) { // esc this.props.onClose(); } } handleDocumentClick() { this.props.onClose(); } render() { return ( <ul className={this.props.className} role="menu"> {this.props.children} </ul> ); } } Dropdown.propTypes = { onClose: PropTypes.func.isRequired, align: PropTypes.oneOf(['left', 'right']), children: PropTypes.node }; Dropdown.defaultProps = { align: 'left' }; Dropdown.childContextTypes = { dropdownRegistry: PropTypes.instanceOf(DropdownRegistry).isRequired }; export default createComponent(styles, Dropdown);
[3]. Demo_native/rn_into_ios/node_modules/react-native/local-cli/templates/HelloWorld/__tests__/index.ios.js
knightsj/RN_Demo
import 'react-native'; import React from 'react'; import Index from '../index.ios.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
react/Autosuggest/Autosuggest.js
seek-oss/seek-style-guide
import styles from './Autosuggest.less'; import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import ReactAutosuggest from '../private/react-autosuggest'; import IsolatedScroll from 'react-isolated-scroll'; import omit from 'lodash/omit'; import TextField from '../TextField/TextField'; import smoothScroll from '../private/smoothScroll'; import smallDeviceOnly from '../private/smallDeviceOnly'; /* eslint-disable react/no-deprecated */ export default class Autosuggest extends Component { static displayName = 'Autosuggest'; static propTypes = { id: PropTypes.string.isRequired, value: PropTypes.string.isRequired, onChange: PropTypes.func.isRequired, onFocus: PropTypes.func, onBlur: PropTypes.func, type: PropTypes.string, inputProps: PropTypes.object, label: PropTypes.string, labelProps: PropTypes.object, className: PropTypes.string, autosuggestProps: PropTypes.object.isRequired, showMobileBackdrop: PropTypes.bool, /* eslint-disable consistent-return */ suggestionsContainerClassName: (props, _, componentName) => { const { suggestionsContainerClassName, autosuggestProps } = props; const { theme } = autosuggestProps || {}; const { suggestionsContainer } = theme || {}; const propType = typeof suggestionsContainerClassName; if (propType !== 'undefined' && propType !== 'string') { return new Error( `Invalid prop \`suggestionsContainerClassName\` of type \`${propType}\` supplied to \`${componentName}\`, expected \`string\`.` ); } if (suggestionsContainer && suggestionsContainerClassName) { return new Error( '`suggestionsContainerClassName` will be overridden by the `suggestionsContainer` class in autosuggestProps `theme`. Please remove it.' ); } } /* eslint-enable consistent-return */ }; static defaultProps = { type: 'text', className: '', label: '', labelProps: {}, inputProps: {}, showMobileBackdrop: false }; state = { areSuggestionsShown: false }; componentWillUpdate(nextProps, nextState) { if ( !this.state.areSuggestionsShown && nextState.areSuggestionsShown && smallDeviceOnly() ) { smoothScroll(this.textField); } } storeInputReference = autosuggest => { if (autosuggest !== null) { this.input = autosuggest.input; } }; storeTextFieldReference = textField => { if (textField !== null) { this.textField = textField.container; } }; renderSuggestionsContainer = ({ containerProps, children }) => { const { ref, ...rest } = containerProps; const areSuggestionsShown = children !== null; if (this.state.areSuggestionsShown !== areSuggestionsShown) { this.setState({ areSuggestionsShown }); } const callRef = isolatedScroll => { if (isolatedScroll !== null) { ref(isolatedScroll.component); } }; return <IsolatedScroll {...rest} ref={callRef} children={children} />; }; renderInputComponent = inputProps => { const { label, labelProps } = this.props; const textFieldProps = { ref: this.storeTextFieldReference, inputProps, ...omit(this.props, ['inputProps', 'labelProps', 'autosuggestProps']) }; if (label) { textFieldProps.labelProps = { ...labelProps, className: classnames({ [styles.isLabelCoveredWithBackdrop]: this.props.showMobileBackdrop, [labelProps.className]: labelProps.className }) }; } return <TextField {...textFieldProps} />; }; render() { const { value, onChange, onFocus, onBlur, type, inputProps, label, autosuggestProps, suggestionsContainerClassName, showMobileBackdrop } = this.props; const { theme = {} } = autosuggestProps; const allAutosuggestProps = { renderSuggestionsContainer: this.renderSuggestionsContainer, renderInputComponent: this.renderInputComponent, ...autosuggestProps, theme: { ...styles, suggestionsContainer: classnames({ [styles.suggestionsContainer]: true, [styles.suggestionsContainer_withLabel]: label, [suggestionsContainerClassName]: suggestionsContainerClassName }), ...theme } }; return ( <div> <ReactAutosuggest inputProps={{ value, onChange, onFocus, onBlur, type, ...inputProps }} ref={this.storeInputReference} {...allAutosuggestProps} /> <div className={classnames({ [styles.autosuggestBackdrop]: true, [styles.backdrop_isMobile]: showMobileBackdrop })} /> </div> ); } }
app/components/CommonComponents/index.js
rapicastillo/beautifulrising-client
/** * * CommonComponents * */ import React from 'react'; import styled from 'styled-components'; import Isvg from 'react-inlinesvg'; import SmallHeaderBlock from 'components/SmallHeaderBlock'; import { TYPE_STORIES, TYPE_TACTICS, TYPE_PRINCIPLES, TYPE_THEORIES, TYPE_METHODOLOGIES } from './constants'; function CommonComponents() { return ( <div> </div> ); } export const getToolTypeColor = (type) => { switch(type) { case TYPE_STORIES: return "#08eb8c"; case TYPE_TACTICS: return "#ff9200"; case TYPE_PRINCIPLES: return "#166ce3"; case TYPE_THEORIES: return "#f93732"; case TYPE_METHODOLOGIES: return "#b700c2"; } } export const themeFourColumns = { itemWidth: '24%', itemMargin: '0.5%' }; export const themeThreeColumns = { itemWidth: '32%', itemMargin: '0.5%' }; export const SvgButton = styled(Isvg)` svg * { fill: ${(props) => props.selected ? '#000000' : '#828486'} !important; transition: 0.4s fill; } `; export const TextButton = styled.span` color: ${(props) => props.selected ? '#000000' : '#828486'}; text-decoration: ${props => props.selected ? 'none' : 'underline'}; font-weight: 800; font-family: ${props => props.selected ? 'Avenir, Kaff': 'Avenir, Kaff'}; text-transform: uppercase; font-size: ${p=>p.ar?'13px':'14px'}; line-height: ${p=>p.ar?'24px':'22px'}; `; export const BorderedButton = styled.button` outline: none; text-transform: uppercase; border: solid 2px black; font-weight: bold; font-size: 14px; padding: 4px 10px; cursor: pointer; `; export const CommonLeftHeader = styled(SmallHeaderBlock)` padding: 5px 2px; border-bottom: 2px solid black; margin: 0; `; CommonComponents.propTypes = { }; export default CommonComponents;
packages/material-ui-icons/src/CheckCircleOutline.js
kybarg/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M16.59 7.58L10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" /> , 'CheckCircleOutline');
client/components/Header.js
ashoka-ireland/ashoka-ui
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import client from 'api/client'; // eslint-disable-line import { browserHistory, IndexLink, Link } from 'react-router'; import { Menu } from 'antd'; const logo = require('assets/img/logo.png'); class Header extends Component { logout = () => { client.logout().then(() => { browserHistory.replace('/login'); }); } render() { const { user } = this.props; return ( <header className="header"> <div className="logo"> <IndexLink to="/"><img src={logo} alt="Ashoka" className="logo" /></IndexLink> </div> <Menu mode="horizontal" theme="dark"> <Menu.Item key="nominees"> <Link activeClassName="active" to="/nominees">Nominees</Link> </Menu.Item> <Menu.Item key="organization"> <Link activeClassName="active" to="/organizations">Organizations</Link> </Menu.Item> <Menu.Item key="logout"> <a type="button" onClick={this.logout}>Logout</a> </Menu.Item> {user && <Menu.Item key="user"> <div class="user-dropdown">{user.email}</div> </Menu.Item>} </Menu> </header> ); } } Header.propTypes = { user: PropTypes.shape({ email: PropTypes.string, displayName: PropTypes.string }) }; export default Header;
__tests__/component/articles.spec.js
andela-dbamidele/checkpoint1
import React from 'react'; import { mount, shallow } from 'enzyme'; import sinon from 'sinon'; import '../../src/app/test_files/firebase-config'; import Articles from '../../src/app/components/Articles'; import localStorageMock from '../../src/app/__mock__/localStorage'; import articlesMock from '../../src/app/__mock__/articles'; // import sampleArticles from '../../src/app/__mock__/sampleArticles.json'; jest.dontMock('../../src/app/utils/helpers'); window.localStorage = localStorageMock; const articles = articlesMock; describe('Articles', () => { let wrapper; beforeEach(() => { window.localStorage.setItem('user', JSON.stringify({ name: 'Bamidele Daniel', email: '[email protected]', id: 458655605656956, })); window.localStorage.setItem('articles', JSON.stringify([ { title: 'Hello World', source: 'bbc-news', description: 'This is so cool', url: 'https://newsninja.herokuapp.com', urlToImage: '', author: 'Bamidele Daniel', publishedAt: '', }, ])); window.localStorage.setItem('defaultNews', 'aljazerra'); wrapper = mount(<Articles articles={[]} />); }); it('renders without crashing', () => { mount(<Articles />); }); it('changes state on store changes', () => { expect(wrapper.instance().state).toEqual({ articles: [], loading: true, }); wrapper.instance().setArticles(articles); expect(wrapper.instance().state).toEqual({ articles, loading: false, }); }); it('calls componentWillReceiveProps and update the state', () => { const spy = sinon.spy(Articles.prototype, 'componentWillReceiveProps'); expect(spy.calledOnce).toEqual(false); wrapper.setProps(articles); expect(spy.calledOnce).toEqual(true); }); it('contains a saveUsersFavorites method', () => { expect(wrapper.instance().saveUsersFavorites(0)).toEqual(undefined); }); it('saves favorite on button click', () => { const spy = sinon.spy(Articles.prototype, 'saveUsersFavorites'); const shallowWrapper = shallow(<Articles />); shallowWrapper.instance().componentWillReceiveProps({ articles }); shallowWrapper.find('#addFav').simulate('click'); expect(spy.calledOnce).toBeTruthy(); }); it('deletes favorite on button click', () => { const deleteFavorite = sinon.stub(); const shallowWrapper = shallow(<Articles type="favorite" deleteFavorite={deleteFavorite} />); shallowWrapper.instance().componentWillReceiveProps({ articles }); shallowWrapper.find('#deleteFav').simulate('click'); expect(deleteFavorite.calledOnce).toBeTruthy(); }); });
docs/html/jquery.js
bradley219/Thread-Pool-Timer
/*! jQuery v1.7.1 jquery.com | jquery.org/license */ (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function() {g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d &&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")), f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() {for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c) {if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
webapp-src/src/MainScreen/BrowseRecent.js
babelouest/taliesin
import React, { Component } from 'react'; import { Row, Col, ButtonGroup, Button, DropdownButton, MenuItem } from 'react-bootstrap'; import FontAwesome from 'react-fontawesome'; import StateStore from '../lib/StateStore'; import ElementPathIcon from './ElementPathIcon'; import ElementPathList from './ElementPathList'; import ElementCategoryIcon from './ElementCategoryIcon'; import ElementCategoryList from './ElementCategoryList'; import i18n from '../lib/i18n'; class BrowseRecent extends Component { constructor(props) { super(props); this.state = {view: props.view, elementList: [], elementListInitial: [], filter: "", loaded: false, groupBy: 1, offset: 0}; this.getElementList(); this.filterList = this.filterList.bind(this); this.handleChangeGroupBy = this.handleChangeGroupBy.bind(this); this.handleNavigationPrevious = this.handleNavigationPrevious.bind(this); this.handleNavigationNext = this.handleNavigationNext.bind(this); } componentWillReceiveProps(nextProps) { this.setState({view: nextProps.view, elementList: [], elementListInitial: [], filter: "", loaded: false}, () => { this.getElementList(); }); } filterList(event) { var newList = this.state.elementListInitial; newList = newList.filter((item) => { return item.name.toLowerCase().search(event.target.value.toLowerCase()) !== -1; }); this.setState({elementList: newList}); } handleNavigationNext() { this.setState({offset: this.state.offset + 100, loaded: false}, () => { this.getElementList(); }); } handleNavigationPrevious() { this.setState({offset: this.state.offset - 100, loaded: false}, () => { this.getElementList(); }); } getElementList() { if (!this.state.loaded) { StateStore.getState().APIManager.taliesinApiRequest("PUT", "/search/", {sort: "last_updated", sort_direction: "desc", offset: this.state.offset}) .then((result) => { switch (this.state.groupBy) { case 0: // File var list = []; result.forEach((element) => { var path = element.path.substring(0, element.path.lastIndexOf("/")); var newElt = {data_source: element.data_source, type: element.type, path: path, name: element.name}; list.push(newElt); }); this.setState({loaded: true, elementListInitial: list, elementList: list}); break; case 1: // Folder var list = []; result.forEach((element) => { var pathParent = element.path.substring(0, element.path.lastIndexOf("/")); var path = pathParent.substring(0, pathParent.lastIndexOf("/")); var name = pathParent.substring(pathParent.lastIndexOf("/") + 1); if (!list.find((elt) => { return elt.pathParent === pathParent && elt.data_source === element.data_source; })) { var newElt = {data_source: element.data_source, type: "folder", path: path, name: name, pathParent: pathParent}; list.push(newElt); } }); this.setState({loaded: true, elementListInitial: list, elementList: list}); break; case 2: // Artist var list = []; result.forEach((element) => { if ((element.type === "audio" || element.type === "video") && element.tags && element.tags.artist) { if (!list.find((elt) => { return elt.tags.artist === element.tags.artist; })) { var pathParent = element.path.substring(0, element.path.lastIndexOf("/")); var path = pathParent.substring(0, pathParent.lastIndexOf("/")); var name = pathParent.substring(pathParent.lastIndexOf("/") + 1); var newElt = {data_source: element.data_source, path: path, name: name, pathParent: pathParent, tags: element.tags}; list.push(newElt); } } }); this.setState({loaded: true, elementListInitial: list, elementList: list}); break; case 3: // Album var list = []; result.forEach((element) => { if ((element.type === "audio" || element.type === "video") && element.tags && element.tags.album) { if (!list.find((elt) => { return elt.tags.album === element.tags.album; })) { var pathParent = element.path.substring(0, element.path.lastIndexOf("/")); var path = pathParent.substring(0, pathParent.lastIndexOf("/")); var name = pathParent.substring(pathParent.lastIndexOf("/") + 1); var newElt = {data_source: element.data_source, path: path, name: name, pathParent: pathParent, tags: element.tags}; list.push(newElt); } } }); this.setState({loaded: true, elementListInitial: list, elementList: list}); break; case 4: // Date var list = []; result.forEach((element) => { if ((element.type === "audio" || element.type === "video") && element.tags && element.tags.date) { if (!list.find((elt) => { return elt.tags.date === element.tags.date; })) { var pathParent = element.path.substring(0, element.path.lastIndexOf("/")); var path = pathParent.substring(0, pathParent.lastIndexOf("/")); var name = pathParent.substring(pathParent.lastIndexOf("/") + 1); var newElt = {data_source: element.data_source, path: path, name: name, pathParent: pathParent, tags: element.tags}; list.push(newElt); } } }); this.setState({loaded: true, elementListInitial: list, elementList: list}); break; default: // Nope this.setState({loaded: true, elementListInitial: [], elementList: []}); break; } }) .fail((result) => { this.setState({loaded: true, elementListInitial: [], elementList: []}); }); } } handleChangeGroupBy(e) { this.setState({groupBy: e, loaded: false}, () => { this.getElementList(); }); } render() { var currentList = []; var currentElementList = this.state.elementList; var header = <Row> <Col md={6} sm={6} xs={6}> <span className="hidden-xs space-after">{i18n.t("common.group_by")}</span> <ButtonGroup className="hidden-xs"> <Button onClick={() => this.handleChangeGroupBy(0)} title={i18n.t("common.file")} bsStyle={this.state.groupBy===0?"primary":"default"}> {i18n.t("common.file")} </Button> <Button onClick={() => this.handleChangeGroupBy(1)} title={i18n.t("common.folder")} bsStyle={this.state.groupBy===1?"primary":"default"}> {i18n.t("common.folder")} </Button> <Button onClick={() => this.handleChangeGroupBy(2)} title={i18n.t("common.artist")} bsStyle={this.state.groupBy===2?"primary":"default"}> {i18n.t("common.artist")} </Button> <Button onClick={() => this.handleChangeGroupBy(3)} title={i18n.t("common.album")} bsStyle={this.state.groupBy===3?"primary":"default"}> {i18n.t("common.album")} </Button> <Button onClick={() => this.handleChangeGroupBy(4)} title={i18n.t("common.date")} bsStyle={this.state.groupBy===4?"primary":"default"}> {i18n.t("common.date")} </Button> </ButtonGroup> <DropdownButton className="visible-xs" id="grouypBy" title={ <span>{i18n.t("common.group_by")}</span> }> <MenuItem onClick={() => this.handleChangeGroupBy(0)} className={this.state.groupBy===0?"bg-success":""}> {i18n.t("common.file")} </MenuItem> <MenuItem onClick={() => this.handleChangeGroupBy(1)} className={this.state.groupBy===1?"bg-success":""}> {i18n.t("common.folder")} </MenuItem> <MenuItem onClick={() => this.handleChangeGroupBy(2)} className={this.state.groupBy===2?"bg-success":""}> {i18n.t("common.artist")} </MenuItem> <MenuItem onClick={() => this.handleChangeGroupBy(3)} className={this.state.groupBy===3?"bg-success":""}> {i18n.t("common.album")} </MenuItem> <MenuItem onClick={() => this.handleChangeGroupBy(4)} className={this.state.groupBy===4?"bg-success":""}> {i18n.t("common.date")} </MenuItem> </DropdownButton> </Col> <Col md={6} sm={6} xs={6} className="text-right"> <span className="hidden-xs">{i18n.t("common.navigation")} - </span><span className="space-after">{i18n.t("common.page", {page: ((this.state.offset/100)+1)})}</span><br className="hidden-xs"/> <ButtonGroup> <Button onClick={this.handleNavigationPrevious} disabled={!this.state.offset}> <span className="hidden-xs">{i18n.t("common.previous_page")}</span> <FontAwesome name="chevron-left" className="visible-xs" /> </Button> <Button onClick={this.handleNavigationNext}> <span className="hidden-xs">{i18n.t("common.next_page")}</span> <FontAwesome name="chevron-right" className="visible-xs" /> </Button> </ButtonGroup> </Col> </Row>; if (this.state.loaded) { if (this.state.view === "icon") { currentElementList.forEach((element, index) => { if (this.state.groupBy === 0 || this.state.groupBy === 1) { currentList.push( <ElementPathIcon key={index} dataSource={element.data_source} path={element.path||"/"} element={element} /> ); } else if (this.state.groupBy === 2) { var artistElt = {name: element.tags.artist, type: "artist"}; currentList.push( <ElementCategoryIcon key={index} dataSource={element.data_source} category="artist" categoryValue={element.tags.artist} element={artistElt} /> ); } else if (this.state.groupBy === 3) { var artistElt = {name: element.tags.album, type: "album"}; currentList.push( <ElementCategoryIcon key={index} dataSource={element.data_source} category="album" categoryValue={element.tags.album} element={artistElt} /> ); } else if (this.state.groupBy === 4) { var artistElt = {name: element.tags.date, type: "year"}; currentList.push( <ElementCategoryIcon key={index} dataSource={element.data_source} category="year" categoryValue={element.tags.date} element={artistElt} /> ); } }); return ( <div> {header} <Row> <input type="text" placeholder="Filter" value={this.filter} className="form-control" onChange={this.filterList}/> </Row> <Row> {currentList} </Row> </div> ); } else { currentElementList.forEach((element, index) => { if (this.state.groupBy === 0 || this.state.groupBy === 1) { currentList.push( <ElementPathList key={index} dataSource={element.data_source} path={element.path||"/"} element={element} /> ); } else if (this.state.groupBy === 2) { var artistElt = {name: element.tags.artist, type: "artist"}; currentList.push( <ElementCategoryList key={index} dataSource={element.data_source} category="artist" categoryValue={element.tags.artist} element={artistElt} /> ); } else if (this.state.groupBy === 3) { var artistElt = {name: element.tags.album, type: "album"}; currentList.push( <ElementCategoryList key={index} dataSource={element.data_source} category="album" categoryValue={element.tags.album} element={artistElt} /> ); } else if (this.state.groupBy === 4) { var artistElt = {name: element.tags.date, type: "year"}; currentList.push( <ElementCategoryList key={index} dataSource={element.data_source} category="year" categoryValue={element.tags.date} element={artistElt} /> ); } }); return ( <div> {header} <Row> <input type="text" placeholder={i18n.t("common.filter")} value={this.filter} className="form-control" onChange={this.filterList}/> </Row> {currentList} </div> ); } } else { return ( <div> {header} <Row> <FontAwesome name="spinner" size="2x" spin /> </Row> </div> ); } } } export default BrowseRecent;
react/src/containers/AncestryApp/SerializedAncestry/index.js
sinfin/folio
import React from 'react' function SerializedItem ({ item, index }) { const prefix = `ancestry[${index + 1}]` const name = (field) => `${prefix}[${field}]` return ( <div> <input type='hidden' name={name('id')} value={item.id} /> <input type='hidden' name={name('position')} value={index + 1} /> <input type='hidden' name={name('parent_id')} value={item.parentId || ''} /> </div> ) } const flatItems = (items) => { const flat = [] const get = (item, parentId) => { flat.push({ ...item, parentId }) item.children.forEach((child) => get(child, item.id)) } items.forEach((item) => get(item, null)) return flat } function SerializedAncestry ({ ancestry }) { let i = -1 const index = () => { i++; return i } return ( <div hidden> {flatItems(ancestry.items).map((item) => ( <SerializedItem key={item.id} item={item} index={index()} /> ))} </div> ) } export default SerializedAncestry
src/helpers/__tests__/makeRouteHooksSafe-test.js
chadoh/isoredux
import { expect } from 'chai'; import React from 'react'; import { IndexRoute, Route } from 'react-router'; import makeRouteHooksSafe from '../makeRouteHooksSafe'; describe('makeRouteHooksSafe', () => { it('should work with JSX routes', () => { const onEnter = () => { throw new Error('Shouldn\'t call onEnter'); }; const getRoutes = makeRouteHooksSafe(() => { return ( <Route path="/" > <IndexRoute onEnter={onEnter} /> <Route path="1" /> <Route onEnter={onEnter}> <Route path="2" /> <Route path="3" onEnter={onEnter}/> </Route> </Route> ); }); const routes = getRoutes(null); expect(routes[0].indexRoute.onEnter).to.not.throw(Error); expect(routes[0].childRoutes[1].onEnter).to.not.throw(Error); expect(routes[0].childRoutes[1].childRoutes[1].onEnter).to.not.throw(Error); }); it('should work with JS routes', () => { const onEnter = () => { throw new Error('Shouldn\'t call onEnter'); }; const getRoutes = makeRouteHooksSafe(() => { return { path: '/', indexRoute: { onEnter: onEnter }, onEnter: onEnter, childRoutes: [ {path: '1'}, { onEnter: onEnter, childRoutes: [ {path: '2'}, {path: '3'} ], } ] }; }); const routes = getRoutes(null); expect(routes[0].indexRoute.onEnter).to.not.throw(Error); expect(routes[0].onEnter).to.not.throw(Error); expect(routes[0].childRoutes[1].onEnter).to.not.throw(Error); }); it('should call onEnter if store is initialised', (done) => { const store = { getState: () => {} }; const getRoutes = makeRouteHooksSafe(() => { return { onEnter: () => { done(); } }; }); const routes = getRoutes(store); routes[0].onEnter(); }); it('should call callback', (done) => { const getRoutes = makeRouteHooksSafe(() => { return { onEnter: (nextState, replaceState, cb) => {} // eslint-disable-line no-unused-vars }; }); const routes = getRoutes(null); routes[0].onEnter(null, null, done); }); it('should not call callback', () => { const callback = () => { throw new Error('Should not be called'); }; const getRoutes = makeRouteHooksSafe(() => { return { onEnter: (nextState, replaceState) => {} // eslint-disable-line no-unused-vars }; }); const routes = getRoutes(null); routes[0].onEnter(null, null, callback); }); });
docs/client/components/pages/Home/UnicornEditor/index.js
koaninc/draft-js-plugins
import React, { Component } from 'react'; import Editor from 'draft-js-plugins-editor'; // eslint-disable-line import/no-unresolved import createHashtagPlugin from 'draft-js-hashtag-plugin'; // eslint-disable-line import/no-unresolved import createStickerPlugin from 'draft-js-sticker-plugin'; // eslint-disable-line import/no-unresolved import createLinkifyPlugin from 'draft-js-linkify-plugin'; // eslint-disable-line import/no-unresolved import createMentionPlugin, { defaultSuggestionsFilter } from 'draft-js-mention-plugin'; // eslint-disable-line import/no-unresolved import createEmojiPlugin from 'draft-js-emoji-plugin'; // eslint-disable-line import/no-unresolved import createUndoPlugin from 'draft-js-undo-plugin'; // eslint-disable-line import/no-unresolved import { // convertToRaw, // convertFromRaw, ContentState, EditorState, } from 'draft-js'; import styles from './styles.css'; import stickers from './stickers'; import mentions from './mentions'; // import initialState from './initialState'; const emojiPlugin = createEmojiPlugin(); const hashtagPlugin = createHashtagPlugin(); const linkifyPlugin = createLinkifyPlugin(); const mentionPlugin = createMentionPlugin(); const undoPlugin = createUndoPlugin(); const stickerPlugin = createStickerPlugin({ stickers, }); const { MentionSuggestions } = mentionPlugin; const { EmojiSuggestions } = emojiPlugin; const { StickerSelect } = stickerPlugin; const { UndoButton, RedoButton } = undoPlugin; const plugins = [ emojiPlugin, hashtagPlugin, stickerPlugin, linkifyPlugin, mentionPlugin, undoPlugin, ]; // const contentState = ContentState.createFromBlockArray(convertFromRaw(initialState)); const contentState = ContentState.createFromText('You can add Emojis by typing colon : or mentions with an @. Add Stickers and undo your actions with the undo button below …'); export default class UnicornEditor extends Component { state = { editorState: EditorState.createWithContent(contentState), suggestions: mentions, }; onChange = (editorState) => { this.setState({ editorState, }); // console.log(JSON.stringify(convertToRaw(editorState.getCurrentContent()))); }; onMentionSearchChange = ({ value }) => { this.setState({ suggestions: defaultSuggestionsFilter(value, mentions), }); }; focus = () => { this.editor.focus(); }; render() { return ( <div className={styles.root}> <div className={styles.editor} onClick={this.focus}> <Editor editorState={this.state.editorState} onChange={this.onChange} plugins={plugins} spellCheck ref={(element) => { this.editor = element; }} /> </div> <div> <MentionSuggestions onSearchChange={this.onMentionSearchChange} suggestions={this.state.suggestions} /> <EmojiSuggestions /> <div className={styles.editorButton}> <StickerSelect editor={this} /> </div> <div className={styles.editorButton}> <UndoButton /> </div> <div className={styles.editorButton}> <RedoButton /> </div> </div> </div> ); } }
src/main/viz/FeatureTrack.js
snaheth/pileup.js
/** * Visualization of features, including exons and coding regions. * @flow */ 'use strict'; import type {Feature, FeatureDataSource} from '../sources/FeatureDataSource'; import type {DataCanvasRenderingContext2D} from 'data-canvas'; import type {VizProps} from '../VisualizationWrapper'; import type {Scale} from './d3utils'; import React from 'react'; import shallowEquals from 'shallow-equals'; import _ from 'underscore'; import d3utils from './d3utils'; import RemoteRequest from '../RemoteRequest'; import ContigInterval from '../ContigInterval'; import canvasUtils from './canvas-utils'; import TiledCanvas from './TiledCanvas'; import dataCanvas from 'data-canvas'; import style from '../style'; import utils from '../utils'; import type {State, NetworkStatus} from './pileuputils'; class FeatureTiledCanvas extends TiledCanvas { options: Object; source: FeatureDataSource; constructor(source: FeatureDataSource, options: Object) { super(); this.source = source; this.options = options; } update(newOptions: Object) { this.options = newOptions; } // TODO: can update to handle overlapping features heightForRef(ref: string): number { return style.VARIANT_HEIGHT; } render(ctx: DataCanvasRenderingContext2D, scale: (x: number)=>number, range: ContigInterval<string>, originalRange: ?ContigInterval<string>, resolution: ?number) { var relaxedRange = new ContigInterval(range.contig, range.start() - 1, range.stop() + 1); var vFeatures = this.source.getFeaturesInRange(relaxedRange, resolution); renderFeatures(ctx, scale, relaxedRange, vFeatures); } } // Draw features function renderFeatures(ctx: DataCanvasRenderingContext2D, scale: (num: number) => number, range: ContigInterval<string>, features: Feature[]) { ctx.font = `${style.GENE_FONT_SIZE}px ${style.GENE_FONT}`; ctx.textAlign = 'center'; features.forEach(feature => { var position = new ContigInterval(feature.contig, feature.start, feature.stop); if (!position.chrIntersects(range)) return; ctx.pushObject(feature); ctx.lineWidth = 1; // Create transparency value based on score. Score of <= 200 is the same transparency. var alphaScore = Math.max(feature.score / 1000.0, 0.2); ctx.fillStyle = 'rgba(0, 0, 0, ' + alphaScore + ')'; var x = Math.round(scale(feature.start)); var width = Math.ceil(scale(feature.stop) - scale(feature.start)); ctx.fillRect(x - 0.5, 0, width, style.VARIANT_HEIGHT); ctx.popObject(); }); } class FeatureTrack extends React.Component { props: VizProps & { source: FeatureDataSource }; state: State; tiles: FeatureTiledCanvas; constructor(props: VizProps) { super(props); this.state = { networkStatus: null }; } render(): any { var statusEl = null, networkStatus = this.state.networkStatus; if (networkStatus) { statusEl = ( <div ref='status' className='network-status-small'> <div className='network-status-message-small'> Loading features… </div> </div> ); } var rangeLength = this.props.range.stop - this.props.range.start; // If range is too large, do not render 'canvas' if (rangeLength > RemoteRequest.MONSTER_REQUEST) { return ( <div> <div className='center'> Zoom in to see features </div> <canvas onClick={this.handleClick.bind(this)} /> </div> ); } else { return ( <div> {statusEl} <div ref='container'> <canvas ref='canvas' onClick={this.handleClick.bind(this)} /> </div> </div> ); } } componentDidMount() { this.tiles = new FeatureTiledCanvas(this.props.source, this.props.options); // Visualize new reference data as it comes in from the network. this.props.source.on('newdata', (range) => { this.tiles.invalidateRange(range); this.updateVisualization(); }); this.props.source.on('networkprogress', e => { this.setState({networkStatus: e}); }); this.props.source.on('networkdone', e => { this.setState({networkStatus: null}); }); this.updateVisualization(); } getScale(): Scale { return d3utils.getTrackScale(this.props.range, this.props.width); } componentDidUpdate(prevProps: any, prevState: any) { if (!shallowEquals(this.props, prevProps) || !shallowEquals(this.state, prevState)) { this.tiles.update(this.props.options); this.tiles.invalidateAll(); this.updateVisualization(); } } updateVisualization() { var canvas = (this.refs.canvas : HTMLCanvasElement), {width, height} = this.props, genomeRange = this.props.range; var range = new ContigInterval(genomeRange.contig, genomeRange.start, genomeRange.stop); // Hold off until height & width are known. if (width === 0 || typeof canvas == 'undefined') return; d3utils.sizeCanvas(canvas, width, height); var ctx = dataCanvas.getDataContext(canvasUtils.getContext(canvas)); ctx.reset(); ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); this.tiles.renderToScreen(ctx, range, this.getScale()); ctx.restore(); } handleClick(reactEvent: any) { var ev = reactEvent.nativeEvent, x = ev.offsetX; var genomeRange = this.props.range, // allow some buffering so click isn't so sensitive range = new ContigInterval(genomeRange.contig, genomeRange.start-1, genomeRange.stop+1), scale = this.getScale(), // leave padding of 2px to reduce click specificity clickStart = Math.floor(scale.invert(x)) - 2, clickEnd = clickStart + 2, // If click-tracking gets slow, this range could be narrowed to one // closer to the click coordinate, rather than the whole visible range. vFeatures = this.props.source.getFeaturesInRange(range); var feature = _.find(vFeatures, f => utils.tupleRangeOverlaps([[f.start], [f.stop]], [[clickStart], [clickEnd]])); var alert = window.alert || console.log; if (feature) { // Construct a JSON object to show the user. var messageObject = _.extend( { 'id': feature.id, 'range': `${feature.contig}:${feature.start}-${feature.stop}`, 'score': feature.score }); alert(JSON.stringify(messageObject, null, ' ')); } } } FeatureTrack.displayName = 'features'; module.exports = FeatureTrack;
ajax/libs/analytics.js/1.5.9/analytics.min.js
kellyselden/cdnjs
(function(){function require(path,parent,orig){var resolved=require.resolve(path);if(null==resolved){orig=orig||path;parent=parent||"root";var err=new Error('Failed to require "'+orig+'" from "'+parent+'"');err.path=orig;err.parent=parent;err.require=true;throw err}var module=require.modules[resolved];if(!module._resolving&&!module.exports){var mod={};mod.exports={};mod.client=mod.component=true;module._resolving=true;module.call(this,mod.exports,require.relative(resolved),mod);delete module._resolving;module.exports=mod.exports}return module.exports}require.modules={};require.aliases={};require.resolve=function(path){if(path.charAt(0)==="/")path=path.slice(1);var paths=[path,path+".js",path+".json",path+"/index.js",path+"/index.json"];for(var i=0;i<paths.length;i++){var path=paths[i];if(require.modules.hasOwnProperty(path))return path;if(require.aliases.hasOwnProperty(path))return require.aliases[path]}};require.normalize=function(curr,path){var segs=[];if("."!=path.charAt(0))return path;curr=curr.split("/");path=path.split("/");for(var i=0;i<path.length;++i){if(".."==path[i]){curr.pop()}else if("."!=path[i]&&""!=path[i]){segs.push(path[i])}}return curr.concat(segs).join("/")};require.register=function(path,definition){require.modules[path]=definition};require.alias=function(from,to){if(!require.modules.hasOwnProperty(from)){throw new Error('Failed to alias "'+from+'", it does not exist')}require.aliases[to]=from};require.relative=function(parent){var p=require.normalize(parent,"..");function lastIndexOf(arr,obj){var i=arr.length;while(i--){if(arr[i]===obj)return i}return-1}function localRequire(path){var resolved=localRequire.resolve(path);return require(resolved,parent,path)}localRequire.resolve=function(path){var c=path.charAt(0);if("/"==c)return path.slice(1);if("."==c)return require.normalize(p,path);var segs=parent.split("/");var i=lastIndexOf(segs,"deps")+1;if(!i)i=0;path=segs.slice(0,i+1).join("/")+"/deps/"+path;return path};localRequire.exists=function(path){return require.modules.hasOwnProperty(localRequire.resolve(path))};return localRequire};require.register("avetisk-defaults/index.js",function(exports,require,module){"use strict";var defaults=function(dest,src,recursive){for(var prop in src){if(recursive&&dest[prop]instanceof Object&&src[prop]instanceof Object){dest[prop]=defaults(dest[prop],src[prop],true)}else if(!(prop in dest)){dest[prop]=src[prop]}}return dest};module.exports=defaults});require.register("component-type/index.js",function(exports,require,module){var toString=Object.prototype.toString;module.exports=function(val){switch(toString.call(val)){case"[object Function]":return"function";case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object String]":return"string"}if(val===null)return"null";if(val===undefined)return"undefined";if(val&&val.nodeType===1)return"element";if(val===Object(val))return"object";return typeof val}});require.register("component-clone/index.js",function(exports,require,module){var type;try{type=require("type")}catch(e){type=require("type-component")}module.exports=clone;function clone(obj){switch(type(obj)){case"object":var copy={};for(var key in obj){if(obj.hasOwnProperty(key)){copy[key]=clone(obj[key])}}return copy;case"array":var copy=new Array(obj.length);for(var i=0,l=obj.length;i<l;i++){copy[i]=clone(obj[i])}return copy;case"regexp":var flags="";flags+=obj.multiline?"m":"";flags+=obj.global?"g":"";flags+=obj.ignoreCase?"i":"";return new RegExp(obj.source,flags);case"date":return new Date(obj.getTime());default:return obj}}});require.register("component-cookie/index.js",function(exports,require,module){var encode=encodeURIComponent;var decode=decodeURIComponent;module.exports=function(name,value,options){switch(arguments.length){case 3:case 2:return set(name,value,options);case 1:return get(name);default:return all()}};function set(name,value,options){options=options||{};var str=encode(name)+"="+encode(value);if(null==value)options.maxage=-1;if(options.maxage){options.expires=new Date(+new Date+options.maxage)}if(options.path)str+="; path="+options.path;if(options.domain)str+="; domain="+options.domain;if(options.expires)str+="; expires="+options.expires.toGMTString();if(options.secure)str+="; secure";document.cookie=str}function all(){return parse(document.cookie)}function get(name){return all()[name]}function parse(str){var obj={};var pairs=str.split(/ *; */);var pair;if(""==pairs[0])return obj;for(var i=0;i<pairs.length;++i){pair=pairs[i].split("=");obj[decode(pair[0])]=decode(pair[1])}return obj}});require.register("component-each/index.js",function(exports,require,module){var type=require("type");var has=Object.prototype.hasOwnProperty;module.exports=function(obj,fn){switch(type(obj)){case"array":return array(obj,fn);case"object":if("number"==typeof obj.length)return array(obj,fn);return object(obj,fn);case"string":return string(obj,fn)}};function string(obj,fn){for(var i=0;i<obj.length;++i){fn(obj.charAt(i),i)}}function object(obj,fn){for(var key in obj){if(has.call(obj,key)){fn(key,obj[key])}}}function array(obj,fn){for(var i=0;i<obj.length;++i){fn(obj[i],i)}}});require.register("component-indexof/index.js",function(exports,require,module){module.exports=function(arr,obj){if(arr.indexOf)return arr.indexOf(obj);for(var i=0;i<arr.length;++i){if(arr[i]===obj)return i}return-1}});require.register("component-emitter/index.js",function(exports,require,module){var index=require("indexof");module.exports=Emitter;function Emitter(obj){if(obj)return mixin(obj)}function mixin(obj){for(var key in Emitter.prototype){obj[key]=Emitter.prototype[key]}return obj}Emitter.prototype.on=Emitter.prototype.addEventListener=function(event,fn){this._callbacks=this._callbacks||{};(this._callbacks[event]=this._callbacks[event]||[]).push(fn);return this};Emitter.prototype.once=function(event,fn){var self=this;this._callbacks=this._callbacks||{};function on(){self.off(event,on);fn.apply(this,arguments)}fn._off=on;this.on(event,on);return this};Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(event,fn){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var callbacks=this._callbacks[event];if(!callbacks)return this;if(1==arguments.length){delete this._callbacks[event];return this}var i=index(callbacks,fn._off||fn);if(~i)callbacks.splice(i,1);return this};Emitter.prototype.emit=function(event){this._callbacks=this._callbacks||{};var args=[].slice.call(arguments,1),callbacks=this._callbacks[event];if(callbacks){callbacks=callbacks.slice(0);for(var i=0,len=callbacks.length;i<len;++i){callbacks[i].apply(this,args)}}return this};Emitter.prototype.listeners=function(event){this._callbacks=this._callbacks||{};return this._callbacks[event]||[]};Emitter.prototype.hasListeners=function(event){return!!this.listeners(event).length}});require.register("component-event/index.js",function(exports,require,module){exports.bind=function(el,type,fn,capture){if(el.addEventListener){el.addEventListener(type,fn,capture||false)}else{el.attachEvent("on"+type,fn)}return fn};exports.unbind=function(el,type,fn,capture){if(el.removeEventListener){el.removeEventListener(type,fn,capture||false)}else{el.detachEvent("on"+type,fn)}return fn}});require.register("component-inherit/index.js",function(exports,require,module){module.exports=function(a,b){var fn=function(){};fn.prototype=b.prototype;a.prototype=new fn;a.prototype.constructor=a}});require.register("component-object/index.js",function(exports,require,module){var has=Object.prototype.hasOwnProperty;exports.keys=Object.keys||function(obj){var keys=[];for(var key in obj){if(has.call(obj,key)){keys.push(key)}}return keys};exports.values=function(obj){var vals=[];for(var key in obj){if(has.call(obj,key)){vals.push(obj[key])}}return vals};exports.merge=function(a,b){for(var key in b){if(has.call(b,key)){a[key]=b[key]}}return a};exports.length=function(obj){return exports.keys(obj).length};exports.isEmpty=function(obj){return 0==exports.length(obj)}});require.register("component-trim/index.js",function(exports,require,module){exports=module.exports=trim;function trim(str){if(str.trim)return str.trim();return str.replace(/^\s*|\s*$/g,"")}exports.left=function(str){if(str.trimLeft)return str.trimLeft();return str.replace(/^\s*/,"")};exports.right=function(str){if(str.trimRight)return str.trimRight();return str.replace(/\s*$/,"")}});require.register("component-querystring/index.js",function(exports,require,module){var encode=encodeURIComponent;var decode=decodeURIComponent;var trim=require("trim");var type=require("type");exports.parse=function(str){if("string"!=typeof str)return{};str=trim(str);if(""==str)return{};if("?"==str.charAt(0))str=str.slice(1);var obj={};var pairs=str.split("&");for(var i=0;i<pairs.length;i++){var parts=pairs[i].split("=");var key=decode(parts[0]);var m;if(m=/(\w+)\[(\d+)\]/.exec(key)){obj[m[1]]=obj[m[1]]||[];obj[m[1]][m[2]]=decode(parts[1]);continue}obj[parts[0]]=null==parts[1]?"":decode(parts[1])}return obj};exports.stringify=function(obj){if(!obj)return"";var pairs=[];for(var key in obj){var value=obj[key];if("array"==type(value)){for(var i=0;i<value.length;++i){pairs.push(encode(key+"["+i+"]")+"="+encode(value[i]))}continue}pairs.push(encode(key)+"="+encode(obj[key]))}return pairs.join("&")}});require.register("component-url/index.js",function(exports,require,module){exports.parse=function(url){var a=document.createElement("a");a.href=url;return{href:a.href,host:a.host||location.host,port:"0"===a.port||""===a.port?port(a.protocol):a.port,hash:a.hash,hostname:a.hostname||location.hostname,pathname:a.pathname.charAt(0)!="/"?"/"+a.pathname:a.pathname,protocol:!a.protocol||":"==a.protocol?location.protocol:a.protocol,search:a.search,query:a.search.slice(1)}};exports.isAbsolute=function(url){return 0==url.indexOf("//")||!!~url.indexOf("://")};exports.isRelative=function(url){return!exports.isAbsolute(url)};exports.isCrossDomain=function(url){url=exports.parse(url);return url.hostname!==location.hostname||url.port!==location.port||url.protocol!==location.protocol};function port(protocol){switch(protocol){case"http:":return 80;case"https:":return 443;default:return location.port}}});require.register("component-bind/index.js",function(exports,require,module){var slice=[].slice;module.exports=function(obj,fn){if("string"==typeof fn)fn=obj[fn];if("function"!=typeof fn)throw new Error("bind() requires a function");var args=slice.call(arguments,2);return function(){return fn.apply(obj,args.concat(slice.call(arguments)))}}});require.register("segmentio-bind-all/index.js",function(exports,require,module){try{var bind=require("bind");var type=require("type")}catch(e){var bind=require("bind-component");var type=require("type-component")}module.exports=function(obj){for(var key in obj){var val=obj[key];if(type(val)==="function")obj[key]=bind(obj,obj[key])}return obj}});require.register("ianstormtaylor-bind/index.js",function(exports,require,module){try{var bind=require("bind")}catch(e){var bind=require("bind-component")}var bindAll=require("bind-all");module.exports=exports=bind;exports.all=bindAll;exports.methods=bindMethods;function bindMethods(obj,methods){methods=[].slice.call(arguments,1);for(var i=0,method;method=methods[i];i++){obj[method]=bind(obj,obj[method])}return obj}});require.register("timoxley-next-tick/index.js",function(exports,require,module){"use strict";if(typeof setImmediate=="function"){module.exports=function(f){setImmediate(f)}}else if(typeof process!="undefined"&&typeof process.nextTick=="function"){module.exports=process.nextTick}else if(typeof window=="undefined"||window.ActiveXObject||!window.postMessage){module.exports=function(f){setTimeout(f)}}else{var q=[];window.addEventListener("message",function(){var i=0;while(i<q.length){try{q[i++]()}catch(e){q=q.slice(i);window.postMessage("tic!","*");throw e}}q.length=0},true);module.exports=function(fn){if(!q.length)window.postMessage("tic!","*");q.push(fn)}}});require.register("ianstormtaylor-callback/index.js",function(exports,require,module){var next=require("next-tick");module.exports=callback;function callback(fn){if("function"===typeof fn)fn()}callback.async=function(fn,wait){if("function"!==typeof fn)return;if(!wait)return next(fn);setTimeout(fn,wait)};callback.sync=callback});require.register("ianstormtaylor-is-empty/index.js",function(exports,require,module){module.exports=isEmpty;var has=Object.prototype.hasOwnProperty;function isEmpty(val){if(null==val)return true;if("number"==typeof val)return 0===val;if(undefined!==val.length)return 0===val.length;for(var key in val)if(has.call(val,key))return false;return true}});require.register("ianstormtaylor-is/index.js",function(exports,require,module){var isEmpty=require("is-empty"),typeOf=require("type");var types=["arguments","array","boolean","date","element","function","null","number","object","regexp","string","undefined"];for(var i=0,type;type=types[i];i++)exports[type]=generate(type);exports.fn=exports["function"];exports.empty=isEmpty;exports.nan=function(val){return exports.number(val)&&val!=val};function generate(type){return function(value){return type===typeOf(value)}}});require.register("segmentio-after/index.js",function(exports,require,module){module.exports=function after(times,func){if(times<=0)return func();return function(){if(--times<1){return func.apply(this,arguments)}}}});require.register("component-domify/index.js",function(exports,require,module){module.exports=parse;var map={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]};map.td=map.th=[3,"<table><tbody><tr>","</tr></tbody></table>"];map.option=map.optgroup=[1,'<select multiple="multiple">',"</select>"];map.thead=map.tbody=map.colgroup=map.caption=map.tfoot=[1,"<table>","</table>"];map.text=map.circle=map.ellipse=map.line=map.path=map.polygon=map.polyline=map.rect=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"];function parse(html){if("string"!=typeof html)throw new TypeError("String expected");html=html.replace(/^\s+|\s+$/g,"");var m=/<([\w:]+)/.exec(html);if(!m)return document.createTextNode(html);var tag=m[1];if(tag=="body"){var el=document.createElement("html");el.innerHTML=html;return el.removeChild(el.lastChild)}var wrap=map[tag]||map._default;var depth=wrap[0];var prefix=wrap[1];var suffix=wrap[2];var el=document.createElement("div");el.innerHTML=prefix+html+suffix;while(depth--)el=el.lastChild;if(el.firstChild==el.lastChild){return el.removeChild(el.firstChild)}var fragment=document.createDocumentFragment();while(el.firstChild){fragment.appendChild(el.removeChild(el.firstChild))}return fragment}});require.register("component-once/index.js",function(exports,require,module){var n=0;var global=function(){return this}();module.exports=function(fn){var id=n++;function once(){if(this==global){if(once.called)return;once.called=true;return fn.apply(this,arguments)}var key="__called_"+id+"__";if(this[key])return;this[key]=true;return fn.apply(this,arguments)}return once}});require.register("component-throttle/index.js",function(exports,require,module){module.exports=throttle;function throttle(func,wait){var rtn;var last=0;return function throttled(){var now=(new Date).getTime();var delta=now-last;if(delta>=wait){rtn=func.apply(this,arguments);last=now}return rtn}}});require.register("component-queue/index.js",function(exports,require,module){var Emitter=require("emitter");module.exports=Queue;function Queue(options){options=options||{};this.timeout=options.timeout||0;this.concurrency=options.concurrency||1;this.pending=0;this.jobs=[]}Emitter(Queue.prototype);Queue.prototype.length=function(){return this.pending+this.jobs.length};Queue.prototype.push=function(fn,cb){this.jobs.push([fn,cb]);setTimeout(this.run.bind(this),0)};Queue.prototype.run=function(){while(this.pending<this.concurrency){var job=this.jobs.shift();if(!job)break;this.exec(job)}};Queue.prototype.exec=function(job){var self=this;var ms=this.timeout;var fn=job[0];var cb=job[1];if(ms)fn=timeout(fn,ms);this.pending++;fn(function(err,res){cb&&cb(err,res);self.pending--;self.run()})};function timeout(fn,ms){return function(cb){var done;var id=setTimeout(function(){done=true;var err=new Error("Timeout of "+ms+"ms exceeded");err.timeout=timeout;cb(err)},ms);fn(function(err,res){if(done)return;clearTimeout(id);cb(err,res)})}}});require.register("ianstormtaylor-to-no-case/index.js",function(exports,require,module){module.exports=toNoCase;var hasSpace=/\s/;var hasSeparator=/[\W_]/;function toNoCase(string){if(hasSpace.test(string))return string.toLowerCase();if(hasSeparator.test(string))return unseparate(string).toLowerCase();return uncamelize(string).toLowerCase()}var separatorSplitter=/[\W_]+(.|$)/g;function unseparate(string){return string.replace(separatorSplitter,function(m,next){return next?" "+next:""})}var camelSplitter=/(.)([A-Z]+)/g;function uncamelize(string){return string.replace(camelSplitter,function(m,previous,uppers){return previous+" "+uppers.toLowerCase().split("").join(" ")})}});require.register("ianstormtaylor-to-space-case/index.js",function(exports,require,module){var clean=require("to-no-case");module.exports=toSpaceCase;function toSpaceCase(string){return clean(string).replace(/[\W_]+(.|$)/g,function(matches,match){return match?" "+match:""})}});require.register("ianstormtaylor-to-snake-case/index.js",function(exports,require,module){var toSpace=require("to-space-case");module.exports=toSnakeCase;function toSnakeCase(string){return toSpace(string).replace(/\s/g,"_")}});require.register("segmentio-alias/index.js",function(exports,require,module){var type=require("type");try{var clone=require("clone")}catch(e){var clone=require("clone-component")}module.exports=alias;function alias(obj,method){switch(type(method)){case"object":return aliasByDictionary(clone(obj),method);case"function":return aliasByFunction(clone(obj),method)}}function aliasByDictionary(obj,aliases){for(var key in aliases){if(undefined===obj[key])continue;obj[aliases[key]]=obj[key];delete obj[key]}return obj}function aliasByFunction(obj,convert){var output={};for(var key in obj)output[convert(key)]=obj[key];return output}});require.register("segmentio-analytics.js-integration/lib/index.js",function(exports,require,module){var bind=require("bind");var callback=require("callback");var clone=require("clone");var debug=require("debug");var defaults=require("defaults");var protos=require("./protos");var slug=require("slug");var statics=require("./statics");module.exports=createIntegration;function createIntegration(name){function Integration(options){this.debug=debug("analytics:integration:"+slug(name));this.options=defaults(clone(options)||{},this.defaults);this._queue=[];this.once("ready",bind(this,this.flush));Integration.emit("construct",this);this._wrapInitialize();this._wrapLoad();this._wrapPage();this._wrapTrack()}Integration.prototype.defaults={};Integration.prototype.globals=[];Integration.prototype.name=name;for(var key in statics)Integration[key]=statics[key];for(var key in protos)Integration.prototype[key]=protos[key];return Integration}});require.register("segmentio-analytics.js-integration/lib/protos.js",function(exports,require,module){var normalize=require("to-no-case");var after=require("after");var callback=require("callback");var Emitter=require("emitter");var tick=require("next-tick");var events=require("./events");var type=require("type");Emitter(exports);exports.initialize=function(){this.load()};exports.loaded=function(){return false};exports.load=function(cb){callback.async(cb)};exports.page=function(page){};exports.track=function(track){};exports.map=function(obj,str){var a=normalize(str);var ret=[];if(!obj)return ret;if("object"==type(obj)){for(var k in obj){var item=obj[k];var b=normalize(k);if(b==a)ret.push(item)}}if("array"==type(obj)){if(!obj.length)return ret;if(!obj[0].key)return ret;for(var i=0;i<obj.length;++i){var item=obj[i];var b=normalize(item.key);if(b==a)ret.push(item.value)}}return ret};exports.invoke=function(method){if(!this[method])return;var args=[].slice.call(arguments,1);if(!this._ready)return this.queue(method,args);var ret;try{this.debug("%s with %o",method,args);ret=this[method].apply(this,args)}catch(e){this.debug("error %o calling %s with %o",e,method,args)}return ret};exports.queue=function(method,args){if("page"==method&&this._assumesPageview&&!this._initialized){return this.page.apply(this,args)}this._queue.push({method:method,args:args})};exports.flush=function(){this._ready=true;var call;while(call=this._queue.shift())this[call.method].apply(this,call.args)};exports.reset=function(){for(var i=0,key;key=this.globals[i];i++)window[key]=undefined};exports._wrapInitialize=function(){var initialize=this.initialize;this.initialize=function(){this.debug("initialize");this._initialized=true;var ret=initialize.apply(this,arguments);this.emit("initialize");var self=this;if(this._readyOnInitialize){tick(function(){self.emit("ready")})}return ret};if(this._assumesPageview)this.initialize=after(2,this.initialize)};exports._wrapLoad=function(){var load=this.load;this.load=function(callback){var self=this;this.debug("loading");if(this.loaded()){this.debug("already loaded");tick(function(){if(self._readyOnLoad)self.emit("ready");callback&&callback()});return}return load.call(this,function(err,e){self.debug("loaded");self.emit("load");if(self._readyOnLoad)self.emit("ready");callback&&callback(err,e)})}};exports._wrapPage=function(){var page=this.page;this.page=function(){if(this._assumesPageview&&!this._initialized){return this.initialize.apply(this,arguments)}return page.apply(this,arguments)}};exports._wrapTrack=function(){var t=this.track;this.track=function(track){var event=track.event();var called;var ret;for(var method in events){var regexp=events[method];if(!this[method])continue;if(!regexp.test(event))continue;ret=this[method].apply(this,arguments);called=true;break}if(!called)ret=t.apply(this,arguments);return ret}}});require.register("segmentio-analytics.js-integration/lib/events.js",function(exports,require,module){module.exports={removedProduct:/removed[ _]?product/i,viewedProduct:/viewed[ _]?product/i,addedProduct:/added[ _]?product/i,completedOrder:/completed[ _]?order/i}});require.register("segmentio-analytics.js-integration/lib/statics.js",function(exports,require,module){var after=require("after");var Emitter=require("emitter");Emitter(exports);exports.option=function(key,value){this.prototype.defaults[key]=value;return this};exports.mapping=function(name){this.option(name,[]);this.prototype[name]=function(str){return this.map(this.options[name],str)};return this};exports.global=function(key){this.prototype.globals.push(key);return this};exports.assumesPageview=function(){this.prototype._assumesPageview=true;return this};exports.readyOnLoad=function(){this.prototype._readyOnLoad=true;return this};exports.readyOnInitialize=function(){this.prototype._readyOnInitialize=true;return this}});require.register("segmentio-convert-dates/index.js",function(exports,require,module){var is=require("is");try{var clone=require("clone")}catch(e){var clone=require("clone-component")}module.exports=convertDates;function convertDates(obj,convert){obj=clone(obj);for(var key in obj){var val=obj[key];if(is.date(val))obj[key]=convert(val);if(is.object(val))obj[key]=convertDates(val,convert)}return obj}});require.register("segmentio-global-queue/index.js",function(exports,require,module){module.exports=generate;function generate(name,options){options=options||{};return function(args){args=[].slice.call(arguments);window[name]||(window[name]=[]);options.wrap===false?window[name].push.apply(window[name],args):window[name].push(args)}}});require.register("segmentio-load-date/index.js",function(exports,require,module){var time=new Date,perf=window.performance;if(perf&&perf.timing&&perf.timing.responseEnd){time=new Date(perf.timing.responseEnd)}module.exports=time});require.register("segmentio-load-script/index.js",function(exports,require,module){var type=require("type");module.exports=function loadScript(options,callback){if(!options)throw new Error("Cant load nothing...");if(type(options)==="string")options={src:options};var https=document.location.protocol==="https:"||document.location.protocol==="chrome-extension:";if(options.src&&options.src.indexOf("//")===0){options.src=https?"https:"+options.src:"http:"+options.src}if(https&&options.https)options.src=options.https;else if(!https&&options.http)options.src=options.http;var script=document.createElement("script");script.type="text/javascript";script.async=true;script.src=options.src;var firstScript=document.getElementsByTagName("script")[0];firstScript.parentNode.insertBefore(script,firstScript);if(callback&&type(callback)==="function"){if(script.addEventListener){script.addEventListener("load",function(event){callback(null,event)},false);script.addEventListener("error",function(event){callback(new Error("Failed to load the script."),event)},false)}else if(script.attachEvent){script.attachEvent("onreadystatechange",function(event){if(/complete|loaded/.test(script.readyState)){callback(null,event)}})}}return script}});require.register("segmentio-script-onload/index.js",function(exports,require,module){module.exports=function(el,fn){return el.addEventListener?add(el,fn):attach(el,fn)};function add(el,fn){el.addEventListener("load",function(_,e){fn(null,e)},false);el.addEventListener("error",function(e){var err=new Error('failed to load the script "'+el.src+'"');err.event=e;fn(err)},false)}function attach(el,fn){el.attachEvent("onreadystatechange",function(e){if(!/complete|loaded/.test(el.readyState))return;fn(null,e)})}});require.register("segmentio-on-body/index.js",function(exports,require,module){var each=require("each");var body=false;var callbacks=[];module.exports=function onBody(callback){if(body){call(callback)}else{callbacks.push(callback)}};var interval=setInterval(function(){if(!document.body)return;body=true;each(callbacks,call);clearInterval(interval)},5);function call(callback){callback(document.body)}});require.register("segmentio-on-error/index.js",function(exports,require,module){module.exports=onError;var callbacks=[];if("function"==typeof window.onerror)callbacks.push(window.onerror);window.onerror=handler;function handler(){for(var i=0,fn;fn=callbacks[i];i++)fn.apply(this,arguments)}function onError(fn){callbacks.push(fn);if(window.onerror!=handler){callbacks.push(window.onerror);window.onerror=handler}}});require.register("segmentio-to-iso-string/index.js",function(exports,require,module){module.exports=toIsoString;function toIsoString(date){return date.getUTCFullYear()+"-"+pad(date.getUTCMonth()+1)+"-"+pad(date.getUTCDate())+"T"+pad(date.getUTCHours())+":"+pad(date.getUTCMinutes())+":"+pad(date.getUTCSeconds())+"."+String((date.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}function pad(number){var n=number.toString();return n.length===1?"0"+n:n}});require.register("segmentio-to-unix-timestamp/index.js",function(exports,require,module){module.exports=toUnixTimestamp;function toUnixTimestamp(date){return Math.floor(date.getTime()/1e3)}});require.register("segmentio-use-https/index.js",function(exports,require,module){module.exports=function(url){switch(arguments.length){case 0:return check();case 1:return transform(url)}};function transform(url){return check()?"https:"+url:"http:"+url}function check(){return location.protocol=="https:"||location.protocol=="chrome-extension:"}});require.register("segmentio-when/index.js",function(exports,require,module){var callback=require("callback");module.exports=when;function when(condition,fn,interval){if(condition())return callback.async(fn);var ref=setInterval(function(){if(!condition())return;callback(fn);clearInterval(ref)},interval||10)}});require.register("yields-slug/index.js",function(exports,require,module){module.exports=function(str,options){options||(options={});return str.toLowerCase().replace(options.replace||/[^a-z0-9]/g," ").replace(/^ +| +$/g,"").replace(/ +/g,options.separator||"-")}});require.register("visionmedia-batch/index.js",function(exports,require,module){try{var EventEmitter=require("events").EventEmitter}catch(err){var Emitter=require("emitter")}function noop(){}module.exports=Batch;function Batch(){if(!(this instanceof Batch))return new Batch;this.fns=[];this.concurrency(Infinity);this.throws(true);for(var i=0,len=arguments.length;i<len;++i){this.push(arguments[i])}}if(EventEmitter){Batch.prototype.__proto__=EventEmitter.prototype}else{Emitter(Batch.prototype)}Batch.prototype.concurrency=function(n){this.n=n;return this};Batch.prototype.push=function(fn){this.fns.push(fn);return this};Batch.prototype.throws=function(throws){this.e=!!throws;return this};Batch.prototype.end=function(cb){var self=this,total=this.fns.length,pending=total,results=[],errors=[],cb=cb||noop,fns=this.fns,max=this.n,throws=this.e,index=0,done;if(!fns.length)return cb(null,results);function next(){var i=index++;var fn=fns[i];if(!fn)return;var start=new Date;try{fn(callback)}catch(err){callback(err)}function callback(err,res){if(done)return;if(err&&throws)return done=true,cb(err);var complete=total-pending+1;var end=new Date;results[i]=res;errors[i]=err;self.emit("progress",{index:i,value:res,error:err,pending:pending,total:total,complete:complete,percent:complete/total*100|0,start:start,end:end,duration:end-start});if(--pending)next();else if(!throws)cb(errors,results);else cb(null,results)}}for(var i=0;i<fns.length;i++){if(i==max)break;next()}return this}});require.register("segmentio-substitute/index.js",function(exports,require,module){module.exports=substitute;function substitute(str,obj,expr){if(!obj)throw new TypeError("expected an object");expr=expr||/:(\w+)/g;return str.replace(expr,function(_,prop){return null!=obj[prop]?obj[prop]:_})}});require.register("segmentio-load-pixel/index.js",function(exports,require,module){var stringify=require("querystring").stringify;var sub=require("substitute");module.exports=function(path){return function(query,obj,fn){if("function"==typeof obj)fn=obj,obj={};obj=obj||{};fn=fn||function(){};var url=sub(path,obj);var img=new Image;img.onerror=error(fn,"failed to load pixel",img);img.onload=function(){fn()};query=stringify(query);if(query)query="?"+query;img.src=url+query;img.width=1;img.height=1;return img}};function error(fn,message,img){return function(e){e=e||window.event;var err=new Error(message);err.event=e;err.source=img;fn(err)}}});require.register("segmentio-replace-document-write/index.js",function(exports,require,module){var domify=require("domify");module.exports=function(match,parent,fn){var write=document.write;document.write=append;if(typeof parent==="function")fn=parent,parent=null;if(!parent)parent=document.body;function append(str){var el=domify(str);var src=el.src||"";if(el.src.indexOf(match)===-1)return write(str);if("SCRIPT"==el.tagName)el=recreate(el);parent.appendChild(el);document.write=write;fn&&fn()}};function recreate(script){var ret=document.createElement("script");ret.src=script.src;ret.async=script.async;ret.defer=script.defer;return ret}});require.register("ianstormtaylor-to-camel-case/index.js",function(exports,require,module){var toSpace=require("to-space-case");module.exports=toCamelCase;function toCamelCase(string){return toSpace(string).replace(/\s(\w)/g,function(matches,letter){return letter.toUpperCase()})}});require.register("ianstormtaylor-to-capital-case/index.js",function(exports,require,module){var clean=require("to-no-case");module.exports=toCapitalCase;function toCapitalCase(string){return clean(string).replace(/(^|\s)(\w)/g,function(matches,previous,letter){return previous+letter.toUpperCase() })}});require.register("ianstormtaylor-to-constant-case/index.js",function(exports,require,module){var snake=require("to-snake-case");module.exports=toConstantCase;function toConstantCase(string){return snake(string).toUpperCase()}});require.register("ianstormtaylor-to-dot-case/index.js",function(exports,require,module){var toSpace=require("to-space-case");module.exports=toDotCase;function toDotCase(string){return toSpace(string).replace(/\s/g,".")}});require.register("ianstormtaylor-to-pascal-case/index.js",function(exports,require,module){var toSpace=require("to-space-case");module.exports=toPascalCase;function toPascalCase(string){return toSpace(string).replace(/(?:^|\s)(\w)/g,function(matches,letter){return letter.toUpperCase()})}});require.register("ianstormtaylor-to-sentence-case/index.js",function(exports,require,module){var clean=require("to-no-case");module.exports=toSentenceCase;function toSentenceCase(string){return clean(string).replace(/[a-z]/i,function(letter){return letter.toUpperCase()})}});require.register("ianstormtaylor-to-slug-case/index.js",function(exports,require,module){var toSpace=require("to-space-case");module.exports=toSlugCase;function toSlugCase(string){return toSpace(string).replace(/\s/g,"-")}});require.register("component-escape-regexp/index.js",function(exports,require,module){module.exports=function(str){return String(str).replace(/([.*+?=^!:${}()|[\]\/\\])/g,"\\$1")}});require.register("ianstormtaylor-map/index.js",function(exports,require,module){var each=require("each");module.exports=function map(obj,iterator){var arr=[];each(obj,function(o){arr.push(iterator.apply(null,arguments))});return arr}});require.register("ianstormtaylor-title-case-minors/index.js",function(exports,require,module){module.exports=["a","an","and","as","at","but","by","en","for","from","how","if","in","neither","nor","of","on","only","onto","out","or","per","so","than","that","the","to","until","up","upon","v","v.","versus","vs","vs.","via","when","with","without","yet"]});require.register("ianstormtaylor-to-title-case/index.js",function(exports,require,module){var capital=require("to-capital-case"),escape=require("escape-regexp"),map=require("map"),minors=require("title-case-minors");module.exports=toTitleCase;var escaped=map(minors,escape);var minorMatcher=new RegExp("[^^]\\b("+escaped.join("|")+")\\b","ig");var colonMatcher=/:\s*(\w)/g;function toTitleCase(string){return capital(string).replace(minorMatcher,function(minor){return minor.toLowerCase()}).replace(colonMatcher,function(letter){return letter.toUpperCase()})}});require.register("ianstormtaylor-case/lib/index.js",function(exports,require,module){var cases=require("./cases");module.exports=exports=determineCase;function determineCase(string){for(var key in cases){if(key=="none")continue;var convert=cases[key];if(convert(string)==string)return key}return null}exports.add=function(name,convert){exports[name]=cases[name]=convert};for(var key in cases){exports.add(key,cases[key])}});require.register("ianstormtaylor-case/lib/cases.js",function(exports,require,module){var camel=require("to-camel-case"),capital=require("to-capital-case"),constant=require("to-constant-case"),dot=require("to-dot-case"),none=require("to-no-case"),pascal=require("to-pascal-case"),sentence=require("to-sentence-case"),slug=require("to-slug-case"),snake=require("to-snake-case"),space=require("to-space-case"),title=require("to-title-case");exports.camel=camel;exports.pascal=pascal;exports.dot=dot;exports.slug=slug;exports.snake=snake;exports.space=space;exports.constant=constant;exports.capital=capital;exports.title=title;exports.sentence=sentence;exports.lower=function(string){return none(string).toLowerCase()};exports.upper=function(string){return none(string).toUpperCase()};exports.inverse=function(string){for(var i=0,char;char=string[i];i++){if(!/[a-z]/i.test(char))continue;var upper=char.toUpperCase();var lower=char.toLowerCase();string[i]=char==upper?lower:upper}return string};exports.none=none});require.register("segmentio-obj-case/index.js",function(exports,require,module){var Case=require("case");var cases=[Case.upper,Case.lower,Case.snake,Case.pascal,Case.camel,Case.constant,Case.title,Case.capital,Case.sentence];module.exports=module.exports.find=multiple(find);module.exports.replace=function(obj,key,val){multiple(replace).apply(this,arguments);return obj};module.exports.del=function(obj,key){multiple(del).apply(this,arguments);return obj};function multiple(fn){return function(obj,key,val){var keys=key.split(".");if(keys.length===0)return;while(keys.length>1){key=keys.shift();obj=find(obj,key);if(obj===null||obj===undefined)return}key=keys.shift();return fn(obj,key,val)}}function find(obj,key){for(var i=0;i<cases.length;i++){var cased=cases[i](key);if(obj.hasOwnProperty(cased))return obj[cased]}}function del(obj,key){for(var i=0;i<cases.length;i++){var cased=cases[i](key);if(obj.hasOwnProperty(cased))delete obj[cased]}return obj}function replace(obj,key,val){for(var i=0;i<cases.length;i++){var cased=cases[i](key);if(obj.hasOwnProperty(cased))obj[cased]=val}return obj}});require.register("segmentio-analytics.js-integrations/index.js",function(exports,require,module){var integrations=require("./lib/slugs");var each=require("each");each(integrations,function(slug){var plugin=require("./lib/"+slug);var name=plugin.Integration.prototype.name;exports[name]=plugin})});require.register("segmentio-analytics.js-integrations/lib/adroll.js",function(exports,require,module){var integration=require("integration");var is=require("is");var load=require("load-script");var user;var has=Object.prototype.hasOwnProperty;module.exports=exports=function(analytics){analytics.addIntegration(AdRoll);user=analytics.user()};var AdRoll=exports.Integration=integration("AdRoll").assumesPageview().readyOnLoad().global("__adroll_loaded").global("adroll_adv_id").global("adroll_pix_id").global("adroll_custom_data").option("events",{}).option("advId","").option("pixId","");AdRoll.prototype.initialize=function(page){window.adroll_adv_id=this.options.advId;window.adroll_pix_id=this.options.pixId;window.__adroll_loaded=true;this.load()};AdRoll.prototype.loaded=function(){return window.__adroll};AdRoll.prototype.load=function(callback){load({http:"http://a.adroll.com/j/roundtrip.js",https:"https://s.adroll.com/j/roundtrip.js"},callback)};AdRoll.prototype.track=function(track){var events=this.options.events;var total=track.revenue();var event=track.event();if(has.call(events,event))event=events[event];var data={adroll_conversion_value_in_dollars:total||0,order_id:track.orderId()||0,adroll_segments:event};if(user.id())data.user_id=user.id();window.__adroll.record_user(data)}});require.register("segmentio-analytics.js-integrations/lib/adwords.js",function(exports,require,module){var onbody=require("on-body");var integration=require("integration");var load=require("load-script");var domify=require("domify");var Queue=require("queue");module.exports=exports=function(analytics){analytics.addIntegration(AdWords)};var has=Object.prototype.hasOwnProperty;var q=new Queue({concurrency:1,timeout:2e3});var AdWords=exports.Integration=integration("AdWords").readyOnLoad().option("conversionId","").option("remarketing",false).option("events",{});AdWords.prototype.load=function(fn){onbody(fn)};AdWords.prototype.loaded=function(){return!!document.body};AdWords.prototype.page=function(page){var remarketing=this.options.remarketing;var id=this.options.conversionId;if(remarketing)this.remarketing(id)};AdWords.prototype.track=function(track){var id=this.options.conversionId;var events=this.options.events;var event=track.event();if(!has.call(events,event))return;return this.conversion({value:track.revenue()||0,label:events[event],conversionId:id})};AdWords.prototype.conversion=function(obj,fn){this.queue({google_conversion_id:obj.conversionId,google_conversion_language:"en",google_conversion_format:"3",google_conversion_color:"ffffff",google_conversion_label:obj.label,google_conversion_value:obj.value,google_remarketing_only:false},fn)};AdWords.prototype.remarketing=function(id){this.queue({google_conversion_id:id,google_remarketing_only:true})};AdWords.prototype.queue=function(obj,fn){this.debug("sending %o",obj);var self=this;q.push(function(next){self.globalize(obj);self.shim();load("//www.googleadservices.com/pagead/conversion.js",function(){if(fn)fn();next()})})};AdWords.prototype.globalize=function(obj){for(var name in obj){if(obj.hasOwnProperty(name)){window[name]=obj[name]}}};AdWords.prototype.shim=function(){var self=this;var write=document.write;document.write=append;function append(str){var el=domify(str);if(!el.src)return write(str);if(!/googleadservices/.test(el.src))return write(str);self.debug("append %o",el);document.body.appendChild(el);document.write=write}}});require.register("segmentio-analytics.js-integrations/lib/alexa.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Alexa)};var Alexa=exports.Integration=integration("Alexa").assumesPageview().readyOnLoad().global("_atrk_opts").option("account",null).option("domain","").option("dynamic",true);Alexa.prototype.initialize=function(page){window._atrk_opts={atrk_acct:this.options.account,domain:this.options.domain,dynamic:this.options.dynamic};this.load()};Alexa.prototype.loaded=function(){return!!window.atrk};Alexa.prototype.load=function(callback){load("//d31qbv1cthcecs.cloudfront.net/atrk.js",function(err){if(err)return callback(err);window.atrk();callback()})}});require.register("segmentio-analytics.js-integrations/lib/amplitude.js",function(exports,require,module){var callback=require("callback");var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Amplitude)};var Amplitude=exports.Integration=integration("Amplitude").assumesPageview().readyOnInitialize().global("amplitude").option("apiKey","").option("trackAllPages",false).option("trackNamedPages",true).option("trackCategorizedPages",true);Amplitude.prototype.initialize=function(page){(function(e,t){var r=e.amplitude||{};r._q=[];function i(e){r[e]=function(){r._q.push([e].concat(Array.prototype.slice.call(arguments,0)))}}var s=["init","logEvent","setUserId","setGlobalUserProperties","setVersionName","setDomain"];for(var c=0;c<s.length;c++){i(s[c])}e.amplitude=r})(window,document);window.amplitude.init(this.options.apiKey);this.load()};Amplitude.prototype.loaded=function(){return!!(window.amplitude&&window.amplitude.options)};Amplitude.prototype.load=function(callback){load("https://d24n15hnbwhuhn.cloudfront.net/libs/amplitude-1.1-min.js",callback)};Amplitude.prototype.page=function(page){var properties=page.properties();var category=page.category();var name=page.fullName();var opts=this.options;if(opts.trackAllPages){this.track(page.track())}if(category&&opts.trackCategorizedPages){this.track(page.track(category))}if(name&&opts.trackNamedPages){this.track(page.track(name))}};Amplitude.prototype.identify=function(identify){var id=identify.userId();var traits=identify.traits();if(id)window.amplitude.setUserId(id);if(traits)window.amplitude.setGlobalUserProperties(traits)};Amplitude.prototype.track=function(track){var props=track.properties();var event=track.event();window.amplitude.logEvent(event,props)}});require.register("segmentio-analytics.js-integrations/lib/appcues.js",function(exports,require,module){var integration=require("integration");var is=require("is");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Appcues)};var Appcues=exports.Integration=integration("Appcues").assumesPageview().readyOnLoad().global("Appcues").global("AppcuesIdentity").option("appcuesId","").option("userId","").option("userEmail","");Appcues.prototype.initialize=function(){this.load(function(){window.Appcues.init()})};Appcues.prototype.loaded=function(){return is.object(window.Appcues)};Appcues.prototype.load=function(callback){var script=load("//d2dubfq97s02eu.cloudfront.net/appcues-bundle.min.js",callback);script.setAttribute("data-appcues-id",this.options.appcuesId);script.setAttribute("data-user-id",this.options.userId);script.setAttribute("data-user-email",this.options.userEmail)};Appcues.prototype.identify=function(identify){window.Appcues.identify(identify.traits())}});require.register("segmentio-analytics.js-integrations/lib/awesm.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");var user;module.exports=exports=function(analytics){analytics.addIntegration(Awesm);user=analytics.user()};var Awesm=exports.Integration=integration("awe.sm").assumesPageview().readyOnLoad().global("AWESM").option("apiKey","").option("events",{});Awesm.prototype.initialize=function(page){window.AWESM={api_key:this.options.apiKey};this.load()};Awesm.prototype.loaded=function(){return!!window.AWESM._exists};Awesm.prototype.load=function(callback){var key=this.options.apiKey;load("//widgets.awe.sm/v3/widgets.js?key="+key+"&async=true",callback)};Awesm.prototype.track=function(track){var event=track.event();var goal=this.options.events[event];if(!goal)return;window.AWESM.convert(goal,track.cents(),null,user.id())}});require.register("segmentio-analytics.js-integrations/lib/awesomatic.js",function(exports,require,module){var integration=require("integration");var is=require("is");var load=require("load-script");var noop=function(){};var onBody=require("on-body");var user;module.exports=exports=function(analytics){analytics.addIntegration(Awesomatic);user=analytics.user()};var Awesomatic=exports.Integration=integration("Awesomatic").assumesPageview().global("Awesomatic").global("AwesomaticSettings").global("AwsmSetup").global("AwsmTmp").option("appId","");Awesomatic.prototype.initialize=function(page){var self=this;var id=user.id();var options=user.traits();options.appId=this.options.appId;if(id)options.user_id=id;this.load(function(){window.Awesomatic.initialize(options,function(){self.emit("ready")})})};Awesomatic.prototype.loaded=function(){return is.object(window.Awesomatic)};Awesomatic.prototype.load=function(callback){var url="https://1c817b7a15b6941337c0-dff9b5f4adb7ba28259631e99c3f3691.ssl.cf2.rackcdn.com/gen/embed.js";load(url,callback)}});require.register("segmentio-analytics.js-integrations/lib/bing-ads.js",function(exports,require,module){var integration=require("integration");module.exports=exports=function(analytics){analytics.addIntegration(Bing)};var has=Object.prototype.hasOwnProperty;var Bing=exports.Integration=integration("Bing Ads").readyOnInitialize().option("siteId","").option("domainId","").option("goals",{});Bing.prototype.track=function(track){var goals=this.options.goals;var traits=track.traits();var event=track.event();if(!has.call(goals,event))return;var goal=goals[event];return exports.load(goal,track.revenue(),this.options)};exports.load=function(goal,revenue,options){var iframe=document.createElement("iframe");iframe.src="//flex.msn.com/mstag/tag/"+options.siteId+"/analytics.html"+"?domainId="+options.domainId+"&revenue="+revenue||0+"&actionid="+goal;+"&dedup=1"+"&type=1";iframe.width=1;iframe.height=1;return iframe}});require.register("segmentio-analytics.js-integrations/lib/bronto.js",function(exports,require,module){var integration=require("integration");var Track=require("facade").Track;var load=require("load-script");var each=require("each");module.exports=exports=function(analytics){analytics.addIntegration(Bronto)};var Bronto=exports.Integration=integration("Bronto").readyOnLoad().global("__bta").option("siteId","").option("host","");Bronto.prototype.initialize=function(page){this.load()};Bronto.prototype.loaded=function(){return this.bta};Bronto.prototype.load=function(fn){var self=this;load("//p.bm23.com/bta.js",function(err){if(err)return fn(err);var opts=self.options;self.bta=new window.__bta(opts.siteId);if(opts.host)self.bta.setHost(opts.host);fn()})};Bronto.prototype.track=function(track){var revenue=track.revenue();var event=track.event();var type="number"==typeof revenue?"$":"t";this.bta.addConversionLegacy(type,event,revenue)};Bronto.prototype.completedOrder=function(track){var products=track.products();var props=track.properties();var items=[];each(products,function(product){var track=new Track({properties:product});items.push({item_id:track.id()||track.sku(),desc:product.description||track.name(),quantity:track.quantity(),amount:track.price()})});this.bta.addConversion({order_id:track.orderId(),date:props.date||new Date,items:items})}});require.register("segmentio-analytics.js-integrations/lib/bugherd.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(BugHerd)};var BugHerd=exports.Integration=integration("BugHerd").assumesPageview().readyOnLoad().global("BugHerdConfig").global("_bugHerd").option("apiKey","").option("showFeedbackTab",true);BugHerd.prototype.initialize=function(page){window.BugHerdConfig={feedback:{hide:!this.options.showFeedbackTab}};this.load()};BugHerd.prototype.loaded=function(){return!!window._bugHerd};BugHerd.prototype.load=function(callback){load("//www.bugherd.com/sidebarv2.js?apikey="+this.options.apiKey,callback)}});require.register("segmentio-analytics.js-integrations/lib/bugsnag.js",function(exports,require,module){var integration=require("integration");var is=require("is");var extend=require("extend");var load=require("load-script");var onError=require("on-error");module.exports=exports=function(analytics){analytics.addIntegration(Bugsnag)};var Bugsnag=exports.Integration=integration("Bugsnag").readyOnLoad().global("Bugsnag").option("apiKey","");Bugsnag.prototype.initialize=function(page){this.load()};Bugsnag.prototype.loaded=function(){return is.object(window.Bugsnag)};Bugsnag.prototype.load=function(callback){var apiKey=this.options.apiKey;load("//d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js",function(err){if(err)return callback(err);window.Bugsnag.apiKey=apiKey;callback()})};Bugsnag.prototype.identify=function(identify){window.Bugsnag.metaData=window.Bugsnag.metaData||{};extend(window.Bugsnag.metaData,identify.traits())}});require.register("segmentio-analytics.js-integrations/lib/chartbeat.js",function(exports,require,module){var integration=require("integration");var onBody=require("on-body");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Chartbeat)};var Chartbeat=exports.Integration=integration("Chartbeat").assumesPageview().readyOnLoad().global("_sf_async_config").global("_sf_endpt").global("pSUPERFLY").option("domain","").option("uid",null);Chartbeat.prototype.initialize=function(page){window._sf_async_config=this.options;onBody(function(){window._sf_endpt=(new Date).getTime()});this.load()};Chartbeat.prototype.loaded=function(){return!!window.pSUPERFLY};Chartbeat.prototype.load=function(callback){load({https:"https://a248.e.akamai.net/chartbeat.download.akamai.com/102508/js/chartbeat.js",http:"http://static.chartbeat.com/js/chartbeat.js"},callback)};Chartbeat.prototype.page=function(page){var props=page.properties();var name=page.fullName();window.pSUPERFLY.virtualPage(props.path,name||props.title)}});require.register("segmentio-analytics.js-integrations/lib/churnbee.js",function(exports,require,module){var push=require("global-queue")("_cbq");var integration=require("integration");var load=require("load-script");var has=Object.prototype.hasOwnProperty;var supported={activation:true,changePlan:true,register:true,refund:true,charge:true,cancel:true,login:true};module.exports=exports=function(analytics){analytics.addIntegration(ChurnBee)};var ChurnBee=exports.Integration=integration("ChurnBee").readyOnInitialize().global("_cbq").global("ChurnBee").option("events",{}).option("apiKey","");ChurnBee.prototype.initialize=function(page){push("_setApiKey",this.options.apiKey);this.load()};ChurnBee.prototype.loaded=function(){return!!window.ChurnBee};ChurnBee.prototype.load=function(fn){load("//api.churnbee.com/cb.js",fn)};ChurnBee.prototype.track=function(track){var events=this.options.events;var event=track.event();if(has.call(events,event))event=events[event];if(true!=supported[event])return;push(event,track.properties({revenue:"amount"}))}});require.register("segmentio-analytics.js-integrations/lib/clicky.js",function(exports,require,module){var Identify=require("facade").Identify;var extend=require("extend");var integration=require("integration");var is=require("is");var load=require("load-script");var user;module.exports=exports=function(analytics){analytics.addIntegration(Clicky);user=analytics.user()};var Clicky=exports.Integration=integration("Clicky").assumesPageview().readyOnLoad().global("clicky").global("clicky_site_ids").global("clicky_custom").option("siteId",null);Clicky.prototype.initialize=function(page){window.clicky_site_ids=window.clicky_site_ids||[this.options.siteId];this.identify(new Identify({userId:user.id(),traits:user.traits()}));this.load()};Clicky.prototype.loaded=function(){return is.object(window.clicky)};Clicky.prototype.load=function(callback){load("//static.getclicky.com/js",callback)};Clicky.prototype.page=function(page){var properties=page.properties();var category=page.category();var name=page.fullName();window.clicky.log(properties.path,name||properties.title)};Clicky.prototype.identify=function(identify){window.clicky_custom=window.clicky_custom||{};window.clicky_custom.session=window.clicky_custom.session||{};extend(window.clicky_custom.session,identify.traits())};Clicky.prototype.track=function(track){window.clicky.goal(track.event(),track.revenue())}});require.register("segmentio-analytics.js-integrations/lib/comscore.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Comscore)};var Comscore=exports.Integration=integration("comScore").assumesPageview().readyOnLoad().global("_comscore").global("COMSCORE").option("c1","2").option("c2","");Comscore.prototype.initialize=function(page){window._comscore=window._comscore||[this.options];this.load()};Comscore.prototype.loaded=function(){return!!window.COMSCORE};Comscore.prototype.load=function(callback){load({http:"http://b.scorecardresearch.com/beacon.js",https:"https://sb.scorecardresearch.com/beacon.js"},callback)}});require.register("segmentio-analytics.js-integrations/lib/crazy-egg.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(CrazyEgg)};var CrazyEgg=exports.Integration=integration("Crazy Egg").assumesPageview().readyOnLoad().global("CE2").option("accountNumber","");CrazyEgg.prototype.initialize=function(page){this.load()};CrazyEgg.prototype.loaded=function(){return!!window.CE2};CrazyEgg.prototype.load=function(callback){var number=this.options.accountNumber;var path=number.slice(0,4)+"/"+number.slice(4);var cache=Math.floor((new Date).getTime()/36e5);var url="//dnn506yrbagrg.cloudfront.net/pages/scripts/"+path+".js?"+cache;load(url,callback)}});require.register("segmentio-analytics.js-integrations/lib/curebit.js",function(exports,require,module){var push=require("global-queue")("_curebitq");var integration=require("integration");var Identify=require("facade").Identify;var throttle=require("throttle");var Track=require("facade").Track;var iso=require("to-iso-string");var load=require("load-script");var clone=require("clone");var each=require("each");var bind=require("bind");var user;module.exports=exports=function(analytics){analytics.addIntegration(Curebit);user=analytics.user()};var Curebit=exports.Integration=integration("Curebit").readyOnLoad().global("_curebitq").global("curebit").option("siteId","").option("iframeWidth","100%").option("iframeHeight","480").option("iframeBorder",0).option("iframeId","curebit_integration").option("responsive",true).option("device","").option("insertIntoId","").option("campaigns",{}).option("server","https://www.curebit.com");Curebit.prototype.initialize=function(page){this.page=throttle(bind(this,this.page),250);var data={site_id:this.options.siteId,server:this.options.server};push("init",data);this.load()};Curebit.prototype.loaded=function(){return!!window.curebit};Curebit.prototype.load=function(fn){var url="//d2jjzw81hqbuqv.cloudfront.net/integration/curebit-1.0.min.js";load(url,fn)};Curebit.prototype.page=function(page){var campaigns=this.options.campaigns;var path=window.location.pathname;if(!campaigns[path])return;var tags=(campaigns[path]||"").split(",");if(!tags.length)return;var settings={responsive:this.options.responsive,device:this.options.device,campaign_tags:tags,iframe:{width:this.options.iframeWidth,height:this.options.iframeHeight,id:this.options.iframeId,frameborder:this.options.iframeBorder,container:this.options.insertIntoId}};var identify=new Identify({userId:user.id(),traits:user.traits()});if(identify.email()){settings.affiliate_member={email:identify.email(),first_name:identify.firstName(),last_name:identify.lastName(),customer_id:identify.userId()}}push("register_affiliate",settings)};Curebit.prototype.completedOrder=function(track){var orderId=track.orderId();var products=track.products();var props=track.properties();var items=[];var identify=new Identify({traits:user.traits(),userId:user.id()});each(products,function(product){var track=new Track({properties:product});items.push({product_id:track.id()||track.sku(),quantity:track.quantity(),image_url:product.image,price:track.price(),title:track.name(),url:product.url})});push("register_purchase",{order_date:iso(props.date||new Date),order_number:orderId,coupon_code:track.coupon(),subtotal:track.total(),customer_id:identify.userId(),first_name:identify.firstName(),last_name:identify.lastName(),email:identify.email(),items:items})}});require.register("segmentio-analytics.js-integrations/lib/customerio.js",function(exports,require,module){var alias=require("alias");var callback=require("callback");var convertDates=require("convert-dates");var Identify=require("facade").Identify;var integration=require("integration");var load=require("load-script");var user;module.exports=exports=function(analytics){analytics.addIntegration(Customerio);user=analytics.user()};var Customerio=exports.Integration=integration("Customer.io").assumesPageview().readyOnInitialize().global("_cio").option("siteId","");Customerio.prototype.initialize=function(page){window._cio=window._cio||[];(function(){var a,b,c;a=function(f){return function(){window._cio.push([f].concat(Array.prototype.slice.call(arguments,0)))}};b=["identify","track"];for(c=0;c<b.length;c++){window._cio[b[c]]=a(b[c])}})();this.load()};Customerio.prototype.loaded=function(){return!!(window._cio&&window._cio.pageHasLoaded)};Customerio.prototype.load=function(callback){var script=load("https://assets.customer.io/assets/track.js",callback);script.id="cio-tracker";script.setAttribute("data-site-id",this.options.siteId)};Customerio.prototype.identify=function(identify){if(!identify.userId())return this.debug("user id required");var traits=identify.traits({created:"created_at"});traits=convertDates(traits,convertDate);window._cio.identify(traits)};Customerio.prototype.group=function(group){var traits=group.traits();traits=alias(traits,function(trait){return"Group "+trait});this.identify(new Identify({userId:user.id(),traits:traits}))};Customerio.prototype.track=function(track){var properties=track.properties();properties=convertDates(properties,convertDate);window._cio.track(track.event(),properties)};function convertDate(date){return Math.floor(date.getTime()/1e3)}});require.register("segmentio-analytics.js-integrations/lib/drip.js",function(exports,require,module){var alias=require("alias");var integration=require("integration");var is=require("is");var load=require("load-script");var push=require("global-queue")("_dcq");module.exports=exports=function(analytics){analytics.addIntegration(Drip)};var Drip=exports.Integration=integration("Drip").assumesPageview().readyOnLoad().global("dc").global("_dcq").global("_dcs").option("account","");Drip.prototype.initialize=function(page){window._dcq=window._dcq||[];window._dcs=window._dcs||{};window._dcs.account=this.options.account;this.load()};Drip.prototype.loaded=function(){return is.object(window.dc)};Drip.prototype.load=function(callback){load("//tag.getdrip.com/"+this.options.account+".js",callback)};Drip.prototype.track=function(track){var props=track.properties();var cents=Math.round(track.cents());props.action=track.event();if(cents)props.value=cents;delete props.revenue;push("track",props)}});require.register("segmentio-analytics.js-integrations/lib/errorception.js",function(exports,require,module){var callback=require("callback");var extend=require("extend");var integration=require("integration");var load=require("load-script");var onError=require("on-error");var push=require("global-queue")("_errs");module.exports=exports=function(analytics){analytics.addIntegration(Errorception)};var Errorception=exports.Integration=integration("Errorception").assumesPageview().readyOnInitialize().global("_errs").option("projectId","").option("meta",true);Errorception.prototype.initialize=function(page){window._errs=window._errs||[this.options.projectId];onError(push);this.load()};Errorception.prototype.loaded=function(){return!!(window._errs&&window._errs.push!==Array.prototype.push)};Errorception.prototype.load=function(callback){load("//beacon.errorception.com/"+this.options.projectId+".js",callback)};Errorception.prototype.identify=function(identify){if(!this.options.meta)return;var traits=identify.traits();window._errs=window._errs||[];window._errs.meta=window._errs.meta||{};extend(window._errs.meta,traits)}});require.register("segmentio-analytics.js-integrations/lib/evergage.js",function(exports,require,module){var each=require("each");var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_aaq");module.exports=exports=function(analytics){analytics.addIntegration(Evergage)};var Evergage=exports.Integration=integration("Evergage").assumesPageview().readyOnInitialize().global("_aaq").option("account","").option("dataset","");Evergage.prototype.initialize=function(page){var account=this.options.account;var dataset=this.options.dataset;window._aaq=window._aaq||[];push("setEvergageAccount",account);push("setDataset",dataset);push("setUseSiteConfig",true);this.load()};Evergage.prototype.loaded=function(){return!!(window._aaq&&window._aaq.push!==Array.prototype.push)};Evergage.prototype.load=function(callback){var account=this.options.account;var dataset=this.options.dataset;var url="//cdn.evergage.com/beacon/"+account+"/"+dataset+"/scripts/evergage.min.js";load(url,callback)};Evergage.prototype.page=function(page){var props=page.properties();var name=page.name();if(name)push("namePage",name);each(props,function(key,value){push("setCustomField",key,value,"page")});window.Evergage.init(true)};Evergage.prototype.identify=function(identify){var id=identify.userId();if(!id)return;push("setUser",id);var traits=identify.traits({email:"userEmail",name:"userName"});each(traits,function(key,value){push("setUserField",key,value,"page")})};Evergage.prototype.group=function(group){var props=group.traits();var id=group.groupId();if(!id)return;push("setCompany",id);each(props,function(key,value){push("setAccountField",key,value,"page")})};Evergage.prototype.track=function(track){push("trackAction",track.event(),track.properties())}});require.register("segmentio-analytics.js-integrations/lib/facebook-ads.js",function(exports,require,module){var load=require("load-script");var integration=require("integration"); var push=require("global-queue")("_fbq");module.exports=exports=function(analytics){analytics.addIntegration(Facebook)};var has=Object.prototype.hasOwnProperty;var Facebook=exports.Integration=integration("Facebook Ads").readyOnInitialize().global("_fbq").option("currency","USD").option("events",{});Facebook.prototype.initialize=function(page){window._fbq=window._fbq||[];this.load()};Facebook.prototype.load=function(fn){load("//connect.facebook.net/en_US/fbds.js",fn);window._fbq.loaded=true};Facebook.prototype.loaded=function(){return!!window._fbq.loaded};Facebook.prototype.track=function(track){var events=this.options.events;var traits=track.traits();var event=track.event();var revenue=track.revenue()||0;if(!has.call(events,event))return;push("track",events[event],{value:String(revenue.toFixed(2)),currency:this.options.currency})}});require.register("segmentio-analytics.js-integrations/lib/foxmetrics.js",function(exports,require,module){var push=require("global-queue")("_fxm");var integration=require("integration");var Track=require("facade").Track;var callback=require("callback");var load=require("load-script");var each=require("each");module.exports=exports=function(analytics){analytics.addIntegration(FoxMetrics)};var FoxMetrics=exports.Integration=integration("FoxMetrics").assumesPageview().readyOnInitialize().global("_fxm").option("appId","");FoxMetrics.prototype.initialize=function(page){window._fxm=window._fxm||[];this.load()};FoxMetrics.prototype.loaded=function(){return!!(window._fxm&&window._fxm.appId)};FoxMetrics.prototype.load=function(callback){var id=this.options.appId;load("//d35tca7vmefkrc.cloudfront.net/scripts/"+id+".js",callback)};FoxMetrics.prototype.page=function(page){var properties=page.proxy("properties");var category=page.category();var name=page.name();this._category=category;push("_fxm.pages.view",properties.title,name,category,properties.url,properties.referrer)};FoxMetrics.prototype.identify=function(identify){var id=identify.userId();if(!id)return;push("_fxm.visitor.profile",id,identify.firstName(),identify.lastName(),identify.email(),identify.address(),undefined,undefined,identify.traits())};FoxMetrics.prototype.track=function(track){var props=track.properties();var category=this._category||props.category;push(track.event(),category,props)};FoxMetrics.prototype.viewedProduct=function(track){ecommerce("productview",track)};FoxMetrics.prototype.removedProduct=function(track){ecommerce("removecartitem",track)};FoxMetrics.prototype.addedProduct=function(track){ecommerce("cartitem",track)};FoxMetrics.prototype.completedOrder=function(track){var orderId=track.orderId();push("_fxm.ecommerce.order",orderId,track.subtotal(),track.shipping(),track.tax(),track.city(),track.state(),track.zip(),track.quantity());each(track.products(),function(product){var track=new Track({properties:product});ecommerce("purchaseitem",track,[track.quantity(),track.price(),orderId])})};function ecommerce(event,track,arr){push.apply(null,["_fxm.ecommerce."+event,track.id()||track.sku(),track.name(),track.category()].concat(arr||[]))}});require.register("segmentio-analytics.js-integrations/lib/frontleaf.js",function(exports,require,module){var callback=require("callback");var integration=require("integration");var is=require("is");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Frontleaf)};var Frontleaf=exports.Integration=integration("Frontleaf").assumesPageview().readyOnInitialize().global("_fl").global("_flBaseUrl").option("baseUrl","https://api.frontleaf.com").option("token","").option("stream","");Frontleaf.prototype.initialize=function(page){window._fl=window._fl||[];window._flBaseUrl=window._flBaseUrl||this.options.baseUrl;this._push("setApiToken",this.options.token);this._push("setStream",this.options.stream);this.load()};Frontleaf.prototype.loaded=function(){return is.array(window._fl)&&window._fl.ready===true};Frontleaf.prototype.load=function(fn){if(document.getElementById("_fl"))return callback.async(fn);var script=load(window._flBaseUrl+"/lib/tracker.js",fn);script.id="_fl"};Frontleaf.prototype.identify=function(identify){var userId=identify.userId();if(userId){this._push("setUser",{id:userId,name:identify.name()||identify.username(),data:clean(identify.traits())})}};Frontleaf.prototype.group=function(group){var groupId=group.groupId();if(groupId){this._push("setAccount",{id:groupId,name:group.proxy("traits.name"),data:clean(group.traits())})}};Frontleaf.prototype.track=function(track){var event=track.event();if(event){this._push("event",event,clean(track.properties()))}};Frontleaf.prototype._push=function(command){var args=[].slice.call(arguments,1);window._fl.push(function(t){t[command].apply(command,args)})};function clean(obj){var ret={};var excludeKeys=["id","name","firstName","lastName"];var len=excludeKeys.length;for(var i=0;i<len;i++){clear(obj,excludeKeys[i])}obj=flatten(obj);for(var key in obj){var val=obj[key];if(null==val){continue}if(is.array(val)){ret[key]=val.toString();continue}ret[key]=val}return ret}function clear(obj,key){if(obj.hasOwnProperty(key)){delete obj[key]}}function flatten(source){var output={};function step(object,prev){for(var key in object){var value=object[key];var newKey=prev?prev+" "+key:key;if(!is.array(value)&&is.object(value)){return step(value,newKey)}output[newKey]=value}}step(source);return output}});require.register("segmentio-analytics.js-integrations/lib/gauges.js",function(exports,require,module){var callback=require("callback");var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_gauges");module.exports=exports=function(analytics){analytics.addIntegration(Gauges)};var Gauges=exports.Integration=integration("Gauges").assumesPageview().readyOnInitialize().global("_gauges").option("siteId","");Gauges.prototype.initialize=function(page){window._gauges=window._gauges||[];this.load()};Gauges.prototype.loaded=function(){return!!(window._gauges&&window._gauges.push!==Array.prototype.push)};Gauges.prototype.load=function(callback){var id=this.options.siteId;var script=load("//secure.gaug.es/track.js",callback);script.id="gauges-tracker";script.setAttribute("data-site-id",id)};Gauges.prototype.page=function(page){push("track")}});require.register("segmentio-analytics.js-integrations/lib/get-satisfaction.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");var onBody=require("on-body");module.exports=exports=function(analytics){analytics.addIntegration(GetSatisfaction)};var GetSatisfaction=exports.Integration=integration("Get Satisfaction").assumesPageview().readyOnLoad().global("GSFN").option("widgetId","");GetSatisfaction.prototype.initialize=function(page){var widget=this.options.widgetId;var div=document.createElement("div");var id=div.id="getsat-widget-"+widget;onBody(function(body){body.appendChild(div)});this.load(function(){window.GSFN.loadWidget(widget,{containerId:id})})};GetSatisfaction.prototype.loaded=function(){return!!window.GSFN};GetSatisfaction.prototype.load=function(callback){load("https://loader.engage.gsfn.us/loader.js",callback)}});require.register("segmentio-analytics.js-integrations/lib/google-analytics.js",function(exports,require,module){var callback=require("callback");var canonical=require("canonical");var each=require("each");var integration=require("integration");var is=require("is");var load=require("load-script");var push=require("global-queue")("_gaq");var Track=require("facade").Track;var length=require("object").length;var keys=require("object").keys;var dot=require("obj-case");var type=require("type");var url=require("url");var group;var user;module.exports=exports=function(analytics){analytics.addIntegration(GA);group=analytics.group();user=analytics.user()};var GA=exports.Integration=integration("Google Analytics").readyOnLoad().global("ga").global("gaplugins").global("_gaq").global("GoogleAnalyticsObject").option("anonymizeIp",false).option("classic",false).option("domain","none").option("doubleClick",false).option("enhancedLinkAttribution",false).option("ignoredReferrers",null).option("includeSearch",false).option("siteSpeedSampleRate",1).option("trackingId","").option("trackNamedPages",true).option("trackCategorizedPages",true).option("sendUserId",false).option("metrics",{}).option("dimensions",{});GA.on("construct",function(integration){if(!integration.options.classic)return;integration.initialize=integration.initializeClassic;integration.load=integration.loadClassic;integration.loaded=integration.loadedClassic;integration.page=integration.pageClassic;integration.track=integration.trackClassic;integration.completedOrder=integration.completedOrderClassic});GA.prototype.initialize=function(){var opts=this.options;window.GoogleAnalyticsObject="ga";window.ga=window.ga||function(){window.ga.q=window.ga.q||[];window.ga.q.push(arguments)};window.ga.l=(new Date).getTime();window.ga("create",opts.trackingId,{cookieDomain:opts.domain||GA.prototype.defaults.domain,siteSpeedSampleRate:opts.siteSpeedSampleRate,allowLinker:true});if(opts.doubleClick){window.ga("require","displayfeatures")}if(opts.sendUserId&&user.id()){window.ga("set","&uid",user.id())}if(opts.anonymizeIp)window.ga("set","anonymizeIp",true);var custom=metrics(user.traits(),opts);if(length(custom))window.ga("set",custom);this.load()};GA.prototype.loaded=function(){return!!window.gaplugins};GA.prototype.load=function(callback){load("//www.google-analytics.com/analytics.js",callback)};GA.prototype.page=function(page){var category=page.category();var props=page.properties();var name=page.fullName();var pageview={};var track;this._category=category;window.ga("send","pageview",{page:path(props,this.options),title:name||props.title,location:props.url});if(category&&this.options.trackCategorizedPages){track=page.track(category);this.track(track,{noninteraction:true})}if(name&&this.options.trackNamedPages){track=page.track(name);this.track(track,{noninteraction:true})}};GA.prototype.track=function(track,options){var opts=options||track.options(this.name);var props=track.properties();window.ga("send","event",{eventAction:track.event(),eventCategory:props.category||this._category||"All",eventLabel:props.label,eventValue:formatValue(props.value||track.revenue()),nonInteraction:props.noninteraction||opts.noninteraction})};GA.prototype.completedOrder=function(track){var total=track.total()||track.revenue()||0;var orderId=track.orderId();var products=track.products();var props=track.properties();if(!orderId)return;if(!this.ecommerce){window.ga("require","ecommerce","ecommerce.js");this.ecommerce=true}window.ga("ecommerce:addTransaction",{affiliation:props.affiliation,shipping:track.shipping(),revenue:total,tax:track.tax(),id:orderId});each(products,function(product){var track=new Track({properties:product});window.ga("ecommerce:addItem",{category:track.category(),quantity:track.quantity(),price:track.price(),name:track.name(),sku:track.sku(),id:orderId})});window.ga("ecommerce:send")};GA.prototype.initializeClassic=function(){var opts=this.options;var anonymize=opts.anonymizeIp;var db=opts.doubleClick;var domain=opts.domain;var enhanced=opts.enhancedLinkAttribution;var ignore=opts.ignoredReferrers;var sample=opts.siteSpeedSampleRate;window._gaq=window._gaq||[];push("_setAccount",opts.trackingId);push("_setAllowLinker",true);if(anonymize)push("_gat._anonymizeIp");if(domain)push("_setDomainName",domain);if(sample)push("_setSiteSpeedSampleRate",sample);if(enhanced){var protocol="https:"===document.location.protocol?"https:":"http:";var pluginUrl=protocol+"//www.google-analytics.com/plugins/ga/inpage_linkid.js";push("_require","inpage_linkid",pluginUrl)}if(ignore){if(!is.array(ignore))ignore=[ignore];each(ignore,function(domain){push("_addIgnoredRef",domain)})}this.load()};GA.prototype.loadedClassic=function(){return!!(window._gaq&&window._gaq.push!==Array.prototype.push)};GA.prototype.loadClassic=function(callback){if(this.options.doubleClick){load("//stats.g.doubleclick.net/dc.js",callback)}else{load({http:"http://www.google-analytics.com/ga.js",https:"https://ssl.google-analytics.com/ga.js"},callback)}};GA.prototype.pageClassic=function(page){var opts=page.options(this.name);var category=page.category();var props=page.properties();var name=page.fullName();var track;push("_trackPageview",path(props,this.options));if(category&&this.options.trackCategorizedPages){track=page.track(category);this.track(track,{noninteraction:true})}if(name&&this.options.trackNamedPages){track=page.track(name);this.track(track,{noninteraction:true})}};GA.prototype.trackClassic=function(track,options){var opts=options||track.options(this.name);var props=track.properties();var revenue=track.revenue();var event=track.event();var category=this._category||props.category||"All";var label=props.label;var value=formatValue(revenue||props.value);var noninteraction=props.noninteraction||opts.noninteraction;push("_trackEvent",category,event,label,value,noninteraction)};GA.prototype.completedOrderClassic=function(track){var total=track.total()||track.revenue()||0;var orderId=track.orderId();var products=track.products()||[];var props=track.properties();if(!orderId)return;push("_addTrans",orderId,props.affiliation,total,track.tax(),track.shipping(),track.city(),track.state(),track.country());each(products,function(product){var track=new Track({properties:product});push("_addItem",orderId,track.sku(),track.name(),track.category(),track.price(),track.quantity())});push("_trackTrans")};function path(properties,options){if(!properties)return;var str=properties.path;if(options.includeSearch&&properties.search)str+=properties.search;return str}function formatValue(value){if(!value||value<0)return 0;return Math.round(value)}function metrics(obj,data){var dimensions=data.dimensions;var metrics=data.metrics;var names=keys(metrics).concat(keys(dimensions));var ret={};for(var i=0;i<names.length;++i){var name=names[i];var key=metrics[name]||dimensions[name];var value=dot(obj,name);if(null==value)continue;ret[key]=value}return ret}});require.register("segmentio-analytics.js-integrations/lib/google-tag-manager.js",function(exports,require,module){var push=require("global-queue")("dataLayer",{wrap:false});var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(GTM)};var GTM=exports.Integration=integration("Google Tag Manager").assumesPageview().readyOnLoad().global("dataLayer").global("google_tag_manager").option("containerId","").option("trackNamedPages",true).option("trackCategorizedPages",true);GTM.prototype.initialize=function(){this.load()};GTM.prototype.loaded=function(){return!!(window.dataLayer&&[].push!=window.dataLayer.push)};GTM.prototype.load=function(fn){var id=this.options.containerId;push({"gtm.start":+new Date,event:"gtm.js"});load("//www.googletagmanager.com/gtm.js?id="+id+"&l=dataLayer",fn)};GTM.prototype.page=function(page){var category=page.category();var props=page.properties();var name=page.fullName();var opts=this.options;var track;if(opts.trackAllPages){this.track(page.track())}if(category&&opts.trackCategorizedPages){this.track(page.track(category))}if(name&&opts.trackNamedPages){this.track(page.track(name))}};GTM.prototype.track=function(track){var props=track.properties();props.event=track.event();push(props)}});require.register("segmentio-analytics.js-integrations/lib/gosquared.js",function(exports,require,module){var Identify=require("facade").Identify;var Track=require("facade").Track;var callback=require("callback");var integration=require("integration");var load=require("load-script");var onBody=require("on-body");var each=require("each");var user;module.exports=exports=function(analytics){analytics.addIntegration(GoSquared);user=analytics.user()};var GoSquared=exports.Integration=integration("GoSquared").assumesPageview().readyOnLoad().global("_gs").option("siteToken","").option("anonymizeIP",false).option("cookieDomain",null).option("useCookies",true).option("trackHash",false).option("trackLocal",false).option("trackParams",true);GoSquared.prototype.initialize=function(page){var self=this;var options=this.options;push(options.siteToken);each(options,function(name,value){if("siteToken"==name)return;if(null==value)return;push("set",name,value)});self.identify(new Identify({traits:user.traits(),userId:user.id()}));self.load()};GoSquared.prototype.loaded=function(){return!!(window._gs&&window._gs.v)};GoSquared.prototype.load=function(callback){load("//d1l6p2sc9645hc.cloudfront.net/tracker.js",callback)};GoSquared.prototype.page=function(page){var props=page.properties();var name=page.fullName();push("track",props.path,name||props.title)};GoSquared.prototype.identify=function(identify){var traits=identify.traits({userId:"userID"});var username=identify.username();var email=identify.email();var id=identify.userId();if(id)push("set","visitorID",id);var name=email||username||id;if(name)push("set","visitorName",name);push("set","visitor",traits)};GoSquared.prototype.track=function(track){push("event",track.event(),track.properties())};GoSquared.prototype.completedOrder=function(track){var products=track.products();var items=[];each(products,function(product){var track=new Track({properties:product});items.push({category:track.category(),quantity:track.quantity(),price:track.price(),name:track.name()})});push("transaction",track.orderId(),{revenue:track.total(),track:true},items)};function push(){var _gs=window._gs=window._gs||function(){(_gs.q=_gs.q||[]).push(arguments)};_gs.apply(null,arguments)}});require.register("segmentio-analytics.js-integrations/lib/heap.js",function(exports,require,module){var alias=require("alias");var callback=require("callback");var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Heap)};var Heap=exports.Integration=integration("Heap").assumesPageview().readyOnInitialize().global("heap").global("_heapid").option("apiKey","");Heap.prototype.initialize=function(page){window.heap=window.heap||[];window.heap.load=function(a){window._heapid=a;var d=function(a){return function(){window.heap.push([a].concat(Array.prototype.slice.call(arguments,0)))}},e=["identify","track"];for(var f=0;f<e.length;f++)window.heap[e[f]]=d(e[f])};window.heap.load(this.options.apiKey);this.load()};Heap.prototype.loaded=function(){return window.heap&&window.heap.appid};Heap.prototype.load=function(callback){load("//d36lvucg9kzous.cloudfront.net",callback)};Heap.prototype.identify=function(identify){var traits=identify.traits();var username=identify.username();var id=identify.userId();var handle=username||id;if(handle)traits.handle=handle;delete traits.username;window.heap.identify(traits)};Heap.prototype.track=function(track){window.heap.track(track.event(),track.properties())}});require.register("segmentio-analytics.js-integrations/lib/hellobar.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Hellobar)};var Hellobar=exports.Integration=integration("Hello Bar").assumesPageview().readyOnInitialize().global("_hbq").option("apiKey","");Hellobar.prototype.initialize=function(page){window._hbq=window._hbq||[];this.load()};Hellobar.prototype.load=function(callback){var url="//s3.amazonaws.com/scripts.hellobar.com/"+this.options.apiKey+".js";load(url,callback)};Hellobar.prototype.loaded=function(){return!!(window._hbq&&window._hbq.push!==Array.prototype.push)}});require.register("segmentio-analytics.js-integrations/lib/hittail.js",function(exports,require,module){var integration=require("integration");var is=require("is");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(HitTail)};var HitTail=exports.Integration=integration("HitTail").assumesPageview().readyOnLoad().global("htk").option("siteId","");HitTail.prototype.initialize=function(page){this.load()};HitTail.prototype.loaded=function(){return is.fn(window.htk)};HitTail.prototype.load=function(callback){var id=this.options.siteId;load("//"+id+".hittail.com/mlt.js",callback)}});require.register("segmentio-analytics.js-integrations/lib/hubspot.js",function(exports,require,module){var callback=require("callback");var convert=require("convert-dates");var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_hsq");module.exports=exports=function(analytics){analytics.addIntegration(HubSpot)};var HubSpot=exports.Integration=integration("HubSpot").assumesPageview().readyOnInitialize().global("_hsq").option("portalId",null);HubSpot.prototype.initialize=function(page){window._hsq=[];this.load()};HubSpot.prototype.loaded=function(){return!!(window._hsq&&window._hsq.push!==Array.prototype.push)};HubSpot.prototype.load=function(fn){if(document.getElementById("hs-analytics"))return callback.async(fn);var id=this.options.portalId;var cache=Math.ceil(new Date/3e5)*3e5;var url="https://js.hs-analytics.net/analytics/"+cache+"/"+id+".js";var script=load(url,fn);script.id="hs-analytics"};HubSpot.prototype.page=function(page){push("_trackPageview")};HubSpot.prototype.identify=function(identify){if(!identify.email())return;var traits=identify.traits();traits=convertDates(traits);push("identify",traits)};HubSpot.prototype.track=function(track){var props=track.properties();props=convertDates(props);push("trackEvent",track.event(),props)};function convertDates(properties){return convert(properties,function(date){return date.getTime()})}});require.register("segmentio-analytics.js-integrations/lib/improvely.js",function(exports,require,module){var alias=require("alias");var callback=require("callback");var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Improvely)};var Improvely=exports.Integration=integration("Improvely").assumesPageview().readyOnInitialize().global("_improvely").global("improvely").option("domain","").option("projectId",null);Improvely.prototype.initialize=function(page){window._improvely=[];window.improvely={init:function(e,t){window._improvely.push(["init",e,t])},goal:function(e){window._improvely.push(["goal",e])},label:function(e){window._improvely.push(["label",e])}};var domain=this.options.domain;var id=this.options.projectId;window.improvely.init(domain,id);this.load()};Improvely.prototype.loaded=function(){return!!(window.improvely&&window.improvely.identify)};Improvely.prototype.load=function(callback){var domain=this.options.domain;load("//"+domain+".iljmp.com/improvely.js",callback)};Improvely.prototype.identify=function(identify){var id=identify.userId();if(id)window.improvely.label(id)};Improvely.prototype.track=function(track){var props=track.properties({revenue:"amount"});props.type=track.event();window.improvely.goal(props)}});require.register("segmentio-analytics.js-integrations/lib/inspectlet.js",function(exports,require,module){var integration=require("integration");var alias=require("alias");var clone=require("clone");var load=require("load-script");var push=require("global-queue")("__insp");module.exports=exports=function(analytics){analytics.addIntegration(Inspectlet)};var Inspectlet=exports.Integration=integration("Inspectlet").assumesPageview().readyOnLoad().global("__insp").global("__insp_").option("wid","");Inspectlet.prototype.initialize=function(page){push("wid",this.options.wid);this.load()};Inspectlet.prototype.loaded=function(){return!!window.__insp_};Inspectlet.prototype.load=function(callback){load("//www.inspectlet.com/inspectlet.js",callback)};Inspectlet.prototype.identify=function(identify){var traits=identify.traits({id:"userid"});push("tagSession",traits)};Inspectlet.prototype.track=function(track){push("tagSession",track.event())}});require.register("segmentio-analytics.js-integrations/lib/intercom.js",function(exports,require,module){var alias=require("alias");var convertDates=require("convert-dates");var integration=require("integration");var each=require("each");var is=require("is");var isEmail=require("is-email");var load=require("load-script");var defaults=require("defaults");var empty=require("is-empty");var when=require("when");var group;module.exports=exports=function(analytics){analytics.addIntegration(Intercom);group=analytics.group()};var Intercom=exports.Integration=integration("Intercom").assumesPageview().readyOnLoad().global("Intercom").option("activator","#IntercomDefaultWidget").option("appId","").option("inbox",false);Intercom.prototype.initialize=function(page){this.load()};Intercom.prototype.loaded=function(){return is.fn(window.Intercom)};Intercom.prototype.load=function(callback){var self=this;load("https://static.intercomcdn.com/intercom.v1.js",function(err){if(err)return callback(err);when(function(){return self.loaded()},callback)})};Intercom.prototype.page=function(page){window.Intercom("update")};Intercom.prototype.identify=function(identify){var traits=identify.traits({userId:"user_id"});var activator=this.options.activator;var opts=identify.options(this.name);var companyCreated=identify.companyCreated();var created=identify.created();var email=identify.email();var name=identify.name();var id=identify.userId();if(!id&&!traits.email)return;traits.app_id=this.options.appId;if(!empty(group.traits())){traits.company=traits.company||{};defaults(traits.company,group.traits())}if(name)traits.name=name;if(companyCreated)traits.company.created=companyCreated;if(created)traits.created=created;traits=convertDates(traits,formatDate);traits=alias(traits,{created:"created_at"});if(traits.company){traits.company=alias(traits.company,{created:"created_at"})}if(opts.increments)traits.increments=opts.increments;if(opts.userHash)traits.user_hash=opts.userHash;if(opts.user_hash)traits.user_hash=opts.user_hash;if("#IntercomDefaultWidget"!=activator){traits.widget={activator:activator}}var method=this._id!==id?"boot":"update";this._id=id;window.Intercom(method,traits)};Intercom.prototype.group=function(group){var props=group.properties();var id=group.groupId();if(id)props.id=id;window.Intercom("update",{company:props})};Intercom.prototype.track=function(track){window.Intercom("trackEvent",track.event(),track.properties())};function formatDate(date){return Math.floor(date/1e3)}});require.register("segmentio-analytics.js-integrations/lib/keen-io.js",function(exports,require,module){var callback=require("callback");var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Keen)};var Keen=exports.Integration=integration("Keen IO").readyOnInitialize().global("Keen").option("projectId","").option("readKey","").option("writeKey","").option("trackNamedPages",true).option("trackAllPages",false).option("trackCategorizedPages",true);Keen.prototype.initialize=function(){var options=this.options;window.Keen=window.Keen||{configure:function(e){this._cf=e},addEvent:function(e,t,n,i){this._eq=this._eq||[],this._eq.push([e,t,n,i])},setGlobalProperties:function(e){this._gp=e},onChartsReady:function(e){this._ocrq=this._ocrq||[],this._ocrq.push(e)}};window.Keen.configure({projectId:options.projectId,writeKey:options.writeKey,readKey:options.readKey});this.load()};Keen.prototype.loaded=function(){return!!(window.Keen&&window.Keen.Base64)};Keen.prototype.load=function(callback){load("//dc8na2hxrj29i.cloudfront.net/code/keen-2.1.0-min.js",callback)};Keen.prototype.page=function(page){var category=page.category();var props=page.properties();var name=page.fullName();var opts=this.options;if(opts.trackAllPages){this.track(page.track())}if(name&&opts.trackNamedPages){this.track(page.track(name))}if(category&&opts.trackCategorizedPages){this.track(page.track(category))}};Keen.prototype.identify=function(identify){var traits=identify.traits();var id=identify.userId();var user={};if(id)user.userId=id;if(traits)user.traits=traits;window.Keen.setGlobalProperties(function(){return{user:user}})};Keen.prototype.track=function(track){window.Keen.addEvent(track.event(),track.properties())}});require.register("segmentio-analytics.js-integrations/lib/kenshoo.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");var is=require("is");module.exports=exports=function(analytics){analytics.addIntegration(Kenshoo)};var Kenshoo=exports.Integration=integration("Kenshoo").readyOnLoad().global("k_trackevent").option("cid","").option("subdomain","").option("trackNamedPages",true).option("trackCategorizedPages",true);Kenshoo.prototype.initialize=function(page){this.load()};Kenshoo.prototype.loaded=function(){return is.fn(window.k_trackevent)};Kenshoo.prototype.load=function(callback){var url="//"+this.options.subdomain+".xg4ken.com/media/getpx.php?cid="+this.options.cid;load(url,callback)};Kenshoo.prototype.completedOrder=function(track){this._track(track,{val:track.total()})};Kenshoo.prototype.page=function(page){var category=page.category();var name=page.name();var fullName=page.fullName();var isNamed=name&&this.options.trackNamedPages;var isCategorized=category&&this.options.trackCategorizedPages;var track;if(name&&!this.options.trackNamedPages){return}if(category&&!this.options.trackCategorizedPages){return}if(isNamed&&isCategorized){track=page.track(fullName)}else if(isNamed){track=page.track(name)}else if(isCategorized){track=page.track(category)}else{track=page.track()}this._track(track)};Kenshoo.prototype.track=function(track){this._track(track)};Kenshoo.prototype._track=function(track,options){options=options||{val:track.revenue()};var params=["id="+this.options.cid,"type="+track.event(),"val="+(options.val||"0.0"),"orderId="+(track.orderId()||""),"promoCode="+(track.coupon()||""),"valueCurrency="+(track.currency()||""),"GCID=","kw=","product="];window.k_trackevent(params,this.options.subdomain)}});require.register("segmentio-analytics.js-integrations/lib/kissmetrics.js",function(exports,require,module){var push=require("global-queue")("_kmq");var integration=require("integration");var Track=require("facade").Track;var callback=require("callback");var load=require("load-script");var alias=require("alias");var Batch=require("batch");var each=require("each");var is=require("is");module.exports=exports=function(analytics){analytics.addIntegration(KISSmetrics)};var KISSmetrics=exports.Integration=integration("KISSmetrics").assumesPageview().readyOnLoad().global("_kmq").global("KM").global("_kmil").option("apiKey","").option("trackNamedPages",true).option("trackCategorizedPages",true).option("prefixProperties",true);exports.isMobile=navigator.userAgent.match(/Android/i)||navigator.userAgent.match(/BlackBerry/i)||navigator.userAgent.match(/iPhone|iPod/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Opera Mini/i)||navigator.userAgent.match(/IEMobile/i);KISSmetrics.prototype.initialize=function(page){var self=this;window._kmq=[];if(exports.isMobile)push("set",{"Mobile Session":"Yes"});this.load(function(){self.trackPage(page)})};KISSmetrics.prototype.loaded=function(){return is.object(window.KM)};KISSmetrics.prototype.load=function(callback){var key=this.options.apiKey;var useless="//i.kissmetrics.com/i.js";var library="//doug1izaerwt3.cloudfront.net/"+key+".1.js";(new Batch).push(function(done){load(useless,done)}).push(function(done){load(library,done)}).end(callback)};KISSmetrics.prototype.page=function(page){if(!window.KM_SKIP_PAGE_VIEW)window.KM.pageView();this.trackPage(page)};KISSmetrics.prototype.trackPage=function(page){var category=page.category();var name=page.fullName();var opts=this.options;if(name&&opts.trackNamedPages){this.track(page.track(name))}if(category&&opts.trackCategorizedPages){this.track(page.track(category))}};KISSmetrics.prototype.identify=function(identify){var traits=identify.traits(); var id=identify.userId();if(id)push("identify",id);if(traits)push("set",traits)};KISSmetrics.prototype.track=function(track){var mapping={revenue:"Billing Amount"};var event=track.event();var properties=track.properties(mapping);if(this.options.prefixProperties)properties=prefix(event,properties);push("record",event,properties)};KISSmetrics.prototype.alias=function(alias){push("alias",alias.to(),alias.from())};KISSmetrics.prototype.completedOrder=function(track){var products=track.products();var event=track.event();push("record",event,prefix(event,track.properties()));window._kmq.push(function(){var km=window.KM;each(products,function(product,i){var temp=new Track({event:event,properties:product});var item=prefix(event,product);item._t=km.ts()+i;item._d=1;km.set(item)})})};function prefix(event,properties){var prefixed={};each(properties,function(key,val){if(key==="Billing Amount"){prefixed[key]=val}else{prefixed[event+" - "+key]=val}});return prefixed}});require.register("segmentio-analytics.js-integrations/lib/klaviyo.js",function(exports,require,module){var alias=require("alias");var callback=require("callback");var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_learnq");module.exports=exports=function(analytics){analytics.addIntegration(Klaviyo)};var Klaviyo=exports.Integration=integration("Klaviyo").assumesPageview().readyOnInitialize().global("_learnq").option("apiKey","");Klaviyo.prototype.initialize=function(page){push("account",this.options.apiKey);this.load()};Klaviyo.prototype.loaded=function(){return!!(window._learnq&&window._learnq.push!==Array.prototype.push)};Klaviyo.prototype.load=function(callback){load("//a.klaviyo.com/media/js/learnmarklet.js",callback)};var aliases={id:"$id",email:"$email",firstName:"$first_name",lastName:"$last_name",phone:"$phone_number",title:"$title"};Klaviyo.prototype.identify=function(identify){var traits=identify.traits(aliases);if(!traits.$id&&!traits.$email)return;push("identify",traits)};Klaviyo.prototype.group=function(group){var props=group.properties();if(!props.name)return;push("identify",{$organization:props.name})};Klaviyo.prototype.track=function(track){push("track",track.event(),track.properties({revenue:"$value"}))}});require.register("segmentio-analytics.js-integrations/lib/leadlander.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(LeadLander)};var LeadLander=exports.Integration=integration("LeadLander").assumesPageview().readyOnLoad().global("llactid").global("trackalyzer").option("accountId",null);LeadLander.prototype.initialize=function(page){window.llactid=this.options.accountId;this.load()};LeadLander.prototype.loaded=function(){return!!window.trackalyzer};LeadLander.prototype.load=function(callback){load("http://t6.trackalyzer.com/trackalyze-nodoc.js",callback)}});require.register("segmentio-analytics.js-integrations/lib/livechat.js",function(exports,require,module){var each=require("each");var integration=require("integration");var load=require("load-script");var clone=require("clone");var when=require("when");module.exports=exports=function(analytics){analytics.addIntegration(LiveChat)};var LiveChat=exports.Integration=integration("LiveChat").assumesPageview().readyOnLoad().global("__lc").global("__lc_inited").global("LC_API").global("LC_Invite").option("group",0).option("license","");LiveChat.prototype.initialize=function(page){window.__lc=clone(this.options);this.load()};LiveChat.prototype.loaded=function(){return!!(window.LC_API&&window.LC_Invite)};LiveChat.prototype.load=function(callback){var self=this;load("//cdn.livechatinc.com/tracking.js",function(err){if(err)return callback(err);when(function(){return self.loaded()},callback)})};LiveChat.prototype.identify=function(identify){var traits=identify.traits({userId:"User ID"});window.LC_API.set_custom_variables(convert(traits))};function convert(traits){var arr=[];each(traits,function(key,value){arr.push({name:key,value:value})});return arr}});require.register("segmentio-analytics.js-integrations/lib/lucky-orange.js",function(exports,require,module){var Identify=require("facade").Identify;var integration=require("integration");var load=require("load-script");var user;module.exports=exports=function(analytics){analytics.addIntegration(LuckyOrange);user=analytics.user()};var LuckyOrange=exports.Integration=integration("Lucky Orange").assumesPageview().readyOnLoad().global("_loq").global("__wtw_watcher_added").global("__wtw_lucky_site_id").global("__wtw_lucky_is_segment_io").global("__wtw_custom_user_data").option("siteId",null);LuckyOrange.prototype.initialize=function(page){window._loq||(window._loq=[]);window.__wtw_lucky_site_id=this.options.siteId;this.identify(new Identify({traits:user.traits(),userId:user.id()}));this.load()};LuckyOrange.prototype.loaded=function(){return!!window.__wtw_watcher_added};LuckyOrange.prototype.load=function(callback){var cache=Math.floor((new Date).getTime()/6e4);load({http:"http://www.luckyorange.com/w.js?"+cache,https:"https://ssl.luckyorange.com/w.js?"+cache},callback)};LuckyOrange.prototype.identify=function(identify){var traits=window.__wtw_custom_user_data=identify.traits();var email=identify.email();var name=identify.name();if(name)traits.name=name;if(email)traits.email=email}});require.register("segmentio-analytics.js-integrations/lib/lytics.js",function(exports,require,module){var alias=require("alias");var callback=require("callback");var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Lytics)};var Lytics=exports.Integration=integration("Lytics").readyOnInitialize().global("jstag").option("cid","").option("cookie","seerid").option("delay",2e3).option("sessionTimeout",1800).option("url","//c.lytics.io");var aliases={sessionTimeout:"sessecs"};Lytics.prototype.initialize=function(page){var options=alias(this.options,aliases);window.jstag=function(){var t={_q:[],_c:options,ts:(new Date).getTime()};t.send=function(){this._q.push(["ready","send",Array.prototype.slice.call(arguments)]);return this};return t}();this.load()};Lytics.prototype.loaded=function(){return!!(window.jstag&&window.jstag.bind)};Lytics.prototype.load=function(callback){load("//c.lytics.io/static/io.min.js",callback)};Lytics.prototype.page=function(page){window.jstag.send(page.properties())};Lytics.prototype.identify=function(identify){var traits=identify.traits({userId:"_uid"});window.jstag.send(traits)};Lytics.prototype.track=function(track){var props=track.properties();props._e=track.event();window.jstag.send(props)}});require.register("segmentio-analytics.js-integrations/lib/mixpanel.js",function(exports,require,module){var alias=require("alias");var clone=require("clone");var dates=require("convert-dates");var integration=require("integration");var iso=require("to-iso-string");var load=require("load-script");var indexof=require("indexof");var del=require("obj-case").del;module.exports=exports=function(analytics){analytics.addIntegration(Mixpanel)};var Mixpanel=exports.Integration=integration("Mixpanel").readyOnLoad().global("mixpanel").option("increments",[]).option("cookieName","").option("nameTag",true).option("pageview",false).option("people",false).option("token","").option("trackAllPages",false).option("trackNamedPages",true).option("trackCategorizedPages",true);var optionsAliases={cookieName:"cookie_name"};Mixpanel.prototype.initialize=function(){(function(c,a){window.mixpanel=a;var b,d,h,e;a._i=[];a.init=function(b,c,f){function d(a,b){var c=b.split(".");2==c.length&&(a=a[c[0]],b=c[1]);a[b]=function(){a.push([b].concat(Array.prototype.slice.call(arguments,0)))}}var g=a;"undefined"!==typeof f?g=a[f]=[]:f="mixpanel";g.people=g.people||[];h=["disable","track","track_pageview","track_links","track_forms","register","register_once","unregister","identify","alias","name_tag","set_config","people.set","people.increment","people.track_charge","people.append"];for(e=0;e<h.length;e++)d(g,h[e]);a._i.push([b,c,f])};a.__SV=1.2})(document,window.mixpanel||[]);this.options.increments=lowercase(this.options.increments);var options=alias(this.options,optionsAliases);window.mixpanel.init(options.token,options);this.load()};Mixpanel.prototype.loaded=function(){return!!(window.mixpanel&&window.mixpanel.config)};Mixpanel.prototype.load=function(callback){load("//cdn.mxpnl.com/libs/mixpanel-2.2.min.js",callback)};Mixpanel.prototype.page=function(page){var category=page.category();var name=page.fullName();var opts=this.options;if(opts.trackAllPages){this.track(page.track())}if(category&&opts.trackCategorizedPages){this.track(page.track(category))}if(name&&opts.trackNamedPages){this.track(page.track(name))}};var traitAliases={created:"$created",email:"$email",firstName:"$first_name",lastName:"$last_name",lastSeen:"$last_seen",name:"$name",username:"$username",phone:"$phone"};Mixpanel.prototype.identify=function(identify){var username=identify.username();var email=identify.email();var id=identify.userId();if(id)window.mixpanel.identify(id);var nametag=email||username||id;if(nametag)window.mixpanel.name_tag(nametag);var traits=identify.traits(traitAliases);if(traits.$created)del(traits,"createdAt");window.mixpanel.register(traits);if(this.options.people)window.mixpanel.people.set(traits)};Mixpanel.prototype.track=function(track){var increments=this.options.increments;var increment=track.event().toLowerCase();var people=this.options.people;var props=track.properties();var revenue=track.revenue();if(people&&~indexof(increments,increment)){window.mixpanel.people.increment(track.event());window.mixpanel.people.set("Last "+track.event(),new Date)}props=dates(props,iso);window.mixpanel.track(track.event(),props);if(revenue&&people){window.mixpanel.people.track_charge(revenue)}};Mixpanel.prototype.alias=function(alias){var mp=window.mixpanel;var to=alias.to();if(mp.get_distinct_id&&mp.get_distinct_id()===to)return;if(mp.get_property&&mp.get_property("$people_distinct_id")===to)return;mp.alias(to,alias.from())};function lowercase(arr){var ret=new Array(arr.length);for(var i=0;i<arr.length;++i){ret[i]=String(arr[i]).toLowerCase()}return ret}});require.register("segmentio-analytics.js-integrations/lib/mojn.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");var is=require("is");module.exports=exports=function(analytics){analytics.addIntegration(Mojn)};var Mojn=exports.Integration=integration("Mojn").option("customerCode","").global("_mojnTrack").readyOnInitialize();Mojn.prototype.initialize=function(){window._mojnTrack=window._mojnTrack||[];window._mojnTrack.push({cid:this.options.customerCode});this.load()};Mojn.prototype.load=function(fn){load("https://track.idtargeting.com/"+this.options.customerCode+"/track.js",fn)};Mojn.prototype.loaded=function(){return is.object(window._mojnTrack)};Mojn.prototype.identify=function(identify){var email=identify.email();if(!email)return;var img=new Image;img.src="//matcher.idtargeting.com/analytics.gif?cid="+this.options.customerCode+"&_mjnctid="+email;img.width=1;img.height=1;return img};Mojn.prototype.track=function(track){var properties=track.properties();var revenue=properties.revenue;var currency=properties.currency||"";var conv=currency+revenue;if(!revenue)return;window._mojnTrack.push({conv:conv});return conv}});require.register("segmentio-analytics.js-integrations/lib/mouseflow.js",function(exports,require,module){var push=require("global-queue")("_mfq");var integration=require("integration");var load=require("load-script");var each=require("each");module.exports=exports=function(analytics){analytics.addIntegration(Mouseflow)};var Mouseflow=exports.Integration=integration("Mouseflow").assumesPageview().readyOnLoad().global("mouseflow").global("_mfq").option("apiKey","").option("mouseflowHtmlDelay",0);Mouseflow.prototype.initialize=function(page){this.load()};Mouseflow.prototype.loaded=function(){return!!(window._mfq&&[].push!=window._mfq.push)};Mouseflow.prototype.load=function(fn){var apiKey=this.options.apiKey;window.mouseflowHtmlDelay=this.options.mouseflowHtmlDelay;load("//cdn.mouseflow.com/projects/"+apiKey+".js",fn)};Mouseflow.prototype.page=function(page){if(!window.mouseflow)return;if("function"!=typeof mouseflow.newPageView)return;mouseflow.newPageView()};Mouseflow.prototype.identify=function(identify){set(identify.traits())};Mouseflow.prototype.track=function(track){var props=track.properties();props.event=track.event();set(props)};function set(hash){each(hash,function(k,v){push("setVariable",k,v)})}});require.register("segmentio-analytics.js-integrations/lib/mousestats.js",function(exports,require,module){var each=require("each");var integration=require("integration");var is=require("is");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(MouseStats)};var MouseStats=exports.Integration=integration("MouseStats").assumesPageview().readyOnLoad().global("msaa").global("MouseStatsVisitorPlaybacks").option("accountNumber","");MouseStats.prototype.initialize=function(page){this.load()};MouseStats.prototype.loaded=function(){return is.array(window.MouseStatsVisitorPlaybacks)};MouseStats.prototype.load=function(callback){var number=this.options.accountNumber;var path=number.slice(0,1)+"/"+number.slice(1,2)+"/"+number;var cache=Math.floor((new Date).getTime()/6e4);var partial=".mousestats.com/js/"+path+".js?"+cache;var http="http://www2"+partial;var https="https://ssl"+partial;load({http:http,https:https},callback)};MouseStats.prototype.identify=function(identify){each(identify.traits(),function(key,value){window.MouseStatsVisitorPlaybacks.customVariable(key,value)})}});require.register("segmentio-analytics.js-integrations/lib/navilytics.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");var push=require("global-queue")("__nls");module.exports=exports=function(analytics){analytics.addIntegration(Navilytics)};var Navilytics=exports.Integration=integration("Navilytics").assumesPageview().readyOnLoad().global("__nls").option("memberId","").option("projectId","");Navilytics.prototype.initialize=function(page){window.__nls=window.__nls||[];this.load()};Navilytics.prototype.loaded=function(){return!!(window.__nls&&[].push!=window.__nls.push)};Navilytics.prototype.load=function(callback){var mid=this.options.memberId;var pid=this.options.projectId;var url="//www.navilytics.com/nls.js?mid="+mid+"&pid="+pid;load(url,callback)};Navilytics.prototype.track=function(track){push("tagRecording",track.event())}});require.register("segmentio-analytics.js-integrations/lib/olark.js",function(exports,require,module){var callback=require("callback");var integration=require("integration");var https=require("use-https");module.exports=exports=function(analytics){analytics.addIntegration(Olark)};var Olark=exports.Integration=integration("Olark").assumesPageview().readyOnInitialize().global("olark").option("identify",true).option("page",true).option("siteId","").option("track",false);Olark.prototype.initialize=function(page){window.olark||function(c){var f=window,d=document,l=https()?"https:":"http:",z=c.name,r="load";var nt=function(){f[z]=function(){(a.s=a.s||[]).push(arguments)};var a=f[z]._={},q=c.methods.length;while(q--){(function(n){f[z][n]=function(){f[z]("call",n,arguments)}})(c.methods[q])}a.l=c.loader;a.i=nt;a.p={0:+new Date};a.P=function(u){a.p[u]=new Date-a.p[0]};function s(){a.P(r);f[z](r)}f.addEventListener?f.addEventListener(r,s,false):f.attachEvent("on"+r,s);var ld=function(){function p(hd){hd="head";return["<",hd,"></",hd,"><",i," onl"+'oad="var d=',g,";d.getElementsByTagName('head')[0].",j,"(d.",h,"('script')).",k,"='",l,"//",a.l,"'",'"',"></",i,">"].join("")}var i="body",m=d[i];if(!m){return setTimeout(ld,100)}a.P(1);var j="appendChild",h="createElement",k="src",n=d[h]("div"),v=n[j](d[h](z)),b=d[h]("iframe"),g="document",e="domain",o;n.style.display="none";m.insertBefore(n,m.firstChild).id=z;b.frameBorder="0";b.id=z+"-loader";if(/MSIE[ ]+6/.test(navigator.userAgent)){b.src="javascript:false"}b.allowTransparency="true";v[j](b);try{b.contentWindow[g].open()}catch(w){c[e]=d[e];o="javascript:var d="+g+".open();d.domain='"+d.domain+"';";b[k]=o+"void(0);"}try{var t=b.contentWindow[g];t.write(p());t.close()}catch(x){b[k]=o+'d.write("'+p().replace(/"/g,String.fromCharCode(92)+'"')+'");d.close();'}a.P(2)};ld()};nt()}({loader:"static.olark.com/jsclient/loader0.js",name:"olark",methods:["configure","extend","declare","identify"]});window.olark.identify(this.options.siteId);var self=this;box("onExpand",function(){self._open=true});box("onShrink",function(){self._open=false})};Olark.prototype.page=function(page){if(!this.options.page||!this._open)return;var props=page.properties();var name=page.fullName();if(!name&&!props.url)return;var msg=name?name.toLowerCase()+" page":props.url;chat("sendNotificationToOperator",{body:"looking at "+msg})};Olark.prototype.identify=function(identify){if(!this.options.identify)return;var username=identify.username();var traits=identify.traits();var id=identify.userId();var email=identify.email();var phone=identify.phone();var name=identify.name()||identify.firstName();visitor("updateCustomFields",traits);if(email)visitor("updateEmailAddress",{emailAddress:email});if(phone)visitor("updatePhoneNumber",{phoneNumber:phone});if(name)visitor("updateFullName",{fullName:name});var nickname=name||email||username||id;if(name&&email)nickname+=" ("+email+")";if(nickname)chat("updateVisitorNickname",{snippet:nickname})};Olark.prototype.track=function(track){if(!this.options.track||!this._open)return;chat("sendNotificationToOperator",{body:'visitor triggered "'+track.event()+'"'})};function box(action,value){window.olark("api.box."+action,value)}function visitor(action,value){window.olark("api.visitor."+action,value)}function chat(action,value){window.olark("api.chat."+action,value)}});require.register("segmentio-analytics.js-integrations/lib/optimizely.js",function(exports,require,module){var bind=require("bind");var callback=require("callback");var each=require("each");var integration=require("integration");var push=require("global-queue")("optimizely");var tick=require("next-tick");var analytics;module.exports=exports=function(ajs){ajs.addIntegration(Optimizely);analytics=ajs};var Optimizely=exports.Integration=integration("Optimizely").readyOnInitialize().option("variations",true).option("trackNamedPages",true).option("trackCategorizedPages",true);Optimizely.prototype.initialize=function(){if(this.options.variations)tick(this.replay)};Optimizely.prototype.track=function(track){var props=track.properties();if(props.revenue)props.revenue*=100;push("trackEvent",track.event(),props)};Optimizely.prototype.page=function(page){var category=page.category();var name=page.fullName();var opts=this.options;if(category&&opts.trackCategorizedPages){this.track(page.track(category))}if(name&&opts.trackNamedPages){this.track(page.track(name))}};Optimizely.prototype.replay=function(){if(!window.optimizely)return;var data=window.optimizely.data;if(!data)return;var experiments=data.experiments;var map=data.state.variationNamesMap;var traits={};each(map,function(experimentId,variation){var experiment=experiments[experimentId].name;traits["Experiment: "+experiment]=variation});analytics.identify(traits)}});require.register("segmentio-analytics.js-integrations/lib/perfect-audience.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(PerfectAudience)};var PerfectAudience=exports.Integration=integration("Perfect Audience").assumesPageview().readyOnLoad().global("_pa").option("siteId","");PerfectAudience.prototype.initialize=function(page){window._pa=window._pa||{};this.load()};PerfectAudience.prototype.loaded=function(){return!!(window._pa&&window._pa.track)};PerfectAudience.prototype.load=function(callback){var id=this.options.siteId;load("//tag.perfectaudience.com/serve/"+id+".js",callback)};PerfectAudience.prototype.track=function(track){window._pa.track(track.event(),track.properties())}});require.register("segmentio-analytics.js-integrations/lib/pingdom.js",function(exports,require,module){var date=require("load-date");var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_prum");module.exports=exports=function(analytics){analytics.addIntegration(Pingdom)};var Pingdom=exports.Integration=integration("Pingdom").assumesPageview().readyOnLoad().global("_prum").option("id","");Pingdom.prototype.initialize=function(page){window._prum=window._prum||[];push("id",this.options.id);push("mark","firstbyte",date.getTime());this.load()};Pingdom.prototype.loaded=function(){return!!(window._prum&&window._prum.push!==Array.prototype.push)};Pingdom.prototype.load=function(callback){load("//rum-static.pingdom.net/prum.min.js",callback)}});require.register("segmentio-analytics.js-integrations/lib/piwik.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_paq");var each=require("each");module.exports=exports=function(analytics){analytics.addIntegration(Piwik)};var Piwik=exports.Integration=integration("Piwik").global("_paq").option("url",null).option("siteId","").readyOnInitialize().mapping("goals");Piwik.prototype.initialize=function(){window._paq=window._paq||[];push("setSiteId",this.options.siteId);push("setTrackerUrl",this.options.url+"/piwik.php");push("enableLinkTracking");this.load()};Piwik.prototype.load=function(callback){load(this.options.url+"/piwik.js",callback)};Piwik.prototype.loaded=function(){return!!(window._paq&&window._paq.push!=[].push)};Piwik.prototype.page=function(page){push("trackPageView")};Piwik.prototype.track=function(track){var goals=this.goals(track.event());var revenue=track.revenue()||0;each(goals,function(goal){push("trackGoal",goal,revenue)})}});require.register("segmentio-analytics.js-integrations/lib/preact.js",function(exports,require,module){var alias=require("alias");var callback=require("callback");var convertDates=require("convert-dates");var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_lnq");module.exports=exports=function(analytics){analytics.addIntegration(Preact)};var Preact=exports.Integration=integration("Preact").assumesPageview().readyOnInitialize().global("_lnq").option("projectCode","");Preact.prototype.initialize=function(page){window._lnq=window._lnq||[];push("_setCode",this.options.projectCode);this.load()};Preact.prototype.loaded=function(){return!!(window._lnq&&window._lnq.push!==Array.prototype.push)};Preact.prototype.load=function(callback){load("//d2bbvl6dq48fa6.cloudfront.net/js/ln-2.4.min.js",callback)};Preact.prototype.identify=function(identify){if(!identify.userId())return;var traits=identify.traits({created:"created_at"});traits=convertDates(traits,convertDate);push("_setPersonData",{name:identify.name(),email:identify.email(),uid:identify.userId(),properties:traits})};Preact.prototype.group=function(group){if(!group.groupId())return;push("_setAccount",group.traits())};Preact.prototype.track=function(track){var props=track.properties();var revenue=track.revenue();var event=track.event();var special={name:event};if(revenue){special.revenue=revenue*100;delete props.revenue}if(props.note){special.note=props.note;delete props.note}push("_logEvent",special,props)};function convertDate(date){return Math.floor(date/1e3)}});require.register("segmentio-analytics.js-integrations/lib/qualaroo.js",function(exports,require,module){var callback=require("callback");var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_kiq");var Facade=require("facade");var Identify=Facade.Identify;module.exports=exports=function(analytics){analytics.addIntegration(Qualaroo)};var Qualaroo=exports.Integration=integration("Qualaroo").assumesPageview().readyOnInitialize().global("_kiq").option("customerId","").option("siteToken","").option("track",false);Qualaroo.prototype.initialize=function(page){window._kiq=window._kiq||[];this.load()};Qualaroo.prototype.loaded=function(){return!!(window._kiq&&window._kiq.push!==Array.prototype.push)};Qualaroo.prototype.load=function(callback){var token=this.options.siteToken;var id=this.options.customerId;load("//s3.amazonaws.com/ki.js/"+id+"/"+token+".js",callback)};Qualaroo.prototype.identify=function(identify){var traits=identify.traits();var id=identify.userId();var email=identify.email();if(email)id=email;if(id)push("identify",id);if(traits)push("set",traits)};Qualaroo.prototype.track=function(track){if(!this.options.track)return;var event=track.event();var traits={};traits["Triggered: "+event]=true;this.identify(new Identify({traits:traits}))}});require.register("segmentio-analytics.js-integrations/lib/quantcast.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_qevents",{wrap:false});var user;module.exports=exports=function(analytics){analytics.addIntegration(Quantcast);user=analytics.user()};var Quantcast=exports.Integration=integration("Quantcast").assumesPageview().readyOnInitialize().global("_qevents").global("__qc").option("pCode",null).option("advertise",false);Quantcast.prototype.initialize=function(page){window._qevents=window._qevents||[];var opts=this.options;var settings={qacct:opts.pCode};if(user.id())settings.uid=user.id();if(page){settings.labels=this.labels("page",page.category(),page.name())}push(settings);this.load()};Quantcast.prototype.loaded=function(){return!!window.__qc};Quantcast.prototype.load=function(callback){load({http:"http://edge.quantserve.com/quant.js",https:"https://secure.quantserve.com/quant.js"},callback)};Quantcast.prototype.page=function(page){var category=page.category();var name=page.name();var settings={event:"refresh",labels:this.labels("page",category,name),qacct:this.options.pCode};if(user.id())settings.uid=user.id();push(settings)};Quantcast.prototype.identify=function(identify){var id=identify.userId();if(id)window._qevents[0].uid=id};Quantcast.prototype.track=function(track){var name=track.event();var revenue=track.revenue();var settings={event:"click",labels:this.labels("event",name),qacct:this.options.pCode};if(null!=revenue)settings.revenue=revenue+"";if(user.id())settings.uid=user.id();push(settings)};Quantcast.prototype.completedOrder=function(track){var name=track.event();var revenue=track.total();var labels=this.labels("event",name);var category=track.category();if(this.options.advertise&&category){labels+=","+this.labels("pcat",category)}var settings={event:"refresh",labels:labels,revenue:revenue+"",orderid:track.orderId(),qacct:this.options.pCode};push(settings)};Quantcast.prototype.labels=function(type){var args=[].slice.call(arguments,1);var advertise=this.options.advertise;var ret=[];if(advertise&&"page"==type)type="event";if(advertise)type="_fp."+type;for(var i=0;i<args.length;++i){if(null==args[i])continue;var value=String(args[i]);ret.push(value.replace(/,/g,";"))}ret=advertise?ret.join(" "):ret.join(".");return[type,ret].join(".")}});require.register("segmentio-analytics.js-integrations/lib/rollbar.js",function(exports,require,module){var integration=require("integration");var is=require("is");var extend=require("extend");module.exports=exports=function(analytics){analytics.addIntegration(RollbarIntegration)};var RollbarIntegration=exports.Integration=integration("Rollbar").readyOnInitialize().global("Rollbar").option("identify",true).option("accessToken","").option("environment","unknown").option("captureUncaught",true);RollbarIntegration.prototype.initialize=function(page){var _rollbarConfig=this.config={accessToken:this.options.accessToken,captureUncaught:this.options.captureUncaught,payload:{environment:this.options.environment}};!function(a){function b(b){this.shimId=++g,this.notifier=null,this.parentShim=b,this.logger=function(){},a.console&&void 0===a.console.shimId&&(this.logger=a.console.log)}function c(b,c,d){!d[4]&&a._rollbarWrappedError&&(d[4]=a._rollbarWrappedError,a._rollbarWrappedError=null),b.uncaughtError.apply(b,d),c&&c.apply(a,d)}function d(c){var d=b;return f(function(){if(this.notifier)return this.notifier[c].apply(this.notifier,arguments);var b=this,e="scope"===c;e&&(b=new d(this));var f=Array.prototype.slice.call(arguments,0),g={shim:b,method:c,args:f,ts:new Date};return a._rollbarShimQueue.push(g),e?b:void 0})}function e(a,b){if(b.hasOwnProperty&&b.hasOwnProperty("addEventListener")){var c=b.addEventListener;b.addEventListener=function(b,d,e){c.call(this,b,a.wrap(d),e)};var d=b.removeEventListener;b.removeEventListener=function(a,b,c){d.call(this,a,b._wrapped||b,c)}}}function f(a,b){return b=b||this.logger,function(){try{return a.apply(this,arguments)}catch(c){b("Rollbar internal error:",c)}}}var g=0;b.init=function(a,d){var g=d.globalAlias||"Rollbar";if("object"==typeof a[g])return a[g];a._rollbarShimQueue=[],a._rollbarWrappedError=null,d=d||{};var h=new b;return f(function(){if(h.configure(d),d.captureUncaught){var b=a.onerror;a.onerror=function(){var a=Array.prototype.slice.call(arguments,0);c(h,b,a)};var f,i,j=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];for(f=0;f<j.length;++f)i=j[f],a[i]&&a[i].prototype&&e(h,a[i].prototype)}return a[g]=h,h},h.logger)()},b.prototype.loadFull=function(a,b,c,d,e){var g=f(function(){var a=b.createElement("script"),e=b.getElementsByTagName("script")[0];a.src=d.rollbarJsUrl,a.async=!c,a.onload=h,e.parentNode.insertBefore(a,e)},this.logger),h=f(function(){var b;if(void 0===a._rollbarPayloadQueue){var c,d,f,g;for(b=new Error("rollbar.js did not load");c=a._rollbarShimQueue.shift();)for(f=c.args,g=0;g<f.length;++g)if(d=f[g],"function"==typeof d){d(b);break}}e&&e(b)},this.logger);f(function(){c?g():a.addEventListener?a.addEventListener("load",g,!1):a.attachEvent("onload",g)},this.logger)()},b.prototype.wrap=function(b){if("function"!=typeof b)return b;if(b._isWrap)return b;if(!b._wrapped){b._wrapped=function(){try{return b.apply(this,arguments)}catch(c){throw a._rollbarWrappedError=c,c}},b._wrapped._isWrap=!0;for(var c in b)b.hasOwnProperty(c)&&(b._wrapped[c]=b[c])}return b._wrapped};for(var h="log,debug,info,warn,warning,error,critical,global,configure,scope,uncaughtError".split(","),i=0;i<h.length;++i)b.prototype[h[i]]=d(h[i]);var j="//d37gvrvc0wt4s1.cloudfront.net/js/v1.0/rollbar.min.js";_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||j,b.init(a,_rollbarConfig)}(window,document);this.load()};RollbarIntegration.prototype.loaded=function(){return is.object(window.Rollbar)&&null==window.Rollbar.shimId};RollbarIntegration.prototype.load=function(callback){window.Rollbar.loadFull(window,document,true,this.config,callback)};RollbarIntegration.prototype.identify=function(identify){if(!this.options.identify)return;var uid=identify.userId();if(uid===null||uid===undefined)return;var rollbar=window.Rollbar;var person={id:uid};extend(person,identify.traits());rollbar.configure({payload:{person:person}})}});require.register("segmentio-analytics.js-integrations/lib/saasquatch.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(SaaSquatch) };var SaaSquatch=exports.Integration=integration("SaaSquatch").readyOnInitialize().option("tenantAlias","").global("_sqh");SaaSquatch.prototype.initialize=function(page){};SaaSquatch.prototype.loaded=function(){return window._sqh&&window._sqh.push!=[].push};SaaSquatch.prototype.load=function(fn){load("//d2rcp9ak152ke1.cloudfront.net/assets/javascripts/squatch.min.js",fn)};SaaSquatch.prototype.identify=function(identify){var sqh=window._sqh=window._sqh||[];var accountId=identify.proxy("traits.accountId");var image=identify.proxy("traits.referralImage");var opts=identify.options(this.name);var id=identify.userId();var email=identify.email();if(!(id||email))return;if(this.called)return;var init={tenant_alias:this.options.tenantAlias,first_name:identify.firstName(),last_name:identify.lastName(),user_image:identify.avatar(),email:email,user_id:id};if(accountId)init.account_id=accountId;if(opts.checksum)init.checksum=opts.checksum;if(image)init.fb_share_image=image;sqh.push(["init",init]);this.called=true;this.load()}});require.register("segmentio-analytics.js-integrations/lib/sentry.js",function(exports,require,module){var integration=require("integration");var is=require("is");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Sentry)};var Sentry=exports.Integration=integration("Sentry").readyOnLoad().global("Raven").option("config","");Sentry.prototype.initialize=function(){var config=this.options.config;this.load(function(){window.Raven.config(config).install()})};Sentry.prototype.loaded=function(){return is.object(window.Raven)};Sentry.prototype.load=function(callback){load("//cdn.ravenjs.com/1.1.10/native/raven.min.js",callback)};Sentry.prototype.identify=function(identify){window.Raven.setUser(identify.traits())}});require.register("segmentio-analytics.js-integrations/lib/snapengage.js",function(exports,require,module){var integration=require("integration");var is=require("is");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(SnapEngage)};var SnapEngage=exports.Integration=integration("SnapEngage").assumesPageview().readyOnLoad().global("SnapABug").option("apiKey","");SnapEngage.prototype.initialize=function(page){this.load()};SnapEngage.prototype.loaded=function(){return is.object(window.SnapABug)};SnapEngage.prototype.load=function(callback){var key=this.options.apiKey;var url="//commondatastorage.googleapis.com/code.snapengage.com/js/"+key+".js";load(url,callback)};SnapEngage.prototype.identify=function(identify){var email=identify.email();if(!email)return;window.SnapABug.setUserEmail(email)}});require.register("segmentio-analytics.js-integrations/lib/spinnakr.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Spinnakr)};var Spinnakr=exports.Integration=integration("Spinnakr").assumesPageview().readyOnLoad().global("_spinnakr_site_id").global("_spinnakr").option("siteId","");Spinnakr.prototype.initialize=function(page){window._spinnakr_site_id=this.options.siteId;this.load()};Spinnakr.prototype.loaded=function(){return!!window._spinnakr};Spinnakr.prototype.load=function(callback){load("//d3ojzyhbolvoi5.cloudfront.net/js/so.js",callback)}});require.register("segmentio-analytics.js-integrations/lib/tapstream.js",function(exports,require,module){var callback=require("callback");var integration=require("integration");var load=require("load-script");var slug=require("slug");var push=require("global-queue")("_tsq");module.exports=exports=function(analytics){analytics.addIntegration(Tapstream)};var Tapstream=exports.Integration=integration("Tapstream").assumesPageview().readyOnInitialize().global("_tsq").option("accountName","").option("trackAllPages",true).option("trackNamedPages",true).option("trackCategorizedPages",true);Tapstream.prototype.initialize=function(page){window._tsq=window._tsq||[];push("setAccountName",this.options.accountName);this.load()};Tapstream.prototype.loaded=function(){return!!(window._tsq&&window._tsq.push!==Array.prototype.push)};Tapstream.prototype.load=function(callback){load("//cdn.tapstream.com/static/js/tapstream.js",callback)};Tapstream.prototype.page=function(page){var category=page.category();var opts=this.options;var name=page.fullName();if(opts.trackAllPages){this.track(page.track())}if(name&&opts.trackNamedPages){this.track(page.track(name))}if(category&&opts.trackCategorizedPages){this.track(page.track(category))}};Tapstream.prototype.track=function(track){var props=track.properties();push("fireHit",slug(track.event()),[props.url])}});require.register("segmentio-analytics.js-integrations/lib/trakio.js",function(exports,require,module){var alias=require("alias");var callback=require("callback");var clone=require("clone");var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Trakio)};var Trakio=exports.Integration=integration("trak.io").assumesPageview().readyOnInitialize().global("trak").option("token","").option("trackNamedPages",true).option("trackCategorizedPages",true);var optionsAliases={initialPageview:"auto_track_page_view"};Trakio.prototype.initialize=function(page){var self=this;var options=this.options;window.trak=window.trak||[];window.trak.io=window.trak.io||{};window.trak.io.load=function(e){self.load();var r=function(e){return function(){window.trak.push([e].concat(Array.prototype.slice.call(arguments,0)))}},i=["initialize","identify","track","alias","channel","source","host","protocol","page_view"];for(var s=0;s<i.length;s++)window.trak.io[i[s]]=r(i[s]);window.trak.io.initialize.apply(window.trak.io,arguments)};window.trak.io.load(options.token,alias(options,optionsAliases));this.load()};Trakio.prototype.loaded=function(){return!!(window.trak&&window.trak.loaded)};Trakio.prototype.load=function(callback){load("//d29p64779x43zo.cloudfront.net/v1/trak.io.min.js",callback)};Trakio.prototype.page=function(page){var category=page.category();var props=page.properties();var name=page.fullName();window.trak.io.page_view(props.path,name||props.title);if(name&&this.options.trackNamedPages){this.track(page.track(name))}if(category&&this.options.trackCategorizedPages){this.track(page.track(category))}};var traitAliases={avatar:"avatar_url",firstName:"first_name",lastName:"last_name"};Trakio.prototype.identify=function(identify){var traits=identify.traits(traitAliases);var id=identify.userId();if(id){window.trak.io.identify(id,traits)}else{window.trak.io.identify(traits)}};Trakio.prototype.track=function(track){window.trak.io.track(track.event(),track.properties())};Trakio.prototype.alias=function(alias){if(!window.trak.io.distinct_id)return;var from=alias.from();var to=alias.to();if(to===window.trak.io.distinct_id())return;if(from){window.trak.io.alias(from,to)}else{window.trak.io.alias(to)}}});require.register("segmentio-analytics.js-integrations/lib/twitter-ads.js",function(exports,require,module){var pixel=require("load-pixel")("//analytics.twitter.com/i/adsct");var integration=require("integration");module.exports=exports=function(analytics){analytics.addIntegration(TwitterAds)};exports.load=pixel;var has=Object.prototype.hasOwnProperty;var TwitterAds=exports.Integration=integration("Twitter Ads").readyOnInitialize().option("events",{});TwitterAds.prototype.track=function(track){var events=this.options.events;var event=track.event();if(!has.call(events,event))return;return exports.load({txn_id:events[event],p_id:"Twitter"})}});require.register("segmentio-analytics.js-integrations/lib/usercycle.js",function(exports,require,module){var callback=require("callback");var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_uc");module.exports=exports=function(analytics){analytics.addIntegration(Usercycle)};var Usercycle=exports.Integration=integration("USERcycle").assumesPageview().readyOnInitialize().global("_uc").option("key","");Usercycle.prototype.initialize=function(page){push("_key",this.options.key);this.load()};Usercycle.prototype.loaded=function(){return!!(window._uc&&window._uc.push!==Array.prototype.push)};Usercycle.prototype.load=function(callback){load("//api.usercycle.com/javascripts/track.js",callback)};Usercycle.prototype.identify=function(identify){var traits=identify.traits();var id=identify.userId();if(id)push("uid",id);push("action","came_back",traits)};Usercycle.prototype.track=function(track){push("action",track.event(),track.properties({revenue:"revenue_amount"}))}});require.register("segmentio-analytics.js-integrations/lib/userfox.js",function(exports,require,module){var alias=require("alias");var callback=require("callback");var convertDates=require("convert-dates");var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_ufq");module.exports=exports=function(analytics){analytics.addIntegration(Userfox)};var Userfox=exports.Integration=integration("userfox").assumesPageview().readyOnInitialize().global("_ufq").option("clientId","");Userfox.prototype.initialize=function(page){window._ufq=[];this.load()};Userfox.prototype.loaded=function(){return!!(window._ufq&&window._ufq.push!==Array.prototype.push)};Userfox.prototype.load=function(callback){load("//d2y71mjhnajxcg.cloudfront.net/js/userfox-stable.js",callback)};Userfox.prototype.identify=function(identify){var traits=identify.traits({created:"signup_date"});var email=identify.email();if(!email)return;push("init",{clientId:this.options.clientId,email:email});traits=convertDates(traits,formatDate);push("track",traits)};function formatDate(date){return Math.round(date.getTime()/1e3).toString()}});require.register("segmentio-analytics.js-integrations/lib/uservoice.js",function(exports,require,module){var alias=require("alias");var callback=require("callback");var clone=require("clone");var convertDates=require("convert-dates");var integration=require("integration");var load=require("load-script");var push=require("global-queue")("UserVoice");var unix=require("to-unix-timestamp");module.exports=exports=function(analytics){analytics.addIntegration(UserVoice)};var UserVoice=exports.Integration=integration("UserVoice").assumesPageview().readyOnInitialize().global("UserVoice").global("showClassicWidget").option("apiKey","").option("classic",false).option("forumId",null).option("showWidget",true).option("mode","contact").option("accentColor","#448dd6").option("smartvote",true).option("trigger",null).option("triggerPosition","bottom-right").option("triggerColor","#ffffff").option("triggerBackgroundColor","rgba(46, 49, 51, 0.6)").option("classicMode","full").option("primaryColor","#cc6d00").option("linkColor","#007dbf").option("defaultMode","support").option("tabLabel","Feedback & Support").option("tabColor","#cc6d00").option("tabPosition","middle-right").option("tabInverted",false);UserVoice.on("construct",function(integration){if(!integration.options.classic)return;integration.group=undefined;integration.identify=integration.identifyClassic;integration.initialize=integration.initializeClassic});UserVoice.prototype.initialize=function(page){var options=this.options;var opts=formatOptions(options);push("set",opts);push("autoprompt",{});if(options.showWidget){options.trigger?push("addTrigger",options.trigger,opts):push("addTrigger",opts)}this.load()};UserVoice.prototype.loaded=function(){return!!(window.UserVoice&&window.UserVoice.push!==Array.prototype.push)};UserVoice.prototype.load=function(callback){var key=this.options.apiKey;load("//widget.uservoice.com/"+key+".js",callback)};UserVoice.prototype.identify=function(identify){var traits=identify.traits({created:"created_at"});traits=convertDates(traits,unix);push("identify",traits)};UserVoice.prototype.group=function(group){var traits=group.traits({created:"created_at"});traits=convertDates(traits,unix);push("identify",{account:traits})};UserVoice.prototype.initializeClassic=function(){var options=this.options;window.showClassicWidget=showClassicWidget;if(options.showWidget)showClassicWidget("showTab",formatClassicOptions(options));this.load()};UserVoice.prototype.identifyClassic=function(identify){push("setCustomFields",identify.traits())};function formatOptions(options){return alias(options,{forumId:"forum_id",accentColor:"accent_color",smartvote:"smartvote_enabled",triggerColor:"trigger_color",triggerBackgroundColor:"trigger_background_color",triggerPosition:"trigger_position"})}function formatClassicOptions(options){return alias(options,{forumId:"forum_id",classicMode:"mode",primaryColor:"primary_color",tabPosition:"tab_position",tabColor:"tab_color",linkColor:"link_color",defaultMode:"default_mode",tabLabel:"tab_label",tabInverted:"tab_inverted"})}function showClassicWidget(type,options){type=type||"showLightbox";push(type,"classic_widget",options)}});require.register("segmentio-analytics.js-integrations/lib/vero.js",function(exports,require,module){var callback=require("callback");var integration=require("integration");var load=require("load-script");var push=require("global-queue")("_veroq");module.exports=exports=function(analytics){analytics.addIntegration(Vero)};var Vero=exports.Integration=integration("Vero").readyOnInitialize().global("_veroq").option("apiKey","");Vero.prototype.initialize=function(pgae){push("init",{api_key:this.options.apiKey});this.load()};Vero.prototype.loaded=function(){return!!(window._veroq&&window._veroq.push!==Array.prototype.push)};Vero.prototype.load=function(callback){load("//d3qxef4rp70elm.cloudfront.net/m.js",callback)};Vero.prototype.page=function(page){push("trackPageview")};Vero.prototype.identify=function(identify){var traits=identify.traits();var email=identify.email();var id=identify.userId();if(!id||!email)return;push("user",traits)};Vero.prototype.track=function(track){push("track",track.event(),track.properties())}});require.register("segmentio-analytics.js-integrations/lib/visual-website-optimizer.js",function(exports,require,module){var callback=require("callback");var each=require("each");var integration=require("integration");var tick=require("next-tick");var analytics;module.exports=exports=function(ajs){ajs.addIntegration(VWO);analytics=ajs};var VWO=exports.Integration=integration("Visual Website Optimizer").readyOnInitialize().option("replay",true);VWO.prototype.initialize=function(){if(this.options.replay)this.replay()};VWO.prototype.replay=function(){tick(function(){experiments(function(err,traits){if(traits)analytics.identify(traits)})})};function experiments(callback){enqueue(function(){var data={};var ids=window._vwo_exp_ids;if(!ids)return callback();each(ids,function(id){var name=variation(id);if(name)data["Experiment: "+id]=name});callback(null,data)})}function enqueue(fn){window._vis_opt_queue=window._vis_opt_queue||[];window._vis_opt_queue.push(fn)}function variation(id){var experiments=window._vwo_exp;if(!experiments)return null;var experiment=experiments[id];var variationId=experiment.combination_chosen;return variationId?experiment.comb_n[variationId]:null}});require.register("segmentio-analytics.js-integrations/lib/webengage.js",function(exports,require,module){var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(WebEngage)};var WebEngage=exports.Integration=integration("WebEngage").assumesPageview().readyOnLoad().global("_weq").global("webengage").option("widgetVersion","4.0").option("licenseCode","");WebEngage.prototype.initialize=function(page){var _weq=window._weq=window._weq||{};_weq["webengage.licenseCode"]=this.options.licenseCode;_weq["webengage.widgetVersion"]=this.options.widgetVersion;this.load()};WebEngage.prototype.loaded=function(){return!!window.webengage};WebEngage.prototype.load=function(fn){var path="/js/widget/webengage-min-v-4.0.js";load({https:"https://ssl.widgets.webengage.com"+path,http:"http://cdn.widgets.webengage.com"+path},fn)}});require.register("segmentio-analytics.js-integrations/lib/woopra.js",function(exports,require,module){var integration=require("integration");var snake=require("to-snake-case");var load=require("load-script");var isEmail=require("is-email");var extend=require("extend");var each=require("each");var type=require("type");module.exports=exports=function(analytics){analytics.addIntegration(Woopra)};var Woopra=exports.Integration=integration("Woopra").readyOnLoad().global("woopra").option("domain","").option("cookieName","wooTracker").option("cookieDomain",null).option("cookiePath","/").option("ping",true).option("pingInterval",12e3).option("idleTimeout",3e5).option("downloadTracking",true).option("outgoingTracking",true).option("outgoingIgnoreSubdomain",true).option("downloadPause",200).option("outgoingPause",400).option("ignoreQueryUrl",true).option("hideCampaign",false);Woopra.prototype.initialize=function(page){(function(){var i,s,z,w=window,d=document,a=arguments,q="script",f=["config","track","identify","visit","push","call"],c=function(){var i,self=this;self._e=[];for(i=0;i<f.length;i++){(function(f){self[f]=function(){self._e.push([f].concat(Array.prototype.slice.call(arguments,0)));return self}})(f[i])}};w._w=w._w||{};for(i=0;i<a.length;i++){w._w[a[i]]=w[a[i]]=w[a[i]]||new c}})("woopra");this.load();each(this.options,function(key,value){key=snake(key);if(null==value)return;if(""===value)return;window.woopra.config(key,value)})};Woopra.prototype.loaded=function(){return!!(window.woopra&&window.woopra.loaded)};Woopra.prototype.load=function(callback){load("//static.woopra.com/js/w.js",callback)};Woopra.prototype.page=function(page){var props=page.properties();var name=page.fullName();if(name)props.title=name;window.woopra.track("pv",props)};Woopra.prototype.identify=function(identify){window.woopra.identify(identify.traits()).push()};Woopra.prototype.track=function(track){window.woopra.track(track.event(),track.properties())}});require.register("segmentio-analytics.js-integrations/lib/yandex-metrica.js",function(exports,require,module){var callback=require("callback");var integration=require("integration");var load=require("load-script");module.exports=exports=function(analytics){analytics.addIntegration(Yandex)};var Yandex=exports.Integration=integration("Yandex Metrica").assumesPageview().readyOnInitialize().global("yandex_metrika_callbacks").global("Ya").option("counterId",null);Yandex.prototype.initialize=function(page){var id=this.options.counterId;push(function(){window["yaCounter"+id]=new window.Ya.Metrika({id:id})});this.load()};Yandex.prototype.loaded=function(){return!!(window.Ya&&window.Ya.Metrika)};Yandex.prototype.load=function(callback){load("//mc.yandex.ru/metrika/watch.js",callback)};function push(callback){window.yandex_metrika_callbacks=window.yandex_metrika_callbacks||[];window.yandex_metrika_callbacks.push(callback)}});require.register("segmentio-canonical/index.js",function(exports,require,module){module.exports=function canonical(){var tags=document.getElementsByTagName("link");for(var i=0,tag;tag=tags[i];i++){if("canonical"==tag.getAttribute("rel"))return tag.getAttribute("href")}}});require.register("segmentio-extend/index.js",function(exports,require,module){module.exports=function extend(object){var args=Array.prototype.slice.call(arguments,1);for(var i=0,source;source=args[i];i++){if(!source)continue;for(var property in source){object[property]=source[property]}}return object}});require.register("camshaft-require-component/index.js",function(exports,require,module){module.exports=function(parent){function require(name,fallback){try{return parent(name)}catch(e){try{return parent(fallback||name+"-component")}catch(e2){throw e}}}for(var key in parent){require[key]=parent[key]}return require}});require.register("segmentio-facade/lib/index.js",function(exports,require,module){var Facade=require("./facade");module.exports=Facade;Facade.Alias=require("./alias");Facade.Group=require("./group");Facade.Identify=require("./identify");Facade.Track=require("./track");Facade.Page=require("./page");Facade.Screen=require("./screen")});require.register("segmentio-facade/lib/alias.js",function(exports,require,module){var Facade=require("./facade");var component=require("require-component")(require);var inherit=component("inherit");module.exports=Alias;function Alias(dictionary){Facade.call(this,dictionary)}inherit(Alias,Facade);Alias.prototype.type=Alias.prototype.action=function(){return"alias"};Alias.prototype.from=Alias.prototype.previousId=function(){return this.field("previousId")||this.field("from")};Alias.prototype.to=Alias.prototype.userId=function(){return this.field("userId")||this.field("to")}});require.register("segmentio-facade/lib/facade.js",function(exports,require,module){var component=require("require-component")(require);var clone=component("clone");var isEnabled=component("./is-enabled");var objCase=component("obj-case");var traverse=component("isodate-traverse");module.exports=Facade;function Facade(obj){if(!obj.hasOwnProperty("timestamp"))obj.timestamp=new Date;else obj.timestamp=new Date(obj.timestamp);this.obj=obj}Facade.prototype.proxy=function(field){var fields=field.split(".");field=fields.shift();var obj=this[field]||this.field(field);if(!obj)return obj;if(typeof obj==="function")obj=obj.call(this)||{};if(fields.length===0)return transform(obj);obj=objCase(obj,fields.join("."));return transform(obj)};Facade.prototype.field=function(field){var obj=this.obj[field];return transform(obj)};Facade.proxy=function(field){return function(){return this.proxy(field)}};Facade.field=function(field){return function(){return this.field(field)}};Facade.prototype.json=function(){return clone(this.obj)};Facade.prototype.context=Facade.prototype.options=function(integration){var options=clone(this.obj.options||this.obj.context)||{};if(!integration)return clone(options);if(!this.enabled(integration))return;var integrations=this.integrations();var value=integrations[integration]||objCase(integrations,integration);if("boolean"==typeof value)value={};return value||{}};Facade.prototype.enabled=function(integration){var allEnabled=this.proxy("options.providers.all");if(typeof allEnabled!=="boolean")allEnabled=this.proxy("options.all");if(typeof allEnabled!=="boolean")allEnabled=this.proxy("integrations.all");if(typeof allEnabled!=="boolean")allEnabled=true;var enabled=allEnabled&&isEnabled(integration);var options=this.integrations();if(options.providers&&options.providers.hasOwnProperty(integration)){enabled=options.providers[integration]}if(options.hasOwnProperty(integration)){var settings=options[integration];if(typeof settings==="boolean"){enabled=settings}else{enabled=true}}return enabled?true:false};Facade.prototype.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()};Facade.prototype.active=function(){var active=this.proxy("options.active");if(active===null||active===undefined)active=true;return active};Facade.prototype.sessionId=Facade.prototype.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")};Facade.prototype.library=function(){var library=this.proxy("options.library");if(!library)return{name:"unknown",version:null};if(typeof library==="string")return{name:library,version:null};return library};Facade.prototype.userId=Facade.field("userId");Facade.prototype.channel=Facade.field("channel");Facade.prototype.timestamp=Facade.field("timestamp");Facade.prototype.userAgent=Facade.proxy("options.userAgent");Facade.prototype.ip=Facade.proxy("options.ip");function transform(obj){var cloned=clone(obj);traverse(cloned);return cloned}});require.register("segmentio-facade/lib/group.js",function(exports,require,module){var Facade=require("./facade");var component=require("require-component")(require);var inherit=component("inherit");var newDate=component("new-date");module.exports=Group;function Group(dictionary){Facade.call(this,dictionary)}inherit(Group,Facade);Group.prototype.type=Group.prototype.action=function(){return"group"};Group.prototype.groupId=Facade.field("groupId");Group.prototype.created=function(){var created=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(created)return newDate(created)};Group.prototype.traits=function(aliases){var ret=this.properties();var id=this.groupId();aliases=aliases||{};if(id)ret.id=id;for(var alias in aliases){var value=null==this[alias]?this.proxy("traits."+alias):this[alias]();if(null==value)continue;ret[aliases[alias]]=value;delete ret[alias]}return ret};Group.prototype.properties=function(){return this.field("traits")||this.field("properties")||{}}});require.register("segmentio-facade/lib/page.js",function(exports,require,module){var component=require("require-component")(require);var Facade=component("./facade");var inherit=component("inherit");var Track=require("./track");module.exports=Page;function Page(dictionary){Facade.call(this,dictionary)}inherit(Page,Facade);Page.prototype.type=Page.prototype.action=function(){return"page"};Page.prototype.category=Facade.field("category");Page.prototype.name=Facade.field("name");Page.prototype.properties=function(){var props=this.field("properties")||{};var category=this.category();var name=this.name();if(category)props.category=category;if(name)props.name=name;return props};Page.prototype.fullName=function(){var category=this.category();var name=this.name();return name&&category?category+" "+name:name};Page.prototype.event=function(name){return name?"Viewed "+name+" Page":"Loaded a Page"};Page.prototype.track=function(name){var props=this.properties();return new Track({event:this.event(name),properties:props})}});require.register("segmentio-facade/lib/identify.js",function(exports,require,module){var component=require("require-component")(require);var clone=component("clone");var Facade=component("./facade");var inherit=component("inherit");var isEmail=component("is-email");var newDate=component("new-date");var trim=component("trim");module.exports=Identify;function Identify(dictionary){Facade.call(this,dictionary)}inherit(Identify,Facade);Identify.prototype.type=Identify.prototype.action=function(){return"identify"};Identify.prototype.traits=function(aliases){var ret=this.field("traits")||{};var id=this.userId();aliases=aliases||{};if(id)ret.id=id;for(var alias in aliases){var value=null==this[alias]?this.proxy("traits."+alias):this[alias]();if(null==value)continue;ret[aliases[alias]]=value;delete ret[alias]}return ret};Identify.prototype.email=function(){var email=this.proxy("traits.email");if(email)return email;var userId=this.userId();if(isEmail(userId))return userId};Identify.prototype.created=function(){var created=this.proxy("traits.created")||this.proxy("traits.createdAt");if(created)return newDate(created)};Identify.prototype.companyCreated=function(){var created=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(created)return newDate(created)};Identify.prototype.name=function(){var name=this.proxy("traits.name");if(typeof name==="string")return trim(name);var firstName=this.firstName();var lastName=this.lastName();if(firstName&&lastName)return trim(firstName+" "+lastName)};Identify.prototype.firstName=function(){var firstName=this.proxy("traits.firstName");if(typeof firstName==="string")return trim(firstName);var name=this.proxy("traits.name");if(typeof name==="string")return trim(name).split(" ")[0]};Identify.prototype.lastName=function(){var lastName=this.proxy("traits.lastName");if(typeof lastName==="string")return trim(lastName);var name=this.proxy("traits.name");if(typeof name!=="string")return;var space=trim(name).indexOf(" ");if(space===-1)return;return trim(name.substr(space+1))};Identify.prototype.uid=function(){return this.userId()||this.username()||this.email()};Identify.prototype.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")};Identify.prototype.username=Facade.proxy("traits.username");Identify.prototype.website=Facade.proxy("traits.website");Identify.prototype.phone=Facade.proxy("traits.phone");Identify.prototype.address=Facade.proxy("traits.address");Identify.prototype.avatar=Facade.proxy("traits.avatar")});require.register("segmentio-facade/lib/is-enabled.js",function(exports,require,module){var disabled={Salesforce:true,Marketo:true};module.exports=function(integration){return!disabled[integration]}});require.register("segmentio-facade/lib/track.js",function(exports,require,module){var component=require("require-component")(require);var clone=component("clone");var Facade=component("./facade");var Identify=component("./identify");var inherit=component("inherit");var isEmail=component("is-email");module.exports=Track;function Track(dictionary){Facade.call(this,dictionary)}inherit(Track,Facade);Track.prototype.type=Track.prototype.action=function(){return"track"};Track.prototype.event=Facade.field("event");Track.prototype.value=Facade.proxy("properties.value");Track.prototype.category=Facade.proxy("properties.category");Track.prototype.country=Facade.proxy("properties.country");Track.prototype.state=Facade.proxy("properties.state");Track.prototype.city=Facade.proxy("properties.city");Track.prototype.zip=Facade.proxy("properties.zip");Track.prototype.id=Facade.proxy("properties.id");Track.prototype.sku=Facade.proxy("properties.sku");Track.prototype.tax=Facade.proxy("properties.tax");Track.prototype.name=Facade.proxy("properties.name");Track.prototype.price=Facade.proxy("properties.price");Track.prototype.total=Facade.proxy("properties.total");Track.prototype.coupon=Facade.proxy("properties.coupon");Track.prototype.shipping=Facade.proxy("properties.shipping");Track.prototype.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.orderId")};Track.prototype.subtotal=function(){var subtotal=this.obj.properties.subtotal;var total=this.total();var n;if(subtotal)return subtotal;if(!total)return 0;if(n=this.tax())total-=n;if(n=this.shipping())total-=n;return total};Track.prototype.products=function(){var props=this.obj.properties||{};return props.products||[]};Track.prototype.quantity=function(){var props=this.obj.properties||{};return props.quantity||1};Track.prototype.currency=function(){var props=this.obj.properties||{};return props.currency||"USD"};Track.prototype.referrer=Facade.proxy("properties.referrer");Track.prototype.query=Facade.proxy("options.query");Track.prototype.properties=function(aliases){var ret=this.field("properties")||{};aliases=aliases||{};for(var alias in aliases){var value=null==this[alias]?this.proxy("properties."+alias):this[alias]();if(null==value)continue;ret[aliases[alias]]=value;delete ret[alias]}return ret};Track.prototype.traits=function(){return this.proxy("options.traits")||{}};Track.prototype.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()};Track.prototype.email=function(){var email=this.proxy("traits.email");email=email||this.proxy("properties.email");if(email)return email;var userId=this.userId();if(isEmail(userId))return userId};Track.prototype.revenue=function(){var revenue=this.proxy("properties.revenue");var event=this.event();if(!revenue&&event&&event.match(/completed ?order/i)){revenue=this.proxy("properties.total")}return currency(revenue)};Track.prototype.cents=function(){var revenue=this.revenue();return"number"!=typeof revenue?this.value()||0:revenue*100};Track.prototype.identify=function(){var json=this.json();json.traits=this.traits();return new Identify(json)};function currency(val){if(!val)return;if(typeof val==="number")return val;if(typeof val!=="string")return;val=val.replace(/\$/g,"");val=parseFloat(val);if(!isNaN(val))return val}});require.register("segmentio-facade/lib/screen.js",function(exports,require,module){var component=require("require-component")(require); var inherit=component("inherit");var Page=component("./page");var Track=require("./track");module.exports=Screen;function Screen(dictionary){Page.call(this,dictionary)}inherit(Screen,Page);Screen.prototype.type=Screen.prototype.action=function(){return"screen"};Screen.prototype.event=function(name){return name?"Viewed "+name+" Screen":"Loaded a Screen"};Screen.prototype.track=function(name){var props=this.properties();return new Track({event:this.event(name),properties:props})}});require.register("segmentio-is-email/index.js",function(exports,require,module){module.exports=isEmail;var matcher=/.+\@.+\..+/;function isEmail(string){return matcher.test(string)}});require.register("segmentio-is-meta/index.js",function(exports,require,module){module.exports=function isMeta(e){if(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)return true;var which=e.which,button=e.button;if(!which&&button!==undefined){return!button&1&&!button&2&&button&4}else if(which===2){return true}return false}});require.register("segmentio-isodate/index.js",function(exports,require,module){var matcher=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;exports.parse=function(iso){var numericKeys=[1,5,6,7,8,11,12];var arr=matcher.exec(iso);var offset=0;if(!arr)return new Date(iso);for(var i=0,val;val=numericKeys[i];i++){arr[val]=parseInt(arr[val],10)||0}arr[2]=parseInt(arr[2],10)||1;arr[3]=parseInt(arr[3],10)||1;arr[2]--;if(arr[8])arr[8]=(arr[8]+"00").substring(0,3);if(arr[4]==" "){offset=(new Date).getTimezoneOffset()}else if(arr[9]!=="Z"&&arr[10]){offset=arr[11]*60+arr[12];if("+"==arr[10])offset=0-offset}var millis=Date.UTC(arr[1],arr[2],arr[3],arr[5],arr[6]+offset,arr[7],arr[8]);return new Date(millis)};exports.is=function(string,strict){if(strict&&false===/^\d{4}-\d{2}-\d{2}/.test(string))return false;return matcher.test(string)}});require.register("segmentio-isodate-traverse/index.js",function(exports,require,module){var is=require("is");var isodate=require("isodate");var each;try{each=require("each")}catch(err){each=require("each-component")}module.exports=traverse;function traverse(input,strict){if(strict===undefined)strict=true;if(is.object(input)){return object(input,strict)}else if(is.array(input)){return array(input,strict)}}function object(obj,strict){each(obj,function(key,val){if(isodate.is(val,strict)){obj[key]=isodate.parse(val)}else if(is.object(val)||is.array(val)){traverse(val,strict)}});return obj}function array(arr,strict){each(arr,function(val,x){if(is.object(val)){traverse(val,strict)}else if(isodate.is(val,strict)){arr[x]=isodate.parse(val)}});return arr}});require.register("component-json-fallback/index.js",function(exports,require,module){(function(){"use strict";var JSON=module.exports={};function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}}var cx,escapable,gap,indent,meta,rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else if(typeof space==="string"){indent=space}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})()});require.register("segmentio-json/index.js",function(exports,require,module){var json=window.JSON||{};var stringify=json.stringify;var parse=json.parse;module.exports=parse&&stringify?JSON:require("json-fallback")});require.register("segmentio-new-date/lib/index.js",function(exports,require,module){var is=require("is");var isodate=require("isodate");var milliseconds=require("./milliseconds");var seconds=require("./seconds");module.exports=function newDate(val){if(is.date(val))return val;if(is.number(val))return new Date(toMs(val));if(isodate.is(val))return isodate.parse(val);if(milliseconds.is(val))return milliseconds.parse(val);if(seconds.is(val))return seconds.parse(val);return new Date(val)};function toMs(num){if(num<315576e5)return num*1e3;return num}});require.register("segmentio-new-date/lib/milliseconds.js",function(exports,require,module){var matcher=/\d{13}/;exports.is=function(string){return matcher.test(string)};exports.parse=function(millis){millis=parseInt(millis,10);return new Date(millis)}});require.register("segmentio-new-date/lib/seconds.js",function(exports,require,module){var matcher=/\d{10}/;exports.is=function(string){return matcher.test(string)};exports.parse=function(seconds){var millis=parseInt(seconds,10)*1e3;return new Date(millis)}});require.register("segmentio-store.js/store.js",function(exports,require,module){(function(win){var store={},doc=win.document,localStorageName="localStorage",namespace="__storejs__",storage;store.disabled=false;store.set=function(key,value){};store.get=function(key){};store.remove=function(key){};store.clear=function(){};store.transact=function(key,defaultVal,transactionFn){var val=store.get(key);if(transactionFn==null){transactionFn=defaultVal;defaultVal=null}if(typeof val=="undefined"){val=defaultVal||{}}transactionFn(val);store.set(key,val)};store.getAll=function(){};store.serialize=function(value){return JSON.stringify(value)};store.deserialize=function(value){if(typeof value!="string"){return undefined}try{return JSON.parse(value)}catch(e){return value||undefined}};function isLocalStorageNameSupported(){try{return localStorageName in win&&win[localStorageName]}catch(err){return false}}if(isLocalStorageNameSupported()){storage=win[localStorageName];store.set=function(key,val){if(val===undefined){return store.remove(key)}storage.setItem(key,store.serialize(val));return val};store.get=function(key){return store.deserialize(storage.getItem(key))};store.remove=function(key){storage.removeItem(key)};store.clear=function(){storage.clear()};store.getAll=function(){var ret={};for(var i=0;i<storage.length;++i){var key=storage.key(i);ret[key]=store.get(key)}return ret}}else if(doc.documentElement.addBehavior){var storageOwner,storageContainer;try{storageContainer=new ActiveXObject("htmlfile");storageContainer.open();storageContainer.write("<s"+"cript>document.w=window</s"+'cript><iframe src="/favicon.ico"></iframe>');storageContainer.close();storageOwner=storageContainer.w.frames[0].document;storage=storageOwner.createElement("div")}catch(e){storage=doc.createElement("div");storageOwner=doc.body}function withIEStorage(storeFunction){return function(){var args=Array.prototype.slice.call(arguments,0);args.unshift(storage);storageOwner.appendChild(storage);storage.addBehavior("#default#userData");storage.load(localStorageName);var result=storeFunction.apply(store,args);storageOwner.removeChild(storage);return result}}var forbiddenCharsRegex=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function ieKeyFix(key){return key.replace(forbiddenCharsRegex,"___")}store.set=withIEStorage(function(storage,key,val){key=ieKeyFix(key);if(val===undefined){return store.remove(key)}storage.setAttribute(key,store.serialize(val));storage.save(localStorageName);return val});store.get=withIEStorage(function(storage,key){key=ieKeyFix(key);return store.deserialize(storage.getAttribute(key))});store.remove=withIEStorage(function(storage,key){key=ieKeyFix(key);storage.removeAttribute(key);storage.save(localStorageName)});store.clear=withIEStorage(function(storage){var attributes=storage.XMLDocument.documentElement.attributes;storage.load(localStorageName);for(var i=0,attr;attr=attributes[i];i++){storage.removeAttribute(attr.name)}storage.save(localStorageName)});store.getAll=withIEStorage(function(storage){var attributes=storage.XMLDocument.documentElement.attributes;var ret={};for(var i=0,attr;attr=attributes[i];++i){var key=ieKeyFix(attr.name);ret[attr.name]=store.deserialize(storage.getAttribute(key))}return ret})}try{store.set(namespace,namespace);if(store.get(namespace)!=namespace){store.disabled=true}store.remove(namespace)}catch(e){store.disabled=true}store.enabled=!store.disabled;if(typeof module!="undefined"&&module.exports){module.exports=store}else if(typeof define==="function"&&define.amd){define(store)}else{win.store=store}})(this.window||global)});require.register("segmentio-top-domain/index.js",function(exports,require,module){var parse=require("url").parse;module.exports=domain;var regexp=/[a-z0-9][a-z0-9\-]*[a-z0-9]\.[a-z\.]{2,6}$/i;function domain(url){var host=parse(url).hostname;var match=host.match(regexp);return match?match[0]:""}});require.register("visionmedia-debug/index.js",function(exports,require,module){if("undefined"==typeof window){module.exports=require("./lib/debug")}else{module.exports=require("./debug")}});require.register("visionmedia-debug/debug.js",function(exports,require,module){module.exports=debug;function debug(name){if(!debug.enabled(name))return function(){};return function(fmt){fmt=coerce(fmt);var curr=new Date;var ms=curr-(debug[name]||curr);debug[name]=curr;fmt=name+" "+fmt+" +"+debug.humanize(ms);window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}}debug.names=[];debug.skips=[];debug.enable=function(name){try{localStorage.debug=name}catch(e){}var split=(name||"").split(/[\s,]+/),len=split.length;for(var i=0;i<len;i++){name=split[i].replace("*",".*?");if(name[0]==="-"){debug.skips.push(new RegExp("^"+name.substr(1)+"$"))}else{debug.names.push(new RegExp("^"+name+"$"))}}};debug.disable=function(){debug.enable("")};debug.humanize=function(ms){var sec=1e3,min=60*1e3,hour=60*min;if(ms>=hour)return(ms/hour).toFixed(1)+"h";if(ms>=min)return(ms/min).toFixed(1)+"m";if(ms>=sec)return(ms/sec|0)+"s";return ms+"ms"};debug.enabled=function(name){for(var i=0,len=debug.skips.length;i<len;i++){if(debug.skips[i].test(name)){return false}}for(var i=0,len=debug.names.length;i<len;i++){if(debug.names[i].test(name)){return true}}return false};function coerce(val){if(val instanceof Error)return val.stack||val.message;return val}try{if(window.localStorage)debug.enable(localStorage.debug)}catch(e){}});require.register("yields-prevent/index.js",function(exports,require,module){module.exports=function(e){e=e||window.event;return e.preventDefault?e.preventDefault():e.returnValue=false}});require.register("analytics/lib/index.js",function(exports,require,module){var Integrations=require("integrations");var Analytics=require("./analytics");var each=require("each");var analytics=module.exports=exports=new Analytics;analytics.require=require;exports.VERSION="1.5.9";each(Integrations,function(name,Integration){analytics.use(Integration)})});require.register("analytics/lib/analytics.js",function(exports,require,module){var after=require("after");var bind=require("bind");var callback=require("callback");var canonical=require("canonical");var clone=require("clone");var cookie=require("./cookie");var debug=require("debug");var defaults=require("defaults");var each=require("each");var Emitter=require("emitter");var group=require("./group");var is=require("is");var isEmail=require("is-email");var isMeta=require("is-meta");var newDate=require("new-date");var on=require("event").bind;var prevent=require("prevent");var querystring=require("querystring");var size=require("object").length;var store=require("./store");var url=require("url");var user=require("./user");var Facade=require("facade");var Identify=Facade.Identify;var Group=Facade.Group;var Alias=Facade.Alias;var Track=Facade.Track;var Page=Facade.Page;module.exports=Analytics;function Analytics(){this.Integrations={};this._integrations={};this._readied=false;this._timeout=300;this._user=user;bind.all(this);var self=this;this.on("initialize",function(settings,options){if(options.initialPageview)self.page()});this.on("initialize",function(){self._parseQuery()})}Emitter(Analytics.prototype);Analytics.prototype.use=function(plugin){plugin(this);return this};Analytics.prototype.addIntegration=function(Integration){var name=Integration.prototype.name;if(!name)throw new TypeError("attempted to add an invalid integration");this.Integrations[name]=Integration;return this};Analytics.prototype.init=Analytics.prototype.initialize=function(settings,options){settings=settings||{};options=options||{};this._options(options);this._readied=false;this._integrations={};user.load();group.load();var self=this;each(settings,function(name){var Integration=self.Integrations[name];if(!Integration)delete settings[name]});var ready=after(size(settings),function(){self._readied=true;self.emit("ready")});each(settings,function(name,opts){var Integration=self.Integrations[name];if(options.initialPageview&&opts.initialPageview===false){Integration.prototype.page=after(2,Integration.prototype.page)}var integration=new Integration(clone(opts));integration.once("ready",ready);integration.initialize();self._integrations[name]=integration});this.initialized=true;this.emit("initialize",settings,options);return this};Analytics.prototype.identify=function(id,traits,options,fn){if(is.fn(options))fn=options,options=null;if(is.fn(traits))fn=traits,options=null,traits=null;if(is.object(id))options=traits,traits=id,id=user.id();user.identify(id,traits);id=user.id();traits=user.traits();this._invoke("identify",new Identify({options:options,traits:traits,userId:id}));this.emit("identify",id,traits,options);this._callback(fn);return this};Analytics.prototype.user=function(){return user};Analytics.prototype.group=function(id,traits,options,fn){if(0===arguments.length)return group;if(is.fn(options))fn=options,options=null;if(is.fn(traits))fn=traits,options=null,traits=null;if(is.object(id))options=traits,traits=id,id=group.id();group.identify(id,traits);id=group.id();traits=group.traits();this._invoke("group",new Group({options:options,traits:traits,groupId:id}));this.emit("group",id,traits,options);this._callback(fn);return this};Analytics.prototype.track=function(event,properties,options,fn){if(is.fn(options))fn=options,options=null;if(is.fn(properties))fn=properties,options=null,properties=null;this._invoke("track",new Track({properties:properties,options:options,event:event}));this.emit("track",event,properties,options);this._callback(fn);return this};Analytics.prototype.trackClick=Analytics.prototype.trackLink=function(links,event,properties){if(!links)return this;if(is.element(links))links=[links];var self=this;each(links,function(el){on(el,"click",function(e){var ev=is.fn(event)?event(el):event;var props=is.fn(properties)?properties(el):properties;self.track(ev,props);if(el.href&&el.target!=="_blank"&&!isMeta(e)){prevent(e);self._callback(function(){window.location.href=el.href})}})});return this};Analytics.prototype.trackSubmit=Analytics.prototype.trackForm=function(forms,event,properties){if(!forms)return this;if(is.element(forms))forms=[forms];var self=this;each(forms,function(el){function handler(e){prevent(e);var ev=is.fn(event)?event(el):event;var props=is.fn(properties)?properties(el):properties;self.track(ev,props);self._callback(function(){el.submit()})}var $=window.jQuery||window.Zepto;if($){$(el).submit(handler)}else{on(el,"submit",handler)}});return this};Analytics.prototype.page=function(category,name,properties,options,fn){if(is.fn(options))fn=options,options=null;if(is.fn(properties))fn=properties,options=properties=null;if(is.fn(name))fn=name,options=properties=name=null;if(is.object(category))options=name,properties=category,name=category=null;if(is.object(name))options=properties,properties=name,name=null;if(is.string(category)&&!is.string(name))name=category,category=null;var defs={path:canonicalPath(),referrer:document.referrer,title:document.title,search:location.search};if(name)defs.name=name;if(category)defs.category=category;properties=clone(properties)||{};defaults(properties,defs);properties.url=properties.url||canonicalUrl(properties.search);this._invoke("page",new Page({properties:properties,category:category,options:options,name:name}));this.emit("page",category,name,properties,options);this._callback(fn);return this};Analytics.prototype.pageview=function(url,options){var properties={};if(url)properties.path=url;this.page(properties);return this};Analytics.prototype.alias=function(to,from,options,fn){if(is.fn(options))fn=options,options=null;if(is.fn(from))fn=from,options=null,from=null;if(is.object(from))options=from,from=null;this._invoke("alias",new Alias({options:options,from:from,to:to}));this.emit("alias",to,from,options);this._callback(fn);return this};Analytics.prototype.ready=function(fn){if(!is.fn(fn))return this;this._readied?callback.async(fn):this.once("ready",fn);return this};Analytics.prototype.timeout=function(timeout){this._timeout=timeout};Analytics.prototype.debug=function(str){if(0==arguments.length||str){debug.enable("analytics:"+(str||"*"))}else{debug.disable()}};Analytics.prototype._options=function(options){options=options||{};cookie.options(options.cookie);store.options(options.localStorage);user.options(options.user);group.options(options.group);return this};Analytics.prototype._callback=function(fn){callback.async(fn,this._timeout);return this};Analytics.prototype._invoke=function(method,facade){var options=facade.options();this.emit("invoke",facade);each(this._integrations,function(name,integration){if(!facade.enabled(name))return;integration.invoke.call(integration,method,facade)});return this};Analytics.prototype.push=function(args){var method=args.shift();if(!this[method])return;this[method].apply(this,args)};Analytics.prototype._parseQuery=function(){var q=querystring.parse(window.location.search);if(q.ajs_uid)this.identify(q.ajs_uid);if(q.ajs_event)this.track(q.ajs_event);return this};function canonicalPath(){var canon=canonical();if(!canon)return window.location.pathname;var parsed=url.parse(canon);return parsed.pathname}function canonicalUrl(search){var canon=canonical();if(canon)return~canon.indexOf("?")?canon:canon+search;var url=window.location.href;var i=url.indexOf("#");return-1==i?url:url.slice(0,i)}});require.register("analytics/lib/cookie.js",function(exports,require,module){var bind=require("bind");var cookie=require("cookie");var clone=require("clone");var defaults=require("defaults");var json=require("json");var topDomain=require("top-domain");function Cookie(options){this.options(options)}Cookie.prototype.options=function(options){if(arguments.length===0)return this._options;options=options||{};var domain="."+topDomain(window.location.href);if("."==domain)domain="";defaults(options,{maxage:31536e6,path:"/",domain:domain});this._options=options};Cookie.prototype.set=function(key,value){try{value=json.stringify(value);cookie(key,value,clone(this._options));return true}catch(e){return false}};Cookie.prototype.get=function(key){try{var value=cookie(key);value=value?json.parse(value):null;return value}catch(e){return null}};Cookie.prototype.remove=function(key){try{cookie(key,null,clone(this._options));return true}catch(e){return false}};module.exports=bind.all(new Cookie);module.exports.Cookie=Cookie});require.register("analytics/lib/entity.js",function(exports,require,module){var traverse=require("isodate-traverse");var defaults=require("defaults");var cookie=require("./cookie");var store=require("./store");var extend=require("extend");var clone=require("clone");module.exports=Entity;function Entity(options){this.options(options)}Entity.prototype.options=function(options){if(arguments.length===0)return this._options;options||(options={});defaults(options,this.defaults||{});this._options=options};Entity.prototype.id=function(id){switch(arguments.length){case 0:return this._getId();case 1:return this._setId(id)}};Entity.prototype._getId=function(){var ret=this._options.persist?cookie.get(this._options.cookie.key):this._id;return ret===undefined?null:ret};Entity.prototype._setId=function(id){if(this._options.persist){cookie.set(this._options.cookie.key,id)}else{this._id=id}};Entity.prototype.properties=Entity.prototype.traits=function(traits){switch(arguments.length){case 0:return this._getTraits();case 1:return this._setTraits(traits)}};Entity.prototype._getTraits=function(){var ret=this._options.persist?store.get(this._options.localStorage.key):this._traits;return ret?traverse(clone(ret)):{}};Entity.prototype._setTraits=function(traits){traits||(traits={});if(this._options.persist){store.set(this._options.localStorage.key,traits)}else{this._traits=traits}};Entity.prototype.identify=function(id,traits){traits||(traits={});var current=this.id();if(current===null||current===id)traits=extend(this.traits(),traits);if(id)this.id(id);this.debug("identify %o, %o",id,traits);this.traits(traits);this.save()};Entity.prototype.save=function(){if(!this._options.persist)return false;cookie.set(this._options.cookie.key,this.id());store.set(this._options.localStorage.key,this.traits());return true};Entity.prototype.logout=function(){this.id(null);this.traits({});cookie.remove(this._options.cookie.key);store.remove(this._options.localStorage.key)};Entity.prototype.reset=function(){this.logout();this.options({})};Entity.prototype.load=function(){this.id(cookie.get(this._options.cookie.key));this.traits(store.get(this._options.localStorage.key))}});require.register("analytics/lib/group.js",function(exports,require,module){var debug=require("debug")("analytics:group");var Entity=require("./entity");var inherit=require("inherit");var bind=require("bind");Group.defaults={persist:true,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}};function Group(options){this.defaults=Group.defaults;this.debug=debug;Entity.call(this,options)}inherit(Group,Entity);module.exports=bind.all(new Group);module.exports.Group=Group});require.register("analytics/lib/store.js",function(exports,require,module){var bind=require("bind");var defaults=require("defaults");var store=require("store");function Store(options){this.options(options)}Store.prototype.options=function(options){if(arguments.length===0)return this._options;options=options||{};defaults(options,{enabled:true});this.enabled=options.enabled&&store.enabled;this._options=options};Store.prototype.set=function(key,value){if(!this.enabled)return false;return store.set(key,value)};Store.prototype.get=function(key){if(!this.enabled)return null;return store.get(key)};Store.prototype.remove=function(key){if(!this.enabled)return false;return store.remove(key)};module.exports=bind.all(new Store);module.exports.Store=Store});require.register("analytics/lib/user.js",function(exports,require,module){var debug=require("debug")("analytics:user");var Entity=require("./entity");var inherit=require("inherit");var bind=require("bind");var cookie=require("./cookie");User.defaults={persist:true,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}};function User(options){this.defaults=User.defaults;this.debug=debug;Entity.call(this,options)}inherit(User,Entity);User.prototype.load=function(){if(this._loadOldCookie())return;Entity.prototype.load.call(this)};User.prototype._loadOldCookie=function(){var user=cookie.get(this._options.cookie.oldKey);if(!user)return false;this.id(user.id);this.traits(user.traits);cookie.remove(this._options.cookie.oldKey);return true};module.exports=bind.all(new User);module.exports.User=User});require.register("segmentio-analytics.js-integrations/lib/slugs.json",function(exports,require,module){module.exports=["adroll","adwords","alexa","amplitude","appcues","awesm","awesomatic","bing-ads","bronto","bugherd","bugsnag","chartbeat","churnbee","clicky","comscore","crazy-egg","curebit","customerio","drip","errorception","evergage","facebook-ads","foxmetrics","frontleaf","gauges","get-satisfaction","google-analytics","google-tag-manager","gosquared","heap","hellobar","hittail","hubspot","improvely","inspectlet","intercom","keen-io","kenshoo","kissmetrics","klaviyo","leadlander","livechat","lucky-orange","lytics","mixpanel","mojn","mouseflow","mousestats","navilytics","olark","optimizely","perfect-audience","pingdom","piwik","preact","qualaroo","quantcast","rollbar","saasquatch","sentry","snapengage","spinnakr","tapstream","trakio","twitter-ads","usercycle","userfox","uservoice","vero","visual-website-optimizer","webengage","woopra","yandex-metrica"]});require.alias("avetisk-defaults/index.js","analytics/deps/defaults/index.js");require.alias("avetisk-defaults/index.js","defaults/index.js");require.alias("component-clone/index.js","analytics/deps/clone/index.js");require.alias("component-clone/index.js","clone/index.js");require.alias("component-type/index.js","component-clone/deps/type/index.js");require.alias("component-cookie/index.js","analytics/deps/cookie/index.js");require.alias("component-cookie/index.js","cookie/index.js");require.alias("component-each/index.js","analytics/deps/each/index.js");require.alias("component-each/index.js","each/index.js");require.alias("component-type/index.js","component-each/deps/type/index.js");require.alias("component-emitter/index.js","analytics/deps/emitter/index.js");require.alias("component-emitter/index.js","emitter/index.js");require.alias("component-indexof/index.js","component-emitter/deps/indexof/index.js");require.alias("component-event/index.js","analytics/deps/event/index.js");require.alias("component-event/index.js","event/index.js");require.alias("component-inherit/index.js","analytics/deps/inherit/index.js");require.alias("component-inherit/index.js","inherit/index.js");require.alias("component-object/index.js","analytics/deps/object/index.js");require.alias("component-object/index.js","object/index.js");require.alias("component-querystring/index.js","analytics/deps/querystring/index.js");require.alias("component-querystring/index.js","querystring/index.js");require.alias("component-trim/index.js","component-querystring/deps/trim/index.js");require.alias("component-type/index.js","component-querystring/deps/type/index.js");require.alias("component-url/index.js","analytics/deps/url/index.js");require.alias("component-url/index.js","url/index.js");require.alias("ianstormtaylor-bind/index.js","analytics/deps/bind/index.js");require.alias("ianstormtaylor-bind/index.js","bind/index.js");require.alias("component-bind/index.js","ianstormtaylor-bind/deps/bind/index.js");require.alias("segmentio-bind-all/index.js","ianstormtaylor-bind/deps/bind-all/index.js");require.alias("component-bind/index.js","segmentio-bind-all/deps/bind/index.js");require.alias("component-type/index.js","segmentio-bind-all/deps/type/index.js");require.alias("ianstormtaylor-callback/index.js","analytics/deps/callback/index.js");require.alias("ianstormtaylor-callback/index.js","callback/index.js");require.alias("timoxley-next-tick/index.js","ianstormtaylor-callback/deps/next-tick/index.js");require.alias("ianstormtaylor-is/index.js","analytics/deps/is/index.js");require.alias("ianstormtaylor-is/index.js","is/index.js");require.alias("component-type/index.js","ianstormtaylor-is/deps/type/index.js");require.alias("ianstormtaylor-is-empty/index.js","ianstormtaylor-is/deps/is-empty/index.js");require.alias("segmentio-after/index.js","analytics/deps/after/index.js");require.alias("segmentio-after/index.js","after/index.js");require.alias("segmentio-analytics.js-integrations/index.js","analytics/deps/integrations/index.js");require.alias("segmentio-analytics.js-integrations/lib/adroll.js","analytics/deps/integrations/lib/adroll.js");require.alias("segmentio-analytics.js-integrations/lib/adwords.js","analytics/deps/integrations/lib/adwords.js");require.alias("segmentio-analytics.js-integrations/lib/alexa.js","analytics/deps/integrations/lib/alexa.js");require.alias("segmentio-analytics.js-integrations/lib/amplitude.js","analytics/deps/integrations/lib/amplitude.js");require.alias("segmentio-analytics.js-integrations/lib/appcues.js","analytics/deps/integrations/lib/appcues.js");require.alias("segmentio-analytics.js-integrations/lib/awesm.js","analytics/deps/integrations/lib/awesm.js");require.alias("segmentio-analytics.js-integrations/lib/awesomatic.js","analytics/deps/integrations/lib/awesomatic.js");require.alias("segmentio-analytics.js-integrations/lib/bing-ads.js","analytics/deps/integrations/lib/bing-ads.js");require.alias("segmentio-analytics.js-integrations/lib/bronto.js","analytics/deps/integrations/lib/bronto.js");require.alias("segmentio-analytics.js-integrations/lib/bugherd.js","analytics/deps/integrations/lib/bugherd.js");require.alias("segmentio-analytics.js-integrations/lib/bugsnag.js","analytics/deps/integrations/lib/bugsnag.js");require.alias("segmentio-analytics.js-integrations/lib/chartbeat.js","analytics/deps/integrations/lib/chartbeat.js");require.alias("segmentio-analytics.js-integrations/lib/churnbee.js","analytics/deps/integrations/lib/churnbee.js");require.alias("segmentio-analytics.js-integrations/lib/clicky.js","analytics/deps/integrations/lib/clicky.js");require.alias("segmentio-analytics.js-integrations/lib/comscore.js","analytics/deps/integrations/lib/comscore.js");require.alias("segmentio-analytics.js-integrations/lib/crazy-egg.js","analytics/deps/integrations/lib/crazy-egg.js");require.alias("segmentio-analytics.js-integrations/lib/curebit.js","analytics/deps/integrations/lib/curebit.js"); require.alias("segmentio-analytics.js-integrations/lib/customerio.js","analytics/deps/integrations/lib/customerio.js");require.alias("segmentio-analytics.js-integrations/lib/drip.js","analytics/deps/integrations/lib/drip.js");require.alias("segmentio-analytics.js-integrations/lib/errorception.js","analytics/deps/integrations/lib/errorception.js");require.alias("segmentio-analytics.js-integrations/lib/evergage.js","analytics/deps/integrations/lib/evergage.js");require.alias("segmentio-analytics.js-integrations/lib/facebook-ads.js","analytics/deps/integrations/lib/facebook-ads.js");require.alias("segmentio-analytics.js-integrations/lib/foxmetrics.js","analytics/deps/integrations/lib/foxmetrics.js");require.alias("segmentio-analytics.js-integrations/lib/frontleaf.js","analytics/deps/integrations/lib/frontleaf.js");require.alias("segmentio-analytics.js-integrations/lib/gauges.js","analytics/deps/integrations/lib/gauges.js");require.alias("segmentio-analytics.js-integrations/lib/get-satisfaction.js","analytics/deps/integrations/lib/get-satisfaction.js");require.alias("segmentio-analytics.js-integrations/lib/google-analytics.js","analytics/deps/integrations/lib/google-analytics.js");require.alias("segmentio-analytics.js-integrations/lib/google-tag-manager.js","analytics/deps/integrations/lib/google-tag-manager.js");require.alias("segmentio-analytics.js-integrations/lib/gosquared.js","analytics/deps/integrations/lib/gosquared.js");require.alias("segmentio-analytics.js-integrations/lib/heap.js","analytics/deps/integrations/lib/heap.js");require.alias("segmentio-analytics.js-integrations/lib/hellobar.js","analytics/deps/integrations/lib/hellobar.js");require.alias("segmentio-analytics.js-integrations/lib/hittail.js","analytics/deps/integrations/lib/hittail.js");require.alias("segmentio-analytics.js-integrations/lib/hubspot.js","analytics/deps/integrations/lib/hubspot.js");require.alias("segmentio-analytics.js-integrations/lib/improvely.js","analytics/deps/integrations/lib/improvely.js");require.alias("segmentio-analytics.js-integrations/lib/inspectlet.js","analytics/deps/integrations/lib/inspectlet.js");require.alias("segmentio-analytics.js-integrations/lib/intercom.js","analytics/deps/integrations/lib/intercom.js");require.alias("segmentio-analytics.js-integrations/lib/keen-io.js","analytics/deps/integrations/lib/keen-io.js");require.alias("segmentio-analytics.js-integrations/lib/kenshoo.js","analytics/deps/integrations/lib/kenshoo.js");require.alias("segmentio-analytics.js-integrations/lib/kissmetrics.js","analytics/deps/integrations/lib/kissmetrics.js");require.alias("segmentio-analytics.js-integrations/lib/klaviyo.js","analytics/deps/integrations/lib/klaviyo.js");require.alias("segmentio-analytics.js-integrations/lib/leadlander.js","analytics/deps/integrations/lib/leadlander.js");require.alias("segmentio-analytics.js-integrations/lib/livechat.js","analytics/deps/integrations/lib/livechat.js");require.alias("segmentio-analytics.js-integrations/lib/lucky-orange.js","analytics/deps/integrations/lib/lucky-orange.js");require.alias("segmentio-analytics.js-integrations/lib/lytics.js","analytics/deps/integrations/lib/lytics.js");require.alias("segmentio-analytics.js-integrations/lib/mixpanel.js","analytics/deps/integrations/lib/mixpanel.js");require.alias("segmentio-analytics.js-integrations/lib/mojn.js","analytics/deps/integrations/lib/mojn.js");require.alias("segmentio-analytics.js-integrations/lib/mouseflow.js","analytics/deps/integrations/lib/mouseflow.js");require.alias("segmentio-analytics.js-integrations/lib/mousestats.js","analytics/deps/integrations/lib/mousestats.js");require.alias("segmentio-analytics.js-integrations/lib/navilytics.js","analytics/deps/integrations/lib/navilytics.js");require.alias("segmentio-analytics.js-integrations/lib/olark.js","analytics/deps/integrations/lib/olark.js");require.alias("segmentio-analytics.js-integrations/lib/optimizely.js","analytics/deps/integrations/lib/optimizely.js");require.alias("segmentio-analytics.js-integrations/lib/perfect-audience.js","analytics/deps/integrations/lib/perfect-audience.js");require.alias("segmentio-analytics.js-integrations/lib/pingdom.js","analytics/deps/integrations/lib/pingdom.js");require.alias("segmentio-analytics.js-integrations/lib/piwik.js","analytics/deps/integrations/lib/piwik.js");require.alias("segmentio-analytics.js-integrations/lib/preact.js","analytics/deps/integrations/lib/preact.js");require.alias("segmentio-analytics.js-integrations/lib/qualaroo.js","analytics/deps/integrations/lib/qualaroo.js");require.alias("segmentio-analytics.js-integrations/lib/quantcast.js","analytics/deps/integrations/lib/quantcast.js");require.alias("segmentio-analytics.js-integrations/lib/rollbar.js","analytics/deps/integrations/lib/rollbar.js");require.alias("segmentio-analytics.js-integrations/lib/saasquatch.js","analytics/deps/integrations/lib/saasquatch.js");require.alias("segmentio-analytics.js-integrations/lib/sentry.js","analytics/deps/integrations/lib/sentry.js");require.alias("segmentio-analytics.js-integrations/lib/snapengage.js","analytics/deps/integrations/lib/snapengage.js");require.alias("segmentio-analytics.js-integrations/lib/spinnakr.js","analytics/deps/integrations/lib/spinnakr.js");require.alias("segmentio-analytics.js-integrations/lib/tapstream.js","analytics/deps/integrations/lib/tapstream.js");require.alias("segmentio-analytics.js-integrations/lib/trakio.js","analytics/deps/integrations/lib/trakio.js");require.alias("segmentio-analytics.js-integrations/lib/twitter-ads.js","analytics/deps/integrations/lib/twitter-ads.js");require.alias("segmentio-analytics.js-integrations/lib/usercycle.js","analytics/deps/integrations/lib/usercycle.js");require.alias("segmentio-analytics.js-integrations/lib/userfox.js","analytics/deps/integrations/lib/userfox.js");require.alias("segmentio-analytics.js-integrations/lib/uservoice.js","analytics/deps/integrations/lib/uservoice.js");require.alias("segmentio-analytics.js-integrations/lib/vero.js","analytics/deps/integrations/lib/vero.js");require.alias("segmentio-analytics.js-integrations/lib/visual-website-optimizer.js","analytics/deps/integrations/lib/visual-website-optimizer.js");require.alias("segmentio-analytics.js-integrations/lib/webengage.js","analytics/deps/integrations/lib/webengage.js");require.alias("segmentio-analytics.js-integrations/lib/woopra.js","analytics/deps/integrations/lib/woopra.js");require.alias("segmentio-analytics.js-integrations/lib/yandex-metrica.js","analytics/deps/integrations/lib/yandex-metrica.js");require.alias("segmentio-analytics.js-integrations/index.js","integrations/index.js");require.alias("avetisk-defaults/index.js","segmentio-analytics.js-integrations/deps/defaults/index.js");require.alias("component-bind/index.js","segmentio-analytics.js-integrations/deps/bind/index.js");require.alias("component-clone/index.js","segmentio-analytics.js-integrations/deps/clone/index.js");require.alias("component-type/index.js","component-clone/deps/type/index.js");require.alias("component-domify/index.js","segmentio-analytics.js-integrations/deps/domify/index.js");require.alias("component-each/index.js","segmentio-analytics.js-integrations/deps/each/index.js");require.alias("component-type/index.js","component-each/deps/type/index.js");require.alias("component-once/index.js","segmentio-analytics.js-integrations/deps/once/index.js");require.alias("component-throttle/index.js","segmentio-analytics.js-integrations/deps/throttle/index.js");require.alias("component-type/index.js","segmentio-analytics.js-integrations/deps/type/index.js");require.alias("component-url/index.js","segmentio-analytics.js-integrations/deps/url/index.js");require.alias("component-queue/index.js","segmentio-analytics.js-integrations/deps/queue/index.js");require.alias("component-queue/index.js","segmentio-analytics.js-integrations/deps/queue/index.js");require.alias("component-emitter/index.js","component-queue/deps/emitter/index.js");require.alias("component-indexof/index.js","component-emitter/deps/indexof/index.js");require.alias("component-queue/index.js","component-queue/index.js");require.alias("ianstormtaylor-callback/index.js","segmentio-analytics.js-integrations/deps/callback/index.js");require.alias("timoxley-next-tick/index.js","ianstormtaylor-callback/deps/next-tick/index.js");require.alias("ianstormtaylor-to-snake-case/index.js","segmentio-analytics.js-integrations/deps/to-snake-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-snake-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-bind/index.js","segmentio-analytics.js-integrations/deps/bind/index.js");require.alias("component-bind/index.js","ianstormtaylor-bind/deps/bind/index.js");require.alias("segmentio-bind-all/index.js","ianstormtaylor-bind/deps/bind-all/index.js");require.alias("component-bind/index.js","segmentio-bind-all/deps/bind/index.js");require.alias("component-type/index.js","segmentio-bind-all/deps/type/index.js");require.alias("ianstormtaylor-is/index.js","segmentio-analytics.js-integrations/deps/is/index.js");require.alias("component-type/index.js","ianstormtaylor-is/deps/type/index.js");require.alias("ianstormtaylor-is-empty/index.js","ianstormtaylor-is/deps/is-empty/index.js");require.alias("ianstormtaylor-is-empty/index.js","segmentio-analytics.js-integrations/deps/is-empty/index.js");require.alias("segmentio-alias/index.js","segmentio-analytics.js-integrations/deps/alias/index.js");require.alias("component-clone/index.js","segmentio-alias/deps/clone/index.js");require.alias("component-type/index.js","component-clone/deps/type/index.js");require.alias("component-type/index.js","segmentio-alias/deps/type/index.js");require.alias("segmentio-analytics.js-integration/lib/index.js","segmentio-analytics.js-integrations/deps/integration/lib/index.js");require.alias("segmentio-analytics.js-integration/lib/protos.js","segmentio-analytics.js-integrations/deps/integration/lib/protos.js");require.alias("segmentio-analytics.js-integration/lib/events.js","segmentio-analytics.js-integrations/deps/integration/lib/events.js");require.alias("segmentio-analytics.js-integration/lib/statics.js","segmentio-analytics.js-integrations/deps/integration/lib/statics.js");require.alias("segmentio-analytics.js-integration/lib/index.js","segmentio-analytics.js-integrations/deps/integration/index.js");require.alias("avetisk-defaults/index.js","segmentio-analytics.js-integration/deps/defaults/index.js");require.alias("component-clone/index.js","segmentio-analytics.js-integration/deps/clone/index.js");require.alias("component-type/index.js","component-clone/deps/type/index.js");require.alias("component-emitter/index.js","segmentio-analytics.js-integration/deps/emitter/index.js");require.alias("component-indexof/index.js","component-emitter/deps/indexof/index.js");require.alias("ianstormtaylor-bind/index.js","segmentio-analytics.js-integration/deps/bind/index.js");require.alias("component-bind/index.js","ianstormtaylor-bind/deps/bind/index.js");require.alias("segmentio-bind-all/index.js","ianstormtaylor-bind/deps/bind-all/index.js");require.alias("component-bind/index.js","segmentio-bind-all/deps/bind/index.js");require.alias("component-type/index.js","segmentio-bind-all/deps/type/index.js");require.alias("ianstormtaylor-callback/index.js","segmentio-analytics.js-integration/deps/callback/index.js");require.alias("timoxley-next-tick/index.js","ianstormtaylor-callback/deps/next-tick/index.js");require.alias("ianstormtaylor-to-no-case/index.js","segmentio-analytics.js-integration/deps/to-no-case/index.js");require.alias("component-type/index.js","segmentio-analytics.js-integration/deps/type/index.js");require.alias("segmentio-after/index.js","segmentio-analytics.js-integration/deps/after/index.js");require.alias("timoxley-next-tick/index.js","segmentio-analytics.js-integration/deps/next-tick/index.js");require.alias("yields-slug/index.js","segmentio-analytics.js-integration/deps/slug/index.js");require.alias("visionmedia-debug/index.js","segmentio-analytics.js-integration/deps/debug/index.js");require.alias("visionmedia-debug/debug.js","segmentio-analytics.js-integration/deps/debug/debug.js");require.alias("segmentio-analytics.js-integration/lib/index.js","segmentio-analytics.js-integration/index.js");require.alias("segmentio-canonical/index.js","segmentio-analytics.js-integrations/deps/canonical/index.js");require.alias("segmentio-convert-dates/index.js","segmentio-analytics.js-integrations/deps/convert-dates/index.js");require.alias("component-clone/index.js","segmentio-convert-dates/deps/clone/index.js");require.alias("component-type/index.js","component-clone/deps/type/index.js");require.alias("ianstormtaylor-is/index.js","segmentio-convert-dates/deps/is/index.js");require.alias("component-type/index.js","ianstormtaylor-is/deps/type/index.js");require.alias("ianstormtaylor-is-empty/index.js","ianstormtaylor-is/deps/is-empty/index.js");require.alias("segmentio-extend/index.js","segmentio-analytics.js-integrations/deps/extend/index.js");require.alias("segmentio-facade/lib/index.js","segmentio-analytics.js-integrations/deps/facade/lib/index.js");require.alias("segmentio-facade/lib/alias.js","segmentio-analytics.js-integrations/deps/facade/lib/alias.js");require.alias("segmentio-facade/lib/facade.js","segmentio-analytics.js-integrations/deps/facade/lib/facade.js");require.alias("segmentio-facade/lib/group.js","segmentio-analytics.js-integrations/deps/facade/lib/group.js");require.alias("segmentio-facade/lib/page.js","segmentio-analytics.js-integrations/deps/facade/lib/page.js");require.alias("segmentio-facade/lib/identify.js","segmentio-analytics.js-integrations/deps/facade/lib/identify.js");require.alias("segmentio-facade/lib/is-enabled.js","segmentio-analytics.js-integrations/deps/facade/lib/is-enabled.js");require.alias("segmentio-facade/lib/track.js","segmentio-analytics.js-integrations/deps/facade/lib/track.js");require.alias("segmentio-facade/lib/screen.js","segmentio-analytics.js-integrations/deps/facade/lib/screen.js");require.alias("segmentio-facade/lib/index.js","segmentio-analytics.js-integrations/deps/facade/index.js");require.alias("camshaft-require-component/index.js","segmentio-facade/deps/require-component/index.js");require.alias("segmentio-isodate-traverse/index.js","segmentio-facade/deps/isodate-traverse/index.js");require.alias("component-each/index.js","segmentio-isodate-traverse/deps/each/index.js");require.alias("component-type/index.js","component-each/deps/type/index.js");require.alias("ianstormtaylor-is/index.js","segmentio-isodate-traverse/deps/is/index.js");require.alias("component-type/index.js","ianstormtaylor-is/deps/type/index.js");require.alias("ianstormtaylor-is-empty/index.js","ianstormtaylor-is/deps/is-empty/index.js");require.alias("segmentio-isodate/index.js","segmentio-isodate-traverse/deps/isodate/index.js");require.alias("component-clone/index.js","segmentio-facade/deps/clone/index.js");require.alias("component-type/index.js","component-clone/deps/type/index.js");require.alias("component-inherit/index.js","segmentio-facade/deps/inherit/index.js");require.alias("component-trim/index.js","segmentio-facade/deps/trim/index.js");require.alias("segmentio-is-email/index.js","segmentio-facade/deps/is-email/index.js");require.alias("segmentio-new-date/lib/index.js","segmentio-facade/deps/new-date/lib/index.js");require.alias("segmentio-new-date/lib/milliseconds.js","segmentio-facade/deps/new-date/lib/milliseconds.js");require.alias("segmentio-new-date/lib/seconds.js","segmentio-facade/deps/new-date/lib/seconds.js");require.alias("segmentio-new-date/lib/index.js","segmentio-facade/deps/new-date/index.js");require.alias("ianstormtaylor-is/index.js","segmentio-new-date/deps/is/index.js");require.alias("component-type/index.js","ianstormtaylor-is/deps/type/index.js");require.alias("ianstormtaylor-is-empty/index.js","ianstormtaylor-is/deps/is-empty/index.js");require.alias("segmentio-isodate/index.js","segmentio-new-date/deps/isodate/index.js");require.alias("segmentio-new-date/lib/index.js","segmentio-new-date/index.js");require.alias("segmentio-obj-case/index.js","segmentio-facade/deps/obj-case/index.js");require.alias("segmentio-obj-case/index.js","segmentio-facade/deps/obj-case/index.js");require.alias("ianstormtaylor-case/lib/index.js","segmentio-obj-case/deps/case/lib/index.js");require.alias("ianstormtaylor-case/lib/cases.js","segmentio-obj-case/deps/case/lib/cases.js");require.alias("ianstormtaylor-case/lib/index.js","segmentio-obj-case/deps/case/index.js");require.alias("ianstormtaylor-to-camel-case/index.js","ianstormtaylor-case/deps/to-camel-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-camel-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-capital-case/index.js","ianstormtaylor-case/deps/to-capital-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-capital-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-constant-case/index.js","ianstormtaylor-case/deps/to-constant-case/index.js");require.alias("ianstormtaylor-to-snake-case/index.js","ianstormtaylor-to-constant-case/deps/to-snake-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-snake-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-dot-case/index.js","ianstormtaylor-case/deps/to-dot-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-dot-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-pascal-case/index.js","ianstormtaylor-case/deps/to-pascal-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-pascal-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-sentence-case/index.js","ianstormtaylor-case/deps/to-sentence-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-sentence-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-slug-case/index.js","ianstormtaylor-case/deps/to-slug-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-slug-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-snake-case/index.js","ianstormtaylor-case/deps/to-snake-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-snake-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-title-case/index.js","ianstormtaylor-case/deps/to-title-case/index.js");require.alias("component-escape-regexp/index.js","ianstormtaylor-to-title-case/deps/escape-regexp/index.js");require.alias("ianstormtaylor-map/index.js","ianstormtaylor-to-title-case/deps/map/index.js");require.alias("component-each/index.js","ianstormtaylor-map/deps/each/index.js");require.alias("component-type/index.js","component-each/deps/type/index.js");require.alias("ianstormtaylor-title-case-minors/index.js","ianstormtaylor-to-title-case/deps/title-case-minors/index.js");require.alias("ianstormtaylor-to-capital-case/index.js","ianstormtaylor-to-title-case/deps/to-capital-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-capital-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-case/lib/index.js","ianstormtaylor-case/index.js");require.alias("segmentio-obj-case/index.js","segmentio-obj-case/index.js");require.alias("segmentio-facade/lib/index.js","segmentio-facade/index.js");require.alias("segmentio-global-queue/index.js","segmentio-analytics.js-integrations/deps/global-queue/index.js");require.alias("segmentio-is-email/index.js","segmentio-analytics.js-integrations/deps/is-email/index.js");require.alias("segmentio-load-date/index.js","segmentio-analytics.js-integrations/deps/load-date/index.js");require.alias("segmentio-load-script/index.js","segmentio-analytics.js-integrations/deps/load-script/index.js");require.alias("component-type/index.js","segmentio-load-script/deps/type/index.js");require.alias("segmentio-script-onload/index.js","segmentio-analytics.js-integrations/deps/script-onload/index.js");require.alias("segmentio-script-onload/index.js","segmentio-analytics.js-integrations/deps/script-onload/index.js");require.alias("segmentio-script-onload/index.js","segmentio-script-onload/index.js");require.alias("segmentio-on-body/index.js","segmentio-analytics.js-integrations/deps/on-body/index.js");require.alias("component-each/index.js","segmentio-on-body/deps/each/index.js");require.alias("component-type/index.js","component-each/deps/type/index.js");require.alias("segmentio-on-error/index.js","segmentio-analytics.js-integrations/deps/on-error/index.js");require.alias("segmentio-to-iso-string/index.js","segmentio-analytics.js-integrations/deps/to-iso-string/index.js");require.alias("segmentio-to-unix-timestamp/index.js","segmentio-analytics.js-integrations/deps/to-unix-timestamp/index.js");require.alias("segmentio-use-https/index.js","segmentio-analytics.js-integrations/deps/use-https/index.js");require.alias("segmentio-when/index.js","segmentio-analytics.js-integrations/deps/when/index.js");require.alias("ianstormtaylor-callback/index.js","segmentio-when/deps/callback/index.js");require.alias("timoxley-next-tick/index.js","ianstormtaylor-callback/deps/next-tick/index.js");require.alias("timoxley-next-tick/index.js","segmentio-analytics.js-integrations/deps/next-tick/index.js");require.alias("yields-slug/index.js","segmentio-analytics.js-integrations/deps/slug/index.js");require.alias("visionmedia-batch/index.js","segmentio-analytics.js-integrations/deps/batch/index.js");require.alias("component-emitter/index.js","visionmedia-batch/deps/emitter/index.js");require.alias("component-indexof/index.js","component-emitter/deps/indexof/index.js");require.alias("visionmedia-debug/index.js","segmentio-analytics.js-integrations/deps/debug/index.js");require.alias("visionmedia-debug/debug.js","segmentio-analytics.js-integrations/deps/debug/debug.js");require.alias("segmentio-load-pixel/index.js","segmentio-analytics.js-integrations/deps/load-pixel/index.js");require.alias("segmentio-load-pixel/index.js","segmentio-analytics.js-integrations/deps/load-pixel/index.js");require.alias("component-querystring/index.js","segmentio-load-pixel/deps/querystring/index.js");require.alias("component-trim/index.js","component-querystring/deps/trim/index.js");require.alias("component-type/index.js","component-querystring/deps/type/index.js");require.alias("segmentio-substitute/index.js","segmentio-load-pixel/deps/substitute/index.js");require.alias("segmentio-substitute/index.js","segmentio-load-pixel/deps/substitute/index.js");require.alias("segmentio-substitute/index.js","segmentio-substitute/index.js");require.alias("segmentio-load-pixel/index.js","segmentio-load-pixel/index.js");require.alias("segmentio-replace-document-write/index.js","segmentio-analytics.js-integrations/deps/replace-document-write/index.js");require.alias("segmentio-replace-document-write/index.js","segmentio-analytics.js-integrations/deps/replace-document-write/index.js");require.alias("component-domify/index.js","segmentio-replace-document-write/deps/domify/index.js");require.alias("segmentio-replace-document-write/index.js","segmentio-replace-document-write/index.js");require.alias("component-indexof/index.js","segmentio-analytics.js-integrations/deps/indexof/index.js");require.alias("component-object/index.js","segmentio-analytics.js-integrations/deps/object/index.js");require.alias("segmentio-obj-case/index.js","segmentio-analytics.js-integrations/deps/obj-case/index.js");require.alias("segmentio-obj-case/index.js","segmentio-analytics.js-integrations/deps/obj-case/index.js");require.alias("ianstormtaylor-case/lib/index.js","segmentio-obj-case/deps/case/lib/index.js");require.alias("ianstormtaylor-case/lib/cases.js","segmentio-obj-case/deps/case/lib/cases.js");require.alias("ianstormtaylor-case/lib/index.js","segmentio-obj-case/deps/case/index.js");require.alias("ianstormtaylor-to-camel-case/index.js","ianstormtaylor-case/deps/to-camel-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-camel-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-capital-case/index.js","ianstormtaylor-case/deps/to-capital-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-capital-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-constant-case/index.js","ianstormtaylor-case/deps/to-constant-case/index.js");require.alias("ianstormtaylor-to-snake-case/index.js","ianstormtaylor-to-constant-case/deps/to-snake-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-snake-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-dot-case/index.js","ianstormtaylor-case/deps/to-dot-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-dot-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-pascal-case/index.js","ianstormtaylor-case/deps/to-pascal-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-pascal-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-sentence-case/index.js","ianstormtaylor-case/deps/to-sentence-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-sentence-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-slug-case/index.js","ianstormtaylor-case/deps/to-slug-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-slug-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-snake-case/index.js","ianstormtaylor-case/deps/to-snake-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-snake-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-title-case/index.js","ianstormtaylor-case/deps/to-title-case/index.js");require.alias("component-escape-regexp/index.js","ianstormtaylor-to-title-case/deps/escape-regexp/index.js");require.alias("ianstormtaylor-map/index.js","ianstormtaylor-to-title-case/deps/map/index.js");require.alias("component-each/index.js","ianstormtaylor-map/deps/each/index.js");require.alias("component-type/index.js","component-each/deps/type/index.js");require.alias("ianstormtaylor-title-case-minors/index.js","ianstormtaylor-to-title-case/deps/title-case-minors/index.js");require.alias("ianstormtaylor-to-capital-case/index.js","ianstormtaylor-to-title-case/deps/to-capital-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-capital-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-case/lib/index.js","ianstormtaylor-case/index.js");require.alias("segmentio-obj-case/index.js","segmentio-obj-case/index.js");require.alias("segmentio-canonical/index.js","analytics/deps/canonical/index.js");require.alias("segmentio-canonical/index.js","canonical/index.js");require.alias("segmentio-extend/index.js","analytics/deps/extend/index.js");require.alias("segmentio-extend/index.js","extend/index.js");require.alias("segmentio-facade/lib/index.js","analytics/deps/facade/lib/index.js");require.alias("segmentio-facade/lib/alias.js","analytics/deps/facade/lib/alias.js");require.alias("segmentio-facade/lib/facade.js","analytics/deps/facade/lib/facade.js");require.alias("segmentio-facade/lib/group.js","analytics/deps/facade/lib/group.js");require.alias("segmentio-facade/lib/page.js","analytics/deps/facade/lib/page.js");require.alias("segmentio-facade/lib/identify.js","analytics/deps/facade/lib/identify.js");require.alias("segmentio-facade/lib/is-enabled.js","analytics/deps/facade/lib/is-enabled.js");require.alias("segmentio-facade/lib/track.js","analytics/deps/facade/lib/track.js");require.alias("segmentio-facade/lib/screen.js","analytics/deps/facade/lib/screen.js");require.alias("segmentio-facade/lib/index.js","analytics/deps/facade/index.js");require.alias("segmentio-facade/lib/index.js","facade/index.js");require.alias("camshaft-require-component/index.js","segmentio-facade/deps/require-component/index.js");require.alias("segmentio-isodate-traverse/index.js","segmentio-facade/deps/isodate-traverse/index.js");require.alias("component-each/index.js","segmentio-isodate-traverse/deps/each/index.js");require.alias("component-type/index.js","component-each/deps/type/index.js");require.alias("ianstormtaylor-is/index.js","segmentio-isodate-traverse/deps/is/index.js");require.alias("component-type/index.js","ianstormtaylor-is/deps/type/index.js");require.alias("ianstormtaylor-is-empty/index.js","ianstormtaylor-is/deps/is-empty/index.js");require.alias("segmentio-isodate/index.js","segmentio-isodate-traverse/deps/isodate/index.js");require.alias("component-clone/index.js","segmentio-facade/deps/clone/index.js");require.alias("component-type/index.js","component-clone/deps/type/index.js");require.alias("component-inherit/index.js","segmentio-facade/deps/inherit/index.js");require.alias("component-trim/index.js","segmentio-facade/deps/trim/index.js");require.alias("segmentio-is-email/index.js","segmentio-facade/deps/is-email/index.js");require.alias("segmentio-new-date/lib/index.js","segmentio-facade/deps/new-date/lib/index.js");require.alias("segmentio-new-date/lib/milliseconds.js","segmentio-facade/deps/new-date/lib/milliseconds.js");require.alias("segmentio-new-date/lib/seconds.js","segmentio-facade/deps/new-date/lib/seconds.js");require.alias("segmentio-new-date/lib/index.js","segmentio-facade/deps/new-date/index.js");require.alias("ianstormtaylor-is/index.js","segmentio-new-date/deps/is/index.js");require.alias("component-type/index.js","ianstormtaylor-is/deps/type/index.js");require.alias("ianstormtaylor-is-empty/index.js","ianstormtaylor-is/deps/is-empty/index.js");require.alias("segmentio-isodate/index.js","segmentio-new-date/deps/isodate/index.js"); require.alias("segmentio-new-date/lib/index.js","segmentio-new-date/index.js");require.alias("segmentio-obj-case/index.js","segmentio-facade/deps/obj-case/index.js");require.alias("segmentio-obj-case/index.js","segmentio-facade/deps/obj-case/index.js");require.alias("ianstormtaylor-case/lib/index.js","segmentio-obj-case/deps/case/lib/index.js");require.alias("ianstormtaylor-case/lib/cases.js","segmentio-obj-case/deps/case/lib/cases.js");require.alias("ianstormtaylor-case/lib/index.js","segmentio-obj-case/deps/case/index.js");require.alias("ianstormtaylor-to-camel-case/index.js","ianstormtaylor-case/deps/to-camel-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-camel-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-capital-case/index.js","ianstormtaylor-case/deps/to-capital-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-capital-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-constant-case/index.js","ianstormtaylor-case/deps/to-constant-case/index.js");require.alias("ianstormtaylor-to-snake-case/index.js","ianstormtaylor-to-constant-case/deps/to-snake-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-snake-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-dot-case/index.js","ianstormtaylor-case/deps/to-dot-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-dot-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-pascal-case/index.js","ianstormtaylor-case/deps/to-pascal-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-pascal-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-sentence-case/index.js","ianstormtaylor-case/deps/to-sentence-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-sentence-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-slug-case/index.js","ianstormtaylor-case/deps/to-slug-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-slug-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-snake-case/index.js","ianstormtaylor-case/deps/to-snake-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-to-snake-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-space-case/index.js","ianstormtaylor-case/deps/to-space-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-space-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-to-title-case/index.js","ianstormtaylor-case/deps/to-title-case/index.js");require.alias("component-escape-regexp/index.js","ianstormtaylor-to-title-case/deps/escape-regexp/index.js");require.alias("ianstormtaylor-map/index.js","ianstormtaylor-to-title-case/deps/map/index.js");require.alias("component-each/index.js","ianstormtaylor-map/deps/each/index.js");require.alias("component-type/index.js","component-each/deps/type/index.js");require.alias("ianstormtaylor-title-case-minors/index.js","ianstormtaylor-to-title-case/deps/title-case-minors/index.js");require.alias("ianstormtaylor-to-capital-case/index.js","ianstormtaylor-to-title-case/deps/to-capital-case/index.js");require.alias("ianstormtaylor-to-no-case/index.js","ianstormtaylor-to-capital-case/deps/to-no-case/index.js");require.alias("ianstormtaylor-case/lib/index.js","ianstormtaylor-case/index.js");require.alias("segmentio-obj-case/index.js","segmentio-obj-case/index.js");require.alias("segmentio-facade/lib/index.js","segmentio-facade/index.js");require.alias("segmentio-is-email/index.js","analytics/deps/is-email/index.js");require.alias("segmentio-is-email/index.js","is-email/index.js");require.alias("segmentio-is-meta/index.js","analytics/deps/is-meta/index.js");require.alias("segmentio-is-meta/index.js","is-meta/index.js");require.alias("segmentio-isodate-traverse/index.js","analytics/deps/isodate-traverse/index.js");require.alias("segmentio-isodate-traverse/index.js","isodate-traverse/index.js");require.alias("component-each/index.js","segmentio-isodate-traverse/deps/each/index.js");require.alias("component-type/index.js","component-each/deps/type/index.js");require.alias("ianstormtaylor-is/index.js","segmentio-isodate-traverse/deps/is/index.js");require.alias("component-type/index.js","ianstormtaylor-is/deps/type/index.js");require.alias("ianstormtaylor-is-empty/index.js","ianstormtaylor-is/deps/is-empty/index.js");require.alias("segmentio-isodate/index.js","segmentio-isodate-traverse/deps/isodate/index.js");require.alias("segmentio-json/index.js","analytics/deps/json/index.js");require.alias("segmentio-json/index.js","json/index.js");require.alias("component-json-fallback/index.js","segmentio-json/deps/json-fallback/index.js");require.alias("segmentio-new-date/lib/index.js","analytics/deps/new-date/lib/index.js");require.alias("segmentio-new-date/lib/milliseconds.js","analytics/deps/new-date/lib/milliseconds.js");require.alias("segmentio-new-date/lib/seconds.js","analytics/deps/new-date/lib/seconds.js");require.alias("segmentio-new-date/lib/index.js","analytics/deps/new-date/index.js");require.alias("segmentio-new-date/lib/index.js","new-date/index.js");require.alias("ianstormtaylor-is/index.js","segmentio-new-date/deps/is/index.js");require.alias("component-type/index.js","ianstormtaylor-is/deps/type/index.js");require.alias("ianstormtaylor-is-empty/index.js","ianstormtaylor-is/deps/is-empty/index.js");require.alias("segmentio-isodate/index.js","segmentio-new-date/deps/isodate/index.js");require.alias("segmentio-new-date/lib/index.js","segmentio-new-date/index.js");require.alias("segmentio-store.js/store.js","analytics/deps/store/store.js");require.alias("segmentio-store.js/store.js","analytics/deps/store/index.js");require.alias("segmentio-store.js/store.js","store/index.js");require.alias("segmentio-store.js/store.js","segmentio-store.js/index.js");require.alias("segmentio-top-domain/index.js","analytics/deps/top-domain/index.js");require.alias("segmentio-top-domain/index.js","analytics/deps/top-domain/index.js");require.alias("segmentio-top-domain/index.js","top-domain/index.js");require.alias("component-url/index.js","segmentio-top-domain/deps/url/index.js");require.alias("segmentio-top-domain/index.js","segmentio-top-domain/index.js");require.alias("visionmedia-debug/index.js","analytics/deps/debug/index.js");require.alias("visionmedia-debug/debug.js","analytics/deps/debug/debug.js");require.alias("visionmedia-debug/index.js","debug/index.js");require.alias("yields-prevent/index.js","analytics/deps/prevent/index.js");require.alias("yields-prevent/index.js","prevent/index.js");require.alias("analytics/lib/index.js","analytics/index.js");if(typeof exports=="object"){module.exports=require("analytics")}else if(typeof define=="function"&&define.amd){define([],function(){return require("analytics")})}else{this["analytics"]=require("analytics")}})();
skyborne.js
skyborne/ios-app
import React from 'react'; import { AppRegistry } from 'react-native'; import { Tabs } from './src/config/router'; const Skyborne = () => <Tabs />; AppRegistry.registerComponent('Skyborne', () => Skyborne);
Study/Udemy Docker and Kubernetes/Section09/deployment-08-deployed-to-multiple-tasks/frontend/src/components/UI/Card.js
tarsoqueiroz/Docker
import React from 'react'; import './Card.css'; function Card(props) { return <div className='card'>{props.children}</div>; } export default Card;
ajax/libs/yui/3.5.1/event-focus/event-focus-min.js
Teino1978-Corp/Teino1978-Corp-cdnjs
YUI.add("event-focus",function(f){var d=f.Event,c=f.Lang,a=c.isString,e=f.Array.indexOf,b=c.isFunction(f.DOM.create('<p onbeforeactivate=";"/>').onbeforeactivate);function g(i,h,k){var j="_"+i+"Notifiers";f.Event.define(i,{_attach:function(m,n,l){if(f.DOM.isWindow(m)){return d._attach([i,function(o){n.fire(o);},m]);}else{return d._attach([h,this._proxy,m,this,n,l],{capture:true});}},_proxy:function(o,s,q){var p=o.target,m=o.currentTarget,r=p.getData(j),t=f.stamp(m._node),l=(b||p!==m),n;s.currentTarget=(q)?p:m;s.container=(q)?m:null;if(!r){r={};p.setData(j,r);if(l){n=d._attach([k,this._notify,p._node]).sub;n.once=true;}}else{l=true;}if(!r[t]){r[t]=[];}r[t].push(s);if(!l){this._notify(o);}},_notify:function(w,q){var C=w.currentTarget,l=C.getData(j),x=C.ancestors(),B=C.get("ownerDocument"),s=[],m=l?f.Object.keys(l).length:0,A,r,t,n,o,y,u,v,p,z;C.clearData(j);x.push(C);if(B){x.unshift(B);}x._nodes.reverse();y=m;x.some(function(H){var G=f.stamp(H),E=l[G],F,D;if(E){m--;for(F=0,D=E.length;F<D;++F){if(E[F].handle.sub.filter){s.push(E[F]);}}}return !m;});m=y;while(m&&(A=x.shift())){n=f.stamp(A);r=l[n];if(r){for(u=0,v=r.length;u<v;++u){t=r[u];p=t.handle.sub;o=true;w.currentTarget=A;if(p.filter){o=p.filter.apply(A,[A,w].concat(p.args||[]));s.splice(e(s,t),1);}if(o){w.container=t.container;z=t.fire(w);}if(z===false||w.stopped===2){break;}}delete r[n];m--;}if(w.stopped!==2){for(u=0,v=s.length;u<v;++u){t=s[u];p=t.handle.sub;if(p.filter.apply(A,[A,w].concat(p.args||[]))){w.container=t.container;w.currentTarget=A;z=t.fire(w);}if(z===false||w.stopped===2){break;}}}if(w.stopped){break;}}},on:function(n,l,m){l.handle=this._attach(n._node,m);},detach:function(m,l){l.handle.detach();},delegate:function(o,m,n,l){if(a(l)){m.filter=function(p){return f.Selector.test(p._node,l,o===p?null:o._node);};}m.handle=this._attach(o._node,n,true);},detachDelegate:function(m,l){l.handle.detach();}},true);}if(b){g("focus","beforeactivate","focusin");g("blur","beforedeactivate","focusout");}else{g("focus","focus","focus");g("blur","blur","blur");}},"@VERSION@",{requires:["event-synthetic"]});
src/components/AboutPage.spec.js
akataz/webSite
import React from 'react'; import {shallow} from 'enzyme'; import {expect} from 'chai'; import AboutPage from './AboutPage'; describe('<AboutPage />', () => { it('should have a header called \'About\'', () => { const wrapper = shallow(<AboutPage />); const actual = wrapper.find('h2').text(); const expected = 'About'; expect(actual).to.equal(expected); }); it('should have a header with \'alt-header\' class', () => { const wrapper = shallow(<AboutPage />); const actual = wrapper.find('h2').prop('className'); const expected = 'alt-header'; expect(actual).to.equal(expected); }); it('should link to an unknown route path', () => { const wrapper = shallow(<AboutPage />); const actual = wrapper.findWhere(n => n.prop('to') === '/badlink').length; const expected = 1; expect(actual).to.be.equal(expected); }); });
ajax/libs/forerunnerdb/1.3.732/fdb-legacy.min.js
pvnr0082t/cdnjs
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d=a("../lib/Core");a("../lib/CollectionGroup"),a("../lib/View"),a("../lib/Highchart"),a("../lib/Persist"),a("../lib/Document"),a("../lib/Overview"),a("../lib/OldView"),a("../lib/OldView.Bind"),a("../lib/Grid");"undefined"!=typeof window&&(window.ForerunnerDB=d),b.exports=d},{"../lib/CollectionGroup":6,"../lib/Core":7,"../lib/Document":9,"../lib/Grid":11,"../lib/Highchart":12,"../lib/OldView":29,"../lib/OldView.Bind":28,"../lib/Overview":32,"../lib/Persist":34,"../lib/View":40}],2:[function(a,b,c){"use strict";var d,e=a("./Shared"),f=a("./Path"),g=function(a){this._primaryKey="_id",this._keyArr=[],this._data=[],this._objLookup={},this._count=0,this._keyArr=d.parse(a,!0)};e.addModule("ActiveBucket",g),e.mixin(g.prototype,"Mixin.Sorting"),d=new f,e.synthesize(g.prototype,"primaryKey"),g.prototype.qs=function(a,b,c,d){if(!b.length)return 0;for(var e,f,g,h=-1,i=0,j=b.length-1;j>=i&&(e=Math.floor((i+j)/2),h!==e);)f=b[e],void 0!==f&&(g=d(this,a,c,f),g>0&&(i=e+1),0>g&&(j=e-1)),h=e;return g>0?e+1:e},g.prototype._sortFunc=function(a,b,c,e){var f,g,h,i=c.split(".:."),j=e.split(".:."),k=a._keyArr,l=k.length;for(f=0;l>f;f++)if(g=k[f],h=typeof d.get(b,g.path),"number"===h&&(i[f]=Number(i[f]),j[f]=Number(j[f])),i[f]!==j[f]){if(1===g.value)return a.sortAsc(i[f],j[f]);if(-1===g.value)return a.sortDesc(i[f],j[f])}},g.prototype.insert=function(a){var b,c;return b=this.documentKey(a),c=this._data.indexOf(b),-1===c?(c=this.qs(a,this._data,b,this._sortFunc),this._data.splice(c,0,b)):this._data.splice(c,0,b),this._objLookup[a[this._primaryKey]]=b,this._count++,c},g.prototype.remove=function(a){var b,c;return b=this._objLookup[a[this._primaryKey]],b?(c=this._data.indexOf(b),c>-1?(this._data.splice(c,1),delete this._objLookup[a[this._primaryKey]],this._count--,!0):!1):!1},g.prototype.index=function(a){var b,c;return b=this.documentKey(a),c=this._data.indexOf(b),-1===c&&(c=this.qs(a,this._data,b,this._sortFunc)),c},g.prototype.documentKey=function(a){var b,c,e="",f=this._keyArr,g=f.length;for(b=0;g>b;b++)c=f[b],e&&(e+=".:."),e+=d.get(a,c.path);return e+=".:."+a[this._primaryKey]},g.prototype.count=function(){return this._count},e.finishModule("ActiveBucket"),b.exports=g},{"./Path":33,"./Shared":39}],3:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=new e,g=function(a,b,c){this.init.apply(this,arguments)};g.prototype.init=function(a,b,c,d,e){this._store=[],this._keys=[],void 0!==c&&this.primaryKey(c),void 0!==b&&this.index(b),void 0!==d&&this.compareFunc(d),void 0!==e&&this.hashFunc(e),void 0!==a&&this.data(a)},d.addModule("BinaryTree",g),d.mixin(g.prototype,"Mixin.ChainReactor"),d.mixin(g.prototype,"Mixin.Sorting"),d.mixin(g.prototype,"Mixin.Common"),d.synthesize(g.prototype,"compareFunc"),d.synthesize(g.prototype,"hashFunc"),d.synthesize(g.prototype,"indexDir"),d.synthesize(g.prototype,"primaryKey"),d.synthesize(g.prototype,"keys"),d.synthesize(g.prototype,"index",function(a){return void 0!==a&&(this.debug()&&console.log("Setting index",a,f.parse(a,!0)),this.keys(f.parse(a,!0))),this.$super.call(this,a)}),g.prototype.clear=function(){delete this._data,delete this._left,delete this._right,this._store=[]},g.prototype.data=function(a){return void 0!==a?(this._data=a,this._hashFunc&&(this._hash=this._hashFunc(a)),this):this._data},g.prototype.push=function(a){return void 0!==a?(this._store.push(a),this):!1},g.prototype.pull=function(a){if(void 0!==a){var b=this._store.indexOf(a);if(b>-1)return this._store.splice(b,1),this}return!1},g.prototype._compareFunc=function(a,b){var c,d,e=0;for(c=0;c<this._keys.length;c++)if(d=this._keys[c],1===d.value?e=this.sortAsc(f.get(a,d.path),f.get(b,d.path)):-1===d.value&&(e=this.sortDesc(f.get(a,d.path),f.get(b,d.path))),this.debug()&&console.log("Compared %s with %s order %d in path %s and result was %d",f.get(a,d.path),f.get(b,d.path),d.value,d.path,e),0!==e)return this.debug()&&console.log("Retuning result %d",e),e;return this.debug()&&console.log("Retuning result %d",e),e},g.prototype._hashFunc=function(a){return a[this._keys[0].path]},g.prototype.removeChildNode=function(a){this._left===a?delete this._left:this._right===a&&delete this._right},g.prototype.nodeBranch=function(a){return this._left===a?"left":this._right===a?"right":void 0},g.prototype.insert=function(a){var b,c,d,e;if(a instanceof Array){for(c=[],d=[],e=0;e<a.length;e++)this.insert(a[e])?c.push(a[e]):d.push(a[e]);return{inserted:c,failed:d}}return this.debug()&&console.log("Inserting",a),this._data?(b=this._compareFunc(this._data,a),0===b?(this.debug()&&console.log("Data is equal (currrent, new)",this._data,a),this._left?this._left.insert(a):(this._left=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._left._parent=this),!0):-1===b?(this.debug()&&console.log("Data is greater (currrent, new)",this._data,a),this._right?this._right.insert(a):(this._right=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._right._parent=this),!0):1===b?(this.debug()&&console.log("Data is less (currrent, new)",this._data,a),this._left?this._left.insert(a):(this._left=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._left._parent=this),!0):!1):(this.debug()&&console.log("Node has no data, setting data",a),this.data(a),!0)},g.prototype.remove=function(a){var b,c,d,e=this.primaryKey();if(a instanceof Array){for(c=[],d=0;d<a.length;d++)this.remove(a[d])&&c.push(a[d]);return c}return this.debug()&&console.log("Removing",a),this._data[e]===a[e]?this._remove(this):(b=this._compareFunc(this._data,a),-1===b&&this._right?this._right.remove(a):1===b&&this._left?this._left.remove(a):!1)},g.prototype._remove=function(a){var b,c;return this._left?(b=this._left,c=this._right,this._left=b._left,this._right=b._right,this._data=b._data,this._store=b._store,c&&(b.rightMost()._right=c)):this._right?(c=this._right,this._left=c._left,this._right=c._right,this._data=c._data,this._store=c._store):this.clear(),!0},g.prototype.leftMost=function(){return this._left?this._left.leftMost():this},g.prototype.rightMost=function(){return this._right?this._right.rightMost():this},g.prototype.lookup=function(a,b,c){var d=this._compareFunc(this._data,a);return c=c||[],0===d&&(this._left&&this._left.lookup(a,b,c),c.push(this._data),this._right&&this._right.lookup(a,b,c)),-1===d&&this._right&&this._right.lookup(a,b,c),1===d&&this._left&&this._left.lookup(a,b,c),c},g.prototype.inOrder=function(a,b){switch(b=b||[],this._left&&this._left.inOrder(a,b),a){case"hash":b.push(this._hash);break;case"data":b.push(this._data);break;default:b.push({key:this._data,arr:this._store})}return this._right&&this._right.inOrder(a,b),b},g.prototype.startsWith=function(a,b,c,d){var e,g,h=f.get(this._data,a),i=h.substr(0,b.length);return c=c||new RegExp("^"+b),d=d||[],void 0===d._visited&&(d._visited=0),d._visited++,g=this.sortAsc(h,b),e=i===b,0===g&&(this._left&&this._left.startsWith(a,b,c,d),e&&d.push(this._data),this._right&&this._right.startsWith(a,b,c,d)),-1===g&&(e&&d.push(this._data),this._right&&this._right.startsWith(a,b,c,d)),1===g&&(this._left&&this._left.startsWith(a,b,c,d),e&&d.push(this._data)),d},g.prototype.findRange=function(a,b,c,d,f,g){f=f||[],g=g||new e(b),this._left&&this._left.findRange(a,b,c,d,f,g);var h=g.value(this._data),i=this.sortAsc(h,c),j=this.sortAsc(h,d);if(!(0!==i&&1!==i||0!==j&&-1!==j))switch(a){case"hash":f.push(this._hash);break;case"data":f.push(this._data);break;default:f.push({key:this._data,arr:this._store})}return this._right&&this._right.findRange(a,b,c,d,f,g),f},g.prototype.match=function(a,b,c){var d,e,g,h=[],i=0;for(d=f.parseArr(this._index,{verbose:!0}),e=f.parseArr(a,c&&c.pathOptions?c.pathOptions:{ignore:/\$/,verbose:!0}),g=0;g<d.length;g++)e[g]===d[g]&&(i++,h.push(e[g]));return{matchedKeys:h,totalKeyCount:e.length,score:i}},d.finishModule("BinaryTree"),b.exports=g},{"./Path":33,"./Shared":39}],4:[function(a,b,c){"use strict";var d,e;d=function(){var a,b,c,d=[];for(b=0;256>b;b++){for(a=b,c=0;8>c;c++)a=1&a?3988292384^a>>>1:a>>>1;d[b]=a}return d}(),e=function(a){var b,c=-1;for(b=0;b<a.length;b++)c=c>>>8^d[255&(c^a.charCodeAt(b))];return(-1^c)>>>0},b.exports=e},{}],5:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n;d=a("./Shared");var o=function(a,b){this.init.apply(this,arguments)};o.prototype.init=function(a,b){this.sharedPathSolver=n,this._primaryKey="_id",this._primaryIndex=new g("primary"),this._primaryCrc=new g("primaryCrc"),this._crcLookup=new g("crcLookup"),this._name=a,this._data=[],this._metrics=new f,this._options=b||{changeTimestamp:!1},this._options.db&&this.db(this._options.db),this._metaData={},this._deferQueue={insert:[],update:[],remove:[],upsert:[],async:[]},this._deferThreshold={insert:100,update:100,remove:100,upsert:100},this._deferTime={insert:1,update:1,remove:1,upsert:1},this._deferredCalls=!0,this.subsetOf(this)},d.addModule("Collection",o),d.mixin(o.prototype,"Mixin.Common"),d.mixin(o.prototype,"Mixin.Events"),d.mixin(o.prototype,"Mixin.ChainReactor"),d.mixin(o.prototype,"Mixin.CRUD"),d.mixin(o.prototype,"Mixin.Constants"),d.mixin(o.prototype,"Mixin.Triggers"),d.mixin(o.prototype,"Mixin.Sorting"),d.mixin(o.prototype,"Mixin.Matching"),d.mixin(o.prototype,"Mixin.Updating"),d.mixin(o.prototype,"Mixin.Tags"),f=a("./Metrics"),g=a("./KeyValueStore"),h=a("./Path"),i=a("./IndexHashMap"),j=a("./IndexBinaryTree"),k=a("./Index2d"),e=d.modules.Db,l=a("./Overload"),m=a("./ReactorIO"),n=new h,d.synthesize(o.prototype,"deferredCalls"),d.synthesize(o.prototype,"state"),d.synthesize(o.prototype,"name"),d.synthesize(o.prototype,"metaData"),d.synthesize(o.prototype,"capped"),d.synthesize(o.prototype,"cappedSize"),o.prototype._asyncPending=function(a){this._deferQueue.async.push(a)},o.prototype._asyncComplete=function(a){for(var b=this._deferQueue.async.indexOf(a);b>-1;)this._deferQueue.async.splice(b,1),b=this._deferQueue.async.indexOf(a);0===this._deferQueue.async.length&&this.deferEmit("ready")},o.prototype.data=function(){return this._data},o.prototype.drop=function(a){var b;if(this.isDropped())return a&&a.call(this,!1,!0),!0;if(this._db&&this._db._collection&&this._name){if(this.debug()&&console.log(this.logIdentifier()+" Dropping"),this._state="dropped",this.emit("drop",this),delete this._db._collection[this._name],this._collate)for(b in this._collate)this._collate.hasOwnProperty(b)&&this.collateRemove(b);return delete this._primaryKey,delete this._primaryIndex,delete this._primaryCrc,delete this._crcLookup,delete this._data,delete this._metrics,delete this._listeners,a&&a.call(this,!1,!0),!0}return a&&a.call(this,!1,!0),!1},o.prototype.primaryKey=function(a){if(void 0!==a){if(this._primaryKey!==a){var b=this._primaryKey;this._primaryKey=a,this._primaryIndex.primaryKey(a),this.rebuildPrimaryKeyIndex(),this.chainSend("primaryKey",{keyName:a,oldData:b})}return this}return this._primaryKey},o.prototype._onInsert=function(a,b){this.emit("insert",a,b)},o.prototype._onUpdate=function(a){this.emit("update",a)},o.prototype._onRemove=function(a){this.emit("remove",a)},o.prototype._onChange=function(){this._options.changeTimestamp&&(this._metaData.lastChange=this.serialiser.convert(new Date))},d.synthesize(o.prototype,"db",function(a){return a&&"_id"===this.primaryKey()&&(this.primaryKey(a.primaryKey()),this.debug(a.debug())),this.$super.apply(this,arguments)}),d.synthesize(o.prototype,"mongoEmulation"),o.prototype.setData=new l("Collection.prototype.setData",{"*":function(a){return this.$main.call(this,a,{})},"*, object":function(a,b){return this.$main.call(this,a,b)},"*, function":function(a,b){return this.$main.call(this,a,{},b)},"*, *, function":function(a,b,c){return this.$main.call(this,a,b,c)},"*, *, *":function(a,b,c){return this.$main.call(this,a,b,c)},$main:function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";if(a){var d=this.deferredCalls(),e=[].concat(this._data);this.deferredCalls(!1),b=this.options(b),b.$decouple&&(a=this.decouple(a)),a instanceof Array||(a=[a]),this.remove({}),this.insert(a),this.deferredCalls(d),this._onChange(),this.emit("setData",this._data,e)}return c&&c.call(this),this}}),o.prototype.rebuildPrimaryKeyIndex=function(a){a=a||{$ensureKeys:void 0,$violationCheck:void 0};var b,c,d,e,f=a&&void 0!==a.$ensureKeys?a.$ensureKeys:!0,g=a&&void 0!==a.$violationCheck?a.$violationCheck:!0,h=this._primaryIndex,i=this._primaryCrc,j=this._crcLookup,k=this._primaryKey;for(h.truncate(),i.truncate(),j.truncate(),b=this._data,c=b.length;c--;){if(d=b[c],f&&this.ensurePrimaryKey(d),g){if(!h.uniqueSet(d[k],d))throw this.logIdentifier()+" Call to setData on collection failed because your data violates the primary key unique constraint. One or more documents are using the same primary key: "+d[this._primaryKey]}else h.set(d[k],d);e=this.hash(d),i.set(d[k],e),j.set(e,d)}},o.prototype.ensurePrimaryKey=function(a){void 0===a[this._primaryKey]&&(a[this._primaryKey]=this.objectId())},o.prototype.truncate=function(){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return this.emit("truncate",this._data),this._data.length=0,this._primaryIndex=new g("primary"),this._primaryCrc=new g("primaryCrc"),this._crcLookup=new g("crcLookup"),this._onChange(),this.emit("immediateChange",{type:"truncate"}),this.deferEmit("change",{type:"truncate"}),this},o.prototype.upsert=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";if(a){var c,d,e=this._deferQueue.upsert,f=this._deferThreshold.upsert,g={};if(a instanceof Array){if(this._deferredCalls&&a.length>f)return this._deferQueue.upsert=e.concat(a),this._asyncPending("upsert"),this.processQueue("upsert",b),{};for(g=[],d=0;d<a.length;d++)g.push(this.upsert(a[d]));return b&&b.call(this),g}switch(a[this._primaryKey]?(c={},c[this._primaryKey]=a[this._primaryKey],this._primaryIndex.lookup(c)[0]?g.op="update":g.op="insert"):g.op="insert",g.op){case"insert":g.result=this.insert(a,b);break;case"update":g.result=this.update(c,a,{},b)}return g}return b&&b.call(this),{}},o.prototype.filter=function(a,b,c){return this.find(a,c).filter(b)},o.prototype.filterUpdate=function(a,b,c){var d,e,f,g,h=this.find(a,c),i=[],j=this.primaryKey();for(g=0;g<h.length;g++)d=h[g],f=b(d),f&&(e={},e[j]=d[j],i.push(this.update(e,f)));return i},o.prototype.update=function(a,b,c,d){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return this.mongoEmulation()?(this.convertToFdb(a),this.convertToFdb(b)):b=this.decouple(b),b=this.transformIn(b),this._handleUpdate(a,b,c,d)},o.prototype._handleUpdate=function(a,b,c,d){var e,f,g=this,h=this._metrics.create("update"),i=function(d){var e,f,i,j=g.decouple(d);return g.willTrigger(g.TYPE_UPDATE,g.PHASE_BEFORE)||g.willTrigger(g.TYPE_UPDATE,g.PHASE_AFTER)?(e=g.decouple(d),f={type:"update",query:g.decouple(a),update:g.decouple(b),options:g.decouple(c),op:h},i=g.updateObject(e,f.update,f.query,f.options,""),g.processTrigger(f,g.TYPE_UPDATE,g.PHASE_BEFORE,d,e)!==!1?(i=g.updateObject(d,e,f.query,f.options,""),g.processTrigger(f,g.TYPE_UPDATE,g.PHASE_AFTER,j,e)):i=!1):i=g.updateObject(d,b,a,c,""),g._updateIndexes(j,d),i};return h.start(),h.time("Retrieve documents to update"),e=this.find(a,{$decouple:!1}),h.time("Retrieve documents to update"),e.length&&(h.time("Update documents"),f=e.filter(i),h.time("Update documents"),f.length&&(this.debug()&&console.log(this.logIdentifier()+" Updated some data"),h.time("Resolve chains"),this.chainWillSend()&&this.chainSend("update",{query:a,update:b,dataSet:this.decouple(f)},c),h.time("Resolve chains"),this._onUpdate(f),this._onChange(),d&&d.call(this),this.emit("immediateChange",{type:"update",data:f}),this.deferEmit("change",{type:"update",data:f}))),h.stop(),f||[]},o.prototype._replaceObj=function(a,b){var c;this._removeFromIndexes(a);for(c in a)a.hasOwnProperty(c)&&delete a[c];for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);if(!this._insertIntoIndexes(a))throw this.logIdentifier()+" Primary key violation in update! Key violated: "+a[this._primaryKey];return this},o.prototype.updateById=function(a,b){var c={};return c[this._primaryKey]=a,this.update(c,b)[0]},o.prototype.updateObject=function(a,b,c,d,e,f){b=this.decouple(b),e=e||"","."===e.substr(0,1)&&(e=e.substr(1,e.length-1));var g,i,j,k,l,m,n,o,p,q,r,s,t=!1,u=!1;for(s in b)if(b.hasOwnProperty(s)){if(g=!1,"$"===s.substr(0,1))switch(s){case"$key":case"$index":case"$data":case"$min":case"$max":g=!0;break;case"$each":for(g=!0,k=b.$each.length,j=0;k>j;j++)u=this.updateObject(a,b.$each[j],c,d,e),u&&(t=!0);t=t||u;break;case"$replace":g=!0,n=b.$replace,o=this.primaryKey();for(m in a)a.hasOwnProperty(m)&&m!==o&&void 0===n[m]&&(this._updateUnset(a,m),t=!0);for(m in n)n.hasOwnProperty(m)&&m!==o&&(this._updateOverwrite(a,m,n[m]),t=!0);break;default:g=!0,u=this.updateObject(a,b[s],c,d,e,s),t=t||u}if(this._isPositionalKey(s)&&(g=!0,s=s.substr(0,s.length-2),p=new h(e+"."+s),a[s]&&a[s]instanceof Array&&a[s].length)){for(i=[],j=0;j<a[s].length;j++)this._match(a[s][j],p.value(c)[0],d,"",{})&&i.push(j);for(j=0;j<i.length;j++)u=this.updateObject(a[s][i[j]],b[s+".$"],c,d,e+"."+s,f),t=t||u}if(!g)if(f||"object"!=typeof b[s])switch(f){case"$inc":var v=!0;b[s]>0?b.$max&&a[s]>=b.$max&&(v=!1):b[s]<0&&b.$min&&a[s]<=b.$min&&(v=!1),v&&(this._updateIncrement(a,s,b[s]),t=!0);break;case"$cast":switch(b[s]){case"array":a[s]instanceof Array||(this._updateProperty(a,s,b.$data||[]),t=!0);break;case"object":(!(a[s]instanceof Object)||a[s]instanceof Array)&&(this._updateProperty(a,s,b.$data||{}),t=!0);break;case"number":"number"!=typeof a[s]&&(this._updateProperty(a,s,Number(a[s])),t=!0);break;case"string":"string"!=typeof a[s]&&(this._updateProperty(a,s,String(a[s])),t=!0);break;default:throw this.logIdentifier()+" Cannot update cast to unknown type: "+b[s]}break;case"$push":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot push to a key that is not an array! ("+s+")";if(void 0!==b[s].$position&&b[s].$each instanceof Array)for(l=b[s].$position,k=b[s].$each.length,j=0;k>j;j++)this._updateSplicePush(a[s],l+j,b[s].$each[j]);else if(b[s].$each instanceof Array)for(k=b[s].$each.length,j=0;k>j;j++)this._updatePush(a[s],b[s].$each[j]);else this._updatePush(a[s],b[s]);t=!0;break;case"$pull":if(a[s]instanceof Array){for(i=[],j=0;j<a[s].length;j++)this._match(a[s][j],b[s],d,"",{})&&i.push(j);for(k=i.length;k--;)this._updatePull(a[s],i[k]),t=!0}break;case"$pullAll":if(a[s]instanceof Array){if(!(b[s]instanceof Array))throw this.logIdentifier()+" Cannot pullAll without being given an array of values to pull! ("+s+")";if(i=a[s],k=i.length,k>0)for(;k--;){for(l=0;l<b[s].length;l++)i[k]===b[s][l]&&(this._updatePull(a[s],k),k--,t=!0);if(0>k)break}}break;case"$addToSet":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot addToSet on a key that is not an array! ("+s+")";var w,x,y,z,A=a[s],B=A.length,C=!0,D=d&&d.$addToSet;for(b[s].$key?(y=!1,z=new h(b[s].$key),x=z.value(b[s])[0],delete b[s].$key):D&&D.key?(y=!1,z=new h(D.key),x=z.value(b[s])[0]):(x=this.jStringify(b[s]),y=!0),w=0;B>w;w++)if(y){if(this.jStringify(A[w])===x){C=!1;break}}else if(x===z.value(A[w])[0]){C=!1;break}C&&(this._updatePush(a[s],b[s]),t=!0);break;case"$splicePush":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot splicePush with a key that is not an array! ("+s+")";if(l=b.$index,void 0===l)throw this.logIdentifier()+" Cannot splicePush without a $index integer value!";delete b.$index,l>a[s].length&&(l=a[s].length),this._updateSplicePush(a[s],l,b[s]),t=!0;break;case"$move":if(!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot move on a key that is not an array! ("+s+")";for(j=0;j<a[s].length;j++)if(this._match(a[s][j],b[s],d,"",{})){var E=b.$index;if(void 0===E)throw this.logIdentifier()+" Cannot move without a $index integer value!";delete b.$index,this._updateSpliceMove(a[s],j,E),t=!0;break}break;case"$mul":this._updateMultiply(a,s,b[s]),t=!0;break;case"$rename":this._updateRename(a,s,b[s]),t=!0;break;case"$overwrite":this._updateOverwrite(a,s,b[s]),t=!0;break;case"$unset":this._updateUnset(a,s),t=!0;break;case"$clear":this._updateClear(a,s),t=!0;break;case"$pop":if(!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot pop from a key that is not an array! ("+s+")";this._updatePop(a[s],b[s])&&(t=!0);break;case"$toggle":this._updateProperty(a,s,!a[s]),t=!0;break;default:a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0)}else if(null!==a[s]&&"object"==typeof a[s])if(q=a[s]instanceof Array,r=b[s]instanceof Array,q||r)if(!r&&q)for(j=0;j<a[s].length;j++)u=this.updateObject(a[s][j],b[s],c,d,e+"."+s,f),t=t||u;else a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0);else u=this.updateObject(a[s],b[s],c,d,e+"."+s,f),t=t||u;else a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0)}return t},o.prototype._isPositionalKey=function(a){return".$"===a.substr(a.length-2,2)},o.prototype.remove=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";var d,e,f,g,h,i,j,k,l=this;if("function"==typeof b&&(c=b,b={}),this.mongoEmulation()&&this.convertToFdb(a),a instanceof Array){for(g=[],f=0;f<a.length;f++)g.push(this.remove(a[f],{noEmit:!0}));return(!b||b&&!b.noEmit)&&this._onRemove(g),c&&c.call(this,!1,g),g}if(g=[],d=this.find(a,{$decouple:!1}),d.length){h=function(a){l._removeFromIndexes(a),e=l._data.indexOf(a),l._dataRemoveAtIndex(e),g.push(a)};for(var m=0;m<d.length;m++)j=d[m],l.willTrigger(l.TYPE_REMOVE,l.PHASE_BEFORE)||l.willTrigger(l.TYPE_REMOVE,l.PHASE_AFTER)?(i={type:"remove"},k=l.decouple(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_BEFORE,k,k)!==!1&&(h(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_AFTER,k,k))):h(j);g.length&&(l.chainSend("remove",{query:a,dataSet:g},b),(!b||b&&!b.noEmit)&&this._onRemove(g),this._onChange(),this.emit("immediateChange",{type:"remove",data:g}),this.deferEmit("change",{type:"remove",data:g}))}return c&&c.call(this,!1,g),g},o.prototype.removeById=function(a){var b={};return b[this._primaryKey]=a,this.remove(b)[0]},o.prototype.processQueue=function(a,b,c){var d,e,f=this,g=this._deferQueue[a],h=this._deferThreshold[a],i=this._deferTime[a];if(c=c||{deferred:!0},g.length){switch(d=g.length>h?g.splice(0,h):g.splice(0,g.length),e=f[a](d),a){case"insert":c.inserted=c.inserted||[],c.failed=c.failed||[],c.inserted=c.inserted.concat(e.inserted),c.failed=c.failed.concat(e.failed)}setTimeout(function(){f.processQueue.call(f,a,b,c)},i)}else b&&b.call(this,c),this._asyncComplete(a);this.isProcessingQueue()||this.deferEmit("queuesComplete")},o.prototype.isProcessingQueue=function(){var a;for(a in this._deferQueue)if(this._deferQueue.hasOwnProperty(a)&&this._deferQueue[a].length)return!0;return!1},o.prototype.insert=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return"function"==typeof b?(c=b,b=this._data.length):void 0===b&&(b=this._data.length),a=this.transformIn(a),this._insertHandle(a,b,c)},o.prototype._insertHandle=function(a,b,c){var d,e,f,g=this._deferQueue.insert,h=this._deferThreshold.insert,i=[],j=[];if(a instanceof Array){if(this._deferredCalls&&a.length>h)return this._deferQueue.insert=g.concat(a),this._asyncPending("insert"),void this.processQueue("insert",c);for(f=0;f<a.length;f++)d=this._insert(a[f],b+f),d===!0?i.push(a[f]):j.push({doc:a[f],reason:d})}else d=this._insert(a,b),d===!0?i.push(a):j.push({doc:a,reason:d});return e={deferred:!1,inserted:i,failed:j},this._onInsert(i,j),c&&c.call(this,e),this._onChange(),this.emit("immediateChange",{type:"insert",data:i}),this.deferEmit("change",{type:"insert",data:i}),e},o.prototype._insert=function(a,b){if(a){var c,d,e,f,g=this,h=this.capped(),i=this.cappedSize();if(this.ensurePrimaryKey(a),c=this.insertIndexViolation(a),e=function(a){g._insertIntoIndexes(a),b>g._data.length&&(b=g._data.length),g._dataInsertAtIndex(b,a),h&&g._data.length>i&&g.removeById(g._data[0][g._primaryKey]),g.chainWillSend()&&g.chainSend("insert",{dataSet:g.decouple([a])},{index:b})},c)return"Index violation in index: "+c;if(g.willTrigger(g.TYPE_INSERT,g.PHASE_BEFORE)||g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)){if(d={type:"insert"},g.processTrigger(d,g.TYPE_INSERT,g.PHASE_BEFORE,{},a)===!1)return"Trigger cancelled operation";e(a),g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)&&(f=g.decouple(a),g.processTrigger(d,g.TYPE_INSERT,g.PHASE_AFTER,{},f))}else e(a);return!0}return"No document passed to insert"},o.prototype._dataInsertAtIndex=function(a,b){this._data.splice(a,0,b)},o.prototype._dataRemoveAtIndex=function(a){this._data.splice(a,1)},o.prototype._dataReplace=function(a){for(;this._data.length;)this._data.pop();this._data=this._data.concat(a)},o.prototype._insertIntoIndexes=function(a){var b,c,d=this._indexByName,e=this.hash(a),f=this._primaryKey;c=this._primaryIndex.uniqueSet(a[f],a),this._primaryCrc.uniqueSet(a[f],e),this._crcLookup.uniqueSet(e,a);for(b in d)d.hasOwnProperty(b)&&d[b].insert(a);return c},o.prototype._removeFromIndexes=function(a){var b,c=this._indexByName,d=this.hash(a),e=this._primaryKey;this._primaryIndex.unSet(a[e]),this._primaryCrc.unSet(a[e]),this._crcLookup.unSet(d);for(b in c)c.hasOwnProperty(b)&&c[b].remove(a)},o.prototype._updateIndexes=function(a,b){this._removeFromIndexes(a),this._insertIntoIndexes(b)},o.prototype._rebuildIndexes=function(){var a,b=this._indexByName;for(a in b)b.hasOwnProperty(a)&&b[a].rebuild()},o.prototype.subset=function(a,b){var c,d=this.find(a,b);return c=new o,c.db(this._db),c.subsetOf(this).primaryKey(this._primaryKey).setData(d),c},d.synthesize(o.prototype,"subsetOf"),o.prototype.isSubsetOf=function(a){return this._subsetOf===a},o.prototype.distinct=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";var d,e,f=this.find(b,c),g=new h(a),i={},j=[];for(e=0;e<f.length;e++)d=g.value(f[e])[0],d&&!i[d]&&(i[d]=!0,j.push(d));return j},o.prototype.findById=function(a,b){var c={};return c[this._primaryKey]=a,this.find(c,b)[0]},o.prototype.peek=function(a,b){var c,d,e=this._data,f=e.length,g=new o,h=typeof a;if("string"===h){for(c=0;f>c;c++)d=this.jStringify(e[c]),d.indexOf(a)>-1&&g.insert(e[c]);return g.find({},b)}return this.find(a,b)},o.prototype.explain=function(a,b){var c=this.find(a,b);return c.__fdbOp._data},o.prototype.options=function(a){return a=a||{},a.$decouple=void 0!==a.$decouple?a.$decouple:!0,a.$explain=void 0!==a.$explain?a.$explain:!1,a},o.prototype.find=function(a,b,c){return this.mongoEmulation()&&this.convertToFdb(a),c?(c.call(this,"Callbacks for the find() operation are not yet implemented!",[]),[]):this._find.call(this,a,b,c)},o.prototype._find=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";a=a||{};var c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=this._metrics.create("find"),y=this.primaryKey(),z=this,A=!0,B={},C=[],D=[],E=[],F={},G={};if(b instanceof Array||(b=this.options(b)),w=function(c){return z._match(c,a,b,"and",F)},x.start(),a){if(a instanceof Array){for(v=this,n=0;n<a.length;n++)v=v.subset(a[n],b&&b[n]?b[n]:{});return v.find()}if(a.$findSub){if(!a.$findSub.$path)throw"$findSub missing $path property!";return this.findSub(a.$findSub.$query,a.$findSub.$path,a.$findSub.$subQuery,a.$findSub.$subOptions)}if(a.$findSubOne){if(!a.$findSubOne.$path)throw"$findSubOne missing $path property!";return this.findSubOne(a.$findSubOne.$query,a.$findSubOne.$path,a.$findSubOne.$subQuery,a.$findSubOne.$subOptions)}if(x.time("analyseQuery"),c=this._analyseQuery(z.decouple(a),b,x),x.time("analyseQuery"),x.data("analysis",c),c.hasJoin&&c.queriesJoin){for(x.time("joinReferences"),f=0;f<c.joinsOn.length;f++)m=c.joinsOn[f],j=m.key,k=m.type,l=m.id,i=new h(c.joinQueries[j]),g=i.value(a)[0],B[l]=this._db[k](j).subset(g),delete a[c.joinQueries[j]];x.time("joinReferences")}if(c.indexMatch.length&&(!b||b&&!b.$skipIndex)?(x.data("index.potential",c.indexMatch),x.data("index.used",c.indexMatch[0].index),x.time("indexLookup"),e=c.indexMatch[0].lookup||[],x.time("indexLookup"),c.indexMatch[0].keyData.totalKeyCount===c.indexMatch[0].keyData.score&&(A=!1)):x.flag("usedIndex",!1),A&&(e&&e.length?(d=e.length,x.time("tableScan: "+d),e=e.filter(w)):(d=this._data.length,x.time("tableScan: "+d),e=this._data.filter(w)),x.time("tableScan: "+d)),b.$orderBy&&(x.time("sort"),e=this.sort(b.$orderBy,e),x.time("sort")),void 0!==b.$page&&void 0!==b.$limit&&(G.page=b.$page,G.pages=Math.ceil(e.length/b.$limit),G.records=e.length,b.$page&&b.$limit>0&&(x.data("cursor",G),e.splice(0,b.$page*b.$limit))),b.$skip&&(G.skip=b.$skip,e.splice(0,b.$skip),x.data("skip",b.$skip)),b.$limit&&e&&e.length>b.$limit&&(G.limit=b.$limit,e.length=b.$limit,x.data("limit",b.$limit)),b.$decouple&&(x.time("decouple"),e=this.decouple(e),x.time("decouple"),x.data("flag.decouple",!0)),b.$join&&(C=C.concat(this.applyJoin(e,b.$join,B)),x.data("flag.join",!0)),C.length&&(x.time("removalQueue"),this.spliceArrayByIndexList(e,C),x.time("removalQueue")),b.$transform){for(x.time("transform"),n=0;n<e.length;n++)e.splice(n,1,b.$transform(e[n]));x.time("transform"),x.data("flag.transform",!0)}this._transformEnabled&&this._transformOut&&(x.time("transformOut"),e=this.transformOut(e),x.time("transformOut")),x.data("results",e.length)}else e=[];if(!b.$aggregate){x.time("scanFields");for(n in b)b.hasOwnProperty(n)&&0!==n.indexOf("$")&&(1===b[n]?D.push(n):0===b[n]&&E.push(n));if(x.time("scanFields"),D.length||E.length){for(x.data("flag.limitFields",!0),x.data("limitFields.on",D),x.data("limitFields.off",E),x.time("limitFields"),n=0;n<e.length;n++){t=e[n];for(o in t)t.hasOwnProperty(o)&&(D.length&&o!==y&&-1===D.indexOf(o)&&delete t[o],E.length&&E.indexOf(o)>-1&&delete t[o])}x.time("limitFields")}if(b.$elemMatch){x.data("flag.elemMatch",!0),x.time("projection-elemMatch");for(n in b.$elemMatch)if(b.$elemMatch.hasOwnProperty(n))for(q=new h(n),o=0;o<e.length;o++)if(r=q.value(e[o])[0],r&&r.length)for(p=0;p<r.length;p++)if(z._match(r[p],b.$elemMatch[n],b,"",{})){q.set(e[o],n,[r[p]]);break}x.time("projection-elemMatch")}if(b.$elemsMatch){x.data("flag.elemsMatch",!0),x.time("projection-elemsMatch");for(n in b.$elemsMatch)if(b.$elemsMatch.hasOwnProperty(n))for(q=new h(n),o=0;o<e.length;o++)if(r=q.value(e[o])[0],r&&r.length){for(s=[],p=0;p<r.length;p++)z._match(r[p],b.$elemsMatch[n],b,"",{})&&s.push(r[p]);q.set(e[o],n,s)}x.time("projection-elemsMatch")}}return b.$aggregate&&(x.data("flag.aggregate",!0),x.time("aggregate"),u=new h(b.$aggregate),e=u.value(e),x.time("aggregate")),x.stop(),e.__fdbOp=x,e.$cursor=G,e},o.prototype.findOne=function(){return this.find.apply(this,arguments)[0]},o.prototype.indexOf=function(a,b){var c,d=this.find(a,{$decouple:!1})[0];return d?!b||b&&!b.$orderBy?this._data.indexOf(d):(b.$decouple=!1,c=this.find(a,b),c.indexOf(d)):-1},o.prototype.indexOfDocById=function(a,b){var c,d;return c="object"!=typeof a?this._primaryIndex.get(a):this._primaryIndex.get(a[this._primaryKey]),c?!b||b&&!b.$orderBy?this._data.indexOf(c):(b.$decouple=!1,d=this.find({},b),d.indexOf(c)):-1},o.prototype.removeByIndex=function(a){var b,c;return b=this._data[a],void 0!==b?(b=this.decouple(b),c=b[this.primaryKey()],this.removeById(c)):!1},o.prototype.transform=function(a){return void 0!==a?("object"==typeof a?(void 0!==a.enabled&&(this._transformEnabled=a.enabled),void 0!==a.dataIn&&(this._transformIn=a.dataIn),void 0!==a.dataOut&&(this._transformOut=a.dataOut)):this._transformEnabled=a!==!1,this):{enabled:this._transformEnabled, dataIn:this._transformIn,dataOut:this._transformOut}},o.prototype.transformIn=function(a){if(this._transformEnabled&&this._transformIn){if(a instanceof Array){var b,c,d=[];for(c=0;c<a.length;c++)b=this._transformIn(a[c]),b instanceof Array?d=d.concat(b):d.push(b);return d}return this._transformIn(a)}return a},o.prototype.transformOut=function(a){if(this._transformEnabled&&this._transformOut){if(a instanceof Array){var b,c,d=[];for(c=0;c<a.length;c++)b=this._transformOut(a[c]),b instanceof Array?d=d.concat(b):d.push(b);return d}return this._transformOut(a)}return a},o.prototype.sort=function(a,b){var c=this,d=n.parse(a,!0);return d.length&&b.sort(function(a,b){var e,f,g=0;for(e=0;e<d.length;e++)if(f=d[e],1===f.value?g=c.sortAsc(n.get(a,f.path),n.get(b,f.path)):-1===f.value&&(g=c.sortDesc(n.get(a,f.path),n.get(b,f.path))),0!==g)return g;return g}),b},o.prototype._sort=function(a,b){var c,d=this,e=new h,f=e.parse(a,!0)[0];if(e.path(f.path),1===f.value)c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortAsc(c,f)};else{if(-1!==f.value)throw this.logIdentifier()+" $orderBy clause has invalid direction: "+f.value+", accepted values are 1 or -1 for ascending or descending!";c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortDesc(c,f)}}return b.sort(c)},o.prototype._analyseQuery=function(a,b,c){var d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u={queriesOn:[{id:"$collection."+this._name,type:"colletion",key:this._name}],indexMatch:[],hasJoin:!1,queriesJoin:!1,joinQueries:{},query:a,options:b},v=[],w=[];if(c.time("checkIndexes"),p=new h,q=p.parseArr(a,{ignore:/\$/,verbose:!0}).length){void 0!==a[this._primaryKey]&&(r=typeof a[this._primaryKey],("string"===r||"number"===r||a[this._primaryKey]instanceof Array)&&(c.time("checkIndexMatch: Primary Key"),s=this._primaryIndex.lookup(a,b),u.indexMatch.push({lookup:s,keyData:{matchedKeys:[this._primaryKey],totalKeyCount:q,score:1},index:this._primaryIndex}),c.time("checkIndexMatch: Primary Key")));for(t in this._indexById)if(this._indexById.hasOwnProperty(t)&&(m=this._indexById[t],n=m.name(),c.time("checkIndexMatch: "+n),l=m.match(a,b),l.score>0&&(o=m.lookup(a,b),u.indexMatch.push({lookup:o,keyData:l,index:m})),c.time("checkIndexMatch: "+n),l.score===q))break;c.time("checkIndexes"),u.indexMatch.length>1&&(c.time("findOptimalIndex"),u.indexMatch.sort(function(a,b){return a.keyData.score>b.keyData.score?-1:a.keyData.score<b.keyData.score?1:a.keyData.score===b.keyData.score?a.lookup.length-b.lookup.length:void 0}),c.time("findOptimalIndex"))}if(b.$join){for(u.hasJoin=!0,d=0;d<b.$join.length;d++)for(e in b.$join[d])b.$join[d].hasOwnProperty(e)&&(i=b.$join[d][e],f=i.$sourceType||"collection",g="$"+f+"."+e,v.push({id:g,type:f,key:e}),void 0!==b.$join[d][e].$as?w.push(b.$join[d][e].$as):w.push(e));for(k=0;k<w.length;k++)j=this._queryReferencesSource(a,w[k],""),j&&(u.joinQueries[v[k].key]=j,u.queriesJoin=!0);u.joinsOn=v,u.queriesOn=u.queriesOn.concat(v)}return u},o.prototype._queryReferencesSource=function(a,b,c){var d;for(d in a)if(a.hasOwnProperty(d)){if(d===b)return c&&(c+="."),c+d;if("object"==typeof a[d])return c&&(c+="."),c+=d,this._queryReferencesSource(a[d],b,c)}return!1},o.prototype.count=function(a,b){return a?this.find(a,b).length:this._data.length},o.prototype.findSub=function(a,b,c,d){return this._findSub(this.find(a),b,c,d)},o.prototype._findSub=function(a,b,c,d){var e,f,g,i=new h(b),j=a.length,k=new o("__FDB_temp_"+this.objectId()).db(this._db),l={parents:j,subDocTotal:0,subDocs:[],pathFound:!1,err:""};for(d=d||{},e=0;j>e;e++)if(f=i.value(a[e])[0]){if(k.setData(f),g=k.find(c,d),d.returnFirst&&g.length)return g[0];d.$split?l.subDocs.push(g):l.subDocs=l.subDocs.concat(g),l.subDocTotal+=g.length,l.pathFound=!0}return k.drop(),l.pathFound||(l.err="No objects found in the parent documents with a matching path of: "+b),d.$stats?l:l.subDocs},o.prototype.findSubOne=function(a,b,c,d){return this.findSub(a,b,c,d)[0]},o.prototype.insertIndexViolation=function(a){var b,c,d,e=this._indexByName;if(this._primaryIndex.get(a[this._primaryKey]))b=this._primaryIndex;else for(c in e)if(e.hasOwnProperty(c)&&(d=e[c],d.unique()&&d.violation(a))){b=d;break}return b?b.name():!1},o.prototype.ensureIndex=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";this._indexByName=this._indexByName||{},this._indexById=this._indexById||{};var c,e={start:(new Date).getTime()};if(b)if(b.type){if(!d.index[b.type])throw this.logIdentifier()+' Cannot create index of type "'+b.type+'", type not found in the index type register (Shared.index)';c=new d.index[b.type](a,b,this)}else c=new i(a,b,this);else c=new i(a,b,this);return this._indexByName[c.name()]?{err:"Index with that name already exists"}:(c.rebuild(),this._indexByName[c.name()]=c,this._indexById[c.id()]=c,e.end=(new Date).getTime(),e.total=e.end-e.start,this._lastOp={type:"ensureIndex",stats:{time:e}},{index:c,id:c.id(),name:c.name(),state:c.state()})},o.prototype.index=function(a){return this._indexByName?this._indexByName[a]:void 0},o.prototype.lastOp=function(){return this._metrics.list()},o.prototype.diff=function(a){var b,c,d,e,f={insert:[],update:[],remove:[]},g=this.primaryKey();if(g!==a.primaryKey())throw this.logIdentifier()+" Diffing requires that both collections have the same primary key!";for(b=a._data;b&&!(b instanceof Array);)a=b,b=a._data;for(e=b.length,c=0;e>c;c++)d=b[c],this._primaryIndex.get(d[g])?this._primaryCrc.get(d[g])!==a._primaryCrc.get(d[g])&&f.update.push(d):f.insert.push(d);for(b=this._data,e=b.length,c=0;e>c;c++)d=b[c],a._primaryIndex.get(d[g])||f.remove.push(d);return f},o.prototype.collateAdd=new l("Collection.prototype.collateAdd",{"object, string":function(a,b){var c=this;c.collateAdd(a,function(d){var e,f;switch(d.type){case"insert":b?(e={$push:{}},e.$push[b]=c.decouple(d.data.dataSet),c.update({},e)):c.insert(d.data.dataSet);break;case"update":b?(e={},f={},e[b]=d.data.query,f[b+".$"]=d.data.update,c.update(e,f)):c.update(d.data.query,d.data.update);break;case"remove":b?(e={$pull:{}},e.$pull[b]={},e.$pull[b][c.primaryKey()]=d.data.dataSet[0][a.primaryKey()],c.update({},e)):c.remove(d.data.dataSet)}})},"object, function":function(a,b){if("string"==typeof a&&(a=this._db.collection(a,{autoCreate:!1,throwError:!1})),a)return this._collate=this._collate||{},this._collate[a.name()]=new m(a,this,b),this;throw"Cannot collate from a non-existent collection!"}}),o.prototype.collateRemove=function(a){if("object"==typeof a&&(a=a.name()),a)return this._collate[a].drop(),delete this._collate[a],this;throw"No collection name passed to collateRemove() or collection not found!"},e.prototype.collection=new l("Db.prototype.collection",{"":function(){return this.$main.call(this,{name:this.objectId()})},object:function(a){return a instanceof o?"droppped"!==a.state()?a:this.$main.call(this,{name:a.name()}):this.$main.call(this,a)},string:function(a){return this.$main.call(this,{name:a})},"string, string":function(a,b){return this.$main.call(this,{name:a,primaryKey:b})},"string, object":function(a,b){return b.name=a,this.$main.call(this,b)},"string, string, object":function(a,b,c){return c.name=a,c.primaryKey=b,this.$main.call(this,c)},$main:function(a){var b=this,c=a.name;if(c){if(this._collection[c])return this._collection[c];if(a&&a.autoCreate===!1){if(a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get collection "+c+" because it does not exist and auto-create has been disabled!";return}if(this.debug()&&console.log(this.logIdentifier()+" Creating collection "+c),this._collection[c]=this._collection[c]||new o(c,a).db(this),this._collection[c].mongoEmulation(this.mongoEmulation()),void 0!==a.primaryKey&&this._collection[c].primaryKey(a.primaryKey),void 0!==a.capped){if(void 0===a.size)throw this.logIdentifier()+" Cannot create a capped collection without specifying a size!";this._collection[c].capped(a.capped),this._collection[c].cappedSize(a.size)}return b._collection[c].on("change",function(){b.emit("change",b._collection[c],"collection",c)}),b.emit("create",b._collection[c],"collection",c),this._collection[c]}if(!a||a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get collection with undefined name!"}}),e.prototype.collectionExists=function(a){return Boolean(this._collection[a])},e.prototype.collections=function(a){var b,c,d=[],e=this._collection;a&&(a instanceof RegExp||(a=new RegExp(a)));for(c in e)e.hasOwnProperty(c)&&(b=e[c],a?a.exec(c)&&d.push({name:c,count:b.count(),linked:void 0!==b.isLinked?b.isLinked():!1}):d.push({name:c,count:b.count(),linked:void 0!==b.isLinked?b.isLinked():!1}));return d.sort(function(a,b){return a.name.localeCompare(b.name)}),d},d.finishModule("Collection"),b.exports=o},{"./Index2d":13,"./IndexBinaryTree":14,"./IndexHashMap":15,"./KeyValueStore":16,"./Metrics":17,"./Overload":31,"./Path":33,"./ReactorIO":37,"./Shared":39}],6:[function(a,b,c){"use strict";var d,e,f,g;d=a("./Shared");var h=function(){this.init.apply(this,arguments)};h.prototype.init=function(a){var b=this;b._name=a,b._data=new g("__FDB__cg_data_"+b._name),b._collections=[],b._view=[]},d.addModule("CollectionGroup",h),d.mixin(h.prototype,"Mixin.Common"),d.mixin(h.prototype,"Mixin.ChainReactor"),d.mixin(h.prototype,"Mixin.Constants"),d.mixin(h.prototype,"Mixin.Triggers"),d.mixin(h.prototype,"Mixin.Tags"),d.mixin(h.prototype,"Mixin.Events"),g=a("./Collection"),e=d.modules.Db,f=d.modules.Db.prototype.init,h.prototype.on=function(){this._data.on.apply(this._data,arguments)},h.prototype.off=function(){this._data.off.apply(this._data,arguments)},h.prototype.emit=function(){this._data.emit.apply(this._data,arguments)},h.prototype.primaryKey=function(a){return void 0!==a?(this._primaryKey=a,this):this._primaryKey},d.synthesize(h.prototype,"state"),d.synthesize(h.prototype,"db"),d.synthesize(h.prototype,"name"),h.prototype.addCollection=function(a){if(a&&-1===this._collections.indexOf(a)){if(this._collections.length){if(this._primaryKey!==a.primaryKey())throw this.logIdentifier()+" All collections in a collection group must have the same primary key!"}else this.primaryKey(a.primaryKey());this._collections.push(a),a._groups=a._groups||[],a._groups.push(this),a.chain(this),a.on("drop",function(){if(a._groups&&a._groups.length){var b,c=[];for(b=0;b<a._groups.length;b++)c.push(a._groups[b]);for(b=0;b<c.length;b++)a._groups[b].removeCollection(a)}delete a._groups}),this._data.insert(a.find())}return this},h.prototype.removeCollection=function(a){if(a){var b,c=this._collections.indexOf(a);-1!==c&&(a.unChain(this),this._collections.splice(c,1),a._groups=a._groups||[],b=a._groups.indexOf(this),-1!==b&&a._groups.splice(b,1),a.off("drop")),0===this._collections.length&&delete this._primaryKey}return this},h.prototype._chainHandler=function(a){switch(a.type){case"setData":a.data.dataSet=this.decouple(a.data.dataSet),this._data.remove(a.data.oldData),this._data.insert(a.data.dataSet);break;case"insert":a.data.dataSet=this.decouple(a.data.dataSet),this._data.insert(a.data.dataSet);break;case"update":this._data.update(a.data.query,a.data.update,a.options);break;case"remove":this._data.remove(a.data.query,a.options)}},h.prototype.insert=function(){this._collectionsRun("insert",arguments)},h.prototype.update=function(){this._collectionsRun("update",arguments)},h.prototype.updateById=function(){this._collectionsRun("updateById",arguments)},h.prototype.remove=function(){this._collectionsRun("remove",arguments)},h.prototype._collectionsRun=function(a,b){for(var c=0;c<this._collections.length;c++)this._collections[c][a].apply(this._collections[c],b)},h.prototype.find=function(a,b){return this._data.find(a,b)},h.prototype.removeById=function(a){for(var b=0;b<this._collections.length;b++)this._collections[b].removeById(a)},h.prototype.subset=function(a,b){var c=this.find(a,b);return(new g).subsetOf(this).primaryKey(this._primaryKey).setData(c)},h.prototype.drop=function(a){if(!this.isDropped()){var b,c,d;if(this._debug&&console.log(this.logIdentifier()+" Dropping"),this._state="dropped",this._collections&&this._collections.length)for(c=[].concat(this._collections),b=0;b<c.length;b++)this.removeCollection(c[b]);if(this._view&&this._view.length)for(d=[].concat(this._view),b=0;b<d.length;b++)this._removeView(d[b]);this.emit("drop",this),delete this._listeners,a&&a(!1,!0)}return!0},e.prototype.init=function(){this._collectionGroup={},f.apply(this,arguments)},e.prototype.collectionGroup=function(a){var b=this;return a?a instanceof h?a:this._collectionGroup&&this._collectionGroup[a]?this._collectionGroup[a]:(this._collectionGroup[a]=new h(a).db(this),b.emit("create",b._collectionGroup[a],"collectionGroup",a),this._collectionGroup[a]):this._collectionGroup},e.prototype.collectionGroups=function(){var a,b=[];for(a in this._collectionGroup)this._collectionGroup.hasOwnProperty(a)&&b.push({name:a});return b},b.exports=h},{"./Collection":5,"./Shared":39}],7:[function(a,b,c){"use strict";var d,e,f,g,h=[];d=a("./Shared"),g=a("./Overload");var i=function(a){this.init.apply(this,arguments)};i.prototype.init=function(a){this._db={},this._debug={},this._name=a||"ForerunnerDB",h.push(this)},i.prototype.instantiatedCount=function(){return h.length},i.prototype.instances=function(a){return void 0!==a?h[a]:h},i.prototype.namedInstances=function(a){var b,c;{if(void 0===a){for(c=[],b=0;b<h.length;b++)c.push(h[b].name);return c}for(b=0;b<h.length;b++)if(h[b].name===a)return h[b]}},i.prototype.moduleLoaded=new g({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b&&b()}},"array, function":function(a,b){var c,e;for(e=0;e<a.length;e++)if(c=a[e],void 0!==c){c=c.replace(/ /g,"");var f,g=c.split(",");for(f=0;f<g.length;f++)if(!d.modules[g[f]])return!1}b&&b()},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),i.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)?(b&&b(),!0):!1:d.version},i.moduleLoaded=i.prototype.moduleLoaded,i.version=i.prototype.version,i.instances=i.prototype.instances,i.instantiatedCount=i.prototype.instantiatedCount,i.shared=d,i.prototype.shared=d,d.addModule("Core",i),d.mixin(i.prototype,"Mixin.Common"),d.mixin(i.prototype,"Mixin.Constants"),e=a("./Db.js"),f=a("./Metrics.js"),d.synthesize(i.prototype,"name"),d.synthesize(i.prototype,"mongoEmulation"),i.prototype._isServer=!1,i.prototype.isClient=function(){return!this._isServer},i.prototype.isServer=function(){return this._isServer},i.prototype.collection=function(){throw"ForerunnerDB's instantiation has changed since version 1.3.36 to support multiple database instances. Please see the readme.md file for the minor change you have to make to get your project back up and running, or see the issue related to this change at https://github.com/Irrelon/ForerunnerDB/issues/44"},b.exports=i},{"./Db.js":8,"./Metrics.js":17,"./Overload":31,"./Shared":39}],8:[function(a,b,c){"use strict";var d,e,f,g,h,i;d=a("./Shared"),i=a("./Overload");var j=function(a,b){this.init.apply(this,arguments)};j.prototype.init=function(a,b){this.core(b),this._primaryKey="_id",this._name=a,this._collection={},this._debug={}},d.addModule("Db",j),j.prototype.moduleLoaded=new i({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b&&b()}},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),j.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)?(b&&b(),!0):!1:d.version},j.moduleLoaded=j.prototype.moduleLoaded,j.version=j.prototype.version,j.shared=d,j.prototype.shared=d,d.addModule("Db",j),d.mixin(j.prototype,"Mixin.Common"),d.mixin(j.prototype,"Mixin.ChainReactor"),d.mixin(j.prototype,"Mixin.Constants"),d.mixin(j.prototype,"Mixin.Tags"),e=d.modules.Core,f=a("./Collection.js"),g=a("./Metrics.js"),h=a("./Checksum.js"),j.prototype._isServer=!1,d.synthesize(j.prototype,"core"),d.synthesize(j.prototype,"primaryKey"),d.synthesize(j.prototype,"state"),d.synthesize(j.prototype,"name"),d.synthesize(j.prototype,"mongoEmulation"),j.prototype.isClient=function(){return!this._isServer},j.prototype.isServer=function(){return this._isServer},j.prototype.Checksum=h,j.prototype.isClient=function(){return!this._isServer},j.prototype.isServer=function(){return this._isServer},j.prototype.arrayToCollection=function(a){return(new f).setData(a)},j.prototype.on=function(a,b){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||[],this._listeners[a].push(b),this},j.prototype.off=function(a,b){if(a in this._listeners){var c=this._listeners[a],d=c.indexOf(b);d>-1&&c.splice(d,1)}return this},j.prototype.emit=function(a,b){if(this._listeners=this._listeners||{},a in this._listeners){var c,d=this._listeners[a],e=d.length;for(c=0;e>c;c++)d[c].apply(this,Array.prototype.slice.call(arguments,1))}return this},j.prototype.peek=function(a){var b,c,d=[],e=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],d="string"===e?d.concat(c.peek(a)):d.concat(c.find(a)));return d},j.prototype.peek=function(a){var b,c,d=[],e=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],d="string"===e?d.concat(c.peek(a)):d.concat(c.find(a)));return d},j.prototype.peekCat=function(a){var b,c,d,e={},f=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],"string"===f?(d=c.peek(a),d&&d.length&&(e[c.name()]=d)):(d=c.find(a),d&&d.length&&(e[c.name()]=d)));return e},j.prototype.drop=new i({"":function(){if(!this.isDropped()){var a,b=this.collections(),c=b.length;for(this._state="dropped",a=0;c>a;a++)this.collection(b[a].name).drop(),delete this._collection[b[a].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},"function":function(a){if(!this.isDropped()){var b,c=this.collections(),d=c.length,e=0,f=function(){e++,e===d&&a&&a()};for(this._state="dropped",b=0;d>b;b++)this.collection(c[b].name).drop(f),delete this._collection[c[b].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},"boolean":function(a){if(!this.isDropped()){var b,c=this.collections(),d=c.length;for(this._state="dropped",b=0;d>b;b++)this.collection(c[b].name).drop(a),delete this._collection[c[b].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},"boolean, function":function(a,b){if(!this.isDropped()){var c,d=this.collections(),e=d.length,f=0,g=function(){f++,f===e&&b&&b()};for(this._state="dropped",c=0;e>c;c++)this.collection(d[c].name).drop(a,g),delete this._collection[d[c].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0}}),e.prototype.db=function(a){return a instanceof j?a:(a||(a=this.objectId()),this._db[a]=this._db[a]||new j(a,this),this._db[a].mongoEmulation(this.mongoEmulation()),this._db[a])},e.prototype.databases=function(a){var b,c,d,e=[];a&&(a instanceof RegExp||(a=new RegExp(a)));for(d in this._db)this._db.hasOwnProperty(d)&&(c=!0,a&&(a.exec(d)||(c=!1)),c&&(b={name:d,children:[]},this.shared.moduleExists("Collection")&&b.children.push({module:"collection",moduleName:"Collections",count:this._db[d].collections().length}),this.shared.moduleExists("CollectionGroup")&&b.children.push({module:"collectionGroup",moduleName:"Collection Groups",count:this._db[d].collectionGroups().length}),this.shared.moduleExists("Document")&&b.children.push({module:"document",moduleName:"Documents",count:this._db[d].documents().length}),this.shared.moduleExists("Grid")&&b.children.push({module:"grid",moduleName:"Grids",count:this._db[d].grids().length}),this.shared.moduleExists("Overview")&&b.children.push({module:"overview",moduleName:"Overviews",count:this._db[d].overviews().length}),this.shared.moduleExists("View")&&b.children.push({module:"view",moduleName:"Views",count:this._db[d].views().length}),e.push(b)));return e.sort(function(a,b){return a.name.localeCompare(b.name)}),e},d.finishModule("Db"),b.exports=j},{"./Checksum.js":4,"./Collection.js":5,"./Metrics.js":17,"./Overload":31,"./Shared":39}],9:[function(a,b,c){"use strict";var d,e,f;d=a("./Shared");var g=function(){this.init.apply(this,arguments)};g.prototype.init=function(a){this._name=a,this._data={}},d.addModule("Document",g),d.mixin(g.prototype,"Mixin.Common"),d.mixin(g.prototype,"Mixin.Events"),d.mixin(g.prototype,"Mixin.ChainReactor"),d.mixin(g.prototype,"Mixin.Constants"),d.mixin(g.prototype,"Mixin.Triggers"),d.mixin(g.prototype,"Mixin.Matching"),d.mixin(g.prototype,"Mixin.Updating"),d.mixin(g.prototype,"Mixin.Tags"),e=a("./Collection"),f=d.modules.Db,d.synthesize(g.prototype,"state"),d.synthesize(g.prototype,"db"),d.synthesize(g.prototype,"name"),g.prototype.setData=function(a,b){var c,d;if(a){if(b=b||{$decouple:!0},b&&b.$decouple===!0&&(a=this.decouple(a)),this._linked){d={};for(c in this._data)"jQuery"!==c.substr(0,6)&&this._data.hasOwnProperty(c)&&void 0===a[c]&&(d[c]=1);a.$unset=d,this.updateObject(this._data,a,{})}else this._data=a;this.deferEmit("change",{type:"setData",data:this.decouple(this._data)})}return this},g.prototype.find=function(a,b){var c;return c=b&&b.$decouple===!1?this._data:this.decouple(this._data)},g.prototype.update=function(a,b,c){var d=this.updateObject(this._data,b,a,c);d&&this.deferEmit("change",{type:"update",data:this.decouple(this._data)})},g.prototype.updateObject=e.prototype.updateObject,g.prototype._isPositionalKey=function(a){return".$"===a.substr(a.length-2,2)},g.prototype._updateProperty=function(a,b,c){this._linked?(window.jQuery.observable(a).setProperty(b,c),this.debug()&&console.log(this.logIdentifier()+' Setting data-bound document property "'+b+'"')):(a[b]=c,this.debug()&&console.log(this.logIdentifier()+' Setting non-data-bound document property "'+b+'" to val "'+c+'"'))},g.prototype._updateIncrement=function(a,b,c){this._linked?window.jQuery.observable(a).setProperty(b,a[b]+c):a[b]+=c},g.prototype._updateSpliceMove=function(a,b,c){this._linked?(window.jQuery.observable(a).move(b,c),this.debug()&&console.log(this.logIdentifier()+' Moving data-bound document array index from "'+b+'" to "'+c+'"')):(a.splice(c,0,a.splice(b,1)[0]),this.debug()&&console.log(this.logIdentifier()+' Moving non-data-bound document array index from "'+b+'" to "'+c+'"'))},g.prototype._updateSplicePush=function(a,b,c){a.length>b?this._linked?window.jQuery.observable(a).insert(b,c):a.splice(b,0,c):this._linked?window.jQuery.observable(a).insert(c):a.push(c)},g.prototype._updatePush=function(a,b){this._linked?window.jQuery.observable(a).insert(b):a.push(b)},g.prototype._updatePull=function(a,b){this._linked?window.jQuery.observable(a).remove(b):a.splice(b,1)},g.prototype._updateMultiply=function(a,b,c){this._linked?window.jQuery.observable(a).setProperty(b,a[b]*c):a[b]*=c},g.prototype._updateRename=function(a,b,c){var d=a[b];this._linked?(window.jQuery.observable(a).setProperty(c,d),window.jQuery.observable(a).removeProperty(b)):(a[c]=d,delete a[b])},g.prototype._updateUnset=function(a,b){this._linked?window.jQuery.observable(a).removeProperty(b):delete a[b]},g.prototype.drop=function(a){return this.isDropped()?!0:this._db&&this._name&&this._db&&this._db._document&&this._db._document[this._name]?(this._state="dropped",delete this._db._document[this._name],delete this._data,this.emit("drop",this),a&&a(!1,!0),delete this._listeners,!0):!1},f.prototype.document=function(a){var b=this;if(a){if(a instanceof g){if("droppped"!==a.state())return a;a=a.name()}return this._document&&this._document[a]?this._document[a]:(this._document=this._document||{},this._document[a]=new g(a).db(this),b.emit("create",b._document[a],"document",a),this._document[a])}return this._document},f.prototype.documents=function(){var a,b,c=[];for(b in this._document)this._document.hasOwnProperty(b)&&(a=this._document[b],c.push({name:b,linked:void 0!==a.isLinked?a.isLinked():!1}));return c},d.finishModule("Document"),b.exports=g},{"./Collection":5,"./Shared":39}],10:[function(a,b,c){"use strict";var d,e,f,g;d=[16,8,4,2,1],e="0123456789bcdefghjkmnpqrstuvwxyz",f={right:{even:"bc01fg45238967deuvhjyznpkmstqrwx"},left:{even:"238967debc01fg45kmstqrwxuvhjyznp"},top:{even:"p0r21436x8zb9dcf5h7kjnmqesgutwvy"},bottom:{even:"14365h7k9dcfesgujnmqp0r2twvyx8zb"}},g={right:{even:"bcfguvyz"},left:{even:"0145hjnp"},top:{even:"prxz"},bottom:{even:"028b"}},f.bottom.odd=f.left.even,f.top.odd=f.right.even,f.left.odd=f.bottom.even,f.right.odd=f.top.even,g.bottom.odd=g.left.even,g.top.odd=g.right.even,g.left.odd=g.bottom.even,g.right.odd=g.top.even;var h=function(){};h.prototype.refineInterval=function(a,b,c){b&c?a[0]=(a[0]+a[1])/2:a[1]=(a[0]+a[1])/2},h.prototype.calculateNeighbours=function(a,b){var c;return b&&"object"!==b.type?(c=[],c[4]=a,c[3]=this.calculateAdjacent(a,"left"),c[5]=this.calculateAdjacent(a,"right"),c[1]=this.calculateAdjacent(a,"top"),c[7]=this.calculateAdjacent(a,"bottom"),c[0]=this.calculateAdjacent(c[3],"top"),c[2]=this.calculateAdjacent(c[5],"top"),c[6]=this.calculateAdjacent(c[3],"bottom"),c[8]=this.calculateAdjacent(c[5],"bottom")):(c={center:a,left:this.calculateAdjacent(a,"left"),right:this.calculateAdjacent(a,"right"),top:this.calculateAdjacent(a,"top"),bottom:this.calculateAdjacent(a,"bottom")},c.topLeft=this.calculateAdjacent(c.left,"top"),c.topRight=this.calculateAdjacent(c.right,"top"),c.bottomLeft=this.calculateAdjacent(c.left,"bottom"),c.bottomRight=this.calculateAdjacent(c.right,"bottom")),c},h.prototype.calculateAdjacent=function(a,b){a=a.toLowerCase();var c=a.charAt(a.length-1),d=a.length%2?"odd":"even",h=a.substring(0,a.length-1);return-1!==g[b][d].indexOf(c)&&(h=this.calculateAdjacent(h,b)),h+e[f[b][d].indexOf(c)]},h.prototype.decode=function(a){var b,c,f,g,h,i,j,k=1,l=[],m=[];for(l[0]=-90,l[1]=90,m[0]=-180,m[1]=180,i=90,j=180,b=0;b<a.length;b++)for(c=a[b],f=e.indexOf(c),g=0;5>g;g++)h=d[g],k?(j/=2,this.refineInterval(m,f,h)):(i/=2,this.refineInterval(l,f,h)),k=!k;return l[2]=(l[0]+l[1])/2,m[2]=(m[0]+m[1])/2,{latitude:l,longitude:m}},h.prototype.encode=function(a,b,c){var f,g=1,h=[],i=[],j=0,k=0,l="";for(c||(c=12),h[0]=-90,h[1]=90,i[0]=-180,i[1]=180;l.length<c;)g?(f=(i[0]+i[1])/2,b>f?(k|=d[j],i[0]=f):i[1]=f):(f=(h[0]+h[1])/2,a>f?(k|=d[j],h[0]=f):h[1]=f),g=!g,4>j?j++:(l+=e[k],j=0,k=0);return l},b.exports=h},{}],11:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k;d=a("./Shared");var l=function(a,b,c){this.init.apply(this,arguments)};l.prototype.init=function(a,b,c){var d=this;this._selector=a,this._template=b,this._options=c||{},this._debug={},this._id=this.objectId(),this._collectionDroppedWrap=function(){d._collectionDropped.apply(d,arguments)}},d.addModule("Grid",l),d.mixin(l.prototype,"Mixin.Common"),d.mixin(l.prototype,"Mixin.ChainReactor"),d.mixin(l.prototype,"Mixin.Constants"),d.mixin(l.prototype,"Mixin.Triggers"),d.mixin(l.prototype,"Mixin.Events"),d.mixin(l.prototype,"Mixin.Tags"),f=a("./Collection"),g=a("./CollectionGroup"),h=a("./View"),k=a("./ReactorIO"),i=f.prototype.init,e=d.modules.Db,j=e.prototype.init,d.synthesize(l.prototype,"state"),d.synthesize(l.prototype,"name"),l.prototype.insert=function(){this._from.insert.apply(this._from,arguments)},l.prototype.update=function(){this._from.update.apply(this._from,arguments)},l.prototype.updateById=function(){this._from.updateById.apply(this._from,arguments)},l.prototype.remove=function(){this._from.remove.apply(this._from,arguments)},l.prototype.from=function(a){return void 0!==a&&(this._from&&(this._from.off("drop",this._collectionDroppedWrap),this._from._removeGrid(this)),"string"==typeof a&&(a=this._db.collection(a)),this._from=a,this._from.on("drop",this._collectionDroppedWrap),this.refresh()),this},d.synthesize(l.prototype,"db",function(a){return a&&this.debug(a.debug()),this.$super.apply(this,arguments)}),l.prototype._collectionDropped=function(a){a&&delete this._from},l.prototype.drop=function(a){return this.isDropped()?!0:this._from?(this._from.unlink(this._selector,this.template()),this._from.off("drop",this._collectionDroppedWrap),this._from._removeGrid(this),(this.debug()||this._db&&this._db.debug())&&console.log(this.logIdentifier()+" Dropping grid "+this._selector),this._state="dropped",this._db&&this._selector&&delete this._db._grid[this._selector],this.emit("drop",this),a&&a(!1,!0),delete this._selector,delete this._template,delete this._from,delete this._db,delete this._listeners,!0):!1},l.prototype.template=function(a){return void 0!==a?(this._template=a,this):this._template},l.prototype._sortGridClick=function(a){var b,c=window.jQuery(a.currentTarget),e=c.attr("data-grid-sort")||"",f=-1===parseInt(c.attr("data-grid-dir")||"-1",10)?1:-1,g=e.split(","),h={};for(window.jQuery(this._selector).find("[data-grid-dir]").removeAttr("data-grid-dir"),c.attr("data-grid-dir",f),b=0;b<g.length;b++)h[g]=f;d.mixin(h,this._options.$orderBy),this._from.orderBy(h),this.emit("sort",h)},l.prototype.refresh=function(){if(this._from){if(!this._from.link)throw"Grid requires the AutoBind module in order to operate!";var a=this,b=window.jQuery(this._selector),c=function(){a._sortGridClick.apply(a,arguments)};if(b.html(""),a._from.orderBy&&b.off("click","[data-grid-sort]",c),a._from.query&&b.off("click","[data-grid-filter]",c),a._options.$wrap=a._options.$wrap||"gridRow",a._from.link(a._selector,a.template(),a._options),a._from.orderBy&&b.on("click","[data-grid-sort]",c),a._from.query){var d={};b.find("[data-grid-filter]").each(function(c,e){e=window.jQuery(e);var f,g,h,i,j=e.attr("data-grid-filter"),k=e.attr("data-grid-vartype"),l={},m=e.html(),n=a._db.view("tmpGridFilter_"+a._id+"_"+j);l[j]=1,i={$distinct:l},n.query(i).orderBy(l).from(a._from._from),h=['<div class="dropdown" id="'+a._id+"_"+j+'">','<button class="btn btn-default dropdown-toggle" type="button" id="'+a._id+"_"+j+'_dropdownButton" data-toggle="dropdown" aria-expanded="true">',m+' <span class="caret"></span>',"</button>","</div>"],f=window.jQuery(h.join("")),g=window.jQuery('<ul class="dropdown-menu" role="menu" id="'+a._id+"_"+j+'_dropdownMenu"></ul>'),f.append(g),e.html(f),n.link(g,{template:['<li role="presentation" class="input-group" style="width: 240px; padding-left: 10px; padding-right: 10px; padding-top: 5px;">','<input type="search" class="form-control gridFilterSearch" placeholder="Search...">','<span class="input-group-btn">','<button class="btn btn-default gridFilterClearSearch" type="button"><span class="glyphicon glyphicon-remove-circle glyphicons glyphicons-remove"></span></button>',"</span>","</li>",'<li role="presentation" class="divider"></li>','<li role="presentation" data-val="$all">','<a role="menuitem" tabindex="-1">','<input type="checkbox" checked>&nbsp;All',"</a>","</li>",'<li role="presentation" class="divider"></li>',"{^{for options}}",'<li role="presentation" data-link="data-val{:'+j+'}">','<a role="menuitem" tabindex="-1">','<input type="checkbox">&nbsp;{^{:'+j+"}}","</a>","</li>","{{/for}}"].join("")},{$wrap:"options"}),b.on("keyup","#"+a._id+"_"+j+"_dropdownMenu .gridFilterSearch",function(a){var b=window.jQuery(this),c=n.query(),d=b.val();d?c[j]=new RegExp(d,"gi"):delete c[j],n.query(c)}),b.on("click","#"+a._id+"_"+j+"_dropdownMenu .gridFilterClearSearch",function(a){window.jQuery(this).parents("li").find(".gridFilterSearch").val("");var b=n.query();delete b[j],n.query(b)}),b.on("click","#"+a._id+"_"+j+"_dropdownMenu li",function(b){b.stopPropagation();var c,e,f,g,h,i=$(this),l=i.find('input[type="checkbox"]'),m=!0; if(window.jQuery(b.target).is("input")?(l.prop("checked",l.prop("checked")),e=l.is(":checked")):(l.prop("checked",!l.prop("checked")),e=l.is(":checked")),g=window.jQuery(this),c=g.attr("data-val"),"$all"===c)delete d[j],g.parent().find('li[data-val!="$all"]').find('input[type="checkbox"]').prop("checked",!1);else{switch(g.parent().find('[data-val="$all"]').find('input[type="checkbox"]').prop("checked",!1),k){case"integer":c=parseInt(c,10);break;case"float":c=parseFloat(c)}for(d[j]=d[j]||{$in:[]},f=d[j].$in,h=0;h<f.length;h++)if(f[h]===c){e===!1&&f.splice(h,1),m=!1;break}m&&e&&f.push(c),f.length||delete d[j]}a._from.queryData(d),a._from.pageFirst&&a._from.pageFirst()})})}a.emit("refresh")}return this},l.prototype.count=function(){return this._from.count()},f.prototype.grid=h.prototype.grid=function(a,b,c){if(this._db&&this._db._grid){if(void 0!==a){if(void 0!==b){if(this._db._grid[a])throw this.logIdentifier()+" Cannot create a grid because a grid with this name already exists: "+a;var d=new l(a,b,c).db(this._db).from(this);return this._grid=this._grid||[],this._grid.push(d),this._db._grid[a]=d,d}return this._db._grid[a]}return this._db._grid}},f.prototype.unGrid=h.prototype.unGrid=function(a,b,c){var d,e;if(this._db&&this._db._grid){if(a&&b){if(this._db._grid[a])return e=this._db._grid[a],delete this._db._grid[a],e.drop();throw this.logIdentifier()+" Cannot remove grid because a grid with this name does not exist: "+name}for(d in this._db._grid)this._db._grid.hasOwnProperty(d)&&(e=this._db._grid[d],delete this._db._grid[d],e.drop(),this.debug()&&console.log(this.logIdentifier()+' Removed grid binding "'+d+'"'));this._db._grid={}}},f.prototype._addGrid=g.prototype._addGrid=h.prototype._addGrid=function(a){return void 0!==a&&(this._grid=this._grid||[],this._grid.push(a)),this},f.prototype._removeGrid=g.prototype._removeGrid=h.prototype._removeGrid=function(a){if(void 0!==a&&this._grid){var b=this._grid.indexOf(a);b>-1&&this._grid.splice(b,1)}return this},e.prototype.init=function(){this._grid={},j.apply(this,arguments)},e.prototype.gridExists=function(a){return Boolean(this._grid[a])},e.prototype.grid=function(a,b,c){return this._grid[a]||(this.debug()||this._db&&this._db.debug())&&console.log(this.logIdentifier()+" Creating grid "+a),this._grid[a]=this._grid[a]||new l(a,b,c).db(this),this._grid[a]},e.prototype.unGrid=function(a,b,c){return this._grid[a]||(this.debug()||this._db&&this._db.debug())&&console.log(this.logIdentifier()+" Creating grid "+a),this._grid[a]=this._grid[a]||new l(a,b,c).db(this),this._grid[a]},e.prototype.grids=function(){var a,b,c=[];for(b in this._grid)this._grid.hasOwnProperty(b)&&(a=this._grid[b],c.push({name:b,count:a.count(),linked:void 0!==a.isLinked?a.isLinked():!1}));return c},d.finishModule("Grid"),b.exports=l},{"./Collection":5,"./CollectionGroup":6,"./ReactorIO":37,"./Shared":39,"./View":40}],12:[function(a,b,c){"use strict";var d,e,f,g;d=a("./Shared"),g=a("./Overload");var h=function(a,b){this.init.apply(this,arguments)};h.prototype.init=function(a,b){if(this._options=b,this._selector=window.jQuery(this._options.selector),!this._selector[0])throw this.classIdentifier()+' "'+a.name()+'": Chart target element does not exist via selector: '+this._options.selector;this._listeners={},this._collection=a,this._options.series=[],b.chartOptions=b.chartOptions||{},b.chartOptions.credits=!1;var c,d,e;switch(this._options.type){case"pie":this._selector.highcharts(this._options.chartOptions),this._chart=this._selector.highcharts(),c=this._collection.find(),d={allowPointSelect:!0,cursor:"pointer",dataLabels:{enabled:!0,format:"<b>{point.name}</b>: {y} ({point.percentage:.0f}%)",style:{color:window.Highcharts.theme&&window.Highcharts.theme.contrastTextColor||"black"}}},e=this.pieDataFromCollectionData(c,this._options.keyField,this._options.valField),window.jQuery.extend(d,this._options.seriesOptions),window.jQuery.extend(d,{name:this._options.seriesName,data:e}),this._chart.addSeries(d,!0,!0);break;case"line":case"area":case"column":case"bar":e=this.seriesDataFromCollectionData(this._options.seriesField,this._options.keyField,this._options.valField,this._options.orderBy,this._options),this._options.chartOptions.xAxis=e.xAxis,this._options.chartOptions.series=e.series,this._selector.highcharts(this._options.chartOptions),this._chart=this._selector.highcharts();break;default:throw this.classIdentifier()+' "'+a.name()+'": Chart type specified is not currently supported by ForerunnerDB: '+this._options.type}this._hookEvents()},d.addModule("Highchart",h),e=d.modules.Collection,f=e.prototype.init,d.mixin(h.prototype,"Mixin.Common"),d.mixin(h.prototype,"Mixin.Events"),d.synthesize(h.prototype,"state"),h.prototype.pieDataFromCollectionData=function(a,b,c){var d,e=[];for(d=0;d<a.length;d++)e.push([a[d][b],a[d][c]]);return e},h.prototype.seriesDataFromCollectionData=function(a,b,c,d,e){var f,g,h,i,j,k,l,m=this._collection.distinct(a),n=[],o=e&&e.chartOptions&&e.chartOptions.xAxis?e.chartOptions.xAxis:{categories:[]};for(k=0;k<m.length;k++){for(f=m[k],g={},g[a]=f,i=[],h=this._collection.find(g,{orderBy:d}),l=0;l<h.length;l++)o.categories?(o.categories.push(h[l][b]),i.push(h[l][c])):i.push([h[l][b],h[l][c]]);if(j={name:f,data:i},e.seriesOptions)for(l in e.seriesOptions)e.seriesOptions.hasOwnProperty(l)&&(j[l]=e.seriesOptions[l]);n.push(j)}return{xAxis:o,series:n}},h.prototype._hookEvents=function(){var a=this;a._collection.on("change",function(){a._changeListener.apply(a,arguments)}),a._collection.on("drop",function(){a.drop.apply(a)})},h.prototype._changeListener=function(){var a=this;if("undefined"!=typeof a._collection&&a._chart){var b,c=a._collection.find();switch(a._options.type){case"pie":a._chart.series[0].setData(a.pieDataFromCollectionData(c,a._options.keyField,a._options.valField),!0,!0);break;case"bar":case"line":case"area":case"column":var d=a.seriesDataFromCollectionData(a._options.seriesField,a._options.keyField,a._options.valField,a._options.orderBy,a._options);for(d.xAxis.categories&&a._chart.xAxis[0].setCategories(d.xAxis.categories),b=0;b<d.series.length;b++)a._chart.series[b]?a._chart.series[b].setData(d.series[b].data,!0,!0):a._chart.addSeries(d.series[b],!0,!0)}}},h.prototype.drop=function(a){return this.isDropped()?!0:(this._state="dropped",this._chart&&this._chart.destroy(),this._collection&&(this._collection.off("change",this._changeListener),this._collection.off("drop",this.drop),this._collection._highcharts&&delete this._collection._highcharts[this._options.selector]),delete this._chart,delete this._options,delete this._collection,this.emit("drop",this),a&&a(!1,!0),delete this._listeners,!0)},e.prototype.init=function(){this._highcharts={},f.apply(this,arguments)},e.prototype.pieChart=new g({object:function(a){return a.type="pie",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="pie",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.selector=a,e.keyField=b,e.valField=c,e.seriesName=d,this.pieChart(e)}}),e.prototype.lineChart=new g({string:function(a){return this._highcharts[a]},object:function(a){return a.type="line",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="line",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.seriesField=b,e.selector=a,e.keyField=c,e.valField=d,this.lineChart(e)}}),e.prototype.areaChart=new g({object:function(a){return a.type="area",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="area",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.seriesField=b,e.selector=a,e.keyField=c,e.valField=d,this.areaChart(e)}}),e.prototype.columnChart=new g({object:function(a){return a.type="column",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="column",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.seriesField=b,e.selector=a,e.keyField=c,e.valField=d,this.columnChart(e)}}),e.prototype.barChart=new g({object:function(a){return a.type="bar",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="bar",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.seriesField=b,e.selector=a,e.keyField=c,e.valField=d,this.barChart(e)}}),e.prototype.stackedBarChart=new g({object:function(a){return a.type="bar",a.chartOptions=a.chartOptions||{},a.chartOptions.chart=a.chartOptions.chart||{},a.chartOptions.chart.type="bar",a.plotOptions=a.plotOptions||{},a.plotOptions.series=a.plotOptions.series||{},a.plotOptions.series.stacking=a.plotOptions.series.stacking||"normal",this._highcharts[a.selector]||(this._highcharts[a.selector]=new h(this,a)),this._highcharts[a.selector]},"*, string, string, string, ...":function(a,b,c,d,e){e=e||{},e.seriesField=b,e.selector=a,e.keyField=c,e.valField=d,this.stackedBarChart(e)}}),e.prototype.dropChart=function(a){this._highcharts&&this._highcharts[a]&&this._highcharts[a].drop()},d.finishModule("Highchart"),b.exports=h},{"./Overload":31,"./Shared":39}],13:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=a("./BinaryTree"),g=a("./GeoHash"),h=new e,i=new g,j=[5e3,1250,156,39.1,4.89,1.22,.153,.0382,.00477,.00119,149e-6,372e-7],k=function(){this.init.apply(this,arguments)};k.prototype.init=function(a,b,c){this._btree=new f,this._btree.index(a),this._size=0,this._id=this._itemKeyHash(a,a),this._debug=b&&b.debug?b.debug:!1,this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&(this.collection(c),this._btree.primaryKey(c.primaryKey())),this.name(b&&b.name?b.name:this._id),this._btree.debug(this._debug)},d.addModule("Index2d",k),d.mixin(k.prototype,"Mixin.Common"),d.mixin(k.prototype,"Mixin.ChainReactor"),d.mixin(k.prototype,"Mixin.Sorting"),k.prototype.id=function(){return this._id},k.prototype.state=function(){return this._state},k.prototype.size=function(){return this._size},d.synthesize(k.prototype,"data"),d.synthesize(k.prototype,"name"),d.synthesize(k.prototype,"collection"),d.synthesize(k.prototype,"type"),d.synthesize(k.prototype,"unique"),k.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=h.parse(this._keys).length,this):this._keys},k.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._btree.clear(),this._size=0,this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},k.prototype.insert=function(a,b){var c,d=this._unique;a=this.decouple(a),d&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a);var e,f,g,j,k,l=this._btree.keys();for(k=0;k<l.length;k++)e=h.get(a,l[k].path),e instanceof Array&&(g=e[0],j=e[1],f=i.encode(g,j),h.set(a,l[k].path,f));return this._btree.insert(a)?(this._size++,!0):!1},k.prototype.remove=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),this._btree.remove(a)?(this._size--,!0):!1},k.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},k.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},k.prototype.lookup=function(a,b){var c,d,e,f,g=this._btree.keys();for(f=0;f<g.length;f++)if(c=g[f].path,d=h.get(a,c),"object"==typeof d)return d.$near&&(e=[],e=e.concat(this.near(c,d.$near,b))),d.$geoWithin&&(e=[],e=e.concat(this.geoWithin(c,d.$geoWithin,b))),e;return this._btree.lookup(a,b)},k.prototype.near=function(a,b,c){var d,e,f,g,k,l,m,n,o,p,q,r=this,s=[],t=this._collection.primaryKey();if("km"===b.$distanceUnits){for(m=b.$maxDistance,q=0;q<j.length;q++)if(m>j[q]){l=q;break}0===l&&(l=1)}else if("miles"===b.$distanceUnits){for(m=1.60934*b.$maxDistance,q=0;q<j.length;q++)if(m>j[q]){l=q;break}0===l&&(l=1)}for(d=i.encode(b.$point[0],b.$point[1],l),e=i.calculateNeighbours(d,{type:"array"}),k=[],f=0,q=0;9>q;q++)g=this._btree.startsWith(a,e[q]),f+=g._visited,k=k.concat(g);if(k=this._collection._primaryIndex.lookup(k),k.length){for(n={},q=0;q<k.length;q++)p=h.get(k[q],a),o=n[k[q][t]]=this.distanceBetweenPoints(b.$point[0],b.$point[1],p[0],p[1]),m>=o&&s.push(k[q]);s.sort(function(a,b){return r.sortAsc(n[a[t]],n[b[t]])})}return s},k.prototype.geoWithin=function(a,b,c){return[]},k.prototype.distanceBetweenPoints=function(a,b,c,d){var e=6371,f=this.toRadians(a),g=this.toRadians(c),h=this.toRadians(c-a),i=this.toRadians(d-b),j=Math.sin(h/2)*Math.sin(h/2)+Math.cos(f)*Math.cos(g)*Math.sin(i/2)*Math.sin(i/2),k=2*Math.atan2(Math.sqrt(j),Math.sqrt(1-j));return e*k},k.prototype.toRadians=function(a){return.01747722222222*a},k.prototype.match=function(a,b){return this._btree.match(a,b)},k.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},k.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},k.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.index["2d"]=k,d.finishModule("Index2d"),b.exports=k},{"./BinaryTree":3,"./GeoHash":10,"./Path":33,"./Shared":39}],14:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=a("./BinaryTree"),g=function(){this.init.apply(this,arguments)};g.prototype.init=function(a,b,c){this._btree=new f,this._btree.index(a),this._size=0,this._id=this._itemKeyHash(a,a),this._debug=b&&b.debug?b.debug:!1,this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&(this.collection(c),this._btree.primaryKey(c.primaryKey())),this.name(b&&b.name?b.name:this._id),this._btree.debug(this._debug)},d.addModule("IndexBinaryTree",g),d.mixin(g.prototype,"Mixin.ChainReactor"),d.mixin(g.prototype,"Mixin.Sorting"),g.prototype.id=function(){return this._id},g.prototype.state=function(){return this._state},g.prototype.size=function(){return this._size},d.synthesize(g.prototype,"data"),d.synthesize(g.prototype,"name"),d.synthesize(g.prototype,"collection"),d.synthesize(g.prototype,"type"),d.synthesize(g.prototype,"unique"),g.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},g.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._btree.clear(),this._size=0,this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},g.prototype.insert=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),this._btree.insert(a)?(this._size++,!0):!1},g.prototype.remove=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),this._btree.remove(a)?(this._size--,!0):!1},g.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},g.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},g.prototype.lookup=function(a,b){return this._btree.lookup(a,b)},g.prototype.match=function(a,b){return this._btree.match(a,b)},g.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},g.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},g.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.index.btree=g,d.finishModule("IndexBinaryTree"),b.exports=g},{"./BinaryTree":3,"./Path":33,"./Shared":39}],15:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a,b,c){this._crossRef={},this._size=0,this._id=this._itemKeyHash(a,a),this.data({}),this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&this.collection(c),this.name(b&&b.name?b.name:this._id)},d.addModule("IndexHashMap",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.id=function(){return this._id},f.prototype.state=function(){return this._state},f.prototype.size=function(){return this._size},d.synthesize(f.prototype,"data"),d.synthesize(f.prototype,"name"),d.synthesize(f.prototype,"collection"),d.synthesize(f.prototype,"type"),d.synthesize(f.prototype,"unique"),f.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},f.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._data={},this._size=0,this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},f.prototype.insert=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pushToPathValue(d[e],a)},f.prototype.update=function(a,b){},f.prototype.remove=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pullFromPathValue(d[e],a)},f.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},f.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},f.prototype.pushToPathValue=function(a,b){var c=this._data[a]=this._data[a]||[];-1===c.indexOf(b)&&(c.push(b),this._size++,this.pushToCrossRef(b,c))},f.prototype.pullFromPathValue=function(a,b){var c,d=this._data[a];c=d.indexOf(b),c>-1&&(d.splice(c,1),this._size--,this.pullFromCrossRef(b,d)),d.length||delete this._data[a]},f.prototype.pull=function(a){var b,c,d=a[this._collection.primaryKey()],e=this._crossRef[d],f=e.length;for(b=0;f>b;b++)c=e[b],this._pullFromArray(c,a);this._size--,delete this._crossRef[d]},f.prototype._pullFromArray=function(a,b){for(var c=a.length;c--;)a[c]===b&&a.splice(c,1)},f.prototype.pushToCrossRef=function(a,b){var c,d=a[this._collection.primaryKey()];this._crossRef[d]=this._crossRef[d]||[],c=this._crossRef[d],-1===c.indexOf(b)&&c.push(b)},f.prototype.pullFromCrossRef=function(a,b){var c=a[this._collection.primaryKey()];delete this._crossRef[c]},f.prototype.lookup=function(a){return this._data[this._itemHash(a,this._keys)]||[]},f.prototype.match=function(a,b){var c,d=new e,f=d.parseArr(this._keys),g=d.parseArr(a),h=[],i=0;for(c=0;c<f.length;c++){if(g[c]!==f[c])return{matchedKeys:[],totalKeyCount:g.length,score:0};i++,h.push(g[c])}return{matchedKeys:h,totalKeyCount:g.length,score:i}},f.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},f.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},f.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.index.hashed=f,d.finishModule("IndexHashMap"),b.exports=f},{"./Path":33,"./Shared":39}],16:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){this.init.apply(this,arguments)};e.prototype.init=function(a){this._name=a,this._data={},this._primaryKey="_id"},d.addModule("KeyValueStore",e),d.mixin(e.prototype,"Mixin.ChainReactor"),d.synthesize(e.prototype,"name"),e.prototype.primaryKey=function(a){return void 0!==a?(this._primaryKey=a,this):this._primaryKey},e.prototype.truncate=function(){return this._data={},this},e.prototype.set=function(a,b){return this._data[a]=b?b:!0,this},e.prototype.get=function(a){return this._data[a]},e.prototype.lookup=function(a){var b,c,d,e=this._primaryKey,f=typeof a,g=[];if("string"===f||"number"===f)return d=this.get(a),void 0!==d?[d]:[];if("object"===f){if(a instanceof Array){for(c=a.length,g=[],b=0;c>b;b++)d=this.lookup(a[b]),d&&(d instanceof Array?g=g.concat(d):g.push(d));return g}if(a[e])return this.lookup(a[e])}},e.prototype.unSet=function(a){return delete this._data[a],this},e.prototype.uniqueSet=function(a,b){return void 0===this._data[a]?(this._data[a]=b,!0):!1},d.finishModule("KeyValueStore"),b.exports=e},{"./Shared":39}],17:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Operation"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(){this._data=[]},d.addModule("Metrics",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.create=function(a){var b=new e(a);return this._enabled&&this._data.push(b),b},f.prototype.start=function(){return this._enabled=!0,this},f.prototype.stop=function(){return this._enabled=!1,this},f.prototype.clear=function(){return this._data=[],this},f.prototype.list=function(){return this._data},d.finishModule("Metrics"),b.exports=f},{"./Operation":30,"./Shared":39}],18:[function(a,b,c){"use strict";var d={preSetData:function(){},postSetData:function(){}};b.exports=d},{}],19:[function(a,b,c){"use strict";var d={chain:function(a){this.debug&&this.debug()&&(a._reactorIn&&a._reactorOut?console.log(a._reactorIn.logIdentifier()+' Adding target "'+a._reactorOut.instanceIdentifier()+'" to the chain reactor target list'):console.log(this.logIdentifier()+' Adding target "'+a.instanceIdentifier()+'" to the chain reactor target list')),this._chain=this._chain||[];var b=this._chain.indexOf(a);-1===b&&this._chain.push(a)},unChain:function(a){if(this.debug&&this.debug()&&(a._reactorIn&&a._reactorOut?console.log(a._reactorIn.logIdentifier()+' Removing target "'+a._reactorOut.instanceIdentifier()+'" from the chain reactor target list'):console.log(this.logIdentifier()+' Removing target "'+a.instanceIdentifier()+'" from the chain reactor target list')),this._chain){var b=this._chain.indexOf(a);b>-1&&this._chain.splice(b,1)}},chainWillSend:function(){return Boolean(this._chain)},chainSend:function(a,b,c){if(this._chain){var d,e,f=this._chain,g=f.length,h=this.decouple(b,g);for(e=0;g>e;e++){if(d=f[e],d._state&&(!d._state||d.isDropped()))throw console.log("Reactor Data:",a,b,c),console.log("Reactor Node:",d),"Chain reactor attempting to send data to target reactor node that is in a dropped state!";this.debug&&this.debug()&&(d._reactorIn&&d._reactorOut?console.log(d._reactorIn.logIdentifier()+' Sending data down the chain reactor pipe to "'+d._reactorOut.instanceIdentifier()+'"'):console.log(this.logIdentifier()+' Sending data down the chain reactor pipe to "'+d.instanceIdentifier()+'"')),d.chainReceive&&d.chainReceive(this,a,h[e],c)}}},chainReceive:function(a,b,c,d){var e={sender:a,type:b,data:c,options:d},f=!1;this.debug&&this.debug()&&console.log(this.logIdentifier()+" Received data from parent reactor node"),this._chainHandler&&(f=this._chainHandler(e)),f||this.chainSend(e.type,e.data,e.options)}};b.exports=d},{}],20:[function(a,b,c){"use strict";var d,e=0,f=a("./Overload"),g=a("./Serialiser"),h=new g;d={serialiser:h,make:function(a){return h.convert(a)},store:function(a,b){if(void 0!==a){if(void 0!==b)return this._store=this._store||{},this._store[a]=b,this;if(this._store)return this._store[a]}},unStore:function(a){return void 0!==a&&delete this._store[a],this},decouple:function(a,b){if(void 0!==a&&""!==a){if(b){var c,d=this.jStringify(a),e=[];for(c=0;b>c;c++)e.push(this.jParse(d));return e}return this.jParse(this.jStringify(a))}},jParse:function(a){return JSON.parse(a,h.reviver())},jStringify:function(a){return JSON.stringify(a)},objectId:function(a){var b,c=Math.pow(10,17);if(a){var d,f=0,g=a.length;for(d=0;g>d;d++)f+=a.charCodeAt(d)*c;b=f.toString(16)}else e++,b=(e+(Math.random()*c+Math.random()*c+Math.random()*c+Math.random()*c)).toString(16);return b},hash:function(a){return JSON.stringify(a)},debug:new f([function(){return this._debug&&this._debug.all},function(a){return void 0!==a?"boolean"==typeof a?(this._debug=this._debug||{},this._debug.all=a,this.chainSend("debug",this._debug),this):this._debug&&this._debug[a]||this._db&&this._db._debug&&this._db._debug[a]||this._debug&&this._debug.all:this._debug&&this._debug.all},function(a,b){return void 0!==a?void 0!==b?(this._debug=this._debug||{},this._debug[a]=b,this.chainSend("debug",this._debug),this):this._debug&&this._debug[b]||this._db&&this._db._debug&&this._db._debug[a]:this._debug&&this._debug.all}]),classIdentifier:function(){return"ForerunnerDB."+this.className},instanceIdentifier:function(){return"["+this.className+"]"+this.name()},logIdentifier:function(){return"ForerunnerDB "+this.instanceIdentifier()},convertToFdb:function(a){var b,c,d,e;for(e in a)if(a.hasOwnProperty(e)&&(d=a,e.indexOf(".")>-1)){for(e=e.replace(".$","[|$|]"),c=e.split(".");b=c.shift();)b=b.replace("[|$|]",".$"),c.length?d[b]={}:d[b]=a[e],d=d[b];delete a[e]}},isDropped:function(){return"dropped"===this._state},debounce:function(a,b,c){var d,e=this;e._debounce=e._debounce||{},e._debounce[a]&&clearTimeout(e._debounce[a].timeout),d={callback:b,timeout:setTimeout(function(){delete e._debounce[a],b()},c)},e._debounce[a]=d}},b.exports=d},{"./Overload":31,"./Serialiser":38}],21:[function(a,b,c){"use strict";var d={TYPE_INSERT:0,TYPE_UPDATE:1,TYPE_REMOVE:2,PHASE_BEFORE:0,PHASE_AFTER:1};b.exports=d},{}],22:[function(a,b,c){"use strict";var d=a("./Overload"),e={on:new d({"string, function":function(a,b){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a]["*"]=this._listeners[a]["*"]||[],this._listeners[a]["*"].push(b),this},"string, *, function":function(a,b,c){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a][b]=this._listeners[a][b]||[],this._listeners[a][b].push(c),this}}),once:new d({"string, function":function(a,b){var c=this,d=function(){c.off(a,d),b.apply(c,arguments)};return this.on(a,d)},"string, *, function":function(a,b,c){var d=this,e=function(){d.off(a,b,e),c.apply(d,arguments)};return this.on(a,b,e)}}),off:new d({string:function(a){return this._listeners&&this._listeners[a]&&a in this._listeners&&delete this._listeners[a],this},"string, function":function(a,b){var c,d;return"string"==typeof b?this._listeners&&this._listeners[a]&&this._listeners[a][b]&&delete this._listeners[a][b]:this._listeners&&a in this._listeners&&(c=this._listeners[a]["*"],d=c.indexOf(b),d>-1&&c.splice(d,1)),this},"string, *, function":function(a,b,c){if(this._listeners&&a in this._listeners&&b in this.listeners[a]){var d=this._listeners[a][b],e=d.indexOf(c);e>-1&&d.splice(e,1)}},"string, *":function(a,b){this._listeners&&a in this._listeners&&b in this._listeners[a]&&delete this._listeners[a][b]}}),emit:function(a,b){if(this._listeners=this._listeners||{},a in this._listeners){var c,d,e,f,g,h,i;if(this._listeners[a]["*"])for(f=this._listeners[a]["*"],d=f.length,c=0;d>c;c++)e=f[c],"function"==typeof e&&e.apply(this,Array.prototype.slice.call(arguments,1));if(b instanceof Array&&b[0]&&b[0][this._primaryKey])for(g=this._listeners[a],d=b.length,c=0;d>c;c++)if(g[b[c][this._primaryKey]])for(h=g[b[c][this._primaryKey]].length,i=0;h>i;i++)e=g[b[c][this._primaryKey]][i],"function"==typeof e&&g[b[c][this._primaryKey]][i].apply(this,Array.prototype.slice.call(arguments,1))}return this},deferEmit:function(a,b){var c,d=this;return this._noEmitDefer||this._db&&(!this._db||this._db._noEmitDefer)?this.emit.apply(this,arguments):(c=arguments,this._deferTimeout=this._deferTimeout||{},this._deferTimeout[a]&&clearTimeout(this._deferTimeout[a]),this._deferTimeout[a]=setTimeout(function(){d.debug()&&console.log(d.logIdentifier()+" Emitting "+c[0]),d.emit.apply(d,c)},1)),this}};b.exports=e},{"./Overload":31}],23:[function(a,b,c){"use strict";var d={_match:function(a,b,c,d,e){var f,g,h,i,j,k,l=d,m=typeof a,n=typeof b,o=!0;if("object"===m&&null===a&&(m="null"),"object"===n&&null===b&&(n="null"),e=e||{},c=c||{},e.$rootQuery||(e.$rootQuery=b),e.$rootSource||(e.$rootSource=a),e.$currentQuery=b,e.$rootData=e.$rootData||{},"string"!==m&&"number"!==m&&"null"!==m||"string"!==n&&"number"!==n&&"null"!==n){if(("string"===m||"number"===m)&&"object"===n&&b instanceof RegExp)b.test(a)||(o=!1);else for(k in b)if(b.hasOwnProperty(k)){if(e.$previousQuery=e.$parent,e.$parent={query:b[k],key:k,parent:e.$previousQuery},f=!1,j=k.substr(0,2),"//"===j)continue;if(0===j.indexOf("$")&&(i=this._matchOp(k,a,b[k],c,e),i>-1)){if(i){if("or"===d)return!0}else o=i;f=!0}if(!f&&b[k]instanceof RegExp)if(f=!0,"object"===m&&void 0!==a[k]&&b[k].test(a[k])){if("or"===d)return!0}else o=!1;if(!f)if("object"==typeof b[k])if(void 0!==a[k])if(a[k]instanceof Array&&!(b[k]instanceof Array)){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else if(!(a[k]instanceof Array)&&b[k]instanceof Array){for(g=!1,h=0;h<b[k].length&&!(g=this._match(a[k],b[k][h],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else if("object"==typeof a)if(g=this._match(a[k],b[k],c,l,e)){if("or"===d)return!0}else o=!1;else if(g=this._match(void 0,b[k],c,l,e)){if("or"===d)return!0}else o=!1;else if(b[k]&&void 0!==b[k].$exists)if(g=this._match(void 0,b[k],c,l,e)){if("or"===d)return!0}else o=!1;else o=!1;else if(a&&a[k]===b[k]){if("or"===d)return!0}else if(a&&a[k]&&a[k]instanceof Array&&b[k]&&"object"!=typeof b[k]){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else o=!1;if("and"===d&&!o)return!1}}else"number"===m||"null"===m||"null"===n?a!==b&&(o=!1):a.localeCompare(b)&&(o=!1);return o},_matchOp:function(a,b,c,d,e){switch(a){case"$gt":return b>c;case"$gte":return b>=c;case"$lt":return c>b;case"$lte":return c>=b;case"$exists":return void 0===b!==c;case"$eq":return b==c;case"$eeq":return b===c;case"$ne":return b!=c;case"$nee":return b!==c;case"$or":for(var f=0;f<c.length;f++)if(this._match(b,c[f],d,"and",e))return!0;return!1;case"$and":for(var g=0;g<c.length;g++)if(!this._match(b,c[g],d,"and",e))return!1;return!0;case"$in":if(c instanceof Array){var h,i=c,j=i.length;for(h=0;j>h;h++)if(this._match(b,i[h],d,"and",e))return!0;return!1}return"object"==typeof c?this._match(b,c,d,"and",e):(console.log(this.logIdentifier()+" Cannot use an $in operator on a non-array key: "+a,e.$rootQuery),!1);case"$nin":if(c instanceof Array){var k,l=c,m=l.length;for(k=0;m>k;k++)if(this._match(b,l[k],d,"and",e))return!1;return!0}return"object"==typeof c?this._match(b,c,d,"and",e):(console.log(this.logIdentifier()+" Cannot use a $nin operator on a non-array key: "+a,e.$rootQuery),!1);case"$distinct":e.$rootData["//distinctLookup"]=e.$rootData["//distinctLookup"]||{};for(var n in c)if(c.hasOwnProperty(n))return e.$rootData["//distinctLookup"][n]=e.$rootData["//distinctLookup"][n]||{},e.$rootData["//distinctLookup"][n][b[n]]?!1:(e.$rootData["//distinctLookup"][n][b[n]]=!0,!0);break;case"$count":var o,p,q;for(o in c)if(c.hasOwnProperty(o)&&(p=b[o], q="object"==typeof p&&p instanceof Array?p.length:0,!this._match(q,c[o],d,"and",e)))return!1;return!0;case"$find":case"$findOne":case"$findSub":var r,s,t,u,v,w,x="collection",y={};if(!c.$from)throw a+" missing $from property!";if(c.$fromType&&(x=c.$fromType,!this.db()[x]||"function"!=typeof this.db()[x]))throw a+' cannot operate against $fromType "'+x+'" because the database does not recognise this type of object!';if(r=c.$query||{},s=c.$options||{},"$findSub"===a){if(!c.$path)throw a+" missing $path property!";if(v=c.$path,t=c.$subQuery||{},u=c.$subOptions||{},!(e.$parent&&e.$parent.parent&&e.$parent.parent.key))return this._match(b,r,{},"and",e)&&(w=this._findSub([b],v,t,u)),w&&w.length>0;w=this.db()[x](c.$from).findSub(r,v,t,u)}else w=this.db()[x](c.$from)[a.substr(1)](r,s);return y[e.$parent.parent.key]=w,this._match(b,y,d,"and",e)}return-1},applyJoin:function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=this,y=[];for(a instanceof Array||(a=[a]),e=0;e<b.length;e++)for(f in b[e])if(b[e].hasOwnProperty(f))for(g=b[e][f],h=g.$sourceType||"collection",i="$"+h+"."+f,j=f,c[i]?k=c[i]:this._db[h]&&"function"==typeof this._db[h]&&(k=this._db[h](f)),l=0;l<a.length;l++){m={},n=!1,o=!1,p="";for(q in g)if(g.hasOwnProperty(q))if(r=g[q],"$"===q.substr(0,1))switch(q){case"$where":if(!r.$query&&!r.$options)throw'$join $where clause requires "$query" and / or "$options" keys to work!';r.$query&&(m=x.resolveDynamicQuery(r.$query,a[l])),r.$options&&(s=r.$options);break;case"$as":j=r;break;case"$multi":n=r;break;case"$require":o=r;break;case"$prefix":p=r}else m[q]=x.resolveDynamicQuery(r,a[l]);if(t=k.find(m,s),!o||o&&t[0])if("$root"===j){if(n!==!1)throw this.logIdentifier()+' Cannot combine [$as: "$root"] with [$multi: true] in $join clause!';u=t[0],v=a[l];for(w in u)u.hasOwnProperty(w)&&void 0===v[p+w]&&(v[p+w]=u[w])}else a[l][j]=n===!1?t[0]:t;else y.push(l)}return y},resolveDynamicQuery:function(a,b){var c,d,e,f,g,h=this;if("string"==typeof a)return f="$$."===a.substr(0,3)?this.sharedPathSolver.value(b,a.substr(3,a.length-3)):this.sharedPathSolver.value(b,a),f.length>1?{$in:f}:f[0];c={};for(g in a)if(a.hasOwnProperty(g))switch(d=typeof a[g],e=a[g],d){case"string":"$$."===e.substr(0,3)?c[g]=this.sharedPathSolver.value(b,e.substr(3,e.length-3))[0]:c[g]=e;break;case"object":c[g]=h.resolveDynamicQuery(e,b);break;default:c[g]=e}return c},spliceArrayByIndexList:function(a,b){var c;for(c=b.length-1;c>=0;c--)a.splice(b[c],1)}};b.exports=d},{}],24:[function(a,b,c){"use strict";var d={sortAsc:function(a,b){return"string"==typeof a&&"string"==typeof b?a.localeCompare(b):a>b?1:b>a?-1:0},sortDesc:function(a,b){return"string"==typeof a&&"string"==typeof b?b.localeCompare(a):a>b?-1:b>a?1:0}};b.exports=d},{}],25:[function(a,b,c){"use strict";var d,e={};d={tagAdd:function(a){var b,c=this,d=e[a]=e[a]||[];for(b=0;b<d.length;b++)if(d[b]===c)return!0;return d.push(c),c.on&&c.on("drop",function(){c.tagRemove(a)}),!0},tagRemove:function(a){var b,c=e[a];if(c)for(b=0;b<c.length;b++)if(c[b]===this)return c.splice(b,1),!0;return!1},tagLookup:function(a){return e[a]||[]},tagDrop:function(a,b){var c,d,e,f=this.tagLookup(a);if(c=function(){d--,b&&0===d&&b(!1)},f.length)for(d=f.length,e=f.length-1;e>=0;e--)f[e].drop(c);return!0}},b.exports=d},{}],26:[function(a,b,c){"use strict";var d=a("./Overload"),e={addTrigger:function(a,b,c,d){var e,f=this;return e=f._triggerIndexOf(a,b,c),-1===e?(f.triggerStack={},f._trigger=f._trigger||{},f._trigger[b]=f._trigger[b]||{},f._trigger[b][c]=f._trigger[b][c]||[],f._trigger[b][c].push({id:a,method:d,enabled:!0}),!0):!1},removeTrigger:function(a,b,c){var d,e=this;return d=e._triggerIndexOf(a,b,c),d>-1&&e._trigger[b][c].splice(d,1),!1},ignoreTriggers:function(a){return void 0!==a?(this._ignoreTriggers=a,this):this._ignoreTriggers},addLinkIO:function(a,b){var c,d,e,f,g,h,i,j,k,l=this;if(l._linkIO=l._linkIO||{},l._linkIO[a]=b,d=b["export"],e=b["import"],d&&(h=l.db().collection(d.to)),e&&(i=l.db().collection(e.from)),j=[l.TYPE_INSERT,l.TYPE_UPDATE,l.TYPE_REMOVE],c=function(a,b){b(!1,!0)},d&&(d.match||(d.match=c),d.types||(d.types=j),f=function(a,b,c){d.match(c,function(b,e){e&&d.data(c,a.type,function(b,c,d){c&&(h.ignoreTriggers(!0),"remove"!==a.type?h.upsert(c,d):h.remove(c,d),h.ignoreTriggers(!1))})})}),e&&(e.match||(e.match=c),e.types||(e.types=j),g=function(a,b,c){e.match(c,function(b,d){d&&e.data(c,a.type,function(b,c,d){c&&(h.ignoreTriggers(!0),"remove"!==a.type?l.upsert(c,d):l.remove(c,d),h.ignoreTriggers(!1))})})}),d)for(k=0;k<d.types.length;k++)l.addTrigger(a+"export"+d.types[k],d.types[k],l.PHASE_AFTER,f);if(e)for(k=0;k<e.types.length;k++)i.addTrigger(a+"import"+e.types[k],e.types[k],l.PHASE_AFTER,g)},removeLinkIO:function(a){var b,c,d,e,f=this,g=f._linkIO[a];if(g){if(b=g["export"],c=g["import"],b)for(e=0;e<b.types.length;e++)f.removeTrigger(a+"export"+b.types[e],b.types[e],f.db.PHASE_AFTER);if(c)for(d=f.db().collection(c.from),e=0;e<c.types.length;e++)d.removeTrigger(a+"import"+c.types[e],c.types[e],f.db.PHASE_AFTER);return delete f._linkIO[a],!0}return!1},enableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!0,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!0,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!0,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1?(d._trigger[b][c][e].enabled=!0,!0):!1}}),disableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!1,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!1,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!1,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1?(d._trigger[b][c][e].enabled=!1,!0):!1}}),willTrigger:function(a,b){if(!this._ignoreTriggers&&this._trigger&&this._trigger[a]&&this._trigger[a][b]&&this._trigger[a][b].length){var c,d=this._trigger[a][b];for(c=0;c<d.length;c++)if(d[c].enabled)return!0}return!1},processTrigger:function(a,b,c,d,e){var f,g,h,i,j,k,l,m=this;if(!m._ignoreTriggers&&m._trigger&&m._trigger[b]&&m._trigger[b][c]){for(f=m._trigger[b][c],h=f.length,g=0;h>g;g++)if(i=f[g],i.enabled){if(m.debug()){switch(b){case this.TYPE_INSERT:k="insert";break;case this.TYPE_UPDATE:k="update";break;case this.TYPE_REMOVE:k="remove";break;default:k=""}switch(c){case this.PHASE_BEFORE:l="before";break;case this.PHASE_AFTER:l="after";break;default:l=""}console.log('Triggers: Processing trigger "'+i.id+'" for '+k+' in phase "'+l+'"')}if(m.triggerStack&&m.triggerStack[b]&&m.triggerStack[b][c]&&m.triggerStack[b][c][i.id]){m.debug()&&console.log('Triggers: Will not run trigger "'+i.id+'" for '+k+' in phase "'+l+'" as it is already in the stack!');continue}if(m.triggerStack=m.triggerStack||{},m.triggerStack[b]={},m.triggerStack[b][c]={},m.triggerStack[b][c][i.id]=!0,j=i.method.call(m,a,d,e),m.triggerStack[b][c][i.id]=!1,j===!1)return!1;if(void 0!==j&&j!==!0&&j!==!1)throw"ForerunnerDB.Mixin.Triggers: Trigger error: "+j}return!0}},_triggerIndexOf:function(a,b,c){var d,e,f,g=this;if(g._trigger&&g._trigger[b]&&g._trigger[b][c])for(d=g._trigger[b][c],e=d.length,f=0;e>f;f++)if(d[f].id===a)return f;return-1}};b.exports=e},{"./Overload":31}],27:[function(a,b,c){"use strict";var d={_updateProperty:function(a,b,c){a[b]=c,this.debug()&&console.log(this.logIdentifier()+' Setting non-data-bound document property "'+b+'" to val "'+c+'"')},_updateIncrement:function(a,b,c){a[b]+=c},_updateSpliceMove:function(a,b,c){a.splice(c,0,a.splice(b,1)[0]),this.debug()&&console.log(this.logIdentifier()+' Moving non-data-bound document array index from "'+b+'" to "'+c+'"')},_updateSplicePush:function(a,b,c){a.length>b?a.splice(b,0,c):a.push(c)},_updatePush:function(a,b){a.push(b)},_updatePull:function(a,b){a.splice(b,1)},_updateMultiply:function(a,b,c){a[b]*=c},_updateRename:function(a,b,c){a[c]=a[b],delete a[b]},_updateOverwrite:function(a,b,c){a[b]=c},_updateUnset:function(a,b){delete a[b]},_updateClear:function(a,b){var c,d=a[b];if(d&&"object"==typeof d)for(c in d)d.hasOwnProperty(c)&&this._updateUnset(d,c)},_updatePop:function(a,b){var c,d=!1;if(a.length>0)if(b>0){for(c=0;b>c;c++)a.pop();d=!0}else if(0>b){for(c=0;c>b;c--)a.shift();d=!0}return d}};b.exports=d},{}],28:[function(a,b,c){"use strict";var d,e,f,g;d=a("./Shared"),e=d.modules.Core,f=d.modules.OldView,g=f.prototype.init,f.prototype.init=function(){var a=this;this._binds=[],this._renderStart=0,this._renderEnd=0,this._deferQueue={insert:[],update:[],remove:[],upsert:[],_bindInsert:[],_bindUpdate:[],_bindRemove:[],_bindUpsert:[]},this._deferThreshold={insert:100,update:100,remove:100,upsert:100,_bindInsert:100,_bindUpdate:100,_bindRemove:100,_bindUpsert:100},this._deferTime={insert:100,update:1,remove:1,upsert:1,_bindInsert:100,_bindUpdate:1,_bindRemove:1,_bindUpsert:1},g.apply(this,arguments),this.on("insert",function(b,c){a._bindEvent("insert",b,c)}),this.on("update",function(b,c){a._bindEvent("update",b,c)}),this.on("remove",function(b,c){a._bindEvent("remove",b,c)}),this.on("change",a._bindChange)},f.prototype.bind=function(a,b){if(!b||!b.template)throw'ForerunnerDB.OldView "'+this.name()+'": Cannot bind data to element, missing options information!';return this._binds[a]=b,this},f.prototype.unBind=function(a){return delete this._binds[a],this},f.prototype.isBound=function(a){return Boolean(this._binds[a])},f.prototype.bindSortDom=function(a,b){var c,d,e,f=window.jQuery(a);for(this.debug()&&console.log("ForerunnerDB.OldView.Bind: Sorting data in DOM...",b),c=0;c<b.length;c++)d=b[c],e=f.find("#"+d[this._primaryKey]),e.length?0===c?(this.debug()&&console.log("ForerunnerDB.OldView.Bind: Sort, moving to index 0...",e),f.prepend(e)):(this.debug()&&console.log("ForerunnerDB.OldView.Bind: Sort, moving to index "+c+"...",e),e.insertAfter(f.children(":eq("+(c-1)+")"))):this.debug()&&console.log("ForerunnerDB.OldView.Bind: Warning, element for array item not found!",d)},f.prototype.bindRefresh=function(a){var b,c,d=this._binds;a||(a={data:this.find()});for(b in d)d.hasOwnProperty(b)&&(c=d[b],this.debug()&&console.log("ForerunnerDB.OldView.Bind: Sorting DOM..."),this.bindSortDom(b,a.data),c.afterOperation&&c.afterOperation(),c.refresh&&c.refresh())},f.prototype.bindRender=function(a,b){var c,d,e,f,g,h=this._binds[a],i=window.jQuery(a),j=window.jQuery("<ul></ul>");if(h){for(c=this._data.find(),f=function(a){j.append(a)},g=0;g<c.length;g++)d=c[g],e=h.template(d,f);b?b(a,j.html()):i.append(j.html())}},f.prototype.processQueue=function(a,b){var c=this._deferQueue[a],d=this._deferThreshold[a],e=this._deferTime[a];if(c.length){var f,g=this;c.length&&(f=c.length>d?c.splice(0,d):c.splice(0,c.length),this._bindEvent(a,f,[])),setTimeout(function(){g.processQueue(a,b)},e)}else b&&b(),this.emit("bindQueueComplete")},f.prototype._bindEvent=function(a,b,c){var d,e,f=this._binds,g=this.find({});for(e in f)if(f.hasOwnProperty(e))switch(d=f[e].reduce?this.find(f[e].reduce.query,f[e].reduce.options):g,a){case"insert":this._bindInsert(e,f[e],b,c,d);break;case"update":this._bindUpdate(e,f[e],b,c,d);break;case"remove":this._bindRemove(e,f[e],b,c,d)}},f.prototype._bindChange=function(a){this.debug()&&console.log("ForerunnerDB.OldView.Bind: Bind data change, refreshing bind...",a),this.bindRefresh(a)},f.prototype._bindInsert=function(a,b,c,d,e){var f,g,h,i,j=window.jQuery(a);for(h=function(a,c,d,e){return function(a){b.insert?b.insert(a,c,d,e):b.prependInsert?j.prepend(a):j.append(a),b.afterInsert&&b.afterInsert(a,c,d,e)}},i=0;i<c.length;i++)f=j.find("#"+c[i][this._primaryKey]),f.length||(g=b.template(c[i],h(f,c[i],d,e)))},f.prototype._bindUpdate=function(a,b,c,d,e){var f,g,h,i=window.jQuery(a);for(g=function(a,c){return function(d){b.update?b.update(d,c,e,a.length?"update":"append"):a.length?a.replaceWith(d):b.prependUpdate?i.prepend(d):i.append(d),b.afterUpdate&&b.afterUpdate(d,c,e)}},h=0;h<c.length;h++)f=i.find("#"+c[h][this._primaryKey]),b.template(c[h],g(f,c[h]))},f.prototype._bindRemove=function(a,b,c,d,e){var f,g,h,i=window.jQuery(a);for(g=function(a,c,d){return function(){b.remove?b.remove(a,c,d):(a.remove(),b.afterRemove&&b.afterRemove(a,c,d))}},h=0;h<c.length;h++)f=i.find("#"+c[h][this._primaryKey]),f.length&&(b.beforeRemove?b.beforeRemove(f,c[h],e,g(f,c[h],e)):b.remove?b.remove(f,c[h],e):(f.remove(),b.afterRemove&&b.afterRemove(f,c[h],e)))}},{"./Shared":39}],29:[function(a,b,c){"use strict";var d,e,f,g,h,i,j;d=a("./Shared");var k=function(a){this.init.apply(this,arguments)};k.prototype.init=function(a){var b=this;this._name=a,this._listeners={},this._query={query:{},options:{}},this._onFromSetData=function(){b._onSetData.apply(b,arguments)},this._onFromInsert=function(){b._onInsert.apply(b,arguments)},this._onFromUpdate=function(){b._onUpdate.apply(b,arguments)},this._onFromRemove=function(){b._onRemove.apply(b,arguments)},this._onFromChange=function(){b.debug()&&console.log("ForerunnerDB.OldView: Received change"),b._onChange.apply(b,arguments)}},d.addModule("OldView",k),f=a("./CollectionGroup"),g=a("./Collection"),h=g.prototype.init,i=f.prototype.init,e=d.modules.Db,j=e.prototype.init,d.mixin(k.prototype,"Mixin.Events"),k.prototype.drop=function(){return(this._db||this._from)&&this._name?(this.debug()&&console.log("ForerunnerDB.OldView: Dropping view "+this._name),this._state="dropped",this.emit("drop",this),this._db&&this._db._oldViews&&delete this._db._oldViews[this._name],this._from&&this._from._oldViews&&delete this._from._oldViews[this._name],delete this._listeners,!0):!1},k.prototype.debug=function(){return!1},k.prototype.db=function(a){return void 0!==a?(this._db=a,this):this._db},k.prototype.from=function(a){if(void 0!==a){if("string"==typeof a){if(!this._db.collectionExists(a))throw'ForerunnerDB.OldView "'+this.name()+'": Invalid collection in view.from() call.';a=this._db.collection(a)}return this._from!==a&&(this._from&&this.removeFrom(),this.addFrom(a)),this}return this._from},k.prototype.addFrom=function(a){if(this._from=a,this._from)return this._from.on("setData",this._onFromSetData),this._from.on("change",this._onFromChange),this._from._addOldView(this),this._primaryKey=this._from._primaryKey,this.refresh(),this;throw'ForerunnerDB.OldView "'+this.name()+'": Cannot determine collection type in view.from()'},k.prototype.removeFrom=function(){this._from.off("setData",this._onFromSetData),this._from.off("change",this._onFromChange),this._from._removeOldView(this)},k.prototype.primaryKey=function(){return this._from?this._from.primaryKey():void 0},k.prototype.queryData=function(a,b,c){return void 0!==a&&(this._query.query=a),void 0!==b&&(this._query.options=b),void 0!==a||void 0!==b?((void 0===c||c===!0)&&this.refresh(),this):this._query},k.prototype.queryAdd=function(a,b,c){var d,e=this._query.query;if(void 0!==a)for(d in a)a.hasOwnProperty(d)&&(void 0===e[d]||void 0!==e[d]&&b)&&(e[d]=a[d]);(void 0===c||c===!0)&&this.refresh()},k.prototype.queryRemove=function(a,b){var c,d=this._query.query;if(void 0!==a)for(c in a)a.hasOwnProperty(c)&&delete d[c];(void 0===b||b===!0)&&this.refresh()},k.prototype.query=function(a,b){return void 0!==a?(this._query.query=a,(void 0===b||b===!0)&&this.refresh(),this):this._query.query},k.prototype.queryOptions=function(a,b){return void 0!==a?(this._query.options=a,(void 0===b||b===!0)&&this.refresh(),this):this._query.options},k.prototype.refresh=function(a){if(this._from){var b,c,d,e,f,g,h,i,j=this._data,k=[],l=[],m=[],n=!1;if(this.debug()&&(console.log("ForerunnerDB.OldView: Refreshing view "+this._name),console.log("ForerunnerDB.OldView: Existing data: "+("undefined"!=typeof this._data)),"undefined"!=typeof this._data&&console.log("ForerunnerDB.OldView: Current data rows: "+this._data.find().length)),this._query?(this.debug()&&console.log("ForerunnerDB.OldView: View has query and options, getting subset..."),this._data=this._from.subset(this._query.query,this._query.options)):this._query.options?(this.debug()&&console.log("ForerunnerDB.OldView: View has options, getting subset..."),this._data=this._from.subset({},this._query.options)):(this.debug()&&console.log("ForerunnerDB.OldView: View has no query or options, getting subset..."),this._data=this._from.subset({})),!a&&j)if(this.debug()&&console.log("ForerunnerDB.OldView: Refresh not forced, old data detected..."),d=this._data,j.subsetOf()===d.subsetOf()){for(this.debug()&&console.log("ForerunnerDB.OldView: Old and new data are from same collection..."),e=d.find(),b=j.find(),g=d._primaryKey,i=0;i<e.length;i++)h=e[i],f={},f[g]=h[g],c=j.find(f)[0],c?JSON.stringify(c)!==JSON.stringify(h)&&l.push(h):k.push(h);for(i=0;i<b.length;i++)h=b[i],f={},f[g]=h[g],d.find(f)[0]||m.push(h);this.debug()&&(console.log("ForerunnerDB.OldView: Removed "+m.length+" rows"),console.log("ForerunnerDB.OldView: Inserted "+k.length+" rows"),console.log("ForerunnerDB.OldView: Updated "+l.length+" rows")),k.length&&(this._onInsert(k,[]),n=!0),l.length&&(this._onUpdate(l,[]),n=!0),m.length&&(this._onRemove(m,[]),n=!0)}else this.debug()&&console.log("ForerunnerDB.OldView: Old and new data are from different collections..."),m=j.find(),m.length&&(this._onRemove(m),n=!0),k=d.find(),k.length&&(this._onInsert(k),n=!0);else this.debug()&&console.log("ForerunnerDB.OldView: Forcing data update",e),this._data=this._from.subset(this._query.query,this._query.options),e=this._data.find(),this.debug()&&console.log("ForerunnerDB.OldView: Emitting change event with data",e),this._onInsert(e,[]);this.debug()&&console.log("ForerunnerDB.OldView: Emitting change"),this.emit("change")}return this},k.prototype.count=function(){return this._data&&this._data._data?this._data._data.length:0},k.prototype.find=function(){return this._data?(this.debug()&&console.log("ForerunnerDB.OldView: Finding data in view collection...",this._data),this._data.find.apply(this._data,arguments)):[]},k.prototype.insert=function(){return this._from?this._from.insert.apply(this._from,arguments):[]},k.prototype.update=function(){return this._from?this._from.update.apply(this._from,arguments):[]},k.prototype.remove=function(){return this._from?this._from.remove.apply(this._from,arguments):[]},k.prototype._onSetData=function(a,b){this.emit("remove",b,[]),this.emit("insert",a,[])},k.prototype._onInsert=function(a,b){this.emit("insert",a,b)},k.prototype._onUpdate=function(a,b){this.emit("update",a,b)},k.prototype._onRemove=function(a,b){this.emit("remove",a,b)},k.prototype._onChange=function(){this.debug()&&console.log("ForerunnerDB.OldView: Refreshing data"),this.refresh()},g.prototype.init=function(){this._oldViews=[],h.apply(this,arguments)},g.prototype._addOldView=function(a){return void 0!==a&&(this._oldViews[a._name]=a),this},g.prototype._removeOldView=function(a){return void 0!==a&&delete this._oldViews[a._name],this},f.prototype.init=function(){this._oldViews=[],i.apply(this,arguments)},f.prototype._addOldView=function(a){return void 0!==a&&(this._oldViews[a._name]=a),this},f.prototype._removeOldView=function(a){return void 0!==a&&delete this._oldViews[a._name],this},e.prototype.init=function(){this._oldViews={},j.apply(this,arguments)},e.prototype.oldView=function(a){return this._oldViews[a]||this.debug()&&console.log("ForerunnerDB.OldView: Creating view "+a),this._oldViews[a]=this._oldViews[a]||new k(a).db(this),this._oldViews[a]},e.prototype.oldViewExists=function(a){return Boolean(this._oldViews[a])},e.prototype.oldViews=function(){var a,b=[];for(a in this._oldViews)this._oldViews.hasOwnProperty(a)&&b.push({name:a,count:this._oldViews[a].count()});return b},d.finishModule("OldView"),b.exports=k},{"./Collection":5,"./CollectionGroup":6,"./Shared":39}],30:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(a){this.pathSolver=new e,this.counter=0,this.init.apply(this,arguments)};f.prototype.init=function(a){this._data={operation:a,index:{potential:[],used:!1},steps:[],time:{startMs:0,stopMs:0,totalMs:0,process:{}},flag:{},log:[]}},d.addModule("Operation",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.start=function(){this._data.time.startMs=(new Date).getTime()},f.prototype.log=function(a){if(a){var b=this._log.length>0?this._data.log[this._data.log.length-1].time:0,c={event:a,time:(new Date).getTime(),delta:0};return this._data.log.push(c),b&&(c.delta=c.time-b),this}return this._data.log},f.prototype.time=function(a){if(void 0!==a){var b=this._data.time.process,c=b[a]=b[a]||{};return c.startMs?(c.stopMs=(new Date).getTime(),c.totalMs=c.stopMs-c.startMs,c.stepObj.totalMs=c.totalMs,delete c.stepObj):(c.startMs=(new Date).getTime(),c.stepObj={name:a},this._data.steps.push(c.stepObj)),this}return this._data.time},f.prototype.flag=function(a,b){return void 0===a||void 0===b?void 0!==a?this._data.flag[a]:this._data.flag:void(this._data.flag[a]=b)},f.prototype.data=function(a,b,c){return void 0!==b?(this.pathSolver.set(this._data,a,b),this):this.pathSolver.get(this._data,a)},f.prototype.pushData=function(a,b,c){this.pathSolver.push(this._data,a,b)},f.prototype.stop=function(){this._data.time.stopMs=(new Date).getTime(),this._data.time.totalMs=this._data.time.stopMs-this._data.time.startMs},d.finishModule("Operation"),b.exports=f},{"./Path":33,"./Shared":39}],31:[function(a,b,c){"use strict";var d=function(a,b){if(b||(b=a,a=void 0),b){var c,d,e,f,g,h,i=this;if(!(b instanceof Array)){e={};for(c in b)if(b.hasOwnProperty(c))if(f=c.replace(/ /g,""),-1===f.indexOf("*"))e[f]=b[c];else for(h=this.generateSignaturePermutations(f),g=0;g<h.length;g++)e[h[g]]||(e[h[g]]=b[c]);b=e}return function(){var e,f,g,h=[];if(b instanceof Array){for(d=b.length,c=0;d>c;c++)if(b[c].length===arguments.length)return i.callExtend(this,"$main",b,b[c],arguments)}else{for(c=0;c<arguments.length&&(f=typeof arguments[c],"object"===f&&arguments[c]instanceof Array&&(f="array"),1!==arguments.length||"undefined"!==f);c++)h.push(f);if(e=h.join(","),b[e])return i.callExtend(this,"$main",b,b[e],arguments);for(c=h.length;c>=0;c--)if(e=h.slice(0,c).join(","),b[e+",..."])return i.callExtend(this,"$main",b,b[e+",..."],arguments)}throw g=void 0!==a?a:"function"==typeof this.name?this.name():"Unknown",console.log("Overload Definition:",b),'ForerunnerDB.Overload "'+g+'": Overloaded method does not have a matching signature "'+e+'" for the passed arguments: '+this.jStringify(h)}}return function(){}};d.prototype.generateSignaturePermutations=function(a){var b,c,d=[],e=["array","string","object","number","function","undefined"];if(a.indexOf("*")>-1)for(c=0;c<e.length;c++)b=a.replace("*",e[c]),d=d.concat(this.generateSignaturePermutations(b));else d.push(a);return d},d.prototype.callExtend=function(a,b,c,d,e){var f,g;return a&&c[b]?(f=a[b],a[b]=c[b],g=d.apply(a,e),a[b]=f,g):d.apply(a,e)},b.exports=d},{}],32:[function(a,b,c){"use strict";var d,e,f,g;d=a("./Shared");var h=function(){this.init.apply(this,arguments)};h.prototype.init=function(a){var b=this;this._name=a,this._data=new g("__FDB__dc_data_"+this._name),this._collData=new f,this._sources=[],this._sourceDroppedWrap=function(){b._sourceDropped.apply(b,arguments)}},d.addModule("Overview",h),d.mixin(h.prototype,"Mixin.Common"),d.mixin(h.prototype,"Mixin.ChainReactor"),d.mixin(h.prototype,"Mixin.Constants"),d.mixin(h.prototype,"Mixin.Triggers"),d.mixin(h.prototype,"Mixin.Events"),d.mixin(h.prototype,"Mixin.Tags"),f=a("./Collection"),g=a("./Document"),e=d.modules.Db,d.synthesize(h.prototype,"state"),d.synthesize(h.prototype,"db"),d.synthesize(h.prototype,"name"),d.synthesize(h.prototype,"query",function(a){var b=this.$super(a);return void 0!==a&&this._refresh(),b}),d.synthesize(h.prototype,"queryOptions",function(a){var b=this.$super(a);return void 0!==a&&this._refresh(),b}),d.synthesize(h.prototype,"reduce",function(a){var b=this.$super(a);return void 0!==a&&this._refresh(),b}),h.prototype.from=function(a){return void 0!==a?("string"==typeof a&&(a=this._db.collection(a)),this._setFrom(a),this):this._sources},h.prototype.find=function(){return this._collData.find.apply(this._collData,arguments)},h.prototype.exec=function(){var a=this.reduce();return a?a.apply(this):void 0},h.prototype.count=function(){return this._collData.count.apply(this._collData,arguments)},h.prototype._setFrom=function(a){for(;this._sources.length;)this._removeSource(this._sources[0]);return this._addSource(a),this},h.prototype._addSource=function(a){return a&&"View"===a.className&&(a=a.privateData(),this.debug()&&console.log(this.logIdentifier()+' Using internal private data "'+a.instanceIdentifier()+'" for IO graph linking')),-1===this._sources.indexOf(a)&&(this._sources.push(a),a.chain(this),a.on("drop",this._sourceDroppedWrap),this._refresh()),this},h.prototype._removeSource=function(a){a&&"View"===a.className&&(a=a.privateData(),this.debug()&&console.log(this.logIdentifier()+' Using internal private data "'+a.instanceIdentifier()+'" for IO graph linking'));var b=this._sources.indexOf(a);return b>-1&&(this._sources.splice(a,1),a.unChain(this),a.off("drop",this._sourceDroppedWrap),this._refresh()),this},h.prototype._sourceDropped=function(a){a&&this._removeSource(a)},h.prototype._refresh=function(){if(!this.isDropped()){if(this._sources&&this._sources[0]){this._collData.primaryKey(this._sources[0].primaryKey());var a,b=[];for(a=0;a<this._sources.length;a++)b=b.concat(this._sources[a].find(this._query,this._queryOptions));this._collData.setData(b)}if(this._reduce){var c=this._reduce.apply(this);this._data.setData(c)}}},h.prototype._chainHandler=function(a){switch(a.type){case"setData":case"insert":case"update":case"remove":this._refresh()}},h.prototype.data=function(){return this._data},h.prototype.drop=function(a){if(!this.isDropped()){for(this._state="dropped",delete this._data,delete this._collData;this._sources.length;)this._removeSource(this._sources[0]);delete this._sources,this._db&&this._name&&delete this._db._overview[this._name],this.emit("drop",this),a&&a(!1,!0),delete this._listeners}return!0},e.prototype.overview=function(a){var b=this;return a?a instanceof h?a:this._overview&&this._overview[a]?this._overview[a]:(this._overview=this._overview||{},this._overview[a]=new h(a).db(this),b.emit("create",b._overview[a],"overview",a),this._overview[a]):this._overview||{}},e.prototype.overviews=function(){var a,b,c=[];for(b in this._overview)this._overview.hasOwnProperty(b)&&(a=this._overview[b],c.push({name:b,count:a.count(),linked:void 0!==a.isLinked?a.isLinked():!1}));return c},d.finishModule("Overview"),b.exports=h},{"./Collection":5,"./Document":9,"./Shared":39}],33:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){this.init.apply(this,arguments)};e.prototype.init=function(a){a&&this.path(a)},d.addModule("Path",e),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),e.prototype.path=function(a){return void 0!==a?(this._path=this.clean(a),this._pathParts=this._path.split("."),this):this._path},e.prototype.hasObjectPaths=function(a,b){var c,d=!0;for(c in a)if(a.hasOwnProperty(c)){if(void 0===b[c])return!1;if("object"==typeof a[c]&&(d=this.hasObjectPaths(a[c],b[c]),!d))return!1}return d},e.prototype.countKeys=function(a){var b,c=0;for(b in a)a.hasOwnProperty(b)&&void 0!==a[b]&&("object"!=typeof a[b]?c++:c+=this.countKeys(a[b]));return c},e.prototype.countObjectPaths=function(a,b){var c,d,e={},f=0,g=0;for(d in b)b.hasOwnProperty(d)&&("object"==typeof b[d]?(c=this.countObjectPaths(a[d],b[d]),e[d]=c.matchedKeys,g+=c.totalKeyCount,f+=c.matchedKeyCount):(g++,a&&a[d]&&"object"!=typeof a[d]?(e[d]=!0,f++):e[d]=!1));return{matchedKeys:e,matchedKeyCount:f,totalKeyCount:g}},e.prototype.parse=function(a,b){var c,d,e,f=[],g="";for(d in a)if(a.hasOwnProperty(d))if(g=d,"object"==typeof a[d])if(b)for(c=this.parse(a[d],b),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path,value:c[e].value});else for(c=this.parse(a[d]),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path});else b?f.push({path:g,value:a[d]}):f.push({path:g});return f},e.prototype.parseArr=function(a,b){return b=b||{},this._parseArr(a,"",[],b)},e.prototype._parseArr=function(a,b,c,d){var e,f="";b=b||"",c=c||[];for(e in a)a.hasOwnProperty(e)&&(!d.ignore||d.ignore&&!d.ignore.test(e))&&(f=b?b+"."+e:e,"object"==typeof a[e]?(d.verbose&&c.push(f),this._parseArr(a[e],f,c,d)):c.push(f));return c},e.prototype.set=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;b=this.clean(b),d=b.split("."),e=d.shift(),d.length?(a[e]=a[e]||{},this.set(a[e],d.join("."),c)):a[e]=c}return a},e.prototype.get=function(a,b){return this.value(a,b)[0]},e.prototype.value=function(a,b,c){var d,e,f,g,h,i,j,k,l;if(b&&-1===b.indexOf("."))return[a[b]];if(void 0!==a&&"object"==typeof a){if((!c||c&&!c.skipArrCheck)&&a instanceof Array){for(j=[],k=0;k<a.length;k++)j.push(this.get(a[k],b));return j}for(i=[],void 0!==b&&(b=this.clean(b),d=b.split(".")),e=d||this._pathParts,f=e.length,g=a,k=0;f>k;k++){if(g=g[e[k]],h instanceof Array){for(l=0;l<h.length;l++)i=i.concat(this.value(h,l+"."+e[k],{skipArrCheck:!0}));return i}if(!g||"object"!=typeof g)break;h=g}return[g]}return[]},e.prototype.push=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;if(b=this.clean(b),d=b.split("."),e=d.shift(),d.length)a[e]=a[e]||{},this.set(a[e],d.join("."),c);else{if(a[e]=a[e]||[],!(a[e]instanceof Array))throw"ForerunnerDB.Path: Cannot push to a path whose endpoint is not an array!";a[e].push(c)}}return a},e.prototype.keyValue=function(a,b){var c,d,e,f,g,h,i;for(void 0!==b&&(b=this.clean(b),c=b.split(".")),d=c||this._pathParts,e=d.length,f=a,i=0;e>i;i++){if(f=f[d[i]],!f||"object"!=typeof f){h=d[i]+":"+f;break}g=f}return h},e.prototype.set=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;b=this.clean(b),d=b.split("."),e=d.shift(),d.length?(a[e]=a[e]||{},this.set(a[e],d.join("."),c)):a[e]=c}return a},e.prototype.clean=function(a){return"."===a.substr(0,1)&&(a=a.substr(1,a.length-1)),a},d.finishModule("Path"),b.exports=e},{"./Shared":39}],34:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m=a("./Shared"),n=a("async"),o=a("localforage");a("./PersistCompress"),a("./PersistCrypto");k=function(){this.init.apply(this,arguments)},k.prototype.localforage=o,k.prototype.init=function(a){var b=this;this._encodeSteps=[function(){return b._encode.apply(b,arguments)}],this._decodeSteps=[function(){return b._decode.apply(b,arguments)}],a.isClient()&&void 0!==window.Storage&&(this.mode("localforage"),o.config({driver:[o.INDEXEDDB,o.WEBSQL,o.LOCALSTORAGE],name:String(a.core().name()),storeName:"FDB"}))},m.addModule("Persist",k),m.mixin(k.prototype,"Mixin.ChainReactor"),m.mixin(k.prototype,"Mixin.Common"),d=m.modules.Db,e=a("./Collection"),f=e.prototype.drop,g=a("./CollectionGroup"),h=e.prototype.init,i=d.prototype.init,j=d.prototype.drop,l=m.overload,m.synthesize(k.prototype,"auto",function(a){var b=this;return void 0!==a&&(a?(this._db.on("create",function(){b._autoLoad.apply(b,arguments)}),this._db.on("change",function(){b._autoSave.apply(b,arguments)}),this._db.debug()&&console.log(this._db.logIdentifier()+" Automatic load/save enabled")):(this._db.off("create",this._autoLoad),this._db.off("change",this._autoSave),this._db.debug()&&console.log(this._db.logIdentifier()+" Automatic load/save disbled"))),this.$super.call(this,a)}),k.prototype._autoLoad=function(a,b,c){var d=this;"function"==typeof a.load?(d._db.debug()&&console.log(d._db.logIdentifier()+" Auto-loading data for "+b+":",c),a.load(function(a,b){a&&d._db.debug()&&console.log(d._db.logIdentifier()+" Automatic load failed:",a), d.emit("load",a,b)})):d._db.debug()&&console.log(d._db.logIdentifier()+" Auto-load for "+b+":",c,"no load method, skipping")},k.prototype._autoSave=function(a,b,c){var d=this;"function"==typeof a.save&&(d._db.debug()&&console.log(d._db.logIdentifier()+" Auto-saving data for "+b+":",c),a.save(function(a,b){a&&d._db.debug()&&console.log(d._db.logIdentifier()+" Automatic save failed:",a),d.emit("save",a,b)}))},k.prototype.mode=function(a){return void 0!==a?(this._mode=a,this):this._mode},k.prototype.driver=function(a){if(void 0!==a){switch(a.toUpperCase()){case"LOCALSTORAGE":o.setDriver(o.LOCALSTORAGE);break;case"WEBSQL":o.setDriver(o.WEBSQL);break;case"INDEXEDDB":o.setDriver(o.INDEXEDDB);break;default:throw"ForerunnerDB.Persist: The persistence driver you have specified is not found. Please use either IndexedDB, WebSQL or LocalStorage!"}return this}return o.driver()},k.prototype.decode=function(a,b){n.waterfall([function(b){b&&b(!1,a,{})}].concat(this._decodeSteps),b)},k.prototype.encode=function(a,b){n.waterfall([function(b){b&&b(!1,a,{})}].concat(this._encodeSteps),b)},m.synthesize(k.prototype,"encodeSteps"),m.synthesize(k.prototype,"decodeSteps"),k.prototype.addStep=new l({object:function(a){this.$main.call(this,function(){a.encode.apply(a,arguments)},function(){a.decode.apply(a,arguments)},0)},"function, function":function(a,b){this.$main.call(this,a,b,0)},"function, function, number":function(a,b,c){this.$main.call(this,a,b,c)},$main:function(a,b,c){0===c||void 0===c?(this._encodeSteps.push(a),this._decodeSteps.unshift(b)):(this._encodeSteps.splice(c,0,a),this._decodeSteps.splice(this._decodeSteps.length-c,0,b))}}),k.prototype.unwrap=function(a){var b,c=a.split("::fdb::");switch(c[0]){case"json":b=this.jParse(c[1]);break;case"raw":b=c[1]}},k.prototype._decode=function(a,b,c){var d,e;if(a){switch(d=a.split("::fdb::"),d[0]){case"json":e=this.jParse(d[1]);break;case"raw":e=d[1]}e?(b.foundData=!0,b.rowCount=e.length||0):(b.foundData=!1,b.rowCount=0),c&&c(!1,e,b)}else b.foundData=!1,b.rowCount=0,c&&c(!1,a,b)},k.prototype._encode=function(a,b,c){var d=a;a="object"==typeof a?"json::fdb::"+this.jStringify(a):"raw::fdb::"+a,d?(b.foundData=!0,b.rowCount=d.length||0):(b.foundData=!1,b.rowCount=0),c&&c(!1,a,b)},k.prototype.save=function(a,b,c){switch(this.mode()){case"localforage":this.encode(b,function(b,d,e){o.setItem(a,d).then(function(a){c&&c(!1,a,e)},function(a){c&&c(a)})});break;default:c&&c("No data handler.")}},k.prototype.load=function(a,b){var c=this;switch(this.mode()){case"localforage":o.getItem(a).then(function(a){c.decode(a,b)},function(a){b&&b(a)});break;default:b&&b("No data handler or unrecognised data type.")}},k.prototype.drop=function(a,b){switch(this.mode()){case"localforage":o.removeItem(a).then(function(){b&&b(!1)},function(a){b&&b(a)});break;default:b&&b("No data handler or unrecognised data type.")}},e.prototype.drop=new l({"":function(){this.isDropped()||this.drop(!0)},"function":function(a){this.isDropped()||this.drop(!0,a)},"boolean":function(a){if(!this.isDropped()){if(a){if(!this._name)throw"ForerunnerDB.Persist: Cannot drop a collection's persistent storage when no name assigned to collection!";this._db&&(this._db.persist.drop(this._db._name+"-"+this._name),this._db.persist.drop(this._db._name+"-"+this._name+"-metaData"))}f.call(this)}},"boolean, function":function(a,b){var c=this;if(!this.isDropped()){if(!a)return f.call(this,b);if(this._name){if(this._db)return this._db.persist.drop(this._db._name+"-"+this._name,function(){c._db.persist.drop(c._db._name+"-"+c._name+"-metaData",b)}),f.call(this);b&&b("Cannot drop a collection's persistent storage when the collection is not attached to a database!")}else b&&b("Cannot drop a collection's persistent storage when no name assigned to collection!")}}}),e.prototype.save=function(a){var b,c=this;c._name?c._db?(b=function(){c._db.persist.save(c._db._name+"-"+c._name,c._data,function(b,d,e){b?a&&a(b):c._db.persist.save(c._db._name+"-"+c._name+"-metaData",c.metaData(),function(b,c,d){a&&a(b,c,e,d)})})},c.isProcessingQueue()?c.on("queuesComplete",function(){b()}):b()):a&&a("Cannot save a collection that is not attached to a database!"):a&&a("Cannot save a collection with no assigned name!")},e.prototype.load=function(a){var b=this;b._name?b._db?b._db.persist.load(b._db._name+"-"+b._name,function(c,d,e){c?a&&a(c):(d&&(b.remove({}),b.insert(d)),b._db.persist.load(b._db._name+"-"+b._name+"-metaData",function(c,d,f){c||d&&b.metaData(d),a&&a(c,e,f)}))}):a&&a("Cannot load a collection that is not attached to a database!"):a&&a("Cannot load a collection with no assigned name!")},e.prototype.saveCustom=function(a){var b,c=this,d={};c._name?c._db?(b=function(){c.encode(c._data,function(b,e,f){b?a(b):(d.data={name:c._db._name+"-"+c._name,store:e,tableStats:f},c.encode(c._data,function(b,e,f){b?a(b):(d.metaData={name:c._db._name+"-"+c._name+"-metaData",store:e,tableStats:f},a(!1,d))}))})},c.isProcessingQueue()?c.on("queuesComplete",function(){b()}):b()):a&&a("Cannot save a collection that is not attached to a database!"):a&&a("Cannot save a collection with no assigned name!")},e.prototype.loadCustom=function(a,b){var c=this;c._name?c._db?a.data&&a.data.store?a.metaData&&a.metaData.store?c.decode(a.data.store,function(d,e,f){d?b(d):e&&(c.remove({}),c.insert(e),c.decode(a.metaData.store,function(a,d,e){a?b(a):d&&(c.metaData(d),b&&b(a,f,e))}))}):b('No "metaData" key found in passed object!'):b('No "data" key found in passed object!'):b&&b("Cannot load a collection that is not attached to a database!"):b&&b("Cannot load a collection with no assigned name!")},d.prototype.init=function(){i.apply(this,arguments),this.persist=new k(this)},d.prototype.load=new l({"function":function(a){this.$main.call(this,{},a)},"object, function":function(a,b){this.$main.call(this,a,b)},$main:function(a,b){var c,d,e=this._collection,f=e.keys(),g=f.length;c=function(a){a?b&&b(a):(g--,0===g&&b&&b(!1))};for(d in e)e.hasOwnProperty(d)&&(a?e[d].loadCustom(a,c):e[d].load(c))}}),d.prototype.save=new l({"function":function(a){this.$main.call(this,{},a)},"object, function":function(a,b){this.$main.call(this,a,b)},$main:function(a,b){var c,d,e=this._collection,f=e.keys(),g=f.length;c=function(a){a?b&&b(a):(g--,0===g&&b&&b(!1))};for(d in e)e.hasOwnProperty(d)&&(a.custom?e[d].saveCustom(c):e[d].save(c))}}),m.finishModule("Persist"),b.exports=k},{"./Collection":5,"./CollectionGroup":6,"./PersistCompress":35,"./PersistCrypto":36,"./Shared":39,async:41,localforage:77}],35:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("pako"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a){},d.mixin(f.prototype,"Mixin.Common"),f.prototype.encode=function(a,b,c){var d,f,g,h={data:a,type:"fdbCompress",enabled:!1};d=a.length,g=e.deflate(a,{to:"string"}),f=g.length,d>f&&(h.data=g,h.enabled=!0),b.compression={enabled:h.enabled,compressedBytes:f,uncompressedBytes:d,effect:Math.round(100/d*f)+"%"},c(!1,this.jStringify(h),b)},f.prototype.decode=function(a,b,c){var d,f=!1;a?(a=this.jParse(a),a.enabled?(d=e.inflate(a.data,{to:"string"}),f=!0):(d=a.data,f=!1),b.compression={enabled:f},c&&c(!1,d,b)):c&&c(!1,d,b)},d.plugins.FdbCompress=f,b.exports=f},{"./Shared":39,pako:78}],36:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("crypto-js"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a){if(!a||!a.pass)throw'Cannot initialise persistent storage encryption without a passphrase provided in the passed options object as the "pass" field.';this._algo=a.algo||"AES",this._pass=a.pass},d.mixin(f.prototype,"Mixin.Common"),d.synthesize(f.prototype,"pass"),f.prototype.stringify=function(a){var b={ct:a.ciphertext.toString(e.enc.Base64)};return a.iv&&(b.iv=a.iv.toString()),a.salt&&(b.s=a.salt.toString()),this.jStringify(b)},f.prototype.parse=function(a){var b=this.jParse(a),c=e.lib.CipherParams.create({ciphertext:e.enc.Base64.parse(b.ct)});return b.iv&&(c.iv=e.enc.Hex.parse(b.iv)),b.s&&(c.salt=e.enc.Hex.parse(b.s)),c},f.prototype.encode=function(a,b,c){var d,f=this,g={type:"fdbCrypto"};d=e[this._algo].encrypt(a,this._pass,{format:{stringify:function(){return f.stringify.apply(f,arguments)},parse:function(){return f.parse.apply(f,arguments)}}}),g.data=d.toString(),g.enabled=!0,b.encryption={enabled:g.enabled},c&&c(!1,this.jStringify(g),b)},f.prototype.decode=function(a,b,c){var d,f=this;a?(a=this.jParse(a),d=e[this._algo].decrypt(a.data,this._pass,{format:{stringify:function(){return f.stringify.apply(f,arguments)},parse:function(){return f.parse.apply(f,arguments)}}}).toString(e.enc.Utf8),c&&c(!1,d,b)):c&&c(!1,a,b)},d.plugins.FdbCrypto=f,b.exports=f},{"./Shared":39,"crypto-js":50}],37:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a,b,c){if(!(a&&b&&c))throw"ForerunnerDB.ReactorIO: ReactorIO requires in, out and process arguments to instantiate!";if(this._reactorIn=a,this._reactorOut=b,this._chainHandler=c,!a.chain)throw"ForerunnerDB.ReactorIO: ReactorIO requires passed in and out objects to implement the ChainReactor mixin!";a.chain(this),this.chain(b)};d.addModule("ReactorIO",e),e.prototype.drop=function(){return this.isDropped()||(this._state="dropped",this._reactorIn&&this._reactorIn.unChain(this),this._reactorOut&&this.unChain(this._reactorOut),delete this._reactorIn,delete this._reactorOut,delete this._chainHandler,this.emit("drop",this),delete this._listeners),!0},d.synthesize(e.prototype,"state"),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),d.mixin(e.prototype,"Mixin.Events"),d.finishModule("ReactorIO"),b.exports=e},{"./Shared":39}],38:[function(a,b,c){"use strict";var d=function(){this.init.apply(this,arguments)};d.prototype.init=function(){var a=this;this._encoder=[],this._decoder=[],this.registerHandler("$date",function(a){return a instanceof Date?(a.toJSON=function(){return"$date:"+this.toISOString()},!0):!1},function(b){return"string"==typeof b&&0===b.indexOf("$date:")?a.convert(new Date(b.substr(6))):void 0}),this.registerHandler("$regexp",function(a){return a instanceof RegExp?(a.toJSON=function(){return"$regexp:"+this.source.length+":"+this.source+":"+(this.global?"g":"")+(this.ignoreCase?"i":"")},!0):!1},function(b){if("string"==typeof b&&0===b.indexOf("$regexp:")){var c=b.substr(8),d=c.indexOf(":"),e=Number(c.substr(0,d)),f=c.substr(d+1,e),g=c.substr(d+e+2);return a.convert(new RegExp(f,g))}})},d.prototype.registerHandler=function(a,b,c){void 0!==a&&(this._encoder.push(b),this._decoder.push(c))},d.prototype.convert=function(a){var b,c=this._encoder;for(b=0;b<c.length;b++)if(c[b](a))return a;return a},d.prototype.reviver=function(){var a=this._decoder;return function(b,c){var d,e;for(e=0;e<a.length;e++)if(d=a[e](c),void 0!==d)return d;return c}},b.exports=d},{}],39:[function(a,b,c){"use strict";var d=a("./Overload"),e={version:"1.3.732",modules:{},plugins:{},index:{},_synth:{},addModule:function(a,b){this.modules[a]=b,this.emit("moduleLoad",[a,b])},finishModule:function(a){if(!this.modules[a])throw"ForerunnerDB.Shared: finishModule called on a module that has not been registered with addModule(): "+a;this.modules[a]._fdbFinished=!0,this.modules[a].prototype?this.modules[a].prototype.className=a:this.modules[a].className=a,this.emit("moduleFinished",[a,this.modules[a]])},moduleFinished:function(a,b){this.modules[a]&&this.modules[a]._fdbFinished?b&&b(a,this.modules[a]):this.on("moduleFinished",b)},moduleExists:function(a){return Boolean(this.modules[a])},mixin:new d({"object, string":function(a,b){var c;if("string"==typeof b&&(c=this.mixins[b],!c))throw"ForerunnerDB.Shared: Cannot find mixin named: "+b;return this.$main.call(this,a,c)},"object, *":function(a,b){return this.$main.call(this,a,b)},$main:function(a,b){if(b&&"object"==typeof b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}}),synthesize:function(a,b,c){if(this._synth[b]=this._synth[b]||function(a){return void 0!==a?(this["_"+b]=a,this):this["_"+b]},c){var d=this;a[b]=function(){var a,e=this.$super;return this.$super=d._synth[b],a=c.apply(this,arguments),this.$super=e,a}}else a[b]=this._synth[b]},overload:d,mixins:{"Mixin.Common":a("./Mixin.Common"),"Mixin.Events":a("./Mixin.Events"),"Mixin.ChainReactor":a("./Mixin.ChainReactor"),"Mixin.CRUD":a("./Mixin.CRUD"),"Mixin.Constants":a("./Mixin.Constants"),"Mixin.Triggers":a("./Mixin.Triggers"),"Mixin.Sorting":a("./Mixin.Sorting"),"Mixin.Matching":a("./Mixin.Matching"),"Mixin.Updating":a("./Mixin.Updating"),"Mixin.Tags":a("./Mixin.Tags")}};e.mixin(e,"Mixin.Events"),b.exports=e},{"./Mixin.CRUD":18,"./Mixin.ChainReactor":19,"./Mixin.Common":20,"./Mixin.Constants":21,"./Mixin.Events":22,"./Mixin.Matching":23,"./Mixin.Sorting":24,"./Mixin.Tags":25,"./Mixin.Triggers":26,"./Mixin.Updating":27,"./Overload":31}],40:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n=a("./Overload");d=a("./Shared");var o=function(a,b,c){this.init.apply(this,arguments)};d.addModule("View",o),d.mixin(o.prototype,"Mixin.Common"),d.mixin(o.prototype,"Mixin.Matching"),d.mixin(o.prototype,"Mixin.ChainReactor"),d.mixin(o.prototype,"Mixin.Constants"),d.mixin(o.prototype,"Mixin.Triggers"),d.mixin(o.prototype,"Mixin.Tags"),f=a("./Collection"),g=a("./CollectionGroup"),k=a("./ActiveBucket"),j=a("./ReactorIO"),h=f.prototype.init,e=d.modules.Db,i=e.prototype.init,l=d.modules.Path,m=new l,o.prototype.init=function(a,b,c){var d=this;this.sharedPathSolver=m,this._name=a,this._listeners={},this._querySettings={},this._debug={},this.query(b,c,!1),this._collectionDroppedWrap=function(){d._collectionDropped.apply(d,arguments)},this._data=new f(this.name()+"_internal")},o.prototype._handleChainIO=function(a,b){var c,d,e,f,g=a.type;return"setData"!==g&&"insert"!==g&&"update"!==g&&"remove"!==g?!1:(c=Boolean(b._querySettings.options&&b._querySettings.options.$join),d=Boolean(b._querySettings.query),e=void 0!==b._data._transformIn,c||d||e?(f={dataArr:[],removeArr:[]},"insert"===a.type?a.data.dataSet instanceof Array?f.dataArr=a.data.dataSet:f.dataArr=[a.data.dataSet]:"update"===a.type?f.dataArr=a.data.dataSet:"remove"===a.type&&(a.data.dataSet instanceof Array?f.removeArr=a.data.dataSet:f.removeArr=[a.data.dataSet]),f.dataArr instanceof Array||(console.warn("WARNING: dataArr being processed by chain reactor in View class is inconsistent!"),f.dataArr=[]),f.removeArr instanceof Array||(console.warn("WARNING: removeArr being processed by chain reactor in View class is inconsistent!"),f.removeArr=[]),c&&(this.debug()&&console.time(this.logIdentifier()+" :: _handleChainIO_ActiveJoin"),b._handleChainIO_ActiveJoin(a,f),this.debug()&&console.timeEnd(this.logIdentifier()+" :: _handleChainIO_ActiveJoin")),d&&(this.debug()&&console.time(this.logIdentifier()+" :: _handleChainIO_ActiveQuery"),b._handleChainIO_ActiveQuery(a,f),this.debug()&&console.timeEnd(this.logIdentifier()+" :: _handleChainIO_ActiveQuery")),e&&(this.debug()&&console.time(this.logIdentifier()+" :: _handleChainIO_TransformIn"),b._handleChainIO_TransformIn(a,f),this.debug()&&console.timeEnd(this.logIdentifier()+" :: _handleChainIO_TransformIn")),f.dataArr.length||f.removeArr.length?(f.pk=b._data.primaryKey(),f.removeArr.length&&(this.debug()&&console.time(this.logIdentifier()+" :: _handleChainIO_RemovePackets"),b._handleChainIO_RemovePackets(this,a,f),this.debug()&&console.timeEnd(this.logIdentifier()+" :: _handleChainIO_RemovePackets")),f.dataArr.length&&(this.debug()&&console.time(this.logIdentifier()+" :: _handleChainIO_UpsertPackets"),b._handleChainIO_UpsertPackets(this,a,f),this.debug()&&console.timeEnd(this.logIdentifier()+" :: _handleChainIO_UpsertPackets")),!0):!0):!1)},o.prototype._handleChainIO_ActiveJoin=function(a,b){var c,d=b.dataArr;c=this.applyJoin(d,this._querySettings.options.$join,{},{}),this.spliceArrayByIndexList(d,c),b.removeArr=b.removeArr.concat(c)},o.prototype._handleChainIO_ActiveQuery=function(a,b){var c,d=this,e=b.dataArr;for(c=e.length-1;c>=0;c--)d._match(e[c],d._querySettings.query,d._querySettings.options,"and",{})||(b.removeArr.push(e[c]),e.splice(c,1))},o.prototype._handleChainIO_TransformIn=function(a,b){var c,d=this,e=b.dataArr,f=b.removeArr,g=d._data._transformIn;for(c=0;c<e.length;c++)e[c]=g(e[c]);for(c=0;c<f.length;c++)f[c]=g(f[c])},o.prototype._handleChainIO_RemovePackets=function(a,b,c){var d,e,f=[],g=c.pk,h=c.removeArr,i={dataSet:h,query:{$or:f}};for(e=0;e<h.length;e++)d={},d[g]=h[e][g],f.push(d);a.chainSend("remove",i)},o.prototype._handleChainIO_UpsertPackets=function(a,b,c){var d,e,f,g=this._data,h=g._primaryIndex,i=g._primaryCrc,j=c.pk,k=c.dataArr,l=[],m=[];for(f=0;f<k.length;f++)d=k[f],h.get(d[j])?i.get(d[j])!==this.hash(d[j])&&m.push(d):l.push(d);if(l.length&&a.chainSend("insert",{dataSet:l}),m.length)for(f=0;f<m.length;f++)d=m[f],e={},e[j]=d[j],a.chainSend("update",{query:e,update:d,dataSet:[d]})},o.prototype.insert=function(){this._from.insert.apply(this._from,arguments)},o.prototype.update=function(){this._from.update.apply(this._from,arguments)},o.prototype.updateById=function(){this._from.updateById.apply(this._from,arguments)},o.prototype.remove=function(){this._from.remove.apply(this._from,arguments)},o.prototype.find=function(a,b){return this._data.find(a,b)},o.prototype.findOne=function(a,b){return this._data.findOne(a,b)},o.prototype.findById=function(a,b){return this._data.findById(a,b)},o.prototype.findSub=function(a,b,c,d){return this._data.findSub(a,b,c,d)},o.prototype.findSubOne=function(a,b,c,d){return this._data.findSubOne(a,b,c,d)},o.prototype.data=function(){return this._data},o.prototype.from=function(a,b){var c=this;if(void 0!==a){this._from&&(this._from.off("drop",this._collectionDroppedWrap),delete this._from),this._io&&(this._io.drop(),delete this._io),"string"==typeof a&&(a=this._db.collection(a)),"View"===a.className&&(a=a._data,this.debug()&&console.log(this.logIdentifier()+' Using internal data "'+a.instanceIdentifier()+'" for IO graph linking')),this._from=a,this._from.on("drop",this._collectionDroppedWrap),this._io=new j(this._from,this,function(a){return c._handleChainIO.call(this,a,c)}),this._data.primaryKey(a.primaryKey());var d=a.find(this._querySettings.query,this._querySettings.options);return this._data.setData(d,{},b),this._querySettings.options&&this._querySettings.options.$orderBy?this.rebuildActiveBucket(this._querySettings.options.$orderBy):this.rebuildActiveBucket(),this}return this._from},o.prototype._chainHandler=function(a){var b,c,d,e,f,g,h,i;switch(this.debug()&&console.log(this.logIdentifier()+" Received chain reactor data: "+a.type),a.type){case"setData":this.debug()&&console.log(this.logIdentifier()+' Setting data in underlying (internal) view collection "'+this._data.name()+'"');var j=this._from.find(this._querySettings.query,this._querySettings.options);this._data.setData(j),this.rebuildActiveBucket(this._querySettings.options);break;case"insert":if(this.debug()&&console.log(this.logIdentifier()+' Inserting some data into underlying (internal) view collection "'+this._data.name()+'"'),a.data.dataSet=this.decouple(a.data.dataSet),a.data.dataSet instanceof Array||(a.data.dataSet=[a.data.dataSet]),this._querySettings.options&&this._querySettings.options.$orderBy)for(b=a.data.dataSet,c=b.length,d=0;c>d;d++)e=this._activeBucket.insert(b[d]),this._data._insertHandle(b[d],e);else e=this._data._data.length,this._data._insertHandle(a.data.dataSet,e);break;case"update":if(this.debug()&&console.log(this.logIdentifier()+' Updating some data in underlying (internal) view collection "'+this._data.name()+'"'),g=this._data.primaryKey(),f=this._data._handleUpdate(a.data.query,a.data.update,a.data.options),this._querySettings.options&&this._querySettings.options.$orderBy)for(c=f.length,d=0;c>d;d++)h=f[d],this._activeBucket.remove(h),i=this._data._data.indexOf(h),e=this._activeBucket.insert(h),i!==e&&this._data._updateSpliceMove(this._data._data,i,e);break;case"remove":if(this.debug()&&console.log(this.logIdentifier()+' Removing some data from underlying (internal) view collection "'+this._data.name()+'"'),this._data.remove(a.data.query,a.options),this._querySettings.options&&this._querySettings.options.$orderBy)for(b=a.data.dataSet,c=b.length,d=0;c>d;d++)this._activeBucket.remove(b[d])}},o.prototype._collectionDropped=function(a){a&&delete this._from},o.prototype.ensureIndex=function(){return this._data.ensureIndex.apply(this._data,arguments)},o.prototype.on=function(){return this._data.on.apply(this._data,arguments)},o.prototype.off=function(){return this._data.off.apply(this._data,arguments)},o.prototype.emit=function(){return this._data.emit.apply(this._data,arguments)},o.prototype.deferEmit=function(){return this._data.deferEmit.apply(this._data,arguments)},o.prototype.distinct=function(a,b,c){return this._data.distinct(a,b,c)},o.prototype.primaryKey=function(){return this._data.primaryKey()},o.prototype.drop=function(a){return this.isDropped()?!1:(this._from&&(this._from.off("drop",this._collectionDroppedWrap),this._from._removeView(this)),(this.debug()||this._db&&this._db.debug())&&console.log(this.logIdentifier()+" Dropping"),this._state="dropped",this._io&&this._io.drop(),this._data&&this._data.drop(),this._db&&this._name&&delete this._db._view[this._name],this.emit("drop",this),a&&a(!1,!0),delete this._chain,delete this._from,delete this._data,delete this._io,delete this._listeners,delete this._querySettings,delete this._db,!0)},o.prototype.queryData=function(a,b,c){return void 0!==a&&(this._querySettings.query=a,a.$findSub&&!a.$findSub.$from&&(a.$findSub.$from=this._data.name()),a.$findSubOne&&!a.$findSubOne.$from&&(a.$findSubOne.$from=this._data.name())),void 0!==b&&(this._querySettings.options=b),(void 0!==a||void 0!==b)&&(void 0===c||c===!0)&&this.refresh(),void 0!==a&&this.emit("queryChange",a),void 0!==b&&this.emit("queryOptionsChange",b),void 0!==a||void 0!==b?this:this._querySettings},o.prototype.queryAdd=function(a,b,c){this._querySettings.query=this._querySettings.query||{};var d,e=this._querySettings.query;if(void 0!==a)for(d in a)a.hasOwnProperty(d)&&(void 0===e[d]||void 0!==e[d]&&b!==!1)&&(e[d]=a[d]);(void 0===c||c===!0)&&this.refresh(),void 0!==e&&this.emit("queryChange",e)},o.prototype.queryRemove=function(a,b){var c,d=this._querySettings.query;if(d){if(void 0!==a)for(c in a)a.hasOwnProperty(c)&&delete d[c];(void 0===b||b===!0)&&this.refresh(),void 0!==d&&this.emit("queryChange",d)}},o.prototype.query=new n({"":function(){return this._querySettings.query},object:function(a){return this.$main.call(this,a,void 0,!0)},"*, boolean":function(a,b){return this.$main.call(this,a,void 0,b)},"object, object":function(a,b){return this.$main.call(this,a,b,!0)},"*, *, boolean":function(a,b,c){return this.$main.call(this,a,b,c)},$main:function(a,b,c){return void 0!==a&&(this._querySettings.query=a,a.$findSub&&!a.$findSub.$from&&(a.$findSub.$from=this._data.name()),a.$findSubOne&&!a.$findSubOne.$from&&(a.$findSubOne.$from=this._data.name())),void 0!==b&&(this._querySettings.options=b),(void 0!==a||void 0!==b)&&(void 0===c||c===!0)&&this.refresh(),void 0!==a&&this.emit("queryChange",a),void 0!==b&&this.emit("queryOptionsChange",b),void 0!==a||void 0!==b?this:this._querySettings}}),o.prototype.orderBy=function(a){if(void 0!==a){var b=this.queryOptions()||{};return b.$orderBy=a,this.queryOptions(b),this}return(this.queryOptions()||{}).$orderBy},o.prototype.page=function(a){if(void 0!==a){var b=this.queryOptions()||{};return a!==b.$page&&(b.$page=a,this.queryOptions(b)),this}return(this.queryOptions()||{}).$page},o.prototype.pageFirst=function(){return this.page(0)},o.prototype.pageLast=function(){var a=this.cursor().pages,b=void 0!==a?a:0;return this.page(b-1)},o.prototype.pageScan=function(a){if(void 0!==a){var b=this.cursor().pages,c=this.queryOptions()||{},d=void 0!==c.$page?c.$page:0;return d+=a,0>d&&(d=0),d>=b&&(d=b-1),this.page(d)}},o.prototype.queryOptions=function(a,b){return void 0!==a?(this._querySettings.options=a,void 0===a.$decouple&&(a.$decouple=!0),void 0===b||b===!0?this.refresh():this.rebuildActiveBucket(a.$orderBy),void 0!==a&&this.emit("queryOptionsChange",a),this):this._querySettings.options},o.prototype.rebuildActiveBucket=function(a){if(a){var b=this._data._data,c=b.length;this._activeBucket=new k(a),this._activeBucket.primaryKey(this._data.primaryKey());for(var d=0;c>d;d++)this._activeBucket.insert(b[d])}else delete this._activeBucket},o.prototype.refresh=function(){var a,b,c,d,e=this;if(this._from&&(this._data.remove(),a=this._from.find(this._querySettings.query,this._querySettings.options),this.cursor(a.$cursor),this._data.insert(a),this._data._data.$cursor=a.$cursor,this._data._data.$cursor=a.$cursor),this._querySettings&&this._querySettings.options&&this._querySettings.options.$join&&this._querySettings.options.$join.length){if(e.__joinChange=e.__joinChange||function(){e._joinChange()},this._joinCollections&&this._joinCollections.length)for(c=0;c<this._joinCollections.length;c++)this._db.collection(this._joinCollections[c]).off("immediateChange",e.__joinChange);for(b=this._querySettings.options.$join,this._joinCollections=[],c=0;c<b.length;c++)for(d in b[c])b[c].hasOwnProperty(d)&&this._joinCollections.push(d);if(this._joinCollections.length)for(c=0;c<this._joinCollections.length;c++)this._db.collection(this._joinCollections[c]).on("immediateChange",e.__joinChange)}return this._querySettings.options&&this._querySettings.options.$orderBy?this.rebuildActiveBucket(this._querySettings.options.$orderBy):this.rebuildActiveBucket(),this},o.prototype._joinChange=function(a,b){this.emit("joinChange"),this.refresh()},o.prototype.count=function(){return this._data.count.apply(this._data,arguments)},o.prototype.subset=function(){return this._data.subset.apply(this._data,arguments)},o.prototype.transform=function(a){var b,c;return b=this._data.transform(),this._data.transform(a),c=this._data.transform(),c.enabled&&c.dataIn&&(b.enabled!==c.enabled||b.dataIn!==c.dataIn)&&this.refresh(),c},o.prototype.filter=function(a,b,c){return this._data.filter(a,b,c)},o.prototype.data=function(){return this._data},o.prototype.indexOf=function(){return this._data.indexOf.apply(this._data,arguments)},d.synthesize(o.prototype,"db",function(a){return a&&(this._data.db(a),this.debug(a.debug()),this._data.debug(a.debug())),this.$super.apply(this,arguments)}),d.synthesize(o.prototype,"state"),d.synthesize(o.prototype,"name"),d.synthesize(o.prototype,"cursor",function(a){return void 0===a?this._cursor||{}:void this.$super.apply(this,arguments)}),f.prototype.init=function(){this._view=[],h.apply(this,arguments)},f.prototype.view=function(a,b,c){if(this._db&&this._db._view){if(this._db._view[a])throw this.logIdentifier()+" Cannot create a view using this collection because a view with this name already exists: "+a;var d=new o(a,b,c).db(this._db).from(this);return this._view=this._view||[],this._view.push(d),d}},f.prototype._addView=g.prototype._addView=function(a){return void 0!==a&&this._view.push(a),this},f.prototype._removeView=g.prototype._removeView=function(a){if(void 0!==a){var b=this._view.indexOf(a);b>-1&&this._view.splice(b,1)}return this},e.prototype.init=function(){this._view={},i.apply(this,arguments)},e.prototype.view=function(a){var b=this;return a instanceof o?a:this._view[a]?this._view[a]:((this.debug()||this._db&&this._db.debug())&&console.log(this.logIdentifier()+" Creating view "+a),this._view[a]=new o(a).db(this),b.emit("create",b._view[a],"view",a),this._view[a])},e.prototype.viewExists=function(a){return Boolean(this._view[a])},e.prototype.views=function(){var a,b,c=[];for(b in this._view)this._view.hasOwnProperty(b)&&(a=this._view[b],c.push({name:b,count:a.count(),linked:void 0!==a.isLinked?a.isLinked():!1}));return c},d.finishModule("View"),b.exports=o},{"./ActiveBucket":2,"./Collection":5,"./CollectionGroup":6,"./Overload":31,"./ReactorIO":37,"./Shared":39}],41:[function(a,b,c){(function(a,c){!function(){function d(){}function e(a){return a}function f(a){return!!a}function g(a){return!a}function h(a){return function(){if(null===a)throw new Error("Callback was already called.");a.apply(this,arguments),a=null}}function i(a){return function(){null!==a&&(a.apply(this,arguments),a=null)}}function j(a){return N(a)||"number"==typeof a.length&&a.length>=0&&a.length%1===0}function k(a,b){for(var c=-1,d=a.length;++c<d;)b(a[c],c,a)}function l(a,b){for(var c=-1,d=a.length,e=Array(d);++c<d;)e[c]=b(a[c],c,a);return e}function m(a){return l(Array(a),function(a,b){return b})}function n(a,b,c){return k(a,function(a,d,e){c=b(c,a,d,e)}),c}function o(a,b){k(P(a),function(c){b(a[c],c)})}function p(a,b){for(var c=0;c<a.length;c++)if(a[c]===b)return c;return-1}function q(a){var b,c,d=-1;return j(a)?(b=a.length,function(){return d++,b>d?d:null}):(c=P(a),b=c.length,function(){return d++,b>d?c[d]:null})}function r(a,b){return b=null==b?a.length-1:+b,function(){for(var c=Math.max(arguments.length-b,0),d=Array(c),e=0;c>e;e++)d[e]=arguments[e+b];switch(b){case 0:return a.call(this,d);case 1:return a.call(this,arguments[0],d)}}}function s(a){return function(b,c,d){return a(b,d)}}function t(a){return function(b,c,e){e=i(e||d),b=b||[];var f=q(b);if(0>=a)return e(null);var g=!1,j=0,k=!1;!function l(){if(g&&0>=j)return e(null);for(;a>j&&!k;){var d=f();if(null===d)return g=!0,void(0>=j&&e(null));j+=1,c(b[d],d,h(function(a){j-=1,a?(e(a),k=!0):l()}))}}()}}function u(a){return function(b,c,d){return a(K.eachOf,b,c,d)}}function v(a){return function(b,c,d,e){return a(t(c),b,d,e)}}function w(a){return function(b,c,d){return a(K.eachOfSeries,b,c,d)}}function x(a,b,c,e){e=i(e||d),b=b||[];var f=j(b)?[]:{};a(b,function(a,b,d){c(a,function(a,c){f[b]=c,d(a)})},function(a){e(a,f)})}function y(a,b,c,d){var e=[];a(b,function(a,b,d){c(a,function(c){c&&e.push({index:b,value:a}),d()})},function(){d(l(e.sort(function(a,b){return a.index-b.index}),function(a){return a.value}))})}function z(a,b,c,d){y(a,b,function(a,b){c(a,function(a){b(!a)})},d)}function A(a,b,c){return function(d,e,f,g){function h(){g&&g(c(!1,void 0))}function i(a,d,e){return g?void f(a,function(d){g&&b(d)&&(g(c(!0,a)),g=f=!1),e()}):e()}arguments.length>3?a(d,e,i,h):(g=f,f=e,a(d,i,h))}}function B(a,b){return b}function C(a,b,c){c=c||d;var e=j(b)?[]:{};a(b,function(a,b,c){a(r(function(a,d){d.length<=1&&(d=d[0]),e[b]=d,c(a)}))},function(a){c(a,e)})}function D(a,b,c,d){var e=[];a(b,function(a,b,d){c(a,function(a,b){e=e.concat(b||[]),d(a)})},function(a){d(a,e)})}function E(a,b,c){function e(a,b,c,e){if(null!=e&&"function"!=typeof e)throw new Error("task callback must be a function");return a.started=!0,N(b)||(b=[b]),0===b.length&&a.idle()?K.setImmediate(function(){a.drain()}):(k(b,function(b){var f={data:b,callback:e||d};c?a.tasks.unshift(f):a.tasks.push(f),a.tasks.length===a.concurrency&&a.saturated()}),void K.setImmediate(a.process))}function f(a,b){return function(){g-=1;var c=!1,d=arguments;k(b,function(a){k(i,function(b,d){b!==a||c||(i.splice(d,1),c=!0)}),a.callback.apply(a,d)}),a.tasks.length+g===0&&a.drain(),a.process()}}if(null==b)b=1;else if(0===b)throw new Error("Concurrency must not be zero");var g=0,i=[],j={tasks:[],concurrency:b,payload:c,saturated:d,empty:d,drain:d,started:!1,paused:!1,push:function(a,b){e(j,a,!1,b)},kill:function(){j.drain=d,j.tasks=[]},unshift:function(a,b){e(j,a,!0,b)},process:function(){if(!j.paused&&g<j.concurrency&&j.tasks.length)for(;g<j.concurrency&&j.tasks.length;){var b=j.payload?j.tasks.splice(0,j.payload):j.tasks.splice(0,j.tasks.length),c=l(b,function(a){return a.data});0===j.tasks.length&&j.empty(),g+=1,i.push(b[0]);var d=h(f(j,b));a(c,d)}},length:function(){return j.tasks.length},running:function(){return g},workersList:function(){return i},idle:function(){return j.tasks.length+g===0},pause:function(){j.paused=!0},resume:function(){if(j.paused!==!1){j.paused=!1;for(var a=Math.min(j.concurrency,j.tasks.length),b=1;a>=b;b++)K.setImmediate(j.process)}}};return j}function F(a){return r(function(b,c){b.apply(null,c.concat([r(function(b,c){"object"==typeof console&&(b?console.error&&console.error(b):console[a]&&k(c,function(b){ console[a](b)}))})]))})}function G(a){return function(b,c,d){a(m(b),c,d)}}function H(a){return r(function(b,c){var d=r(function(c){var d=this,e=c.pop();return a(b,function(a,b,e){a.apply(d,c.concat([e]))},e)});return c.length?d.apply(this,c):d})}function I(a){return r(function(b){var c=b.pop();b.push(function(){var a=arguments;d?K.setImmediate(function(){c.apply(null,a)}):c.apply(null,a)});var d=!0;a.apply(this,b),d=!1})}var J,K={},L="object"==typeof self&&self.self===self&&self||"object"==typeof c&&c.global===c&&c||this;null!=L&&(J=L.async),K.noConflict=function(){return L.async=J,K};var M=Object.prototype.toString,N=Array.isArray||function(a){return"[object Array]"===M.call(a)},O=function(a){var b=typeof a;return"function"===b||"object"===b&&!!a},P=Object.keys||function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c);return b},Q="function"==typeof setImmediate&&setImmediate,R=Q?function(a){Q(a)}:function(a){setTimeout(a,0)};"object"==typeof a&&"function"==typeof a.nextTick?K.nextTick=a.nextTick:K.nextTick=R,K.setImmediate=Q?R:K.nextTick,K.forEach=K.each=function(a,b,c){return K.eachOf(a,s(b),c)},K.forEachSeries=K.eachSeries=function(a,b,c){return K.eachOfSeries(a,s(b),c)},K.forEachLimit=K.eachLimit=function(a,b,c,d){return t(b)(a,s(c),d)},K.forEachOf=K.eachOf=function(a,b,c){function e(a){j--,a?c(a):null===f&&0>=j&&c(null)}c=i(c||d),a=a||[];for(var f,g=q(a),j=0;null!=(f=g());)j+=1,b(a[f],f,h(e));0===j&&c(null)},K.forEachOfSeries=K.eachOfSeries=function(a,b,c){function e(){var d=!0;return null===g?c(null):(b(a[g],g,h(function(a){if(a)c(a);else{if(g=f(),null===g)return c(null);d?K.setImmediate(e):e()}})),void(d=!1))}c=i(c||d),a=a||[];var f=q(a),g=f();e()},K.forEachOfLimit=K.eachOfLimit=function(a,b,c,d){t(b)(a,c,d)},K.map=u(x),K.mapSeries=w(x),K.mapLimit=v(x),K.inject=K.foldl=K.reduce=function(a,b,c,d){K.eachOfSeries(a,function(a,d,e){c(b,a,function(a,c){b=c,e(a)})},function(a){d(a,b)})},K.foldr=K.reduceRight=function(a,b,c,d){var f=l(a,e).reverse();K.reduce(f,b,c,d)},K.transform=function(a,b,c,d){3===arguments.length&&(d=c,c=b,b=N(a)?[]:{}),K.eachOf(a,function(a,d,e){c(b,a,d,e)},function(a){d(a,b)})},K.select=K.filter=u(y),K.selectLimit=K.filterLimit=v(y),K.selectSeries=K.filterSeries=w(y),K.reject=u(z),K.rejectLimit=v(z),K.rejectSeries=w(z),K.any=K.some=A(K.eachOf,f,e),K.someLimit=A(K.eachOfLimit,f,e),K.all=K.every=A(K.eachOf,g,g),K.everyLimit=A(K.eachOfLimit,g,g),K.detect=A(K.eachOf,e,B),K.detectSeries=A(K.eachOfSeries,e,B),K.detectLimit=A(K.eachOfLimit,e,B),K.sortBy=function(a,b,c){function d(a,b){var c=a.criteria,d=b.criteria;return d>c?-1:c>d?1:0}K.map(a,function(a,c){b(a,function(b,d){b?c(b):c(null,{value:a,criteria:d})})},function(a,b){return a?c(a):void c(null,l(b.sort(d),function(a){return a.value}))})},K.auto=function(a,b,c){function e(a){q.unshift(a)}function f(a){var b=p(q,a);b>=0&&q.splice(b,1)}function g(){j--,k(q.slice(0),function(a){a()})}c||(c=b,b=null),c=i(c||d);var h=P(a),j=h.length;if(!j)return c(null);b||(b=j);var l={},m=0,q=[];e(function(){j||c(null,l)}),k(h,function(d){function h(){return b>m&&n(s,function(a,b){return a&&l.hasOwnProperty(b)},!0)&&!l.hasOwnProperty(d)}function i(){h()&&(m++,f(i),k[k.length-1](q,l))}for(var j,k=N(a[d])?a[d]:[a[d]],q=r(function(a,b){if(m--,b.length<=1&&(b=b[0]),a){var e={};o(l,function(a,b){e[b]=a}),e[d]=b,c(a,e)}else l[d]=b,K.setImmediate(g)}),s=k.slice(0,k.length-1),t=s.length;t--;){if(!(j=a[s[t]]))throw new Error("Has inexistant dependency");if(N(j)&&p(j,d)>=0)throw new Error("Has cyclic dependencies")}h()?(m++,k[k.length-1](q,l)):e(i)})},K.retry=function(a,b,c){function d(a,b){if("number"==typeof b)a.times=parseInt(b,10)||f;else{if("object"!=typeof b)throw new Error("Unsupported argument type for 'times': "+typeof b);a.times=parseInt(b.times,10)||f,a.interval=parseInt(b.interval,10)||g}}function e(a,b){function c(a,c){return function(d){a(function(a,b){d(!a||c,{err:a,result:b})},b)}}function d(a){return function(b){setTimeout(function(){b(null)},a)}}for(;i.times;){var e=!(i.times-=1);h.push(c(i.task,e)),!e&&i.interval>0&&h.push(d(i.interval))}K.series(h,function(b,c){c=c[c.length-1],(a||i.callback)(c.err,c.result)})}var f=5,g=0,h=[],i={times:f,interval:g},j=arguments.length;if(1>j||j>3)throw new Error("Invalid arguments - must be either (task), (task, callback), (times, task) or (times, task, callback)");return 2>=j&&"function"==typeof a&&(c=b,b=a),"function"!=typeof a&&d(i,a),i.callback=c,i.task=b,i.callback?e():e},K.waterfall=function(a,b){function c(a){return r(function(d,e){if(d)b.apply(null,[d].concat(e));else{var f=a.next();f?e.push(c(f)):e.push(b),I(a).apply(null,e)}})}if(b=i(b||d),!N(a)){var e=new Error("First argument to waterfall must be an array of functions");return b(e)}return a.length?void c(K.iterator(a))():b()},K.parallel=function(a,b){C(K.eachOf,a,b)},K.parallelLimit=function(a,b,c){C(t(b),a,c)},K.series=function(a,b){C(K.eachOfSeries,a,b)},K.iterator=function(a){function b(c){function d(){return a.length&&a[c].apply(null,arguments),d.next()}return d.next=function(){return c<a.length-1?b(c+1):null},d}return b(0)},K.apply=r(function(a,b){return r(function(c){return a.apply(null,b.concat(c))})}),K.concat=u(D),K.concatSeries=w(D),K.whilst=function(a,b,c){if(c=c||d,a()){var e=r(function(d,f){d?c(d):a.apply(this,f)?b(e):c(null)});b(e)}else c(null)},K.doWhilst=function(a,b,c){var d=0;return K.whilst(function(){return++d<=1||b.apply(this,arguments)},a,c)},K.until=function(a,b,c){return K.whilst(function(){return!a.apply(this,arguments)},b,c)},K.doUntil=function(a,b,c){return K.doWhilst(a,function(){return!b.apply(this,arguments)},c)},K.during=function(a,b,c){c=c||d;var e=r(function(b,d){b?c(b):(d.push(f),a.apply(this,d))}),f=function(a,d){a?c(a):d?b(e):c(null)};a(f)},K.doDuring=function(a,b,c){var d=0;K.during(function(a){d++<1?a(null,!0):b.apply(this,arguments)},a,c)},K.queue=function(a,b){var c=E(function(b,c){a(b[0],c)},b,1);return c},K.priorityQueue=function(a,b){function c(a,b){return a.priority-b.priority}function e(a,b,c){for(var d=-1,e=a.length-1;e>d;){var f=d+(e-d+1>>>1);c(b,a[f])>=0?d=f:e=f-1}return d}function f(a,b,f,g){if(null!=g&&"function"!=typeof g)throw new Error("task callback must be a function");return a.started=!0,N(b)||(b=[b]),0===b.length?K.setImmediate(function(){a.drain()}):void k(b,function(b){var h={data:b,priority:f,callback:"function"==typeof g?g:d};a.tasks.splice(e(a.tasks,h,c)+1,0,h),a.tasks.length===a.concurrency&&a.saturated(),K.setImmediate(a.process)})}var g=K.queue(a,b);return g.push=function(a,b,c){f(g,a,b,c)},delete g.unshift,g},K.cargo=function(a,b){return E(a,1,b)},K.log=F("log"),K.dir=F("dir"),K.memoize=function(a,b){var c={},d={};b=b||e;var f=r(function(e){var f=e.pop(),g=b.apply(null,e);g in c?K.setImmediate(function(){f.apply(null,c[g])}):g in d?d[g].push(f):(d[g]=[f],a.apply(null,e.concat([r(function(a){c[g]=a;var b=d[g];delete d[g];for(var e=0,f=b.length;f>e;e++)b[e].apply(null,a)})])))});return f.memo=c,f.unmemoized=a,f},K.unmemoize=function(a){return function(){return(a.unmemoized||a).apply(null,arguments)}},K.times=G(K.map),K.timesSeries=G(K.mapSeries),K.timesLimit=function(a,b,c,d){return K.mapLimit(m(a),b,c,d)},K.seq=function(){var a=arguments;return r(function(b){var c=this,e=b[b.length-1];"function"==typeof e?b.pop():e=d,K.reduce(a,b,function(a,b,d){b.apply(c,a.concat([r(function(a,b){d(a,b)})]))},function(a,b){e.apply(c,[a].concat(b))})})},K.compose=function(){return K.seq.apply(null,Array.prototype.reverse.call(arguments))},K.applyEach=H(K.eachOf),K.applyEachSeries=H(K.eachOfSeries),K.forever=function(a,b){function c(a){return a?e(a):void f(c)}var e=h(b||d),f=I(a);c()},K.ensureAsync=I,K.constant=r(function(a){var b=[null].concat(a);return function(a){return a.apply(this,b)}}),K.wrapSync=K.asyncify=function(a){return r(function(b){var c,d=b.pop();try{c=a.apply(this,b)}catch(e){return d(e)}O(c)&&"function"==typeof c.then?c.then(function(a){d(null,a)})["catch"](function(a){d(a.message?a:new Error(a))}):d(null,c)})},"object"==typeof b&&b.exports?b.exports=K:"function"==typeof define&&define.amd?define([],function(){return K}):L.async=K}()}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:76}],42:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.BlockCipher,e=b.algo,f=[],g=[],h=[],i=[],j=[],k=[],l=[],m=[],n=[],o=[];!function(){for(var a=[],b=0;256>b;b++)128>b?a[b]=b<<1:a[b]=b<<1^283;for(var c=0,d=0,b=0;256>b;b++){var e=d^d<<1^d<<2^d<<3^d<<4;e=e>>>8^255&e^99,f[c]=e,g[e]=c;var p=a[c],q=a[p],r=a[q],s=257*a[e]^16843008*e;h[c]=s<<24|s>>>8,i[c]=s<<16|s>>>16,j[c]=s<<8|s>>>24,k[c]=s;var s=16843009*r^65537*q^257*p^16843008*c;l[e]=s<<24|s>>>8,m[e]=s<<16|s>>>16,n[e]=s<<8|s>>>24,o[e]=s,c?(c=p^a[a[a[r^p]]],d^=a[a[d]]):c=d=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],q=e.AES=d.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes/4,d=this._nRounds=c+6,e=4*(d+1),g=this._keySchedule=[],h=0;e>h;h++)if(c>h)g[h]=b[h];else{var i=g[h-1];h%c?c>6&&h%c==4&&(i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i]):(i=i<<8|i>>>24,i=f[i>>>24]<<24|f[i>>>16&255]<<16|f[i>>>8&255]<<8|f[255&i],i^=p[h/c|0]<<24),g[h]=g[h-c]^i}for(var j=this._invKeySchedule=[],k=0;e>k;k++){var h=e-k;if(k%4)var i=g[h];else var i=g[h-4];4>k||4>=h?j[k]=i:j[k]=l[f[i>>>24]]^m[f[i>>>16&255]]^n[f[i>>>8&255]]^o[f[255&i]]}},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,h,i,j,k,f)},decryptBlock:function(a,b){var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c,this._doCryptBlock(a,b,this._invKeySchedule,l,m,n,o,g);var c=a[b+1];a[b+1]=a[b+3],a[b+3]=c},_doCryptBlock:function(a,b,c,d,e,f,g,h){for(var i=this._nRounds,j=a[b]^c[0],k=a[b+1]^c[1],l=a[b+2]^c[2],m=a[b+3]^c[3],n=4,o=1;i>o;o++){var p=d[j>>>24]^e[k>>>16&255]^f[l>>>8&255]^g[255&m]^c[n++],q=d[k>>>24]^e[l>>>16&255]^f[m>>>8&255]^g[255&j]^c[n++],r=d[l>>>24]^e[m>>>16&255]^f[j>>>8&255]^g[255&k]^c[n++],s=d[m>>>24]^e[j>>>16&255]^f[k>>>8&255]^g[255&l]^c[n++];j=p,k=q,l=r,m=s}var p=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[255&m])^c[n++],q=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[255&j])^c[n++],r=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[255&k])^c[n++],s=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[255&l])^c[n++];a[b]=p,a[b+1]=q,a[b+2]=r,a[b+3]=s},keySize:8});b.AES=d._createHelper(q)}(),a.AES})},{"./cipher-core":43,"./core":44,"./enc-base64":45,"./evpkdf":47,"./md5":52}],43:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){a.lib.Cipher||function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=d.BufferedBlockAlgorithm,h=c.enc,i=(h.Utf8,h.Base64),j=c.algo,k=j.EvpKDF,l=d.Cipher=g.extend({cfg:e.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c),this._xformMode=a,this._key=b,this.reset()},reset:function(){g.reset.call(this),this._doReset()},process:function(a){return this._append(a),this._process()},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function a(a){return"string"==typeof a?x:u}return function(b){return{encrypt:function(c,d,e){return a(d).encrypt(b,c,d,e)},decrypt:function(c,d,e){return a(d).decrypt(b,c,d,e)}}}}()}),m=(d.StreamCipher=l.extend({_doFinalize:function(){var a=this._process(!0);return a},blockSize:1}),c.mode={}),n=d.BlockCipherMode=e.extend({createEncryptor:function(a,b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a,this._iv=b}}),o=m.CBC=function(){function a(a,c,d){var e=this._iv;if(e){var f=e;this._iv=b}else var f=this._prevBlock;for(var g=0;d>g;g++)a[c+g]^=f[g]}var c=n.extend();return c.Encryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize;a.call(this,b,c,e),d.encryptBlock(b,c),this._prevBlock=b.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(b,c){var d=this._cipher,e=d.blockSize,f=b.slice(c,c+e);d.decryptBlock(b,c),a.call(this,b,c,e),this._prevBlock=f}}),c}(),p=c.pad={},q=p.Pkcs7={pad:function(a,b){for(var c=4*b,d=c-a.sigBytes%c,e=d<<24|d<<16|d<<8|d,g=[],h=0;d>h;h+=4)g.push(e);var i=f.create(g,d);a.concat(i)},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},r=(d.BlockCipher=l.extend({cfg:l.cfg.extend({mode:o,padding:q}),reset:function(){l.reset.call(this);var a=this.cfg,b=a.iv,c=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var d=c.createEncryptor;else{var d=c.createDecryptor;this._minBufferSize=1}this._mode=d.call(c,this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else{var b=this._process(!0);a.unpad(b)}return b},blockSize:4}),d.CipherParams=e.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}})),s=c.format={},t=s.OpenSSL={stringify:function(a){var b=a.ciphertext,c=a.salt;if(c)var d=f.create([1398893684,1701076831]).concat(c).concat(b);else var d=b;return d.toString(i)},parse:function(a){var b=i.parse(a),c=b.words;if(1398893684==c[0]&&1701076831==c[1]){var d=f.create(c.slice(2,4));c.splice(0,4),b.sigBytes-=16}return r.create({ciphertext:b,salt:d})}},u=d.SerializableCipher=e.extend({cfg:e.extend({format:t}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=a.createEncryptor(c,d),f=e.finalize(b),g=e.cfg;return r.create({ciphertext:f,key:c,iv:g.iv,algorithm:a,mode:g.mode,padding:g.padding,blockSize:a.blockSize,formatter:d.format})},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=a.createDecryptor(c,d).finalize(b.ciphertext);return e},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),v=c.kdf={},w=v.OpenSSL={execute:function(a,b,c,d){d||(d=f.random(8));var e=k.create({keySize:b+c}).compute(a,d),g=f.create(e.words.slice(b),4*c);return e.sigBytes=4*b,r.create({key:e,iv:g,salt:d})}},x=d.PasswordBasedCipher=u.extend({cfg:u.cfg.extend({kdf:w}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var e=d.kdf.execute(c,a.keySize,a.ivSize);d.iv=e.iv;var f=u.encrypt.call(this,a,b,e.key,d);return f.mixIn(e),f},decrypt:function(a,b,c,d){d=this.cfg.extend(d),b=this._parse(b,d.format);var e=d.kdf.execute(c,a.keySize,a.ivSize,b.salt);d.iv=e.iv;var f=u.decrypt.call(this,a,b,e.key,d);return f}})}()})},{"./core":44}],44:[function(a,b,c){!function(a,d){"object"==typeof c?b.exports=c=d():"function"==typeof define&&define.amd?define([],d):a.CryptoJS=d()}(this,function(){var a=a||function(a,b){var c={},d=c.lib={},e=d.Base=function(){function a(){}return{extend:function(b){a.prototype=this;var c=new a;return b&&c.mixIn(b),c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)}),c.init.prototype=c,c.$super=this,c},create:function(){var a=this.extend();return a.init.apply(a,arguments),a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=d.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var b=this.words,c=a.words,d=this.sigBytes,e=a.sigBytes;if(this.clamp(),d%4)for(var f=0;e>f;f++){var g=c[f>>>2]>>>24-f%4*8&255;b[d+f>>>2]|=g<<24-(d+f)%4*8}else for(var f=0;e>f;f+=4)b[d+f>>>2]=c[f>>>2];return this.sigBytes+=e,this},clamp:function(){var b=this.words,c=this.sigBytes;b[c>>>2]&=4294967295<<32-c%4*8,b.length=a.ceil(c/4)},clone:function(){var a=e.clone.call(this);return a.words=this.words.slice(0),a},random:function(b){for(var c,d=[],e=function(b){var b=b,c=987654321,d=4294967295;return function(){c=36969*(65535&c)+(c>>16)&d,b=18e3*(65535&b)+(b>>16)&d;var e=(c<<16)+b&d;return e/=4294967296,e+=.5,e*(a.random()>.5?1:-1)}},g=0;b>g;g+=4){var h=e(4294967296*(c||a.random()));c=987654071*h(),d.push(4294967296*h()|0)}return new f.init(d,b)}}),g=c.enc={},h=g.Hex={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push((f>>>4).toString(16)),d.push((15&f).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d+=2)c[d>>>3]|=parseInt(a.substr(d,2),16)<<24-d%8*4;return new f.init(c,b/2)}},i=g.Latin1={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e++){var f=b[e>>>2]>>>24-e%4*8&255;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>2]|=(255&a.charCodeAt(d))<<24-d%4*8;return new f.init(c,b)}},j=g.Utf8={stringify:function(a){try{return decodeURIComponent(escape(i.stringify(a)))}catch(b){throw new Error("Malformed UTF-8 data")}},parse:function(a){return i.parse(unescape(encodeURIComponent(a)))}},k=d.BufferedBlockAlgorithm=e.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a)),this._data.concat(a),this._nDataBytes+=a.sigBytes},_process:function(b){var c=this._data,d=c.words,e=c.sigBytes,g=this.blockSize,h=4*g,i=e/h;i=b?a.ceil(i):a.max((0|i)-this._minBufferSize,0);var j=i*g,k=a.min(4*j,e);if(j){for(var l=0;j>l;l+=g)this._doProcessBlock(d,l);var m=d.splice(0,j);c.sigBytes-=k}return new f.init(m,k)},clone:function(){var a=e.clone.call(this);return a._data=this._data.clone(),a},_minBufferSize:0}),l=(d.Hasher=k.extend({cfg:e.extend(),init:function(a){this.cfg=this.cfg.extend(a),this.reset()},reset:function(){k.reset.call(this),this._doReset()},update:function(a){return this._append(a),this._process(),this},finalize:function(a){a&&this._append(a);var b=this._doFinalize();return b},blockSize:16,_createHelper:function(a){return function(b,c){return new a.init(c).finalize(b)}},_createHmacHelper:function(a){return function(b,c){return new l.HMAC.init(a,c).finalize(b)}}}),c.algo={});return c}(Math);return a})},{}],45:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.WordArray,e=b.enc;e.Base64={stringify:function(a){var b=a.words,c=a.sigBytes,d=this._map;a.clamp();for(var e=[],f=0;c>f;f+=3)for(var g=b[f>>>2]>>>24-f%4*8&255,h=b[f+1>>>2]>>>24-(f+1)%4*8&255,i=b[f+2>>>2]>>>24-(f+2)%4*8&255,j=g<<16|h<<8|i,k=0;4>k&&c>f+.75*k;k++)e.push(d.charAt(j>>>6*(3-k)&63));var l=d.charAt(64);if(l)for(;e.length%4;)e.push(l);return e.join("")},parse:function(a){var b=a.length,c=this._map,e=c.charAt(64);if(e){var f=a.indexOf(e);-1!=f&&(b=f)}for(var g=[],h=0,i=0;b>i;i++)if(i%4){var j=c.indexOf(a.charAt(i-1))<<i%4*2,k=c.indexOf(a.charAt(i))>>>6-i%4*2;g[h>>>2]|=(j|k)<<24-h%4*8,h++}return d.create(g,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),a.enc.Base64})},{"./core":44}],46:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(a){return a<<8&4278255360|a>>>8&16711935}var c=a,d=c.lib,e=d.WordArray,f=c.enc;f.Utf16=f.Utf16BE={stringify:function(a){for(var b=a.words,c=a.sigBytes,d=[],e=0;c>e;e+=2){var f=b[e>>>2]>>>16-e%4*8&65535;d.push(String.fromCharCode(f))}return d.join("")},parse:function(a){for(var b=a.length,c=[],d=0;b>d;d++)c[d>>>1]|=a.charCodeAt(d)<<16-d%2*16;return e.create(c,2*b)}};f.Utf16LE={stringify:function(a){for(var c=a.words,d=a.sigBytes,e=[],f=0;d>f;f+=2){var g=b(c[f>>>2]>>>16-f%4*8&65535);e.push(String.fromCharCode(g))}return e.join("")},parse:function(a){for(var c=a.length,d=[],f=0;c>f;f++)d[f>>>1]|=b(a.charCodeAt(f)<<16-f%2*16);return e.create(d,2*c)}}}(),a.enc.Utf16})},{"./core":44}],47:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha1"),a("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.MD5,h=f.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=c.hasher.create(),f=e.create(),g=f.words,h=c.keySize,i=c.iterations;g.length<h;){j&&d.update(j);var j=d.update(a).finalize(b);d.reset();for(var k=1;i>k;k++)j=d.finalize(j),d.reset();f.concat(j)}return f.sigBytes=4*h,f}});b.EvpKDF=function(a,b,c){return h.create(c).compute(a,b)}}(),a.EvpKDF})},{"./core":44,"./hmac":49,"./sha1":68}],48:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.CipherParams,f=c.enc,g=f.Hex,h=c.format;h.Hex={stringify:function(a){return a.ciphertext.toString(g)},parse:function(a){var b=g.parse(a);return e.create({ciphertext:b})}}}(),a.format.Hex})},{"./cipher-core":43,"./core":44}],49:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){!function(){var b=a,c=b.lib,d=c.Base,e=b.enc,f=e.Utf8,g=b.algo;g.HMAC=d.extend({init:function(a,b){a=this._hasher=new a.init,"string"==typeof b&&(b=f.parse(b));var c=a.blockSize,d=4*c;b.sigBytes>d&&(b=a.finalize(b)),b.clamp();for(var e=this._oKey=b.clone(),g=this._iKey=b.clone(),h=e.words,i=g.words,j=0;c>j;j++)h[j]^=1549556828,i[j]^=909522486;e.sigBytes=g.sigBytes=d,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var b=this._hasher,c=b.finalize(a);b.reset();var d=b.finalize(this._oKey.clone().concat(c));return d}})}()})},{"./core":44}],50:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core"),a("./lib-typedarrays"),a("./enc-utf16"),a("./enc-base64"),a("./md5"),a("./sha1"),a("./sha256"),a("./sha224"),a("./sha512"),a("./sha384"),a("./sha3"),a("./ripemd160"),a("./hmac"),a("./pbkdf2"),a("./evpkdf"),a("./cipher-core"),a("./mode-cfb"),a("./mode-ctr"),a("./mode-ctr-gladman"),a("./mode-ofb"),a("./mode-ecb"),a("./pad-ansix923"),a("./pad-iso10126"),a("./pad-iso97971"),a("./pad-zeropadding"),a("./pad-nopadding"),a("./format-hex"),a("./aes"),a("./tripledes"),a("./rc4"),a("./rabbit"),a("./rabbit-legacy")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy"],e):d.CryptoJS=e(d.CryptoJS)}(this,function(a){return a})},{"./aes":42,"./cipher-core":43,"./core":44,"./enc-base64":45,"./enc-utf16":46,"./evpkdf":47,"./format-hex":48,"./hmac":49,"./lib-typedarrays":51,"./md5":52,"./mode-cfb":53,"./mode-ctr":55,"./mode-ctr-gladman":54,"./mode-ecb":56,"./mode-ofb":57,"./pad-ansix923":58,"./pad-iso10126":59,"./pad-iso97971":60,"./pad-nopadding":61,"./pad-zeropadding":62,"./pbkdf2":63,"./rabbit":65,"./rabbit-legacy":64,"./rc4":66,"./ripemd160":67,"./sha1":68,"./sha224":69,"./sha256":70,"./sha3":71,"./sha384":72,"./sha512":73,"./tripledes":74,"./x64-core":75}],51:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){if("function"==typeof ArrayBuffer){var b=a,c=b.lib,d=c.WordArray,e=d.init,f=d.init=function(a){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),(a instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),a instanceof Uint8Array){for(var b=a.byteLength,c=[],d=0;b>d;d++)c[d>>>2]|=a[d]<<24-d%4*8;e.call(this,c,b)}else e.apply(this,arguments)};f.prototype=d}}(),a.lib.WordArray})},{"./core":44}],52:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){function c(a,b,c,d,e,f,g){var h=a+(b&c|~b&d)+e+g;return(h<<f|h>>>32-f)+b}function d(a,b,c,d,e,f,g){var h=a+(b&d|c&~d)+e+g;return(h<<f|h>>>32-f)+b}function e(a,b,c,d,e,f,g){var h=a+(b^c^d)+e+g;return(h<<f|h>>>32-f)+b}function f(a,b,c,d,e,f,g){var h=a+(c^(b|~d))+e+g;return(h<<f|h>>>32-f)+b}var g=a,h=g.lib,i=h.WordArray,j=h.Hasher,k=g.algo,l=[];!function(){for(var a=0;64>a;a++)l[a]=4294967296*b.abs(b.sin(a+1))|0}();var m=k.MD5=j.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(a,b){for(var g=0;16>g;g++){var h=b+g,i=a[h];a[h]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var j=this._hash.words,k=a[b+0],m=a[b+1],n=a[b+2],o=a[b+3],p=a[b+4],q=a[b+5],r=a[b+6],s=a[b+7],t=a[b+8],u=a[b+9],v=a[b+10],w=a[b+11],x=a[b+12],y=a[b+13],z=a[b+14],A=a[b+15],B=j[0],C=j[1],D=j[2],E=j[3];B=c(B,C,D,E,k,7,l[0]),E=c(E,B,C,D,m,12,l[1]),D=c(D,E,B,C,n,17,l[2]),C=c(C,D,E,B,o,22,l[3]),B=c(B,C,D,E,p,7,l[4]),E=c(E,B,C,D,q,12,l[5]),D=c(D,E,B,C,r,17,l[6]),C=c(C,D,E,B,s,22,l[7]),B=c(B,C,D,E,t,7,l[8]),E=c(E,B,C,D,u,12,l[9]),D=c(D,E,B,C,v,17,l[10]),C=c(C,D,E,B,w,22,l[11]),B=c(B,C,D,E,x,7,l[12]),E=c(E,B,C,D,y,12,l[13]),D=c(D,E,B,C,z,17,l[14]),C=c(C,D,E,B,A,22,l[15]),B=d(B,C,D,E,m,5,l[16]),E=d(E,B,C,D,r,9,l[17]),D=d(D,E,B,C,w,14,l[18]),C=d(C,D,E,B,k,20,l[19]),B=d(B,C,D,E,q,5,l[20]),E=d(E,B,C,D,v,9,l[21]),D=d(D,E,B,C,A,14,l[22]),C=d(C,D,E,B,p,20,l[23]),B=d(B,C,D,E,u,5,l[24]),E=d(E,B,C,D,z,9,l[25]),D=d(D,E,B,C,o,14,l[26]),C=d(C,D,E,B,t,20,l[27]),B=d(B,C,D,E,y,5,l[28]),E=d(E,B,C,D,n,9,l[29]),D=d(D,E,B,C,s,14,l[30]),C=d(C,D,E,B,x,20,l[31]),B=e(B,C,D,E,q,4,l[32]),E=e(E,B,C,D,t,11,l[33]),D=e(D,E,B,C,w,16,l[34]),C=e(C,D,E,B,z,23,l[35]),B=e(B,C,D,E,m,4,l[36]),E=e(E,B,C,D,p,11,l[37]),D=e(D,E,B,C,s,16,l[38]),C=e(C,D,E,B,v,23,l[39]),B=e(B,C,D,E,y,4,l[40]),E=e(E,B,C,D,k,11,l[41]),D=e(D,E,B,C,o,16,l[42]),C=e(C,D,E,B,r,23,l[43]),B=e(B,C,D,E,u,4,l[44]),E=e(E,B,C,D,x,11,l[45]),D=e(D,E,B,C,A,16,l[46]),C=e(C,D,E,B,n,23,l[47]),B=f(B,C,D,E,k,6,l[48]),E=f(E,B,C,D,s,10,l[49]),D=f(D,E,B,C,z,15,l[50]),C=f(C,D,E,B,q,21,l[51]),B=f(B,C,D,E,x,6,l[52]),E=f(E,B,C,D,o,10,l[53]),D=f(D,E,B,C,v,15,l[54]),C=f(C,D,E,B,m,21,l[55]),B=f(B,C,D,E,t,6,l[56]),E=f(E,B,C,D,A,10,l[57]),D=f(D,E,B,C,r,15,l[58]),C=f(C,D,E,B,y,21,l[59]),B=f(B,C,D,E,p,6,l[60]),E=f(E,B,C,D,w,10,l[61]),D=f(D,E,B,C,n,15,l[62]),C=f(C,D,E,B,u,21,l[63]),j[0]=j[0]+B|0,j[1]=j[1]+C|0,j[2]=j[2]+D|0,j[3]=j[3]+E|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;c[e>>>5]|=128<<24-e%32;var f=b.floor(d/4294967296),g=d;c[(e+64>>>9<<4)+15]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),c[(e+64>>>9<<4)+14]=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8),a.sigBytes=4*(c.length+1),this._process();for(var h=this._hash,i=h.words,j=0;4>j;j++){var k=i[j];i[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}return h},clone:function(){var a=j.clone.call(this);return a._hash=this._hash.clone(),a}});g.MD5=j._createHelper(m),g.HmacMD5=j._createHmacHelper(m)}(Math),a.MD5})},{"./core":44}],53:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.CFB=function(){function b(a,b,c,d){var e=this._iv;if(e){var f=e.slice(0);this._iv=void 0}else var f=this._prevBlock;d.encryptBlock(f,0);for(var g=0;c>g;g++)a[b+g]^=f[g]}var c=a.lib.BlockCipherMode.extend();return c.Encryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize;b.call(this,a,c,e,d),this._prevBlock=a.slice(c,c+e)}}),c.Decryptor=c.extend({processBlock:function(a,c){var d=this._cipher,e=d.blockSize,f=a.slice(c,c+e);b.call(this,a,c,e,d),this._prevBlock=f}}),c}(),a.mode.CFB})},{"./cipher-core":43,"./core":44}],54:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.CTRGladman=function(){function b(a){if(255===(a>>24&255)){var b=a>>16&255,c=a>>8&255,d=255&a;255===b?(b=0,255===c?(c=0,255===d?d=0:++d):++c):++b,a=0,a+=b<<16,a+=c<<8,a+=d}else a+=1<<24;return a}function c(a){return 0===(a[0]=b(a[0]))&&(a[1]=b(a[1])),a}var d=a.lib.BlockCipherMode.extend(),e=d.Encryptor=d.extend({processBlock:function(a,b){var d=this._cipher,e=d.blockSize,f=this._iv,g=this._counter;f&&(g=this._counter=f.slice(0),this._iv=void 0),c(g);var h=g.slice(0);d.encryptBlock(h,0);for(var i=0;e>i;i++)a[b+i]^=h[i]}});return d.Decryptor=e,d}(),a.mode.CTRGladman})},{"./cipher-core":43,"./core":44}],55:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.CTR=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._counter;e&&(f=this._counter=e.slice(0),this._iv=void 0);var g=f.slice(0);c.encryptBlock(g,0),f[d-1]=f[d-1]+1|0;for(var h=0;d>h;h++)a[b+h]^=g[h]}});return b.Decryptor=c,b}(),a.mode.CTR})},{"./cipher-core":43,"./core":44}],56:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.ECB=function(){var b=a.lib.BlockCipherMode.extend();return b.Encryptor=b.extend({processBlock:function(a,b){this._cipher.encryptBlock(a,b)}}),b.Decryptor=b.extend({processBlock:function(a,b){this._cipher.decryptBlock(a,b)}}),b}(),a.mode.ECB})},{"./cipher-core":43,"./core":44}],57:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.mode.OFB=function(){var b=a.lib.BlockCipherMode.extend(),c=b.Encryptor=b.extend({processBlock:function(a,b){var c=this._cipher,d=c.blockSize,e=this._iv,f=this._keystream;e&&(f=this._keystream=e.slice(0),this._iv=void 0),c.encryptBlock(f,0);for(var g=0;d>g;g++)a[b+g]^=f[g]}});return b.Decryptor=c,b}(),a.mode.OFB})},{"./cipher-core":43,"./core":44}],58:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.AnsiX923={pad:function(a,b){var c=a.sigBytes,d=4*b,e=d-c%d,f=c+e-1;a.clamp(),a.words[f>>>2]|=e<<24-f%4*8,a.sigBytes+=e},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Ansix923})},{"./cipher-core":43,"./core":44}],59:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS); }(this,function(a){return a.pad.Iso10126={pad:function(b,c){var d=4*c,e=d-b.sigBytes%d;b.concat(a.lib.WordArray.random(e-1)).concat(a.lib.WordArray.create([e<<24],1))},unpad:function(a){var b=255&a.words[a.sigBytes-1>>>2];a.sigBytes-=b}},a.pad.Iso10126})},{"./cipher-core":43,"./core":44}],60:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.Iso97971={pad:function(b,c){b.concat(a.lib.WordArray.create([2147483648],1)),a.pad.ZeroPadding.pad(b,c)},unpad:function(b){a.pad.ZeroPadding.unpad(b),b.sigBytes--}},a.pad.Iso97971})},{"./cipher-core":43,"./core":44}],61:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.NoPadding={pad:function(){},unpad:function(){}},a.pad.NoPadding})},{"./cipher-core":43,"./core":44}],62:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return a.pad.ZeroPadding={pad:function(a,b){var c=4*b;a.clamp(),a.sigBytes+=c-(a.sigBytes%c||c)},unpad:function(a){for(var b=a.words,c=a.sigBytes-1;!(b[c>>>2]>>>24-c%4*8&255);)c--;a.sigBytes=c+1}},a.pad.ZeroPadding})},{"./cipher-core":43,"./core":44}],63:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha1"),a("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.Base,e=c.WordArray,f=b.algo,g=f.SHA1,h=f.HMAC,i=f.PBKDF2=d.extend({cfg:d.extend({keySize:4,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,b){for(var c=this.cfg,d=h.create(c.hasher,a),f=e.create(),g=e.create([1]),i=f.words,j=g.words,k=c.keySize,l=c.iterations;i.length<k;){var m=d.update(b).finalize(g);d.reset();for(var n=m.words,o=n.length,p=m,q=1;l>q;q++){p=d.finalize(p),d.reset();for(var r=p.words,s=0;o>s;s++)n[s]^=r[s]}f.concat(m),j[0]++}return f.sigBytes=4*k,f}});b.PBKDF2=function(a,b,c){return i.create(c).compute(a,b)}}(),a.PBKDF2})},{"./core":44,"./hmac":49,"./sha1":68}],64:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0<h[0]>>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0<h[1]>>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0<h[2]>>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0<h[3]>>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0<h[4]>>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0<h[5]>>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0<h[6]>>>0?1:0)|0,this._b=b[7]>>>0<h[7]>>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.RabbitLegacy=e.extend({_doReset:function(){var a=this._key.words,c=this.cfg.iv,d=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],e=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var f=0;4>f;f++)b.call(this);for(var f=0;8>f;f++)e[f]^=d[f+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;e[0]^=j,e[1]^=l,e[2]^=k,e[3]^=m,e[4]^=j,e[5]^=l,e[6]^=k,e[7]^=m;for(var f=0;4>f;f++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.RabbitLegacy=e._createHelper(j)}(),a.RabbitLegacy})},{"./cipher-core":43,"./core":44,"./enc-base64":45,"./evpkdf":47,"./md5":52}],65:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._X,b=this._C,c=0;8>c;c++)h[c]=b[c];b[0]=b[0]+1295307597+this._b|0,b[1]=b[1]+3545052371+(b[0]>>>0<h[0]>>>0?1:0)|0,b[2]=b[2]+886263092+(b[1]>>>0<h[1]>>>0?1:0)|0,b[3]=b[3]+1295307597+(b[2]>>>0<h[2]>>>0?1:0)|0,b[4]=b[4]+3545052371+(b[3]>>>0<h[3]>>>0?1:0)|0,b[5]=b[5]+886263092+(b[4]>>>0<h[4]>>>0?1:0)|0,b[6]=b[6]+1295307597+(b[5]>>>0<h[5]>>>0?1:0)|0,b[7]=b[7]+3545052371+(b[6]>>>0<h[6]>>>0?1:0)|0,this._b=b[7]>>>0<h[7]>>>0?1:0;for(var c=0;8>c;c++){var d=a[c]+b[c],e=65535&d,f=d>>>16,g=((e*e>>>17)+e*f>>>15)+f*f,j=((4294901760&d)*d|0)+((65535&d)*d|0);i[c]=g^j}a[0]=i[0]+(i[7]<<16|i[7]>>>16)+(i[6]<<16|i[6]>>>16)|0,a[1]=i[1]+(i[0]<<8|i[0]>>>24)+i[7]|0,a[2]=i[2]+(i[1]<<16|i[1]>>>16)+(i[0]<<16|i[0]>>>16)|0,a[3]=i[3]+(i[2]<<8|i[2]>>>24)+i[1]|0,a[4]=i[4]+(i[3]<<16|i[3]>>>16)+(i[2]<<16|i[2]>>>16)|0,a[5]=i[5]+(i[4]<<8|i[4]>>>24)+i[3]|0,a[6]=i[6]+(i[5]<<16|i[5]>>>16)+(i[4]<<16|i[4]>>>16)|0,a[7]=i[7]+(i[6]<<8|i[6]>>>24)+i[5]|0}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=[],h=[],i=[],j=f.Rabbit=e.extend({_doReset:function(){for(var a=this._key.words,c=this.cfg.iv,d=0;4>d;d++)a[d]=16711935&(a[d]<<8|a[d]>>>24)|4278255360&(a[d]<<24|a[d]>>>8);var e=this._X=[a[0],a[3]<<16|a[2]>>>16,a[1],a[0]<<16|a[3]>>>16,a[2],a[1]<<16|a[0]>>>16,a[3],a[2]<<16|a[1]>>>16],f=this._C=[a[2]<<16|a[2]>>>16,4294901760&a[0]|65535&a[1],a[3]<<16|a[3]>>>16,4294901760&a[1]|65535&a[2],a[0]<<16|a[0]>>>16,4294901760&a[2]|65535&a[3],a[1]<<16|a[1]>>>16,4294901760&a[3]|65535&a[0]];this._b=0;for(var d=0;4>d;d++)b.call(this);for(var d=0;8>d;d++)f[d]^=e[d+4&7];if(c){var g=c.words,h=g[0],i=g[1],j=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),k=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=j>>>16|4294901760&k,m=k<<16|65535&j;f[0]^=j,f[1]^=l,f[2]^=k,f[3]^=m,f[4]^=j,f[5]^=l,f[6]^=k,f[7]^=m;for(var d=0;4>d;d++)b.call(this)}},_doProcessBlock:function(a,c){var d=this._X;b.call(this),g[0]=d[0]^d[5]>>>16^d[3]<<16,g[1]=d[2]^d[7]>>>16^d[5]<<16,g[2]=d[4]^d[1]>>>16^d[7]<<16,g[3]=d[6]^d[3]>>>16^d[1]<<16;for(var e=0;4>e;e++)g[e]=16711935&(g[e]<<8|g[e]>>>24)|4278255360&(g[e]<<24|g[e]>>>8),a[c+e]^=g[e]},blockSize:4,ivSize:2});c.Rabbit=e._createHelper(j)}(),a.Rabbit})},{"./cipher-core":43,"./core":44,"./enc-base64":45,"./evpkdf":47,"./md5":52}],66:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){for(var a=this._S,b=this._i,c=this._j,d=0,e=0;4>e;e++){b=(b+1)%256,c=(c+a[b])%256;var f=a[b];a[b]=a[c],a[c]=f,d|=a[(a[b]+a[c])%256]<<24-8*e}return this._i=b,this._j=c,d}var c=a,d=c.lib,e=d.StreamCipher,f=c.algo,g=f.RC4=e.extend({_doReset:function(){for(var a=this._key,b=a.words,c=a.sigBytes,d=this._S=[],e=0;256>e;e++)d[e]=e;for(var e=0,f=0;256>e;e++){var g=e%c,h=b[g>>>2]>>>24-g%4*8&255;f=(f+d[e]+h)%256;var i=d[e];d[e]=d[f],d[f]=i}this._i=this._j=0},_doProcessBlock:function(a,c){a[c]^=b.call(this)},keySize:8,ivSize:0});c.RC4=e._createHelper(g);var h=f.RC4Drop=g.extend({cfg:g.cfg.extend({drop:192}),_doReset:function(){g._doReset.call(this);for(var a=this.cfg.drop;a>0;a--)b.call(this)}});c.RC4Drop=e._createHelper(h)}(),a.RC4})},{"./cipher-core":43,"./core":44,"./enc-base64":45,"./evpkdf":47,"./md5":52}],67:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){function c(a,b,c){return a^b^c}function d(a,b,c){return a&b|~a&c}function e(a,b,c){return(a|~b)^c}function f(a,b,c){return a&c|b&~c}function g(a,b,c){return a^(b|~c)}function h(a,b){return a<<b|a>>>32-b}var i=a,j=i.lib,k=j.WordArray,l=j.Hasher,m=i.algo,n=k.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),o=k.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),p=k.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),q=k.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),r=k.create([0,1518500249,1859775393,2400959708,2840853838]),s=k.create([1352829926,1548603684,1836072691,2053994217,0]),t=m.RIPEMD160=l.extend({_doReset:function(){this._hash=k.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var i=0;16>i;i++){var j=b+i,k=a[j];a[j]=16711935&(k<<8|k>>>24)|4278255360&(k<<24|k>>>8)}var l,m,t,u,v,w,x,y,z,A,B=this._hash.words,C=r.words,D=s.words,E=n.words,F=o.words,G=p.words,H=q.words;w=l=B[0],x=m=B[1],y=t=B[2],z=u=B[3],A=v=B[4];for(var I,i=0;80>i;i+=1)I=l+a[b+E[i]]|0,I+=16>i?c(m,t,u)+C[0]:32>i?d(m,t,u)+C[1]:48>i?e(m,t,u)+C[2]:64>i?f(m,t,u)+C[3]:g(m,t,u)+C[4],I=0|I,I=h(I,G[i]),I=I+v|0,l=v,v=u,u=h(t,10),t=m,m=I,I=w+a[b+F[i]]|0,I+=16>i?g(x,y,z)+D[0]:32>i?f(x,y,z)+D[1]:48>i?e(x,y,z)+D[2]:64>i?d(x,y,z)+D[3]:c(x,y,z)+D[4],I=0|I,I=h(I,H[i]),I=I+A|0,w=A,A=z,z=h(y,10),y=x,x=I;I=B[1]+t+z|0,B[1]=B[2]+u+A|0,B[2]=B[3]+v+w|0,B[3]=B[4]+l+x|0,B[4]=B[0]+m+y|0,B[0]=I},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),a.sigBytes=4*(b.length+1),this._process();for(var e=this._hash,f=e.words,g=0;5>g;g++){var h=f[g];f[g]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return e},clone:function(){var a=l.clone.call(this);return a._hash=this._hash.clone(),a}});i.RIPEMD160=l._createHelper(t),i.HmacRIPEMD160=l._createHmacHelper(t)}(Math),a.RIPEMD160})},{"./core":44}],68:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.WordArray,e=c.Hasher,f=b.algo,g=[],h=f.SHA1=e.extend({_doReset:function(){this._hash=new d.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],h=c[3],i=c[4],j=0;80>j;j++){if(16>j)g[j]=0|a[b+j];else{var k=g[j-3]^g[j-8]^g[j-14]^g[j-16];g[j]=k<<1|k>>>31}var l=(d<<5|d>>>27)+i+g[j];l+=20>j?(e&f|~e&h)+1518500249:40>j?(e^f^h)+1859775393:60>j?(e&f|e&h|f&h)-1894007588:(e^f^h)-899497514,i=h,h=f,f=e<<30|e>>>2,e=d,d=l}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+h|0,c[4]=c[4]+i|0},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;return b[d>>>5]|=128<<24-d%32,b[(d+64>>>9<<4)+14]=Math.floor(c/4294967296),b[(d+64>>>9<<4)+15]=c,a.sigBytes=4*b.length,this._process(),this._hash},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a}});b.SHA1=e._createHelper(h),b.HmacSHA1=e._createHmacHelper(h)}(),a.SHA1})},{"./core":44}],69:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./sha256")):"function"==typeof define&&define.amd?define(["./core","./sha256"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.lib,d=c.WordArray,e=b.algo,f=e.SHA256,g=e.SHA224=f.extend({_doReset:function(){this._hash=new d.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=f._doFinalize.call(this);return a.sigBytes-=4,a}});b.SHA224=f._createHelper(g),b.HmacSHA224=f._createHmacHelper(g)}(),a.SHA224})},{"./core":44,"./sha256":70}],70:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.algo,h=[],i=[];!function(){function a(a){for(var c=b.sqrt(a),d=2;c>=d;d++)if(!(a%d))return!1;return!0}function c(a){return 4294967296*(a-(0|a))|0}for(var d=2,e=0;64>e;)a(d)&&(8>e&&(h[e]=c(b.pow(d,.5))),i[e]=c(b.pow(d,1/3)),e++),d++}();var j=[],k=g.SHA256=f.extend({_doReset:function(){this._hash=new e.init(h.slice(0))},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],k=c[5],l=c[6],m=c[7],n=0;64>n;n++){if(16>n)j[n]=0|a[b+n];else{var o=j[n-15],p=(o<<25|o>>>7)^(o<<14|o>>>18)^o>>>3,q=j[n-2],r=(q<<15|q>>>17)^(q<<13|q>>>19)^q>>>10;j[n]=p+j[n-7]+r+j[n-16]}var s=h&k^~h&l,t=d&e^d&f^e&f,u=(d<<30|d>>>2)^(d<<19|d>>>13)^(d<<10|d>>>22),v=(h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25),w=m+v+s+i[n]+j[n],x=u+t;m=l,l=k,k=h,h=g+w|0,g=f,f=e,e=d,d=w+x|0}c[0]=c[0]+d|0,c[1]=c[1]+e|0,c[2]=c[2]+f|0,c[3]=c[3]+g|0,c[4]=c[4]+h|0,c[5]=c[5]+k|0,c[6]=c[6]+l|0,c[7]=c[7]+m|0},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,e=8*a.sigBytes;return c[e>>>5]|=128<<24-e%32,c[(e+64>>>9<<4)+14]=b.floor(d/4294967296),c[(e+64>>>9<<4)+15]=d,a.sigBytes=4*c.length,this._process(),this._hash},clone:function(){var a=f.clone.call(this);return a._hash=this._hash.clone(),a}});c.SHA256=f._createHelper(k),c.HmacSHA256=f._createHmacHelper(k)}(Math),a.SHA256})},{"./core":44}],71:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.WordArray,f=d.Hasher,g=c.x64,h=g.Word,i=c.algo,j=[],k=[],l=[];!function(){for(var a=1,b=0,c=0;24>c;c++){j[a+5*b]=(c+1)*(c+2)/2%64;var d=b%5,e=(2*a+3*b)%5;a=d,b=e}for(var a=0;5>a;a++)for(var b=0;5>b;b++)k[a+5*b]=b+(2*a+3*b)%5*5;for(var f=1,g=0;24>g;g++){for(var i=0,m=0,n=0;7>n;n++){if(1&f){var o=(1<<n)-1;32>o?m^=1<<o:i^=1<<o-32}128&f?f=f<<1^113:f<<=1}l[g]=h.create(i,m)}}();var m=[];!function(){for(var a=0;25>a;a++)m[a]=h.create()}();var n=i.SHA3=f.extend({cfg:f.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=[],b=0;25>b;b++)a[b]=new h.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var c=this._state,d=this.blockSize/2,e=0;d>e;e++){var f=a[b+2*e],g=a[b+2*e+1];f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),g=16711935&(g<<8|g>>>24)|4278255360&(g<<24|g>>>8);var h=c[e];h.high^=g,h.low^=f}for(var i=0;24>i;i++){for(var n=0;5>n;n++){for(var o=0,p=0,q=0;5>q;q++){var h=c[n+5*q];o^=h.high,p^=h.low}var r=m[n];r.high=o,r.low=p}for(var n=0;5>n;n++)for(var s=m[(n+4)%5],t=m[(n+1)%5],u=t.high,v=t.low,o=s.high^(u<<1|v>>>31),p=s.low^(v<<1|u>>>31),q=0;5>q;q++){var h=c[n+5*q];h.high^=o,h.low^=p}for(var w=1;25>w;w++){var h=c[w],x=h.high,y=h.low,z=j[w];if(32>z)var o=x<<z|y>>>32-z,p=y<<z|x>>>32-z;else var o=y<<z-32|x>>>64-z,p=x<<z-32|y>>>64-z;var A=m[k[w]];A.high=o,A.low=p}var B=m[0],C=c[0];B.high=C.high,B.low=C.low;for(var n=0;5>n;n++)for(var q=0;5>q;q++){var w=n+5*q,h=c[w],D=m[w],E=m[(n+1)%5+5*q],F=m[(n+2)%5+5*q];h.high=D.high^~E.high&F.high,h.low=D.low^~E.low&F.low}var h=c[0],G=l[i];h.high^=G.high,h.low^=G.low}},_doFinalize:function(){var a=this._data,c=a.words,d=(8*this._nDataBytes,8*a.sigBytes),f=32*this.blockSize;c[d>>>5]|=1<<24-d%32,c[(b.ceil((d+1)/f)*f>>>5)-1]|=128,a.sigBytes=4*c.length,this._process();for(var g=this._state,h=this.cfg.outputLength/8,i=h/8,j=[],k=0;i>k;k++){var l=g[k],m=l.high,n=l.low;m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),n=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),j.push(n),j.push(m)}return new e.init(j,h)},clone:function(){for(var a=f.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}});c.SHA3=f._createHelper(n),c.HmacSHA3=f._createHmacHelper(n)}(Math),a.SHA3})},{"./core":44,"./x64-core":75}],72:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core"),a("./sha512")):"function"==typeof define&&define.amd?define(["./core","./x64-core","./sha512"],e):e(d.CryptoJS)}(this,function(a){return function(){var b=a,c=b.x64,d=c.Word,e=c.WordArray,f=b.algo,g=f.SHA512,h=f.SHA384=g.extend({_doReset:function(){this._hash=new e.init([new d.init(3418070365,3238371032),new d.init(1654270250,914150663),new d.init(2438529370,812702999),new d.init(355462360,4144912697),new d.init(1731405415,4290775857),new d.init(2394180231,1750603025),new d.init(3675008525,1694076839),new d.init(1203062813,3204075428)])},_doFinalize:function(){var a=g._doFinalize.call(this);return a.sigBytes-=16,a}});b.SHA384=g._createHelper(h),b.HmacSHA384=g._createHmacHelper(h)}(),a.SHA384})},{"./core":44,"./sha512":73,"./x64-core":75}],73:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(){return g.create.apply(g,arguments)}var c=a,d=c.lib,e=d.Hasher,f=c.x64,g=f.Word,h=f.WordArray,i=c.algo,j=[b(1116352408,3609767458),b(1899447441,602891725),b(3049323471,3964484399),b(3921009573,2173295548),b(961987163,4081628472),b(1508970993,3053834265),b(2453635748,2937671579),b(2870763221,3664609560),b(3624381080,2734883394),b(310598401,1164996542),b(607225278,1323610764),b(1426881987,3590304994),b(1925078388,4068182383),b(2162078206,991336113),b(2614888103,633803317),b(3248222580,3479774868),b(3835390401,2666613458),b(4022224774,944711139),b(264347078,2341262773),b(604807628,2007800933),b(770255983,1495990901),b(1249150122,1856431235),b(1555081692,3175218132),b(1996064986,2198950837),b(2554220882,3999719339),b(2821834349,766784016),b(2952996808,2566594879),b(3210313671,3203337956),b(3336571891,1034457026),b(3584528711,2466948901),b(113926993,3758326383),b(338241895,168717936),b(666307205,1188179964),b(773529912,1546045734),b(1294757372,1522805485),b(1396182291,2643833823),b(1695183700,2343527390),b(1986661051,1014477480),b(2177026350,1206759142),b(2456956037,344077627),b(2730485921,1290863460),b(2820302411,3158454273),b(3259730800,3505952657),b(3345764771,106217008),b(3516065817,3606008344),b(3600352804,1432725776),b(4094571909,1467031594),b(275423344,851169720),b(430227734,3100823752),b(506948616,1363258195),b(659060556,3750685593),b(883997877,3785050280),b(958139571,3318307427),b(1322822218,3812723403),b(1537002063,2003034995),b(1747873779,3602036899),b(1955562222,1575990012),b(2024104815,1125592928),b(2227730452,2716904306),b(2361852424,442776044),b(2428436474,593698344),b(2756734187,3733110249),b(3204031479,2999351573),b(3329325298,3815920427),b(3391569614,3928383900),b(3515267271,566280711),b(3940187606,3454069534),b(4118630271,4000239992),b(116418474,1914138554),b(174292421,2731055270),b(289380356,3203993006),b(460393269,320620315),b(685471733,587496836),b(852142971,1086792851),b(1017036298,365543100),b(1126000580,2618297676),b(1288033470,3409855158),b(1501505948,4234509866),b(1607167915,987167468),b(1816402316,1246189591)],k=[];!function(){for(var a=0;80>a;a++)k[a]=b()}();var l=i.SHA512=e.extend({_doReset:function(){this._hash=new h.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,b){for(var c=this._hash.words,d=c[0],e=c[1],f=c[2],g=c[3],h=c[4],i=c[5],l=c[6],m=c[7],n=d.high,o=d.low,p=e.high,q=e.low,r=f.high,s=f.low,t=g.high,u=g.low,v=h.high,w=h.low,x=i.high,y=i.low,z=l.high,A=l.low,B=m.high,C=m.low,D=n,E=o,F=p,G=q,H=r,I=s,J=t,K=u,L=v,M=w,N=x,O=y,P=z,Q=A,R=B,S=C,T=0;80>T;T++){var U=k[T];if(16>T)var V=U.high=0|a[b+2*T],W=U.low=0|a[b+2*T+1];else{var X=k[T-15],Y=X.high,Z=X.low,$=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^Y>>>7,_=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^(Z>>>7|Y<<25),aa=k[T-2],ba=aa.high,ca=aa.low,da=(ba>>>19|ca<<13)^(ba<<3|ca>>>29)^ba>>>6,ea=(ca>>>19|ba<<13)^(ca<<3|ba>>>29)^(ca>>>6|ba<<26),fa=k[T-7],ga=fa.high,ha=fa.low,ia=k[T-16],ja=ia.high,ka=ia.low,W=_+ha,V=$+ga+(_>>>0>W>>>0?1:0),W=W+ea,V=V+da+(ea>>>0>W>>>0?1:0),W=W+ka,V=V+ja+(ka>>>0>W>>>0?1:0);U.high=V,U.low=W}var la=L&N^~L&P,ma=M&O^~M&Q,na=D&F^D&H^F&H,oa=E&G^E&I^G&I,pa=(D>>>28|E<<4)^(D<<30|E>>>2)^(D<<25|E>>>7),qa=(E>>>28|D<<4)^(E<<30|D>>>2)^(E<<25|D>>>7),ra=(L>>>14|M<<18)^(L>>>18|M<<14)^(L<<23|M>>>9),sa=(M>>>14|L<<18)^(M>>>18|L<<14)^(M<<23|L>>>9),ta=j[T],ua=ta.high,va=ta.low,wa=S+sa,xa=R+ra+(S>>>0>wa>>>0?1:0),wa=wa+ma,xa=xa+la+(ma>>>0>wa>>>0?1:0),wa=wa+va,xa=xa+ua+(va>>>0>wa>>>0?1:0),wa=wa+W,xa=xa+V+(W>>>0>wa>>>0?1:0),ya=qa+oa,za=pa+na+(qa>>>0>ya>>>0?1:0);R=P,S=Q,P=N,Q=O,N=L,O=M,M=K+wa|0,L=J+xa+(K>>>0>M>>>0?1:0)|0,J=H,K=I,H=F,I=G,F=D,G=E,E=wa+ya|0,D=xa+za+(wa>>>0>E>>>0?1:0)|0}o=d.low=o+E,d.high=n+D+(E>>>0>o>>>0?1:0),q=e.low=q+G,e.high=p+F+(G>>>0>q>>>0?1:0),s=f.low=s+I,f.high=r+H+(I>>>0>s>>>0?1:0),u=g.low=u+K,g.high=t+J+(K>>>0>u>>>0?1:0),w=h.low=w+M,h.high=v+L+(M>>>0>w>>>0?1:0),y=i.low=y+O,i.high=x+N+(O>>>0>y>>>0?1:0),A=l.low=A+Q,l.high=z+P+(Q>>>0>A>>>0?1:0),C=m.low=C+S,m.high=B+R+(S>>>0>C>>>0?1:0)},_doFinalize:function(){var a=this._data,b=a.words,c=8*this._nDataBytes,d=8*a.sigBytes;b[d>>>5]|=128<<24-d%32,b[(d+128>>>10<<5)+30]=Math.floor(c/4294967296),b[(d+128>>>10<<5)+31]=c,a.sigBytes=4*b.length,this._process();var e=this._hash.toX32();return e},clone:function(){var a=e.clone.call(this);return a._hash=this._hash.clone(),a},blockSize:32});c.SHA512=e._createHelper(l),c.HmacSHA512=e._createHmacHelper(l)}(),a.SHA512})},{"./core":44,"./x64-core":75}],74:[function(a,b,c){!function(d,e,f){"object"==typeof c?b.exports=c=e(a("./core"),a("./enc-base64"),a("./md5"),a("./evpkdf"),a("./cipher-core")):"function"==typeof define&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(d.CryptoJS)}(this,function(a){return function(){function b(a,b){var c=(this._lBlock>>>a^this._rBlock)&b;this._rBlock^=c,this._lBlock^=c<<a}function c(a,b){var c=(this._rBlock>>>a^this._lBlock)&b;this._lBlock^=c,this._rBlock^=c<<a}var d=a,e=d.lib,f=e.WordArray,g=e.BlockCipher,h=d.algo,i=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],j=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],k=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],m=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],n=h.DES=g.extend({_doReset:function(){for(var a=this._key,b=a.words,c=[],d=0;56>d;d++){var e=i[d]-1;c[d]=b[e>>>5]>>>31-e%32&1}for(var f=this._subKeys=[],g=0;16>g;g++){for(var h=f[g]=[],l=k[g],d=0;24>d;d++)h[d/6|0]|=c[(j[d]-1+l)%28]<<31-d%6,h[4+(d/6|0)]|=c[28+(j[d+24]-1+l)%28]<<31-d%6;h[0]=h[0]<<1|h[0]>>>31;for(var d=1;7>d;d++)h[d]=h[d]>>>4*(d-1)+3;h[7]=h[7]<<5|h[7]>>>27}for(var m=this._invSubKeys=[],d=0;16>d;d++)m[d]=f[15-d]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._subKeys)},decryptBlock:function(a,b){this._doCryptBlock(a,b,this._invSubKeys)},_doCryptBlock:function(a,d,e){ this._lBlock=a[d],this._rBlock=a[d+1],b.call(this,4,252645135),b.call(this,16,65535),c.call(this,2,858993459),c.call(this,8,16711935),b.call(this,1,1431655765);for(var f=0;16>f;f++){for(var g=e[f],h=this._lBlock,i=this._rBlock,j=0,k=0;8>k;k++)j|=l[k][((i^g[k])&m[k])>>>0];this._lBlock=i,this._rBlock=h^j}var n=this._lBlock;this._lBlock=this._rBlock,this._rBlock=n,b.call(this,1,1431655765),c.call(this,8,16711935),c.call(this,2,858993459),b.call(this,16,65535),b.call(this,4,252645135),a[d]=this._lBlock,a[d+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=g._createHelper(n);var o=h.TripleDES=g.extend({_doReset:function(){var a=this._key,b=a.words;this._des1=n.createEncryptor(f.create(b.slice(0,2))),this._des2=n.createEncryptor(f.create(b.slice(2,4))),this._des3=n.createEncryptor(f.create(b.slice(4,6)))},encryptBlock:function(a,b){this._des1.encryptBlock(a,b),this._des2.decryptBlock(a,b),this._des3.encryptBlock(a,b)},decryptBlock:function(a,b){this._des3.decryptBlock(a,b),this._des2.encryptBlock(a,b),this._des1.decryptBlock(a,b)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=g._createHelper(o)}(),a.TripleDES})},{"./cipher-core":43,"./core":44,"./enc-base64":45,"./evpkdf":47,"./md5":52}],75:[function(a,b,c){!function(d,e){"object"==typeof c?b.exports=c=e(a("./core")):"function"==typeof define&&define.amd?define(["./core"],e):e(d.CryptoJS)}(this,function(a){return function(b){var c=a,d=c.lib,e=d.Base,f=d.WordArray,g=c.x64={};g.Word=e.extend({init:function(a,b){this.high=a,this.low=b}}),g.WordArray=e.extend({init:function(a,c){a=this.words=a||[],c!=b?this.sigBytes=c:this.sigBytes=8*a.length},toX32:function(){for(var a=this.words,b=a.length,c=[],d=0;b>d;d++){var e=a[d];c.push(e.high),c.push(e.low)}return f.create(c,this.sigBytes)},clone:function(){for(var a=e.clone.call(this),b=a.words=this.words.slice(0),c=b.length,d=0;c>d;d++)b[d]=b[d].clone();return a}})}(),a})},{"./core":44}],76:[function(a,b,c){function d(){k=!1,h.length?j=h.concat(j):l=-1,j.length&&e()}function e(){if(!k){var a=setTimeout(d);k=!0;for(var b=j.length;b;){for(h=j,j=[];++l<b;)h&&h[l].run();l=-1,b=j.length}h=null,k=!1,clearTimeout(a)}}function f(a,b){this.fun=a,this.array=b}function g(){}var h,i=b.exports={},j=[],k=!1,l=-1;i.nextTick=function(a){var b=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)b[c-1]=arguments[c];j.push(new f(a,b)),1!==j.length||k||setTimeout(e,0)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.binding=function(a){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(a){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],77:[function(a,b,c){(function(a,d){!function(){var b,c,e,f;!function(){var a={},d={};b=function(b,c,d){a[b]={deps:c,callback:d}},f=e=c=function(b){function e(a){if("."!==a.charAt(0))return a;for(var c=a.split("/"),d=b.split("/").slice(0,-1),e=0,f=c.length;f>e;e++){var g=c[e];if(".."===g)d.pop();else{if("."===g)continue;d.push(g)}}return d.join("/")}if(f._eak_seen=a,d[b])return d[b];if(d[b]={},!a[b])throw new Error("Could not find module "+b);for(var g,h=a[b],i=h.deps,j=h.callback,k=[],l=0,m=i.length;m>l;l++)"exports"===i[l]?k.push(g={}):k.push(c(e(i[l])));var n=j.apply(this,k);return d[b]=g||n}}(),b("promise/all",["./utils","exports"],function(a,b){"use strict";function c(a){var b=this;if(!d(a))throw new TypeError("You must pass an array to all.");return new b(function(b,c){function d(a){return function(b){f(a,b)}}function f(a,c){h[a]=c,0===--i&&b(h)}var g,h=[],i=a.length;0===i&&b([]);for(var j=0;j<a.length;j++)g=a[j],g&&e(g.then)?g.then(d(j),c):f(j,g)})}var d=a.isArray,e=a.isFunction;b.all=c}),b("promise/asap",["exports"],function(b){"use strict";function c(){return function(){a.nextTick(g)}}function e(){var a=0,b=new k(g),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function f(){return function(){l.setTimeout(g,1)}}function g(){for(var a=0;a<m.length;a++){var b=m[a],c=b[0],d=b[1];c(d)}m=[]}function h(a,b){var c=m.push([a,b]);1===c&&i()}var i,j="undefined"!=typeof window?window:{},k=j.MutationObserver||j.WebKitMutationObserver,l="undefined"!=typeof d?d:void 0===this?window:this,m=[];i="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?c():k?e():f(),b.asap=h}),b("promise/config",["exports"],function(a){"use strict";function b(a,b){return 2!==arguments.length?c[a]:void(c[a]=b)}var c={instrument:!1};a.config=c,a.configure=b}),b("promise/polyfill",["./promise","./utils","exports"],function(a,b,c){"use strict";function e(){var a;a="undefined"!=typeof d?d:"undefined"!=typeof window&&window.document?window:self;var b="Promise"in a&&"resolve"in a.Promise&&"reject"in a.Promise&&"all"in a.Promise&&"race"in a.Promise&&function(){var b;return new a.Promise(function(a){b=a}),g(b)}();b||(a.Promise=f)}var f=a.Promise,g=b.isFunction;c.polyfill=e}),b("promise/promise",["./config","./utils","./all","./race","./resolve","./reject","./asap","exports"],function(a,b,c,d,e,f,g,h){"use strict";function i(a){if(!v(a))throw new TypeError("You must pass a resolver function as the first argument to the promise constructor");if(!(this instanceof i))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._subscribers=[],j(a,this)}function j(a,b){function c(a){o(b,a)}function d(a){q(b,a)}try{a(c,d)}catch(e){d(e)}}function k(a,b,c,d){var e,f,g,h,i=v(c);if(i)try{e=c(d),g=!0}catch(j){h=!0,f=j}else e=d,g=!0;n(b,e)||(i&&g?o(b,e):h?q(b,f):a===D?o(b,e):a===E&&q(b,e))}function l(a,b,c,d){var e=a._subscribers,f=e.length;e[f]=b,e[f+D]=c,e[f+E]=d}function m(a,b){for(var c,d,e=a._subscribers,f=a._detail,g=0;g<e.length;g+=3)c=e[g],d=e[g+b],k(b,c,d,f);a._subscribers=null}function n(a,b){var c,d=null;try{if(a===b)throw new TypeError("A promises callback cannot return that same promise.");if(u(b)&&(d=b.then,v(d)))return d.call(b,function(d){return c?!0:(c=!0,void(b!==d?o(a,d):p(a,d)))},function(b){return c?!0:(c=!0,void q(a,b))}),!0}catch(e){return c?!0:(q(a,e),!0)}return!1}function o(a,b){a===b?p(a,b):n(a,b)||p(a,b)}function p(a,b){a._state===B&&(a._state=C,a._detail=b,t.async(r,a))}function q(a,b){a._state===B&&(a._state=C,a._detail=b,t.async(s,a))}function r(a){m(a,a._state=D)}function s(a){m(a,a._state=E)}var t=a.config,u=(a.configure,b.objectOrFunction),v=b.isFunction,w=(b.now,c.all),x=d.race,y=e.resolve,z=f.reject,A=g.asap;t.async=A;var B=void 0,C=0,D=1,E=2;i.prototype={constructor:i,_state:void 0,_detail:void 0,_subscribers:void 0,then:function(a,b){var c=this,d=new this.constructor(function(){});if(this._state){var e=arguments;t.async(function(){k(c._state,d,e[c._state-1],c._detail)})}else l(this,d,a,b);return d},"catch":function(a){return this.then(null,a)}},i.all=w,i.race=x,i.resolve=y,i.reject=z,h.Promise=i}),b("promise/race",["./utils","exports"],function(a,b){"use strict";function c(a){var b=this;if(!d(a))throw new TypeError("You must pass an array to race.");return new b(function(b,c){for(var d,e=0;e<a.length;e++)d=a[e],d&&"function"==typeof d.then?d.then(b,c):b(d)})}var d=a.isArray;b.race=c}),b("promise/reject",["exports"],function(a){"use strict";function b(a){var b=this;return new b(function(b,c){c(a)})}a.reject=b}),b("promise/resolve",["exports"],function(a){"use strict";function b(a){if(a&&"object"==typeof a&&a.constructor===this)return a;var b=this;return new b(function(b){b(a)})}a.resolve=b}),b("promise/utils",["exports"],function(a){"use strict";function b(a){return c(a)||"object"==typeof a&&null!==a}function c(a){return"function"==typeof a}function d(a){return"[object Array]"===Object.prototype.toString.call(a)}var e=Date.now||function(){return(new Date).getTime()};a.objectOrFunction=b,a.isFunction=c,a.isArray=d,a.now=e}),c("promise/polyfill").polyfill()}(),function(a,d){"object"==typeof c&&"object"==typeof b?b.exports=d():"function"==typeof define&&define.amd?define([],d):"object"==typeof c?c.localforage=d():a.localforage=d()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}b.__esModule=!0,function(){function a(a,b){a[b]=function(){var c=arguments;return a.ready().then(function(){return a[b].apply(a,c)})}}function e(){for(var a=1;a<arguments.length;a++){var b=arguments[a];if(b)for(var c in b)b.hasOwnProperty(c)&&(m(b[c])?arguments[0][c]=b[c].slice():arguments[0][c]=b[c])}return arguments[0]}function f(a){for(var b in h)if(h.hasOwnProperty(b)&&h[b]===a)return!0;return!1}var g={},h={INDEXEDDB:"asyncStorage",LOCALSTORAGE:"localStorageWrapper",WEBSQL:"webSQLStorage"},i=[h.INDEXEDDB,h.WEBSQL,h.LOCALSTORAGE],j=["clear","getItem","iterate","key","keys","length","removeItem","setItem"],k={description:"",driver:i.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1},l=function(a){var b=b||a.indexedDB||a.webkitIndexedDB||a.mozIndexedDB||a.OIndexedDB||a.msIndexedDB,c={};return c[h.WEBSQL]=!!a.openDatabase,c[h.INDEXEDDB]=!!function(){if("undefined"!=typeof a.openDatabase&&a.navigator&&a.navigator.userAgent&&/Safari/.test(a.navigator.userAgent)&&!/Chrome/.test(a.navigator.userAgent))return!1;try{return b&&"function"==typeof b.open&&"undefined"!=typeof a.IDBKeyRange}catch(c){return!1}}(),c[h.LOCALSTORAGE]=!!function(){try{return a.localStorage&&"setItem"in a.localStorage&&a.localStorage.setItem}catch(b){return!1}}(),c}(this),m=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},n=function(){function b(a){d(this,b),this.INDEXEDDB=h.INDEXEDDB,this.LOCALSTORAGE=h.LOCALSTORAGE,this.WEBSQL=h.WEBSQL,this._defaultConfig=e({},k),this._config=e({},this._defaultConfig,a),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver)}return b.prototype.config=function(a){if("object"==typeof a){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var b in a)"storeName"===b&&(a[b]=a[b].replace(/\W/g,"_")),this._config[b]=a[b];return"driver"in a&&a.driver&&this.setDriver(this._config.driver),!0}return"string"==typeof a?this._config[a]:this._config},b.prototype.defineDriver=function(a,b,c){var d=new Promise(function(b,c){try{var d=a._driver,e=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver"),h=new Error("Custom driver name already in use: "+a._driver);if(!a._driver)return void c(e);if(f(a._driver))return void c(h);for(var i=j.concat("_initStorage"),k=0;k<i.length;k++){var m=i[k];if(!m||!a[m]||"function"!=typeof a[m])return void c(e)}var n=Promise.resolve(!0);"_support"in a&&(n=a._support&&"function"==typeof a._support?a._support():Promise.resolve(!!a._support)),n.then(function(c){l[d]=c,g[d]=a,b()},c)}catch(o){c(o)}});return d.then(b,c),d},b.prototype.driver=function(){return this._driver||null},b.prototype.getDriver=function(a,b,d){var e=this,h=function(){if(f(a))switch(a){case e.INDEXEDDB:return new Promise(function(a,b){a(c(1))});case e.LOCALSTORAGE:return new Promise(function(a,b){a(c(2))});case e.WEBSQL:return new Promise(function(a,b){a(c(4))})}else if(g[a])return Promise.resolve(g[a]);return Promise.reject(new Error("Driver not found."))}();return h.then(b,d),h},b.prototype.getSerializer=function(a){var b=new Promise(function(a,b){a(c(3))});return a&&"function"==typeof a&&b.then(function(b){a(b)}),b},b.prototype.ready=function(a){var b=this,c=b._driverSet.then(function(){return null===b._ready&&(b._ready=b._initDriver()),b._ready});return c.then(a,a),c},b.prototype.setDriver=function(a,b,c){function d(){f._config.driver=f.driver()}function e(a){return function(){function b(){for(;c<a.length;){var e=a[c];return c++,f._dbInfo=null,f._ready=null,f.getDriver(e).then(function(a){return f._extend(a),d(),f._ready=f._initStorage(f._config),f._ready})["catch"](b)}d();var g=new Error("No available storage method found.");return f._driverSet=Promise.reject(g),f._driverSet}var c=0;return b()}}var f=this;m(a)||(a=[a]);var g=this._getSupportedDrivers(a),h=null!==this._driverSet?this._driverSet["catch"](function(){return Promise.resolve()}):Promise.resolve();return this._driverSet=h.then(function(){var a=g[0];return f._dbInfo=null,f._ready=null,f.getDriver(a).then(function(a){f._driver=a._driver,d(),f._wrapLibraryMethodsWithReady(),f._initDriver=e(g)})})["catch"](function(){d();var a=new Error("No available storage method found.");return f._driverSet=Promise.reject(a),f._driverSet}),this._driverSet.then(b,c),this._driverSet},b.prototype.supports=function(a){return!!l[a]},b.prototype._extend=function(a){e(this,a)},b.prototype._getSupportedDrivers=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];this.supports(e)&&b.push(e)}return b},b.prototype._wrapLibraryMethodsWithReady=function(){for(var b=0;b<j.length;b++)a(this,j[b])},b.prototype.createInstance=function(a){return new b(a)},b}(),o=new n;b["default"]=o}.call("undefined"!=typeof window?window:self),a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,function(){function a(a,b){a=a||[],b=b||{};try{return new Blob(a,b)}catch(c){if("TypeError"!==c.name)throw c;for(var d=x.BlobBuilder||x.MSBlobBuilder||x.MozBlobBuilder||x.WebKitBlobBuilder,e=new d,f=0;f<a.length;f+=1)e.append(a[f]);return e.getBlob(b.type)}}function c(a){for(var b=a.length,c=new ArrayBuffer(b),d=new Uint8Array(c),e=0;b>e;e++)d[e]=a.charCodeAt(e);return c}function d(a){return new Promise(function(b,c){var d=new XMLHttpRequest;d.open("GET",a),d.withCredentials=!0,d.responseType="arraybuffer",d.onreadystatechange=function(){return 4===d.readyState?200===d.status?b({response:d.response,type:d.getResponseHeader("Content-Type")}):void c({status:d.status,response:d.response}):void 0},d.send()})}function e(b){return new Promise(function(c,e){var f=a([""],{type:"image/png"}),g=b.transaction([B],"readwrite");g.objectStore(B).put(f,"key"),g.oncomplete=function(){var a=b.transaction([B],"readwrite"),f=a.objectStore(B).get("key");f.onerror=e,f.onsuccess=function(a){var b=a.target.result,e=URL.createObjectURL(b);d(e).then(function(a){c(!(!a||"image/png"!==a.type))},function(){c(!1)}).then(function(){URL.revokeObjectURL(e)})}}})["catch"](function(){return!1})}function f(a){return"boolean"==typeof z?Promise.resolve(z):e(a).then(function(a){return z=a})}function g(a){return new Promise(function(b,c){var d=new FileReader;d.onerror=c,d.onloadend=function(c){var d=btoa(c.target.result||"");b({__local_forage_encoded_blob:!0,data:d,type:a.type})},d.readAsBinaryString(a)})}function h(b){var d=c(atob(b.data));return a([d],{type:b.type})}function i(a){return a&&a.__local_forage_encoded_blob}function j(a){function b(){return Promise.resolve()}var c=this,d={db:null};if(a)for(var e in a)d[e]=a[e];A||(A={});var f=A[d.name];f||(f={forages:[],db:null},A[d.name]=f),f.forages.push(this);for(var g=[],h=0;h<f.forages.length;h++){var i=f.forages[h];i!==this&&g.push(i.ready()["catch"](b))}var j=f.forages.slice(0);return Promise.all(g).then(function(){return d.db=f.db,k(d)}).then(function(a){return d.db=a,n(d,c._defaultConfig.version)?l(d):a}).then(function(a){d.db=f.db=a,c._dbInfo=d;for(var b in j){var e=j[b];e!==c&&(e._dbInfo.db=d.db,e._dbInfo.version=d.version)}})}function k(a){return m(a,!1)}function l(a){return m(a,!0)}function m(a,b){return new Promise(function(c,d){if(a.db){if(!b)return c(a.db);a.db.close()}var e=[a.name];b&&e.push(a.version);var f=y.open.apply(y,e);b&&(f.onupgradeneeded=function(b){var c=f.result;try{c.createObjectStore(a.storeName),b.oldVersion<=1&&c.createObjectStore(B)}catch(d){if("ConstraintError"!==d.name)throw d;x.console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),f.onerror=function(){d(f.error)},f.onsuccess=function(){c(f.result)}})}function n(a,b){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),d=a.version<a.db.version,e=a.version>a.db.version;if(d&&(a.version!==b&&x.console.warn('The database "'+a.name+"\" can't be downgraded from version "+a.db.version+" to version "+a.version+"."),a.version=a.db.version),e||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function o(a,b){var c=this;"string"!=typeof a&&(x.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new Promise(function(b,d){c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=f.get(a);g.onsuccess=function(){var a=g.result;void 0===a&&(a=null),i(a)&&(a=h(a)),b(a)},g.onerror=function(){d(g.error)}})["catch"](d)});return w(d,b),d}function p(a,b){var c=this,d=new Promise(function(b,d){c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=f.openCursor(),j=1;g.onsuccess=function(){var c=g.result;if(c){var d=c.value;i(d)&&(d=h(d));var e=a(d,c.key,j++);void 0!==e?b(e):c["continue"]()}else b()},g.onerror=function(){d(g.error)}})["catch"](d)});return w(d,b),d}function q(a,b,c){var d=this;"string"!=typeof a&&(x.console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=new Promise(function(c,e){var h;d.ready().then(function(){return h=d._dbInfo,f(h.db)}).then(function(a){return!a&&b instanceof Blob?g(b):b}).then(function(b){var d=h.db.transaction(h.storeName,"readwrite"),f=d.objectStore(h.storeName);null===b&&(b=void 0);var g=f.put(b,a);d.oncomplete=function(){void 0===b&&(b=null),c(b)},d.onabort=d.onerror=function(){var a=g.error?g.error:g.transaction.error;e(a)}})["catch"](e)});return w(e,c),e}function r(a,b){var c=this;"string"!=typeof a&&(x.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new Promise(function(b,d){c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readwrite"),g=f.objectStore(e.storeName),h=g["delete"](a);f.oncomplete=function(){b()},f.onerror=function(){d(h.error)},f.onabort=function(){var a=h.error?h.error:h.transaction.error;d(a)}})["catch"](d)});return w(d,b),d}function s(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readwrite"),f=e.objectStore(d.storeName),g=f.clear();e.oncomplete=function(){a()},e.onabort=e.onerror=function(){var a=g.error?g.error:g.transaction.error;c(a)}})["catch"](c)});return w(c,a),c}function t(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readonly").objectStore(d.storeName),f=e.count();f.onsuccess=function(){a(f.result)},f.onerror=function(){c(f.error)}})["catch"](c)});return w(c,a),c}function u(a,b){var c=this,d=new Promise(function(b,d){return 0>a?void b(null):void c.ready().then(function(){var e=c._dbInfo,f=e.db.transaction(e.storeName,"readonly").objectStore(e.storeName),g=!1,h=f.openCursor();h.onsuccess=function(){var c=h.result;return c?void(0===a?b(c.key):g?b(c.key):(g=!0,c.advance(a))):void b(null)},h.onerror=function(){d(h.error)}})["catch"](d)});return w(d,b),d}function v(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo,e=d.db.transaction(d.storeName,"readonly").objectStore(d.storeName),f=e.openCursor(),g=[];f.onsuccess=function(){var b=f.result;return b?(g.push(b.key),void b["continue"]()):void a(g)},f.onerror=function(){c(f.error)}})["catch"](c)});return w(c,a),c}function w(a,b){b&&a.then(function(a){b(null,a)},function(a){b(a)})}var x=this,y=y||this.indexedDB||this.webkitIndexedDB||this.mozIndexedDB||this.OIndexedDB||this.msIndexedDB;if(y){var z,A,B="local-forage-detect-blob-support",C={_driver:"asyncStorage",_initStorage:j,iterate:p,getItem:o,setItem:q,removeItem:r,clear:s,length:t,key:u,keys:v};b["default"]=C}}.call("undefined"!=typeof window?window:self),a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0,function(){function a(a){var b=this,d={};if(a)for(var e in a)d[e]=a[e];return d.keyPrefix=d.name+"/",d.storeName!==b._defaultConfig.storeName&&(d.keyPrefix+=d.storeName+"/"),b._dbInfo=d,new Promise(function(a,b){a(c(3))}).then(function(a){return d.serializer=a,Promise.resolve()})}function d(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo.keyPrefix,c=n.length-1;c>=0;c--){var d=n.key(c);0===d.indexOf(a)&&n.removeItem(d)}});return l(c,a),c}function e(a,b){var c=this;"string"!=typeof a&&(m.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=c.ready().then(function(){var b=c._dbInfo,d=n.getItem(b.keyPrefix+a);return d&&(d=b.serializer.deserialize(d)),d});return l(d,b),d}function f(a,b){var c=this,d=c.ready().then(function(){for(var b=c._dbInfo,d=b.keyPrefix,e=d.length,f=n.length,g=1,h=0;f>h;h++){var i=n.key(h);if(0===i.indexOf(d)){var j=n.getItem(i);if(j&&(j=b.serializer.deserialize(j)),j=a(j,i.substring(e),g++),void 0!==j)return j}}});return l(d,b),d}function g(a,b){var c=this,d=c.ready().then(function(){var b,d=c._dbInfo;try{b=n.key(a)}catch(e){b=null}return b&&(b=b.substring(d.keyPrefix.length)),b});return l(d,b),d}function h(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo,c=n.length,d=[],e=0;c>e;e++)0===n.key(e).indexOf(a.keyPrefix)&&d.push(n.key(e).substring(a.keyPrefix.length));return d});return l(c,a),c}function i(a){var b=this,c=b.keys().then(function(a){return a.length});return l(c,a),c}function j(a,b){var c=this;"string"!=typeof a&&(m.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=c.ready().then(function(){var b=c._dbInfo;n.removeItem(b.keyPrefix+a)});return l(d,b),d}function k(a,b,c){var d=this;"string"!=typeof a&&(m.console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=d.ready().then(function(){void 0===b&&(b=null);var c=b;return new Promise(function(e,f){var g=d._dbInfo;g.serializer.serialize(b,function(b,d){if(d)f(d);else try{n.setItem(g.keyPrefix+a,b),e(c)}catch(h){("QuotaExceededError"===h.name||"NS_ERROR_DOM_QUOTA_REACHED"===h.name)&&f(h),f(h)}})})});return l(e,c),e}function l(a,b){b&&a.then(function(a){b(null,a)},function(a){b(a)})}var m=this,n=null;try{if(!(this.localStorage&&"setItem"in this.localStorage))return;n=this.localStorage}catch(o){return}var p={_driver:"localStorageWrapper",_initStorage:a,iterate:f,getItem:e,setItem:k,removeItem:j,clear:d,length:i,key:g,keys:h};b["default"]=p}.call("undefined"!=typeof window?window:self),a.exports=b["default"]},function(a,b){"use strict";b.__esModule=!0,function(){function a(a,b){a=a||[],b=b||{};try{return new Blob(a,b)}catch(c){if("TypeError"!==c.name)throw c;for(var d=x.BlobBuilder||x.MSBlobBuilder||x.MozBlobBuilder||x.WebKitBlobBuilder,e=new d,f=0;f<a.length;f+=1)e.append(a[f]);return e.getBlob(b.type)}}function c(a,b){var c="";if(a&&(c=a.toString()),a&&("[object ArrayBuffer]"===a.toString()||a.buffer&&"[object ArrayBuffer]"===a.buffer.toString())){var d,e=j;a instanceof ArrayBuffer?(d=a,e+=l):(d=a.buffer,"[object Int8Array]"===c?e+=n:"[object Uint8Array]"===c?e+=o:"[object Uint8ClampedArray]"===c?e+=p:"[object Int16Array]"===c?e+=q:"[object Uint16Array]"===c?e+=s:"[object Int32Array]"===c?e+=r:"[object Uint32Array]"===c?e+=t:"[object Float32Array]"===c?e+=u:"[object Float64Array]"===c?e+=v:b(new Error("Failed to get type for BinaryArray"))),b(e+f(d))}else if("[object Blob]"===c){var g=new FileReader;g.onload=function(){var c=h+a.type+"~"+f(this.result);b(j+m+c)},g.readAsArrayBuffer(a)}else try{b(JSON.stringify(a))}catch(i){console.error("Couldn't convert value into a JSON string: ",a),b(null,i)}}function d(b){if(b.substring(0,k)!==j)return JSON.parse(b);var c,d=b.substring(w),f=b.substring(k,w);if(f===m&&i.test(d)){var g=d.match(i);c=g[1],d=d.substring(g[0].length)}var h=e(d);switch(f){case l:return h;case m:return a([h],{type:c});case n:return new Int8Array(h);case o:return new Uint8Array(h);case p:return new Uint8ClampedArray(h);case q:return new Int16Array(h);case s:return new Uint16Array(h);case r:return new Int32Array(h);case t:return new Uint32Array(h);case u:return new Float32Array(h);case v:return new Float64Array(h);default:throw new Error("Unkown type: "+f)}}function e(a){var b,c,d,e,f,h=.75*a.length,i=a.length,j=0;"="===a[a.length-1]&&(h--,"="===a[a.length-2]&&h--);var k=new ArrayBuffer(h),l=new Uint8Array(k);for(b=0;i>b;b+=4)c=g.indexOf(a[b]),d=g.indexOf(a[b+1]),e=g.indexOf(a[b+2]),f=g.indexOf(a[b+3]),l[j++]=c<<2|d>>4,l[j++]=(15&d)<<4|e>>2,l[j++]=(3&e)<<6|63&f;return k}function f(a){var b,c=new Uint8Array(a),d="";for(b=0;b<c.length;b+=3)d+=g[c[b]>>2],d+=g[(3&c[b])<<4|c[b+1]>>4],d+=g[(15&c[b+1])<<2|c[b+2]>>6],d+=g[63&c[b+2]];return c.length%3===2?d=d.substring(0,d.length-1)+"=":c.length%3===1&&(d=d.substring(0,d.length-2)+"=="),d}var g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h="~~local_forage_type~",i=/^~~local_forage_type~([^~]+)~/,j="__lfsc__:",k=j.length,l="arbf",m="blob",n="si08",o="ui08",p="uic8",q="si16",r="si32",s="ur16",t="ui32",u="fl32",v="fl64",w=k+l.length,x=this,y={serialize:c,deserialize:d,stringToBuffer:e,bufferToString:f};b["default"]=y}.call("undefined"!=typeof window?window:self),a.exports=b["default"]},function(a,b,c){"use strict";b.__esModule=!0,function(){function a(a){var b=this,d={db:null};if(a)for(var e in a)d[e]="string"!=typeof a[e]?a[e].toString():a[e];var f=new Promise(function(c,e){try{d.db=n(d.name,String(d.version),d.description,d.size)}catch(f){return b.setDriver(b.LOCALSTORAGE).then(function(){return b._initStorage(a)}).then(c)["catch"](e)}d.db.transaction(function(a){a.executeSql("CREATE TABLE IF NOT EXISTS "+d.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],function(){b._dbInfo=d,c()},function(a,b){e(b)})})});return new Promise(function(a,b){a(c(3))}).then(function(a){return d.serializer=a,f})}function d(a,b){var c=this;"string"!=typeof a&&(m.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new Promise(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName+" WHERE key = ? LIMIT 1",[a],function(a,c){var d=c.rows.length?c.rows.item(0).value:null;d&&(d=e.serializer.deserialize(d)),b(d)},function(a,b){d(b)})})})["catch"](d)});return l(d,b),d}function e(a,b){var c=this,d=new Promise(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT * FROM "+e.storeName,[],function(c,d){for(var f=d.rows,g=f.length,h=0;g>h;h++){var i=f.item(h),j=i.value;if(j&&(j=e.serializer.deserialize(j)),j=a(j,i.key,h+1),void 0!==j)return void b(j)}b()},function(a,b){d(b)})})})["catch"](d)});return l(d,b),d}function f(a,b,c){var d=this;"string"!=typeof a&&(m.console.warn(a+" used as a key, but it is not a string."),a=String(a));var e=new Promise(function(c,e){d.ready().then(function(){void 0===b&&(b=null);var f=b,g=d._dbInfo;g.serializer.serialize(b,function(b,d){d?e(d):g.db.transaction(function(d){d.executeSql("INSERT OR REPLACE INTO "+g.storeName+" (key, value) VALUES (?, ?)",[a,b],function(){c(f)},function(a,b){e(b)})},function(a){a.code===a.QUOTA_ERR&&e(a)})})})["catch"](e)});return l(e,c),e}function g(a,b){var c=this;"string"!=typeof a&&(m.console.warn(a+" used as a key, but it is not a string."),a=String(a));var d=new Promise(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("DELETE FROM "+e.storeName+" WHERE key = ?",[a],function(){b()},function(a,b){d(b)})})})["catch"](d)});return l(d,b),d}function h(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("DELETE FROM "+d.storeName,[],function(){a()},function(a,b){c(b)})})})["catch"](c)});return l(c,a),c}function i(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT COUNT(key) as c FROM "+d.storeName,[],function(b,c){var d=c.rows.item(0).c;a(d)},function(a,b){c(b)})})})["catch"](c)});return l(c,a),c}function j(a,b){var c=this,d=new Promise(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){c.executeSql("SELECT key FROM "+e.storeName+" WHERE id = ? LIMIT 1",[a+1],function(a,c){var d=c.rows.length?c.rows.item(0).key:null;b(d)},function(a,b){d(b)})})})["catch"](d)});return l(d,b),d}function k(a){var b=this,c=new Promise(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){b.executeSql("SELECT key FROM "+d.storeName,[],function(b,c){for(var d=[],e=0;e<c.rows.length;e++)d.push(c.rows.item(e).key);a(d)},function(a,b){c(b)})})})["catch"](c)});return l(c,a),c}function l(a,b){b&&a.then(function(a){b(null,a)},function(a){b(a)})}var m=this,n=this.openDatabase;if(n){var o={_driver:"webSQLStorage",_initStorage:a,iterate:e,getItem:d,setItem:f,removeItem:g,clear:h,length:i,key:j,keys:k};b["default"]=o}}.call("undefined"!=typeof window?window:self),a.exports=b["default"]}])})}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:76}],78:[function(a,b,c){"use strict";var d=a("./lib/utils/common").assign,e=a("./lib/deflate"),f=a("./lib/inflate"),g=a("./lib/zlib/constants"),h={};d(h,e,f,g),b.exports=h},{"./lib/deflate":79,"./lib/inflate":80,"./lib/utils/common":81,"./lib/zlib/constants":84}],79:[function(a,b,c){"use strict";function d(a,b){var c=new u(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}function f(a,b){return b=b||{},b.gzip=!0,d(a,b)}var g=a("./zlib/deflate.js"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=Object.prototype.toString,m=0,n=4,o=0,p=1,q=2,r=-1,s=0,t=8,u=function(a){this.options=h.assign({level:r,method:t,chunkSize:16384,windowBits:15,memLevel:8,strategy:s,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==o)throw new Error(j[c]);b.header&&g.deflateSetHeader(this.strm,b.header)};u.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?n:m,"string"==typeof a?e.input=i.string2buf(a):"[object ArrayBuffer]"===l.call(a)?e.input=new Uint8Array(a):e.input=a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new h.Buf8(f),e.next_out=0,e.avail_out=f),c=g.deflate(e,d),c!==p&&c!==o)return this.onEnd(c),this.ended=!0,!1;(0===e.avail_out||0===e.avail_in&&(d===n||d===q))&&("string"===this.options.to?this.onData(i.buf2binstring(h.shrinkBuf(e.output,e.next_out))):this.onData(h.shrinkBuf(e.output,e.next_out)))}while((e.avail_in>0||0===e.avail_out)&&c!==p);return d===n?(c=g.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===o):d===q?(this.onEnd(o),e.avail_out=0,!0):!0},u.prototype.onData=function(a){this.chunks.push(a)},u.prototype.onEnd=function(a){a===o&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=u,c.deflate=d,c.deflateRaw=e,c.gzip=f},{"./utils/common":81,"./utils/strings":82,"./zlib/deflate.js":86,"./zlib/messages":91,"./zlib/zstream":93}],80:[function(a,b,c){"use strict";function d(a,b){var c=new n(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}var f=a("./zlib/inflate.js"),g=a("./utils/common"),h=a("./utils/strings"),i=a("./zlib/constants"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=a("./zlib/gzheader"),m=Object.prototype.toString,n=function(a){ this.options=g.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=f.inflateInit2(this.strm,b.windowBits);if(c!==i.Z_OK)throw new Error(j[c]);this.header=new l,f.inflateGetHeader(this.strm,this.header)};n.prototype.push=function(a,b){var c,d,e,j,k,l=this.strm,n=this.options.chunkSize,o=!1;if(this.ended)return!1;d=b===~~b?b:b===!0?i.Z_FINISH:i.Z_NO_FLUSH,"string"==typeof a?l.input=h.binstring2buf(a):"[object ArrayBuffer]"===m.call(a)?l.input=new Uint8Array(a):l.input=a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new g.Buf8(n),l.next_out=0,l.avail_out=n),c=f.inflate(l,i.Z_NO_FLUSH),c===i.Z_BUF_ERROR&&o===!0&&(c=i.Z_OK,o=!1),c!==i.Z_STREAM_END&&c!==i.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0===l.avail_out||c===i.Z_STREAM_END||0===l.avail_in&&(d===i.Z_FINISH||d===i.Z_SYNC_FLUSH))&&("string"===this.options.to?(e=h.utf8border(l.output,l.next_out),j=l.next_out-e,k=h.buf2string(l.output,e),l.next_out=j,l.avail_out=n-j,j&&g.arraySet(l.output,l.output,e,j,0),this.onData(k)):this.onData(g.shrinkBuf(l.output,l.next_out))),0===l.avail_in&&0===l.avail_out&&(o=!0)}while((l.avail_in>0||0===l.avail_out)&&c!==i.Z_STREAM_END);return c===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(c=f.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===i.Z_OK):d===i.Z_SYNC_FLUSH?(this.onEnd(i.Z_OK),l.avail_out=0,!0):!0},n.prototype.onData=function(a){this.chunks.push(a)},n.prototype.onEnd=function(a){a===i.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=g.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=n,c.inflate=d,c.inflateRaw=e,c.ungzip=d},{"./utils/common":81,"./utils/strings":82,"./zlib/constants":84,"./zlib/gzheader":87,"./zlib/inflate.js":89,"./zlib/messages":91,"./zlib/zstream":93}],81:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],82:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":81}],83:[function(a,b,c){"use strict";function d(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=d},{}],84:[function(a,b,c){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],85:[function(a,b,c){"use strict";function d(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function e(a,b,c,d){var e=f,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^e[255&(a^b[h])];return-1^a}var f=d();b.exports=e},{}],86:[function(a,b,c){"use strict";function d(a,b){return a.msg=G[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-ja?a.strstart-(a.w_size-ja):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ia,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ia-(m-f),f=m-ia,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-ja)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=ha)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+ha-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<ha)););}while(a.lookahead<ja&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sa;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sa;if(a.strstart-a.block_start>=a.w_size-ja&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sa:sa}function o(a,b){for(var c,d;;){if(a.lookahead<ja){if(m(a),a.lookahead<ja&&b===H)return sa;if(0===a.lookahead)break}if(c=0,a.lookahead>=ha&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ha-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-ja&&(a.match_length=l(a,c)),a.match_length>=ha)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-ha),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=ha){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ha-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=a.strstart<ha-1?a.strstart:ha-1,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function p(a,b){for(var c,d,e;;){if(a.lookahead<ja){if(m(a),a.lookahead<ja&&b===H)return sa;if(0===a.lookahead)break}if(c=0,a.lookahead>=ha&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ha-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=ha-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-ja&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===S||a.match_length===ha&&a.strstart-a.match_start>4096)&&(a.match_length=ha-1)),a.prev_length>=ha&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-ha,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-ha),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+ha-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=ha-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return sa}else if(a.match_available){if(d=D._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return sa}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=D._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<ha-1?a.strstart:ha-1,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ia){if(m(a),a.lookahead<=ia&&b===H)return sa;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=ha&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ia;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ia-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=ha?(c=D._tr_tally(a,1,a.match_length-ha),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sa;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sa}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ua:va):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sa:ta}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=ha-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fa),this.dyn_dtree=new C.Buf16(2*(2*da+1)),this.bl_tree=new C.Buf16(2*(2*ea+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(ga+1),this.heap=new C.Buf16(2*ca+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*ca+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?la:qa,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+ha-1)/ha),i.window=new C.Buf8(2*i.w_size),i.head=new C.Buf16(i.hash_size),i.prev=new C.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new C.Buf8(i.pending_buf_size),i.d_buf=i.lit_bufsize>>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===ra&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===la)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=ma):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wa),h.status=qa);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=ka),m+=31-m%31,h.status=qa,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===ma)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=na)}else h.status=na;if(h.status===na)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=oa)}else h.status=oa;if(h.status===oa)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pa)}else h.status=pa;if(h.status===pa&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qa)):h.status=qa),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===ra&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==ra){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ua||o===va)&&(h.status=ra),o===sa||o===ua)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===ta&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==la&&b!==ma&&b!==na&&b!==oa&&b!==pa&&b!==qa&&b!==ra?d(a,O):(a.state=null,b===qa?d(a,P):M)):O}var B,C=a("../utils/common"),D=a("./trees"),E=a("./adler32"),F=a("./crc32"),G=a("./messages"),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,aa=29,ba=256,ca=ba+1+aa,da=30,ea=19,fa=2*ca+1,ga=15,ha=3,ia=258,ja=ia+ha+1,ka=32,la=42,ma=69,na=73,oa=91,pa=103,qa=113,ra=666,sa=1,ta=2,ua=3,va=4,wa=3,xa=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xa(0,0,0,0,n),new xa(4,4,8,4,o),new xa(4,5,16,8,o),new xa(4,6,32,32,o),new xa(4,4,16,16,p),new xa(8,16,32,32,p),new xa(8,16,128,128,p),new xa(8,32,128,256,p),new xa(32,128,258,1024,p),new xa(32,258,258,4096,p)],c.deflateInit=y,c.deflateInit2=x,c.deflateReset=v,c.deflateResetKeep=u,c.deflateSetHeader=w,c.deflate=z,c.deflateEnd=A,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":81,"./adler32":83,"./crc32":85,"./messages":91,"./trees":92}],87:[function(a,b,c){"use strict";function d(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=d},{}],88:[function(a,b,c){"use strict";var d=30,e=12;b.exports=function(a,b){var c,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;c=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=c.dmax,l=c.wsize,m=c.whave,n=c.wnext,o=c.window,p=c.hold,q=c.bits,r=c.lencode,s=c.distcode,t=(1<<c.lenbits)-1,u=(1<<c.distbits)-1;a:do{15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){c.mode=e;break a}a.msg="invalid literal/length code",c.mode=d;break a}x=65535&v,w&=15,w&&(w>q&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",c.mode=d;break a}if(y=65535&v,w&=15,w>q&&(p+=B[f++]<<q,q+=8,w>q&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",c.mode=d;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&c.sane){a.msg="invalid distance too far back",c.mode=d;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=g>f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),c.hold=p,c.bits=q}},{}],89:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(oa),b.distcode=b.distdyn=new r.Buf32(pa),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,ra)}function k(a){if(sa){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sa=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new r.Buf8(f.wsize)),d>=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,Aa=0,Ba=new r.Buf8(4),Ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return F;c=a.state,c.mode===V&&(c.mode=W),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xa=C;a:for(;;)switch(c.mode){case K:if(0===c.wrap){c.mode=W;break}for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=la;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=la;break}if(m>>>=4,n-=4,wa=(15&m)+8,0===c.wbits)c.wbits=wa;else if(wa>c.wbits){a.msg="invalid window size",c.mode=la;break}c.dmax=1<<wa,a.adler=c.check=1,c.mode=512&m?T:V,m=0,n=0;break;case L:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==J){a.msg="unknown compression method",c.mode=la;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=la;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,Ba[2]=m>>>16&255,Ba[3]=m>>>24&255,c.check=t(c.check,Ba,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Ba[0]=255&m,Ba[1]=m>>>8&255,c.check=t(c.check,Ba,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wa=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wa)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.name+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wa=e[g+q++],c.head&&wa&&c.length<65536&&(c.head.comment+=String.fromCharCode(wa));while(wa&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wa)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=la;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=U;case U:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,E;a.adler=c.check=1,c.mode=V;case V:if(b===A||b===B)break a;case W:if(c.last){m>>>=7&n,n-=7&n,c.mode=ia;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=ba,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=la}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=la;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=la;break}c.have=0,c.mode=_;case _:for(;c.have<c.ncode;){for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Ca[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Ca[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,ya={bits:c.lenbits},xa=v(w,c.lens,0,19,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid code lengths set",c.mode=la;break}c.have=0,c.mode=aa;case aa:for(;c.have<c.nlen+c.ndist;){for(;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(16>sa)m>>>=qa,n-=qa,c.lens[c.have++]=sa;else{if(16===sa){for(za=qa+2;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qa,n-=qa,0===c.have){a.msg="invalid bit length repeat",c.mode=la;break}wa=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sa){for(za=qa+3;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=3+(7&m),m>>>=3,n-=3}else{for(za=qa+7;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qa,n-=qa,wa=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=la;break}for(;q--;)c.lens[c.have++]=wa}}if(c.mode===la)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=la;break}if(c.lenbits=9,ya={bits:c.lenbits},xa=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,ya),c.lenbits=ya.bits,xa){a.msg="invalid literal/lengths set",c.mode=la;break}if(c.distbits=6,c.distcode=c.distdyn,ya={bits:c.distbits},xa=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,ya),c.distbits=ya.bits,xa){a.msg="invalid distances set",c.mode=la;break}if(c.mode=ba,b===B)break a;case ba:c.mode=ca;case ca:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Aa=c.lencode[m&(1<<c.lenbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(ra&&0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.lencode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,c.length=sa,0===ra){c.mode=ha;break}if(32&ra){c.back=-1,c.mode=V;break}if(64&ra){a.msg="invalid literal/length code",c.mode=la;break}c.extra=15&ra,c.mode=da;case da:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=ea;case ea:for(;Aa=c.distcode[m&(1<<c.distbits)-1],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&ra)){for(ta=qa,ua=ra,va=sa;Aa=c.distcode[va+((m&(1<<ta+ua)-1)>>ta)],qa=Aa>>>24,ra=Aa>>>16&255,sa=65535&Aa,!(n>=ta+qa);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=ta,n-=ta,c.back+=ta}if(m>>>=qa,n-=qa,c.back+=qa,64&ra){a.msg="invalid distance code",c.mode=la;break}c.offset=sa,c.extra=15&ra,c.mode=fa;case fa:if(c.extra){for(za=c.extra;za>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=la;break}c.mode=ga;case ga:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=la;break}q>c.wnext?(q-=c.wnext,oa=c.wsize-q):oa=c.wnext-q,q>c.length&&(q=c.length),pa=c.window}else pa=f,oa=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pa[oa++];while(--q);0===c.length&&(c.mode=ca);break;case ha:if(0===j)break a;f[h++]=c.length,j--,c.mode=ca;break;case ia:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?t(c.check,f,p,h-p):s(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=la;break}m=0,n=0}c.mode=ja;case ja:if(c.wrap&&c.flags){for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=la;break}m=0,n=0}c.mode=ka;case ka:xa=D;break a;case la:xa=G;break a;case ma:return H;case na:default:return F}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<la&&(c.mode<ia||b!==z))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=ma, H):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?t(c.check,f,p,a.next_out-p):s(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===V?128:0)+(c.mode===ba||c.mode===Y?256:0),(0===o&&0===p||b===z)&&xa===C&&(xa=I),xa)}function n(a){if(!a||!a.state)return F;var b=a.state;return b.window&&(b.window=null),a.state=null,C}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?F:(c.head=b,b.done=!1,C)):F}var p,q,r=a("../utils/common"),s=a("./adler32"),t=a("./crc32"),u=a("./inffast"),v=a("./inftrees"),w=0,x=1,y=2,z=4,A=5,B=6,C=0,D=1,E=2,F=-2,G=-3,H=-4,I=-5,J=8,K=1,L=2,M=3,N=4,O=5,P=6,Q=7,R=8,S=9,T=10,U=11,V=12,W=13,X=14,Y=15,Z=16,$=17,_=18,aa=19,ba=20,ca=21,da=22,ea=23,fa=24,ga=25,ha=26,ia=27,ja=28,ka=29,la=30,ma=31,na=32,oa=852,pa=592,qa=15,ra=qa,sa=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":81,"./adler32":83,"./crc32":85,"./inffast":88,"./inftrees":90}],90:[function(a,b,c){"use strict";var d=a("../utils/common"),e=15,f=852,g=592,h=0,i=1,j=2,k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],l=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],n=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,c,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new d.Buf16(e+1),Q=new d.Buf16(e+1),R=null,S=0;for(D=0;e>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[c+E]]++;for(H=C,G=e;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;e>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===h||1!==G))return-1;for(Q[1]=0,D=1;e>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[c+E]&&(r[Q[b[c+E]]++]=E);if(a===h?(N=R=r,y=19):a===i?(N=k,O-=257,R=l,S-=257,y=256):(N=m,R=n,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===i&&L>f||a===j&&L>g)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[c+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;G>I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<<I,a===i&&L>f||a===j&&L>g)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":81}],91:[function(a,b,c){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],92:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?ga[a]:ga[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<<a.bi_valid&65535,f(a,a.bi_buf),a.bi_buf=b>>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function h(a,b,c){g(a,c[2*b],c[2*b+1])}function i(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ia[d]=c,a=0;a<1<<_[d];a++)ha[c++]=d;for(ha[c-1]=d,e=0,d=0;16>d;d++)for(ja[d]=e,a=0;a<1<<aa[d];a++)ga[e++]=d;for(e>>=7;R>d;d++)for(ja[d]=e<<7,a=0;a<1<<aa[d]-7;a++)ga[256+e++]=d;for(b=0;U>=b;b++)f[b]=0;for(a=0;143>=a;)ea[2*a+1]=8,a++,f[8]++;for(;255>=a;)ea[2*a+1]=9,a++,f[9]++;for(;279>=a;)ea[2*a+1]=7,a++,f[7]++;for(;287>=a;)ea[2*a+1]=8,a++,f[8]++;for(l(ea,Q+1,f),a=0;R>a;a++)fa[2*a+1]=5,fa[2*a]=i(a,5);ka=new na(ea,_,P+1,Q,U),la=new na(fa,aa,0,R,U),ma=new na(new Array(0),ba,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function r(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&q(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!q(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function s(a,b,c){var d,f,i,j,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],f=a.pending_buf[a.l_buf+k],k++,0===d?h(a,f,b):(i=ha[f],h(a,i+P+1,b),j=_[i],0!==j&&(f-=ia[i],g(a,f,j)),d--,i=e(d),h(a,i,c),j=aa[i],0!==j&&(d-=ja[i],g(a,d,j)));while(k<a.last_lit);h(a,X,b)}function t(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=T,c=0;i>c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(j>h?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++j<k&&e===i)){if(l>j){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*ca[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*ca[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pa||(m(),pa=!0),a.l_desc=new oa(a.dyn_ltree,ka),a.d_desc=new oa(a.dyn_dtree,la),a.bl_desc=new oa(a.bl_tree,ma),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,ea),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,ea,fa)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(ha[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=a("../utils/common"),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],aa=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ba=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ca=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],da=512,ea=new Array(2*(Q+2));d(ea);var fa=new Array(2*R);d(fa);var ga=new Array(da);d(ga);var ha=new Array(N-M+1);d(ha);var ia=new Array(O);d(ia);var ja=new Array(R);d(ja);var ka,la,ma,na=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},oa=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pa=!1;c._tr_init=z,c._tr_stored_block=A,c._tr_flush_block=C,c._tr_tally=D,c._tr_align=B},{"../utils/common":81}],93:[function(a,b,c){"use strict";function d(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=d},{}]},{},[1]);
app/scripts/components/kuchyne/kitchen_b.js
kroupaTomass/Rondo-kuchyne
import React from 'react'; import { Link } from 'react-router'; class Kitchen_b extends React.Component { constructor(props, context) { super(props); } render() { return ( <div className="col-md-4 no_padding"> <div className="single_image"> <a id="kitchen_b" href="#animatedModal_b"><img src="images/kitchen/img/02/01.jpg" alt="" /></a> </div> <div id="animatedModal_b"> <div className="close-animatedModal_b" id="closebt-container"> <img className="closebt" src="images/closebt.svg" /> </div> <div className="modal-content div-kitchen-content"> <h4>Moderní kuchyně</h4> <div className="row"> <div className="col-md-4"> </div> <div className="col-md-4"> <img src="images/kitchen/img/02/01.jpg" alt="" /> </div> <div className="col-md-4"> <img src="images/kitchen/img/02/02.jpg" alt="" /> </div> </div> <div className="row"> <div className="col-md-4"> <img src="images/kitchen/img/02/07.jpg" alt="" /> </div> <div className="col-md-4"> <img src="images/kitchen/img/02/06.jpg" alt="" /> </div> <div className="col-md-4"> <img src="images/kitchen/img/02/05.jpg" alt="" /> </div> </div> <div className="row"> <div className="col-md-4"> <img src="images/kitchen/img/02/08.jpg" alt="" /> </div> <div className="col-md-4"> <img src="images/kitchen/img/02/03.jpg" alt="" /> </div> <div className="col-md-4"> <img src="images/kitchen/img/02/04.jpg" alt="" /> </div> </div> </div> </div> <h2>Kuchyně</h2> <h4>moderní kuchyně</h4> </div> ); } } export default Kitchen_b;
tools/webpack.config.js
benbenye/react-on-react-start-kit
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import path from 'path'; import webpack from 'webpack'; import extend from 'extend'; import AssetsPlugin from 'assets-webpack-plugin'; const DEBUG = !process.argv.includes('--release'); const VERBOSE = process.argv.includes('--verbose'); const AUTOPREFIXER_BROWSERS = [ 'Android 2.3', 'Android >= 4', 'Chrome >= 35', 'Firefox >= 31', 'Explorer >= 9', 'iOS >= 7', 'Opera >= 12', 'Safari >= 7.1', ]; const GLOBALS = { 'process.env.NODE_ENV': DEBUG ? '"development"' : '"production"', __DEV__: DEBUG, }; // // Common configuration chunk to be used for both // client-side (client.js) and server-side (server.js) bundles // ----------------------------------------------------------------------------- const config = { context: path.resolve(__dirname, '../src'), output: { path: path.resolve(__dirname, '../build/public/assets'), publicPath: '/assets/', sourcePrefix: ' ', }, module: { loaders: [ { test: /\.jsx?$/, loader: 'babel-loader', include: [ path.resolve(__dirname, '../node_modules/react-routing/src'), path.resolve(__dirname, '../src'), ], query: { // https://github.com/babel/babel-loader#options cacheDirectory: DEBUG, // https://babeljs.io/docs/usage/options/ babelrc: false, presets: [ 'react', 'es2015', 'stage-0', ], plugins: [ 'transform-runtime', ...DEBUG ? [] : [ 'transform-react-remove-prop-types', 'transform-react-constant-elements', 'transform-react-inline-elements', ], ], }, }, { test: /\.scss$/, loaders: [ 'isomorphic-style-loader', `css-loader?${JSON.stringify({ sourceMap: DEBUG, // CSS Modules https://github.com/css-modules/css-modules modules: true, localIdentName: DEBUG ? '[name]_[local]_[hash:base64:3]' : '[hash:base64:4]', // CSS Nano http://cssnano.co/options/ minimize: !DEBUG, })}`, 'postcss-loader?parser=postcss-scss', ], }, { test: /\.json$/, loader: 'json-loader', }, { test: /\.txt$/, loader: 'raw-loader', }, { test: /\.(png|jpg|jpeg|gif|svg|woff|woff2)$/, loader: 'url-loader', query: { name: DEBUG ? '[path][name].[ext]?[hash]' : '[hash].[ext]', limit: 10000, }, }, { test: /\.(eot|ttf|wav|mp3)$/, loader: 'file-loader', query: { name: DEBUG ? '[path][name].[ext]?[hash]' : '[hash].[ext]', }, }, { test: /\.jade$/, loader: 'jade-loader', }, ], }, resolve: { root: path.resolve(__dirname, '../src'), modulesDirectories: ['node_modules'], extensions: ['', '.webpack.js', '.web.js', '.js', '.jsx', '.json'], }, cache: DEBUG, debug: DEBUG, stats: { colors: true, reasons: DEBUG, hash: VERBOSE, version: VERBOSE, timings: true, chunks: VERBOSE, chunkModules: VERBOSE, cached: VERBOSE, cachedAssets: VERBOSE, }, postcss(bundler) { return [ require('postcss-import')({ addDependencyTo: bundler }), require('precss')(), require('autoprefixer')({ browsers: AUTOPREFIXER_BROWSERS }), ]; }, }; // // Configuration for the client-side bundle (client.js) // ----------------------------------------------------------------------------- const clientConfig = extend(true, {}, config, { entry: './client.js', output: { filename: DEBUG ? '[name].js?[chunkhash]' : '[name].[chunkhash].js', chunkFilename: DEBUG ? '[name].[id].js?[chunkhash]' : '[name].[id].[chunkhash].js', }, target: 'web', plugins: [ // Define free variables // https://webpack.github.io/docs/list-of-plugins.html#defineplugin new webpack.DefinePlugin({ ...GLOBALS, 'process.env.BROWSER': true }), // Emit a file with assets paths // https://github.com/sporto/assets-webpack-plugin#options new AssetsPlugin({ path: path.resolve(__dirname, '../build'), filename: 'assets.js', processOutput: x => `module.exports = ${JSON.stringify(x)};`, }), // Assign the module and chunk ids by occurrence count // Consistent ordering of modules required if using any hashing ([hash] or [chunkhash]) // https://webpack.github.io/docs/list-of-plugins.html#occurrenceorderplugin new webpack.optimize.OccurenceOrderPlugin(true), ...DEBUG ? [] : [ // Search for equal or similar files and deduplicate them in the output // https://webpack.github.io/docs/list-of-plugins.html#dedupeplugin new webpack.optimize.DedupePlugin(), // Minimize all JavaScript output of chunks // https://github.com/mishoo/UglifyJS2#compressor-options new webpack.optimize.UglifyJsPlugin({ compress: { screw_ie8: true, // jscs:ignore requireCamelCaseOrUpperCaseIdentifiers warnings: VERBOSE, }, }), // A plugin for a more aggressive chunk merging strategy // https://webpack.github.io/docs/list-of-plugins.html#aggressivemergingplugin new webpack.optimize.AggressiveMergingPlugin(), ], ], // Choose a developer tool to enhance debugging // http://webpack.github.io/docs/configuration.html#devtool devtool: DEBUG ? 'cheap-module-eval-source-map' : false, }); // // Configuration for the server-side bundle (server.js) // ----------------------------------------------------------------------------- const serverConfig = extend(true, {}, config, { entry: './server.js', output: { filename: '../../server.js', libraryTarget: 'commonjs2', }, target: 'node', externals: [ /^\.\/assets$/, function filter(context, request, cb) { const isExternal = request.match(/^[@a-z][a-z\/\.\-0-9]*$/i) && !request.match(/^react-routing/) && !context.match(/[\\/]react-routing/); cb(null, Boolean(isExternal)); }, ], plugins: [ // Define free variables // https://webpack.github.io/docs/list-of-plugins.html#defineplugin new webpack.DefinePlugin({ ...GLOBALS, 'process.env.BROWSER': false }), // Adds a banner to the top of each generated chunk // https://webpack.github.io/docs/list-of-plugins.html#bannerplugin new webpack.BannerPlugin('require("source-map-support").install();', { raw: true, entryOnly: false }), ], node: { console: false, global: false, process: false, Buffer: false, __filename: false, __dirname: false, }, devtool: 'source-map', }); export default [clientConfig, serverConfig];
js/App/Components/TabViews/SubViews/Thermostat/ThermostatButton.js
telldus/telldus-live-mobile-v3
/** * Copyright 2016-present Telldus Technologies AB. * * This file is part of the Telldus Live! app. * * Telldus Live! app is free : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Telldus Live! app is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Telldus Live! app. If not, see <http://www.gnu.org/licenses/>. */ // @flow 'use strict'; import React from 'react'; import { StyleSheet, TouchableOpacity } from 'react-native'; const isEqual = require('react-fast-compare'); import { View } from '../../../../../BaseComponents'; import HeatInfoBlock from './HeatInfoBlock'; import { withTheme, } from '../../../HOC/withTheme'; import { shouldUpdate, } from '../../../../Lib'; import Theme from '../../../../Theme'; type Props = { device: Object, tileWidth: number, showStopButton?: boolean, isOpen: boolean, currentTemp?: number, colors: Object, colorScheme: string, themeInApp: string, style: Object, intl: Object, isGatewayActive: boolean, style?: Array<any> | Object, controlButtonStyle?: Array<any> | Object, infoBlockStyle?: Array<any> | Object, moreActionsStyle?: Array<any> | Object, openThermostatControl: (number) => void, closeSwipeRow: () => void, onPressDeviceAction?: () => void, disableActionIndicator?: boolean, }; type DefaultProps = { showStopButton: boolean, disableActionIndicator: boolean, }; type State = { currentModeIndex: number, }; class ThermostatButton extends View<Props, State> { props: Props; static defaultProps: DefaultProps = { showStopButton: true, disableActionIndicator: false, }; constructor(props: Props) { super(props); this.state = { currentModeIndex: 0, }; } shouldComponentUpdate(nextProps: Object, nextState: Object): boolean { if (!isEqual(this.state, nextState)) { return true; } const { showStopButton, ...others } = this.props; const { showStopButton: showStopButtonN, ...othersN } = nextProps; if (showStopButton !== showStopButtonN) { return true; } const propsChange = shouldUpdate(others, othersN, [ 'device', 'tileWidth', 'isOpen', 'currentTemp', 'onPressOverride', 'colorScheme', 'themeInApp', 'selectedThemeSet', ]); if (propsChange) { return true; } return false; } onPressMoreButtons = () => { const { device, isOpen, closeSwipeRow, onPressDeviceAction, openThermostatControl } = this.props; if (isOpen && closeSwipeRow) { closeSwipeRow(); return; } if (onPressDeviceAction) { onPressDeviceAction(); } if (openThermostatControl) { openThermostatControl(device.id); } } render(): Object { const { device, intl, isGatewayActive, infoBlockStyle, style, disableActionIndicator, colors, } = this.props; const { stateValues = {} } = device; let { THERMOSTAT: { mode, setpoint = {} } } = stateValues; if (!mode && Object.keys(setpoint).length !== 0) { mode = Object.keys(setpoint)[0]; } let currentModeValue = setpoint[mode]; currentModeValue = isNaN(currentModeValue) ? -100.0 : currentModeValue; const buttonTwo = <HeatInfoBlock isEnabled={true} style={[styles.buttonCommon, infoBlockStyle, {flex: 1, justifyContent: 'flex-start'}]} device={device} iconSize={35} isGatewayActive={isGatewayActive} intl={intl} currentValue={currentModeValue} currentMode={mode} iconStyle={styles.iconStyle} textOneStyle={styles.textOneStyle} textTwoStyle={styles.textTwoStyle} textThreeStyle={styles.textThreeStyle} disableActionIndicator={disableActionIndicator} infoIconStyle={styles.infoIconStyle}/>; const bGColor = !isGatewayActive ? Theme.Core.gatewayInactive : mode === 'off' ? colors.colorOffActiveBg : colors.colorOnActiveBg; return ( <View style={style}> <TouchableOpacity onPress={this.onPressMoreButtons}> <View style={[styles.buttonsCover, {backgroundColor: bGColor }]}> {buttonTwo} </View> </TouchableOpacity> </View> ); } } const styles = StyleSheet.create({ buttonsCover: { width: Theme.Core.buttonWidth * 2, padding: 3, flexDirection: 'row', justifyContent: 'flex-start', }, buttonCommon: { height: Theme.Core.rowHeight, justifyContent: 'center', alignItems: 'center', }, iconStyle: { fontSize: 30, color: '#fff', }, textOneStyle: { textAlign: 'left', color: '#fff', fontSize: Theme.Core.rowHeight * 0.33, height: Theme.Core.rowHeight * 0.39, }, actionIconStyle: { fontSize: 27, color: '#fff', paddingLeft: 3, }, textTwoStyle: { fontSize: Theme.Core.rowHeight * 0.2, color: '#fff', }, textThreeStyle: { textAlign: 'left', fontSize: Theme.Core.rowHeight * 0.19, height: Theme.Core.rowHeight * 0.3, color: '#fff', }, infoIconStyle: { fontSize: Theme.Core.rowHeight * 0.19, marginBottom: Theme.Core.rowHeight * 0.06, marginLeft: 2, color: '#fff', }, }); export default (withTheme(ThermostatButton): Object);
app/pages/project/components/ProjectNavbar/ProjectNavbar.spec.js
amyrebecca/Panoptes-Front-End
/* eslint func-names: 0, import/no-extraneous-dependencies: ["error", { "devDependencies": true }] prefer-arrow-callback: 0, "react/jsx-boolean-value": ["error", "always"] */ import React from 'react'; import { shallow } from 'enzyme'; import { expect } from 'chai'; import sinon from 'sinon'; import ProjectNavbar from './ProjectNavbar'; describe('ProjectNavbar', function () { before(function() { Object.defineProperty(document.body, 'clientWidth', { value: 100 }); }); it('should render without crashing', function () { expect(shallow(<ProjectNavbar />)).to.be.ok; }); describe('child rendering', function () { let wrapper; before(function() { wrapper = shallow(<ProjectNavbar />); }); it('should not render either navbar variants if SizeAwareProjectNavbarWide component\'s callback hasn\'t fired yet', function() { expect(wrapper.find('withSizes(ProjectNavbarNarrow)')).to.have.lengthOf(0); expect(wrapper.find('ProjectNavbarWide')).to.have.lengthOf(0); }); it('should render ProjectNavbarWide if state.useWide is true', function () { wrapper.setState({ loading: false, useWide: true }); expect(wrapper.find('withSizes(ProjectNavbarNarrow)')).to.have.lengthOf(0); expect(wrapper.find('ProjectNavbarWide')).to.have.lengthOf(1); }); it('should render ProjectNavbarNarrow if state.useWide is false', function () { wrapper.setState({ useWide: false }); expect(wrapper.find('withSizes(ProjectNavbarNarrow)')).to.have.lengthOf(1); expect(wrapper.find('ProjectNavbarWide')).to.have.lengthOf(0); }); }); describe('setBreakpoint behavior', function () { let wrapper; let setBreakpointSpy; before(function() { setBreakpointSpy = sinon.spy(ProjectNavbar.prototype, 'setBreakpoint'); wrapper = shallow(<ProjectNavbar />); wrapper.setState({ loading: false }); }); afterEach(function () { setBreakpointSpy.resetHistory(); }); after(function() { setBreakpointSpy.restore(); }); it('should correctly set the state if clientWidth is enough to render ProjectNavbarWide', function () { wrapper.instance().setBreakpoint({ width: 90 }); expect(setBreakpointSpy.calledOnce).to.be.true; expect(wrapper.state('useWide')).to.equal(true); }); it('should correctly set the state if clientWidth is too narrow to render ProjectNavbarWide', function () { wrapper.instance().setBreakpoint({ width: 110 }); expect(setBreakpointSpy.calledOnce).to.be.true; expect(wrapper.state('useWide')).to.equal(false); }); }); });
src/svg-icons/maps/directions-run.js
pradel/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsDirectionsRun = (props) => ( <SvgIcon {...props}> <path d="M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l-1-1.6c-.4-.6-1-1-1.7-1-.3 0-.5.1-.8.1l-5.2 2.2v4.7h2v-3.4l1.8-.7-1.6 8.1-4.9-1-.4 2 7 1.4z"/> </SvgIcon> ); MapsDirectionsRun = pure(MapsDirectionsRun); MapsDirectionsRun.displayName = 'MapsDirectionsRun'; export default MapsDirectionsRun;
src/components/Doctor/DoctorName.js
aspsoluciones/mcw-client
import React from 'react'; const DoctorName = ({doctor}) => { var _titulo = (doctor.sexo == 'F') ? 'Dra.' : 'Dr'; return( <div className="ui column"> <h1 className="ui bg-mcwDark huge label">{_titulo} { doctor.nombre } { doctor.apellido }</h1> <h3 className="color-mcwDark doctor-specialty"> {doctor.especialidad}, {doctor.sub_especialidad} </h3> </div> ) } export default DoctorName;
src/components/Create/index.js
Apozhidaev/terminal.mobi
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { create } from 'store/app/book/model/actions'; import EditForm from '../EditForm'; import Layout from '../Layout'; class Create extends Component { constructor(props) { super(props); const { match, slots } = this.props; const slot = { model: {}, parents: [] }; if (match.params.id) { const id = parseInt(match.params.id, 10); slot.parents.push(slots[id]); } this.state = { slot }; this.handleSave = this.handleSave.bind(this); } handleSave(fields) { const { onCreate } = this.props; onCreate({ fields }); } render() { const { slot } = this.state; return ( <Layout> <EditForm slot={slot} create onSave={this.handleSave} /> </Layout> ); } } const mapStateToProps = state => ({ slots: state.app.book.slots, }); const mapDispatchToProps = ({ onCreate: create.invoke, }); export default connect(mapStateToProps, mapDispatchToProps)(Create);
src/components/Timer.js
jiparker/bowl-game
import React from 'react'; import PropTypes from 'prop-types'; import {ROLL_MS} from '../constants/main'; class Timer extends React.Component { constructor(props, context) { super(props, context); this.trigger = this.trigger.bind(this); } componentWillReceiveProps(nextProps) { if (nextProps.continue) { let timer = setTimeout(this.trigger, ROLL_MS); this.start(timer); } } componentWillUnmount() { if (this.props.timer) { clearTimeout(this.props.timer); } } start(timer) { this.props.timerActions.start(timer); } trigger() { this.props.timerActions.trigger(); } render() { return null; } } Timer.propTypes = { intervalLength: PropTypes.number.isRequired, timerActions: PropTypes.object.isRequired, timer: PropTypes.number.isRequired }; export default Timer;
src/components/common/withExperimentParameters.js
goodjoblife/GoodJobShare
import React from 'react'; import useExperimentParameters from 'hooks/useExperimentParameters'; /** * This HOC is for using Google Optimize while doing A/B testing. * * Using MutationObserver to observe attributes change on element * with `elementId`, then pass the newest attributes to WrappedComponent. * * Because Google Optimize does not know when react has been loaded, and * we need to give attributes to some html element. So, the element with * `elementId` is typically the root of react, or at least beyond root * component of react. * * @param {Array} attributesToObserve the array of attributes to observe * @param {string} elementId the id of element to observe */ export default ( attributesToObserve = [], elementId = 'root', ) => WrappedComponent => { const WithExperimentParameters = props => { const parameters = useExperimentParameters(attributesToObserve, elementId); return <WrappedComponent {...props} experimentParameters={parameters} />; }; const displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; WithExperimentParameters.displayName = `WithExperimentParameters(${displayName})`; return WithExperimentParameters; };
assets/javascripts/kitten/components/structure/cards/simple-card/components/title.js
KissKissBankBank/kitten
import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import { parseHtml } from '../../../../../helpers/utils/parser' import { Title as TitleComponent } from '../../../../typography/title' import { Marger } from '../../../../layout/marger' export const Title = ({ title, titleProps }) => { return ( <Marger top="2" bottom=".3"> <TitleComponent tag="p" {...titleProps} className={classNames('k-SimpleCard__title', titleProps.className)} noMargin modifier="senary" > {parseHtml(title)} </TitleComponent> </Marger> ) } Title.propTypes = { title: PropTypes.string, titleProps: PropTypes.object, } Title.defaultProps = { title: null, titleProps: {}, }
project/src/scenes/Admin/Tags/components/AddTag/AddTag.js
strues/boldr
/* @flow */ import React from 'react'; import { Field, reduxForm } from 'redux-form'; import { graphql, compose } from 'react-apollo'; import styled from 'styled-components'; // internal import Button from '@boldr/ui/Button'; import Heading from '@boldr/ui/Heading'; import { Control, FormField, Form, TextFormField } from '@boldr/ui/Form'; import { formatReduxFormErrors } from '../../../../../core/reduxFormErrors'; import ADD_TAG_MUTATION from '../../gql/addTag.mutation.graphql'; import TAGS_QUERY from '../../gql/tags.graphql'; export type Props = { addTagMutation: Function, handleSubmit: Function, reset?: Function, submitting?: boolean, pristine?: boolean, }; const style = { margin: 12, }; const TagFormPanel = styled.div` padding: 2em; margin: 0 auto; `; class AddTag extends React.Component<Props, *> { addTagMutation = values => { const { addTagMutation } = this.props; return addTagMutation(values).catch(formatReduxFormErrors); }; props: Props; render() { // eslint-disable-line const { handleSubmit, reset, submitting, pristine } = this.props; return ( <TagFormPanel> <Heading type="h3" text="Add a New Tag" /> <Form className="boldr-form__addtag" onSubmit={handleSubmit(this.addTagMutation)}> <Field id="tag-name" name="name" component={TextFormField} type="text" label="Name" /> <FormField isGrouped> <Control> <Button htmlType="submit" kind="primary" style={style} disabled={submitting}> Save </Button> </Control> <Control> <Button onClick={reset} style={style} kind="primary" disabled={submitting || pristine} outline> Reset </Button> </Control> </FormField> </Form> </TagFormPanel> ); } } export default compose( // $FlowIssue graphql(ADD_TAG_MUTATION, { props: ({ mutate }) => ({ addTagMutation: values => mutate({ variables: { input: values }, // $FlowIssue refetchQueries: [ { query: TAGS_QUERY, variables: { offset: 0, limit: 20, }, }, ], }), }), }), reduxForm({ form: 'addTagForm', }), )(AddTag);
app/shared/reducers/index.js
hardchor/timesheets
import { combineReducers } from 'redux'; import { routerReducer as routing } from 'react-router-redux'; import { reducer as form } from 'redux-form'; import system from './system'; import job from './job'; import project from './project'; import github from './github'; import settings from './settings'; export default function getRootReducer(scope = 'main') { let reducers = { system, job, project, github, settings, }; if (scope === 'renderer') { reducers = { ...reducers, routing, form, }; } return combineReducers({ ...reducers }); }
_site/webgl-globe/polymer-globe/polymer/polymer-all/web-animations-js/test/coverage/escodegen/test/3rdparty/jquery-1.6.4.js
passiweinberger/passiweinberger.github.io
/*! * jQuery JavaScript Library v1.6.4 * http://jquery.com/ * * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Mon Sep 12 18:54:48 2011 -0400 */ (function( window, undefined ) { // Use the correct document accordingly with window argument (sandbox) var document = window.document, navigator = window.navigator, location = window.location; var jQuery = (function() { // Define a local copy of jQuery var jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); }, // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$, // A central reference to the root jQuery(document) rootjQuery, // A simple way to check for HTML strings or ID strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, // Check if a string has a non-whitespace character in it rnotwhite = /\S/, // Used for trimming whitespace trimLeft = /^\s+/, trimRight = /\s+$/, // Check for digits rdigit = /\d/, // Match a standalone tag rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, // JSON RegExp rvalidchars = /^[\],:{}\s]*$/, rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, // Useragent RegExp rwebkit = /(webkit)[ \/]([\w.]+)/, ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, rmsie = /(msie) ([\w.]+)/, rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, // Matches dashed string for camelizing rdashAlpha = /-([a-z]|[0-9])/ig, rmsPrefix = /^-ms-/, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { return ( letter + "" ).toUpperCase(); }, // Keep a UserAgent string for use with jQuery.browser userAgent = navigator.userAgent, // For matching the engine and version of the browser browserMatch, // The deferred used on DOM ready readyList, // The ready event handler DOMContentLoaded, // Save a reference to some core methods toString = Object.prototype.toString, hasOwn = Object.prototype.hasOwnProperty, push = Array.prototype.push, slice = Array.prototype.slice, trim = String.prototype.trim, indexOf = Array.prototype.indexOf, // [[Class]] -> type pairs class2type = {}; jQuery.fn = jQuery.prototype = { constructor: jQuery, init: function( selector, context, rootjQuery ) { var match, elem, ret, doc; // Handle $(""), $(null), or $(undefined) if ( !selector ) { return this; } // Handle $(DOMElement) if ( selector.nodeType ) { this.context = this[0] = selector; this.length = 1; return this; } // The body element only exists once, optimize finding it if ( selector === "body" && !context && document.body ) { this.context = document; this[0] = document.body; this.selector = selector; this.length = 1; return this; } // Handle HTML strings if ( typeof selector === "string" ) { // Are we dealing with HTML string or an ID? if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = quickExpr.exec( selector ); } // Verify a match, and that no context was specified for #id if ( match && (match[1] || !context) ) { // HANDLE: $(html) -> $(array) if ( match[1] ) { context = context instanceof jQuery ? context[0] : context; doc = (context ? context.ownerDocument || context : document); // If a single string is passed in and it's a single tag // just do a createElement and skip the rest ret = rsingleTag.exec( selector ); if ( ret ) { if ( jQuery.isPlainObject( context ) ) { selector = [ document.createElement( ret[1] ) ]; jQuery.fn.attr.call( selector, context, true ); } else { selector = [ doc.createElement( ret[1] ) ]; } } else { ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes; } return jQuery.merge( this, selector ); // HANDLE: $("#id") } else { elem = document.getElementById( match[2] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id !== match[2] ) { return rootjQuery.find( selector ); } // Otherwise, we inject the element directly into the jQuery object this.length = 1; this[0] = elem; } this.context = document; this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return (context || rootjQuery).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return rootjQuery.ready( selector ); } if (selector.selector !== undefined) { this.selector = selector.selector; this.context = selector.context; } return jQuery.makeArray( selector, this ); }, // Start with an empty selector selector: "", // The current version of jQuery being used jquery: "1.6.4", // The default length of a jQuery object is 0 length: 0, // The number of elements contained in the matched element set size: function() { return this.length; }, toArray: function() { return slice.call( this, 0 ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { return num == null ? // Return a 'clean' array this.toArray() : // Return just the object ( num < 0 ? this[ this.length + num ] : this[ num ] ); }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems, name, selector ) { // Build a new jQuery matched element set var ret = this.constructor(); if ( jQuery.isArray( elems ) ) { push.apply( ret, elems ); } else { jQuery.merge( ret, elems ); } // Add the old object onto the stack (as a reference) ret.prevObject = this; ret.context = this.context; if ( name === "find" ) { ret.selector = this.selector + (this.selector ? " " : "") + selector; } else if ( name ) { ret.selector = this.selector + "." + name + "(" + selector + ")"; } // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. // (You can seed the arguments with an array of args, but this is // only used internally.) each: function( callback, args ) { return jQuery.each( this, callback, args ); }, ready: function( fn ) { // Attach the listeners jQuery.bindReady(); // Add the callback readyList.done( fn ); return this; }, eq: function( i ) { return i === -1 ? this.slice( i ) : this.slice( i, +i + 1 ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, slice: function() { return this.pushStack( slice.apply( this, arguments ), "slice", slice.call(arguments).join(",") ); }, map: function( callback ) { return this.pushStack( jQuery.map(this, function( elem, i ) { return callback.call( elem, i, elem ); })); }, end: function() { return this.prevObject || this.constructor(null); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: [].sort, splice: [].splice }; // Give the init function the jQuery prototype for later instantiation jQuery.fn.init.prototype = jQuery.fn; jQuery.extend = jQuery.fn.extend = function() { var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; target = arguments[1] || {}; // skip the boolean and the target i = 2; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction(target) ) { target = {}; } // extend jQuery itself if only one argument is passed if ( length === i ) { target = this; --i; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( (options = arguments[ i ]) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && jQuery.isArray(src) ? src : []; } else { clone = src && jQuery.isPlainObject(src) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend({ noConflict: function( deep ) { if ( window.$ === jQuery ) { window.$ = _$; } if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; } return jQuery; }, // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }, // Handle when the DOM is ready ready: function( wait ) { // Either a released hold or an DOMready/load event and not yet ready if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( !document.body ) { return setTimeout( jQuery.ready, 1 ); } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); // Trigger any bound ready events if ( jQuery.fn.trigger ) { jQuery( document ).trigger( "ready" ).unbind( "ready" ); } } }, bindReady: function() { if ( readyList ) { return; } readyList = jQuery._Deferred(); // Catch cases where $(document).ready() is called after the // browser event has already occurred. if ( document.readyState === "complete" ) { // Handle it asynchronously to allow scripts the opportunity to delay ready return setTimeout( jQuery.ready, 1 ); } // Mozilla, Opera and webkit nightlies currently support this event if ( document.addEventListener ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", jQuery.ready, false ); // If IE event model is used } else if ( document.attachEvent ) { // ensure firing before onload, // maybe late but safe also for iframes document.attachEvent( "onreadystatechange", DOMContentLoaded ); // A fallback to window.onload, that will always work window.attachEvent( "onload", jQuery.ready ); // If IE and not a frame // continually check to see if the document is ready var toplevel = false; try { toplevel = window.frameElement == null; } catch(e) {} if ( document.documentElement.doScroll && toplevel ) { doScrollCheck(); } } }, // See test/unit/core.js for details concerning isFunction. // Since version 1.3, DOM methods and functions like alert // aren't supported. They return false on IE (#2968). isFunction: function( obj ) { return jQuery.type(obj) === "function"; }, isArray: Array.isArray || function( obj ) { return jQuery.type(obj) === "array"; }, // A crude way of determining if an object is a window isWindow: function( obj ) { return obj && typeof obj === "object" && "setInterval" in obj; }, isNaN: function( obj ) { return obj == null || !rdigit.test( obj ) || isNaN( obj ); }, type: function( obj ) { return obj == null ? String( obj ) : class2type[ toString.call(obj) ] || "object"; }, isPlainObject: function( obj ) { // Must be an Object. // Because of IE, we also have to check the presence of the constructor property. // Make sure that DOM nodes and window objects don't pass through, as well if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { return false; } try { // Not own constructor property must be Object if ( obj.constructor && !hasOwn.call(obj, "constructor") && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { return false; } } catch ( e ) { // IE8,9 Will throw exceptions on certain host objects #9897 return false; } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. var key; for ( key in obj ) {} return key === undefined || hasOwn.call( obj, key ); }, isEmptyObject: function( obj ) { for ( var name in obj ) { return false; } return true; }, error: function( msg ) { throw msg; }, parseJSON: function( data ) { if ( typeof data !== "string" || !data ) { return null; } // Make sure leading/trailing whitespace is removed (IE can't handle it) data = jQuery.trim( data ); // Attempt to parse using the native JSON parser first if ( window.JSON && window.JSON.parse ) { return window.JSON.parse( data ); } // Make sure the incoming data is actual JSON // Logic borrowed from http://json.org/json2.js if ( rvalidchars.test( data.replace( rvalidescape, "@" ) .replace( rvalidtokens, "]" ) .replace( rvalidbraces, "")) ) { return (new Function( "return " + data ))(); } jQuery.error( "Invalid JSON: " + data ); }, // Cross-browser xml parsing parseXML: function( data ) { var xml, tmp; try { if ( window.DOMParser ) { // Standard tmp = new DOMParser(); xml = tmp.parseFromString( data , "text/xml" ); } else { // IE xml = new ActiveXObject( "Microsoft.XMLDOM" ); xml.async = "false"; xml.loadXML( data ); } } catch( e ) { xml = undefined; } if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }, noop: function() {}, // Evaluates a script in a global context // Workarounds based on findings by Jim Driscoll // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context globalEval: function( data ) { if ( data && rnotwhite.test( data ) ) { // We use execScript on Internet Explorer // We use an anonymous function so that context is window // rather than jQuery in Firefox ( window.execScript || function( data ) { window[ "eval" ].call( window, data ); } )( data ); } }, // Convert dashed to camelCase; used by the css and data modules // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); }, // args is for internal usage only each: function( object, callback, args ) { var name, i = 0, length = object.length, isObj = length === undefined || jQuery.isFunction( object ); if ( args ) { if ( isObj ) { for ( name in object ) { if ( callback.apply( object[ name ], args ) === false ) { break; } } } else { for ( ; i < length; ) { if ( callback.apply( object[ i++ ], args ) === false ) { break; } } } // A special, fast, case for the most common use of each } else { if ( isObj ) { for ( name in object ) { if ( callback.call( object[ name ], name, object[ name ] ) === false ) { break; } } } else { for ( ; i < length; ) { if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { break; } } } } return object; }, // Use native String.trim function wherever possible trim: trim ? function( text ) { return text == null ? "" : trim.call( text ); } : // Otherwise use our own trimming functionality function( text ) { return text == null ? "" : text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); }, // results is for internal usage only makeArray: function( array, results ) { var ret = results || []; if ( array != null ) { // The window, strings (and functions) also have 'length' // The extra typeof function check is to prevent crashes // in Safari 2 (See: #3039) // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 var type = jQuery.type( array ); if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { push.call( ret, array ); } else { jQuery.merge( ret, array ); } } return ret; }, inArray: function( elem, array ) { if ( !array ) { return -1; } if ( indexOf ) { return indexOf.call( array, elem ); } for ( var i = 0, length = array.length; i < length; i++ ) { if ( array[ i ] === elem ) { return i; } } return -1; }, merge: function( first, second ) { var i = first.length, j = 0; if ( typeof second.length === "number" ) { for ( var l = second.length; j < l; j++ ) { first[ i++ ] = second[ j ]; } } else { while ( second[j] !== undefined ) { first[ i++ ] = second[ j++ ]; } } first.length = i; return first; }, grep: function( elems, callback, inv ) { var ret = [], retVal; inv = !!inv; // Go through the array, only saving the items // that pass the validator function for ( var i = 0, length = elems.length; i < length; i++ ) { retVal = !!callback( elems[ i ], i ); if ( inv !== retVal ) { ret.push( elems[ i ] ); } } return ret; }, // arg is for internal usage only map: function( elems, callback, arg ) { var value, key, ret = [], i = 0, length = elems.length, // jquery objects are treated as arrays isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; // Go through the array, translating each of the items to their if ( isArray ) { for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret[ ret.length ] = value; } } // Go through every key on the object, } else { for ( key in elems ) { value = callback( elems[ key ], key, arg ); if ( value != null ) { ret[ ret.length ] = value; } } } // Flatten any nested arrays return ret.concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { if ( typeof context === "string" ) { var tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !jQuery.isFunction( fn ) ) { return undefined; } // Simulated bind var args = slice.call( arguments, 2 ), proxy = function() { return fn.apply( context, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; return proxy; }, // Mutifunctional method to get and set values to a collection // The value/s can optionally be executed if it's a function access: function( elems, key, value, exec, fn, pass ) { var length = elems.length; // Setting many attributes if ( typeof key === "object" ) { for ( var k in key ) { jQuery.access( elems, k, key[k], exec, fn, value ); } return elems; } // Setting one attribute if ( value !== undefined ) { // Optionally, function values get executed if exec is true exec = !pass && exec && jQuery.isFunction(value); for ( var i = 0; i < length; i++ ) { fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); } return elems; } // Getting an attribute return length ? fn( elems[0], key ) : undefined; }, now: function() { return (new Date()).getTime(); }, // Use of jQuery.browser is frowned upon. // More details: http://docs.jquery.com/Utilities/jQuery.browser uaMatch: function( ua ) { ua = ua.toLowerCase(); var match = rwebkit.exec( ua ) || ropera.exec( ua ) || rmsie.exec( ua ) || ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || []; return { browser: match[1] || "", version: match[2] || "0" }; }, sub: function() { function jQuerySub( selector, context ) { return new jQuerySub.fn.init( selector, context ); } jQuery.extend( true, jQuerySub, this ); jQuerySub.superclass = this; jQuerySub.fn = jQuerySub.prototype = this(); jQuerySub.fn.constructor = jQuerySub; jQuerySub.sub = this.sub; jQuerySub.fn.init = function init( selector, context ) { if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { context = jQuerySub( context ); } return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); }; jQuerySub.fn.init.prototype = jQuerySub.fn; var rootjQuerySub = jQuerySub(document); return jQuerySub; }, browser: {} }); // Populate the class2type map jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); }); browserMatch = jQuery.uaMatch( userAgent ); if ( browserMatch.browser ) { jQuery.browser[ browserMatch.browser ] = true; jQuery.browser.version = browserMatch.version; } // Deprecated, use jQuery.browser.webkit instead if ( jQuery.browser.webkit ) { jQuery.browser.safari = true; } // IE doesn't match non-breaking spaces with \s if ( rnotwhite.test( "\xA0" ) ) { trimLeft = /^[\s\xA0]+/; trimRight = /[\s\xA0]+$/; } // All jQuery objects should point back to these rootjQuery = jQuery(document); // Cleanup functions for the document ready method if ( document.addEventListener ) { DOMContentLoaded = function() { document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); jQuery.ready(); }; } else if ( document.attachEvent ) { DOMContentLoaded = function() { // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( document.readyState === "complete" ) { document.detachEvent( "onreadystatechange", DOMContentLoaded ); jQuery.ready(); } }; } // The DOM ready check for Internet Explorer function doScrollCheck() { if ( jQuery.isReady ) { return; } try { // If IE is used, use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ document.documentElement.doScroll("left"); } catch(e) { setTimeout( doScrollCheck, 1 ); return; } // and execute any waiting functions jQuery.ready(); } return jQuery; })(); var // Promise methods promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ), // Static reference to slice sliceDeferred = [].slice; jQuery.extend({ // Create a simple deferred (one callbacks list) _Deferred: function() { var // callbacks list callbacks = [], // stored [ context , args ] fired, // to avoid firing when already doing so firing, // flag to know if the deferred has been cancelled cancelled, // the deferred itself deferred = { // done( f1, f2, ...) done: function() { if ( !cancelled ) { var args = arguments, i, length, elem, type, _fired; if ( fired ) { _fired = fired; fired = 0; } for ( i = 0, length = args.length; i < length; i++ ) { elem = args[ i ]; type = jQuery.type( elem ); if ( type === "array" ) { deferred.done.apply( deferred, elem ); } else if ( type === "function" ) { callbacks.push( elem ); } } if ( _fired ) { deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); } } return this; }, // resolve with given context and args resolveWith: function( context, args ) { if ( !cancelled && !fired && !firing ) { // make sure args are available (#8421) args = args || []; firing = 1; try { while( callbacks[ 0 ] ) { callbacks.shift().apply( context, args ); } } finally { fired = [ context, args ]; firing = 0; } } return this; }, // resolve with this as context and given arguments resolve: function() { deferred.resolveWith( this, arguments ); return this; }, // Has this deferred been resolved? isResolved: function() { return !!( firing || fired ); }, // Cancel cancel: function() { cancelled = 1; callbacks = []; return this; } }; return deferred; }, // Full fledged deferred (two callbacks list) Deferred: function( func ) { var deferred = jQuery._Deferred(), failDeferred = jQuery._Deferred(), promise; // Add errorDeferred methods, then and promise jQuery.extend( deferred, { then: function( doneCallbacks, failCallbacks ) { deferred.done( doneCallbacks ).fail( failCallbacks ); return this; }, always: function() { return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments ); }, fail: failDeferred.done, rejectWith: failDeferred.resolveWith, reject: failDeferred.resolve, isRejected: failDeferred.isResolved, pipe: function( fnDone, fnFail ) { return jQuery.Deferred(function( newDefer ) { jQuery.each( { done: [ fnDone, "resolve" ], fail: [ fnFail, "reject" ] }, function( handler, data ) { var fn = data[ 0 ], action = data[ 1 ], returned; if ( jQuery.isFunction( fn ) ) { deferred[ handler ](function() { returned = fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise().then( newDefer.resolve, newDefer.reject ); } else { newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); } }); } else { deferred[ handler ]( newDefer[ action ] ); } }); }).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { if ( obj == null ) { if ( promise ) { return promise; } promise = obj = {}; } var i = promiseMethods.length; while( i-- ) { obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ]; } return obj; } }); // Make sure only one callback list will be used deferred.done( failDeferred.cancel ).fail( deferred.cancel ); // Unexpose cancel delete deferred.cancel; // Call given func if any if ( func ) { func.call( deferred, deferred ); } return deferred; }, // Deferred helper when: function( firstParam ) { var args = arguments, i = 0, length = args.length, count = length, deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? firstParam : jQuery.Deferred(); function resolveFunc( i ) { return function( value ) { args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; if ( !( --count ) ) { // Strange bug in FF4: // Values changed onto the arguments object sometimes end up as undefined values // outside the $.when method. Cloning the object into a fresh array solves the issue deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) ); } }; } if ( length > 1 ) { for( ; i < length; i++ ) { if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) { args[ i ].promise().then( resolveFunc(i), deferred.reject ); } else { --count; } } if ( !count ) { deferred.resolveWith( deferred, args ); } } else if ( deferred !== firstParam ) { deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); } return deferred.promise(); } }); jQuery.support = (function() { var div = document.createElement( "div" ), documentElement = document.documentElement, all, a, select, opt, input, marginDiv, support, fragment, body, testElementParent, testElement, testElementStyle, tds, events, eventName, i, isSupported; // Preliminary tests div.setAttribute("className", "t"); div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>"; all = div.getElementsByTagName( "*" ); a = div.getElementsByTagName( "a" )[ 0 ]; // Can't get basic test support if ( !all || !all.length || !a ) { return {}; } // First batch of supports tests select = document.createElement( "select" ); opt = select.appendChild( document.createElement("option") ); input = div.getElementsByTagName( "input" )[ 0 ]; support = { // IE strips leading whitespace when .innerHTML is used leadingWhitespace: ( div.firstChild.nodeType === 3 ), // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables tbody: !div.getElementsByTagName( "tbody" ).length, // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE htmlSerialize: !!div.getElementsByTagName( "link" ).length, // Get the style information from getAttribute // (IE uses .cssText instead) style: /top/.test( a.getAttribute("style") ), // Make sure that URLs aren't manipulated // (IE normalizes it by default) hrefNormalized: ( a.getAttribute( "href" ) === "/a" ), // Make sure that element opacity exists // (IE uses filter instead) // Use a regex to work around a WebKit issue. See #5145 opacity: /^0.55$/.test( a.style.opacity ), // Verify style float existence // (IE uses styleFloat instead of cssFloat) cssFloat: !!a.style.cssFloat, // Make sure that if no value is specified for a checkbox // that it defaults to "on". // (WebKit defaults to "" instead) checkOn: ( input.value === "on" ), // Make sure that a selected-by-default option has a working selected property. // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) optSelected: opt.selected, // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) getSetAttribute: div.className !== "t", // Will be defined later submitBubbles: true, changeBubbles: true, focusinBubbles: false, deleteExpando: true, noCloneEvent: true, inlineBlockNeedsLayout: false, shrinkWrapBlocks: false, reliableMarginRight: true }; // Make sure checked status is properly cloned input.checked = true; support.noCloneChecked = input.cloneNode( true ).checked; // Make sure that the options inside disabled selects aren't marked as disabled // (WebKit marks them as disabled) select.disabled = true; support.optDisabled = !opt.disabled; // Test to see if it's possible to delete an expando from an element // Fails in Internet Explorer try { delete div.test; } catch( e ) { support.deleteExpando = false; } if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { div.attachEvent( "onclick", function() { // Cloning a node shouldn't copy over any // bound event handlers (IE does this) support.noCloneEvent = false; }); div.cloneNode( true ).fireEvent( "onclick" ); } // Check if a radio maintains it's value // after being appended to the DOM input = document.createElement("input"); input.value = "t"; input.setAttribute("type", "radio"); support.radioValue = input.value === "t"; input.setAttribute("checked", "checked"); div.appendChild( input ); fragment = document.createDocumentFragment(); fragment.appendChild( div.firstChild ); // WebKit doesn't clone checked state correctly in fragments support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; div.innerHTML = ""; // Figure out if the W3C box model works as expected div.style.width = div.style.paddingLeft = "1px"; body = document.getElementsByTagName( "body" )[ 0 ]; // We use our own, invisible, body unless the body is already present // in which case we use a div (#9239) testElement = document.createElement( body ? "div" : "body" ); testElementStyle = { visibility: "hidden", width: 0, height: 0, border: 0, margin: 0, background: "none" }; if ( body ) { jQuery.extend( testElementStyle, { position: "absolute", left: "-1000px", top: "-1000px" }); } for ( i in testElementStyle ) { testElement.style[ i ] = testElementStyle[ i ]; } testElement.appendChild( div ); testElementParent = body || documentElement; testElementParent.insertBefore( testElement, testElementParent.firstChild ); // Check if a disconnected checkbox will retain its checked // value of true after appended to the DOM (IE6/7) support.appendChecked = input.checked; support.boxModel = div.offsetWidth === 2; if ( "zoom" in div.style ) { // Check if natively block-level elements act like inline-block // elements when setting their display to 'inline' and giving // them layout // (IE < 8 does this) div.style.display = "inline"; div.style.zoom = 1; support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); // Check if elements with layout shrink-wrap their children // (IE 6 does this) div.style.display = ""; div.innerHTML = "<div style='width:4px;'></div>"; support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); } div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>"; tds = div.getElementsByTagName( "td" ); // Check if table cells still have offsetWidth/Height when they are set // to display:none and there are still other visible table cells in a // table row; if so, offsetWidth/Height are not reliable for use when // determining if an element has been hidden directly using // display:none (it is still safe to use offsets if a parent element is // hidden; don safety goggles and see bug #4512 for more information). // (only IE 8 fails this test) isSupported = ( tds[ 0 ].offsetHeight === 0 ); tds[ 0 ].style.display = ""; tds[ 1 ].style.display = "none"; // Check if empty table cells still have offsetWidth/Height // (IE < 8 fail this test) support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); div.innerHTML = ""; // Check if div with explicit width and no margin-right incorrectly // gets computed margin-right based on width of container. For more // info see bug #3333 // Fails in WebKit before Feb 2011 nightlies // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right if ( document.defaultView && document.defaultView.getComputedStyle ) { marginDiv = document.createElement( "div" ); marginDiv.style.width = "0"; marginDiv.style.marginRight = "0"; div.appendChild( marginDiv ); support.reliableMarginRight = ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; } // Remove the body element we added testElement.innerHTML = ""; testElementParent.removeChild( testElement ); // Technique from Juriy Zaytsev // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ // We only care about the case where non-standard event systems // are used, namely in IE. Short-circuiting here helps us to // avoid an eval call (in setAttribute) which can cause CSP // to go haywire. See: https://developer.mozilla.org/en/Security/CSP if ( div.attachEvent ) { for( i in { submit: 1, change: 1, focusin: 1 } ) { eventName = "on" + i; isSupported = ( eventName in div ); if ( !isSupported ) { div.setAttribute( eventName, "return;" ); isSupported = ( typeof div[ eventName ] === "function" ); } support[ i + "Bubbles" ] = isSupported; } } // Null connected elements to avoid leaks in IE testElement = fragment = select = opt = body = marginDiv = div = input = null; return support; })(); // Keep track of boxModel jQuery.boxModel = jQuery.support.boxModel; var rbrace = /^(?:\{.*\}|\[.*\])$/, rmultiDash = /([A-Z])/g; jQuery.extend({ cache: {}, // Please use with caution uuid: 0, // Unique for each copy of jQuery on the page // Non-digits removed to match rinlinejQuery expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), // The following elements throw uncatchable exceptions if you // attempt to add expando properties to them. noData: { "embed": true, // Ban all objects except for Flash (which handle expandos) "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", "applet": true }, hasData: function( elem ) { elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; return !!elem && !isEmptyDataObject( elem ); }, data: function( elem, name, data, pvt /* Internal Use Only */ ) { if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, ret, internalKey = jQuery.expando, getByName = typeof name === "string", // We have to handle DOM nodes and JS objects differently because IE6-7 // can't GC object references properly across the DOM-JS boundary isNode = elem.nodeType, // Only DOM nodes need the global jQuery cache; JS object data is // attached directly to the object so GC can occur automatically cache = isNode ? jQuery.cache : elem, // Only defining an ID for JS objects if its cache already exists allows // the code to shortcut on the same path as a DOM node with no cache id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando; // Avoid doing any more work than we need to when trying to get data on an // object that has no data at all if ( (!id || (pvt && id && (cache[ id ] && !cache[ id ][ internalKey ]))) && getByName && data === undefined ) { return; } if ( !id ) { // Only DOM nodes need a new unique ID for each element since their data // ends up in the global cache if ( isNode ) { elem[ jQuery.expando ] = id = ++jQuery.uuid; } else { id = jQuery.expando; } } if ( !cache[ id ] ) { cache[ id ] = {}; // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery // metadata on plain JS objects when the object is serialized using // JSON.stringify if ( !isNode ) { cache[ id ].toJSON = jQuery.noop; } } // An object can be passed to jQuery.data instead of a key/value pair; this gets // shallow copied over onto the existing cache if ( typeof name === "object" || typeof name === "function" ) { if ( pvt ) { cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name); } else { cache[ id ] = jQuery.extend(cache[ id ], name); } } thisCache = cache[ id ]; // Internal jQuery data is stored in a separate object inside the object's data // cache in order to avoid key collisions between internal data and user-defined // data if ( pvt ) { if ( !thisCache[ internalKey ] ) { thisCache[ internalKey ] = {}; } thisCache = thisCache[ internalKey ]; } if ( data !== undefined ) { thisCache[ jQuery.camelCase( name ) ] = data; } // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should // not attempt to inspect the internal events object using jQuery.data, as this // internal data object is undocumented and subject to change. if ( name === "events" && !thisCache[name] ) { return thisCache[ internalKey ] && thisCache[ internalKey ].events; } // Check for both converted-to-camel and non-converted data property names // If a data property was specified if ( getByName ) { // First Try to find as-is property data ret = thisCache[ name ]; // Test for null|undefined property data if ( ret == null ) { // Try to find the camelCased property ret = thisCache[ jQuery.camelCase( name ) ]; } } else { ret = thisCache; } return ret; }, removeData: function( elem, name, pvt /* Internal Use Only */ ) { if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, // Reference to internal data cache key internalKey = jQuery.expando, isNode = elem.nodeType, // See jQuery.data for more information cache = isNode ? jQuery.cache : elem, // See jQuery.data for more information id = isNode ? elem[ jQuery.expando ] : jQuery.expando; // If there is already no cache entry for this object, there is no // purpose in continuing if ( !cache[ id ] ) { return; } if ( name ) { thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ]; if ( thisCache ) { // Support interoperable removal of hyphenated or camelcased keys if ( !thisCache[ name ] ) { name = jQuery.camelCase( name ); } delete thisCache[ name ]; // If there is no data left in the cache, we want to continue // and let the cache object itself get destroyed if ( !isEmptyDataObject(thisCache) ) { return; } } } // See jQuery.data for more information if ( pvt ) { delete cache[ id ][ internalKey ]; // Don't destroy the parent cache unless the internal data object // had been the only thing left in it if ( !isEmptyDataObject(cache[ id ]) ) { return; } } var internalCache = cache[ id ][ internalKey ]; // Browsers that fail expando deletion also refuse to delete expandos on // the window, but it will allow it on all other JS objects; other browsers // don't care // Ensure that `cache` is not a window object #10080 if ( jQuery.support.deleteExpando || !cache.setInterval ) { delete cache[ id ]; } else { cache[ id ] = null; } // We destroyed the entire user cache at once because it's faster than // iterating through each key, but we need to continue to persist internal // data if it existed if ( internalCache ) { cache[ id ] = {}; // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery // metadata on plain JS objects when the object is serialized using // JSON.stringify if ( !isNode ) { cache[ id ].toJSON = jQuery.noop; } cache[ id ][ internalKey ] = internalCache; // Otherwise, we need to eliminate the expando on the node to avoid // false lookups in the cache for entries that no longer exist } else if ( isNode ) { // IE does not allow us to delete expando properties from nodes, // nor does it have a removeAttribute function on Document nodes; // we must handle all of these cases if ( jQuery.support.deleteExpando ) { delete elem[ jQuery.expando ]; } else if ( elem.removeAttribute ) { elem.removeAttribute( jQuery.expando ); } else { elem[ jQuery.expando ] = null; } } }, // For internal use only. _data: function( elem, name, data ) { return jQuery.data( elem, name, data, true ); }, // A method for determining if a DOM node can handle the data expando acceptData: function( elem ) { if ( elem.nodeName ) { var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; if ( match ) { return !(match === true || elem.getAttribute("classid") !== match); } } return true; } }); jQuery.fn.extend({ data: function( key, value ) { var data = null; if ( typeof key === "undefined" ) { if ( this.length ) { data = jQuery.data( this[0] ); if ( this[0].nodeType === 1 ) { var attr = this[0].attributes, name; for ( var i = 0, l = attr.length; i < l; i++ ) { name = attr[i].name; if ( name.indexOf( "data-" ) === 0 ) { name = jQuery.camelCase( name.substring(5) ); dataAttr( this[0], name, data[ name ] ); } } } } return data; } else if ( typeof key === "object" ) { return this.each(function() { jQuery.data( this, key ); }); } var parts = key.split("."); parts[1] = parts[1] ? "." + parts[1] : ""; if ( value === undefined ) { data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); // Try to fetch any internally stored data first if ( data === undefined && this.length ) { data = jQuery.data( this[0], key ); data = dataAttr( this[0], key, data ); } return data === undefined && parts[1] ? this.data( parts[0] ) : data; } else { return this.each(function() { var $this = jQuery( this ), args = [ parts[0], value ]; $this.triggerHandler( "setData" + parts[1] + "!", args ); jQuery.data( this, key, value ); $this.triggerHandler( "changeData" + parts[1] + "!", args ); }); } }, removeData: function( key ) { return this.each(function() { jQuery.removeData( this, key ); }); } }); function dataAttr( elem, key, data ) { // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = data === "true" ? true : data === "false" ? false : data === "null" ? null : !jQuery.isNaN( data ) ? parseFloat( data ) : rbrace.test( data ) ? jQuery.parseJSON( data ) : data; } catch( e ) {} // Make sure we set the data so it isn't changed later jQuery.data( elem, key, data ); } else { data = undefined; } } return data; } // TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON // property to be considered empty objects; this property always exists in // order to make sure JSON.stringify does not expose internal metadata function isEmptyDataObject( obj ) { for ( var name in obj ) { if ( name !== "toJSON" ) { return false; } } return true; } function handleQueueMarkDefer( elem, type, src ) { var deferDataKey = type + "defer", queueDataKey = type + "queue", markDataKey = type + "mark", defer = jQuery.data( elem, deferDataKey, undefined, true ); if ( defer && ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) && ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) { // Give room for hard-coded callbacks to fire first // and eventually mark/queue something else on the element setTimeout( function() { if ( !jQuery.data( elem, queueDataKey, undefined, true ) && !jQuery.data( elem, markDataKey, undefined, true ) ) { jQuery.removeData( elem, deferDataKey, true ); defer.resolve(); } }, 0 ); } } jQuery.extend({ _mark: function( elem, type ) { if ( elem ) { type = (type || "fx") + "mark"; jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true ); } }, _unmark: function( force, elem, type ) { if ( force !== true ) { type = elem; elem = force; force = false; } if ( elem ) { type = type || "fx"; var key = type + "mark", count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 ); if ( count ) { jQuery.data( elem, key, count, true ); } else { jQuery.removeData( elem, key, true ); handleQueueMarkDefer( elem, type, "mark" ); } } }, queue: function( elem, type, data ) { if ( elem ) { type = (type || "fx") + "queue"; var q = jQuery.data( elem, type, undefined, true ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !q || jQuery.isArray(data) ) { q = jQuery.data( elem, type, jQuery.makeArray(data), true ); } else { q.push( data ); } } return q || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), fn = queue.shift(), defer; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift("inprogress"); } fn.call(elem, function() { jQuery.dequeue(elem, type); }); } if ( !queue.length ) { jQuery.removeData( elem, type + "queue", true ); handleQueueMarkDefer( elem, type, "queue" ); } } }); jQuery.fn.extend({ queue: function( type, data ) { if ( typeof type !== "string" ) { data = type; type = "fx"; } if ( data === undefined ) { return jQuery.queue( this[0], type ); } return this.each(function() { var queue = jQuery.queue( this, type, data ); if ( type === "fx" && queue[0] !== "inprogress" ) { jQuery.dequeue( this, type ); } }); }, dequeue: function( type ) { return this.each(function() { jQuery.dequeue( this, type ); }); }, // Based off of the plugin by Clint Helfers, with permission. // http://blindsignals.com/index.php/2009/07/jquery-delay/ delay: function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; type = type || "fx"; return this.queue( type, function() { var elem = this; setTimeout(function() { jQuery.dequeue( elem, type ); }, time ); }); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, object ) { if ( typeof type !== "string" ) { object = type; type = undefined; } type = type || "fx"; var defer = jQuery.Deferred(), elements = this, i = elements.length, count = 1, deferDataKey = type + "defer", queueDataKey = type + "queue", markDataKey = type + "mark", tmp; function resolve() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } } while( i-- ) { if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) { count++; tmp.done( resolve ); } } resolve(); return defer.promise(); } }); var rclass = /[\n\t\r]/g, rspace = /\s+/, rreturn = /\r/g, rtype = /^(?:button|input)$/i, rfocusable = /^(?:button|input|object|select|textarea)$/i, rclickable = /^a(?:rea)?$/i, rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, nodeHook, boolHook; jQuery.fn.extend({ attr: function( name, value ) { return jQuery.access( this, name, value, true, jQuery.attr ); }, removeAttr: function( name ) { return this.each(function() { jQuery.removeAttr( this, name ); }); }, prop: function( name, value ) { return jQuery.access( this, name, value, true, jQuery.prop ); }, removeProp: function( name ) { name = jQuery.propFix[ name ] || name; return this.each(function() { // try/catch handles cases where IE balks (such as removing a property on window) try { this[ name ] = undefined; delete this[ name ]; } catch( e ) {} }); }, addClass: function( value ) { var classNames, i, l, elem, setClass, c, cl; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).addClass( value.call(this, j, this.className) ); }); } if ( value && typeof value === "string" ) { classNames = value.split( rspace ); for ( i = 0, l = this.length; i < l; i++ ) { elem = this[ i ]; if ( elem.nodeType === 1 ) { if ( !elem.className && classNames.length === 1 ) { elem.className = value; } else { setClass = " " + elem.className + " "; for ( c = 0, cl = classNames.length; c < cl; c++ ) { if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { setClass += classNames[ c ] + " "; } } elem.className = jQuery.trim( setClass ); } } } } return this; }, removeClass: function( value ) { var classNames, i, l, elem, className, c, cl; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).removeClass( value.call(this, j, this.className) ); }); } if ( (value && typeof value === "string") || value === undefined ) { classNames = (value || "").split( rspace ); for ( i = 0, l = this.length; i < l; i++ ) { elem = this[ i ]; if ( elem.nodeType === 1 && elem.className ) { if ( value ) { className = (" " + elem.className + " ").replace( rclass, " " ); for ( c = 0, cl = classNames.length; c < cl; c++ ) { className = className.replace(" " + classNames[ c ] + " ", " "); } elem.className = jQuery.trim( className ); } else { elem.className = ""; } } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value, isBool = typeof stateVal === "boolean"; if ( jQuery.isFunction( value ) ) { return this.each(function( i ) { jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); }); } return this.each(function() { if ( type === "string" ) { // toggle individual class names var className, i = 0, self = jQuery( this ), state = stateVal, classNames = value.split( rspace ); while ( (className = classNames[ i++ ]) ) { // check each className given, space seperated list state = isBool ? state : !self.hasClass( className ); self[ state ? "addClass" : "removeClass" ]( className ); } } else if ( type === "undefined" || type === "boolean" ) { if ( this.className ) { // store className if set jQuery._data( this, "__className__", this.className ); } // toggle whole className this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; } }); }, hasClass: function( selector ) { var className = " " + selector + " "; for ( var i = 0, l = this.length; i < l; i++ ) { if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { return true; } } return false; }, val: function( value ) { var hooks, ret, elem = this[0]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { return ret; } ret = elem.value; return typeof ret === "string" ? // handle most common string cases ret.replace(rreturn, "") : // handle cases where value is null/undef or number ret == null ? "" : ret; } return undefined; } var isFunction = jQuery.isFunction( value ); return this.each(function( i ) { var self = jQuery(this), val; if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call( this, i, self.val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( jQuery.isArray( val ) ) { val = jQuery.map(val, function ( value ) { return value == null ? "" : value + ""; }); } hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; // If set returns undefined, fall back to normal setting if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } }); } }); jQuery.extend({ valHooks: { option: { get: function( elem ) { // attributes.value is undefined in Blackberry 4.7 but // uses .value. See #6932 var val = elem.attributes.value; return !val || val.specified ? elem.value : elem.text; } }, select: { get: function( elem ) { var value, index = elem.selectedIndex, values = [], options = elem.options, one = elem.type === "select-one"; // Nothing was selected if ( index < 0 ) { return null; } // Loop through all the selected options for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { var option = options[ i ]; // Don't return options that are disabled or in a disabled optgroup if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } // Fixes Bug #2551 -- select.val() broken in IE after form.reset() if ( one && !values.length && options.length ) { return jQuery( options[ index ] ).val(); } return values; }, set: function( elem, value ) { var values = jQuery.makeArray( value ); jQuery(elem).find("option").each(function() { this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; }); if ( !values.length ) { elem.selectedIndex = -1; } return values; } } }, attrFn: { val: true, css: true, html: true, text: true, data: true, width: true, height: true, offset: true }, attrFix: { // Always normalize to ensure hook usage tabindex: "tabIndex" }, attr: function( elem, name, value, pass ) { var nType = elem.nodeType; // don't get/set attributes on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return undefined; } if ( pass && name in jQuery.attrFn ) { return jQuery( elem )[ name ]( value ); } // Fallback to prop when attributes are not supported if ( !("getAttribute" in elem) ) { return jQuery.prop( elem, name, value ); } var ret, hooks, notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); // Normalize the name if needed if ( notxml ) { name = jQuery.attrFix[ name ] || name; hooks = jQuery.attrHooks[ name ]; if ( !hooks ) { // Use boolHook for boolean attributes if ( rboolean.test( name ) ) { hooks = boolHook; // Use nodeHook if available( IE6/7 ) } else if ( nodeHook ) { hooks = nodeHook; } } } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); return undefined; } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { elem.setAttribute( name, "" + value ); return value; } } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { ret = elem.getAttribute( name ); // Non-existent attributes return null, we normalize to undefined return ret === null ? undefined : ret; } }, removeAttr: function( elem, name ) { var propName; if ( elem.nodeType === 1 ) { name = jQuery.attrFix[ name ] || name; jQuery.attr( elem, name, "" ); elem.removeAttribute( name ); // Set corresponding property to false for boolean attributes if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) { elem[ propName ] = false; } } }, attrHooks: { type: { set: function( elem, value ) { // We can't allow the type property to be changed (since it causes problems in IE) if ( rtype.test( elem.nodeName ) && elem.parentNode ) { jQuery.error( "type property can't be changed" ); } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { // Setting the type on a radio button after the value resets the value in IE6-9 // Reset value to it's default in case type is set after value // This is for element creation var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } }, // Use the value property for back compat // Use the nodeHook for button elements in IE6/7 (#1954) value: { get: function( elem, name ) { if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { return nodeHook.get( elem, name ); } return name in elem ? elem.value : null; }, set: function( elem, value, name ) { if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { return nodeHook.set( elem, value, name ); } // Does not return so that setAttribute is also used elem.value = value; } } }, propFix: { tabindex: "tabIndex", readonly: "readOnly", "for": "htmlFor", "class": "className", maxlength: "maxLength", cellspacing: "cellSpacing", cellpadding: "cellPadding", rowspan: "rowSpan", colspan: "colSpan", usemap: "useMap", frameborder: "frameBorder", contenteditable: "contentEditable" }, prop: function( elem, name, value ) { var nType = elem.nodeType; // don't get/set properties on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return undefined; } var ret, hooks, notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); if ( notxml ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { return (elem[ name ] = value); } } else { if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { return elem[ name ]; } } }, propHooks: { tabIndex: { get: function( elem ) { // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ var attributeNode = elem.getAttributeNode("tabindex"); return attributeNode && attributeNode.specified ? parseInt( attributeNode.value, 10 ) : rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? 0 : undefined; } } } }); // Add the tabindex propHook to attrHooks for back-compat jQuery.attrHooks.tabIndex = jQuery.propHooks.tabIndex; // Hook for boolean attributes boolHook = { get: function( elem, name ) { // Align boolean attributes with corresponding properties // Fall back to attribute presence where some booleans are not supported var attrNode; return jQuery.prop( elem, name ) === true || ( attrNode = elem.getAttributeNode( name ) ) && attrNode.nodeValue !== false ? name.toLowerCase() : undefined; }, set: function( elem, value, name ) { var propName; if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else { // value is true since we know at this point it's type boolean and not false // Set boolean attributes to the same name and set the DOM property propName = jQuery.propFix[ name ] || name; if ( propName in elem ) { // Only set the IDL specifically if it already exists on the element elem[ propName ] = true; } elem.setAttribute( name, name.toLowerCase() ); } return name; } }; // IE6/7 do not support getting/setting some attributes with get/setAttribute if ( !jQuery.support.getSetAttribute ) { // Use this for any attribute in IE6/7 // This fixes almost every IE6/7 issue nodeHook = jQuery.valHooks.button = { get: function( elem, name ) { var ret; ret = elem.getAttributeNode( name ); // Return undefined if nodeValue is empty string return ret && ret.nodeValue !== "" ? ret.nodeValue : undefined; }, set: function( elem, value, name ) { // Set the existing or create a new attribute node var ret = elem.getAttributeNode( name ); if ( !ret ) { ret = document.createAttribute( name ); elem.setAttributeNode( ret ); } return (ret.nodeValue = value + ""); } }; // Set width and height to auto instead of 0 on empty string( Bug #8150 ) // This is for removals jQuery.each([ "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { set: function( elem, value ) { if ( value === "" ) { elem.setAttribute( name, "auto" ); return value; } } }); }); } // Some attributes require a special call on IE if ( !jQuery.support.hrefNormalized ) { jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { get: function( elem ) { var ret = elem.getAttribute( name, 2 ); return ret === null ? undefined : ret; } }); }); } if ( !jQuery.support.style ) { jQuery.attrHooks.style = { get: function( elem ) { // Return undefined in the case of empty string // Normalize to lowercase since IE uppercases css property names return elem.style.cssText.toLowerCase() || undefined; }, set: function( elem, value ) { return (elem.style.cssText = "" + value); } }; } // Safari mis-reports the default selected property of an option // Accessing the parent's selectedIndex property fixes it if ( !jQuery.support.optSelected ) { jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { get: function( elem ) { var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; // Make sure that it also works with optgroups, see #5701 if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } return null; } }); } // Radios and checkboxes getter/setter if ( !jQuery.support.checkOn ) { jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { get: function( elem ) { // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified return elem.getAttribute("value") === null ? "on" : elem.value; } }; }); } jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { set: function( elem, value ) { if ( jQuery.isArray( value ) ) { return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0); } } }); }); var rnamespaces = /\.(.*)$/, rformElems = /^(?:textarea|input|select)$/i, rperiod = /\./g, rspaces = / /g, rescape = /[^\w\s.|`]/g, fcleanup = function( nm ) { return nm.replace(rescape, "\\$&"); }; /* * A number of helper functions used for managing events. * Many of the ideas behind this code originated from * Dean Edwards' addEvent library. */ jQuery.event = { // Bind an event to an element // Original by Dean Edwards add: function( elem, types, handler, data ) { if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } if ( handler === false ) { handler = returnFalse; } else if ( !handler ) { // Fixes bug #7229. Fix recommended by jdalton return; } var handleObjIn, handleObj; if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; } // Make sure that the function being executed has a unique ID if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure var elemData = jQuery._data( elem ); // If no elemData is found then we must be trying to bind to one of the // banned noData elements if ( !elemData ) { return; } var events = elemData.events, eventHandle = elemData.handle; if ( !events ) { elemData.events = events = {}; } if ( !eventHandle ) { elemData.handle = eventHandle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.handle.apply( eventHandle.elem, arguments ) : undefined; }; } // Add elem as a property of the handle function // This is to prevent a memory leak with non-native events in IE. eventHandle.elem = elem; // Handle multiple events separated by a space // jQuery(...).bind("mouseover mouseout", fn); types = types.split(" "); var type, i = 0, namespaces; while ( (type = types[ i++ ]) ) { handleObj = handleObjIn ? jQuery.extend({}, handleObjIn) : { handler: handler, data: data }; // Namespaced event handlers if ( type.indexOf(".") > -1 ) { namespaces = type.split("."); type = namespaces.shift(); handleObj.namespace = namespaces.slice(0).sort().join("."); } else { namespaces = []; handleObj.namespace = ""; } handleObj.type = type; if ( !handleObj.guid ) { handleObj.guid = handler.guid; } // Get the current list of functions bound to this event var handlers = events[ type ], special = jQuery.event.special[ type ] || {}; // Init the event handler queue if ( !handlers ) { handlers = events[ type ] = []; // Check for a special event handler // Only use addEventListener/attachEvent if the special // events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { // Bind the global event handler to the element if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add the function to the element's handler list handlers.push( handleObj ); // Keep track of which events have been used, for event optimization jQuery.event.global[ type ] = true; } // Nullify elem to prevent memory leaks in IE elem = null; }, global: {}, // Detach an event or set of events from an element remove: function( elem, types, handler, pos ) { // don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } if ( handler === false ) { handler = returnFalse; } var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, elemData = jQuery.hasData( elem ) && jQuery._data( elem ), events = elemData && elemData.events; if ( !elemData || !events ) { return; } // types is actually an event object here if ( types && types.type ) { handler = types.handler; types = types.type; } // Unbind all events for the element if ( !types || typeof types === "string" && types.charAt(0) === "." ) { types = types || ""; for ( type in events ) { jQuery.event.remove( elem, type + types ); } return; } // Handle multiple events separated by a space // jQuery(...).unbind("mouseover mouseout", fn); types = types.split(" "); while ( (type = types[ i++ ]) ) { origType = type; handleObj = null; all = type.indexOf(".") < 0; namespaces = []; if ( !all ) { // Namespaced event handlers namespaces = type.split("."); type = namespaces.shift(); namespace = new RegExp("(^|\\.)" + jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); } eventType = events[ type ]; if ( !eventType ) { continue; } if ( !handler ) { for ( j = 0; j < eventType.length; j++ ) { handleObj = eventType[ j ]; if ( all || namespace.test( handleObj.namespace ) ) { jQuery.event.remove( elem, origType, handleObj.handler, j ); eventType.splice( j--, 1 ); } } continue; } special = jQuery.event.special[ type ] || {}; for ( j = pos || 0; j < eventType.length; j++ ) { handleObj = eventType[ j ]; if ( handler.guid === handleObj.guid ) { // remove the given handler for the given type if ( all || namespace.test( handleObj.namespace ) ) { if ( pos == null ) { eventType.splice( j--, 1 ); } if ( special.remove ) { special.remove.call( elem, handleObj ); } } if ( pos != null ) { break; } } } // remove generic event handler if no more handlers exist if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } ret = null; delete events[ type ]; } } // Remove the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { var handle = elemData.handle; if ( handle ) { handle.elem = null; } delete elemData.events; delete elemData.handle; if ( jQuery.isEmptyObject( elemData ) ) { jQuery.removeData( elem, undefined, true ); } } }, // Events that are safe to short-circuit if no handlers are attached. // Native DOM events should not be added, they may have inline handlers. customEvent: { "getData": true, "setData": true, "changeData": true }, trigger: function( event, data, elem, onlyHandlers ) { // Event object or event type var type = event.type || event, namespaces = [], exclusive; if ( type.indexOf("!") >= 0 ) { // Exclusive events trigger only for the exact event (no namespaces) type = type.slice(0, -1); exclusive = true; } if ( type.indexOf(".") >= 0 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split("."); type = namespaces.shift(); namespaces.sort(); } if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { // No jQuery handlers for this event type, and it can't have inline handlers return; } // Caller can pass in an Event, Object, or just an event type string event = typeof event === "object" ? // jQuery.Event object event[ jQuery.expando ] ? event : // Object literal new jQuery.Event( type, event ) : // Just the event type (string) new jQuery.Event( type ); event.type = type; event.exclusive = exclusive; event.namespace = namespaces.join("."); event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)"); // triggerHandler() and global events don't bubble or run the default action if ( onlyHandlers || !elem ) { event.preventDefault(); event.stopPropagation(); } // Handle a global trigger if ( !elem ) { // TODO: Stop taunting the data cache; remove global events and always attach to document jQuery.each( jQuery.cache, function() { // internalKey variable is just used to make it easier to find // and potentially change this stuff later; currently it just // points to jQuery.expando var internalKey = jQuery.expando, internalCache = this[ internalKey ]; if ( internalCache && internalCache.events && internalCache.events[ type ] ) { jQuery.event.trigger( event, data, internalCache.handle.elem ); } }); return; } // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // Clean up the event in case it is being reused event.result = undefined; event.target = elem; // Clone any incoming data and prepend the event, creating the handler arg list data = data != null ? jQuery.makeArray( data ) : []; data.unshift( event ); var cur = elem, // IE doesn't like method names with a colon (#3533, #8272) ontype = type.indexOf(":") < 0 ? "on" + type : ""; // Fire event on the current element, then bubble up the DOM tree do { var handle = jQuery._data( cur, "handle" ); event.currentTarget = cur; if ( handle ) { handle.apply( cur, data ); } // Trigger an inline bound script if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) { event.result = false; event.preventDefault(); } // Bubble up to document, then to window cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window; } while ( cur && !event.isPropagationStopped() ); // If nobody prevented the default action, do it now if ( !event.isDefaultPrevented() ) { var old, special = jQuery.event.special[ type ] || {}; if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) && !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { // Call a native DOM method on the target with the same name name as the event. // Can't use an .isFunction)() check here because IE6/7 fails that test. // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch. try { if ( ontype && elem[ type ] ) { // Don't re-trigger an onFOO event when we call its FOO() method old = elem[ ontype ]; if ( old ) { elem[ ontype ] = null; } jQuery.event.triggered = type; elem[ type ](); } } catch ( ieError ) {} if ( old ) { elem[ ontype ] = old; } jQuery.event.triggered = undefined; } } return event.result; }, handle: function( event ) { event = jQuery.event.fix( event || window.event ); // Snapshot the handlers list since a called handler may add/remove events. var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0), run_all = !event.exclusive && !event.namespace, args = Array.prototype.slice.call( arguments, 0 ); // Use the fix-ed Event rather than the (read-only) native event args[0] = event; event.currentTarget = this; for ( var j = 0, l = handlers.length; j < l; j++ ) { var handleObj = handlers[ j ]; // Triggered event must 1) be non-exclusive and have no namespace, or // 2) have namespace(s) a subset or equal to those in the bound event. if ( run_all || event.namespace_re.test( handleObj.namespace ) ) { // Pass in a reference to the handler function itself // So that we can later remove it event.handler = handleObj.handler; event.data = handleObj.data; event.handleObj = handleObj; var ret = handleObj.handler.apply( this, args ); if ( ret !== undefined ) { event.result = ret; if ( ret === false ) { event.preventDefault(); event.stopPropagation(); } } if ( event.isImmediatePropagationStopped() ) { break; } } } return event.result; }, props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix: function( event ) { if ( event[ jQuery.expando ] ) { return event; } // store a copy of the original event object // and "clone" to set read-only properties var originalEvent = event; event = jQuery.Event( originalEvent ); for ( var i = this.props.length, prop; i; ) { prop = this.props[ --i ]; event[ prop ] = originalEvent[ prop ]; } // Fix target property, if necessary if ( !event.target ) { // Fixes #1925 where srcElement might not be defined either event.target = event.srcElement || document; } // check if target is a textnode (safari) if ( event.target.nodeType === 3 ) { event.target = event.target.parentNode; } // Add relatedTarget, if necessary if ( !event.relatedTarget && event.fromElement ) { event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; } // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && event.clientX != null ) { var eventDocument = event.target.ownerDocument || document, doc = eventDocument.documentElement, body = eventDocument.body; event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); } // Add which for key events if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { event.which = event.charCode != null ? event.charCode : event.keyCode; } // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) if ( !event.metaKey && event.ctrlKey ) { event.metaKey = event.ctrlKey; } // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if ( !event.which && event.button !== undefined ) { event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); } return event; }, // Deprecated, use jQuery.guid instead guid: 1E8, // Deprecated, use jQuery.proxy instead proxy: jQuery.proxy, special: { ready: { // Make sure the ready event is setup setup: jQuery.bindReady, teardown: jQuery.noop }, live: { add: function( handleObj ) { jQuery.event.add( this, liveConvert( handleObj.origType, handleObj.selector ), jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); }, remove: function( handleObj ) { jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); } }, beforeunload: { setup: function( data, namespaces, eventHandle ) { // We only want to do this special case on windows if ( jQuery.isWindow( this ) ) { this.onbeforeunload = eventHandle; } }, teardown: function( namespaces, eventHandle ) { if ( this.onbeforeunload === eventHandle ) { this.onbeforeunload = null; } } } } }; jQuery.removeEvent = document.removeEventListener ? function( elem, type, handle ) { if ( elem.removeEventListener ) { elem.removeEventListener( type, handle, false ); } } : function( elem, type, handle ) { if ( elem.detachEvent ) { elem.detachEvent( "on" + type, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !this.preventDefault ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // timeStamp is buggy for some events on Firefox(#3843) // So we won't rely on the native value this.timeStamp = jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; function returnFalse() { return false; } function returnTrue() { return true; } // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { preventDefault: function() { this.isDefaultPrevented = returnTrue; var e = this.originalEvent; if ( !e ) { return; } // if preventDefault exists run it on the original event if ( e.preventDefault ) { e.preventDefault(); // otherwise set the returnValue property of the original event to false (IE) } else { e.returnValue = false; } }, stopPropagation: function() { this.isPropagationStopped = returnTrue; var e = this.originalEvent; if ( !e ) { return; } // if stopPropagation exists run it on the original event if ( e.stopPropagation ) { e.stopPropagation(); } // otherwise set the cancelBubble property of the original event to true (IE) e.cancelBubble = true; }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = returnTrue; this.stopPropagation(); }, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse }; // Checks if an event happened on an element within another element // Used in jQuery.event.special.mouseenter and mouseleave handlers var withinElement = function( event ) { // Check if mouse(over|out) are still within the same parent element var related = event.relatedTarget, inside = false, eventType = event.type; event.type = event.data; if ( related !== this ) { if ( related ) { inside = jQuery.contains( this, related ); } if ( !inside ) { jQuery.event.handle.apply( this, arguments ); event.type = eventType; } } }, // In case of event delegation, we only need to rename the event.type, // liveHandler will take care of the rest. delegate = function( event ) { event.type = event.data; jQuery.event.handle.apply( this, arguments ); }; // Create mouseenter and mouseleave events jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { setup: function( data ) { jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); }, teardown: function( data ) { jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); } }; }); // submit delegation if ( !jQuery.support.submitBubbles ) { jQuery.event.special.submit = { setup: function( data, namespaces ) { if ( !jQuery.nodeName( this, "form" ) ) { jQuery.event.add(this, "click.specialSubmit", function( e ) { // Avoid triggering error on non-existent type attribute in IE VML (#7071) var elem = e.target, type = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.type : ""; if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { trigger( "submit", this, arguments ); } }); jQuery.event.add(this, "keypress.specialSubmit", function( e ) { var elem = e.target, type = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.type : ""; if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { trigger( "submit", this, arguments ); } }); } else { return false; } }, teardown: function( namespaces ) { jQuery.event.remove( this, ".specialSubmit" ); } }; } // change delegation, happens here so we have bind. if ( !jQuery.support.changeBubbles ) { var changeFilters, getVal = function( elem ) { var type = jQuery.nodeName( elem, "input" ) ? elem.type : "", val = elem.value; if ( type === "radio" || type === "checkbox" ) { val = elem.checked; } else if ( type === "select-multiple" ) { val = elem.selectedIndex > -1 ? jQuery.map( elem.options, function( elem ) { return elem.selected; }).join("-") : ""; } else if ( jQuery.nodeName( elem, "select" ) ) { val = elem.selectedIndex; } return val; }, testChange = function testChange( e ) { var elem = e.target, data, val; if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { return; } data = jQuery._data( elem, "_change_data" ); val = getVal(elem); // the current data will be also retrieved by beforeactivate if ( e.type !== "focusout" || elem.type !== "radio" ) { jQuery._data( elem, "_change_data", val ); } if ( data === undefined || val === data ) { return; } if ( data != null || val ) { e.type = "change"; e.liveFired = undefined; jQuery.event.trigger( e, arguments[1], elem ); } }; jQuery.event.special.change = { filters: { focusout: testChange, beforedeactivate: testChange, click: function( e ) { var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) { testChange.call( this, e ); } }, // Change has to be called before submit // Keydown will be called before keypress, which is used in submit-event delegation keydown: function( e ) { var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) || (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || type === "select-multiple" ) { testChange.call( this, e ); } }, // Beforeactivate happens also before the previous element is blurred // with this event you can't trigger a change event, but you can store // information beforeactivate: function( e ) { var elem = e.target; jQuery._data( elem, "_change_data", getVal(elem) ); } }, setup: function( data, namespaces ) { if ( this.type === "file" ) { return false; } for ( var type in changeFilters ) { jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); } return rformElems.test( this.nodeName ); }, teardown: function( namespaces ) { jQuery.event.remove( this, ".specialChange" ); return rformElems.test( this.nodeName ); } }; changeFilters = jQuery.event.special.change.filters; // Handle when the input is .focus()'d changeFilters.focus = changeFilters.beforeactivate; } function trigger( type, elem, args ) { // Piggyback on a donor event to simulate a different one. // Fake originalEvent to avoid donor's stopPropagation, but if the // simulated event prevents default then we do the same on the donor. // Don't pass args or remember liveFired; they apply to the donor event. var event = jQuery.extend( {}, args[ 0 ] ); event.type = type; event.originalEvent = {}; event.liveFired = undefined; jQuery.event.handle.call( elem, event ); if ( event.isDefaultPrevented() ) { args[ 0 ].preventDefault(); } } // Create "bubbling" focus and blur events if ( !jQuery.support.focusinBubbles ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler while someone wants focusin/focusout var attaches = 0; jQuery.event.special[ fix ] = { setup: function() { if ( attaches++ === 0 ) { document.addEventListener( orig, handler, true ); } }, teardown: function() { if ( --attaches === 0 ) { document.removeEventListener( orig, handler, true ); } } }; function handler( donor ) { // Donor event is always a native one; fix it and switch its type. // Let focusin/out handler cancel the donor focus/blur event. var e = jQuery.event.fix( donor ); e.type = fix; e.originalEvent = {}; jQuery.event.trigger( e, null, e.target ); if ( e.isDefaultPrevented() ) { donor.preventDefault(); } } }); } jQuery.each(["bind", "one"], function( i, name ) { jQuery.fn[ name ] = function( type, data, fn ) { var handler; // Handle object literals if ( typeof type === "object" ) { for ( var key in type ) { this[ name ](key, data, type[key], fn); } return this; } if ( arguments.length === 2 || data === false ) { fn = data; data = undefined; } if ( name === "one" ) { handler = function( event ) { jQuery( this ).unbind( event, handler ); return fn.apply( this, arguments ); }; handler.guid = fn.guid || jQuery.guid++; } else { handler = fn; } if ( type === "unload" && name !== "one" ) { this.one( type, data, fn ); } else { for ( var i = 0, l = this.length; i < l; i++ ) { jQuery.event.add( this[i], type, handler, data ); } } return this; }; }); jQuery.fn.extend({ unbind: function( type, fn ) { // Handle object literals if ( typeof type === "object" && !type.preventDefault ) { for ( var key in type ) { this.unbind(key, type[key]); } } else { for ( var i = 0, l = this.length; i < l; i++ ) { jQuery.event.remove( this[i], type, fn ); } } return this; }, delegate: function( selector, types, data, fn ) { return this.live( types, data, fn, selector ); }, undelegate: function( selector, types, fn ) { if ( arguments.length === 0 ) { return this.unbind( "live" ); } else { return this.die( types, null, fn, selector ); } }, trigger: function( type, data ) { return this.each(function() { jQuery.event.trigger( type, data, this ); }); }, triggerHandler: function( type, data ) { if ( this[0] ) { return jQuery.event.trigger( type, data, this[0], true ); } }, toggle: function( fn ) { // Save reference to arguments for access in closure var args = arguments, guid = fn.guid || jQuery.guid++, i = 0, toggler = function( event ) { // Figure out which function to execute var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); // Make sure that clicks stop event.preventDefault(); // and execute the function return args[ lastToggle ].apply( this, arguments ) || false; }; // link all the functions, so any of them can unbind this click handler toggler.guid = guid; while ( i < args.length ) { args[ i++ ].guid = guid; } return this.click( toggler ); }, hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } }); var liveMap = { focus: "focusin", blur: "focusout", mouseenter: "mouseover", mouseleave: "mouseout" }; jQuery.each(["live", "die"], function( i, name ) { jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { var type, i = 0, match, namespaces, preType, selector = origSelector || this.selector, context = origSelector ? this : jQuery( this.context ); if ( typeof types === "object" && !types.preventDefault ) { for ( var key in types ) { context[ name ]( key, data, types[key], selector ); } return this; } if ( name === "die" && !types && origSelector && origSelector.charAt(0) === "." ) { context.unbind( origSelector ); return this; } if ( data === false || jQuery.isFunction( data ) ) { fn = data || returnFalse; data = undefined; } types = (types || "").split(" "); while ( (type = types[ i++ ]) != null ) { match = rnamespaces.exec( type ); namespaces = ""; if ( match ) { namespaces = match[0]; type = type.replace( rnamespaces, "" ); } if ( type === "hover" ) { types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); continue; } preType = type; if ( liveMap[ type ] ) { types.push( liveMap[ type ] + namespaces ); type = type + namespaces; } else { type = (liveMap[ type ] || type) + namespaces; } if ( name === "live" ) { // bind live handler for ( var j = 0, l = context.length; j < l; j++ ) { jQuery.event.add( context[j], "live." + liveConvert( type, selector ), { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); } } else { // unbind live handler context.unbind( "live." + liveConvert( type, selector ), fn ); } } return this; }; }); function liveHandler( event ) { var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, elems = [], selectors = [], events = jQuery._data( this, "events" ); // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911) if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) { return; } if ( event.namespace ) { namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); } event.liveFired = this; var live = events.live.slice(0); for ( j = 0; j < live.length; j++ ) { handleObj = live[j]; if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { selectors.push( handleObj.selector ); } else { live.splice( j--, 1 ); } } match = jQuery( event.target ).closest( selectors, event.currentTarget ); for ( i = 0, l = match.length; i < l; i++ ) { close = match[i]; for ( j = 0; j < live.length; j++ ) { handleObj = live[j]; if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) { elem = close.elem; related = null; // Those two events require additional checking if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { event.type = handleObj.preType; related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; // Make sure not to accidentally match a child element with the same selector if ( related && jQuery.contains( elem, related ) ) { related = elem; } } if ( !related || related !== elem ) { elems.push({ elem: elem, handleObj: handleObj, level: close.level }); } } } } for ( i = 0, l = elems.length; i < l; i++ ) { match = elems[i]; if ( maxLevel && match.level > maxLevel ) { break; } event.currentTarget = match.elem; event.data = match.handleObj.data; event.handleObj = match.handleObj; ret = match.handleObj.origHandler.apply( match.elem, arguments ); if ( ret === false || event.isPropagationStopped() ) { maxLevel = match.level; if ( ret === false ) { stop = false; } if ( event.isImmediatePropagationStopped() ) { break; } } } return stop; } function liveConvert( type, selector ) { return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&"); } jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error").split(" "), function( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { if ( fn == null ) { fn = data; data = null; } return arguments.length > 0 ? this.bind( name, data, fn ) : this.trigger( name ); }; if ( jQuery.attrFn ) { jQuery.attrFn[ name ] = true; } }); /*! * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){ var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, done = 0, toString = Object.prototype.toString, hasDuplicate = false, baseHasDuplicate = true, rBackslash = /\\/g, rNonWord = /\W/; // Here we check if the JavaScript engine is using some sort of // optimization where it does not always call our comparision // function. If that is the case, discard the hasDuplicate value. // Thus far that includes Google Chrome. [0, 0].sort(function() { baseHasDuplicate = false; return 0; }); var Sizzle = function( selector, context, results, seed ) { results = results || []; context = context || document; var origContext = context; if ( context.nodeType !== 1 && context.nodeType !== 9 ) { return []; } if ( !selector || typeof selector !== "string" ) { return results; } var m, set, checkSet, extra, ret, cur, pop, i, prune = true, contextXML = Sizzle.isXML( context ), parts = [], soFar = selector; // Reset the position of the chunker regexp (start from head) do { chunker.exec( "" ); m = chunker.exec( soFar ); if ( m ) { soFar = m[3]; parts.push( m[1] ); if ( m[2] ) { extra = m[3]; break; } } } while ( m ); if ( parts.length > 1 && origPOS.exec( selector ) ) { if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { set = posProcess( parts[0] + parts[1], context ); } else { set = Expr.relative[ parts[0] ] ? [ context ] : Sizzle( parts.shift(), context ); while ( parts.length ) { selector = parts.shift(); if ( Expr.relative[ selector ] ) { selector += parts.shift(); } set = posProcess( selector, set ); } } } else { // Take a shortcut and set the context if the root selector is an ID // (but not if it'll be faster if the inner selector is an ID) if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { ret = Sizzle.find( parts.shift(), context, contextXML ); context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0]; } if ( context ) { ret = seed ? { expr: parts.pop(), set: makeArray(seed) } : Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set; if ( parts.length > 0 ) { checkSet = makeArray( set ); } else { prune = false; } while ( parts.length ) { cur = parts.pop(); pop = cur; if ( !Expr.relative[ cur ] ) { cur = ""; } else { pop = parts.pop(); } if ( pop == null ) { pop = context; } Expr.relative[ cur ]( checkSet, pop, contextXML ); } } else { checkSet = parts = []; } } if ( !checkSet ) { checkSet = set; } if ( !checkSet ) { Sizzle.error( cur || selector ); } if ( toString.call(checkSet) === "[object Array]" ) { if ( !prune ) { results.push.apply( results, checkSet ); } else if ( context && context.nodeType === 1 ) { for ( i = 0; checkSet[i] != null; i++ ) { if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { results.push( set[i] ); } } } else { for ( i = 0; checkSet[i] != null; i++ ) { if ( checkSet[i] && checkSet[i].nodeType === 1 ) { results.push( set[i] ); } } } } else { makeArray( checkSet, results ); } if ( extra ) { Sizzle( extra, origContext, results, seed ); Sizzle.uniqueSort( results ); } return results; }; Sizzle.uniqueSort = function( results ) { if ( sortOrder ) { hasDuplicate = baseHasDuplicate; results.sort( sortOrder ); if ( hasDuplicate ) { for ( var i = 1; i < results.length; i++ ) { if ( results[i] === results[ i - 1 ] ) { results.splice( i--, 1 ); } } } } return results; }; Sizzle.matches = function( expr, set ) { return Sizzle( expr, null, null, set ); }; Sizzle.matchesSelector = function( node, expr ) { return Sizzle( expr, null, null, [node] ).length > 0; }; Sizzle.find = function( expr, context, isXML ) { var set; if ( !expr ) { return []; } for ( var i = 0, l = Expr.order.length; i < l; i++ ) { var match, type = Expr.order[i]; if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { var left = match[1]; match.splice( 1, 1 ); if ( left.substr( left.length - 1 ) !== "\\" ) { match[1] = (match[1] || "").replace( rBackslash, "" ); set = Expr.find[ type ]( match, context, isXML ); if ( set != null ) { expr = expr.replace( Expr.match[ type ], "" ); break; } } } } if ( !set ) { set = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( "*" ) : []; } return { set: set, expr: expr }; }; Sizzle.filter = function( expr, set, inplace, not ) { var match, anyFound, old = expr, result = [], curLoop = set, isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); while ( expr && set.length ) { for ( var type in Expr.filter ) { if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { var found, item, filter = Expr.filter[ type ], left = match[1]; anyFound = false; match.splice(1,1); if ( left.substr( left.length - 1 ) === "\\" ) { continue; } if ( curLoop === result ) { result = []; } if ( Expr.preFilter[ type ] ) { match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); if ( !match ) { anyFound = found = true; } else if ( match === true ) { continue; } } if ( match ) { for ( var i = 0; (item = curLoop[i]) != null; i++ ) { if ( item ) { found = filter( item, match, i, curLoop ); var pass = not ^ !!found; if ( inplace && found != null ) { if ( pass ) { anyFound = true; } else { curLoop[i] = false; } } else if ( pass ) { result.push( item ); anyFound = true; } } } } if ( found !== undefined ) { if ( !inplace ) { curLoop = result; } expr = expr.replace( Expr.match[ type ], "" ); if ( !anyFound ) { return []; } break; } } } // Improper expression if ( expr === old ) { if ( anyFound == null ) { Sizzle.error( expr ); } else { break; } } old = expr; } return curLoop; }; Sizzle.error = function( msg ) { throw "Syntax error, unrecognized expression: " + msg; }; var Expr = Sizzle.selectors = { order: [ "ID", "NAME", "TAG" ], match: { ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ }, leftMatch: {}, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function( elem ) { return elem.getAttribute( "href" ); }, type: function( elem ) { return elem.getAttribute( "type" ); } }, relative: { "+": function(checkSet, part){ var isPartStr = typeof part === "string", isTag = isPartStr && !rNonWord.test( part ), isPartStrNotTag = isPartStr && !isTag; if ( isTag ) { part = part.toLowerCase(); } for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { if ( (elem = checkSet[i]) ) { while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? elem || false : elem === part; } } if ( isPartStrNotTag ) { Sizzle.filter( part, checkSet, true ); } }, ">": function( checkSet, part ) { var elem, isPartStr = typeof part === "string", i = 0, l = checkSet.length; if ( isPartStr && !rNonWord.test( part ) ) { part = part.toLowerCase(); for ( ; i < l; i++ ) { elem = checkSet[i]; if ( elem ) { var parent = elem.parentNode; checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; } } } else { for ( ; i < l; i++ ) { elem = checkSet[i]; if ( elem ) { checkSet[i] = isPartStr ? elem.parentNode : elem.parentNode === part; } } if ( isPartStr ) { Sizzle.filter( part, checkSet, true ); } } }, "": function(checkSet, part, isXML){ var nodeCheck, doneName = done++, checkFn = dirCheck; if ( typeof part === "string" && !rNonWord.test( part ) ) { part = part.toLowerCase(); nodeCheck = part; checkFn = dirNodeCheck; } checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); }, "~": function( checkSet, part, isXML ) { var nodeCheck, doneName = done++, checkFn = dirCheck; if ( typeof part === "string" && !rNonWord.test( part ) ) { part = part.toLowerCase(); nodeCheck = part; checkFn = dirNodeCheck; } checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); } }, find: { ID: function( match, context, isXML ) { if ( typeof context.getElementById !== "undefined" && !isXML ) { var m = context.getElementById(match[1]); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 return m && m.parentNode ? [m] : []; } }, NAME: function( match, context ) { if ( typeof context.getElementsByName !== "undefined" ) { var ret = [], results = context.getElementsByName( match[1] ); for ( var i = 0, l = results.length; i < l; i++ ) { if ( results[i].getAttribute("name") === match[1] ) { ret.push( results[i] ); } } return ret.length === 0 ? null : ret; } }, TAG: function( match, context ) { if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( match[1] ); } } }, preFilter: { CLASS: function( match, curLoop, inplace, result, not, isXML ) { match = " " + match[1].replace( rBackslash, "" ) + " "; if ( isXML ) { return match; } for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { if ( elem ) { if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { if ( !inplace ) { result.push( elem ); } } else if ( inplace ) { curLoop[i] = false; } } } return false; }, ID: function( match ) { return match[1].replace( rBackslash, "" ); }, TAG: function( match, curLoop ) { return match[1].replace( rBackslash, "" ).toLowerCase(); }, CHILD: function( match ) { if ( match[1] === "nth" ) { if ( !match[2] ) { Sizzle.error( match[0] ); } match[2] = match[2].replace(/^\+|\s*/g, ''); // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); // calculate the numbers (first)n+(last) including if they are negative match[2] = (test[1] + (test[2] || 1)) - 0; match[3] = test[3] - 0; } else if ( match[2] ) { Sizzle.error( match[0] ); } // TODO: Move to normal caching system match[0] = done++; return match; }, ATTR: function( match, curLoop, inplace, result, not, isXML ) { var name = match[1] = match[1].replace( rBackslash, "" ); if ( !isXML && Expr.attrMap[name] ) { match[1] = Expr.attrMap[name]; } // Handle if an un-quoted value was used match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); if ( match[2] === "~=" ) { match[4] = " " + match[4] + " "; } return match; }, PSEUDO: function( match, curLoop, inplace, result, not ) { if ( match[1] === "not" ) { // If we're dealing with a complex expression, or a simple one if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { match[3] = Sizzle(match[3], null, null, curLoop); } else { var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); if ( !inplace ) { result.push.apply( result, ret ); } return false; } } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { return true; } return match; }, POS: function( match ) { match.unshift( true ); return match; } }, filters: { enabled: function( elem ) { return elem.disabled === false && elem.type !== "hidden"; }, disabled: function( elem ) { return elem.disabled === true; }, checked: function( elem ) { return elem.checked === true; }, selected: function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, parent: function( elem ) { return !!elem.firstChild; }, empty: function( elem ) { return !elem.firstChild; }, has: function( elem, i, match ) { return !!Sizzle( match[3], elem ).length; }, header: function( elem ) { return (/h\d/i).test( elem.nodeName ); }, text: function( elem ) { var attr = elem.getAttribute( "type" ), type = elem.type; // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) // use getAttribute instead to test this case return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); }, radio: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; }, checkbox: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; }, file: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; }, password: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; }, submit: function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "submit" === elem.type; }, image: function( elem ) { return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; }, reset: function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && "reset" === elem.type; }, button: function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && "button" === elem.type || name === "button"; }, input: function( elem ) { return (/input|select|textarea|button/i).test( elem.nodeName ); }, focus: function( elem ) { return elem === elem.ownerDocument.activeElement; } }, setFilters: { first: function( elem, i ) { return i === 0; }, last: function( elem, i, match, array ) { return i === array.length - 1; }, even: function( elem, i ) { return i % 2 === 0; }, odd: function( elem, i ) { return i % 2 === 1; }, lt: function( elem, i, match ) { return i < match[3] - 0; }, gt: function( elem, i, match ) { return i > match[3] - 0; }, nth: function( elem, i, match ) { return match[3] - 0 === i; }, eq: function( elem, i, match ) { return match[3] - 0 === i; } }, filter: { PSEUDO: function( elem, match, i, array ) { var name = match[1], filter = Expr.filters[ name ]; if ( filter ) { return filter( elem, i, match, array ); } else if ( name === "contains" ) { return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; } else if ( name === "not" ) { var not = match[3]; for ( var j = 0, l = not.length; j < l; j++ ) { if ( not[j] === elem ) { return false; } } return true; } else { Sizzle.error( name ); } }, CHILD: function( elem, match ) { var type = match[1], node = elem; switch ( type ) { case "only": case "first": while ( (node = node.previousSibling) ) { if ( node.nodeType === 1 ) { return false; } } if ( type === "first" ) { return true; } node = elem; case "last": while ( (node = node.nextSibling) ) { if ( node.nodeType === 1 ) { return false; } } return true; case "nth": var first = match[2], last = match[3]; if ( first === 1 && last === 0 ) { return true; } var doneName = match[0], parent = elem.parentNode; if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { var count = 0; for ( node = parent.firstChild; node; node = node.nextSibling ) { if ( node.nodeType === 1 ) { node.nodeIndex = ++count; } } parent.sizcache = doneName; } var diff = elem.nodeIndex - last; if ( first === 0 ) { return diff === 0; } else { return ( diff % first === 0 && diff / first >= 0 ); } } }, ID: function( elem, match ) { return elem.nodeType === 1 && elem.getAttribute("id") === match; }, TAG: function( elem, match ) { return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; }, CLASS: function( elem, match ) { return (" " + (elem.className || elem.getAttribute("class")) + " ") .indexOf( match ) > -1; }, ATTR: function( elem, match ) { var name = match[1], result = Expr.attrHandle[ name ] ? Expr.attrHandle[ name ]( elem ) : elem[ name ] != null ? elem[ name ] : elem.getAttribute( name ), value = result + "", type = match[2], check = match[4]; return result == null ? type === "!=" : type === "=" ? value === check : type === "*=" ? value.indexOf(check) >= 0 : type === "~=" ? (" " + value + " ").indexOf(check) >= 0 : !check ? value && result !== false : type === "!=" ? value !== check : type === "^=" ? value.indexOf(check) === 0 : type === "$=" ? value.substr(value.length - check.length) === check : type === "|=" ? value === check || value.substr(0, check.length + 1) === check + "-" : false; }, POS: function( elem, match, i, array ) { var name = match[2], filter = Expr.setFilters[ name ]; if ( filter ) { return filter( elem, i, match, array ); } } } }; var origPOS = Expr.match.POS, fescape = function(all, num){ return "\\" + (num - 0 + 1); }; for ( var type in Expr.match ) { Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); } var makeArray = function( array, results ) { array = Array.prototype.slice.call( array, 0 ); if ( results ) { results.push.apply( results, array ); return results; } return array; }; // Perform a simple check to determine if the browser is capable of // converting a NodeList to an array using builtin methods. // Also verifies that the returned array holds DOM nodes // (which is not the case in the Blackberry browser) try { Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; // Provide a fallback method if it does not work } catch( e ) { makeArray = function( array, results ) { var i = 0, ret = results || []; if ( toString.call(array) === "[object Array]" ) { Array.prototype.push.apply( ret, array ); } else { if ( typeof array.length === "number" ) { for ( var l = array.length; i < l; i++ ) { ret.push( array[i] ); } } else { for ( ; array[i]; i++ ) { ret.push( array[i] ); } } } return ret; }; } var sortOrder, siblingCheck; if ( document.documentElement.compareDocumentPosition ) { sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; return 0; } if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { return a.compareDocumentPosition ? -1 : 1; } return a.compareDocumentPosition(b) & 4 ? -1 : 1; }; } else { sortOrder = function( a, b ) { // The nodes are identical, we can exit early if ( a === b ) { hasDuplicate = true; return 0; // Fallback to using sourceIndex (in IE) if it's available on both nodes } else if ( a.sourceIndex && b.sourceIndex ) { return a.sourceIndex - b.sourceIndex; } var al, bl, ap = [], bp = [], aup = a.parentNode, bup = b.parentNode, cur = aup; // If the nodes are siblings (or identical) we can do a quick check if ( aup === bup ) { return siblingCheck( a, b ); // If no parents were found then the nodes are disconnected } else if ( !aup ) { return -1; } else if ( !bup ) { return 1; } // Otherwise they're somewhere else in the tree so we need // to build up a full list of the parentNodes for comparison while ( cur ) { ap.unshift( cur ); cur = cur.parentNode; } cur = bup; while ( cur ) { bp.unshift( cur ); cur = cur.parentNode; } al = ap.length; bl = bp.length; // Start walking down the tree looking for a discrepancy for ( var i = 0; i < al && i < bl; i++ ) { if ( ap[i] !== bp[i] ) { return siblingCheck( ap[i], bp[i] ); } } // We ended someplace up the tree so do a sibling check return i === al ? siblingCheck( a, bp[i], -1 ) : siblingCheck( ap[i], b, 1 ); }; siblingCheck = function( a, b, ret ) { if ( a === b ) { return ret; } var cur = a.nextSibling; while ( cur ) { if ( cur === b ) { return -1; } cur = cur.nextSibling; } return 1; }; } // Utility function for retreiving the text value of an array of DOM nodes Sizzle.getText = function( elems ) { var ret = "", elem; for ( var i = 0; elems[i]; i++ ) { elem = elems[i]; // Get the text from text nodes and CDATA nodes if ( elem.nodeType === 3 || elem.nodeType === 4 ) { ret += elem.nodeValue; // Traverse everything else, except comment nodes } else if ( elem.nodeType !== 8 ) { ret += Sizzle.getText( elem.childNodes ); } } return ret; }; // Check to see if the browser returns elements by name when // querying by getElementById (and provide a workaround) (function(){ // We're going to inject a fake input element with a specified name var form = document.createElement("div"), id = "script" + (new Date()).getTime(), root = document.documentElement; form.innerHTML = "<a name='" + id + "'/>"; // Inject it into the root element, check its status, and remove it quickly root.insertBefore( form, root.firstChild ); // The workaround has to do additional checks after a getElementById // Which slows things down for other browsers (hence the branching) if ( document.getElementById( id ) ) { Expr.find.ID = function( match, context, isXML ) { if ( typeof context.getElementById !== "undefined" && !isXML ) { var m = context.getElementById(match[1]); return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : []; } }; Expr.filter.ID = function( elem, match ) { var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); return elem.nodeType === 1 && node && node.nodeValue === match; }; } root.removeChild( form ); // release memory in IE root = form = null; })(); (function(){ // Check to see if the browser returns only elements // when doing getElementsByTagName("*") // Create a fake element var div = document.createElement("div"); div.appendChild( document.createComment("") ); // Make sure no comments are found if ( div.getElementsByTagName("*").length > 0 ) { Expr.find.TAG = function( match, context ) { var results = context.getElementsByTagName( match[1] ); // Filter out possible comments if ( match[1] === "*" ) { var tmp = []; for ( var i = 0; results[i]; i++ ) { if ( results[i].nodeType === 1 ) { tmp.push( results[i] ); } } results = tmp; } return results; }; } // Check to see if an attribute returns normalized href attributes div.innerHTML = "<a href='#'></a>"; if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && div.firstChild.getAttribute("href") !== "#" ) { Expr.attrHandle.href = function( elem ) { return elem.getAttribute( "href", 2 ); }; } // release memory in IE div = null; })(); if ( document.querySelectorAll ) { (function(){ var oldSizzle = Sizzle, div = document.createElement("div"), id = "__sizzle__"; div.innerHTML = "<p class='TEST'></p>"; // Safari can't handle uppercase or unicode characters when // in quirks mode. if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { return; } Sizzle = function( query, context, extra, seed ) { context = context || document; // Only use querySelectorAll on non-XML documents // (ID selectors don't work in non-HTML documents) if ( !seed && !Sizzle.isXML(context) ) { // See if we find a selector to speed up var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { // Speed-up: Sizzle("TAG") if ( match[1] ) { return makeArray( context.getElementsByTagName( query ), extra ); // Speed-up: Sizzle(".CLASS") } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { return makeArray( context.getElementsByClassName( match[2] ), extra ); } } if ( context.nodeType === 9 ) { // Speed-up: Sizzle("body") // The body element only exists once, optimize finding it if ( query === "body" && context.body ) { return makeArray( [ context.body ], extra ); // Speed-up: Sizzle("#ID") } else if ( match && match[3] ) { var elem = context.getElementById( match[3] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id === match[3] ) { return makeArray( [ elem ], extra ); } } else { return makeArray( [], extra ); } } try { return makeArray( context.querySelectorAll(query), extra ); } catch(qsaError) {} // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root // and working up from there (Thanks to Andrew Dupont for the technique) // IE 8 doesn't work on object elements } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { var oldContext = context, old = context.getAttribute( "id" ), nid = old || id, hasParent = context.parentNode, relativeHierarchySelector = /^\s*[+~]/.test( query ); if ( !old ) { context.setAttribute( "id", nid ); } else { nid = nid.replace( /'/g, "\\$&" ); } if ( relativeHierarchySelector && hasParent ) { context = context.parentNode; } try { if ( !relativeHierarchySelector || hasParent ) { return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); } } catch(pseudoError) { } finally { if ( !old ) { oldContext.removeAttribute( "id" ); } } } } return oldSizzle(query, context, extra, seed); }; for ( var prop in oldSizzle ) { Sizzle[ prop ] = oldSizzle[ prop ]; } // release memory in IE div = null; })(); } (function(){ var html = document.documentElement, matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; if ( matches ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9 fails this) var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), pseudoWorks = false; try { // This should fail with an exception // Gecko does not error, returns false instead matches.call( document.documentElement, "[test!='']:sizzle" ); } catch( pseudoError ) { pseudoWorks = true; } Sizzle.matchesSelector = function( node, expr ) { // Make sure that attribute selectors are quoted expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); if ( !Sizzle.isXML( node ) ) { try { if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { var ret = matches.call( node, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || !disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9, so check for that node.document && node.document.nodeType !== 11 ) { return ret; } } } catch(e) {} } return Sizzle(expr, null, null, [node]).length > 0; }; } })(); (function(){ var div = document.createElement("div"); div.innerHTML = "<div class='test e'></div><div class='test'></div>"; // Opera can't find a second classname (in 9.6) // Also, make sure that getElementsByClassName actually exists if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { return; } // Safari caches class attributes, doesn't catch changes (in 3.2) div.lastChild.className = "e"; if ( div.getElementsByClassName("e").length === 1 ) { return; } Expr.order.splice(1, 0, "CLASS"); Expr.find.CLASS = function( match, context, isXML ) { if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { return context.getElementsByClassName(match[1]); } }; // release memory in IE div = null; })(); function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { var match = false; elem = elem[dir]; while ( elem ) { if ( elem.sizcache === doneName ) { match = checkSet[elem.sizset]; break; } if ( elem.nodeType === 1 && !isXML ){ elem.sizcache = doneName; elem.sizset = i; } if ( elem.nodeName.toLowerCase() === cur ) { match = elem; break; } elem = elem[dir]; } checkSet[i] = match; } } } function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { for ( var i = 0, l = checkSet.length; i < l; i++ ) { var elem = checkSet[i]; if ( elem ) { var match = false; elem = elem[dir]; while ( elem ) { if ( elem.sizcache === doneName ) { match = checkSet[elem.sizset]; break; } if ( elem.nodeType === 1 ) { if ( !isXML ) { elem.sizcache = doneName; elem.sizset = i; } if ( typeof cur !== "string" ) { if ( elem === cur ) { match = true; break; } } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { match = elem; break; } } elem = elem[dir]; } checkSet[i] = match; } } } if ( document.documentElement.contains ) { Sizzle.contains = function( a, b ) { return a !== b && (a.contains ? a.contains(b) : true); }; } else if ( document.documentElement.compareDocumentPosition ) { Sizzle.contains = function( a, b ) { return !!(a.compareDocumentPosition(b) & 16); }; } else { Sizzle.contains = function() { return false; }; } Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; var posProcess = function( selector, context ) { var match, tmpSet = [], later = "", root = context.nodeType ? [context] : context; // Position selectors must be done after the filter // And so must :not(positional) so we move all PSEUDOs to the end while ( (match = Expr.match.PSEUDO.exec( selector )) ) { later += match[0]; selector = selector.replace( Expr.match.PSEUDO, "" ); } selector = Expr.relative[selector] ? selector + "*" : selector; for ( var i = 0, l = root.length; i < l; i++ ) { Sizzle( selector, root[i], tmpSet ); } return Sizzle.filter( later, tmpSet ); }; // EXPOSE jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.filters; jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; })(); var runtil = /Until$/, rparentsprev = /^(?:parents|prevUntil|prevAll)/, // Note: This RegExp should be improved, or likely pulled from Sizzle rmultiselector = /,/, isSimple = /^.[^:#\[\.,]*$/, slice = Array.prototype.slice, POS = jQuery.expr.match.POS, // methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.fn.extend({ find: function( selector ) { var self = this, i, l; if ( typeof selector !== "string" ) { return jQuery( selector ).filter(function() { for ( i = 0, l = self.length; i < l; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } }); } var ret = this.pushStack( "", "find", selector ), length, n, r; for ( i = 0, l = this.length; i < l; i++ ) { length = ret.length; jQuery.find( selector, this[i], ret ); if ( i > 0 ) { // Make sure that the results are unique for ( n = length; n < ret.length; n++ ) { for ( r = 0; r < length; r++ ) { if ( ret[r] === ret[n] ) { ret.splice(n--, 1); break; } } } } } return ret; }, has: function( target ) { var targets = jQuery( target ); return this.filter(function() { for ( var i = 0, l = targets.length; i < l; i++ ) { if ( jQuery.contains( this, targets[i] ) ) { return true; } } }); }, not: function( selector ) { return this.pushStack( winnow(this, selector, false), "not", selector); }, filter: function( selector ) { return this.pushStack( winnow(this, selector, true), "filter", selector ); }, is: function( selector ) { return !!selector && ( typeof selector === "string" ? jQuery.filter( selector, this ).length > 0 : this.filter( selector ).length > 0 ); }, closest: function( selectors, context ) { var ret = [], i, l, cur = this[0]; // Array if ( jQuery.isArray( selectors ) ) { var match, selector, matches = {}, level = 1; if ( cur && selectors.length ) { for ( i = 0, l = selectors.length; i < l; i++ ) { selector = selectors[i]; if ( !matches[ selector ] ) { matches[ selector ] = POS.test( selector ) ? jQuery( selector, context || this.context ) : selector; } } while ( cur && cur.ownerDocument && cur !== context ) { for ( selector in matches ) { match = matches[ selector ]; if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) { ret.push({ selector: selector, elem: cur, level: level }); } } cur = cur.parentNode; level++; } } return ret; } // String var pos = POS.test( selectors ) || typeof selectors !== "string" ? jQuery( selectors, context || this.context ) : 0; for ( i = 0, l = this.length; i < l; i++ ) { cur = this[i]; while ( cur ) { if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { ret.push( cur ); break; } else { cur = cur.parentNode; if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { break; } } } } ret = ret.length > 1 ? jQuery.unique( ret ) : ret; return this.pushStack( ret, "closest", selectors ); }, // Determine the position of an element within // the matched set of elements index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; } // index in selector if ( typeof elem === "string" ) { return jQuery.inArray( this[0], jQuery( elem ) ); } // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem.jquery ? elem[0] : elem, this ); }, add: function( selector, context ) { var set = typeof selector === "string" ? jQuery( selector, context ) : jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), all = jQuery.merge( this.get(), set ); return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? all : jQuery.unique( all ) ); }, andSelf: function() { return this.add( this.prevObject ); } }); // A painfully simple check to see if an element is disconnected // from a document (should be improved, where feasible). function isDisconnected( node ) { return !node || !node.parentNode || node.parentNode.nodeType === 11; } jQuery.each({ parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return jQuery.dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return jQuery.dir( elem, "parentNode", until ); }, next: function( elem ) { return jQuery.nth( elem, 2, "nextSibling" ); }, prev: function( elem ) { return jQuery.nth( elem, 2, "previousSibling" ); }, nextAll: function( elem ) { return jQuery.dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return jQuery.dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return jQuery.dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return jQuery.dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return jQuery.sibling( elem.parentNode.firstChild, elem ); }, children: function( elem ) { return jQuery.sibling( elem.firstChild ); }, contents: function( elem ) { return jQuery.nodeName( elem, "iframe" ) ? elem.contentDocument || elem.contentWindow.document : jQuery.makeArray( elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var ret = jQuery.map( this, fn, until ), // The variable 'args' was introduced in // https://github.com/jquery/jquery/commit/52a0238 // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. // http://code.google.com/p/v8/issues/detail?id=1050 args = slice.call(arguments); if ( !runtil.test( name ) ) { selector = until; } if ( selector && typeof selector === "string" ) { ret = jQuery.filter( selector, ret ); } ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { ret = ret.reverse(); } return this.pushStack( ret, name, args.join(",") ); }; }); jQuery.extend({ filter: function( expr, elems, not ) { if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 ? jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : jQuery.find.matches(expr, elems); }, dir: function( elem, dir, until ) { var matched = [], cur = elem[ dir ]; while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { if ( cur.nodeType === 1 ) { matched.push( cur ); } cur = cur[dir]; } return matched; }, nth: function( cur, result, dir, elem ) { result = result || 1; var num = 0; for ( ; cur; cur = cur[dir] ) { if ( cur.nodeType === 1 && ++num === result ) { break; } } return cur; }, sibling: function( n, elem ) { var r = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { r.push( n ); } } return r; } }); // Implement the identical functionality for filter and not function winnow( elements, qualifier, keep ) { // Can't pass null or undefined to indexOf in Firefox 4 // Set to 0 to skip string check qualifier = qualifier || 0; if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep(elements, function( elem, i ) { var retVal = !!qualifier.call( elem, i, elem ); return retVal === keep; }); } else if ( qualifier.nodeType ) { return jQuery.grep(elements, function( elem, i ) { return (elem === qualifier) === keep; }); } else if ( typeof qualifier === "string" ) { var filtered = jQuery.grep(elements, function( elem ) { return elem.nodeType === 1; }); if ( isSimple.test( qualifier ) ) { return jQuery.filter(qualifier, filtered, !keep); } else { qualifier = jQuery.filter( qualifier, filtered ); } } return jQuery.grep(elements, function( elem, i ) { return (jQuery.inArray( elem, qualifier ) >= 0) === keep; }); } var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rleadingWhitespace = /^\s+/, rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, rtagName = /<([\w:]+)/, rtbody = /<tbody/i, rhtml = /<|&#?\w+;/, rnocache = /<(?:script|object|embed|option|style)/i, // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rscriptType = /\/(java|ecma)script/i, rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/, wrapMap = { option: [ 1, "<select multiple='multiple'>", "</select>" ], legend: [ 1, "<fieldset>", "</fieldset>" ], thead: [ 1, "<table>", "</table>" ], tr: [ 2, "<table><tbody>", "</tbody></table>" ], td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], area: [ 1, "<map>", "</map>" ], _default: [ 0, "", "" ] }; wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; // IE can't serialize <link> and <script> tags normally if ( !jQuery.support.htmlSerialize ) { wrapMap._default = [ 1, "div<div>", "</div>" ]; } jQuery.fn.extend({ text: function( text ) { if ( jQuery.isFunction(text) ) { return this.each(function(i) { var self = jQuery( this ); self.text( text.call(this, i, self.text()) ); }); } if ( typeof text !== "object" && text !== undefined ) { return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); } return jQuery.text( this ); }, wrapAll: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapAll( html.call(this, i) ); }); } if ( this[0] ) { // The elements to wrap the target around var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); if ( this[0].parentNode ) { wrap.insertBefore( this[0] ); } wrap.map(function() { var elem = this; while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { elem = elem.firstChild; } return elem; }).append( this ); } return this; }, wrapInner: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapInner( html.call(this, i) ); }); } return this.each(function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } }); }, wrap: function( html ) { return this.each(function() { jQuery( this ).wrapAll( html ); }); }, unwrap: function() { return this.parent().each(function() { if ( !jQuery.nodeName( this, "body" ) ) { jQuery( this ).replaceWith( this.childNodes ); } }).end(); }, append: function() { return this.domManip(arguments, true, function( elem ) { if ( this.nodeType === 1 ) { this.appendChild( elem ); } }); }, prepend: function() { return this.domManip(arguments, true, function( elem ) { if ( this.nodeType === 1 ) { this.insertBefore( elem, this.firstChild ); } }); }, before: function() { if ( this[0] && this[0].parentNode ) { return this.domManip(arguments, false, function( elem ) { this.parentNode.insertBefore( elem, this ); }); } else if ( arguments.length ) { var set = jQuery(arguments[0]); set.push.apply( set, this.toArray() ); return this.pushStack( set, "before", arguments ); } }, after: function() { if ( this[0] && this[0].parentNode ) { return this.domManip(arguments, false, function( elem ) { this.parentNode.insertBefore( elem, this.nextSibling ); }); } else if ( arguments.length ) { var set = this.pushStack( this, "after", arguments ); set.push.apply( set, jQuery(arguments[0]).toArray() ); return set; } }, // keepData is for internal use only--do not document remove: function( selector, keepData ) { for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { if ( !selector || jQuery.filter( selector, [ elem ] ).length ) { if ( !keepData && elem.nodeType === 1 ) { jQuery.cleanData( elem.getElementsByTagName("*") ); jQuery.cleanData( [ elem ] ); } if ( elem.parentNode ) { elem.parentNode.removeChild( elem ); } } } return this; }, empty: function() { for ( var i = 0, elem; (elem = this[i]) != null; i++ ) { // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( elem.getElementsByTagName("*") ); } // Remove any remaining nodes while ( elem.firstChild ) { elem.removeChild( elem.firstChild ); } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function () { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); }); }, html: function( value ) { if ( value === undefined ) { return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(rinlinejQuery, "") : null; // See if we can take a shortcut and just use innerHTML } else if ( typeof value === "string" && !rnocache.test( value ) && (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) && !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) { value = value.replace(rxhtmlTag, "<$1></$2>"); try { for ( var i = 0, l = this.length; i < l; i++ ) { // Remove element nodes and prevent memory leaks if ( this[i].nodeType === 1 ) { jQuery.cleanData( this[i].getElementsByTagName("*") ); this[i].innerHTML = value; } } // If using innerHTML throws an exception, use the fallback method } catch(e) { this.empty().append( value ); } } else if ( jQuery.isFunction( value ) ) { this.each(function(i){ var self = jQuery( this ); self.html( value.call(this, i, self.html()) ); }); } else { this.empty().append( value ); } return this; }, replaceWith: function( value ) { if ( this[0] && this[0].parentNode ) { // Make sure that the elements are removed from the DOM before they are inserted // this can help fix replacing a parent with child elements if ( jQuery.isFunction( value ) ) { return this.each(function(i) { var self = jQuery(this), old = self.html(); self.replaceWith( value.call( this, i, old ) ); }); } if ( typeof value !== "string" ) { value = jQuery( value ).detach(); } return this.each(function() { var next = this.nextSibling, parent = this.parentNode; jQuery( this ).remove(); if ( next ) { jQuery(next).before( value ); } else { jQuery(parent).append( value ); } }); } else { return this.length ? this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) : this; } }, detach: function( selector ) { return this.remove( selector, true ); }, domManip: function( args, table, callback ) { var results, first, fragment, parent, value = args[0], scripts = []; // We can't cloneNode fragments that contain checked, in WebKit if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) { return this.each(function() { jQuery(this).domManip( args, table, callback, true ); }); } if ( jQuery.isFunction(value) ) { return this.each(function(i) { var self = jQuery(this); args[0] = value.call(this, i, table ? self.html() : undefined); self.domManip( args, table, callback ); }); } if ( this[0] ) { parent = value && value.parentNode; // If we're in a fragment, just use that instead of building a new one if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) { results = { fragment: parent }; } else { results = jQuery.buildFragment( args, this, scripts ); } fragment = results.fragment; if ( fragment.childNodes.length === 1 ) { first = fragment = fragment.firstChild; } else { first = fragment.firstChild; } if ( first ) { table = table && jQuery.nodeName( first, "tr" ); for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) { callback.call( table ? root(this[i], first) : this[i], // Make sure that we do not leak memory by inadvertently discarding // the original fragment (which might have attached data) instead of // using it; in addition, use the original fragment object for the last // item instead of first because it can end up being emptied incorrectly // in certain situations (Bug #8070). // Fragments from the fragment cache must always be cloned and never used // in place. results.cacheable || (l > 1 && i < lastIndex) ? jQuery.clone( fragment, true, true ) : fragment ); } } if ( scripts.length ) { jQuery.each( scripts, evalScript ); } } return this; } }); function root( elem, cur ) { return jQuery.nodeName(elem, "table") ? (elem.getElementsByTagName("tbody")[0] || elem.appendChild(elem.ownerDocument.createElement("tbody"))) : elem; } function cloneCopyEvent( src, dest ) { if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { return; } var internalKey = jQuery.expando, oldData = jQuery.data( src ), curData = jQuery.data( dest, oldData ); // Switch to use the internal data object, if it exists, for the next // stage of data copying if ( (oldData = oldData[ internalKey ]) ) { var events = oldData.events; curData = curData[ internalKey ] = jQuery.extend({}, oldData); if ( events ) { delete curData.handle; curData.events = {}; for ( var type in events ) { for ( var i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data ); } } } } } function cloneFixAttributes( src, dest ) { var nodeName; // We do not need to do anything for non-Elements if ( dest.nodeType !== 1 ) { return; } // clearAttributes removes the attributes, which we don't want, // but also removes the attachEvent events, which we *do* want if ( dest.clearAttributes ) { dest.clearAttributes(); } // mergeAttributes, in contrast, only merges back on the // original attributes, not the events if ( dest.mergeAttributes ) { dest.mergeAttributes( src ); } nodeName = dest.nodeName.toLowerCase(); // IE6-8 fail to clone children inside object elements that use // the proprietary classid attribute value (rather than the type // attribute) to identify the type of content to display if ( nodeName === "object" ) { dest.outerHTML = src.outerHTML; } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) { // IE6-8 fails to persist the checked state of a cloned checkbox // or radio button. Worse, IE6-7 fail to give the cloned element // a checked appearance if the defaultChecked value isn't also set if ( src.checked ) { dest.defaultChecked = dest.checked = src.checked; } // IE6-7 get confused and end up setting the value of a cloned // checkbox/radio button to an empty string instead of "on" if ( dest.value !== src.value ) { dest.value = src.value; } // IE6-8 fails to return the selected option to the default selected // state when cloning options } else if ( nodeName === "option" ) { dest.selected = src.defaultSelected; // IE6-8 fails to set the defaultValue to the correct value when // cloning other types of input fields } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } // Event data gets referenced instead of copied if the expando // gets copied too dest.removeAttribute( jQuery.expando ); } jQuery.buildFragment = function( args, nodes, scripts ) { var fragment, cacheable, cacheresults, doc; // nodes may contain either an explicit document object, // a jQuery collection or context object. // If nodes[0] contains a valid object to assign to doc if ( nodes && nodes[0] ) { doc = nodes[0].ownerDocument || nodes[0]; } // Ensure that an attr object doesn't incorrectly stand in as a document object // Chrome and Firefox seem to allow this to occur and will throw exception // Fixes #8950 if ( !doc.createDocumentFragment ) { doc = document; } // Only cache "small" (1/2 KB) HTML strings that are associated with the main document // Cloning options loses the selected state, so don't cache them // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && doc === document && args[0].charAt(0) === "<" && !rnocache.test( args[0] ) && (jQuery.support.checkClone || !rchecked.test( args[0] )) ) { cacheable = true; cacheresults = jQuery.fragments[ args[0] ]; if ( cacheresults && cacheresults !== 1 ) { fragment = cacheresults; } } if ( !fragment ) { fragment = doc.createDocumentFragment(); jQuery.clean( args, doc, fragment, scripts ); } if ( cacheable ) { jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1; } return { fragment: fragment, cacheable: cacheable }; }; jQuery.fragments = {}; jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var ret = [], insert = jQuery( selector ), parent = this.length === 1 && this[0].parentNode; if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) { insert[ original ]( this[0] ); return this; } else { for ( var i = 0, l = insert.length; i < l; i++ ) { var elems = (i > 0 ? this.clone(true) : this).get(); jQuery( insert[i] )[ original ]( elems ); ret = ret.concat( elems ); } return this.pushStack( ret, name, insert.selector ); } }; }); function getAll( elem ) { if ( "getElementsByTagName" in elem ) { return elem.getElementsByTagName( "*" ); } else if ( "querySelectorAll" in elem ) { return elem.querySelectorAll( "*" ); } else { return []; } } // Used in clean, fixes the defaultChecked property function fixDefaultChecked( elem ) { if ( elem.type === "checkbox" || elem.type === "radio" ) { elem.defaultChecked = elem.checked; } } // Finds all inputs and passes them to fixDefaultChecked function findInputs( elem ) { if ( jQuery.nodeName( elem, "input" ) ) { fixDefaultChecked( elem ); } else if ( "getElementsByTagName" in elem ) { jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked ); } } jQuery.extend({ clone: function( elem, dataAndEvents, deepDataAndEvents ) { var clone = elem.cloneNode(true), srcElements, destElements, i; if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { // IE copies events bound via attachEvent when using cloneNode. // Calling detachEvent on the clone will also remove the events // from the original. In order to get around this, we use some // proprietary methods to clear the events. Thanks to MooTools // guys for this hotness. cloneFixAttributes( elem, clone ); // Using Sizzle here is crazy slow, so we use getElementsByTagName // instead srcElements = getAll( elem ); destElements = getAll( clone ); // Weird iteration because IE will replace the length property // with an element if you are cloning the body and one of the // elements on the page has a name or id of "length" for ( i = 0; srcElements[i]; ++i ) { // Ensure that the destination node is not null; Fixes #9587 if ( destElements[i] ) { cloneFixAttributes( srcElements[i], destElements[i] ); } } } // Copy the events from the original to the clone if ( dataAndEvents ) { cloneCopyEvent( elem, clone ); if ( deepDataAndEvents ) { srcElements = getAll( elem ); destElements = getAll( clone ); for ( i = 0; srcElements[i]; ++i ) { cloneCopyEvent( srcElements[i], destElements[i] ); } } } srcElements = destElements = null; // Return the cloned set return clone; }, clean: function( elems, context, fragment, scripts ) { var checkScriptType; context = context || document; // !context.createElement fails in IE with an error but returns typeof 'object' if ( typeof context.createElement === "undefined" ) { context = context.ownerDocument || context[0] && context[0].ownerDocument || document; } var ret = [], j; for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { if ( typeof elem === "number" ) { elem += ""; } if ( !elem ) { continue; } // Convert html string into DOM nodes if ( typeof elem === "string" ) { if ( !rhtml.test( elem ) ) { elem = context.createTextNode( elem ); } else { // Fix "XHTML"-style tags in all browsers elem = elem.replace(rxhtmlTag, "<$1></$2>"); // Trim whitespace, otherwise indexOf won't work as expected var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(), wrap = wrapMap[ tag ] || wrapMap._default, depth = wrap[0], div = context.createElement("div"); // Go to html and back, then peel off extra wrappers div.innerHTML = wrap[1] + elem + wrap[2]; // Move to the right depth while ( depth-- ) { div = div.lastChild; } // Remove IE's autoinserted <tbody> from table fragments if ( !jQuery.support.tbody ) { // String was a <table>, *may* have spurious <tbody> var hasBody = rtbody.test(elem), tbody = tag === "table" && !hasBody ? div.firstChild && div.firstChild.childNodes : // String was a bare <thead> or <tfoot> wrap[1] === "<table>" && !hasBody ? div.childNodes : []; for ( j = tbody.length - 1; j >= 0 ; --j ) { if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) { tbody[ j ].parentNode.removeChild( tbody[ j ] ); } } } // IE completely kills leading whitespace when innerHTML is used if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild ); } elem = div.childNodes; } } // Resets defaultChecked for any radios and checkboxes // about to be appended to the DOM in IE 6/7 (#8060) var len; if ( !jQuery.support.appendChecked ) { if ( elem[0] && typeof (len = elem.length) === "number" ) { for ( j = 0; j < len; j++ ) { findInputs( elem[j] ); } } else { findInputs( elem ); } } if ( elem.nodeType ) { ret.push( elem ); } else { ret = jQuery.merge( ret, elem ); } } if ( fragment ) { checkScriptType = function( elem ) { return !elem.type || rscriptType.test( elem.type ); }; for ( i = 0; ret[i]; i++ ) { if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) { scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] ); } else { if ( ret[i].nodeType === 1 ) { var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType ); ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) ); } fragment.appendChild( ret[i] ); } } } return ret; }, cleanData: function( elems ) { var data, id, cache = jQuery.cache, internalKey = jQuery.expando, special = jQuery.event.special, deleteExpando = jQuery.support.deleteExpando; for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) { continue; } id = elem[ jQuery.expando ]; if ( id ) { data = cache[ id ] && cache[ id ][ internalKey ]; if ( data && data.events ) { for ( var type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } // Null the DOM reference to avoid IE6/7/8 leak (#7054) if ( data.handle ) { data.handle.elem = null; } } if ( deleteExpando ) { delete elem[ jQuery.expando ]; } else if ( elem.removeAttribute ) { elem.removeAttribute( jQuery.expando ); } delete cache[ id ]; } } } }); function evalScript( i, elem ) { if ( elem.src ) { jQuery.ajax({ url: elem.src, async: false, dataType: "script" }); } else { jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) ); } if ( elem.parentNode ) { elem.parentNode.removeChild( elem ); } } var ralpha = /alpha\([^)]*\)/i, ropacity = /opacity=([^)]*)/, // fixed for IE9, see #8346 rupper = /([A-Z]|^ms)/g, rnumpx = /^-?\d+(?:px)?$/i, rnum = /^-?\d/, rrelNum = /^([\-+])=([\-+.\de]+)/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssWidth = [ "Left", "Right" ], cssHeight = [ "Top", "Bottom" ], curCSS, getComputedStyle, currentStyle; jQuery.fn.css = function( name, value ) { // Setting 'undefined' is a no-op if ( arguments.length === 2 && value === undefined ) { return this; } return jQuery.access( this, name, value, true, function( elem, name, value ) { return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }); }; jQuery.extend({ // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { // We should always get a number back from opacity var ret = curCSS( elem, "opacity", "opacity" ); return ret === "" ? "1" : ret; } else { return elem.style.opacity; } } } }, // Exclude the following css properties to add px cssNumber: { "fillOpacity": true, "fontWeight": true, "lineHeight": true, "opacity": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // Add in properties whose names you wish to fix before // setting or getting the value cssProps: { // normalize float css property "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" }, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; } // Make sure that we're working with the right name var ret, type, origName = jQuery.camelCase( name ), style = elem.style, hooks = jQuery.cssHooks[ origName ]; name = jQuery.cssProps[ origName ] || origName; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // convert relative number strings (+= or -=) to relative numbers. #7345 if ( type === "string" && (ret = rrelNum.exec( value )) ) { value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) ); // Fixes bug #9237 type = "number"; } // Make sure that NaN and null values aren't set. See: #7116 if ( value == null || type === "number" && isNaN( value ) ) { return; } // If a number was passed in, add 'px' to the (except for certain CSS properties) if ( type === "number" && !jQuery.cssNumber[ origName ] ) { value += "px"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) { // Wrapped to prevent IE from throwing errors when 'invalid' values are provided // Fixes bug #5509 try { style[ name ] = value; } catch(e) {} } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra ) { var ret, hooks; // Make sure that we're working with the right name name = jQuery.camelCase( name ); hooks = jQuery.cssHooks[ name ]; name = jQuery.cssProps[ name ] || name; // cssFloat needs a special treatment if ( name === "cssFloat" ) { name = "float"; } // If a hook was provided get the computed value from there if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) { return ret; // Otherwise, if a way to get the computed value exists, use that } else if ( curCSS ) { return curCSS( elem, name ); } }, // A method for quickly swapping in/out CSS properties to get correct calculations swap: function( elem, options, callback ) { var old = {}; // Remember the old values, and insert the new ones for ( var name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } callback.call( elem ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } } }); // DEPRECATED, Use jQuery.css() instead jQuery.curCSS = jQuery.css; jQuery.each(["height", "width"], function( i, name ) { jQuery.cssHooks[ name ] = { get: function( elem, computed, extra ) { var val; if ( computed ) { if ( elem.offsetWidth !== 0 ) { return getWH( elem, name, extra ); } else { jQuery.swap( elem, cssShow, function() { val = getWH( elem, name, extra ); }); } return val; } }, set: function( elem, value ) { if ( rnumpx.test( value ) ) { // ignore negative width and height values #1599 value = parseFloat( value ); if ( value >= 0 ) { return value + "px"; } } else { return value; } } }; }); if ( !jQuery.support.opacity ) { jQuery.cssHooks.opacity = { get: function( elem, computed ) { // IE uses filters for opacity return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? ( parseFloat( RegExp.$1 ) / 100 ) + "" : computed ? "1" : ""; }, set: function( elem, value ) { var style = elem.style, currentStyle = elem.currentStyle, opacity = jQuery.isNaN( value ) ? "" : "alpha(opacity=" + value * 100 + ")", filter = currentStyle && currentStyle.filter || style.filter || ""; // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level style.zoom = 1; // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) { // Setting style.filter to null, "" & " " still leave "filter:" in the cssText // if "filter:" is present at all, clearType is disabled, we want to avoid this // style.removeAttribute is IE Only, but so apparently is this code path... style.removeAttribute( "filter" ); // if there there is no filter style applied in a css rule, we are done if ( currentStyle && !currentStyle.filter ) { return; } } // otherwise, set new filter values style.filter = ralpha.test( filter ) ? filter.replace( ralpha, opacity ) : filter + " " + opacity; } }; } jQuery(function() { // This hook cannot be added until DOM ready because the support test // for it is not run until after DOM ready if ( !jQuery.support.reliableMarginRight ) { jQuery.cssHooks.marginRight = { get: function( elem, computed ) { // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right // Work around by temporarily setting element display to inline-block var ret; jQuery.swap( elem, { "display": "inline-block" }, function() { if ( computed ) { ret = curCSS( elem, "margin-right", "marginRight" ); } else { ret = elem.style.marginRight; } }); return ret; } }; } }); if ( document.defaultView && document.defaultView.getComputedStyle ) { getComputedStyle = function( elem, name ) { var ret, defaultView, computedStyle; name = name.replace( rupper, "-$1" ).toLowerCase(); if ( !(defaultView = elem.ownerDocument.defaultView) ) { return undefined; } if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) { ret = computedStyle.getPropertyValue( name ); if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) { ret = jQuery.style( elem, name ); } } return ret; }; } if ( document.documentElement.currentStyle ) { currentStyle = function( elem, name ) { var left, ret = elem.currentStyle && elem.currentStyle[ name ], rsLeft = elem.runtimeStyle && elem.runtimeStyle[ name ], style = elem.style; // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels if ( !rnumpx.test( ret ) && rnum.test( ret ) ) { // Remember the original values left = style.left; // Put in the new values to get a computed value out if ( rsLeft ) { elem.runtimeStyle.left = elem.currentStyle.left; } style.left = name === "fontSize" ? "1em" : (ret || 0); ret = style.pixelLeft + "px"; // Revert the changed values style.left = left; if ( rsLeft ) { elem.runtimeStyle.left = rsLeft; } } return ret === "" ? "auto" : ret; }; } curCSS = getComputedStyle || currentStyle; function getWH( elem, name, extra ) { // Start with offset property var val = name === "width" ? elem.offsetWidth : elem.offsetHeight, which = name === "width" ? cssWidth : cssHeight; if ( val > 0 ) { if ( extra !== "border" ) { jQuery.each( which, function() { if ( !extra ) { val -= parseFloat( jQuery.css( elem, "padding" + this ) ) || 0; } if ( extra === "margin" ) { val += parseFloat( jQuery.css( elem, extra + this ) ) || 0; } else { val -= parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0; } }); } return val + "px"; } // Fall back to computed then uncomputed css if necessary val = curCSS( elem, name, name ); if ( val < 0 || val == null ) { val = elem.style[ name ] || 0; } // Normalize "", auto, and prepare for extra val = parseFloat( val ) || 0; // Add padding, border, margin if ( extra ) { jQuery.each( which, function() { val += parseFloat( jQuery.css( elem, "padding" + this ) ) || 0; if ( extra !== "padding" ) { val += parseFloat( jQuery.css( elem, "border" + this + "Width" ) ) || 0; } if ( extra === "margin" ) { val += parseFloat( jQuery.css( elem, extra + this ) ) || 0; } }); } return val + "px"; } if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.hidden = function( elem ) { var width = elem.offsetWidth, height = elem.offsetHeight; return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css( elem, "display" )) === "none"); }; jQuery.expr.filters.visible = function( elem ) { return !jQuery.expr.filters.hidden( elem ); }; } var r20 = /%20/g, rbracket = /\[\]$/, rCRLF = /\r?\n/g, rhash = /#.*$/, rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i, // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, rquery = /\?/, rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, rselectTextarea = /^(?:select|textarea)/i, rspacesAjax = /\s+/, rts = /([?&])_=[^&]*/, rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/, // Keep a copy of the old load method _load = jQuery.fn.load, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Document location ajaxLocation, // Document location segments ajaxLocParts, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = ["*/"] + ["*"]; // #8138, IE may throw an exception when accessing // a field from window.location if document.domain has been set try { ajaxLocation = location.href; } catch( e ) { // Use the href attribute of an A element // since IE will modify it given document.location ajaxLocation = document.createElement( "a" ); ajaxLocation.href = ""; ajaxLocation = ajaxLocation.href; } // Segment location into parts ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } if ( jQuery.isFunction( func ) ) { var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ), i = 0, length = dataTypes.length, dataType, list, placeBefore; // For each dataType in the dataTypeExpression for(; i < length; i++ ) { dataType = dataTypes[ i ]; // We control if we're asked to add before // any existing element placeBefore = /^\+/.test( dataType ); if ( placeBefore ) { dataType = dataType.substr( 1 ) || "*"; } list = structure[ dataType ] = structure[ dataType ] || []; // then we add to the structure accordingly list[ placeBefore ? "unshift" : "push" ]( func ); } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, dataType /* internal */, inspected /* internal */ ) { dataType = dataType || options.dataTypes[ 0 ]; inspected = inspected || {}; inspected[ dataType ] = true; var list = structure[ dataType ], i = 0, length = list ? list.length : 0, executeOnly = ( structure === prefilters ), selection; for(; i < length && ( executeOnly || !selection ); i++ ) { selection = list[ i ]( options, originalOptions, jqXHR ); // If we got redirected to another dataType // we try there if executing only and not done already if ( typeof selection === "string" ) { if ( !executeOnly || inspected[ selection ] ) { selection = undefined; } else { options.dataTypes.unshift( selection ); selection = inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, selection, inspected ); } } } // If we're only executing or nothing was selected // we try the catchall dataType if not done already if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) { selection = inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR, "*", inspected ); } // unnecessary when only executing (prefilters) // but it'll be ignored by the caller in that case return selection; } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var key, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } } jQuery.fn.extend({ load: function( url, params, callback ) { if ( typeof url !== "string" && _load ) { return _load.apply( this, arguments ); // Don't do a request if no elements are being requested } else if ( !this.length ) { return this; } var off = url.indexOf( " " ); if ( off >= 0 ) { var selector = url.slice( off, url.length ); url = url.slice( 0, off ); } // Default to a GET request var type = "GET"; // If the second parameter was provided if ( params ) { // If it's a function if ( jQuery.isFunction( params ) ) { // We assume that it's the callback callback = params; params = undefined; // Otherwise, build a param string } else if ( typeof params === "object" ) { params = jQuery.param( params, jQuery.ajaxSettings.traditional ); type = "POST"; } } var self = this; // Request the remote document jQuery.ajax({ url: url, type: type, dataType: "html", data: params, // Complete callback (responseText is used internally) complete: function( jqXHR, status, responseText ) { // Store the response as specified by the jqXHR object responseText = jqXHR.responseText; // If successful, inject the HTML into all the matched elements if ( jqXHR.isResolved() ) { // #4825: Get the actual response in case // a dataFilter is present in ajaxSettings jqXHR.done(function( r ) { responseText = r; }); // See if a selector was specified self.html( selector ? // Create a dummy div to hold the results jQuery("<div>") // inject the contents of the document in, removing the scripts // to avoid any 'Permission Denied' errors in IE .append(responseText.replace(rscript, "")) // Locate the specified elements .find(selector) : // If not, just inject the full result responseText ); } if ( callback ) { self.each( callback, [ responseText, status, jqXHR ] ); } } }); return this; }, serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map(function(){ return this.elements ? jQuery.makeArray( this.elements ) : this; }) .filter(function(){ return this.name && !this.disabled && ( this.checked || rselectTextarea.test( this.nodeName ) || rinput.test( this.type ) ); }) .map(function( i, elem ){ var val = jQuery( this ).val(); return val == null ? null : jQuery.isArray( val ) ? jQuery.map( val, function( val, i ){ return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }) : { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }).get(); } }); // Attach a bunch of functions for handling common AJAX events jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){ jQuery.fn[ o ] = function( f ){ return this.bind( o, f ); }; }); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // shift arguments if data argument was omitted if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } return jQuery.ajax({ type: method, url: url, data: data, success: callback, dataType: type }); }; }); jQuery.extend({ getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { if ( settings ) { // Building a settings object ajaxExtend( target, jQuery.ajaxSettings ); } else { // Extending ajaxSettings settings = target; target = jQuery.ajaxSettings; } ajaxExtend( target, settings ); return target; }, ajaxSettings: { url: ajaxLocation, isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), global: true, type: "GET", contentType: "application/x-www-form-urlencoded", processData: true, async: true, /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, traditional: false, headers: {}, */ accepts: { xml: "application/xml, text/xml", html: "text/html", text: "text/plain", json: "application/json, text/javascript", "*": allTypes }, contents: { xml: /xml/, html: /html/, json: /json/ }, responseFields: { xml: "responseXML", text: "responseText" }, // List of data converters // 1) key format is "source_type destination_type" (a single space in-between) // 2) the catchall symbol "*" can be used for source_type converters: { // Convert anything to text "* text": window.String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": jQuery.parseJSON, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { context: true, url: true } }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events // It's the callbackContext if one was provided in the options // and if it's a DOM node or a jQuery collection globalEventContext = callbackContext !== s && ( callbackContext.nodeType || callbackContext instanceof jQuery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery._Deferred(), // Status-dependent callbacks statusCode = s.statusCode || {}, // ifModified key ifModifiedKey, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // Response headers responseHeadersString, responseHeaders, // transport transport, // timeout handle timeoutTimer, // Cross-domain detection vars parts, // The jqXHR state state = 0, // To know if global events are to be dispatched fireGlobals, // Loop variable i, // Fake xhr jqXHR = { readyState: 0, // Caches the header setRequestHeader: function( name, value ) { if ( !state ) { var lname = name.toLowerCase(); name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; requestHeaders[ name ] = value; } return this; }, // Raw string getAllResponseHeaders: function() { return state === 2 ? responseHeadersString : null; }, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( state === 2 ) { if ( !responseHeaders ) { responseHeaders = {}; while( ( match = rheaders.exec( responseHeadersString ) ) ) { responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; } } match = responseHeaders[ key.toLowerCase() ]; } return match === undefined ? null : match; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( !state ) { s.mimeType = type; } return this; }, // Cancel the request abort: function( statusText ) { statusText = statusText || "abort"; if ( transport ) { transport.abort( statusText ); } done( 0, statusText ); return this; } }; // Callback for when everything is done // It is defined here because jslint complains if it is declared // at the end of the function (which would be more logical and readable) function done( status, nativeStatusText, responses, headers ) { // Called once if ( state === 2 ) { return; } // State is "done" now state = 2; // Clear timeout if it exists if ( timeoutTimer ) { clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; var isSuccess, success, error, statusText = nativeStatusText, response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined, lastModified, etag; // If successful, handle type chaining if ( status >= 200 && status < 300 || status === 304 ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) { jQuery.lastModified[ ifModifiedKey ] = lastModified; } if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) { jQuery.etag[ ifModifiedKey ] = etag; } } // If not modified if ( status === 304 ) { statusText = "notmodified"; isSuccess = true; // If we have data } else { try { success = ajaxConvert( s, response ); statusText = "success"; isSuccess = true; } catch(e) { // We have a parsererror statusText = "parsererror"; error = e; } } } else { // We extract error from statusText // then normalize statusText and status for non-aborts error = statusText; if( !statusText || status ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = "" + ( nativeStatusText || statusText ); // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ), [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.resolveWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger( "ajaxStop" ); } } } // Attach deferreds deferred.promise( jqXHR ); jqXHR.success = jqXHR.done; jqXHR.error = jqXHR.fail; jqXHR.complete = completeDeferred.done; // Status-dependent callbacks jqXHR.statusCode = function( map ) { if ( map ) { var tmp; if ( state < 2 ) { for( tmp in map ) { statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ]; } } else { tmp = map[ jqXHR.status ]; jqXHR.then( tmp, tmp ); } } return this; }; // Remove hash character (#7531: and string promotion) // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) // We also use the url parameter if available s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); // Extract dataTypes list s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax ); // Determine if a cross-domain request is in order if ( s.crossDomain == null ) { parts = rurl.exec( s.url.toLowerCase() ); s.crossDomain = !!( parts && ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] || ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) != ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) ) ); } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefiler, stop there if ( state === 2 ) { return false; } // We can fire global events as of now if asked to fireGlobals = s.global; // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { jQuery.event.trigger( "ajaxStart" ); } // More options handling for requests with no content if ( !s.hasContent ) { // If data is available, append data to url if ( s.data ) { s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data; // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Get ifModifiedKey before adding the anti-cache parameter ifModifiedKey = s.url; // Add anti-cache in url if needed if ( s.cache === false ) { var ts = jQuery.now(), // try replacing _= if it is there ret = s.url.replace( rts, "$1_=" + ts ); // if nothing was replaced, add timestamp to the end s.url = ret + ( (ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { ifModifiedKey = ifModifiedKey || s.url; if ( jQuery.lastModified[ ifModifiedKey ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] ); } if ( jQuery.etag[ ifModifiedKey ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] ); } } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { // Abort if not done already jqXHR.abort(); return false; } // Install callbacks on deferreds for ( i in { success: 1, error: 1, complete: 1 } ) { jqXHR[ i ]( s[ i ] ); } // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = setTimeout( function(){ jqXHR.abort( "timeout" ); }, s.timeout ); } try { state = 1; transport.send( requestHeaders, done ); } catch (e) { // Propagate exception as error if not done if ( state < 2 ) { done( -1, e ); // Simply rethrow otherwise } else { jQuery.error( e ); } } } return jqXHR; }, // Serialize an array of form elements or a set of // key/values into a query string param: function( a, traditional ) { var s = [], add = function( key, value ) { // If value is a function, invoke it and return its value value = jQuery.isFunction( value ) ? value() : value; s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); }; // Set traditional to true for jQuery <= 1.3.2 behavior. if ( traditional === undefined ) { traditional = jQuery.ajaxSettings.traditional; } // If an array was passed in, assume that it is an array of form elements. if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); }); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( var prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ).replace( r20, "+" ); } }); function buildParams( prefix, obj, traditional, add ) { if ( jQuery.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // If array item is non-scalar (array or object), encode its // numeric index to resolve deserialization ambiguity issues. // Note that rack (as of 1.0.0) can't currently deserialize // nested arrays properly, and attempting to do so may cause // a server error. Possible fixes are to modify rack's // deserialization algorithm or to provide an option or flag // to force array serialization to be shallow. buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add ); } }); } else if ( !traditional && obj != null && typeof obj === "object" ) { // Serialize object item. for ( var name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } // This is still on the jQuery object... for now // Want to move this to jQuery.ajax some day jQuery.extend({ // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {} }); /* Handles responses to an ajax request: * - sets all responseXXX fields accordingly * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var contents = s.contents, dataTypes = s.dataTypes, responseFields = s.responseFields, ct, type, finalDataType, firstDataType; // Fill responseXXX fields for( type in responseFields ) { if ( type in responses ) { jqXHR[ responseFields[type] ] = responses[ type ]; } } // Remove auto dataType and get content-type in the process while( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader( "content-type" ); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } // Chain conversions given the request and the original response function ajaxConvert( s, response ) { // Apply the dataFilter if provided if ( s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } var dataTypes = s.dataTypes, converters = {}, i, key, length = dataTypes.length, tmp, // Current and previous dataTypes current = dataTypes[ 0 ], prev, // Conversion expression conversion, // Conversion function conv, // Conversion functions (transitive conversion) conv1, conv2; // For each dataType in the chain for( i = 1; i < length; i++ ) { // Create converters map // with lowercased keys if ( i === 1 ) { for( key in s.converters ) { if( typeof key === "string" ) { converters[ key.toLowerCase() ] = s.converters[ key ]; } } } // Get the dataTypes prev = current; current = dataTypes[ i ]; // If current is auto dataType, update it to prev if( current === "*" ) { current = prev; // If no auto and dataTypes are actually different } else if ( prev !== "*" && prev !== current ) { // Get the converter conversion = prev + " " + current; conv = converters[ conversion ] || converters[ "* " + current ]; // If there is no direct converter, search transitively if ( !conv ) { conv2 = undefined; for( conv1 in converters ) { tmp = conv1.split( " " ); if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) { conv2 = converters[ tmp[1] + " " + current ]; if ( conv2 ) { conv1 = converters[ conv1 ]; if ( conv1 === true ) { conv = conv2; } else if ( conv2 === true ) { conv = conv1; } break; } } } } // If we found no converter, dispatch an error if ( !( conv || conv2 ) ) { jQuery.error( "No conversion from " + conversion.replace(" "," to ") ); } // If found converter is not an equivalence if ( conv !== true ) { // Convert with 1 or 2 converters accordingly response = conv ? conv( response ) : conv2( conv1(response) ); } } } return response; } var jsc = jQuery.now(), jsre = /(\=)\?(&|$)|\?\?/i; // Default jsonp settings jQuery.ajaxSetup({ jsonp: "callback", jsonpCallback: function() { return jQuery.expando + "_" + ( jsc++ ); } }); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var inspectData = s.contentType === "application/x-www-form-urlencoded" && ( typeof s.data === "string" ); if ( s.dataTypes[ 0 ] === "jsonp" || s.jsonp !== false && ( jsre.test( s.url ) || inspectData && jsre.test( s.data ) ) ) { var responseContainer, jsonpCallback = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback, previous = window[ jsonpCallback ], url = s.url, data = s.data, replace = "$1" + jsonpCallback + "$2"; if ( s.jsonp !== false ) { url = url.replace( jsre, replace ); if ( s.url === url ) { if ( inspectData ) { data = data.replace( jsre, replace ); } if ( s.data === data ) { // Add callback manually url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback; } } } s.url = url; s.data = data; // Install callback window[ jsonpCallback ] = function( response ) { responseContainer = [ response ]; }; // Clean-up function jqXHR.always(function() { // Set callback back to previous value window[ jsonpCallback ] = previous; // Call if it was a function and we have a response if ( responseContainer && jQuery.isFunction( previous ) ) { window[ jsonpCallback ]( responseContainer[ 0 ] ); } }); // Use data converter to retrieve json after script execution s.converters["script json"] = function() { if ( !responseContainer ) { jQuery.error( jsonpCallback + " was not called" ); } return responseContainer[ 0 ]; }; // force json dataType s.dataTypes[ 0 ] = "json"; // Delegate to script return "script"; } }); // Install script dataType jQuery.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /javascript|ecmascript/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } }); // Handle cache's special case and global jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; s.global = false; } }); // Bind script tag hack transport jQuery.ajaxTransport( "script", function(s) { // This transport only deals with cross domain requests if ( s.crossDomain ) { var script, head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement; return { send: function( _, callback ) { script = document.createElement( "script" ); script.async = "async"; if ( s.scriptCharset ) { script.charset = s.scriptCharset; } script.src = s.url; // Attach handlers for all browsers script.onload = script.onreadystatechange = function( _, isAbort ) { if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { // Handle memory leak in IE script.onload = script.onreadystatechange = null; // Remove the script if ( head && script.parentNode ) { head.removeChild( script ); } // Dereference the script script = undefined; // Callback if not abort if ( !isAbort ) { callback( 200, "success" ); } } }; // Use insertBefore instead of appendChild to circumvent an IE6 bug. // This arises when a base node is used (#2709 and #4378). head.insertBefore( script, head.firstChild ); }, abort: function() { if ( script ) { script.onload( 0, 1 ); } } }; } }); var // #5280: Internet Explorer will keep connections alive if we don't abort on unload xhrOnUnloadAbort = window.ActiveXObject ? function() { // Abort all pending requests for ( var key in xhrCallbacks ) { xhrCallbacks[ key ]( 0, 1 ); } } : false, xhrId = 0, xhrCallbacks; // Functions to create xhrs function createStandardXHR() { try { return new window.XMLHttpRequest(); } catch( e ) {} } function createActiveXHR() { try { return new window.ActiveXObject( "Microsoft.XMLHTTP" ); } catch( e ) {} } // Create the request object // (This is still attached to ajaxSettings for backward compatibility) jQuery.ajaxSettings.xhr = window.ActiveXObject ? /* Microsoft failed to properly * implement the XMLHttpRequest in IE7 (can't request local files), * so we use the ActiveXObject when it is available * Additionally XMLHttpRequest can be disabled in IE7/IE8 so * we need a fallback. */ function() { return !this.isLocal && createStandardXHR() || createActiveXHR(); } : // For all other browsers, use the standard XMLHttpRequest object createStandardXHR; // Determine support properties (function( xhr ) { jQuery.extend( jQuery.support, { ajax: !!xhr, cors: !!xhr && ( "withCredentials" in xhr ) }); })( jQuery.ajaxSettings.xhr() ); // Create transport if the browser can provide an xhr if ( jQuery.support.ajax ) { jQuery.ajaxTransport(function( s ) { // Cross domain only allowed if supported through XMLHttpRequest if ( !s.crossDomain || jQuery.support.cors ) { var callback; return { send: function( headers, complete ) { // Get a new xhr var xhr = s.xhr(), handle, i; // Open the socket // Passing null username, generates a login popup on Opera (#2865) if ( s.username ) { xhr.open( s.type, s.url, s.async, s.username, s.password ); } else { xhr.open( s.type, s.url, s.async ); } // Apply custom fields if provided if ( s.xhrFields ) { for ( i in s.xhrFields ) { xhr[ i ] = s.xhrFields[ i ]; } } // Override mime type if needed if ( s.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( s.mimeType ); } // X-Requested-With header // For cross-domain requests, seeing as conditions for a preflight are // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. if ( !s.crossDomain && !headers["X-Requested-With"] ) { headers[ "X-Requested-With" ] = "XMLHttpRequest"; } // Need an extra try/catch for cross domain requests in Firefox 3 try { for ( i in headers ) { xhr.setRequestHeader( i, headers[ i ] ); } } catch( _ ) {} // Do send the request // This may raise an exception which is actually // handled in jQuery.ajax (so no try/catch here) xhr.send( ( s.hasContent && s.data ) || null ); // Listener callback = function( _, isAbort ) { var status, statusText, responseHeaders, responses, xml; // Firefox throws exceptions when accessing properties // of an xhr when a network error occured // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) try { // Was never called and is aborted or complete if ( callback && ( isAbort || xhr.readyState === 4 ) ) { // Only called once callback = undefined; // Do not keep as active anymore if ( handle ) { xhr.onreadystatechange = jQuery.noop; if ( xhrOnUnloadAbort ) { delete xhrCallbacks[ handle ]; } } // If it's an abort if ( isAbort ) { // Abort it manually if needed if ( xhr.readyState !== 4 ) { xhr.abort(); } } else { status = xhr.status; responseHeaders = xhr.getAllResponseHeaders(); responses = {}; xml = xhr.responseXML; // Construct response list if ( xml && xml.documentElement /* #4958 */ ) { responses.xml = xml; } responses.text = xhr.responseText; // Firefox throws an exception when accessing // statusText for faulty cross-domain requests try { statusText = xhr.statusText; } catch( e ) { // We normalize with Webkit giving an empty statusText statusText = ""; } // Filter status for non standard behaviors // If the request is local and we have data: assume a success // (success with no data won't get notified, that's the best we // can do given current implementations) if ( !status && s.isLocal && !s.crossDomain ) { status = responses.text ? 200 : 404; // IE - #1450: sometimes returns 1223 when it should be 204 } else if ( status === 1223 ) { status = 204; } } } } catch( firefoxAccessException ) { if ( !isAbort ) { complete( -1, firefoxAccessException ); } } // Call complete if needed if ( responses ) { complete( status, statusText, responses, responseHeaders ); } }; // if we're in sync mode or it's in cache // and has been retrieved directly (IE6 & IE7) // we need to manually fire the callback if ( !s.async || xhr.readyState === 4 ) { callback(); } else { handle = ++xhrId; if ( xhrOnUnloadAbort ) { // Create the active xhrs callbacks list if needed // and attach the unload handler if ( !xhrCallbacks ) { xhrCallbacks = {}; jQuery( window ).unload( xhrOnUnloadAbort ); } // Add to list of active xhrs callbacks xhrCallbacks[ handle ] = callback; } xhr.onreadystatechange = callback; } }, abort: function() { if ( callback ) { callback(0,1); } } }; } }); } var elemdisplay = {}, iframe, iframeDoc, rfxtypes = /^(?:toggle|show|hide)$/, rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i, timerId, fxAttrs = [ // height animations [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ], // width animations [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ], // opacity animations [ "opacity" ] ], fxNow; jQuery.fn.extend({ show: function( speed, easing, callback ) { var elem, display; if ( speed || speed === 0 ) { return this.animate( genFx("show", 3), speed, easing, callback); } else { for ( var i = 0, j = this.length; i < j; i++ ) { elem = this[i]; if ( elem.style ) { display = elem.style.display; // Reset the inline display of this element to learn if it is // being hidden by cascaded rules or not if ( !jQuery._data(elem, "olddisplay") && display === "none" ) { display = elem.style.display = ""; } // Set elements which have been overridden with display: none // in a stylesheet to whatever the default browser style is // for such an element if ( display === "" && jQuery.css( elem, "display" ) === "none" ) { jQuery._data(elem, "olddisplay", defaultDisplay(elem.nodeName)); } } } // Set the display of most of the elements in a second loop // to avoid the constant reflow for ( i = 0; i < j; i++ ) { elem = this[i]; if ( elem.style ) { display = elem.style.display; if ( display === "" || display === "none" ) { elem.style.display = jQuery._data(elem, "olddisplay") || ""; } } } return this; } }, hide: function( speed, easing, callback ) { if ( speed || speed === 0 ) { return this.animate( genFx("hide", 3), speed, easing, callback); } else { for ( var i = 0, j = this.length; i < j; i++ ) { if ( this[i].style ) { var display = jQuery.css( this[i], "display" ); if ( display !== "none" && !jQuery._data( this[i], "olddisplay" ) ) { jQuery._data( this[i], "olddisplay", display ); } } } // Set the display of the elements in a second loop // to avoid the constant reflow for ( i = 0; i < j; i++ ) { if ( this[i].style ) { this[i].style.display = "none"; } } return this; } }, // Save the old toggle function _toggle: jQuery.fn.toggle, toggle: function( fn, fn2, callback ) { var bool = typeof fn === "boolean"; if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) { this._toggle.apply( this, arguments ); } else if ( fn == null || bool ) { this.each(function() { var state = bool ? fn : jQuery(this).is(":hidden"); jQuery(this)[ state ? "show" : "hide" ](); }); } else { this.animate(genFx("toggle", 3), fn, fn2, callback); } return this; }, fadeTo: function( speed, to, easing, callback ) { return this.filter(":hidden").css("opacity", 0).show().end() .animate({opacity: to}, speed, easing, callback); }, animate: function( prop, speed, easing, callback ) { var optall = jQuery.speed(speed, easing, callback); if ( jQuery.isEmptyObject( prop ) ) { return this.each( optall.complete, [ false ] ); } // Do not change referenced properties as per-property easing will be lost prop = jQuery.extend( {}, prop ); return this[ optall.queue === false ? "each" : "queue" ](function() { // XXX 'this' does not always have a nodeName when running the // test suite if ( optall.queue === false ) { jQuery._mark( this ); } var opt = jQuery.extend( {}, optall ), isElement = this.nodeType === 1, hidden = isElement && jQuery(this).is(":hidden"), name, val, p, display, e, parts, start, end, unit; // will store per property easing and be used to determine when an animation is complete opt.animatedProperties = {}; for ( p in prop ) { // property name normalization name = jQuery.camelCase( p ); if ( p !== name ) { prop[ name ] = prop[ p ]; delete prop[ p ]; } val = prop[ name ]; // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default) if ( jQuery.isArray( val ) ) { opt.animatedProperties[ name ] = val[ 1 ]; val = prop[ name ] = val[ 0 ]; } else { opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing'; } if ( val === "hide" && hidden || val === "show" && !hidden ) { return opt.complete.call( this ); } if ( isElement && ( name === "height" || name === "width" ) ) { // Make sure that nothing sneaks out // Record all 3 overflow attributes because IE does not // change the overflow attribute when overflowX and // overflowY are set to the same value opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ]; // Set display property to inline-block for height/width // animations on inline elements that are having width/height // animated if ( jQuery.css( this, "display" ) === "inline" && jQuery.css( this, "float" ) === "none" ) { if ( !jQuery.support.inlineBlockNeedsLayout ) { this.style.display = "inline-block"; } else { display = defaultDisplay( this.nodeName ); // inline-level elements accept inline-block; // block-level elements need to be inline with layout if ( display === "inline" ) { this.style.display = "inline-block"; } else { this.style.display = "inline"; this.style.zoom = 1; } } } } } if ( opt.overflow != null ) { this.style.overflow = "hidden"; } for ( p in prop ) { e = new jQuery.fx( this, opt, p ); val = prop[ p ]; if ( rfxtypes.test(val) ) { e[ val === "toggle" ? hidden ? "show" : "hide" : val ](); } else { parts = rfxnum.exec( val ); start = e.cur(); if ( parts ) { end = parseFloat( parts[2] ); unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" ); // We need to compute starting value if ( unit !== "px" ) { jQuery.style( this, p, (end || 1) + unit); start = ((end || 1) / e.cur()) * start; jQuery.style( this, p, start + unit); } // If a +=/-= token was provided, we're doing a relative animation if ( parts[1] ) { end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start; } e.custom( start, end, unit ); } else { e.custom( start, val, "" ); } } } // For JS strict compliance return true; }); }, stop: function( clearQueue, gotoEnd ) { if ( clearQueue ) { this.queue([]); } this.each(function() { var timers = jQuery.timers, i = timers.length; // clear marker counters if we know they won't be if ( !gotoEnd ) { jQuery._unmark( true, this ); } while ( i-- ) { if ( timers[i].elem === this ) { if (gotoEnd) { // force the next step to be the last timers[i](true); } timers.splice(i, 1); } } }); // start the next in the queue if the last step wasn't forced if ( !gotoEnd ) { this.dequeue(); } return this; } }); // Animations created synchronously will run synchronously function createFxNow() { setTimeout( clearFxNow, 0 ); return ( fxNow = jQuery.now() ); } function clearFxNow() { fxNow = undefined; } // Generate parameters to create a standard animation function genFx( type, num ) { var obj = {}; jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() { obj[ this ] = type; }); return obj; } // Generate shortcuts for custom animations jQuery.each({ slideDown: genFx("show", 1), slideUp: genFx("hide", 1), slideToggle: genFx("toggle", 1), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; }); jQuery.extend({ speed: function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : { complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !jQuery.isFunction(easing) && easing }; opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[opt.duration] : jQuery.fx.speeds._default; // Queueing opt.old = opt.complete; opt.complete = function( noUnmark ) { if ( jQuery.isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue !== false ) { jQuery.dequeue( this ); } else if ( noUnmark !== false ) { jQuery._unmark( this ); } }; return opt; }, easing: { linear: function( p, n, firstNum, diff ) { return firstNum + diff * p; }, swing: function( p, n, firstNum, diff ) { return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum; } }, timers: [], fx: function( elem, options, prop ) { this.options = options; this.elem = elem; this.prop = prop; options.orig = options.orig || {}; } }); jQuery.fx.prototype = { // Simple function for setting a style value update: function() { if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); }, // Get the current size cur: function() { if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) { return this.elem[ this.prop ]; } var parsed, r = jQuery.css( this.elem, this.prop ); // Empty strings, null, undefined and "auto" are converted to 0, // complex values such as "rotate(1rad)" are returned as is, // simple values such as "10px" are parsed to Float. return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed; }, // Start an animation from one number to another custom: function( from, to, unit ) { var self = this, fx = jQuery.fx; this.startTime = fxNow || createFxNow(); this.start = from; this.end = to; this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" ); this.now = this.start; this.pos = this.state = 0; function t( gotoEnd ) { return self.step(gotoEnd); } t.elem = this.elem; if ( t() && jQuery.timers.push(t) && !timerId ) { timerId = setInterval( fx.tick, fx.interval ); } }, // Simple 'show' function show: function() { // Remember where we started, so that we can go back to it later this.options.orig[this.prop] = jQuery.style( this.elem, this.prop ); this.options.show = true; // Begin the animation // Make sure that we start at a small width/height to avoid any // flash of content this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur()); // Start by showing the element jQuery( this.elem ).show(); }, // Simple 'hide' function hide: function() { // Remember where we started, so that we can go back to it later this.options.orig[this.prop] = jQuery.style( this.elem, this.prop ); this.options.hide = true; // Begin the animation this.custom(this.cur(), 0); }, // Each step of an animation step: function( gotoEnd ) { var t = fxNow || createFxNow(), done = true, elem = this.elem, options = this.options, i, n; if ( gotoEnd || t >= options.duration + this.startTime ) { this.now = this.end; this.pos = this.state = 1; this.update(); options.animatedProperties[ this.prop ] = true; for ( i in options.animatedProperties ) { if ( options.animatedProperties[i] !== true ) { done = false; } } if ( done ) { // Reset the overflow if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) { jQuery.each( [ "", "X", "Y" ], function (index, value) { elem.style[ "overflow" + value ] = options.overflow[index]; }); } // Hide the element if the "hide" operation was done if ( options.hide ) { jQuery(elem).hide(); } // Reset the properties, if the item has been hidden or shown if ( options.hide || options.show ) { for ( var p in options.animatedProperties ) { jQuery.style( elem, p, options.orig[p] ); } } // Execute the complete function options.complete.call( elem ); } return false; } else { // classical easing cannot be used with an Infinity duration if ( options.duration == Infinity ) { this.now = t; } else { n = t - this.startTime; this.state = n / options.duration; // Perform the easing function, defaults to swing this.pos = jQuery.easing[ options.animatedProperties[ this.prop ] ]( this.state, n, 0, 1, options.duration ); this.now = this.start + ((this.end - this.start) * this.pos); } // Perform the next step of the animation this.update(); } return true; } }; jQuery.extend( jQuery.fx, { tick: function() { for ( var timers = jQuery.timers, i = 0 ; i < timers.length ; ++i ) { if ( !timers[i]() ) { timers.splice(i--, 1); } } if ( !timers.length ) { jQuery.fx.stop(); } }, interval: 13, stop: function() { clearInterval( timerId ); timerId = null; }, speeds: { slow: 600, fast: 200, // Default speed _default: 400 }, step: { opacity: function( fx ) { jQuery.style( fx.elem, "opacity", fx.now ); }, _default: function( fx ) { if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) { fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit; } else { fx.elem[ fx.prop ] = fx.now; } } } }); if ( jQuery.expr && jQuery.expr.filters ) { jQuery.expr.filters.animated = function( elem ) { return jQuery.grep(jQuery.timers, function( fn ) { return elem === fn.elem; }).length; }; } // Try to restore the default display value of an element function defaultDisplay( nodeName ) { if ( !elemdisplay[ nodeName ] ) { var body = document.body, elem = jQuery( "<" + nodeName + ">" ).appendTo( body ), display = elem.css( "display" ); elem.remove(); // If the simple way fails, // get element's real default display by attaching it to a temp iframe if ( display === "none" || display === "" ) { // No iframe to use yet, so create it if ( !iframe ) { iframe = document.createElement( "iframe" ); iframe.frameBorder = iframe.width = iframe.height = 0; } body.appendChild( iframe ); // Create a cacheable copy of the iframe document on first call. // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML // document to it; WebKit & Firefox won't allow reusing the iframe document. if ( !iframeDoc || !iframe.createElement ) { iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document; iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" ); iframeDoc.close(); } elem = iframeDoc.createElement( nodeName ); iframeDoc.body.appendChild( elem ); display = jQuery.css( elem, "display" ); body.removeChild( iframe ); } // Store the correct default display elemdisplay[ nodeName ] = display; } return elemdisplay[ nodeName ]; } var rtable = /^t(?:able|d|h)$/i, rroot = /^(?:body|html)$/i; if ( "getBoundingClientRect" in document.documentElement ) { jQuery.fn.offset = function( options ) { var elem = this[0], box; if ( options ) { return this.each(function( i ) { jQuery.offset.setOffset( this, options, i ); }); } if ( !elem || !elem.ownerDocument ) { return null; } if ( elem === elem.ownerDocument.body ) { return jQuery.offset.bodyOffset( elem ); } try { box = elem.getBoundingClientRect(); } catch(e) {} var doc = elem.ownerDocument, docElem = doc.documentElement; // Make sure we're not dealing with a disconnected DOM node if ( !box || !jQuery.contains( docElem, elem ) ) { return box ? { top: box.top, left: box.left } : { top: 0, left: 0 }; } var body = doc.body, win = getWindow(doc), clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, scrollTop = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop || body.scrollTop, scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft, top = box.top + scrollTop - clientTop, left = box.left + scrollLeft - clientLeft; return { top: top, left: left }; }; } else { jQuery.fn.offset = function( options ) { var elem = this[0]; if ( options ) { return this.each(function( i ) { jQuery.offset.setOffset( this, options, i ); }); } if ( !elem || !elem.ownerDocument ) { return null; } if ( elem === elem.ownerDocument.body ) { return jQuery.offset.bodyOffset( elem ); } jQuery.offset.initialize(); var computedStyle, offsetParent = elem.offsetParent, prevOffsetParent = elem, doc = elem.ownerDocument, docElem = doc.documentElement, body = doc.body, defaultView = doc.defaultView, prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle, top = elem.offsetTop, left = elem.offsetLeft; while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) { if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) { break; } computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle; top -= elem.scrollTop; left -= elem.scrollLeft; if ( elem === offsetParent ) { top += elem.offsetTop; left += elem.offsetLeft; if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) { top += parseFloat( computedStyle.borderTopWidth ) || 0; left += parseFloat( computedStyle.borderLeftWidth ) || 0; } prevOffsetParent = offsetParent; offsetParent = elem.offsetParent; } if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) { top += parseFloat( computedStyle.borderTopWidth ) || 0; left += parseFloat( computedStyle.borderLeftWidth ) || 0; } prevComputedStyle = computedStyle; } if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) { top += body.offsetTop; left += body.offsetLeft; } if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) { top += Math.max( docElem.scrollTop, body.scrollTop ); left += Math.max( docElem.scrollLeft, body.scrollLeft ); } return { top: top, left: left }; }; } jQuery.offset = { initialize: function() { var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.css(body, "marginTop") ) || 0, html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>"; jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } ); container.innerHTML = html; body.insertBefore( container, body.firstChild ); innerDiv = container.firstChild; checkDiv = innerDiv.firstChild; td = innerDiv.nextSibling.firstChild.firstChild; this.doesNotAddBorder = (checkDiv.offsetTop !== 5); this.doesAddBorderForTableAndCells = (td.offsetTop === 5); checkDiv.style.position = "fixed"; checkDiv.style.top = "20px"; // safari subtracts parent border width here which is 5px this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15); checkDiv.style.position = checkDiv.style.top = ""; innerDiv.style.overflow = "hidden"; innerDiv.style.position = "relative"; this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5); this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop); body.removeChild( container ); jQuery.offset.initialize = jQuery.noop; }, bodyOffset: function( body ) { var top = body.offsetTop, left = body.offsetLeft; jQuery.offset.initialize(); if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) { top += parseFloat( jQuery.css(body, "marginTop") ) || 0; left += parseFloat( jQuery.css(body, "marginLeft") ) || 0; } return { top: top, left: left }; }, setOffset: function( elem, options, i ) { var position = jQuery.css( elem, "position" ); // set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } var curElem = jQuery( elem ), curOffset = curElem.offset(), curCSSTop = jQuery.css( elem, "top" ), curCSSLeft = jQuery.css( elem, "left" ), calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, props = {}, curPosition = {}, curTop, curLeft; // need to be able to calculate position if either top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; curLeft = curPosition.left; } else { curTop = parseFloat( curCSSTop ) || 0; curLeft = parseFloat( curCSSLeft ) || 0; } if ( jQuery.isFunction( options ) ) { options = options.call( elem, i, curOffset ); } if (options.top != null) { props.top = (options.top - curOffset.top) + curTop; } if (options.left != null) { props.left = (options.left - curOffset.left) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } } }; jQuery.fn.extend({ position: function() { if ( !this[0] ) { return null; } var elem = this[0], // Get *real* offsetParent offsetParent = this.offsetParent(), // Get correct offsets offset = this.offset(), parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset(); // Subtract element margins // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 offset.top -= parseFloat( jQuery.css(elem, "marginTop") ) || 0; offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0; // Add offsetParent borders parentOffset.top += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0; parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0; // Subtract the two offsets return { top: offset.top - parentOffset.top, left: offset.left - parentOffset.left }; }, offsetParent: function() { return this.map(function() { var offsetParent = this.offsetParent || document.body; while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) { offsetParent = offsetParent.offsetParent; } return offsetParent; }); } }); // Create scrollLeft and scrollTop methods jQuery.each( ["Left", "Top"], function( i, name ) { var method = "scroll" + name; jQuery.fn[ method ] = function( val ) { var elem, win; if ( val === undefined ) { elem = this[ 0 ]; if ( !elem ) { return null; } win = getWindow( elem ); // Return the scroll offset return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] : jQuery.support.boxModel && win.document.documentElement[ method ] || win.document.body[ method ] : elem[ method ]; } // Set the scroll offset return this.each(function() { win = getWindow( this ); if ( win ) { win.scrollTo( !i ? val : jQuery( win ).scrollLeft(), i ? val : jQuery( win ).scrollTop() ); } else { this[ method ] = val; } }); }; }); function getWindow( elem ) { return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false; } // Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods jQuery.each([ "Height", "Width" ], function( i, name ) { var type = name.toLowerCase(); // innerHeight and innerWidth jQuery.fn[ "inner" + name ] = function() { var elem = this[0]; return elem && elem.style ? parseFloat( jQuery.css( elem, type, "padding" ) ) : null; }; // outerHeight and outerWidth jQuery.fn[ "outer" + name ] = function( margin ) { var elem = this[0]; return elem && elem.style ? parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) : null; }; jQuery.fn[ type ] = function( size ) { // Get window width or height var elem = this[0]; if ( !elem ) { return size == null ? null : this; } if ( jQuery.isFunction( size ) ) { return this.each(function( i ) { var self = jQuery( this ); self[ type ]( size.call( this, i, self[ type ]() ) ); }); } if ( jQuery.isWindow( elem ) ) { // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat var docElemProp = elem.document.documentElement[ "client" + name ], body = elem.document.body; return elem.document.compatMode === "CSS1Compat" && docElemProp || body && body[ "client" + name ] || docElemProp; // Get document width or height } else if ( elem.nodeType === 9 ) { // Either scroll[Width/Height] or offset[Width/Height], whichever is greater return Math.max( elem.documentElement["client" + name], elem.body["scroll" + name], elem.documentElement["scroll" + name], elem.body["offset" + name], elem.documentElement["offset" + name] ); // Get or set width or height on the element } else if ( size === undefined ) { var orig = jQuery.css( elem, type ), ret = parseFloat( orig ); return jQuery.isNaN( ret ) ? orig : ret; // Set the width or height on the element (default to pixels if value is unitless) } else { return this.css( type, typeof size === "string" ? size : size + "px" ); } }; }); // Expose jQuery to the global object window.jQuery = window.$ = jQuery; })(window);
examples/kitchen-sink-controlled/src/index.js
react-tools/react-table
import React from 'react' import ReactDOM from 'react-dom' import './index.css' import App from './App' ReactDOM.render(<App />, document.getElementById('root'))
src/legends/discrete-color-legend.js
Apercu/react-vis
// Copyright (c) 2016 - 2017 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. import React from 'react'; import PropTypes from 'prop-types'; import DiscreteColorLegendItem from 'legends/discrete-color-legend-item'; import {DISCRETE_COLOR_RANGE} from 'theme'; function DiscreteColorLegend({ className, colors, height, items, onItemClick, onItemMouseEnter, onItemMouseLeave, orientation, width }) { return ( <div className={`rv-discrete-color-legend ${orientation} ${className}`} style={{width, height}}> {items.map((item, i) => <DiscreteColorLegendItem title={item.title ? item.title : item} color={item.color ? item.color : colors[i % colors.length]} disabled={Boolean(item.disabled)} orientation={orientation} key={i} onClick={e => onItemClick(item, i, e)} onMouseEnter={e => onItemMouseEnter(item, i, e)} onMouseLeave={e => onItemMouseLeave(item, i, e)}/> )} </div> ); } DiscreteColorLegend.displayName = 'DiscreteColorLegendItem'; DiscreteColorLegend.propTypes = { className: PropTypes.string, items: PropTypes.arrayOf( PropTypes.oneOfType([ PropTypes.shape({ title: PropTypes.string.isRequired, color: PropTypes.string, disabled: PropTypes.bool }), PropTypes.string.isRequired, PropTypes.element ]) ).isRequired, onItemClick: PropTypes.func, onItemMouseEnter: PropTypes.func, onItemMouseLeave: PropTypes.func, height: PropTypes.number, width: PropTypes.number, orientation: PropTypes.oneOf(['vertical', 'horizontal']) }; const NOOP = () => {}; DiscreteColorLegend.defaultProps = { className: '', colors: DISCRETE_COLOR_RANGE, onItemClick: NOOP, onItemMouseEnter: NOOP, onItemMouseLeave: NOOP, orientation: 'vertical' }; export default DiscreteColorLegend;
lib/codemod/src/transforms/__testfixtures__/csf-to-mdx/component-id.input.js
kadirahq/react-storybook
import React from 'react'; import Button from './Button'; export default { title: 'Button', id: 'button-id', }; export const someStory = () => <Button label="Story 1" />;
ajax/libs/react-native-web/0.13.4/cjs/hooks/usePressEvents/PressResponder.js
cdnjs/cdnjs
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * * @format */ 'use strict'; exports.__esModule = true; exports.default = void 0; var DELAY = 'DELAY'; var ERROR = 'ERROR'; var LONG_PRESS_DETECTED = 'LONG_PRESS_DETECTED'; var NOT_RESPONDER = 'NOT_RESPONDER'; var RESPONDER_ACTIVE_LONG_PRESS_START = 'RESPONDER_ACTIVE_LONG_PRESS_START'; var RESPONDER_ACTIVE_PRESS_START = 'RESPONDER_ACTIVE_PRESS_START'; var RESPONDER_INACTIVE_PRESS_START = 'RESPONDER_INACTIVE_PRESS_START'; var RESPONDER_GRANT = 'RESPONDER_GRANT'; var RESPONDER_RELEASE = 'RESPONDER_RELEASE'; var RESPONDER_TERMINATED = 'RESPONDER_TERMINATED'; var Transitions = Object.freeze({ NOT_RESPONDER: { DELAY: ERROR, RESPONDER_GRANT: RESPONDER_INACTIVE_PRESS_START, RESPONDER_RELEASE: ERROR, RESPONDER_TERMINATED: ERROR, LONG_PRESS_DETECTED: ERROR }, RESPONDER_INACTIVE_PRESS_START: { DELAY: RESPONDER_ACTIVE_PRESS_START, RESPONDER_GRANT: ERROR, RESPONDER_RELEASE: NOT_RESPONDER, RESPONDER_TERMINATED: NOT_RESPONDER, LONG_PRESS_DETECTED: ERROR }, RESPONDER_ACTIVE_PRESS_START: { DELAY: ERROR, RESPONDER_GRANT: ERROR, RESPONDER_RELEASE: NOT_RESPONDER, RESPONDER_TERMINATED: NOT_RESPONDER, LONG_PRESS_DETECTED: RESPONDER_ACTIVE_LONG_PRESS_START }, RESPONDER_ACTIVE_LONG_PRESS_START: { DELAY: ERROR, RESPONDER_GRANT: ERROR, RESPONDER_RELEASE: NOT_RESPONDER, RESPONDER_TERMINATED: NOT_RESPONDER, LONG_PRESS_DETECTED: RESPONDER_ACTIVE_LONG_PRESS_START }, ERROR: { DELAY: NOT_RESPONDER, RESPONDER_GRANT: RESPONDER_INACTIVE_PRESS_START, RESPONDER_RELEASE: NOT_RESPONDER, RESPONDER_TERMINATED: NOT_RESPONDER, LONG_PRESS_DETECTED: NOT_RESPONDER } }); var isActiveSignal = function isActiveSignal(signal) { return signal === RESPONDER_ACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_LONG_PRESS_START; }; var isPressStartSignal = function isPressStartSignal(signal) { return signal === RESPONDER_INACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_PRESS_START || signal === RESPONDER_ACTIVE_LONG_PRESS_START; }; var isTerminalSignal = function isTerminalSignal(signal) { return signal === RESPONDER_TERMINATED || signal === RESPONDER_RELEASE; }; var isValidKeyPress = function isValidKeyPress(event) { var key = event.key; var target = event.currentTarget; var role = target.getAttribute('role'); var isSpacebar = key === ' ' || key === 'Spacebar'; return key === 'Enter' || isSpacebar && (role === 'button' || role === 'menuitem'); }; var DEFAULT_LONG_PRESS_DELAY_MS = 450; // 500 - 50 var DEFAULT_PRESS_DELAY_MS = 50; /** * =========================== PressResponder Tutorial =========================== * * The `PressResponder` class helps you create press interactions by analyzing the * geometry of elements and observing when another responder (e.g. ScrollView) * has stolen the touch lock. It offers hooks for your component to provide * interaction feedback to the user: * * - When a press has activated (e.g. highlight an element) * - When a press has deactivated (e.g. un-highlight an element) * - When a press sould trigger an action, meaning it activated and deactivated * while within the geometry of the element without the lock being stolen. * * A high quality interaction isn't as simple as you might think. There should * be a slight delay before activation. Moving your finger beyond an element's * bounds should trigger deactivation, but moving the same finger back within an * element's bounds should trigger reactivation. * * In order to use `PressResponder`, do the following: * * const pressResponder = new PressResponder(config); * * 2. Choose the rendered component who should collect the press events. On that * element, spread `pressability.getEventHandlers()` into its props. * * return ( * <View {...this.state.pressResponder.getEventHandlers()} /> * ); * * 3. Reset `PressResponder` when your component unmounts. * * componentWillUnmount() { * this.state.pressResponder.reset(); * } * * ==================== Implementation Details ==================== * * `PressResponder` only assumes that there exists a `HitRect` node. The `PressRect` * is an abstract box that is extended beyond the `HitRect`. * * # Geometry * * ┌────────────────────────┐ * │ ┌──────────────────┐ │ - Presses start anywhere within `HitRect`. * │ │ ┌────────────┐ │ │ * │ │ │ VisualRect │ │ │ * │ │ └────────────┘ │ │ - When pressed down for sufficient amount of time * │ │ HitRect │ │ before letting up, `VisualRect` activates. * │ └──────────────────┘ │ * │ Out Region o │ * └────────────────────│───┘ * └────── When the press is released outside the `HitRect`, * the responder is NOT eligible for a "press". * * # State Machine * * ┌───────────────┐ ◀──── RESPONDER_RELEASE * │ NOT_RESPONDER │ * └───┬───────────┘ ◀──── RESPONDER_TERMINATED * │ * │ RESPONDER_GRANT (HitRect) * │ * ▼ * ┌─────────────────────┐ ┌───────────────────┐ ┌───────────────────┐ * │ RESPONDER_INACTIVE_ │ DELAY │ RESPONDER_ACTIVE_ │ T + DELAY │ RESPONDER_ACTIVE_ │ * │ PRESS_START ├────────▶ │ PRESS_START ├────────────▶ │ LONG_PRESS_START │ * └─────────────────────┘ └───────────────────┘ └───────────────────┘ * * T + DELAY => LONG_PRESS_DELAY + DELAY * * Not drawn are the side effects of each transition. The most important side * effect is the invocation of `onLongPress`. Only when the browser produces a * `click` event is `onPress` invoked. */ var PressResponder = /*#__PURE__*/ function () { function PressResponder(config) { this._eventHandlers = null; this._isPointerTouch = false; this._longPressDelayTimeout = null; this._longPressDispatched = false; this._pressDelayTimeout = null; this._pressOutDelayTimeout = null; this._touchState = NOT_RESPONDER; this.configure(config); } var _proto = PressResponder.prototype; _proto.configure = function configure(config) { this._config = config; } /** * Resets any pending timers. This should be called on unmount. */ ; _proto.reset = function reset() { this._cancelLongPressDelayTimeout(); this._cancelPressDelayTimeout(); this._cancelPressOutDelayTimeout(); } /** * Returns a set of props to spread into the interactive element. */ ; _proto.getEventHandlers = function getEventHandlers() { if (this._eventHandlers == null) { this._eventHandlers = this._createEventHandlers(); } return this._eventHandlers; }; _proto._createEventHandlers = function _createEventHandlers() { var _this = this; var start = function start(event, shouldDelay) { event.persist(); _this._cancelPressOutDelayTimeout(); _this._longPressDispatched = false; _this._responder = event.currentTarget; _this._selectionTerminated = false; _this._touchState = NOT_RESPONDER; _this._isPointerTouch = event.nativeEvent.type === 'touchstart'; _this._receiveSignal(RESPONDER_GRANT, event); var delayPressStart = normalizeDelay(_this._config.delayPressStart, 0, DEFAULT_PRESS_DELAY_MS); if (shouldDelay !== false && delayPressStart > 0) { _this._pressDelayTimeout = setTimeout(function () { _this._receiveSignal(DELAY, event); }, delayPressStart); } else { _this._receiveSignal(DELAY, event); } var delayLongPress = normalizeDelay(_this._config.delayLongPress, 10, DEFAULT_LONG_PRESS_DELAY_MS); _this._longPressDelayTimeout = setTimeout(function () { _this._handleLongPress(event); }, delayLongPress + delayPressStart); }; var end = function end(event) { _this._receiveSignal(RESPONDER_RELEASE, event); }; return { onStartShouldSetResponder: function onStartShouldSetResponder() { var disabled = _this._config.disabled; if (disabled == null) { return true; } return !disabled; }, onKeyDown: function onKeyDown(event) { if (isValidKeyPress(event)) { if (_this._touchState === NOT_RESPONDER) { start(event, false); } event.stopPropagation(); } }, onKeyUp: function onKeyUp(event) { if (isValidKeyPress(event)) { if (_this._touchState !== NOT_RESPONDER) { end(event); } event.stopPropagation(); } }, onResponderGrant: function onResponderGrant(event) { return start(event); }, onResponderMove: function onResponderMove(event) { if (_this._config.onPressMove != null) { _this._config.onPressMove(event); } var touch = getTouchFromResponderEvent(event); if (_this._touchActivatePosition != null) { var deltaX = _this._touchActivatePosition.pageX - touch.pageX; var deltaY = _this._touchActivatePosition.pageY - touch.pageY; if (Math.hypot(deltaX, deltaY) > 10) { _this._cancelLongPressDelayTimeout(); } } }, onResponderRelease: function onResponderRelease(event) { return end(event); }, onResponderTerminate: function onResponderTerminate(event) { if (event.nativeEvent.type === 'selectionchange') { _this._selectionTerminated = true; } _this._receiveSignal(RESPONDER_TERMINATED, event); }, onResponderTerminationRequest: function onResponderTerminationRequest(event) { var _this$_config = _this._config, cancelable = _this$_config.cancelable, disabled = _this$_config.disabled, onLongPress = _this$_config.onLongPress; // If `onLongPress` is provided, don't terminate on `contextmenu` as default // behavior will be prevented for non-mouse pointers. if (!disabled && onLongPress != null && _this._isPointerTouch && event.nativeEvent.type === 'contextmenu') { return false; } if (cancelable == null) { return true; } return cancelable; }, // NOTE: this diverges from react-native in 3 significant ways: // * The `onPress` callback is not connected to the responder system (the native // `click` event must be used but is dispatched in many scenarios where no pointers // are on the screen.) Therefore, it's possible for `onPress` to be called without // `onPress{Start,End}` being called first. // * The `onPress` callback is only be called on the first ancestor of the native // `click` target that is using the PressResponder. // * The event's `nativeEvent` is a `MouseEvent` not a `TouchEvent`. onClick: function onClick(event) { var _this$_config2 = _this._config, disabled = _this$_config2.disabled, onPress = _this$_config2.onPress; if (!disabled) { // If long press dispatched, cancel default click behavior. // If the responder terminated because text was selected during the gesture, // cancel the default click behavior. if (_this._longPressDispatched || _this._selectionTerminated) { event.preventDefault(); } else if (onPress != null && event.ctrlKey === false && event.altKey === false) { onPress(event); } event.stopPropagation(); } }, // If `onLongPress` is provided and a touch pointer is being used, prevent the // default context menu from opening. onContextMenu: function onContextMenu(event) { var _this$_config3 = _this._config, disabled = _this$_config3.disabled, onLongPress = _this$_config3.onLongPress; if (!disabled && onLongPress != null && _this._isPointerTouch && !event.defaultPrevented) { event.preventDefault(); } } }; } /** * Receives a state machine signal, performs side effects of the transition * and stores the new state. Validates the transition as well. */ ; _proto._receiveSignal = function _receiveSignal(signal, event) { var prevState = this._touchState; var nextState = null; if (Transitions[prevState] != null) { nextState = Transitions[prevState][signal]; } if (this._responder == null && signal === RESPONDER_RELEASE) { return; } if (nextState == null || nextState === ERROR) { console.error("PressResponder: Invalid signal " + signal + " for state " + prevState + " on responder"); } else if (prevState !== nextState) { this._performTransitionSideEffects(prevState, nextState, signal, event); this._touchState = nextState; } } /** * Performs a transition between touchable states and identify any activations * or deactivations (and callback invocations). */ ; _proto._performTransitionSideEffects = function _performTransitionSideEffects(prevState, nextState, signal, event) { if (isTerminalSignal(signal)) { this._isPointerTouch = false; this._touchActivatePosition = null; this._cancelLongPressDelayTimeout(); } if (isPressStartSignal(prevState) && signal === LONG_PRESS_DETECTED) { var onLongPress = this._config.onLongPress; // Long press is not supported for keyboards because 'click' can be dispatched // immediately (and multiple times) after 'keydown'. if (onLongPress != null && event.nativeEvent.key == null) { onLongPress(event); this._longPressDispatched = true; } } var isPrevActive = isActiveSignal(prevState); var isNextActive = isActiveSignal(nextState); if (!isPrevActive && isNextActive) { this._activate(event); } else if (isPrevActive && !isNextActive) { this._deactivate(event); } if (isPressStartSignal(prevState) && signal === RESPONDER_RELEASE) { var _this$_config4 = this._config, _onLongPress = _this$_config4.onLongPress, onPress = _this$_config4.onPress; if (onPress != null) { var isPressCanceledByLongPress = _onLongPress != null && prevState === RESPONDER_ACTIVE_LONG_PRESS_START; if (!isPressCanceledByLongPress) { // If we never activated (due to delays), activate and deactivate now. if (!isNextActive && !isPrevActive) { this._activate(event); this._deactivate(event); } } } } this._cancelPressDelayTimeout(); }; _proto._activate = function _activate(event) { var _this$_config5 = this._config, onPressChange = _this$_config5.onPressChange, onPressStart = _this$_config5.onPressStart; var touch = getTouchFromResponderEvent(event); this._touchActivatePosition = { pageX: touch.pageX, pageY: touch.pageY }; if (onPressStart != null) { onPressStart(event); } if (onPressChange != null) { onPressChange(true); } }; _proto._deactivate = function _deactivate(event) { var _this$_config6 = this._config, onPressChange = _this$_config6.onPressChange, onPressEnd = _this$_config6.onPressEnd; function end() { if (onPressEnd != null) { onPressEnd(event); } if (onPressChange != null) { onPressChange(false); } } var delayPressEnd = normalizeDelay(this._config.delayPressEnd); if (delayPressEnd > 0) { this._pressOutDelayTimeout = setTimeout(function () { end(); }, delayPressEnd); } else { end(); } }; _proto._handleLongPress = function _handleLongPress(event) { if (this._touchState === RESPONDER_ACTIVE_PRESS_START || this._touchState === RESPONDER_ACTIVE_LONG_PRESS_START) { this._receiveSignal(LONG_PRESS_DETECTED, event); } }; _proto._cancelLongPressDelayTimeout = function _cancelLongPressDelayTimeout() { if (this._longPressDelayTimeout != null) { clearTimeout(this._longPressDelayTimeout); this._longPressDelayTimeout = null; } }; _proto._cancelPressDelayTimeout = function _cancelPressDelayTimeout() { if (this._pressDelayTimeout != null) { clearTimeout(this._pressDelayTimeout); this._pressDelayTimeout = null; } }; _proto._cancelPressOutDelayTimeout = function _cancelPressOutDelayTimeout() { if (this._pressOutDelayTimeout != null) { clearTimeout(this._pressOutDelayTimeout); this._pressOutDelayTimeout = null; } }; return PressResponder; }(); exports.default = PressResponder; function normalizeDelay(delay, min, fallback) { if (min === void 0) { min = 0; } if (fallback === void 0) { fallback = 0; } return Math.max(min, delay !== null && delay !== void 0 ? delay : fallback); } function getTouchFromResponderEvent(event) { var _event$nativeEvent = event.nativeEvent, changedTouches = _event$nativeEvent.changedTouches, touches = _event$nativeEvent.touches; if (touches != null && touches.length > 0) { return touches[0]; } if (changedTouches != null && changedTouches.length > 0) { return changedTouches[0]; } return event.nativeEvent; } module.exports = exports.default;
src/components/ControlPanel/ControlPanel.js
mulesoft-labs/mule-match
import React from 'react'; import propTypes from './PropTypes'; import styles from './ControlPanel.css'; const onIgnoreFeature = (e, currentFeature, ignoreFeature) => { e.preventDefault(); ignoreFeature(currentFeature); }; const onSelectFeature = (e, currentFeature, selectFeature) => { e.preventDefault(); selectFeature(currentFeature); }; const ControlPanel = ({ currentFeature, selectFeature, ignoreFeature }) => ( <div className={styles.controlPanel}> <div display-if={currentFeature} className={styles.buttonNo} onClick={(e) => onIgnoreFeature(e, currentFeature, ignoreFeature)}> <a href="#" className={styles.triggerNo}></a> </div> <div display-if={currentFeature} className={styles.buttonInfo}> <a href={currentFeature.url} className={styles.triggerInfo} target="_blank"></a> </div> <div display-if={currentFeature} className={styles.buttonYes} onClick={(e) => onSelectFeature(e, currentFeature, selectFeature)}> <a href="#" className={styles.triggerYes}></a> </div> </div> ); ControlPanel.propTypes = propTypes; export default ControlPanel;
component-starter-server/src/main/frontend/src/app/ComponentsContext.js
chmyga/component-runtime
/** * Copyright (C) 2006-2020 Talend Inc. - www.talend.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import React from 'react'; import PropTypes from 'prop-types'; import getUUID from './uuid'; import { COMPONENT_TYPES, COMPONENT_TYPE_SOURCE, COMPONENT_TYPE_PROCESSOR, COMPONENT_TYPE_SINK, } from './constants'; const Context = React.createContext({}); class Provider extends React.Component { static propTypes = { value: PropTypes.object, children: PropTypes.node, }; constructor(props) { super(props); this.state = { components: props.value || [], withIO: false, }; this.state.setComponentType = this.setComponentType.bind(this); this.state.addComponent = this.addComponent.bind(this); this.state.deleteComponent = this.deleteComponent.bind(this); this.state.updateComponent = this.updateComponent.bind(this); this.state.setCurrentComponent = this.setCurrentComponent.bind(this); this.state.activateIO = this.activateIO.bind(this); } componentWillReceiveProps(nextProps) { if (nextProps.value !== this.state.components) { this.setState(nextProps.value); } } setCurrentComponent(index) { this.setState({ current: index }); } setComponentType(component, type) { // type must be in Input / Processor if (COMPONENT_TYPES.indexOf(type) === -1) { throw new Error(`Invalid type ${type}. Only ${COMPONENT_TYPES.join(', ')} are valid`); } this.setState(prevState => { // eslint-disable-next-line no-param-reassign component.type = type; return Object.assign({}, prevState); }); } activateIO(datastore, dataset) { this.setState({ withIO: true }); this.dataset = dataset; // keep a ref on it const datastoreId = getUUID(); const datasetId = getUUID(); datastore.add({ $id: datastoreId, name: 'Datastore', structure: { entries: [], }, }); dataset.add( { $id: datasetId, name: 'Dataset', structure: { entries: [ { name: 'datastore', type: 'datastore', reference: datastoreId, }, ], }, }, () => { this.addComponent(COMPONENT_TYPE_SOURCE); this.addComponent(COMPONENT_TYPE_SINK); }, ); } /** * example of component with dataset * entries: [ * { * name: 'mondataset', * type: 'dataset', * ref: 'JDBC' * } * ] */ addComponent(type, callback) { let name = `Company${type}`; const found = this.state.components.find(c => c.configuration.name === name); if (found) { name = `${name}${this.state.components.length}`; } const dataset = { name: 'dataset', type: 'dataset', reference: this.dataset && this.dataset.datasets[0].$id, }; const component = { type, configuration: { name, }, source: { genericOutput: true, stream: false, configurationStructure: { entries: [], }, outputStructure: { entries: [], }, }, processor: { configurationStructure: { entries: [], }, inputStructures: [], outputStructures: [], }, }; if (type === COMPONENT_TYPE_PROCESSOR) { component.processor.inputStructures.push({ name: 'MAIN', generic: true, structure: { entries: [], }, }); component.processor.outputStructures.push({ name: 'MAIN', generic: true, structure: { entries: [], }, }); } else if (type === COMPONENT_TYPE_SOURCE) { component.source.configurationStructure.entries.push(dataset); } else if (type === COMPONENT_TYPE_SINK) { component.processor.configurationStructure.entries.push(dataset); component.processor.inputStructures.push({ name: 'MAIN', generic: true, structure: { entries: [], }, }); } this.setState( state => { state.components.push(component); return Object.assign({}, state); }, () => callback && callback(component), ); } updateComponent() { this.setState(state => Object.assign({}, state)); } deleteComponent(index) { this.setState(state => { state.components.splice(index, 1); return Object.assign({}, state); }); } render() { return <Context.Provider value={this.state}>{this.props.children}</Context.Provider>; } } export default { Provider, Consumer: Context.Consumer, raw: Context, };
tp-3/juan-pablo-gonzalez/src/shared/components/fileUpload/components/fileDrop/FileDrop.spec.js
jpgonzalezquinteros/sovos-reactivo-2017
import { expect } from 'chai'; import React from 'react'; import { shallow } from 'enzyme'; import Dropzone from 'react-dropzone'; import FileDrop from './FileDrop'; import DragAndDropListItem from './components/dragAndDropListItem/DragAndDropListItem'; const requiredProps = { acceptedFiles: [], rejectedFiles: [], handleFilesList: () => {}, handleUploadBtbAble: () => {} }; const requiredCustomProps = { acceptedFiles: [ { lastModified: 1474394603299, lastModifiedDate: 'MockedDate', map: null, mapable: true, name: 'MockedFileName', preview: 'MockedPreview', size: 66, type: '' } ], rejectedFiles: [], handleFilesList: () => {}, handleUploadBtbAble: () => {} }; function setupDefault() { return shallow(<FileDrop { ...requiredProps } />); } function setupWithFiles() { return shallow(<FileDrop { ...requiredCustomProps } />); } describe('DragAndDropComponent Suite', () => { it('Should have Dropzone component', () => { const wrapper = setupDefault(); expect(wrapper.find(Dropzone).exists()).to.be.true; }); it('Should have DragAndDropListItem component', () => { const wrapper = setupWithFiles(); expect(wrapper.find(DragAndDropListItem).exists()).to.be.true; }); it('Should not have DragAndDropListItem component', () => { const wrapper = setupDefault(); expect(wrapper.find(DragAndDropListItem).exists()).to.be.false; }); });
src/CHANGELOG.js
enragednuke/WoWAnalyzer
import React from 'react'; import { Anomoly, blazyb, Dyspho, fasib, Fyruna, Gurupitka, Juko8, Mamtooth, sref, Versaya, Yuyz0112, Zerotorescue, Hartra344, Putro, Sharrq } from 'MAINTAINERS'; import Wrapper from 'common/Wrapper'; import ItemLink from 'common/ItemLink'; import ITEMS from 'common/ITEMS'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; export default [ { date: new Date('2018-01-11'), changes: 'Fixed a bug where item damage/healing/mana statistics (with the icons) stopped updating after the last damage/healing/mana event. This will lower most displayed item values, the impact depends on the time between the last event that increased the damage/healing/mana of the thing being analyzed and the fight ending.', contributors: [Zerotorescue], }, { date: new Date('2018-01-10'), changes: 'Added a note about unlisted logs to the report selector.', contributors: [Zerotorescue], }, { date: new Date('2018-01-09'), changes: <Wrapper>Updated the tooltip for <ItemLink id={ITEMS.GOLGANNETHS_VITALITY.id} icon /> to show uptime aswell as damage contribution of the two procs</Wrapper>, contributors: [Putro], }, { date: new Date('2018-01-08'), changes: 'Replaced the articles on the frontpage with a basic news system so we can more easily add and maintain articles.', contributors: [Zerotorescue], }, { date: new Date('2018-01-04'), changes: 'Fixed a bug where procs that changed an ability from a cast time ability to instant might not properly register the GCD.', contributors: [Zerotorescue], }, { date: new Date('2017-12-31'), changes: 'Changed the way Mastery percentage is calculated and implemented the coefficients for all specs. Let us know if Mastery still doesn\'t match the character pane.', contributors: [Zerotorescue], }, { date: new Date('2017-12-30'), changes: 'Added icons indicating the stat type to most item stats.', contributors: [Zerotorescue], }, { date: new Date('2017-12-27'), changes: 'Added Death Tracking to the parser.', contributors: [Sharrq], }, { date: new Date('2017-12-26'), changes: 'Mark the Warlords of Draenor cloak enchants as a part of the good enchants', contributors: [Putro], }, { date: new Date('2017-12-25'), changes: <Wrapper>Added a <i>casting time</i> bar to the spell timeline that shows you the amount of time spent channeling or waiting for the GCD.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-12-18'), changes: <Wrapper>Added <ItemLink id={ITEMS.INSIGNIA_OF_THE_GRAND_ARMY.id} /> to the parser.</Wrapper>, contributors: [Putro], }, { date: new Date('2017-12-06'), changes: <Wrapper><SpellLink id={SPELLS.EONARS_COMPASSION_HEAL.id} /> is now ignored in the cooldowns tab.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-12-06'), changes: <Wrapper>Added <ItemLink id={ITEMS.ISHKARS_FELSHIELD_EMITTER.id} /> to items </Wrapper>, contributors: [Hartra344], }, { date: new Date('2017-12-05'), changes: 'Included some NLC traits and trinkets to stat weights module.', contributors: [blazyb], }, { date: new Date('2017-12-03'), changes: <Wrapper>Improve Player Selection user interface.</Wrapper>, contributors: ['kyle-glick'], }, { date: new Date('2017-12-01'), changes: <Wrapper>Improved WCL API error handling to avoid caching corrupt responses (and show more informative errors).</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-11-29'), changes: <Wrapper>Added a <i>talents</i> panel, replacing the tab.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-11-29'), changes: <Wrapper>Added a <i>stats on pull</i> panel.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-11-28'), changes: 'Reworked the frontpage layout.', contributors: [Zerotorescue], }, { date: new Date('2017-11-11'), changes: <Wrapper>Changed the Changelog tab to mark <i>shared changes</i> as grey and provided a toggle to hide them.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-11-11'), changes: 'Added a larger call for help for specs that are marked "Not actively maintained".', contributors: [Zerotorescue], }, { date: new Date('2017-11-11'), changes: 'Added a timeline tab. Right now this only shows spell casts and their cooldowns so you can see what you cast and could have cast.', contributors: [Zerotorescue], }, { date: new Date('2017-11-08'), changes: 'Automatically try again when WCL sends a corrupt fights response.', contributors: [Zerotorescue], }, { date: new Date('2017-11-08'), changes: 'Changed the API is down and rendering errors to be more amazing.', contributors: [Zerotorescue], }, { date: new Date('2017-11-08'), changes: 'The changelog tab now includes entries in the shared changelog.', contributors: [Zerotorescue], }, { date: new Date('2017-11-08'), changes: 'Added a suggestion for healers if their mana percentage is too high at the end of an encounter.', contributors: [blazyb], }, { date: new Date('2017-11-06'), changes: 'Added a changelog tab to results page and changed the layout of changelogs.', contributors: [Zerotorescue], }, { date: new Date('2017-11-05'), changes: 'Added a spell cooldown timeline to cast efficiency suggestions.', contributors: [Zerotorescue], }, { date: new Date('2017-11-02'), changes: <Wrapper>Changed the <i>default</i> recommended <ItemLink id={ITEMS.VELENS_FUTURE_SIGHT.id} /> healing contribution to be at least 4% (down from 4.5%).</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-11-01'), changes: 'Always show the navigation bar and stick it to the top of the window.', contributors: [Zerotorescue], }, { date: new Date('2017-10-29'), changes: <Wrapper>Update layout a bit: <a href="https://imgur.com/a/edymi">comparison</a>.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-10-25'), changes: 'Added T21 healing trinkets: Tarratus Keystone and Highfather\'s Machination.', contributors: [Dyspho], }, { date: new Date('2017-10-22'), changes: 'Fixed a crash when a player\'s info errored. Instead the affected player will become unselectable.', contributors: [Zerotorescue], }, { date: new Date('2017-10-22'), changes: 'Change a bunch of less important statistics to a smaller statistic box to reduce their emphasis and reduce clutter.', contributors: [Zerotorescue], }, { date: new Date('2017-10-22'), changes: 'Fixed a bunch of crashes and improved browser support.', contributors: [Zerotorescue], }, { date: new Date('2017-10-22'), changes: 'Removed overhealing from cast efficiency.', contributors: [Zerotorescue], }, { date: new Date('2017-10-22'), changes: 'Improved layout on a small screens such as mobile devices.', contributors: [Zerotorescue], }, { date: new Date('2017-10-22'), changes: 'Changed polyfill usage to be more reliable (but slightly increase download size).', contributors: [Zerotorescue], }, { date: new Date('2017-10-21'), changes: 'Added a panel to advertize the Discord bot.', contributors: [Zerotorescue], }, { date: new Date('2017-10-20'), changes: 'Rename "Not yet supported" completion status to "Not actively maintained" so it can also be used for abandoned specs.', contributors: [Zerotorescue], }, { date: new Date('2017-10-20'), changes: 'Don\'t show a tooltip for the distance moved icon (previously showed a Mage ability).', contributors: [Zerotorescue], }, { date: new Date('2017-10-19'), changes: 'Enable Sentry to record client side errors.', contributors: [Zerotorescue], }, { date: new Date('2017-10-17'), changes: <Wrapper>Fix issue with <i>distance moved</i> that caused it to include the movement from <b>all</b> players.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-10-16'), changes: 'Added Cinidaria, the Symbiote damage and healing tracker.', contributors: [Juko8], }, { date: new Date('2017-10-15'), changes: 'Added a statistic to track total distance moved during the analyzed fight.', contributors: [Fyruna], }, { date: new Date('2017-10-14'), changes: 'Sephuz\'s Secret now displays average haste gain. Uptime still available in tooltip.', contributors: [sref], }, { date: new Date('2017-10-14'), changes: 'Added a suggestion when a legendary haven\'t been upgraded to the max item level.', contributors: [Fyruna], }, { date: new Date('2017-10-10'), changes: 'Changed the buff tracking implementation to be much more developer friendly. This should have no side-effects except to improve accuracy of modules that didn\'t take this into account in the past. If you notice something strange please let us know.', contributors: [Zerotorescue], }, { date: new Date('2017-10-02'), changes: <Wrapper>Added a <i>help wanted</i> panel to the frontpage.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-10-02'), changes: 'The developer only Events tab can now be filtered with JS expressions to be much more powerful.', contributors: [Zerotorescue], }, { date: new Date('2017-09-29'), changes: 'Added a spec analyzer info overlay for maintainers to configure.', contributors: [Zerotorescue], }, { date: new Date('2017-09-27'), changes: 'Hot Fix: Add in check to disable Netherlight Crucible statistics box if a user has no Netherlight Crucible traits active', contributors: [Anomoly], }, { date: new Date('2017-09-25'), changes: 'Added Netherlight Crucible traits contribution as a common module across specs', contributors: [Anomoly], }, { date: new Date('2017-09-25'), changes: 'The GitHub repository is now available under WoWAnalyzer/WoWAnalyzer instead of MartijnHols/WoWAnalyzer to give us all the benefits an organization provides on GitHub.', contributors: [Zerotorescue], }, { date: new Date('2017-09-25'), changes: 'Separated damage absorbed and healing absorbed in the healing done bar and made the overhealing bar gray to de-emphasize it.', contributors: [Zerotorescue], }, { date: new Date('2017-09-23'), changes: 'Changed all Damage Done / Healing Done / Damage Taken modules to use a shared renderer that can easily be improved in one spot.', contributors: [Zerotorescue], }, { date: new Date('2017-09-17'), changes: 'Fight parsing now happens in batches allowing the progress bar to function again, in addition the progress bar will slightly move while waiting on a network request to indicate it\'s doing something.', contributors: [Zerotorescue], }, { date: new Date('2017-09-16'), changes: 'Archimonde\'s Hatred Reborn now shows total damage done % and DPS contribution on it\'s tooltip.', contributors: [Mamtooth], }, { date: new Date('2017-09-12'), changes: ( <Wrapper>The Always Be Casting module has the following changes:<br /> <ul> <li>It now properly supports the passive Haste gain from Sephuz.</li> <li>Fixed an issue where the downtime between the last cast and the fight end time wasn't included (this also makes it so dying before the boss dies will affect your downtime).</li> <li>Haste buffs from items now scale with item level.</li> <li>Changed how Haste from stacking (de)buffs are applied.</li> </ul> </Wrapper> ), contributors: [Zerotorescue], }, { date: new Date('2017-09-03'), changes: 'Reworked the WCL API cache to use a database so it persists between patches, improved performance and corrupt response detection.', contributors: [Zerotorescue], }, { date: new Date('2017-09-01'), changes: 'All players in a log now appear and selecting a spec that\'s not yet supported will show information on adding support for it.', contributors: [Zerotorescue], }, { date: new Date('2017-09-01'), changes: 'Added role icons to player selection list and it\'s now sorted by role then playername to make finding players easier.', contributors: [Zerotorescue], }, { date: new Date('2017-08-28'), changes: 'Select fights for the currently selected player with a pull down menu.', contributors: [fasib], }, { date: new Date('2017-08-28'), changes: 'Select other players with a pull down menu from the currently selected player.', contributors: [fasib], }, { date: new Date('2017-08-27'), changes: 'Added a small line showing the maintainer of a spec to the results page.', contributors: [Zerotorescue], }, { date: new Date('2017-08-24'), changes: 'Better error handling when the WCL API is sending weird responses.', contributors: [Zerotorescue], }, { date: new Date('2017-08-24'), changes: 'Slightly improve layouts for both desktop and mobile.', contributors: [Zerotorescue], }, { date: new Date('2017-08-24'), changes: 'Changelogs are now seperated by a select box.', contributors: [blazyb], }, { date: new Date('2017-08-24'), changes: 'Added a mana usage graph to the mana tab for all healers.', contributors: [Zerotorescue], }, { date: new Date('2017-08-20'), changes: 'The background image will now be a screenshot of the boss currently analyzing when available.', contributors: [Zerotorescue], }, { date: new Date('2017-08-14'), changes: 'Major under the hood changes, you might see some things move around but no data should be lost or changed.', contributors: [Zerotorescue], }, { date: new Date('2017-08-09'), changes: <Wrapper>Healers with a <i>non-healing time</i> statistic will no longer have their <i>dead GCD time</i> suggestion marked as major importance.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-08-09'), changes: 'Changed suggestions tab layout to be less cluttered, specs may need additional work to be fully migrated', contributors: [Zerotorescue], }, { date: new Date('2017-08-03'), changes: 'Fix a bug that caused DRPS displays to not always work properly.', contributors: [Zerotorescue], }, { date: new Date('2017-08-02'), changes: 'When there\'s a new version available ask the user if he wants to refresh.', contributors: [Zerotorescue], }, { date: new Date('2017-08-02'), changes: 'Gnawed Thumb Ring should now show DPS values when applicable.', contributors: [Gurupitka], }, { date: new Date('2017-08-01'), changes: 'Enabled aggressive caching to the app which should allow offline usage as well as improve consecutive load times.', contributors: [Zerotorescue], }, { date: new Date('2017-07-31'), changes: 'Added Vantus Rune gain display.', contributors: [Zerotorescue], }, { date: new Date('2017-07-22'), changes: 'Shit browsers will now be told they\'re shit and redirected to a Google Chrome download page instead of just crashing.', contributors: [Zerotorescue], }, { date: new Date('2017-07-22'), changes: 'URLs will now show the fight name to make it easier to compare URLs.', contributors: [Zerotorescue], }, { date: new Date('2017-07-21'), changes: 'Changed fight selection styling and fixed back buttons.', contributors: [Zerotorescue], }, { date: new Date('2017-07-20'), changes: 'Added fight progress indicator to the fight selection page.', contributors: [Yuyz0112], }, { date: new Date('2017-07-06'), changes: <Wrapper>The <i>report code</i> input field now accepts WCL urls and entering what looks to be valid input will now automatically start loading the report.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-07-04'), changes: 'All healing specs: Added low health healing tab to give more insight into how often you\'re saving people\'s lives.', contributors: [Zerotorescue], }, { date: new Date('2017-07-01'), changes: <Wrapper>Added a few new tools for developers to use; <code>ModuleComponent</code> to more cleanly add statistic modules (see <code>DevotionAura</code> for an example), and <code>LazyLoadStatisticBox</code> for statistics that require additional API calls.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-06-24'), changes: 'Fixed an issue with some items not showing up properly', contributors: [Zerotorescue], }, { date: new Date('2017-06-23'), changes: 'Change home page layout', contributors: [Zerotorescue], }, { date: new Date('2017-06-20'), changes: 'Added prepot/second pot suggestions', contributors: [blazyb], }, { date: new Date('2017-06-18'), changes: 'Added Archive of Faith, Barbaric Mindslaver, The Deceiver\'s Grand Design and Sea Star of the Depthmother to all specs, trinket implementations by anomoly.', contributors: [Zerotorescue], }, { date: new Date('2017-06-17'), changes: 'Improved the Cooldown tab healing done display.', contributors: [Zerotorescue], }, { date: new Date('2017-06-15'), changes: 'Updated Darkmoon Deck: Promises mana reduction values to scale with item level.', contributors: [Zerotorescue], }, { date: new Date('2017-06-15'), changes: 'Generic: Tier 20 Healing Trinket Implementation', contributors: [Anomoly], }, { date: new Date('2017-06-06'), changes: 'Added refresh button to fights list.', contributors: [Zerotorescue], }, { date: new Date('2017-05-29'), changes: 'Fixed a crash when trying to parse a corrupt combatlog.', contributors: [Versaya], }, { date: new Date('2017-05-28'), changes: 'Added overhealing percentages to the Cast Efficiency tab.', contributors: [Zerotorescue], }, { date: new Date('2017-05-25'), changes: 'Added Patreon links to the specs I (Zerotorescue) maintain. Please let me know if you think this is inappropriate or makes you hesitate to contribute. Added Discord link.', contributors: [Zerotorescue], }, { date: new Date('2017-05-21'), changes: 'An informative message is now shown when trying to parse a report without combatants (usually due to not having advanced combat logging enabled).', contributors: [Zerotorescue], }, { date: new Date('2017-05-21'), changes: 'Fixed a rare crash when auto attacking something.', contributors: [Zerotorescue], }, { date: new Date('2017-05-20'), changes: 'Added Cooldowns tab to show casts and healing when affected by a cooldown. Added Amalgam\'s Seventh Spine mana gained statistic. Promises no longer includes mana reduction during Innervate.', contributors: [Zerotorescue], }, { date: new Date('2017-05-17'), changes: 'Added Sephuz\'s Secret uptime indicator.', contributors: [Zerotorescue], }, { date: new Date('2017-05-16'), changes: 'Disabled Retribution Paladin spec since it never really came out of the experimental phase.', contributors: [Zerotorescue], }, { date: new Date('2017-05-13'), changes: 'Added full multispec support! The right spec specific parser is now selected based on the spec of the selected person. Only players with supported specs will be displayed in the player selection.', contributors: [Zerotorescue], }, { date: new Date('2017-05-11'), changes: 'Fixed a bunch of bugs. The Always Be Casting/Healing module now supports debuffs which allows me to implement boss Haste buffs to make it more accurate. Elisande\'s Haste buffs are now implemented.', contributors: [Zerotorescue], }, { date: new Date('2017-05-11'), changes: <Wrapper><b>A lot</b> more changes under the hood in order to make the analyzer multi-spec compatible. Almost everything was changed, so anything might have gotten broken. Please let me know.</Wrapper>, contributors: [Zerotorescue], }, { date: new Date('2017-05-07'), changes: 'Untangled many lines - you shouldn\'t notice a difference.', contributors: [Zerotorescue], }, ];
ajax/libs/preact-compat/1.7.0/preact-compat.js
joeyparrish/cdnjs
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('proptypes'), require('preact-svg'), require('preact')) : typeof define === 'function' && define.amd ? define(['exports', 'proptypes', 'preact-svg', 'preact'], factory) : (factory((global.preactCompat = global.preactCompat || {}),global.PropTypes,global.preactSvg,global.preact)); }(this, function (exports,PropTypes,SVG,preact) { 'use strict'; PropTypes = 'default' in PropTypes ? PropTypes['default'] : PropTypes; SVG = 'default' in SVG ? SVG['default'] : SVG; var babelHelpers = {}; babelHelpers.classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; babelHelpers.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; }; }(); babelHelpers.inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }; babelHelpers.possibleConstructorReturn = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }; babelHelpers; var ELEMENTS = 'a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan'.split(' '); var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol.for && Symbol.for('react.element') || 0xeac7; var AUTOBIND_BLACKLIST = { constructor: 1, render: 1, shouldComponentUpdate: 1, componentWillRecieveProps: 1, componentWillUpdate: 1, componentDidUpdate: 1, componentWillMount: 1, componentDidMount: 1, componentWillUnmount: 1, componentDidUnmount: 1 }; var BYPASS_HOOK = {}; var DEV = typeof process !== 'undefined' && process.env && process.env.NODE_ENV !== 'production'; var EmptyComponent = function () { return null; }; var VNode = preact.h('').constructor; VNode.prototype.$$typeof = REACT_ELEMENT_TYPE; Object.defineProperty(VNode.prototype, 'type', { get: function () { return this.nodeName; }, set: function (v) { this.nodeName = v; } }); Object.defineProperty(VNode.prototype, 'props', { get: function () { return this.attributes; }, set: function (v) { this.attributes = v; } }); function render$1(vnode, parent, callback) { var prev = parent._preactCompatRendered; if (prev && prev.parentNode !== parent) prev = null; var out = preact.render(vnode, parent, prev); parent._preactCompatRendered = out; if (typeof callback === 'function') callback(); return out && out._component; } function unmountComponentAtNode(container) { var existing = container._preactCompatRendered; if (existing && existing.parentNode === container) { preact.render(preact.h(EmptyComponent), container, existing); return true; } return false; } var ARR = []; var Children = { map: function (children, fn, ctx) { children = Children.toArray(children); if (ctx && ctx !== children) fn = fn.bind(ctx); return children.map(fn); }, forEach: function (children, fn, ctx) { children = Children.toArray(children); if (ctx && ctx !== children) fn = fn.bind(ctx); children.forEach(fn); }, count: function (children) { children = Children.toArray(children); return children.length; }, only: function (children) { children = Children.toArray(children); if (children.length !== 1) throw new Error('Children.only() expects only one child.'); return children[0]; }, toArray: function (children) { return Array.isArray && Array.isArray(children) ? children : ARR.concat(children); } }; var currentComponent = void 0; function createFactory(type) { return function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return createElement.apply(undefined, [type].concat(args)); }; } var DOM = {}; for (var i = ELEMENTS.length; i--;) { DOM[ELEMENTS[i]] = createFactory(ELEMENTS[i]); } function createElement() { var vnode = preact.h.apply(undefined, arguments); if (vnode.nodeName === 'svg') { vnode.nodeName = SVG; } applyClassName(vnode); var ref = vnode.attributes && vnode.attributes.ref; if (currentComponent && ref && typeof ref === 'string') { vnode.attributes.ref = createStringRefProxy(ref, currentComponent); } return vnode; } function cloneElement(element, props) { for (var _len2 = arguments.length, children = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { children[_key2 - 2] = arguments[_key2]; } return createElement.apply(undefined, [element.nodeName || element.type, extend({}, element.attributes || element.props || {}, props)].concat(children)); } function isValidElement(element) { return element instanceof VNode || element.$$typeof === REACT_ELEMENT_TYPE; } function createStringRefProxy(name, component) { return component._refProxies[name] || (component._refProxies[name] = function (resolved) { if (component && component.refs) { component.refs[name] = resolved; if (resolved === null) { delete component._refProxies[name]; component = null; } } }); } function applyClassName(_ref) { var attributes = _ref.attributes; if (!attributes) return; var cl = attributes.className || attributes.class; if (cl) attributes.className = cl; } function extend(base) { for (var _len3 = arguments.length, objs = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { objs[_key3 - 1] = arguments[_key3]; } for (var _i = 0; _i < objs.length; _i++) { for (var key in objs[_i]) { if (objs[_i].hasOwnProperty(key)) { var v = objs[_i][key]; if (v !== null && v !== undefined) { base[key] = v; } } } } return base; } var findDOMNode = function (component) { return component.base || component; }; function F() {} function createClass(obj) { var cl = function (props, context) { extend(this, obj); Component$1.call(this, props, context, BYPASS_HOOK); bindAll(this); newComponentHook.call(this, props, context); }; if (obj.propTypes) { cl.propTypes = obj.propTypes; } if (obj.defaultProps) { cl.defaultProps = obj.defaultProps; } if (obj.getDefaultProps) { cl.defaultProps = obj.getDefaultProps(); } F.prototype = Component$1.prototype; cl.prototype = new F(); cl.prototype.constructor = cl; cl.displayName = obj.displayName || 'Component'; return cl; } function bindAll(ctx) { for (var _i2 in ctx) { var v = ctx[_i2]; if (typeof v === 'function' && !v.__bound && !AUTOBIND_BLACKLIST.hasOwnProperty(_i2)) { (ctx[_i2] = v.bind(ctx)).__bound = true; } } } function callMethod(ctx, m, args) { if (typeof m === 'string') { m = ctx.constructor.prototype[m]; } if (typeof m === 'function') { return m.apply(ctx, args); } } function multihook() { for (var _len4 = arguments.length, hooks = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { hooks[_key4] = arguments[_key4]; } return function () { var ret = void 0; for (var _len5 = arguments.length, args = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { args[_key5] = arguments[_key5]; } for (var _i3 = 0; _i3 < hooks.length; _i3++) { var r = callMethod(this, hooks[_i3], args); if (r !== undefined) ret = r; } return ret; }; } function newComponentHook(props, context) { propsHook.call(this, props, context); this.componentWillReceiveProps = multihook(this.componentWillReceiveProps || 'componentWillReceiveProps', propsHook); this.render = multihook(beforeRender, this.render || 'render', afterRender); } function propsHook(props) { if (!props) return; var c = props.children; if (c && c.length === 1) { props.children = c[0]; if (props.children && typeof props.children === 'object') { props.children.length = 1; props.children[0] = props.children; } } if (DEV) { var propTypes = this.propTypes || this.constructor.propTypes; if (propTypes) { for (var prop in propTypes) { if (propTypes.hasOwnProperty(prop) && typeof propTypes[prop] === 'function') { var err = propTypes[prop](props, prop, this.constructor.name, 'prop'); if (err) throw err; } } } } } function beforeRender() { currentComponent = this; } function afterRender() { if (currentComponent === this) { currentComponent = null; } } var Component$1 = function (_PreactComponent) { babelHelpers.inherits(Component, _PreactComponent); function Component(props, context, opts) { babelHelpers.classCallCheck(this, Component); var _this = babelHelpers.possibleConstructorReturn(this, Object.getPrototypeOf(Component).call(this, props, context)); _this.refs = {}; _this._refProxies = {}; if (opts !== BYPASS_HOOK) { newComponentHook.call(_this, props, context); } return _this; } babelHelpers.createClass(Component, [{ key: 'getDOMNode', value: function getDOMNode() { return this.base; } }, { key: 'isMounted', value: function isMounted() { return !!this.base; } }]); return Component; }(preact.Component); var index = { DOM: DOM, PropTypes: PropTypes, Children: Children, render: render$1, createClass: createClass, createFactory: createFactory, createElement: createElement, cloneElement: cloneElement, isValidElement: isValidElement, findDOMNode: findDOMNode, unmountComponentAtNode: unmountComponentAtNode, Component: Component$1 }; exports.DOM = DOM; exports.PropTypes = PropTypes; exports.Children = Children; exports.render = render$1; exports.createClass = createClass; exports.createFactory = createFactory; exports.createElement = createElement; exports.cloneElement = cloneElement; exports.isValidElement = isValidElement; exports.findDOMNode = findDOMNode; exports.unmountComponentAtNode = unmountComponentAtNode; exports.Component = Component$1; exports['default'] = index; })); //# sourceMappingURL=preact-compat.js.map
webpack.config.js
kongtiaowang/Loris
const ESLintPlugin = require('eslint-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin'); const CopyPlugin = require('copy-webpack-plugin'); const path = require('path'); const fs = require('fs'); const optimization = { minimizer: [ new TerserPlugin({ cache: true, parallel: true, terserOptions: { compress: false, ecma: 6, mangle: false, }, sourceMap: true, }), ], }; const resolve = { alias: { util: path.resolve(__dirname, './htdocs/js/util'), jsx: path.resolve(__dirname, './jsx'), jslib: path.resolve(__dirname, './jslib'), Breadcrumbs: path.resolve(__dirname, './jsx/Breadcrumbs'), DataTable: path.resolve(__dirname, './jsx/DataTable'), DynamicDataTable: path.resolve(__dirname, './jsx/DynamicDataTable'), Filter: path.resolve(__dirname, './jsx/Filter'), FilterableDataTable: path.resolve(__dirname, './jsx/FilterableDataTable'), FilterForm: path.resolve(__dirname, './jsx/FilterForm'), Form: path.resolve(__dirname, './jsx/Form'), Loader: path.resolve(__dirname, './jsx/Loader'), Markdown: path.resolve(__dirname, './jsx/Markdown'), Modal: path.resolve(__dirname, './jsx/Modal'), MultiSelectDropdown: path.resolve(__dirname, './jsx/MultiSelectDropdown'), PaginationLinks: path.resolve(__dirname, './jsx/PaginationLinks'), Panel: path.resolve(__dirname, './jsx/Panel'), ProgressBar: path.resolve(__dirname, './jsx/ProgressBar'), StaticDataTable: path.resolve(__dirname, './jsx/StaticDataTable'), Tabs: path.resolve(__dirname, './jsx/Tabs'), TriggerableModal: path.resolve(__dirname, './jsx/TriggerableModal'), Card: path.resolve(__dirname, './jsx/Card'), }, extensions: ['*', '.js', '.jsx', '.json', '.ts', '.tsx'], }; const mod = { rules: [], }; // If no compiled chunk.proto found, desactivate compilation // on the file importing it to avoid import errors // chunk.proto is only required for EEG visualization and requires protoc if (!fs.existsSync( './modules/electrophysiology_browser/jsx/react-series-data-viewer/src/' + 'protocol-buffers/chunk_pb.js') ) { mod.rules.push({ test: /react-series-data-viewer\/src\/chunks/, use: 'null-loader', }); } mod.rules.push( { test: /\.(jsx?|tsx?)$/, exclude: /node_modules/, use: [ { loader: 'babel-loader?cacheDirectory', }, ], }, { test: /\.css$/, use: [ 'style-loader', 'css-loader', ], }, { test: /\.tsx?$/, use: [ { loader: 'ts-loader', options: {onlyCompileBundledFiles: true}, }, ], }, ); /** * Creates a webpack config entry for a LORIS module named * mname. * * @param {string} mname - The LORIS module name * @param {array} entries - The webpack entry points for the module * @param {boolean} override - Is the module an override or a native LORIS module. * * @return {object} - The webpack configuration */ function lorisModule(mname, entries, override=false) { let entObj = {}; let base = './modules'; if (override) { base = './project/modules'; } for (let i = 0; i < entries.length; i++) { entObj[entries[i]] = base + '/' + mname + '/jsx/' + entries[i] + '.js'; } return { entry: entObj, output: { path: path.resolve(__dirname, base) + '/' + mname + '/js/', filename: '[name].js', library: ['lorisjs', mname, '[name]'], libraryTarget: 'window', }, externals: { 'react': 'React', 'react-dom': 'ReactDOM', }, node: { fs: 'empty', }, devtool: 'source-map', plugins: [], optimization: optimization, resolve: resolve, module: mod, mode: 'none', stats: 'errors-warnings', }; } let mode = 'production'; try { const configFile = fs.readFileSync('project/config.xml', 'latin1'); const res = /<[\s]*?sandbox[\s]*?>(.*)<\/[\s]*?sandbox[\s]*?>/ .exec(configFile); if (res && parseInt(res[1]) == 1) mode = 'development'; } catch (error) { console.error( 'Error - Can\'t read config.xml file. ' + 'Webpack mode set to production.' ); } const config = [ // Core components { mode: mode, entry: { DynamicDataTable: './jsx/DynamicDataTable.js', PaginationLinks: './jsx/PaginationLinks.js', StaticDataTable: './jsx/StaticDataTable.js', MultiSelectDropdown: './jsx/MultiSelectDropdown.js', Breadcrumbs: './jsx/Breadcrumbs.js', Form: './jsx/Form.js', Markdown: './jsx/Markdown.js', CSSGrid: './jsx/CSSGrid.js', }, output: { path: __dirname + '/htdocs/js/components/', filename: '[name].js', library: ['lorisjs', '[name]'], libraryTarget: 'window', }, externals: { 'react': 'React', 'react-dom': 'ReactDOM', }, node: { fs: 'empty', }, devtool: 'source-map', plugins: [ new ESLintPlugin({ files: [ 'modules/', 'jsx/', 'jslib/', 'htdocs/js/', 'webpack.config.js', ], cache: true, }), new CopyPlugin({ patterns: [ { from: path.resolve(__dirname, 'node_modules/react/umd'), to: path.resolve(__dirname, 'htdocs/vendor/js/react'), flatten: true, force: true, globOptions: { ignore: ['react.profiling.min.js'], }, filter: async (path) => { const file = path.split('\\').pop().split('/').pop(); const keep = [ 'react.development.js', 'react.production.min.js', ]; return keep.includes(file); }, }, { from: path.resolve(__dirname, 'node_modules/react-dom/umd'), to: path.resolve(__dirname, 'htdocs/vendor/js/react'), flatten: true, force: true, filter: async (path) => { const file = path.split('\\').pop().split('/').pop(); const keep = [ 'react-dom.development.js', 'react-dom.production.min.js', ]; return keep.includes(file); }, }, ], }), ], optimization: optimization, resolve: resolve, module: mod, stats: 'errors-warnings', }, // Modules lorisModule('media', ['CandidateMediaWidget', 'mediaIndex']), lorisModule('issue_tracker', [ 'issueTrackerIndex', 'index', 'CandidateIssuesWidget', ]), lorisModule('login', ['loginIndex']), lorisModule('publication', ['publicationIndex', 'viewProjectIndex']), lorisModule('document_repository', ['docIndex', 'editFormIndex']), lorisModule('candidate_parameters', [ 'CandidateParameters', 'ConsentWidget', ]), lorisModule('configuration', ['SubprojectRelations', 'configuration_helper']), lorisModule('conflict_resolver', ['conflict_resolver']), lorisModule('battery_manager', ['batteryManagerIndex']), lorisModule('bvl_feedback', ['react.behavioural_feedback_panel']), lorisModule('behavioural_qc', ['behaviouralQCIndex']), lorisModule('create_timepoint', ['createTimepointIndex']), lorisModule('candidate_list', [ 'openProfileForm', 'onLoad', 'candidateListIndex', ]), lorisModule('datadict', ['dataDictIndex']), lorisModule('data_release', [ 'dataReleaseIndex', ]), lorisModule('dictionary', ['dataDictIndex']), lorisModule('dqt', [ 'components/expansionpanels', 'components/searchabledropdown', 'components/stepper', 'react.app', 'react.fieldselector', 'react.filterBuilder', 'react.navigationStepper', 'react.notice', 'react.savedqueries', 'react.sidebar', 'react.tabs', ]), lorisModule('dicom_archive', ['dicom_archive']), lorisModule('genomic_browser', ['genomicBrowserIndex']), lorisModule('electrophysiology_browser', [ 'electrophysiologyBrowserIndex', 'electrophysiologySessionView', ]), lorisModule('imaging_browser', [ 'ImagePanel', 'imagingBrowserIndex', 'CandidateScanQCSummaryWidget', ]), lorisModule('instrument_builder', [ 'react.instrument_builder', 'react.questions', ]), lorisModule('instrument_manager', ['instrumentManagerIndex']), lorisModule('survey_accounts', ['surveyAccountsIndex']), lorisModule('mri_violations', [ 'mri_protocol_check_violations_columnFormatter', 'columnFormatter', 'columnFormatterUnresolved', 'mri_protocol_violations_columnFormatter', ]), lorisModule('user_accounts', ['userAccountsIndex']), lorisModule('examiner', ['examinerIndex']), lorisModule('help_editor', ['help_editor']), lorisModule('brainbrowser', ['Brainbrowser']), lorisModule('imaging_uploader', ['index']), lorisModule('acknowledgements', ['acknowledgementsIndex']), lorisModule('new_profile', ['NewProfileIndex']), lorisModule('module_manager', ['modulemanager']), lorisModule('imaging_qc', ['imagingQCIndex']), lorisModule('server_processes_manager', ['server_processes_managerIndex']), lorisModule('instruments', ['CandidateInstrumentList']), lorisModule('candidate_profile', ['CandidateInfo']), lorisModule('api_docs', ['swagger-ui_custom']), ]; // Support project overrides if (fs.existsSync('./project/webpack-project.config.js')) { const projConfig = require('./project/webpack-project.config.js'); for (const [module, files] of Object.entries(projConfig)) { config.push(lorisModule(module, files, true)); } } module.exports = config;
src/components/language-switcher/index.js
hechoendrupal/drupalconsole.com
import React from "react" import './style.css'; import { Link, useStaticQuery, graphql } from "gatsby" import Image from "../../layout/image" import _find from "lodash/find" import _isEqual from "lodash/isEqual" const LanguageSwitcher = ({ language, activePage, rtl }) => { const { allLanguagesYaml } = useStaticQuery( graphql` query { allLanguagesYaml(sort: {order: ASC, fields: id}) { edges { node { id slug name } } } } ` ) if (!activePage || !language || !allLanguagesYaml) { return (<></>) } if (activePage.charAt(activePage.length-1) !== '/') { activePage = activePage + '/' } const defaultLangaugeName = _find(allLanguagesYaml.edges, (item) => {return _isEqual(item.node.id, language)}) return ( <div className={`dropdown float-${rtl ? 'left': 'right'}`}> {defaultLangaugeName && <button className="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <Image path={`flags/${defaultLangaugeName.node.slug}.png`} className="rounded-circle w-20px" alt={defaultLangaugeName.node.slug} /> {` ${defaultLangaugeName.node.slug} (${defaultLangaugeName.node.id})`} </button> } <div className="dropdown-menu" aria-labelledby="dropdownMenu2"> {defaultLangaugeName && allLanguagesYaml.edges && allLanguagesYaml.edges.map(item => { if (!item) { return <></> } const toPage = activePage.replace(`${defaultLangaugeName.node.id}/`, `${item.node.id}/`) return ( <Link key={item.node.id} className="dropdown-item" to={`${toPage}`}> {item.node.name} ({item.node.id}) </Link> ) })} </div> </div> ) } export default LanguageSwitcher;
bin/target/work/plugins/jquery-1.11.1/web-app/js/jquery/jquery-1.11.1.js
rararawson/Grails-DMS-W-OverWrite
/*! * jQuery JavaScript Library v1.11.1 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-05-01T17:42Z */ (function( global, factory ) { if ( typeof module === "object" && typeof module.exports === "object" ) { // For CommonJS and CommonJS-like environments where a proper window is present, // execute the factory and get jQuery // For environments that do not inherently posses a window with a document // (such as Node.js), expose a jQuery-making factory as module.exports // This accentuates the need for the creation of a real window // e.g. var jQuery = require("jquery")(window); // See ticket #14549 for more info module.exports = global.document ? factory( global, true ) : function( w ) { if ( !w.document ) { throw new Error( "jQuery requires a window with a document" ); } return factory( w ); }; } else { factory( global ); } // Pass this if window is not defined yet }(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { // Can't do this because several apps including ASP.NET trace // the stack via arguments.caller.callee and Firefox dies if // you try to trace through "use strict" call chains. (#13335) // Support: Firefox 18+ // var deletedIds = []; var slice = deletedIds.slice; var concat = deletedIds.concat; var push = deletedIds.push; var indexOf = deletedIds.indexOf; var class2type = {}; var toString = class2type.toString; var hasOwn = class2type.hasOwnProperty; var support = {}; var version = "1.11.1", // Define a local copy of jQuery jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context ); }, // Support: Android<4.1, IE<9 // Make sure we trim BOM and NBSP rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, // Matches dashed string for camelizing rmsPrefix = /^-ms-/, rdashAlpha = /-([\da-z])/gi, // Used by jQuery.camelCase as callback to replace() fcamelCase = function( all, letter ) { return letter.toUpperCase(); }; jQuery.fn = jQuery.prototype = { // The current version of jQuery being used jquery: version, constructor: jQuery, // Start with an empty selector selector: "", // The default length of a jQuery object is 0 length: 0, toArray: function() { return slice.call( this ); }, // Get the Nth element in the matched element set OR // Get the whole matched element set as a clean array get: function( num ) { return num != null ? // Return just the one element from the set ( num < 0 ? this[ num + this.length ] : this[ num ] ) : // Return all the elements in a clean array slice.call( this ); }, // Take an array of elements and push it onto the stack // (returning the new matched element set) pushStack: function( elems ) { // Build a new jQuery matched element set var ret = jQuery.merge( this.constructor(), elems ); // Add the old object onto the stack (as a reference) ret.prevObject = this; ret.context = this.context; // Return the newly-formed element set return ret; }, // Execute a callback for every element in the matched set. // (You can seed the arguments with an array of args, but this is // only used internally.) each: function( callback, args ) { return jQuery.each( this, callback, args ); }, map: function( callback ) { return this.pushStack( jQuery.map(this, function( elem, i ) { return callback.call( elem, i, elem ); })); }, slice: function() { return this.pushStack( slice.apply( this, arguments ) ); }, first: function() { return this.eq( 0 ); }, last: function() { return this.eq( -1 ); }, eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); }, end: function() { return this.prevObject || this.constructor(null); }, // For internal use only. // Behaves like an Array's method, not like a jQuery method. push: push, sort: deletedIds.sort, splice: deletedIds.splice }; jQuery.extend = jQuery.fn.extend = function() { var src, copyIsArray, copy, name, options, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target === "boolean" ) { deep = target; // skip the boolean and the target target = arguments[ i ] || {}; i++; } // Handle case when target is a string or something (possible in deep copy) if ( typeof target !== "object" && !jQuery.isFunction(target) ) { target = {}; } // extend jQuery itself if only one argument is passed if ( i === length ) { target = this; i--; } for ( ; i < length; i++ ) { // Only deal with non-null/undefined values if ( (options = arguments[ i ]) != null ) { // Extend the base object for ( name in options ) { src = target[ name ]; copy = options[ name ]; // Prevent never-ending loop if ( target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { if ( copyIsArray ) { copyIsArray = false; clone = src && jQuery.isArray(src) ? src : []; } else { clone = src && jQuery.isPlainObject(src) ? src : {}; } // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); // Don't bring in undefined values } else if ( copy !== undefined ) { target[ name ] = copy; } } } } // Return the modified object return target; }; jQuery.extend({ // Unique for each copy of jQuery on the page expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), // Assume jQuery is ready without the ready module isReady: true, error: function( msg ) { throw new Error( msg ); }, noop: function() {}, // See test/unit/core.js for details concerning isFunction. // Since version 1.3, DOM methods and functions like alert // aren't supported. They return false on IE (#2968). isFunction: function( obj ) { return jQuery.type(obj) === "function"; }, isArray: Array.isArray || function( obj ) { return jQuery.type(obj) === "array"; }, isWindow: function( obj ) { /* jshint eqeqeq: false */ return obj != null && obj == obj.window; }, isNumeric: function( obj ) { // parseFloat NaNs numeric-cast false positives (null|true|false|"") // ...but misinterprets leading-number strings, particularly hex literals ("0x...") // subtraction forces infinities to NaN return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0; }, isEmptyObject: function( obj ) { var name; for ( name in obj ) { return false; } return true; }, isPlainObject: function( obj ) { var key; // Must be an Object. // Because of IE, we also have to check the presence of the constructor property. // Make sure that DOM nodes and window objects don't pass through, as well if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { return false; } try { // Not own constructor property must be Object if ( obj.constructor && !hasOwn.call(obj, "constructor") && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { return false; } } catch ( e ) { // IE8,9 Will throw exceptions on certain host objects #9897 return false; } // Support: IE<9 // Handle iteration over inherited properties before own properties. if ( support.ownLast ) { for ( key in obj ) { return hasOwn.call( obj, key ); } } // Own properties are enumerated firstly, so to speed up, // if last one is own, then all properties are own. for ( key in obj ) {} return key === undefined || hasOwn.call( obj, key ); }, type: function( obj ) { if ( obj == null ) { return obj + ""; } return typeof obj === "object" || typeof obj === "function" ? class2type[ toString.call(obj) ] || "object" : typeof obj; }, // Evaluates a script in a global context // Workarounds based on findings by Jim Driscoll // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context globalEval: function( data ) { if ( data && jQuery.trim( data ) ) { // We use execScript on Internet Explorer // We use an anonymous function so that context is window // rather than jQuery in Firefox ( window.execScript || function( data ) { window[ "eval" ].call( window, data ); } )( data ); } }, // Convert dashed to camelCase; used by the css and data modules // Microsoft forgot to hump their vendor prefix (#9572) camelCase: function( string ) { return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); }, nodeName: function( elem, name ) { return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); }, // args is for internal usage only each: function( obj, callback, args ) { var value, i = 0, length = obj.length, isArray = isArraylike( obj ); if ( args ) { if ( isArray ) { for ( ; i < length; i++ ) { value = callback.apply( obj[ i ], args ); if ( value === false ) { break; } } } else { for ( i in obj ) { value = callback.apply( obj[ i ], args ); if ( value === false ) { break; } } } // A special, fast, case for the most common use of each } else { if ( isArray ) { for ( ; i < length; i++ ) { value = callback.call( obj[ i ], i, obj[ i ] ); if ( value === false ) { break; } } } else { for ( i in obj ) { value = callback.call( obj[ i ], i, obj[ i ] ); if ( value === false ) { break; } } } } return obj; }, // Support: Android<4.1, IE<9 trim: function( text ) { return text == null ? "" : ( text + "" ).replace( rtrim, "" ); }, // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; if ( arr != null ) { if ( isArraylike( Object(arr) ) ) { jQuery.merge( ret, typeof arr === "string" ? [ arr ] : arr ); } else { push.call( ret, arr ); } } return ret; }, inArray: function( elem, arr, i ) { var len; if ( arr ) { if ( indexOf ) { return indexOf.call( arr, elem, i ); } len = arr.length; i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; for ( ; i < len; i++ ) { // Skip accessing in sparse arrays if ( i in arr && arr[ i ] === elem ) { return i; } } } return -1; }, merge: function( first, second ) { var len = +second.length, j = 0, i = first.length; while ( j < len ) { first[ i++ ] = second[ j++ ]; } // Support: IE<9 // Workaround casting of .length to NaN on otherwise arraylike objects (e.g., NodeLists) if ( len !== len ) { while ( second[j] !== undefined ) { first[ i++ ] = second[ j++ ]; } } first.length = i; return first; }, grep: function( elems, callback, invert ) { var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert; // Go through the array, only saving the items // that pass the validator function for ( ; i < length; i++ ) { callbackInverse = !callback( elems[ i ], i ); if ( callbackInverse !== callbackExpect ) { matches.push( elems[ i ] ); } } return matches; }, // arg is for internal usage only map: function( elems, callback, arg ) { var value, i = 0, length = elems.length, isArray = isArraylike( elems ), ret = []; // Go through the array, translating each of the items to their new values if ( isArray ) { for ( ; i < length; i++ ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } // Go through every key on the object, } else { for ( i in elems ) { value = callback( elems[ i ], i, arg ); if ( value != null ) { ret.push( value ); } } } // Flatten any nested arrays return concat.apply( [], ret ); }, // A global GUID counter for objects guid: 1, // Bind a function to a context, optionally partially applying any // arguments. proxy: function( fn, context ) { var args, proxy, tmp; if ( typeof context === "string" ) { tmp = fn[ context ]; context = fn; fn = tmp; } // Quick check to determine if target is callable, in the spec // this throws a TypeError, but we will just return undefined. if ( !jQuery.isFunction( fn ) ) { return undefined; } // Simulated bind args = slice.call( arguments, 2 ); proxy = function() { return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); }; // Set the guid of unique handler to the same of original handler, so it can be removed proxy.guid = fn.guid = fn.guid || jQuery.guid++; return proxy; }, now: function() { return +( new Date() ); }, // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. support: support }); // Populate the class2type map jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); }); function isArraylike( obj ) { var length = obj.length, type = jQuery.type( obj ); if ( type === "function" || jQuery.isWindow( obj ) ) { return false; } if ( obj.nodeType === 1 && length ) { return true; } return type === "array" || length === 0 || typeof length === "number" && length > 0 && ( length - 1 ) in obj; } var Sizzle = /*! * Sizzle CSS Selector Engine v1.10.19 * http://sizzlejs.com/ * * Copyright 2013 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2014-04-18 */ (function( window ) { var i, support, Expr, getText, isXML, tokenize, compile, select, outermostContext, sortInput, hasDuplicate, // Local document vars setDocument, document, docElem, documentIsHTML, rbuggyQSA, rbuggyMatches, matches, contains, // Instance-specific data expando = "sizzle" + -(new Date()), preferredDoc = window.document, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; } return 0; }, // General-purpose constants strundefined = typeof undefined, MAX_NEGATIVE = 1 << 31, // Instance methods hasOwn = ({}).hasOwnProperty, arr = [], pop = arr.pop, push_native = arr.push, push = arr.push, slice = arr.slice, // Use a stripped-down indexOf if we can't use a native one indexOf = arr.indexOf || function( elem ) { var i = 0, len = this.length; for ( ; i < len; i++ ) { if ( this[i] === elem ) { return i; } } return -1; }, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", // Regular expressions // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", // http://www.w3.org/TR/css3-syntax/#characters characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", // Loosely modeled on CSS identifier characters // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier identifier = characterEncoding.replace( "w", "w#" ), // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + characterEncoding + ")(?:\\((" + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + // 2. simple (capture 6) "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + // 3. anything else (capture 2) ".*" + ")\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), matchExpr = { "ID": new RegExp( "^#(" + characterEncoding + ")" ), "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), // For use in libraries implementing .is() // We use this for POS matching in `select` "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rnative = /^[^{]+\{\s*\[native \w/, // Easily-parseable/retrievable ID or TAG or CLASS selectors rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, rescape = /'|\\/g, // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), funescape = function( _, escaped, escapedWhitespace ) { var high = "0x" + escaped - 0x10000; // NaN means non-codepoint // Support: Firefox<24 // Workaround erroneous numeric interpretation of +"0x" return high !== high || escapedWhitespace ? escaped : high < 0 ? // BMP codepoint String.fromCharCode( high + 0x10000 ) : // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }; // Optimize for push.apply( _, NodeList ) try { push.apply( (arr = slice.call( preferredDoc.childNodes )), preferredDoc.childNodes ); // Support: Android<4.0 // Detect silently failing push.apply arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { push = { apply: arr.length ? // Leverage slice if possible function( target, els ) { push_native.apply( target, slice.call(els) ); } : // Support: IE<9 // Otherwise append directly function( target, els ) { var j = target.length, i = 0; // Can't trust NodeList.length while ( (target[j++] = els[i++]) ) {} target.length = j - 1; } }; } function Sizzle( selector, context, results, seed ) { var match, elem, m, nodeType, // QSA vars i, groups, old, nid, newContext, newSelector; if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { setDocument( context ); } context = context || document; results = results || []; if ( !selector || typeof selector !== "string" ) { return results; } if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { return []; } if ( documentIsHTML && !seed ) { // Shortcuts if ( (match = rquickExpr.exec( selector )) ) { // Speed-up: Sizzle("#ID") if ( (m = match[1]) ) { if ( nodeType === 9 ) { elem = context.getElementById( m ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document (jQuery #6963) if ( elem && elem.parentNode ) { // Handle the case where IE, Opera, and Webkit return items // by name instead of ID if ( elem.id === m ) { results.push( elem ); return results; } } else { return results; } } else { // Context is not a document if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && contains( context, elem ) && elem.id === m ) { results.push( elem ); return results; } } // Speed-up: Sizzle("TAG") } else if ( match[2] ) { push.apply( results, context.getElementsByTagName( selector ) ); return results; // Speed-up: Sizzle(".CLASS") } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); return results; } } // QSA path if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { nid = old = expando; newContext = context; newSelector = nodeType === 9 && selector; // qSA works strangely on Element-rooted queries // We can work around this by specifying an extra ID on the root // and working up from there (Thanks to Andrew Dupont for the technique) // IE 8 doesn't work on object elements if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { groups = tokenize( selector ); if ( (old = context.getAttribute("id")) ) { nid = old.replace( rescape, "\\$&" ); } else { context.setAttribute( "id", nid ); } nid = "[id='" + nid + "'] "; i = groups.length; while ( i-- ) { groups[i] = nid + toSelector( groups[i] ); } newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; newSelector = groups.join(","); } if ( newSelector ) { try { push.apply( results, newContext.querySelectorAll( newSelector ) ); return results; } catch(qsaError) { } finally { if ( !old ) { context.removeAttribute("id"); } } } } } // All others return select( selector.replace( rtrim, "$1" ), context, results, seed ); } /** * Create key-value caches of limited size * @returns {Function(string, Object)} Returns the Object data after storing it on itself with * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) * deleting the oldest entry */ function createCache() { var keys = []; function cache( key, value ) { // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key + " " ) > Expr.cacheLength ) { // Only keep the most recent entries delete cache[ keys.shift() ]; } return (cache[ key + " " ] = value); } return cache; } /** * Mark a function for special use by Sizzle * @param {Function} fn The function to mark */ function markFunction( fn ) { fn[ expando ] = true; return fn; } /** * Support testing using an element * @param {Function} fn Passed the created div and expects a boolean result */ function assert( fn ) { var div = document.createElement("div"); try { return !!fn( div ); } catch (e) { return false; } finally { // Remove from its parent by default if ( div.parentNode ) { div.parentNode.removeChild( div ); } // release memory in IE div = null; } } /** * Adds the same handler for all of the specified attrs * @param {String} attrs Pipe-separated list of attributes * @param {Function} handler The method that will be applied */ function addHandle( attrs, handler ) { var arr = attrs.split("|"), i = attrs.length; while ( i-- ) { Expr.attrHandle[ arr[i] ] = handler; } } /** * Checks document order of two siblings * @param {Element} a * @param {Element} b * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b */ function siblingCheck( a, b ) { var cur = b && a, diff = cur && a.nodeType === 1 && b.nodeType === 1 && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); // Use IE sourceIndex if available on both nodes if ( diff ) { return diff; } // Check if b follows a if ( cur ) { while ( (cur = cur.nextSibling) ) { if ( cur === b ) { return -1; } } } return a ? 1 : -1; } /** * Returns a function to use in pseudos for input types * @param {String} type */ function createInputPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === type; }; } /** * Returns a function to use in pseudos for buttons * @param {String} type */ function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); return (name === "input" || name === "button") && elem.type === type; }; } /** * Returns a function to use in pseudos for positionals * @param {Function} fn */ function createPositionalPseudo( fn ) { return markFunction(function( argument ) { argument = +argument; return markFunction(function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { if ( seed[ (j = matchIndexes[i]) ] ) { seed[j] = !(matches[j] = seed[j]); } } }); }); } /** * Checks a node for validity as a Sizzle context * @param {Element|Object=} context * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value */ function testContext( context ) { return context && typeof context.getElementsByTagName !== strundefined && context; } // Expose support vars for convenience support = Sizzle.support = {}; /** * Detects XML nodes * @param {Element|Object} elem An element or a document * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { // documentElement is verified for cases where it doesn't yet exist // (such as loading iframes in IE - #4833) var documentElement = elem && (elem.ownerDocument || elem).documentElement; return documentElement ? documentElement.nodeName !== "HTML" : false; }; /** * Sets document-related variables once based on the current document * @param {Element|Object} [doc] An element or document object to use to set the document * @returns {Object} Returns the current document */ setDocument = Sizzle.setDocument = function( node ) { var hasCompare, doc = node ? node.ownerDocument || node : preferredDoc, parent = doc.defaultView; // If no document and documentElement is available, return if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } // Set our document document = doc; docElem = doc.documentElement; // Support tests documentIsHTML = !isXML( doc ); // Support: IE>8 // If iframe document is assigned to "document" variable and if iframe has been reloaded, // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 // IE6-8 do not support the defaultView property so parent will be undefined if ( parent && parent !== parent.top ) { // IE11 does not have attachEvent, so all must suffer if ( parent.addEventListener ) { parent.addEventListener( "unload", function() { setDocument(); }, false ); } else if ( parent.attachEvent ) { parent.attachEvent( "onunload", function() { setDocument(); }); } } /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) support.attributes = assert(function( div ) { div.className = "i"; return !div.getAttribute("className"); }); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements support.getElementsByTagName = assert(function( div ) { div.appendChild( doc.createComment("") ); return !div.getElementsByTagName("*").length; }); // Check if getElementsByClassName can be trusted support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) { div.innerHTML = "<div class='a'></div><div class='a i'></div>"; // Support: Safari<4 // Catch class over-caching div.firstChild.className = "i"; // Support: Opera<10 // Catch gEBCN failure to find non-leading classes return div.getElementsByClassName("i").length === 2; }); // Support: IE<10 // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programatically-set names, // so use a roundabout getElementsByName test support.getById = assert(function( div ) { docElem.appendChild( div ).id = expando; return !doc.getElementsByName || !doc.getElementsByName( expando ).length; }); // ID find and filter if ( support.getById ) { Expr.find["ID"] = function( id, context ) { if ( typeof context.getElementById !== strundefined && documentIsHTML ) { var m = context.getElementById( id ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 return m && m.parentNode ? [ m ] : []; } }; Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { return elem.getAttribute("id") === attrId; }; }; } else { // Support: IE6/7 // getElementById is not reliable as a find shortcut delete Expr.find["ID"]; Expr.filter["ID"] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); return node && node.value === attrId; }; }; } // Tag Expr.find["TAG"] = support.getElementsByTagName ? function( tag, context ) { if ( typeof context.getElementsByTagName !== strundefined ) { return context.getElementsByTagName( tag ); } } : function( tag, context ) { var elem, tmp = [], i = 0, results = context.getElementsByTagName( tag ); // Filter out possible comments if ( tag === "*" ) { while ( (elem = results[i++]) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } } return tmp; } return results; }; // Class Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { return context.getElementsByClassName( className ); } }; /* QSA/matchesSelector ---------------------------------------------------------------------- */ // QSA and matchesSelector support // matchesSelector(:active) reports false when true (IE9/Opera 11.5) rbuggyMatches = []; // qSa(:focus) reports false when true (Chrome 21) // We allow this because of a bug in IE8/9 that throws an error // whenever `document.activeElement` is accessed on an iframe // So, we allow :focus to pass through QSA all the time to avoid the IE error // See http://bugs.jquery.com/ticket/13378 rbuggyQSA = []; if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { // Build QSA regex // Regex strategy adopted from Diego Perini assert(function( div ) { // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, // since its presence should be enough // http://bugs.jquery.com/ticket/12359 div.innerHTML = "<select msallowclip=''><option selected=''></option></select>"; // Support: IE8, Opera 11-12.16 // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section if ( div.querySelectorAll("[msallowclip^='']").length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly if ( !div.querySelectorAll("[selected]").length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":checked").length ) { rbuggyQSA.push(":checked"); } }); assert(function( div ) { // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment var input = doc.createElement("input"); input.setAttribute( "type", "hidden" ); div.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute if ( div.querySelectorAll("[name=d]").length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests if ( !div.querySelectorAll(":enabled").length ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Opera 10-11 does not throw on post-comma invalid pseudos div.querySelectorAll("*,:x"); rbuggyQSA.push(",.*:"); }); } if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || docElem.msMatchesSelector) )) ) { assert(function( div ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( div, "div" ); // This should fail with an exception // Gecko does not error, returns false instead matches.call( div, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); }); } rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); /* Contains ---------------------------------------------------------------------- */ hasCompare = rnative.test( docElem.compareDocumentPosition ); // Element contains another // Purposefully does not implement inclusive descendent // As in, an element does not contain itself contains = hasCompare || rnative.test( docElem.contains ) ? function( a, b ) { var adown = a.nodeType === 9 ? a.documentElement : a, bup = b && b.parentNode; return a === bup || !!( bup && bup.nodeType === 1 && ( adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 )); } : function( a, b ) { if ( b ) { while ( (b = b.parentNode) ) { if ( b === a ) { return true; } } } return false; }; /* Sorting ---------------------------------------------------------------------- */ // Document order sorting sortOrder = hasCompare ? function( a, b ) { // Flag for duplicate removal if ( a === b ) { hasDuplicate = true; return 0; } // Sort on method existence if only one input has compareDocumentPosition var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; if ( compare ) { return compare; } // Calculate position if both inputs belong to the same document compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? a.compareDocumentPosition( b ) : // Otherwise we know they are disconnected 1; // Disconnected nodes if ( compare & 1 || (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { // Choose the first element that is related to our preferred document if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { return -1; } if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { return 1; } // Maintain original order return sortInput ? ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : 0; } return compare & 4 ? -1 : 1; } : function( a, b ) { // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; return 0; } var cur, i = 0, aup = a.parentNode, bup = b.parentNode, ap = [ a ], bp = [ b ]; // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { return a === doc ? -1 : b === doc ? 1 : aup ? -1 : bup ? 1 : sortInput ? ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : 0; // If the nodes are siblings, we can do a quick check } else if ( aup === bup ) { return siblingCheck( a, b ); } // Otherwise we need full lists of their ancestors for comparison cur = a; while ( (cur = cur.parentNode) ) { ap.unshift( cur ); } cur = b; while ( (cur = cur.parentNode) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy while ( ap[i] === bp[i] ) { i++; } return i ? // Do a sibling check if the nodes have a common ancestor siblingCheck( ap[i], bp[i] ) : // Otherwise nodes in our document sort first ap[i] === preferredDoc ? -1 : bp[i] === preferredDoc ? 1 : 0; }; return doc; }; Sizzle.matches = function( expr, elements ) { return Sizzle( expr, null, null, elements ); }; Sizzle.matchesSelector = function( elem, expr ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } // Make sure that attribute selectors are quoted expr = expr.replace( rattributeQuotes, "='$1']" ); if ( support.matchesSelector && documentIsHTML && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { try { var ret = matches.call( elem, expr ); // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document // fragment in IE 9 elem.document && elem.document.nodeType !== 11 ) { return ret; } } catch(e) {} } return Sizzle( expr, document, null, [ elem ] ).length > 0; }; Sizzle.contains = function( context, elem ) { // Set document vars if needed if ( ( context.ownerDocument || context ) !== document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { // Set document vars if needed if ( ( elem.ownerDocument || elem ) !== document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : undefined; return val !== undefined ? val : support.attributes || !documentIsHTML ? elem.getAttribute( name ) : (val = elem.getAttributeNode(name)) && val.specified ? val.value : null; }; Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; /** * Document sorting and removing duplicates * @param {ArrayLike} results */ Sizzle.uniqueSort = function( results ) { var elem, duplicates = [], j = 0, i = 0; // Unless we *know* we can detect duplicates, assume their presence hasDuplicate = !support.detectDuplicates; sortInput = !support.sortStable && results.slice( 0 ); results.sort( sortOrder ); if ( hasDuplicate ) { while ( (elem = results[i++]) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } } while ( j-- ) { results.splice( duplicates[ j ], 1 ); } } // Clear input after sorting to release objects // See https://github.com/jquery/sizzle/pull/225 sortInput = null; return results; }; /** * Utility function for retrieving the text value of an array of DOM nodes * @param {Array|Element} elem */ getText = Sizzle.getText = function( elem ) { var node, ret = "", i = 0, nodeType = elem.nodeType; if ( !nodeType ) { // If no nodeType, this is expected to be an array while ( (node = elem[i++]) ) { // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); } } } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } // Do not include comment or processing instruction nodes return ret; }; Expr = Sizzle.selectors = { // Can be adjusted by the user cacheLength: 50, createPseudo: markFunction, match: matchExpr, attrHandle: {}, find: {}, relative: { ">": { dir: "parentNode", first: true }, " ": { dir: "parentNode" }, "+": { dir: "previousSibling", first: true }, "~": { dir: "previousSibling" } }, preFilter: { "ATTR": function( match ) { match[1] = match[1].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); if ( match[2] === "~=" ) { match[3] = " " + match[3] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 4 xn-component of xn+y argument ([+-]?\d*n|) 5 sign of xn-component 6 x of xn-component 7 sign of y-component 8 y of y-component */ match[1] = match[1].toLowerCase(); if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument if ( !match[3] ) { Sizzle.error( match[0] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); // other types prohibit arguments } else if ( match[3] ) { Sizzle.error( match[0] ); } return match; }, "PSEUDO": function( match ) { var excess, unquoted = !match[6] && match[2]; if ( matchExpr["CHILD"].test( match[0] ) ) { return null; } // Accept quoted arguments as-is if ( match[3] ) { match[2] = match[4] || match[5] || ""; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && // Get excess from tokenize (recursively) (excess = tokenize( unquoted, true )) && // advance to the next closing parenthesis (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { // excess is a negative index match[0] = match[0].slice( 0, excess ); match[2] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) return match.slice( 0, 3 ); } }, filter: { "TAG": function( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? function() { return true; } : function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; }, "CLASS": function( className ) { var pattern = classCache[ className + " " ]; return pattern || (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && classCache( className, function( elem ) { return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); }); }, "ATTR": function( name, operator, check ) { return function( elem ) { var result = Sizzle.attr( elem, name ); if ( result == null ) { return operator === "!="; } if ( !operator ) { return true; } result += ""; return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : operator === "*=" ? check && result.indexOf( check ) > -1 : operator === "$=" ? check && result.slice( -check.length ) === check : operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; }; }, "CHILD": function( type, what, argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; return first === 1 && last === 0 ? // Shortcut for :nth-*(n) function( elem ) { return !!elem.parentNode; } : function( elem, context, xml ) { var cache, outerCache, node, diff, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType; if ( parent ) { // :(first|last|only)-(child|of-type) if ( simple ) { while ( dir ) { node = elem; while ( (node = node[ dir ]) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { return false; } } // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } return true; } start = [ forward ? parent.firstChild : parent.lastChild ]; // non-xml :nth-child(...) stores cache data on `parent` if ( forward && useCache ) { // Seek `elem` from a previously-cached index outerCache = parent[ expando ] || (parent[ expando ] = {}); cache = outerCache[ type ] || []; nodeIndex = cache[0] === dirruns && cache[1]; diff = cache[0] === dirruns && cache[2]; node = nodeIndex && parent.childNodes[ nodeIndex ]; while ( (node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start (diff = nodeIndex = 0) || start.pop()) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { outerCache[ type ] = [ dirruns, nodeIndex, diff ]; break; } } // Use previously-cached element index if available } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { diff = cache[1]; // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) } else { // Use the same loop as above to seek `elem` from the start while ( (node = ++nodeIndex && node && node[ dir ] || (diff = nodeIndex = 0) || start.pop()) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { // Cache the index of each encountered element if ( useCache ) { (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; } if ( node === elem ) { break; } } } } // Incorporate the offset, then check against cycle size diff -= last; return diff === first || ( diff % first === 0 && diff / first >= 0 ); } }; }, "PSEUDO": function( pseudo, argument ) { // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters // Remember that setFilters inherits from pseudos var args, fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || Sizzle.error( "unsupported pseudo: " + pseudo ); // The user may use createPseudo to indicate that // arguments are needed to create the filter function // just as Sizzle does if ( fn[ expando ] ) { return fn( argument ); } // But maintain support for old signatures if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? markFunction(function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { idx = indexOf.call( seed, matched[i] ); seed[ idx ] = !( matches[ idx ] = matched[i] ); } }) : function( elem ) { return fn( elem, 0, args ); }; } return fn; } }, pseudos: { // Potentially complex pseudos "not": markFunction(function( selector ) { // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators var input = [], results = [], matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? markFunction(function( seed, matches, context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { if ( (elem = unmatched[i]) ) { seed[i] = !(matches[i] = elem); } } }) : function( elem, context, xml ) { input[0] = elem; matcher( input, null, xml, results ); return !results.pop(); }; }), "has": markFunction(function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; }), "contains": markFunction(function( text ) { return function( elem ) { return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; }; }), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value // being equal to the identifier C, // or beginning with the identifier C immediately followed by "-". // The matching of C against the element's language value is performed case-insensitively. // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { // lang value must be a valid identifier if ( !ridentifier.test(lang || "") ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { if ( (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); return false; }; }), // Miscellaneous "target": function( elem ) { var hash = window.location && window.location.hash; return hash && hash.slice( 1 ) === elem.id; }, "root": function( elem ) { return elem === docElem; }, "focus": function( elem ) { return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); }, // Boolean properties "enabled": function( elem ) { return elem.disabled === false; }, "disabled": function( elem ) { return elem.disabled === true; }, "checked": function( elem ) { // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); }, "selected": function( elem ) { // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { elem.parentNode.selectedIndex; } return elem.selected === true; }, // Contents "empty": function( elem ) { // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) // nodeType < 6 works because attributes (2) do not appear as children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { if ( elem.nodeType < 6 ) { return false; } } return true; }, "parent": function( elem ) { return !Expr.pseudos["empty"]( elem ); }, // Element/input types "header": function( elem ) { return rheader.test( elem.nodeName ); }, "input": function( elem ) { return rinputs.test( elem.nodeName ); }, "button": function( elem ) { var name = elem.nodeName.toLowerCase(); return name === "input" && elem.type === "button" || name === "button"; }, "text": function( elem ) { var attr; return elem.nodeName.toLowerCase() === "input" && elem.type === "text" && // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); }, // Position-in-collection "first": createPositionalPseudo(function() { return [ 0 ]; }), "last": createPositionalPseudo(function( matchIndexes, length ) { return [ length - 1 ]; }), "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; }), "even": createPositionalPseudo(function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "odd": createPositionalPseudo(function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } return matchIndexes; }), "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; }) } }; Expr.pseudos["nth"] = Expr.pseudos["eq"]; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { Expr.pseudos[ i ] = createInputPseudo( i ); } for ( i in { submit: true, reset: true } ) { Expr.pseudos[ i ] = createButtonPseudo( i ); } // Easy API for creating new setFilters function setFilters() {} setFilters.prototype = Expr.filters = Expr.pseudos; Expr.setFilters = new setFilters(); tokenize = Sizzle.tokenize = function( selector, parseOnly ) { var matched, match, tokens, type, soFar, groups, preFilters, cached = tokenCache[ selector + " " ]; if ( cached ) { return parseOnly ? 0 : cached.slice( 0 ); } soFar = selector; groups = []; preFilters = Expr.preFilter; while ( soFar ) { // Comma and first run if ( !matched || (match = rcomma.exec( soFar )) ) { if ( match ) { // Don't consume trailing commas as valid soFar = soFar.slice( match[0].length ) || soFar; } groups.push( (tokens = []) ); } matched = false; // Combinators if ( (match = rcombinators.exec( soFar )) ) { matched = match.shift(); tokens.push({ value: matched, // Cast descendant combinators to space type: match[0].replace( rtrim, " " ) }); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || (match = preFilters[ type ]( match ))) ) { matched = match.shift(); tokens.push({ value: matched, type: type, matches: match }); soFar = soFar.slice( matched.length ); } } if ( !matched ) { break; } } // Return the length of the invalid excess // if we're just parsing // Otherwise, throw an error or return tokens return parseOnly ? soFar.length : soFar ? Sizzle.error( selector ) : // Cache the tokens tokenCache( selector, groups ).slice( 0 ); }; function toSelector( tokens ) { var i = 0, len = tokens.length, selector = ""; for ( ; i < len; i++ ) { selector += tokens[i].value; } return selector; } function addCombinator( matcher, combinator, base ) { var dir = combinator.dir, checkNonElements = base && dir === "parentNode", doneName = done++; return combinator.first ? // Check against closest ancestor/preceding element function( elem, context, xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } } } : // Check against all ancestor/preceding elements function( elem, context, xml ) { var oldCache, outerCache, newCache = [ dirruns, doneName ]; // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching if ( xml ) { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; } } } } else { while ( (elem = elem[ dir ]) ) { if ( elem.nodeType === 1 || checkNonElements ) { outerCache = elem[ expando ] || (elem[ expando ] = {}); if ( (oldCache = outerCache[ dir ]) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements return (newCache[ 2 ] = oldCache[ 2 ]); } else { // Reuse newcache so results back-propagate to previous elements outerCache[ dir ] = newCache; // A match means we're done; a fail means we have to keep checking if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { return true; } } } } } }; } function elementMatcher( matchers ) { return matchers.length > 1 ? function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { if ( !matchers[i]( elem, context, xml ) ) { return false; } } return true; } : matchers[0]; } function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { Sizzle( selector, contexts[i], results ); } return results; } function condense( unmatched, map, filter, context, xml ) { var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = map != null; for ( ; i < len; i++ ) { if ( (elem = unmatched[i]) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { map.push( i ); } } } } return newUnmatched; } function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { if ( postFilter && !postFilter[ expando ] ) { postFilter = setMatcher( postFilter ); } if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } return markFunction(function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? condense( elems, preMap, preFilter, context, xml ) : elems, matcherOut = matcher ? // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? // ...intermediate processing is necessary [] : // ...otherwise use results directly results : matcherIn; // Find primary matches if ( matcher ) { matcher( matcherIn, matcherOut, context, xml ); } // Apply postFilter if ( postFilter ) { temp = condense( matcherOut, postMap ); postFilter( temp, [], context, xml ); // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { if ( (elem = temp[i]) ) { matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); } } } if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) ) { // Restore matcherIn since elem is not yet a final match temp.push( (matcherIn[i] = elem) ); } } postFinder( null, (matcherOut = []), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { if ( (elem = matcherOut[i]) && (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { seed[temp] = !(results[temp] = elem); } } } // Add elements to results, through postFinder if defined } else { matcherOut = condense( matcherOut === results ? matcherOut.splice( preexisting, matcherOut.length ) : matcherOut ); if ( postFinder ) { postFinder( null, results, matcherOut, xml ); } else { push.apply( results, matcherOut ); } } }); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[ tokens[0].type ], implicitRelative = leadingRelative || Expr.relative[" "], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) matchContext = addCombinator( function( elem ) { return elem === checkContext; }, implicitRelative, true ), matchAnyContext = addCombinator( function( elem ) { return indexOf.call( checkContext, elem ) > -1; }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( (checkContext = context).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); } ]; for ( ; i < len; i++ ) { if ( (matcher = Expr.relative[ tokens[i].type ]) ) { matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; } else { matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { if ( Expr.relative[ tokens[j].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( // If the preceding token was a descendant combinator, insert an implicit any-element `*` tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), j < len && toSelector( tokens ) ); } matchers.push( matcher ); } } return elementMatcher( matchers ); } function matcherFromGroupMatchers( elementMatchers, setMatchers ) { var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function( seed, context, xml, results, outermost ) { var elem, j, matcher, matchedCount = 0, i = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, // We must always have either seed elements or outermost context elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), // Use integer dirruns iff this is the outermost matcher dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), len = elems.length; if ( outermost ) { outermostContext = context !== document && context; } // Add elements passing elementMatchers directly to results // Keep `i` a string if there are no elements so `matchedCount` will be "00" below // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id for ( ; i !== len && (elem = elems[i]) != null; i++ ) { if ( byElement && elem ) { j = 0; while ( (matcher = elementMatchers[j++]) ) { if ( matcher( elem, context, xml ) ) { results.push( elem ); break; } } if ( outermost ) { dirruns = dirrunsUnique; } } // Track unmatched elements for set filters if ( bySet ) { // They will have gone through all possible matchers if ( (elem = !matcher && elem) ) { matchedCount--; } // Lengthen the array for every element, matched or not if ( seed ) { unmatched.push( elem ); } } } // Apply set filters to unmatched elements matchedCount += i; if ( bySet && i !== matchedCount ) { j = 0; while ( (matcher = setMatchers[j++]) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { if ( !(unmatched[i] || setMatched[i]) ) { setMatched[i] = pop.call( results ); } } } // Discard index placeholder values to get only actual matches setMatched = condense( setMatched ); } // Add matches to results push.apply( results, setMatched ); // Seedless set matches succeeding multiple successful matchers stipulate sorting if ( outermost && !seed && setMatched.length > 0 && ( matchedCount + setMatchers.length ) > 1 ) { Sizzle.uniqueSort( results ); } } // Override manipulation of globals by nested matchers if ( outermost ) { dirruns = dirrunsUnique; outermostContext = contextBackup; } return unmatched; }; return bySet ? markFunction( superMatcher ) : superMatcher; } compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { var i, setMatchers = [], elementMatchers = [], cached = compilerCache[ selector + " " ]; if ( !cached ) { // Generate a function of recursive functions that can be used to check each element if ( !match ) { match = tokenize( selector ); } i = match.length; while ( i-- ) { cached = matcherFromTokens( match[i] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { elementMatchers.push( cached ); } } // Cache the compiled function cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); // Save selector and tokenization cached.selector = selector; } return cached; }; /** * A low-level selection function that works with Sizzle's compiled * selector functions * @param {String|Function} selector A selector or a pre-compiled * selector function built with Sizzle.compile * @param {Element} context * @param {Array} [results] * @param {Array} [seed] A set of elements to match against */ select = Sizzle.select = function( selector, context, results, seed ) { var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, match = !seed && tokenize( (selector = compiled.selector || selector) ); results = results || []; // Try to minimize operations if there is no seed and only one group if ( match.length === 1 ) { // Take a shortcut and set the context if the root selector is an ID tokens = match[0] = match[0].slice( 0 ); if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && support.getById && context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; if ( !context ) { return results; // Precompiled matchers will still verify ancestry, so step up a level } else if ( compiled ) { context = context.parentNode; } selector = selector.slice( tokens.shift().value.length ); } // Fetch a seed set for right-to-left matching i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; while ( i-- ) { token = tokens[i]; // Abort if we hit a combinator if ( Expr.relative[ (type = token.type) ] ) { break; } if ( (find = Expr.find[ type ]) ) { // Search, expanding context for leading sibling combinators if ( (seed = find( token.matches[0].replace( runescape, funescape ), rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context )) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); selector = seed.length && toSelector( tokens ); if ( !selector ) { push.apply( results, seed ); return results; } break; } } } } // Compile and execute a filtering function if one is not provided // Provide `match` to avoid retokenization if we modified the selector above ( compiled || compile( selector, match ) )( seed, context, !documentIsHTML, results, rsibling.test( selector ) && testContext( context.parentNode ) || context ); return results; }; // One-time assignments // Sort stability support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; // Support: Chrome<14 // Always assume duplicates if they aren't passed to the comparison function support.detectDuplicates = !!hasDuplicate; // Initialize against the default document setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* support.sortDetached = assert(function( div1 ) { // Should return 1, but returns 4 (following) return div1.compareDocumentPosition( document.createElement("div") ) & 1; }); // Support: IE<8 // Prevent attribute/property "interpolation" // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !assert(function( div ) { div.innerHTML = "<a href='#'></a>"; return div.firstChild.getAttribute("href") === "#" ; }) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } }); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") if ( !support.attributes || !assert(function( div ) { div.innerHTML = "<input/>"; div.firstChild.setAttribute( "value", "" ); return div.firstChild.getAttribute( "value" ) === ""; }) ) { addHandle( "value", function( elem, name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } }); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies if ( !assert(function( div ) { return div.getAttribute("disabled") == null; }) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return elem[ name ] === true ? name.toLowerCase() : (val = elem.getAttributeNode( name )) && val.specified ? val.value : null; } }); } return Sizzle; })( window ); jQuery.find = Sizzle; jQuery.expr = Sizzle.selectors; jQuery.expr[":"] = jQuery.expr.pseudos; jQuery.unique = Sizzle.uniqueSort; jQuery.text = Sizzle.getText; jQuery.isXMLDoc = Sizzle.isXML; jQuery.contains = Sizzle.contains; var rneedsContext = jQuery.expr.match.needsContext; var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); var risSimple = /^.[^:#\[\.,]*$/; // Implement the identical functionality for filter and not function winnow( elements, qualifier, not ) { if ( jQuery.isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { /* jshint -W018 */ return !!qualifier.call( elem, i, elem ) !== not; }); } if ( qualifier.nodeType ) { return jQuery.grep( elements, function( elem ) { return ( elem === qualifier ) !== not; }); } if ( typeof qualifier === "string" ) { if ( risSimple.test( qualifier ) ) { return jQuery.filter( qualifier, elements, not ); } qualifier = jQuery.filter( qualifier, elements ); } return jQuery.grep( elements, function( elem ) { return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; }); } jQuery.filter = function( expr, elems, not ) { var elem = elems[ 0 ]; if ( not ) { expr = ":not(" + expr + ")"; } return elems.length === 1 && elem.nodeType === 1 ? jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { return elem.nodeType === 1; })); }; jQuery.fn.extend({ find: function( selector ) { var i, ret = [], self = this, len = self.length; if ( typeof selector !== "string" ) { return this.pushStack( jQuery( selector ).filter(function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( self[ i ], this ) ) { return true; } } }) ); } for ( i = 0; i < len; i++ ) { jQuery.find( selector, self[ i ], ret ); } // Needed because $( selector, context ) becomes $( context ).find( selector ) ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); ret.selector = this.selector ? this.selector + " " + selector : selector; return ret; }, filter: function( selector ) { return this.pushStack( winnow(this, selector || [], false) ); }, not: function( selector ) { return this.pushStack( winnow(this, selector || [], true) ); }, is: function( selector ) { return !!winnow( this, // If this is a positional/relative selector, check membership in the returned set // so $("p:first").is("p:last") won't return true for a doc with two "p". typeof selector === "string" && rneedsContext.test( selector ) ? jQuery( selector ) : selector || [], false ).length; } }); // Initialize a jQuery object // A central reference to the root jQuery(document) var rootjQuery, // Use the correct document accordingly with window argument (sandbox) document = window.document, // A simple way to check for HTML strings // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) // Strict HTML recognition (#11290: must start with <) rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, init = jQuery.fn.init = function( selector, context ) { var match, elem; // HANDLE: $(""), $(null), $(undefined), $(false) if ( !selector ) { return this; } // Handle HTML strings if ( typeof selector === "string" ) { if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { // Assume that strings that start and end with <> are HTML and skip the regex check match = [ null, selector, null ]; } else { match = rquickExpr.exec( selector ); } // Match html or make sure no context is specified for #id if ( match && (match[1] || !context) ) { // HANDLE: $(html) -> $(array) if ( match[1] ) { context = context instanceof jQuery ? context[0] : context; // scripts is true for back-compat // Intentionally let the error be thrown if parseHTML is not present jQuery.merge( this, jQuery.parseHTML( match[1], context && context.nodeType ? context.ownerDocument || context : document, true ) ); // HANDLE: $(html, props) if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { for ( match in context ) { // Properties of context are called as methods if possible if ( jQuery.isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes } else { this.attr( match, context[ match ] ); } } } return this; // HANDLE: $(#id) } else { elem = document.getElementById( match[2] ); // Check parentNode to catch when Blackberry 4.6 returns // nodes that are no longer in the document #6963 if ( elem && elem.parentNode ) { // Handle the case where IE and Opera return items // by name instead of ID if ( elem.id !== match[2] ) { return rootjQuery.find( selector ); } // Otherwise, we inject the element directly into the jQuery object this.length = 1; this[0] = elem; } this.context = document; this.selector = selector; return this; } // HANDLE: $(expr, $(...)) } else if ( !context || context.jquery ) { return ( context || rootjQuery ).find( selector ); // HANDLE: $(expr, context) // (which is just equivalent to: $(context).find(expr) } else { return this.constructor( context ).find( selector ); } // HANDLE: $(DOMElement) } else if ( selector.nodeType ) { this.context = this[0] = selector; this.length = 1; return this; // HANDLE: $(function) // Shortcut for document ready } else if ( jQuery.isFunction( selector ) ) { return typeof rootjQuery.ready !== "undefined" ? rootjQuery.ready( selector ) : // Execute immediately if ready is not present selector( jQuery ); } if ( selector.selector !== undefined ) { this.selector = selector.selector; this.context = selector.context; } return jQuery.makeArray( selector, this ); }; // Give the init function the jQuery prototype for later instantiation init.prototype = jQuery.fn; // Initialize central reference rootjQuery = jQuery( document ); var rparentsprev = /^(?:parents|prev(?:Until|All))/, // methods guaranteed to produce a unique set when starting from a unique set guaranteedUnique = { children: true, contents: true, next: true, prev: true }; jQuery.extend({ dir: function( elem, dir, until ) { var matched = [], cur = elem[ dir ]; while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { if ( cur.nodeType === 1 ) { matched.push( cur ); } cur = cur[dir]; } return matched; }, sibling: function( n, elem ) { var r = []; for ( ; n; n = n.nextSibling ) { if ( n.nodeType === 1 && n !== elem ) { r.push( n ); } } return r; } }); jQuery.fn.extend({ has: function( target ) { var i, targets = jQuery( target, this ), len = targets.length; return this.filter(function() { for ( i = 0; i < len; i++ ) { if ( jQuery.contains( this, targets[i] ) ) { return true; } } }); }, closest: function( selectors, context ) { var cur, i = 0, l = this.length, matched = [], pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? jQuery( selectors, context || this.context ) : 0; for ( ; i < l; i++ ) { for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { // Always skip document fragments if ( cur.nodeType < 11 && (pos ? pos.index(cur) > -1 : // Don't pass non-elements to Sizzle cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors)) ) { matched.push( cur ); break; } } } return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); }, // Determine the position of an element within // the matched set of elements index: function( elem ) { // No argument, return index in parent if ( !elem ) { return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; } // index in selector if ( typeof elem === "string" ) { return jQuery.inArray( this[0], jQuery( elem ) ); } // Locate the position of the desired element return jQuery.inArray( // If it receives a jQuery object, the first element is used elem.jquery ? elem[0] : elem, this ); }, add: function( selector, context ) { return this.pushStack( jQuery.unique( jQuery.merge( this.get(), jQuery( selector, context ) ) ) ); }, addBack: function( selector ) { return this.add( selector == null ? this.prevObject : this.prevObject.filter(selector) ); } }); function sibling( cur, dir ) { do { cur = cur[ dir ]; } while ( cur && cur.nodeType !== 1 ); return cur; } jQuery.each({ parent: function( elem ) { var parent = elem.parentNode; return parent && parent.nodeType !== 11 ? parent : null; }, parents: function( elem ) { return jQuery.dir( elem, "parentNode" ); }, parentsUntil: function( elem, i, until ) { return jQuery.dir( elem, "parentNode", until ); }, next: function( elem ) { return sibling( elem, "nextSibling" ); }, prev: function( elem ) { return sibling( elem, "previousSibling" ); }, nextAll: function( elem ) { return jQuery.dir( elem, "nextSibling" ); }, prevAll: function( elem ) { return jQuery.dir( elem, "previousSibling" ); }, nextUntil: function( elem, i, until ) { return jQuery.dir( elem, "nextSibling", until ); }, prevUntil: function( elem, i, until ) { return jQuery.dir( elem, "previousSibling", until ); }, siblings: function( elem ) { return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); }, children: function( elem ) { return jQuery.sibling( elem.firstChild ); }, contents: function( elem ) { return jQuery.nodeName( elem, "iframe" ) ? elem.contentDocument || elem.contentWindow.document : jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { var ret = jQuery.map( this, fn, until ); if ( name.slice( -5 ) !== "Until" ) { selector = until; } if ( selector && typeof selector === "string" ) { ret = jQuery.filter( selector, ret ); } if ( this.length > 1 ) { // Remove duplicates if ( !guaranteedUnique[ name ] ) { ret = jQuery.unique( ret ); } // Reverse order for parents* and prev-derivatives if ( rparentsprev.test( name ) ) { ret = ret.reverse(); } } return this.pushStack( ret ); }; }); var rnotwhite = (/\S+/g); // String to Object options format cache var optionsCache = {}; // Convert String-formatted options into Object-formatted ones and store in cache function createOptions( options ) { var object = optionsCache[ options ] = {}; jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { object[ flag ] = true; }); return object; } /* * Create a callback list using the following parameters: * * options: an optional list of space-separated options that will change how * the callback list behaves or a more traditional option object * * By default a callback list will act like an event callback list and can be * "fired" multiple times. * * Possible options: * * once: will ensure the callback list can only be fired once (like a Deferred) * * memory: will keep track of previous values and will call any callback added * after the list has been fired right away with the latest "memorized" * values (like a Deferred) * * unique: will ensure a callback can only be added once (no duplicate in the list) * * stopOnFalse: interrupt callings when a callback returns false * */ jQuery.Callbacks = function( options ) { // Convert options from String-formatted to Object-formatted if needed // (we check in cache first) options = typeof options === "string" ? ( optionsCache[ options ] || createOptions( options ) ) : jQuery.extend( {}, options ); var // Flag to know if list is currently firing firing, // Last fire value (for non-forgettable lists) memory, // Flag to know if list was already fired fired, // End of the loop when firing firingLength, // Index of currently firing callback (modified by remove if needed) firingIndex, // First callback to fire (used internally by add and fireWith) firingStart, // Actual callback list list = [], // Stack of fire calls for repeatable lists stack = !options.once && [], // Fire callbacks fire = function( data ) { memory = options.memory && data; fired = true; firingIndex = firingStart || 0; firingStart = 0; firingLength = list.length; firing = true; for ( ; list && firingIndex < firingLength; firingIndex++ ) { if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { memory = false; // To prevent further calls using add break; } } firing = false; if ( list ) { if ( stack ) { if ( stack.length ) { fire( stack.shift() ); } } else if ( memory ) { list = []; } else { self.disable(); } } }, // Actual Callbacks object self = { // Add a callback or a collection of callbacks to the list add: function() { if ( list ) { // First, we save the current length var start = list.length; (function add( args ) { jQuery.each( args, function( _, arg ) { var type = jQuery.type( arg ); if ( type === "function" ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } } else if ( arg && arg.length && type !== "string" ) { // Inspect recursively add( arg ); } }); })( arguments ); // Do we need to add the callbacks to the // current firing batch? if ( firing ) { firingLength = list.length; // With memory, if we're not firing then // we should call right away } else if ( memory ) { firingStart = start; fire( memory ); } } return this; }, // Remove a callback from the list remove: function() { if ( list ) { jQuery.each( arguments, function( _, arg ) { var index; while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { list.splice( index, 1 ); // Handle firing indexes if ( firing ) { if ( index <= firingLength ) { firingLength--; } if ( index <= firingIndex ) { firingIndex--; } } } }); } return this; }, // Check if a given callback is in the list. // If no argument is given, return whether or not list has callbacks attached. has: function( fn ) { return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); }, // Remove all callbacks from the list empty: function() { list = []; firingLength = 0; return this; }, // Have the list do nothing anymore disable: function() { list = stack = memory = undefined; return this; }, // Is it disabled? disabled: function() { return !list; }, // Lock the list in its current state lock: function() { stack = undefined; if ( !memory ) { self.disable(); } return this; }, // Is it locked? locked: function() { return !stack; }, // Call all callbacks with the given context and arguments fireWith: function( context, args ) { if ( list && ( !fired || stack ) ) { args = args || []; args = [ context, args.slice ? args.slice() : args ]; if ( firing ) { stack.push( args ); } else { fire( args ); } } return this; }, // Call all the callbacks with the given arguments fire: function() { self.fireWith( this, arguments ); return this; }, // To know if the callbacks have already been called at least once fired: function() { return !!fired; } }; return self; }; jQuery.extend({ Deferred: function( func ) { var tuples = [ // action, add listener, listener list, final state [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], [ "notify", "progress", jQuery.Callbacks("memory") ] ], state = "pending", promise = { state: function() { return state; }, always: function() { deferred.done( arguments ).fail( arguments ); return this; }, then: function( /* fnDone, fnFail, fnProgress */ ) { var fns = arguments; return jQuery.Deferred(function( newDefer ) { jQuery.each( tuples, function( i, tuple ) { var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; // deferred[ done | fail | progress ] for forwarding actions to newDefer deferred[ tuple[1] ](function() { var returned = fn && fn.apply( this, arguments ); if ( returned && jQuery.isFunction( returned.promise ) ) { returned.promise() .done( newDefer.resolve ) .fail( newDefer.reject ) .progress( newDefer.notify ); } else { newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); } }); }); fns = null; }).promise(); }, // Get a promise for this deferred // If obj is provided, the promise aspect is added to the object promise: function( obj ) { return obj != null ? jQuery.extend( obj, promise ) : promise; } }, deferred = {}; // Keep pipe for back-compat promise.pipe = promise.then; // Add list-specific methods jQuery.each( tuples, function( i, tuple ) { var list = tuple[ 2 ], stateString = tuple[ 3 ]; // promise[ done | fail | progress ] = list.add promise[ tuple[1] ] = list.add; // Handle state if ( stateString ) { list.add(function() { // state = [ resolved | rejected ] state = stateString; // [ reject_list | resolve_list ].disable; progress_list.lock }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); } // deferred[ resolve | reject | notify ] deferred[ tuple[0] ] = function() { deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); return this; }; deferred[ tuple[0] + "With" ] = list.fireWith; }); // Make the deferred a promise promise.promise( deferred ); // Call given func if any if ( func ) { func.call( deferred, deferred ); } // All done! return deferred; }, // Deferred helper when: function( subordinate /* , ..., subordinateN */ ) { var i = 0, resolveValues = slice.call( arguments ), length = resolveValues.length, // the count of uncompleted subordinates remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, // the master Deferred. If resolveValues consist of only a single Deferred, just use that. deferred = remaining === 1 ? subordinate : jQuery.Deferred(), // Update function for both resolve and progress values updateFunc = function( i, contexts, values ) { return function( value ) { contexts[ i ] = this; values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; if ( values === progressValues ) { deferred.notifyWith( contexts, values ); } else if ( !(--remaining) ) { deferred.resolveWith( contexts, values ); } }; }, progressValues, progressContexts, resolveContexts; // add listeners to Deferred subordinates; treat others as resolved if ( length > 1 ) { progressValues = new Array( length ); progressContexts = new Array( length ); resolveContexts = new Array( length ); for ( ; i < length; i++ ) { if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { resolveValues[ i ].promise() .done( updateFunc( i, resolveContexts, resolveValues ) ) .fail( deferred.reject ) .progress( updateFunc( i, progressContexts, progressValues ) ); } else { --remaining; } } } // if we're not waiting on anything, resolve the master if ( !remaining ) { deferred.resolveWith( resolveContexts, resolveValues ); } return deferred.promise(); } }); // The deferred used on DOM ready var readyList; jQuery.fn.ready = function( fn ) { // Add the callback jQuery.ready.promise().done( fn ); return this; }; jQuery.extend({ // Is the DOM ready to be used? Set to true once it occurs. isReady: false, // A counter to track how many items to wait for before // the ready event fires. See #6781 readyWait: 1, // Hold (or release) the ready event holdReady: function( hold ) { if ( hold ) { jQuery.readyWait++; } else { jQuery.ready( true ); } }, // Handle when the DOM is ready ready: function( wait ) { // Abort if there are pending holds or we're already ready if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { return; } // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). if ( !document.body ) { return setTimeout( jQuery.ready ); } // Remember that the DOM is ready jQuery.isReady = true; // If a normal DOM Ready event fired, decrement, and wait if need be if ( wait !== true && --jQuery.readyWait > 0 ) { return; } // If there are functions bound, to execute readyList.resolveWith( document, [ jQuery ] ); // Trigger any bound ready events if ( jQuery.fn.triggerHandler ) { jQuery( document ).triggerHandler( "ready" ); jQuery( document ).off( "ready" ); } } }); /** * Clean-up method for dom ready events */ function detach() { if ( document.addEventListener ) { document.removeEventListener( "DOMContentLoaded", completed, false ); window.removeEventListener( "load", completed, false ); } else { document.detachEvent( "onreadystatechange", completed ); window.detachEvent( "onload", completed ); } } /** * The ready event handler and self cleanup method */ function completed() { // readyState === "complete" is good enough for us to call the dom ready in oldIE if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { detach(); jQuery.ready(); } } jQuery.ready.promise = function( obj ) { if ( !readyList ) { readyList = jQuery.Deferred(); // Catch cases where $(document).ready() is called after the browser event has already occurred. // we once tried to use readyState "interactive" here, but it caused issues like the one // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 if ( document.readyState === "complete" ) { // Handle it asynchronously to allow scripts the opportunity to delay ready setTimeout( jQuery.ready ); // Standards-based browsers support DOMContentLoaded } else if ( document.addEventListener ) { // Use the handy event callback document.addEventListener( "DOMContentLoaded", completed, false ); // A fallback to window.onload, that will always work window.addEventListener( "load", completed, false ); // If IE event model is used } else { // Ensure firing before onload, maybe late but safe also for iframes document.attachEvent( "onreadystatechange", completed ); // A fallback to window.onload, that will always work window.attachEvent( "onload", completed ); // If IE and not a frame // continually check to see if the document is ready var top = false; try { top = window.frameElement == null && document.documentElement; } catch(e) {} if ( top && top.doScroll ) { (function doScrollCheck() { if ( !jQuery.isReady ) { try { // Use the trick by Diego Perini // http://javascript.nwbox.com/IEContentLoaded/ top.doScroll("left"); } catch(e) { return setTimeout( doScrollCheck, 50 ); } // detach all dom ready events detach(); // and execute any waiting functions jQuery.ready(); } })(); } } } return readyList.promise( obj ); }; var strundefined = typeof undefined; // Support: IE<9 // Iteration over object's inherited properties before its own var i; for ( i in jQuery( support ) ) { break; } support.ownLast = i !== "0"; // Note: most support tests are defined in their respective modules. // false until the test is run support.inlineBlockNeedsLayout = false; // Execute ASAP in case we need to set body.style.zoom jQuery(function() { // Minified: var a,b,c,d var val, div, body, container; body = document.getElementsByTagName( "body" )[ 0 ]; if ( !body || !body.style ) { // Return for frameset docs that don't have a body return; } // Setup div = document.createElement( "div" ); container = document.createElement( "div" ); container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; body.appendChild( container ).appendChild( div ); if ( typeof div.style.zoom !== strundefined ) { // Support: IE<8 // Check if natively block-level elements act like inline-block // elements when setting their display to 'inline' and giving // them layout div.style.cssText = "display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1"; support.inlineBlockNeedsLayout = val = div.offsetWidth === 3; if ( val ) { // Prevent IE 6 from affecting layout for positioned elements #11048 // Prevent IE from shrinking the body in IE 7 mode #12869 // Support: IE<8 body.style.zoom = 1; } } body.removeChild( container ); }); (function() { var div = document.createElement( "div" ); // Execute the test only if not already executed in another module. if (support.deleteExpando == null) { // Support: IE<9 support.deleteExpando = true; try { delete div.test; } catch( e ) { support.deleteExpando = false; } } // Null elements to avoid leaks in IE. div = null; })(); /** * Determines whether an object can have data */ jQuery.acceptData = function( elem ) { var noData = jQuery.noData[ (elem.nodeName + " ").toLowerCase() ], nodeType = +elem.nodeType || 1; // Do not set data on non-element DOM nodes because it will not be cleared (#8335). return nodeType !== 1 && nodeType !== 9 ? false : // Nodes accept data unless otherwise specified; rejection can be conditional !noData || noData !== true && elem.getAttribute("classid") === noData; }; var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /([A-Z])/g; function dataAttr( elem, key, data ) { // If nothing was found internally, try to fetch any // data from the HTML5 data-* attribute if ( data === undefined && elem.nodeType === 1 ) { var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); data = elem.getAttribute( name ); if ( typeof data === "string" ) { try { data = data === "true" ? true : data === "false" ? false : data === "null" ? null : // Only convert to a number if it doesn't change the string +data + "" === data ? +data : rbrace.test( data ) ? jQuery.parseJSON( data ) : data; } catch( e ) {} // Make sure we set the data so it isn't changed later jQuery.data( elem, key, data ); } else { data = undefined; } } return data; } // checks a cache object for emptiness function isEmptyDataObject( obj ) { var name; for ( name in obj ) { // if the public data object is empty, the private is still empty if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { continue; } if ( name !== "toJSON" ) { return false; } } return true; } function internalData( elem, name, data, pvt /* Internal Use Only */ ) { if ( !jQuery.acceptData( elem ) ) { return; } var ret, thisCache, internalKey = jQuery.expando, // We have to handle DOM nodes and JS objects differently because IE6-7 // can't GC object references properly across the DOM-JS boundary isNode = elem.nodeType, // Only DOM nodes need the global jQuery cache; JS object data is // attached directly to the object so GC can occur automatically cache = isNode ? jQuery.cache : elem, // Only defining an ID for JS objects if its cache already exists allows // the code to shortcut on the same path as a DOM node with no cache id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; // Avoid doing any more work than we need to when trying to get data on an // object that has no data at all if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { return; } if ( !id ) { // Only DOM nodes need a new unique ID for each element since their data // ends up in the global cache if ( isNode ) { id = elem[ internalKey ] = deletedIds.pop() || jQuery.guid++; } else { id = internalKey; } } if ( !cache[ id ] ) { // Avoid exposing jQuery metadata on plain JS objects when the object // is serialized using JSON.stringify cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; } // An object can be passed to jQuery.data instead of a key/value pair; this gets // shallow copied over onto the existing cache if ( typeof name === "object" || typeof name === "function" ) { if ( pvt ) { cache[ id ] = jQuery.extend( cache[ id ], name ); } else { cache[ id ].data = jQuery.extend( cache[ id ].data, name ); } } thisCache = cache[ id ]; // jQuery data() is stored in a separate object inside the object's internal data // cache in order to avoid key collisions between internal data and user-defined // data. if ( !pvt ) { if ( !thisCache.data ) { thisCache.data = {}; } thisCache = thisCache.data; } if ( data !== undefined ) { thisCache[ jQuery.camelCase( name ) ] = data; } // Check for both converted-to-camel and non-converted data property names // If a data property was specified if ( typeof name === "string" ) { // First Try to find as-is property data ret = thisCache[ name ]; // Test for null|undefined property data if ( ret == null ) { // Try to find the camelCased property ret = thisCache[ jQuery.camelCase( name ) ]; } } else { ret = thisCache; } return ret; } function internalRemoveData( elem, name, pvt ) { if ( !jQuery.acceptData( elem ) ) { return; } var thisCache, i, isNode = elem.nodeType, // See jQuery.data for more information cache = isNode ? jQuery.cache : elem, id = isNode ? elem[ jQuery.expando ] : jQuery.expando; // If there is already no cache entry for this object, there is no // purpose in continuing if ( !cache[ id ] ) { return; } if ( name ) { thisCache = pvt ? cache[ id ] : cache[ id ].data; if ( thisCache ) { // Support array or space separated string names for data keys if ( !jQuery.isArray( name ) ) { // try the string as a key before any manipulation if ( name in thisCache ) { name = [ name ]; } else { // split the camel cased version by spaces unless a key with the spaces exists name = jQuery.camelCase( name ); if ( name in thisCache ) { name = [ name ]; } else { name = name.split(" "); } } } else { // If "name" is an array of keys... // When data is initially created, via ("key", "val") signature, // keys will be converted to camelCase. // Since there is no way to tell _how_ a key was added, remove // both plain key and camelCase key. #12786 // This will only penalize the array argument path. name = name.concat( jQuery.map( name, jQuery.camelCase ) ); } i = name.length; while ( i-- ) { delete thisCache[ name[i] ]; } // If there is no data left in the cache, we want to continue // and let the cache object itself get destroyed if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { return; } } } // See jQuery.data for more information if ( !pvt ) { delete cache[ id ].data; // Don't destroy the parent cache unless the internal data object // had been the only thing left in it if ( !isEmptyDataObject( cache[ id ] ) ) { return; } } // Destroy the cache if ( isNode ) { jQuery.cleanData( [ elem ], true ); // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) /* jshint eqeqeq: false */ } else if ( support.deleteExpando || cache != cache.window ) { /* jshint eqeqeq: true */ delete cache[ id ]; // When all else fails, null } else { cache[ id ] = null; } } jQuery.extend({ cache: {}, // The following elements (space-suffixed to avoid Object.prototype collisions) // throw uncatchable exceptions if you attempt to set expando properties noData: { "applet ": true, "embed ": true, // ...but Flash objects (which have this classid) *can* handle expandos "object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" }, hasData: function( elem ) { elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; return !!elem && !isEmptyDataObject( elem ); }, data: function( elem, name, data ) { return internalData( elem, name, data ); }, removeData: function( elem, name ) { return internalRemoveData( elem, name ); }, // For internal use only. _data: function( elem, name, data ) { return internalData( elem, name, data, true ); }, _removeData: function( elem, name ) { return internalRemoveData( elem, name, true ); } }); jQuery.fn.extend({ data: function( key, value ) { var i, name, data, elem = this[0], attrs = elem && elem.attributes; // Special expections of .data basically thwart jQuery.access, // so implement the relevant behavior ourselves // Gets all values if ( key === undefined ) { if ( this.length ) { data = jQuery.data( elem ); if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { i = attrs.length; while ( i-- ) { // Support: IE11+ // The attrs elements can be null (#14894) if ( attrs[ i ] ) { name = attrs[ i ].name; if ( name.indexOf( "data-" ) === 0 ) { name = jQuery.camelCase( name.slice(5) ); dataAttr( elem, name, data[ name ] ); } } } jQuery._data( elem, "parsedAttrs", true ); } } return data; } // Sets multiple values if ( typeof key === "object" ) { return this.each(function() { jQuery.data( this, key ); }); } return arguments.length > 1 ? // Sets one value this.each(function() { jQuery.data( this, key, value ); }) : // Gets one value // Try to fetch any internally stored data first elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : undefined; }, removeData: function( key ) { return this.each(function() { jQuery.removeData( this, key ); }); } }); jQuery.extend({ queue: function( elem, type, data ) { var queue; if ( elem ) { type = ( type || "fx" ) + "queue"; queue = jQuery._data( elem, type ); // Speed up dequeue by getting out quickly if this is just a lookup if ( data ) { if ( !queue || jQuery.isArray(data) ) { queue = jQuery._data( elem, type, jQuery.makeArray(data) ); } else { queue.push( data ); } } return queue || []; } }, dequeue: function( elem, type ) { type = type || "fx"; var queue = jQuery.queue( elem, type ), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks( elem, type ), next = function() { jQuery.dequeue( elem, type ); }; // If the fx queue is dequeued, always remove the progress sentinel if ( fn === "inprogress" ) { fn = queue.shift(); startLength--; } if ( fn ) { // Add a progress sentinel to prevent the fx queue from being // automatically dequeued if ( type === "fx" ) { queue.unshift( "inprogress" ); } // clear up the last queue stop function delete hooks.stop; fn.call( elem, next, hooks ); } if ( !startLength && hooks ) { hooks.empty.fire(); } }, // not intended for public consumption - generates a queueHooks object, or returns the current one _queueHooks: function( elem, type ) { var key = type + "queueHooks"; return jQuery._data( elem, key ) || jQuery._data( elem, key, { empty: jQuery.Callbacks("once memory").add(function() { jQuery._removeData( elem, type + "queue" ); jQuery._removeData( elem, key ); }) }); } }); jQuery.fn.extend({ queue: function( type, data ) { var setter = 2; if ( typeof type !== "string" ) { data = type; type = "fx"; setter--; } if ( arguments.length < setter ) { return jQuery.queue( this[0], type ); } return data === undefined ? this : this.each(function() { var queue = jQuery.queue( this, type, data ); // ensure a hooks for this queue jQuery._queueHooks( this, type ); if ( type === "fx" && queue[0] !== "inprogress" ) { jQuery.dequeue( this, type ); } }); }, dequeue: function( type ) { return this.each(function() { jQuery.dequeue( this, type ); }); }, clearQueue: function( type ) { return this.queue( type || "fx", [] ); }, // Get a promise resolved when queues of a certain type // are emptied (fx is the type by default) promise: function( type, obj ) { var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() { if ( !( --count ) ) { defer.resolveWith( elements, [ elements ] ); } }; if ( typeof type !== "string" ) { obj = type; type = undefined; } type = type || "fx"; while ( i-- ) { tmp = jQuery._data( elements[ i ], type + "queueHooks" ); if ( tmp && tmp.empty ) { count++; tmp.empty.add( resolve ); } } resolve(); return defer.promise( obj ); } }); var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; var isHidden = function( elem, el ) { // isHidden might be called from jQuery#filter function; // in that case, element will be second argument elem = el || elem; return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); }; // Multifunctional method to get and set values of a collection // The value/s can optionally be executed if it's a function var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { var i = 0, length = elems.length, bulk = key == null; // Sets many values if ( jQuery.type( key ) === "object" ) { chainable = true; for ( i in key ) { jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); } // Sets one value } else if ( value !== undefined ) { chainable = true; if ( !jQuery.isFunction( value ) ) { raw = true; } if ( bulk ) { // Bulk operations run against the entire set if ( raw ) { fn.call( elems, value ); fn = null; // ...except when executing function values } else { bulk = fn; fn = function( elem, key, value ) { return bulk.call( jQuery( elem ), value ); }; } } if ( fn ) { for ( ; i < length; i++ ) { fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); } } } return chainable ? elems : // Gets bulk ? fn.call( elems ) : length ? fn( elems[0], key ) : emptyGet; }; var rcheckableType = (/^(?:checkbox|radio)$/i); (function() { // Minified: var a,b,c var input = document.createElement( "input" ), div = document.createElement( "div" ), fragment = document.createDocumentFragment(); // Setup div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; // IE strips leading whitespace when .innerHTML is used support.leadingWhitespace = div.firstChild.nodeType === 3; // Make sure that tbody elements aren't automatically inserted // IE will insert them into empty tables support.tbody = !div.getElementsByTagName( "tbody" ).length; // Make sure that link elements get serialized correctly by innerHTML // This requires a wrapper element in IE support.htmlSerialize = !!div.getElementsByTagName( "link" ).length; // Makes sure cloning an html5 element does not cause problems // Where outerHTML is undefined, this still works support.html5Clone = document.createElement( "nav" ).cloneNode( true ).outerHTML !== "<:nav></:nav>"; // Check if a disconnected checkbox will retain its checked // value of true after appended to the DOM (IE6/7) input.type = "checkbox"; input.checked = true; fragment.appendChild( input ); support.appendChecked = input.checked; // Make sure textarea (and checkbox) defaultValue is properly cloned // Support: IE6-IE11+ div.innerHTML = "<textarea>x</textarea>"; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; // #11217 - WebKit loses check when the name is after the checked attribute fragment.appendChild( div ); div.innerHTML = "<input type='radio' checked='checked' name='t'/>"; // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3 // old WebKit doesn't clone checked state correctly in fragments support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; // Support: IE<9 // Opera does not clone events (and typeof div.attachEvent === undefined). // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() support.noCloneEvent = true; if ( div.attachEvent ) { div.attachEvent( "onclick", function() { support.noCloneEvent = false; }); div.cloneNode( true ).click(); } // Execute the test only if not already executed in another module. if (support.deleteExpando == null) { // Support: IE<9 support.deleteExpando = true; try { delete div.test; } catch( e ) { support.deleteExpando = false; } } })(); (function() { var i, eventName, div = document.createElement( "div" ); // Support: IE<9 (lack submit/change bubble), Firefox 23+ (lack focusin event) for ( i in { submit: true, change: true, focusin: true }) { eventName = "on" + i; if ( !(support[ i + "Bubbles" ] = eventName in window) ) { // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) div.setAttribute( eventName, "t" ); support[ i + "Bubbles" ] = div.attributes[ eventName ].expando === false; } } // Null elements to avoid leaks in IE. div = null; })(); var rformElems = /^(?:input|select|textarea)$/i, rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; function returnTrue() { return true; } function returnFalse() { return false; } function safeActiveElement() { try { return document.activeElement; } catch ( err ) { } } /* * Helper functions for managing events -- not part of the public interface. * Props to Dean Edwards' addEvent library for many of the ideas. */ jQuery.event = { global: {}, add: function( elem, types, handler, data, selector ) { var tmp, events, t, handleObjIn, special, eventHandle, handleObj, handlers, type, namespaces, origType, elemData = jQuery._data( elem ); // Don't attach events to noData or text/comment nodes (but allow plain objects) if ( !elemData ) { return; } // Caller can pass in an object of custom data in lieu of the handler if ( handler.handler ) { handleObjIn = handler; handler = handleObjIn.handler; selector = handleObjIn.selector; } // Make sure that the handler has a unique ID, used to find/remove it later if ( !handler.guid ) { handler.guid = jQuery.guid++; } // Init the element's event structure and main handler, if this is the first if ( !(events = elemData.events) ) { events = elemData.events = {}; } if ( !(eventHandle = elemData.handle) ) { eventHandle = elemData.handle = function( e ) { // Discard the second event of a jQuery.event.trigger() and // when an event is called after a page has unloaded return typeof jQuery !== strundefined && (!e || jQuery.event.triggered !== e.type) ? jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : undefined; }; // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events eventHandle.elem = elem; } // Handle multiple events separated by a space types = ( types || "" ).match( rnotwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; type = origType = tmp[1]; namespaces = ( tmp[2] || "" ).split( "." ).sort(); // There *must* be a type, no attaching namespace-only handlers if ( !type ) { continue; } // If event changes its type, use the special event handlers for the changed type special = jQuery.event.special[ type ] || {}; // If selector defined, determine special event api type, otherwise given type type = ( selector ? special.delegateType : special.bindType ) || type; // Update special based on newly reset type special = jQuery.event.special[ type ] || {}; // handleObj is passed to all event handlers handleObj = jQuery.extend({ type: type, origType: origType, data: data, handler: handler, guid: handler.guid, selector: selector, needsContext: selector && jQuery.expr.match.needsContext.test( selector ), namespace: namespaces.join(".") }, handleObjIn ); // Init the event handler queue if we're the first if ( !(handlers = events[ type ]) ) { handlers = events[ type ] = []; handlers.delegateCount = 0; // Only use addEventListener/attachEvent if the special events handler returns false if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { // Bind the global event handler to the element if ( elem.addEventListener ) { elem.addEventListener( type, eventHandle, false ); } else if ( elem.attachEvent ) { elem.attachEvent( "on" + type, eventHandle ); } } } if ( special.add ) { special.add.call( elem, handleObj ); if ( !handleObj.handler.guid ) { handleObj.handler.guid = handler.guid; } } // Add to the element's handler list, delegates in front if ( selector ) { handlers.splice( handlers.delegateCount++, 0, handleObj ); } else { handlers.push( handleObj ); } // Keep track of which events have ever been used, for event optimization jQuery.event.global[ type ] = true; } // Nullify elem to prevent memory leaks in IE elem = null; }, // Detach an event or set of events from an element remove: function( elem, types, handler, selector, mappedTypes ) { var j, handleObj, tmp, origCount, t, events, special, handlers, type, namespaces, origType, elemData = jQuery.hasData( elem ) && jQuery._data( elem ); if ( !elemData || !(events = elemData.events) ) { return; } // Once for each type.namespace in types; type may be omitted types = ( types || "" ).match( rnotwhite ) || [ "" ]; t = types.length; while ( t-- ) { tmp = rtypenamespace.exec( types[t] ) || []; type = origType = tmp[1]; namespaces = ( tmp[2] || "" ).split( "." ).sort(); // Unbind all events (on this namespace, if provided) for the element if ( !type ) { for ( type in events ) { jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); } continue; } special = jQuery.event.special[ type ] || {}; type = ( selector ? special.delegateType : special.bindType ) || type; handlers = events[ type ] || []; tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); // Remove matching events origCount = j = handlers.length; while ( j-- ) { handleObj = handlers[ j ]; if ( ( mappedTypes || origType === handleObj.origType ) && ( !handler || handler.guid === handleObj.guid ) && ( !tmp || tmp.test( handleObj.namespace ) ) && ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { handlers.splice( j, 1 ); if ( handleObj.selector ) { handlers.delegateCount--; } if ( special.remove ) { special.remove.call( elem, handleObj ); } } } // Remove generic event handler if we removed something and no more handlers exist // (avoids potential for endless recursion during removal of special event handlers) if ( origCount && !handlers.length ) { if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { jQuery.removeEvent( elem, type, elemData.handle ); } delete events[ type ]; } } // Remove the expando if it's no longer used if ( jQuery.isEmptyObject( events ) ) { delete elemData.handle; // removeData also checks for emptiness and clears the expando if empty // so use it instead of delete jQuery._removeData( elem, "events" ); } }, trigger: function( event, data, elem, onlyHandlers ) { var handle, ontype, cur, bubbleType, special, tmp, i, eventPath = [ elem || document ], type = hasOwn.call( event, "type" ) ? event.type : event, namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; cur = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { return; } // focus/blur morphs to focusin/out; ensure we're not firing them right now if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { return; } if ( type.indexOf(".") >= 0 ) { // Namespaced trigger; create a regexp to match event type in handle() namespaces = type.split("."); type = namespaces.shift(); namespaces.sort(); } ontype = type.indexOf(":") < 0 && "on" + type; // Caller can pass in a jQuery.Event object, Object, or just an event type string event = event[ jQuery.expando ] ? event : new jQuery.Event( type, typeof event === "object" && event ); // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) event.isTrigger = onlyHandlers ? 2 : 3; event.namespace = namespaces.join("."); event.namespace_re = event.namespace ? new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : null; // Clean up the event in case it is being reused event.result = undefined; if ( !event.target ) { event.target = elem; } // Clone any incoming data and prepend the event, creating the handler arg list data = data == null ? [ event ] : jQuery.makeArray( data, [ event ] ); // Allow special events to draw outside the lines special = jQuery.event.special[ type ] || {}; if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { return; } // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { cur = cur.parentNode; } for ( ; cur; cur = cur.parentNode ) { eventPath.push( cur ); tmp = cur; } // Only add window if we got to document (e.g., not plain obj or detached DOM) if ( tmp === (elem.ownerDocument || document) ) { eventPath.push( tmp.defaultView || tmp.parentWindow || window ); } } // Fire handlers on the event path i = 0; while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { event.type = i > 1 ? bubbleType : special.bindType || type; // jQuery handler handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); } // Native handler handle = ontype && cur[ ontype ]; if ( handle && handle.apply && jQuery.acceptData( cur ) ) { event.result = handle.apply( cur, data ); if ( event.result === false ) { event.preventDefault(); } } } event.type = type; // If nobody prevented the default action, do it now if ( !onlyHandlers && !event.isDefaultPrevented() ) { if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && jQuery.acceptData( elem ) ) { // Call a native DOM method on the target with the same name name as the event. // Can't use an .isFunction() check here because IE6/7 fails that test. // Don't do default actions on window, that's where global variables be (#6170) if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; if ( tmp ) { elem[ ontype ] = null; } // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; try { elem[ type ](); } catch ( e ) { // IE<9 dies on focus/blur to hidden element (#1486,#12518) // only reproducible on winXP IE8 native, not IE9 in IE8 mode } jQuery.event.triggered = undefined; if ( tmp ) { elem[ ontype ] = tmp; } } } } return event.result; }, dispatch: function( event ) { // Make a writable jQuery.Event from the native event object event = jQuery.event.fix( event ); var i, ret, handleObj, matched, j, handlerQueue = [], args = slice.call( arguments ), handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event args[0] = event; event.delegateTarget = this; // Call the preDispatch hook for the mapped type, and let it bail if desired if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { return; } // Determine handlers handlerQueue = jQuery.event.handlers.call( this, event, handlers ); // Run delegates first; they may want to stop propagation beneath us i = 0; while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { event.currentTarget = matched.elem; j = 0; while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { // Triggered event must either 1) have no namespace, or // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) .apply( matched.elem, args ); if ( ret !== undefined ) { if ( (event.result = ret) === false ) { event.preventDefault(); event.stopPropagation(); } } } } } // Call the postDispatch hook for the mapped type if ( special.postDispatch ) { special.postDispatch.call( this, event ); } return event.result; }, handlers: function( event, handlers ) { var sel, handleObj, matches, i, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target; // Find delegate handlers // Black-hole SVG <use> instance trees (#13180) // Avoid non-left-click bubbling in Firefox (#3861) if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { /* jshint eqeqeq: false */ for ( ; cur != this; cur = cur.parentNode || this ) { /* jshint eqeqeq: true */ // Don't check non-elements (#13208) // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { matches = []; for ( i = 0; i < delegateCount; i++ ) { handleObj = handlers[ i ]; // Don't conflict with Object.prototype properties (#13203) sel = handleObj.selector + " "; if ( matches[ sel ] === undefined ) { matches[ sel ] = handleObj.needsContext ? jQuery( sel, this ).index( cur ) >= 0 : jQuery.find( sel, this, null, [ cur ] ).length; } if ( matches[ sel ] ) { matches.push( handleObj ); } } if ( matches.length ) { handlerQueue.push({ elem: cur, handlers: matches }); } } } } // Add the remaining (directly-bound) handlers if ( delegateCount < handlers.length ) { handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); } return handlerQueue; }, fix: function( event ) { if ( event[ jQuery.expando ] ) { return event; } // Create a writable copy of the event object and normalize some properties var i, prop, copy, type = event.type, originalEvent = event, fixHook = this.fixHooks[ type ]; if ( !fixHook ) { this.fixHooks[ type ] = fixHook = rmouseEvent.test( type ) ? this.mouseHooks : rkeyEvent.test( type ) ? this.keyHooks : {}; } copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; event = new jQuery.Event( originalEvent ); i = copy.length; while ( i-- ) { prop = copy[ i ]; event[ prop ] = originalEvent[ prop ]; } // Support: IE<9 // Fix target property (#1925) if ( !event.target ) { event.target = originalEvent.srcElement || document; } // Support: Chrome 23+, Safari? // Target should not be a text node (#504, #13143) if ( event.target.nodeType === 3 ) { event.target = event.target.parentNode; } // Support: IE<9 // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) event.metaKey = !!event.metaKey; return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; }, // Includes some event props shared by KeyEvent and MouseEvent props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), fixHooks: {}, keyHooks: { props: "char charCode key keyCode".split(" "), filter: function( event, original ) { // Add which for key events if ( event.which == null ) { event.which = original.charCode != null ? original.charCode : original.keyCode; } return event; } }, mouseHooks: { props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), filter: function( event, original ) { var body, eventDoc, doc, button = original.button, fromElement = original.fromElement; // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null && original.clientX != null ) { eventDoc = event.target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); } // Add relatedTarget, if necessary if ( !event.relatedTarget && fromElement ) { event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; } // Add which for click: 1 === left; 2 === middle; 3 === right // Note: button is not normalized, so don't use it if ( !event.which && button !== undefined ) { event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); } return event; } }, special: { load: { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, focus: { // Fire native event if possible so blur/focus sequence is correct trigger: function() { if ( this !== safeActiveElement() && this.focus ) { try { this.focus(); return false; } catch ( e ) { // Support: IE<9 // If we error on focus to hidden element (#1486, #12518), // let .trigger() run the handlers } } }, delegateType: "focusin" }, blur: { trigger: function() { if ( this === safeActiveElement() && this.blur ) { this.blur(); return false; } }, delegateType: "focusout" }, click: { // For checkbox, fire native event so checked state will be right trigger: function() { if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { this.click(); return false; } }, // For cross-browser consistency, don't fire native .click() on links _default: function( event ) { return jQuery.nodeName( event.target, "a" ); } }, beforeunload: { postDispatch: function( event ) { // Support: Firefox 20+ // Firefox doesn't alert if the returnValue field is not set. if ( event.result !== undefined && event.originalEvent ) { event.originalEvent.returnValue = event.result; } } } }, simulate: function( type, elem, event, bubble ) { // Piggyback on a donor event to simulate a different one. // Fake originalEvent to avoid donor's stopPropagation, but if the // simulated event prevents default then we do the same on the donor. var e = jQuery.extend( new jQuery.Event(), event, { type: type, isSimulated: true, originalEvent: {} } ); if ( bubble ) { jQuery.event.trigger( e, null, elem ); } else { jQuery.event.dispatch.call( elem, e ); } if ( e.isDefaultPrevented() ) { event.preventDefault(); } } }; jQuery.removeEvent = document.removeEventListener ? function( elem, type, handle ) { if ( elem.removeEventListener ) { elem.removeEventListener( type, handle, false ); } } : function( elem, type, handle ) { var name = "on" + type; if ( elem.detachEvent ) { // #8545, #7054, preventing memory leaks for custom events in IE6-8 // detachEvent needed property on element, by name of that event, to properly expose it to GC if ( typeof elem[ name ] === strundefined ) { elem[ name ] = null; } elem.detachEvent( name, handle ); } }; jQuery.Event = function( src, props ) { // Allow instantiation without the 'new' keyword if ( !(this instanceof jQuery.Event) ) { return new jQuery.Event( src, props ); } // Event object if ( src && src.type ) { this.originalEvent = src; this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === undefined && // Support: IE < 9, Android < 4.0 src.returnValue === false ? returnTrue : returnFalse; // Event type } else { this.type = src; } // Put explicitly provided properties onto the event object if ( props ) { jQuery.extend( this, props ); } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || jQuery.now(); // Mark it as fixed this[ jQuery.expando ] = true; }; // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html jQuery.Event.prototype = { isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function() { var e = this.originalEvent; this.isDefaultPrevented = returnTrue; if ( !e ) { return; } // If preventDefault exists, run it on the original event if ( e.preventDefault ) { e.preventDefault(); // Support: IE // Otherwise set the returnValue property of the original event to false } else { e.returnValue = false; } }, stopPropagation: function() { var e = this.originalEvent; this.isPropagationStopped = returnTrue; if ( !e ) { return; } // If stopPropagation exists, run it on the original event if ( e.stopPropagation ) { e.stopPropagation(); } // Support: IE // Set the cancelBubble property of the original event to true e.cancelBubble = true; }, stopImmediatePropagation: function() { var e = this.originalEvent; this.isImmediatePropagationStopped = returnTrue; if ( e && e.stopImmediatePropagation ) { e.stopImmediatePropagation(); } this.stopPropagation(); } }; // Create mouseenter/leave events using mouseover/out and event-time checks jQuery.each({ mouseenter: "mouseover", mouseleave: "mouseout", pointerenter: "pointerover", pointerleave: "pointerout" }, function( orig, fix ) { jQuery.event.special[ orig ] = { delegateType: fix, bindType: fix, handle: function( event ) { var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj; // For mousenter/leave call the handler if related is outside the target. // NB: No relatedTarget if the mouse left/entered the browser window if ( !related || (related !== target && !jQuery.contains( target, related )) ) { event.type = handleObj.origType; ret = handleObj.handler.apply( this, arguments ); event.type = fix; } return ret; } }; }); // IE submit delegation if ( !support.submitBubbles ) { jQuery.event.special.submit = { setup: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Lazy-add a submit handler when a descendant form may potentially be submitted jQuery.event.add( this, "click._submit keypress._submit", function( e ) { // Node name check avoids a VML-related crash in IE (#9807) var elem = e.target, form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; if ( form && !jQuery._data( form, "submitBubbles" ) ) { jQuery.event.add( form, "submit._submit", function( event ) { event._submit_bubble = true; }); jQuery._data( form, "submitBubbles", true ); } }); // return undefined since we don't need an event listener }, postDispatch: function( event ) { // If form was submitted by the user, bubble the event up the tree if ( event._submit_bubble ) { delete event._submit_bubble; if ( this.parentNode && !event.isTrigger ) { jQuery.event.simulate( "submit", this.parentNode, event, true ); } } }, teardown: function() { // Only need this for delegated form submit events if ( jQuery.nodeName( this, "form" ) ) { return false; } // Remove delegated handlers; cleanData eventually reaps submit handlers attached above jQuery.event.remove( this, "._submit" ); } }; } // IE change delegation and checkbox/radio fix if ( !support.changeBubbles ) { jQuery.event.special.change = { setup: function() { if ( rformElems.test( this.nodeName ) ) { // IE doesn't fire change on a check/radio until blur; trigger it on click // after a propertychange. Eat the blur-change in special.change.handle. // This still fires onchange a second time for check/radio after blur. if ( this.type === "checkbox" || this.type === "radio" ) { jQuery.event.add( this, "propertychange._change", function( event ) { if ( event.originalEvent.propertyName === "checked" ) { this._just_changed = true; } }); jQuery.event.add( this, "click._change", function( event ) { if ( this._just_changed && !event.isTrigger ) { this._just_changed = false; } // Allow triggered, simulated change events (#11500) jQuery.event.simulate( "change", this, event, true ); }); } return false; } // Delegated event; lazy-add a change handler on descendant inputs jQuery.event.add( this, "beforeactivate._change", function( e ) { var elem = e.target; if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { jQuery.event.add( elem, "change._change", function( event ) { if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { jQuery.event.simulate( "change", this.parentNode, event, true ); } }); jQuery._data( elem, "changeBubbles", true ); } }); }, handle: function( event ) { var elem = event.target; // Swallow native change events from checkbox/radio, we already triggered them above if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { return event.handleObj.handler.apply( this, arguments ); } }, teardown: function() { jQuery.event.remove( this, "._change" ); return !rformElems.test( this.nodeName ); } }; } // Create "bubbling" focus and blur events if ( !support.focusinBubbles ) { jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { // Attach a single capturing handler on the document while someone wants focusin/focusout var handler = function( event ) { jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); }; jQuery.event.special[ fix ] = { setup: function() { var doc = this.ownerDocument || this, attaches = jQuery._data( doc, fix ); if ( !attaches ) { doc.addEventListener( orig, handler, true ); } jQuery._data( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { var doc = this.ownerDocument || this, attaches = jQuery._data( doc, fix ) - 1; if ( !attaches ) { doc.removeEventListener( orig, handler, true ); jQuery._removeData( doc, fix ); } else { jQuery._data( doc, fix, attaches ); } } }; }); } jQuery.fn.extend({ on: function( types, selector, data, fn, /*INTERNAL*/ one ) { var type, origFn; // Types can be a map of types/handlers if ( typeof types === "object" ) { // ( types-Object, selector, data ) if ( typeof selector !== "string" ) { // ( types-Object, data ) data = data || selector; selector = undefined; } for ( type in types ) { this.on( type, selector, data, types[ type ], one ); } return this; } if ( data == null && fn == null ) { // ( types, fn ) fn = selector; data = selector = undefined; } else if ( fn == null ) { if ( typeof selector === "string" ) { // ( types, selector, fn ) fn = data; data = undefined; } else { // ( types, data, fn ) fn = data; data = selector; selector = undefined; } } if ( fn === false ) { fn = returnFalse; } else if ( !fn ) { return this; } if ( one === 1 ) { origFn = fn; fn = function( event ) { // Can use an empty set, since event contains the info jQuery().off( event ); return origFn.apply( this, arguments ); }; // Use same guid so caller can remove using origFn fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); } return this.each( function() { jQuery.event.add( this, types, fn, data, selector ); }); }, one: function( types, selector, data, fn ) { return this.on( types, selector, data, fn, 1 ); }, off: function( types, selector, fn ) { var handleObj, type; if ( types && types.preventDefault && types.handleObj ) { // ( event ) dispatched jQuery.Event handleObj = types.handleObj; jQuery( types.delegateTarget ).off( handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, handleObj.selector, handleObj.handler ); return this; } if ( typeof types === "object" ) { // ( types-object [, selector] ) for ( type in types ) { this.off( type, selector, types[ type ] ); } return this; } if ( selector === false || typeof selector === "function" ) { // ( types [, fn] ) fn = selector; selector = undefined; } if ( fn === false ) { fn = returnFalse; } return this.each(function() { jQuery.event.remove( this, types, fn, selector ); }); }, trigger: function( type, data ) { return this.each(function() { jQuery.event.trigger( type, data, this ); }); }, triggerHandler: function( type, data ) { var elem = this[0]; if ( elem ) { return jQuery.event.trigger( type, data, elem, true ); } } }); function createSafeFragment( document ) { var list = nodeNames.split( "|" ), safeFrag = document.createDocumentFragment(); if ( safeFrag.createElement ) { while ( list.length ) { safeFrag.createElement( list.pop() ); } } return safeFrag; } var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), rleadingWhitespace = /^\s+/, rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, rtagName = /<([\w:]+)/, rtbody = /<tbody/i, rhtml = /<|&#?\w+;/, rnoInnerhtml = /<(?:script|style|link)/i, // checked="checked" or checked rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rscriptType = /^$|\/(?:java|ecma)script/i, rscriptTypeMasked = /^true\/(.*)/, rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, // We have to close these tags to support XHTML (#13200) wrapMap = { option: [ 1, "<select multiple='multiple'>", "</select>" ], legend: [ 1, "<fieldset>", "</fieldset>" ], area: [ 1, "<map>", "</map>" ], param: [ 1, "<object>", "</object>" ], thead: [ 1, "<table>", "</table>" ], tr: [ 2, "<table><tbody>", "</tbody></table>" ], col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, // unless wrapped in a div with non-breaking characters in front of it. _default: support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] }, safeFragment = createSafeFragment( document ), fragmentDiv = safeFragment.appendChild( document.createElement("div") ); wrapMap.optgroup = wrapMap.option; wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; function getAll( context, tag ) { var elems, elem, i = 0, found = typeof context.getElementsByTagName !== strundefined ? context.getElementsByTagName( tag || "*" ) : typeof context.querySelectorAll !== strundefined ? context.querySelectorAll( tag || "*" ) : undefined; if ( !found ) { for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { if ( !tag || jQuery.nodeName( elem, tag ) ) { found.push( elem ); } else { jQuery.merge( found, getAll( elem, tag ) ); } } } return tag === undefined || tag && jQuery.nodeName( context, tag ) ? jQuery.merge( [ context ], found ) : found; } // Used in buildFragment, fixes the defaultChecked property function fixDefaultChecked( elem ) { if ( rcheckableType.test( elem.type ) ) { elem.defaultChecked = elem.checked; } } // Support: IE<8 // Manipulating tables requires a tbody function manipulationTarget( elem, content ) { return jQuery.nodeName( elem, "table" ) && jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? elem.getElementsByTagName("tbody")[0] || elem.appendChild( elem.ownerDocument.createElement("tbody") ) : elem; } // Replace/restore the type attribute of script elements for safe DOM manipulation function disableScript( elem ) { elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; return elem; } function restoreScript( elem ) { var match = rscriptTypeMasked.exec( elem.type ); if ( match ) { elem.type = match[1]; } else { elem.removeAttribute("type"); } return elem; } // Mark scripts as having already been evaluated function setGlobalEval( elems, refElements ) { var elem, i = 0; for ( ; (elem = elems[i]) != null; i++ ) { jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); } } function cloneCopyEvent( src, dest ) { if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { return; } var type, i, l, oldData = jQuery._data( src ), curData = jQuery._data( dest, oldData ), events = oldData.events; if ( events ) { delete curData.handle; curData.events = {}; for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { jQuery.event.add( dest, type, events[ type ][ i ] ); } } } // make the cloned public data object a copy from the original if ( curData.data ) { curData.data = jQuery.extend( {}, curData.data ); } } function fixCloneNodeIssues( src, dest ) { var nodeName, e, data; // We do not need to do anything for non-Elements if ( dest.nodeType !== 1 ) { return; } nodeName = dest.nodeName.toLowerCase(); // IE6-8 copies events bound via attachEvent when using cloneNode. if ( !support.noCloneEvent && dest[ jQuery.expando ] ) { data = jQuery._data( dest ); for ( e in data.events ) { jQuery.removeEvent( dest, e, data.handle ); } // Event data gets referenced instead of copied if the expando gets copied too dest.removeAttribute( jQuery.expando ); } // IE blanks contents when cloning scripts, and tries to evaluate newly-set text if ( nodeName === "script" && dest.text !== src.text ) { disableScript( dest ).text = src.text; restoreScript( dest ); // IE6-10 improperly clones children of object elements using classid. // IE10 throws NoModificationAllowedError if parent is null, #12132. } else if ( nodeName === "object" ) { if ( dest.parentNode ) { dest.outerHTML = src.outerHTML; } // This path appears unavoidable for IE9. When cloning an object // element in IE9, the outerHTML strategy above is not sufficient. // If the src has innerHTML and the destination does not, // copy the src.innerHTML into the dest.innerHTML. #10324 if ( support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { dest.innerHTML = src.innerHTML; } } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) { // IE6-8 fails to persist the checked state of a cloned checkbox // or radio button. Worse, IE6-7 fail to give the cloned element // a checked appearance if the defaultChecked value isn't also set dest.defaultChecked = dest.checked = src.checked; // IE6-7 get confused and end up setting the value of a cloned // checkbox/radio button to an empty string instead of "on" if ( dest.value !== src.value ) { dest.value = src.value; } // IE6-8 fails to return the selected option to the default selected // state when cloning options } else if ( nodeName === "option" ) { dest.defaultSelected = dest.selected = src.defaultSelected; // IE6-8 fails to set the defaultValue to the correct value when // cloning other types of input fields } else if ( nodeName === "input" || nodeName === "textarea" ) { dest.defaultValue = src.defaultValue; } } jQuery.extend({ clone: function( elem, dataAndEvents, deepDataAndEvents ) { var destElements, node, clone, i, srcElements, inPage = jQuery.contains( elem.ownerDocument, elem ); if ( support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { clone = elem.cloneNode( true ); // IE<=8 does not properly clone detached, unknown element nodes } else { fragmentDiv.innerHTML = elem.outerHTML; fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); } if ( (!support.noCloneEvent || !support.noCloneChecked) && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 destElements = getAll( clone ); srcElements = getAll( elem ); // Fix all IE cloning issues for ( i = 0; (node = srcElements[i]) != null; ++i ) { // Ensure that the destination node is not null; Fixes #9587 if ( destElements[i] ) { fixCloneNodeIssues( node, destElements[i] ); } } } // Copy the events from the original to the clone if ( dataAndEvents ) { if ( deepDataAndEvents ) { srcElements = srcElements || getAll( elem ); destElements = destElements || getAll( clone ); for ( i = 0; (node = srcElements[i]) != null; i++ ) { cloneCopyEvent( node, destElements[i] ); } } else { cloneCopyEvent( elem, clone ); } } // Preserve script evaluation history destElements = getAll( clone, "script" ); if ( destElements.length > 0 ) { setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); } destElements = srcElements = node = null; // Return the cloned set return clone; }, buildFragment: function( elems, context, scripts, selection ) { var j, elem, contains, tmp, tag, tbody, wrap, l = elems.length, // Ensure a safe fragment safe = createSafeFragment( context ), nodes = [], i = 0; for ( ; i < l; i++ ) { elem = elems[ i ]; if ( elem || elem === 0 ) { // Add nodes directly if ( jQuery.type( elem ) === "object" ) { jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); // Convert non-html into a text node } else if ( !rhtml.test( elem ) ) { nodes.push( context.createTextNode( elem ) ); // Convert html into DOM nodes } else { tmp = tmp || safe.appendChild( context.createElement("div") ); // Deserialize a standard representation tag = (rtagName.exec( elem ) || [ "", "" ])[ 1 ].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; // Descend through wrappers to the right content j = wrap[0]; while ( j-- ) { tmp = tmp.lastChild; } // Manually add leading whitespace removed by IE if ( !support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); } // Remove IE's autoinserted <tbody> from table fragments if ( !support.tbody ) { // String was a <table>, *may* have spurious <tbody> elem = tag === "table" && !rtbody.test( elem ) ? tmp.firstChild : // String was a bare <thead> or <tfoot> wrap[1] === "<table>" && !rtbody.test( elem ) ? tmp : 0; j = elem && elem.childNodes.length; while ( j-- ) { if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { elem.removeChild( tbody ); } } } jQuery.merge( nodes, tmp.childNodes ); // Fix #12392 for WebKit and IE > 9 tmp.textContent = ""; // Fix #12392 for oldIE while ( tmp.firstChild ) { tmp.removeChild( tmp.firstChild ); } // Remember the top-level container for proper cleanup tmp = safe.lastChild; } } } // Fix #11356: Clear elements from fragment if ( tmp ) { safe.removeChild( tmp ); } // Reset defaultChecked for any radios and checkboxes // about to be appended to the DOM in IE 6/7 (#8060) if ( !support.appendChecked ) { jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); } i = 0; while ( (elem = nodes[ i++ ]) ) { // #4087 - If origin and destination elements are the same, and this is // that element, do not do anything if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { continue; } contains = jQuery.contains( elem.ownerDocument, elem ); // Append to fragment tmp = getAll( safe.appendChild( elem ), "script" ); // Preserve script evaluation history if ( contains ) { setGlobalEval( tmp ); } // Capture executables if ( scripts ) { j = 0; while ( (elem = tmp[ j++ ]) ) { if ( rscriptType.test( elem.type || "" ) ) { scripts.push( elem ); } } } } tmp = null; return safe; }, cleanData: function( elems, /* internal */ acceptData ) { var elem, type, id, data, i = 0, internalKey = jQuery.expando, cache = jQuery.cache, deleteExpando = support.deleteExpando, special = jQuery.event.special; for ( ; (elem = elems[i]) != null; i++ ) { if ( acceptData || jQuery.acceptData( elem ) ) { id = elem[ internalKey ]; data = id && cache[ id ]; if ( data ) { if ( data.events ) { for ( type in data.events ) { if ( special[ type ] ) { jQuery.event.remove( elem, type ); // This is a shortcut to avoid jQuery.event.remove's overhead } else { jQuery.removeEvent( elem, type, data.handle ); } } } // Remove cache only if it was not already removed by jQuery.event.remove if ( cache[ id ] ) { delete cache[ id ]; // IE does not allow us to delete expando properties from nodes, // nor does it have a removeAttribute function on Document nodes; // we must handle all of these cases if ( deleteExpando ) { delete elem[ internalKey ]; } else if ( typeof elem.removeAttribute !== strundefined ) { elem.removeAttribute( internalKey ); } else { elem[ internalKey ] = null; } deletedIds.push( id ); } } } } } }); jQuery.fn.extend({ text: function( value ) { return access( this, function( value ) { return value === undefined ? jQuery.text( this ) : this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); }, null, value, arguments.length ); }, append: function() { return this.domManip( arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.appendChild( elem ); } }); }, prepend: function() { return this.domManip( arguments, function( elem ) { if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { var target = manipulationTarget( this, elem ); target.insertBefore( elem, target.firstChild ); } }); }, before: function() { return this.domManip( arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this ); } }); }, after: function() { return this.domManip( arguments, function( elem ) { if ( this.parentNode ) { this.parentNode.insertBefore( elem, this.nextSibling ); } }); }, remove: function( selector, keepData /* Internal Use Only */ ) { var elem, elems = selector ? jQuery.filter( selector, this ) : this, i = 0; for ( ; (elem = elems[i]) != null; i++ ) { if ( !keepData && elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem ) ); } if ( elem.parentNode ) { if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { setGlobalEval( getAll( elem, "script" ) ); } elem.parentNode.removeChild( elem ); } } return this; }, empty: function() { var elem, i = 0; for ( ; (elem = this[i]) != null; i++ ) { // Remove element nodes and prevent memory leaks if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); } // Remove any remaining nodes while ( elem.firstChild ) { elem.removeChild( elem.firstChild ); } // If this is a select, ensure that it displays empty (#12336) // Support: IE<9 if ( elem.options && jQuery.nodeName( elem, "select" ) ) { elem.options.length = 0; } } return this; }, clone: function( dataAndEvents, deepDataAndEvents ) { dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map(function() { return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); }); }, html: function( value ) { return access( this, function( value ) { var elem = this[ 0 ] || {}, i = 0, l = this.length; if ( value === undefined ) { return elem.nodeType === 1 ? elem.innerHTML.replace( rinlinejQuery, "" ) : undefined; } // See if we can take a shortcut and just use innerHTML if ( typeof value === "string" && !rnoInnerhtml.test( value ) && ( support.htmlSerialize || !rnoshimcache.test( value ) ) && ( support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && !wrapMap[ (rtagName.exec( value ) || [ "", "" ])[ 1 ].toLowerCase() ] ) { value = value.replace( rxhtmlTag, "<$1></$2>" ); try { for (; i < l; i++ ) { // Remove element nodes and prevent memory leaks elem = this[i] || {}; if ( elem.nodeType === 1 ) { jQuery.cleanData( getAll( elem, false ) ); elem.innerHTML = value; } } elem = 0; // If using innerHTML throws an exception, use the fallback method } catch(e) {} } if ( elem ) { this.empty().append( value ); } }, null, value, arguments.length ); }, replaceWith: function() { var arg = arguments[ 0 ]; // Make the changes, replacing each context element with the new content this.domManip( arguments, function( elem ) { arg = this.parentNode; jQuery.cleanData( getAll( this ) ); if ( arg ) { arg.replaceChild( elem, this ); } }); // Force removal if there was no new content (e.g., from empty arguments) return arg && (arg.length || arg.nodeType) ? this : this.remove(); }, detach: function( selector ) { return this.remove( selector, true ); }, domManip: function( args, callback ) { // Flatten any nested arrays args = concat.apply( [], args ); var first, node, hasScripts, scripts, doc, fragment, i = 0, l = this.length, set = this, iNoClone = l - 1, value = args[0], isFunction = jQuery.isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit if ( isFunction || ( l > 1 && typeof value === "string" && !support.checkClone && rchecked.test( value ) ) ) { return this.each(function( index ) { var self = set.eq( index ); if ( isFunction ) { args[0] = value.call( this, index, self.html() ); } self.domManip( args, callback ); }); } if ( l ) { fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); first = fragment.firstChild; if ( fragment.childNodes.length === 1 ) { fragment = first; } if ( first ) { scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); hasScripts = scripts.length; // Use the original fragment for the last item instead of the first because it can end up // being emptied incorrectly in certain situations (#8070). for ( ; i < l; i++ ) { node = fragment; if ( i !== iNoClone ) { node = jQuery.clone( node, true, true ); // Keep references to cloned scripts for later restoration if ( hasScripts ) { jQuery.merge( scripts, getAll( node, "script" ) ); } } callback.call( this[i], node, i ); } if ( hasScripts ) { doc = scripts[ scripts.length - 1 ].ownerDocument; // Reenable scripts jQuery.map( scripts, restoreScript ); // Evaluate executable scripts on first document insertion for ( i = 0; i < hasScripts; i++ ) { node = scripts[ i ]; if ( rscriptType.test( node.type || "" ) && !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { if ( node.src ) { // Optional AJAX dependency, but won't run scripts if not present if ( jQuery._evalUrl ) { jQuery._evalUrl( node.src ); } } else { jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); } } } } // Fix #11809: Avoid leaking memory fragment = first = null; } } return this; } }); jQuery.each({ appendTo: "append", prependTo: "prepend", insertBefore: "before", insertAfter: "after", replaceAll: "replaceWith" }, function( name, original ) { jQuery.fn[ name ] = function( selector ) { var elems, i = 0, ret = [], insert = jQuery( selector ), last = insert.length - 1; for ( ; i <= last; i++ ) { elems = i === last ? this : this.clone(true); jQuery( insert[i] )[ original ]( elems ); // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() push.apply( ret, elems.get() ); } return this.pushStack( ret ); }; }); var iframe, elemdisplay = {}; /** * Retrieve the actual display of a element * @param {String} name nodeName of the element * @param {Object} doc Document object */ // Called only from within defaultDisplay function actualDisplay( name, doc ) { var style, elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), // getDefaultComputedStyle might be reliably used only on attached element display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? // Use of this method is a temporary fix (more like optmization) until something better comes along, // since it was removed from specification and supported only in FF style.display : jQuery.css( elem[ 0 ], "display" ); // We don't have any data stored on the element, // so use "detach" method as fast way to get rid of the element elem.detach(); return display; } /** * Try to determine the default display value of an element * @param {String} nodeName */ function defaultDisplay( nodeName ) { var doc = document, display = elemdisplay[ nodeName ]; if ( !display ) { display = actualDisplay( nodeName, doc ); // If the simple way fails, read from inside an iframe if ( display === "none" || !display ) { // Use the already-created iframe if possible iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement ); // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse doc = ( iframe[ 0 ].contentWindow || iframe[ 0 ].contentDocument ).document; // Support: IE doc.write(); doc.close(); display = actualDisplay( nodeName, doc ); iframe.detach(); } // Store the correct default display elemdisplay[ nodeName ] = display; } return display; } (function() { var shrinkWrapBlocksVal; support.shrinkWrapBlocks = function() { if ( shrinkWrapBlocksVal != null ) { return shrinkWrapBlocksVal; } // Will be changed later if needed. shrinkWrapBlocksVal = false; // Minified: var b,c,d var div, body, container; body = document.getElementsByTagName( "body" )[ 0 ]; if ( !body || !body.style ) { // Test fired too early or in an unsupported environment, exit. return; } // Setup div = document.createElement( "div" ); container = document.createElement( "div" ); container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; body.appendChild( container ).appendChild( div ); // Support: IE6 // Check if elements with layout shrink-wrap their children if ( typeof div.style.zoom !== strundefined ) { // Reset CSS: box-sizing; display; margin; border div.style.cssText = // Support: Firefox<29, Android 2.3 // Vendor-prefix box-sizing "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + "box-sizing:content-box;display:block;margin:0;border:0;" + "padding:1px;width:1px;zoom:1"; div.appendChild( document.createElement( "div" ) ).style.width = "5px"; shrinkWrapBlocksVal = div.offsetWidth !== 3; } body.removeChild( container ); return shrinkWrapBlocksVal; }; })(); var rmargin = (/^margin/); var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); var getStyles, curCSS, rposition = /^(top|right|bottom|left)$/; if ( window.getComputedStyle ) { getStyles = function( elem ) { return elem.ownerDocument.defaultView.getComputedStyle( elem, null ); }; curCSS = function( elem, name, computed ) { var width, minWidth, maxWidth, ret, style = elem.style; computed = computed || getStyles( elem ); // getPropertyValue is only needed for .css('filter') in IE9, see #12537 ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined; if ( computed ) { if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { ret = jQuery.style( elem, name ); } // A tribute to the "awesome hack by Dean Edwards" // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { // Remember the original values width = style.width; minWidth = style.minWidth; maxWidth = style.maxWidth; // Put in the new values to get a computed value out style.minWidth = style.maxWidth = style.width = ret; ret = computed.width; // Revert the changed values style.width = width; style.minWidth = minWidth; style.maxWidth = maxWidth; } } // Support: IE // IE returns zIndex value as an integer. return ret === undefined ? ret : ret + ""; }; } else if ( document.documentElement.currentStyle ) { getStyles = function( elem ) { return elem.currentStyle; }; curCSS = function( elem, name, computed ) { var left, rs, rsLeft, ret, style = elem.style; computed = computed || getStyles( elem ); ret = computed ? computed[ name ] : undefined; // Avoid setting ret to empty string here // so we don't default to auto if ( ret == null && style && style[ name ] ) { ret = style[ name ]; } // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // but not position css attributes, as those are proportional to the parent element instead // and we can't measure the parent instead because it might trigger a "stacking dolls" problem if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { // Remember the original values left = style.left; rs = elem.runtimeStyle; rsLeft = rs && rs.left; // Put in the new values to get a computed value out if ( rsLeft ) { rs.left = elem.currentStyle.left; } style.left = name === "fontSize" ? "1em" : ret; ret = style.pixelLeft + "px"; // Revert the changed values style.left = left; if ( rsLeft ) { rs.left = rsLeft; } } // Support: IE // IE returns zIndex value as an integer. return ret === undefined ? ret : ret + "" || "auto"; }; } function addGetHookIf( conditionFn, hookFn ) { // Define the hook, we'll check on the first run if it's really needed. return { get: function() { var condition = conditionFn(); if ( condition == null ) { // The test was not ready at this point; screw the hook this time // but check again when needed next time. return; } if ( condition ) { // Hook not needed (or it's not possible to use it due to missing dependency), // remove it. // Since there are no other hooks for marginRight, remove the whole object. delete this.get; return; } // Hook needed; redefine it so that the support test is not executed again. return (this.get = hookFn).apply( this, arguments ); } }; } (function() { // Minified: var b,c,d,e,f,g, h,i var div, style, a, pixelPositionVal, boxSizingReliableVal, reliableHiddenOffsetsVal, reliableMarginRightVal; // Setup div = document.createElement( "div" ); div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; a = div.getElementsByTagName( "a" )[ 0 ]; style = a && a.style; // Finish early in limited (non-browser) environments if ( !style ) { return; } style.cssText = "float:left;opacity:.5"; // Support: IE<9 // Make sure that element opacity exists (as opposed to filter) support.opacity = style.opacity === "0.5"; // Verify style float existence // (IE uses styleFloat instead of cssFloat) support.cssFloat = !!style.cssFloat; div.style.backgroundClip = "content-box"; div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; // Support: Firefox<29, Android 2.3 // Vendor-prefix box-sizing support.boxSizing = style.boxSizing === "" || style.MozBoxSizing === "" || style.WebkitBoxSizing === ""; jQuery.extend(support, { reliableHiddenOffsets: function() { if ( reliableHiddenOffsetsVal == null ) { computeStyleTests(); } return reliableHiddenOffsetsVal; }, boxSizingReliable: function() { if ( boxSizingReliableVal == null ) { computeStyleTests(); } return boxSizingReliableVal; }, pixelPosition: function() { if ( pixelPositionVal == null ) { computeStyleTests(); } return pixelPositionVal; }, // Support: Android 2.3 reliableMarginRight: function() { if ( reliableMarginRightVal == null ) { computeStyleTests(); } return reliableMarginRightVal; } }); function computeStyleTests() { // Minified: var b,c,d,j var div, body, container, contents; body = document.getElementsByTagName( "body" )[ 0 ]; if ( !body || !body.style ) { // Test fired too early or in an unsupported environment, exit. return; } // Setup div = document.createElement( "div" ); container = document.createElement( "div" ); container.style.cssText = "position:absolute;border:0;width:0;height:0;top:0;left:-9999px"; body.appendChild( container ).appendChild( div ); div.style.cssText = // Support: Firefox<29, Android 2.3 // Vendor-prefix box-sizing "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" + "box-sizing:border-box;display:block;margin-top:1%;top:1%;" + "border:1px;padding:1px;width:4px;position:absolute"; // Support: IE<9 // Assume reasonable values in the absence of getComputedStyle pixelPositionVal = boxSizingReliableVal = false; reliableMarginRightVal = true; // Check for getComputedStyle so that this code is not run in IE<9. if ( window.getComputedStyle ) { pixelPositionVal = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; boxSizingReliableVal = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; // Support: Android 2.3 // Div with explicit width and no margin-right incorrectly // gets computed margin-right based on width of container (#3333) // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right contents = div.appendChild( document.createElement( "div" ) ); // Reset CSS: box-sizing; display; margin; border; padding contents.style.cssText = div.style.cssText = // Support: Firefox<29, Android 2.3 // Vendor-prefix box-sizing "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" + "box-sizing:content-box;display:block;margin:0;border:0;padding:0"; contents.style.marginRight = contents.style.width = "0"; div.style.width = "1px"; reliableMarginRightVal = !parseFloat( ( window.getComputedStyle( contents, null ) || {} ).marginRight ); } // Support: IE8 // Check if table cells still have offsetWidth/Height when they are set // to display:none and there are still other visible table cells in a // table row; if so, offsetWidth/Height are not reliable for use when // determining if an element has been hidden directly using // display:none (it is still safe to use offsets if a parent element is // hidden; don safety goggles and see bug #4512 for more information). div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; contents = div.getElementsByTagName( "td" ); contents[ 0 ].style.cssText = "margin:0;border:0;padding:0;display:none"; reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0; if ( reliableHiddenOffsetsVal ) { contents[ 0 ].style.display = ""; contents[ 1 ].style.display = "none"; reliableHiddenOffsetsVal = contents[ 0 ].offsetHeight === 0; } body.removeChild( container ); } })(); // A method for quickly swapping in/out CSS properties to get correct calculations. jQuery.swap = function( elem, options, callback, args ) { var ret, name, old = {}; // Remember the old values, and insert the new ones for ( name in options ) { old[ name ] = elem.style[ name ]; elem.style[ name ] = options[ name ]; } ret = callback.apply( elem, args || [] ); // Revert the old values for ( name in options ) { elem.style[ name ] = old[ name ]; } return ret; }; var ralpha = /alpha\([^)]*\)/i, ropacity = /opacity\s*=\s*([^)]*)/, // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display rdisplayswap = /^(none|table(?!-c[ea]).+)/, rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ), rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ), cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = { letterSpacing: "0", fontWeight: "400" }, cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; // return a css property mapped to a potentially vendor prefixed property function vendorPropName( style, name ) { // shortcut for names that are not vendor prefixed if ( name in style ) { return name; } // check for vendor prefixed names var capName = name.charAt(0).toUpperCase() + name.slice(1), origName = name, i = cssPrefixes.length; while ( i-- ) { name = cssPrefixes[ i ] + capName; if ( name in style ) { return name; } } return origName; } function showHide( elements, show ) { var display, elem, hidden, values = [], index = 0, length = elements.length; for ( ; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } values[ index ] = jQuery._data( elem, "olddisplay" ); display = elem.style.display; if ( show ) { // Reset the inline display of this element to learn if it is // being hidden by cascaded rules or not if ( !values[ index ] && display === "none" ) { elem.style.display = ""; } // Set elements which have been overridden with display: none // in a stylesheet to whatever the default browser style is // for such an element if ( elem.style.display === "" && isHidden( elem ) ) { values[ index ] = jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) ); } } else { hidden = isHidden( elem ); if ( display && display !== "none" || !hidden ) { jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); } } } // Set the display of most of the elements in a second loop // to avoid the constant reflow for ( index = 0; index < length; index++ ) { elem = elements[ index ]; if ( !elem.style ) { continue; } if ( !show || elem.style.display === "none" || elem.style.display === "" ) { elem.style.display = show ? values[ index ] || "" : "none"; } } return elements; } function setPositiveNumber( elem, value, subtract ) { var matches = rnumsplit.exec( value ); return matches ? // Guard against undefined "subtract", e.g., when used as in cssHooks Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : value; } function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { var i = extra === ( isBorderBox ? "border" : "content" ) ? // If we already have the right measurement, avoid augmentation 4 : // Otherwise initialize for horizontal or vertical properties name === "width" ? 1 : 0, val = 0; for ( ; i < 4; i += 2 ) { // both box models exclude margin, so add it if we want it if ( extra === "margin" ) { val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); } if ( isBorderBox ) { // border-box includes padding, so remove it if we want content if ( extra === "content" ) { val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); } // at this point, extra isn't border nor margin, so remove border if ( extra !== "margin" ) { val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } else { // at this point, extra isn't content, so add padding val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); // at this point, extra isn't content nor padding, so add border if ( extra !== "padding" ) { val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } } return val; } function getWidthOrHeight( elem, name, extra ) { // Start with offset property, which is equivalent to the border-box value var valueIsBorderBox = true, val = name === "width" ? elem.offsetWidth : elem.offsetHeight, styles = getStyles( elem ), isBorderBox = support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; // some non-html elements return undefined for offsetWidth, so check for null/undefined // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 if ( val <= 0 || val == null ) { // Fall back to computed then uncomputed css if necessary val = curCSS( elem, name, styles ); if ( val < 0 || val == null ) { val = elem.style[ name ]; } // Computed unit is not pixels. Stop here and return. if ( rnumnonpx.test(val) ) { return val; } // we need the check for style in case a browser which returns unreliable values // for getComputedStyle silently falls back to the reliable elem.style valueIsBorderBox = isBorderBox && ( support.boxSizingReliable() || val === elem.style[ name ] ); // Normalize "", auto, and prepare for extra val = parseFloat( val ) || 0; } // use the active box-sizing model to add/subtract irrelevant styles return ( val + augmentWidthOrHeight( elem, name, extra || ( isBorderBox ? "border" : "content" ), valueIsBorderBox, styles ) ) + "px"; } jQuery.extend({ // Add in style property hooks for overriding the default // behavior of getting and setting a style property cssHooks: { opacity: { get: function( elem, computed ) { if ( computed ) { // We should always get a number back from opacity var ret = curCSS( elem, "opacity" ); return ret === "" ? "1" : ret; } } } }, // Don't automatically add "px" to these possibly-unitless properties cssNumber: { "columnCount": true, "fillOpacity": true, "flexGrow": true, "flexShrink": true, "fontWeight": true, "lineHeight": true, "opacity": true, "order": true, "orphans": true, "widows": true, "zIndex": true, "zoom": true }, // Add in properties whose names you wish to fix before // setting or getting the value cssProps: { // normalize float css property "float": support.cssFloat ? "cssFloat" : "styleFloat" }, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { // Don't set styles on text and comment nodes if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { return; } // Make sure that we're working with the right name var ret, type, hooks, origName = jQuery.camelCase( name ), style = elem.style; name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); // gets hook for the prefixed version // followed by the unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // Check if we're setting a value if ( value !== undefined ) { type = typeof value; // convert relative number strings (+= or -=) to relative numbers. #7345 if ( type === "string" && (ret = rrelNum.exec( value )) ) { value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); // Fixes bug #9237 type = "number"; } // Make sure that null and NaN values aren't set. See: #7116 if ( value == null || value !== value ) { return; } // If a number was passed in, add 'px' to the (except for certain CSS properties) if ( type === "number" && !jQuery.cssNumber[ origName ] ) { value += "px"; } // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, // but it would mean to define eight (for every problematic property) identical functions if ( !support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { style[ name ] = "inherit"; } // If a hook was provided, use that value, otherwise just set the specified value if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { // Support: IE // Swallow errors from 'invalid' CSS values (#5509) try { style[ name ] = value; } catch(e) {} } } else { // If a hook was provided get the non-computed value from there if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { return ret; } // Otherwise just get the value from the style object return style[ name ]; } }, css: function( elem, name, extra, styles ) { var num, val, hooks, origName = jQuery.camelCase( name ); // Make sure that we're working with the right name name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); // gets hook for the prefixed version // followed by the unprefixed version hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; // If a hook was provided get the computed value from there if ( hooks && "get" in hooks ) { val = hooks.get( elem, true, extra ); } // Otherwise, if a way to get the computed value exists, use that if ( val === undefined ) { val = curCSS( elem, name, styles ); } //convert "normal" to computed value if ( val === "normal" && name in cssNormalTransform ) { val = cssNormalTransform[ name ]; } // Return, converting to number if forced or a qualifier was provided and val looks numeric if ( extra === "" || extra ) { num = parseFloat( val ); return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; } return val; } }); jQuery.each([ "height", "width" ], function( i, name ) { jQuery.cssHooks[ name ] = { get: function( elem, computed, extra ) { if ( computed ) { // certain elements can have dimension info if we invisibly show them // however, it must have a current display style that would benefit from this return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ? jQuery.swap( elem, cssShow, function() { return getWidthOrHeight( elem, name, extra ); }) : getWidthOrHeight( elem, name, extra ); } }, set: function( elem, value, extra ) { var styles = extra && getStyles( elem ); return setPositiveNumber( elem, value, extra ? augmentWidthOrHeight( elem, name, extra, support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", styles ) : 0 ); } }; }); if ( !support.opacity ) { jQuery.cssHooks.opacity = { get: function( elem, computed ) { // IE uses filters for opacity return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : computed ? "1" : ""; }, set: function( elem, value ) { var style = elem.style, currentStyle = elem.currentStyle, opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", filter = currentStyle && currentStyle.filter || style.filter || ""; // IE has trouble with opacity if it does not have layout // Force it by setting the zoom level style.zoom = 1; // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 // if value === "", then remove inline opacity #12685 if ( ( value >= 1 || value === "" ) && jQuery.trim( filter.replace( ralpha, "" ) ) === "" && style.removeAttribute ) { // Setting style.filter to null, "" & " " still leave "filter:" in the cssText // if "filter:" is present at all, clearType is disabled, we want to avoid this // style.removeAttribute is IE Only, but so apparently is this code path... style.removeAttribute( "filter" ); // if there is no filter style applied in a css rule or unset inline opacity, we are done if ( value === "" || currentStyle && !currentStyle.filter ) { return; } } // otherwise, set new filter values style.filter = ralpha.test( filter ) ? filter.replace( ralpha, opacity ) : filter + " " + opacity; } }; } jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight, function( elem, computed ) { if ( computed ) { // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right // Work around by temporarily setting element display to inline-block return jQuery.swap( elem, { "display": "inline-block" }, curCSS, [ elem, "marginRight" ] ); } } ); // These hooks are used by animate to expand properties jQuery.each({ margin: "", padding: "", border: "Width" }, function( prefix, suffix ) { jQuery.cssHooks[ prefix + suffix ] = { expand: function( value ) { var i = 0, expanded = {}, // assumes a single number if not a string parts = typeof value === "string" ? value.split(" ") : [ value ]; for ( ; i < 4; i++ ) { expanded[ prefix + cssExpand[ i ] + suffix ] = parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; } return expanded; } }; if ( !rmargin.test( prefix ) ) { jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; } }); jQuery.fn.extend({ css: function( name, value ) { return access( this, function( elem, name, value ) { var styles, len, map = {}, i = 0; if ( jQuery.isArray( name ) ) { styles = getStyles( elem ); len = name.length; for ( ; i < len; i++ ) { map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); } return map; } return value !== undefined ? jQuery.style( elem, name, value ) : jQuery.css( elem, name ); }, name, value, arguments.length > 1 ); }, show: function() { return showHide( this, true ); }, hide: function() { return showHide( this ); }, toggle: function( state ) { if ( typeof state === "boolean" ) { return state ? this.show() : this.hide(); } return this.each(function() { if ( isHidden( this ) ) { jQuery( this ).show(); } else { jQuery( this ).hide(); } }); } }); function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); } jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; this.easing = easing || "swing"; this.options = options; this.start = this.now = this.cur(); this.end = end; this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); }, cur: function() { var hooks = Tween.propHooks[ this.prop ]; return hooks && hooks.get ? hooks.get( this ) : Tween.propHooks._default.get( this ); }, run: function( percent ) { var eased, hooks = Tween.propHooks[ this.prop ]; if ( this.options.duration ) { this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); } else { this.pos = eased = percent; } this.now = ( this.end - this.start ) * eased + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } if ( hooks && hooks.set ) { hooks.set( this ); } else { Tween.propHooks._default.set( this ); } return this; } }; Tween.prototype.init.prototype = Tween.prototype; Tween.propHooks = { _default: { get: function( tween ) { var result; if ( tween.elem[ tween.prop ] != null && (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { return tween.elem[ tween.prop ]; } // passing an empty string as a 3rd parameter to .css will automatically // attempt a parseFloat and fallback to a string if the parse fails // so, simple values such as "10px" are parsed to Float. // complex values such as "rotate(1rad)" are returned as is. result = jQuery.css( tween.elem, tween.prop, "" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { // use step hook for back compat - use cssHook if its there - use .style if its // available and use plain properties where available if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; } } } }; // Support: IE <=9 // Panic based approach to setting things on disconnected nodes Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { if ( tween.elem.nodeType && tween.elem.parentNode ) { tween.elem[ tween.prop ] = tween.now; } } }; jQuery.easing = { linear: function( p ) { return p; }, swing: function( p ) { return 0.5 - Math.cos( p * Math.PI ) / 2; } }; jQuery.fx = Tween.prototype.init; // Back Compat <1.8 extension point jQuery.fx.step = {}; var fxNow, timerId, rfxtypes = /^(?:toggle|show|hide)$/, rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ), rrun = /queueHooks$/, animationPrefilters = [ defaultPrefilter ], tweeners = { "*": [ function( prop, value ) { var tween = this.createTween( prop, value ), target = tween.cur(), parts = rfxnum.exec( value ), unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), // Starting value computation is required for potential unit mismatches start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) && rfxnum.exec( jQuery.css( tween.elem, prop ) ), scale = 1, maxIterations = 20; if ( start && start[ 3 ] !== unit ) { // Trust units reported by jQuery.css unit = unit || start[ 3 ]; // Make sure we update the tween properties later on parts = parts || []; // Iteratively approximate from a nonzero starting point start = +target || 1; do { // If previous iteration zeroed out, double until we get *something* // Use a string for doubling factor so we don't accidentally see scale as unchanged below scale = scale || ".5"; // Adjust and apply start = start / scale; jQuery.style( tween.elem, prop, start + unit ); // Update scale, tolerating zero or NaN from tween.cur() // And breaking the loop if scale is unchanged or perfect, or if we've just had enough } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); } // Update tween properties if ( parts ) { start = tween.start = +start || +target || 0; tween.unit = unit; // If a +=/-= token was provided, we're doing a relative animation tween.end = parts[ 1 ] ? start + ( parts[ 1 ] + 1 ) * parts[ 2 ] : +parts[ 2 ]; } return tween; } ] }; // Animations created synchronously will run synchronously function createFxNow() { setTimeout(function() { fxNow = undefined; }); return ( fxNow = jQuery.now() ); } // Generate parameters to create a standard animation function genFx( type, includeWidth ) { var which, attrs = { height: type }, i = 0; // if we include width, step value is 1 to do all cssExpand values, // if we don't include width, step value is 2 to skip over Left and Right includeWidth = includeWidth ? 1 : 0; for ( ; i < 4 ; i += 2 - includeWidth ) { which = cssExpand[ i ]; attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; } if ( includeWidth ) { attrs.opacity = attrs.width = type; } return attrs; } function createTween( value, prop, animation ) { var tween, collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), index = 0, length = collection.length; for ( ; index < length; index++ ) { if ( (tween = collection[ index ].call( animation, prop, value )) ) { // we're done with this property return tween; } } } function defaultPrefilter( elem, props, opts ) { /* jshint validthis: true */ var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHidden( elem ), dataShow = jQuery._data( elem, "fxshow" ); // handle queue: false promises if ( !opts.queue ) { hooks = jQuery._queueHooks( elem, "fx" ); if ( hooks.unqueued == null ) { hooks.unqueued = 0; oldfire = hooks.empty.fire; hooks.empty.fire = function() { if ( !hooks.unqueued ) { oldfire(); } }; } hooks.unqueued++; anim.always(function() { // doing this makes sure that the complete handler will be called // before this completes anim.always(function() { hooks.unqueued--; if ( !jQuery.queue( elem, "fx" ).length ) { hooks.empty.fire(); } }); }); } // height/width overflow pass if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { // Make sure that nothing sneaks out // Record all 3 overflow attributes because IE does not // change the overflow attribute when overflowX and // overflowY are set to the same value opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; // Set display property to inline-block for height/width // animations on inline elements that are having width/height animated display = jQuery.css( elem, "display" ); // Test default display if display is currently "none" checkDisplay = display === "none" ? jQuery._data( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display; if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) { // inline-level elements accept inline-block; // block-level elements need to be inline with layout if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) { style.display = "inline-block"; } else { style.zoom = 1; } } } if ( opts.overflow ) { style.overflow = "hidden"; if ( !support.shrinkWrapBlocks() ) { anim.always(function() { style.overflow = opts.overflow[ 0 ]; style.overflowX = opts.overflow[ 1 ]; style.overflowY = opts.overflow[ 2 ]; }); } } // show/hide pass for ( prop in props ) { value = props[ prop ]; if ( rfxtypes.exec( value ) ) { delete props[ prop ]; toggle = toggle || value === "toggle"; if ( value === ( hidden ? "hide" : "show" ) ) { // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { hidden = true; } else { continue; } } orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); // Any non-fx value stops us from restoring the original display value } else { display = undefined; } } if ( !jQuery.isEmptyObject( orig ) ) { if ( dataShow ) { if ( "hidden" in dataShow ) { hidden = dataShow.hidden; } } else { dataShow = jQuery._data( elem, "fxshow", {} ); } // store state if its toggle - enables .stop().toggle() to "reverse" if ( toggle ) { dataShow.hidden = !hidden; } if ( hidden ) { jQuery( elem ).show(); } else { anim.done(function() { jQuery( elem ).hide(); }); } anim.done(function() { var prop; jQuery._removeData( elem, "fxshow" ); for ( prop in orig ) { jQuery.style( elem, prop, orig[ prop ] ); } }); for ( prop in orig ) { tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); if ( !( prop in dataShow ) ) { dataShow[ prop ] = tween.start; if ( hidden ) { tween.end = tween.start; tween.start = prop === "width" || prop === "height" ? 1 : 0; } } } // If this is a noop like .hide().hide(), restore an overwritten display value } else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) { style.display = display; } } function propFilter( props, specialEasing ) { var index, name, easing, value, hooks; // camelCase, specialEasing and expand cssHook pass for ( index in props ) { name = jQuery.camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; if ( jQuery.isArray( value ) ) { easing = value[ 1 ]; value = props[ index ] = value[ 0 ]; } if ( index !== name ) { props[ name ] = value; delete props[ index ]; } hooks = jQuery.cssHooks[ name ]; if ( hooks && "expand" in hooks ) { value = hooks.expand( value ); delete props[ name ]; // not quite $.extend, this wont overwrite keys already present. // also - reusing 'index' from above because we have the correct "name" for ( index in value ) { if ( !( index in props ) ) { props[ index ] = value[ index ]; specialEasing[ index ] = easing; } } } else { specialEasing[ name ] = easing; } } } function Animation( elem, properties, options ) { var result, stopped, index = 0, length = animationPrefilters.length, deferred = jQuery.Deferred().always( function() { // don't match elem in the :animated selector delete tick.elem; }), tick = function() { if ( stopped ) { return false; } var currentTime = fxNow || createFxNow(), remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) temp = remaining / animation.duration || 0, percent = 1 - temp, index = 0, length = animation.tweens.length; for ( ; index < length ; index++ ) { animation.tweens[ index ].run( percent ); } deferred.notifyWith( elem, [ animation, percent, remaining ]); if ( percent < 1 && length ) { return remaining; } else { deferred.resolveWith( elem, [ animation ] ); return false; } }, animation = deferred.promise({ elem: elem, props: jQuery.extend( {}, properties ), opts: jQuery.extend( true, { specialEasing: {} }, options ), originalProperties: properties, originalOptions: options, startTime: fxNow || createFxNow(), duration: options.duration, tweens: [], createTween: function( prop, end ) { var tween = jQuery.Tween( elem, animation.opts, prop, end, animation.opts.specialEasing[ prop ] || animation.opts.easing ); animation.tweens.push( tween ); return tween; }, stop: function( gotoEnd ) { var index = 0, // if we are going to the end, we want to run all the tweens // otherwise we skip this part length = gotoEnd ? animation.tweens.length : 0; if ( stopped ) { return this; } stopped = true; for ( ; index < length ; index++ ) { animation.tweens[ index ].run( 1 ); } // resolve when we played the last frame // otherwise, reject if ( gotoEnd ) { deferred.resolveWith( elem, [ animation, gotoEnd ] ); } else { deferred.rejectWith( elem, [ animation, gotoEnd ] ); } return this; } }), props = animation.props; propFilter( props, animation.opts.specialEasing ); for ( ; index < length ; index++ ) { result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { return result; } } jQuery.map( props, createTween, animation ); if ( jQuery.isFunction( animation.opts.start ) ) { animation.opts.start.call( elem, animation ); } jQuery.fx.timer( jQuery.extend( tick, { elem: elem, anim: animation, queue: animation.opts.queue }) ); // attach callbacks from options return animation.progress( animation.opts.progress ) .done( animation.opts.done, animation.opts.complete ) .fail( animation.opts.fail ) .always( animation.opts.always ); } jQuery.Animation = jQuery.extend( Animation, { tweener: function( props, callback ) { if ( jQuery.isFunction( props ) ) { callback = props; props = [ "*" ]; } else { props = props.split(" "); } var prop, index = 0, length = props.length; for ( ; index < length ; index++ ) { prop = props[ index ]; tweeners[ prop ] = tweeners[ prop ] || []; tweeners[ prop ].unshift( callback ); } }, prefilter: function( callback, prepend ) { if ( prepend ) { animationPrefilters.unshift( callback ); } else { animationPrefilters.push( callback ); } } }); jQuery.speed = function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing }; opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; // normalize opt.queue - true/undefined/null -> "fx" if ( opt.queue == null || opt.queue === true ) { opt.queue = "fx"; } // Queueing opt.old = opt.complete; opt.complete = function() { if ( jQuery.isFunction( opt.old ) ) { opt.old.call( this ); } if ( opt.queue ) { jQuery.dequeue( this, opt.queue ); } }; return opt; }; jQuery.fn.extend({ fadeTo: function( speed, to, easing, callback ) { // show any hidden elements after setting opacity to 0 return this.filter( isHidden ).css( "opacity", 0 ).show() // animate to the value specified .end().animate({ opacity: to }, speed, easing, callback ); }, animate: function( prop, speed, easing, callback ) { var empty = jQuery.isEmptyObject( prop ), optall = jQuery.speed( speed, easing, callback ), doAnimation = function() { // Operate on a copy of prop so per-property easing won't be lost var anim = Animation( this, jQuery.extend( {}, prop ), optall ); // Empty animations, or finishing resolves immediately if ( empty || jQuery._data( this, "finish" ) ) { anim.stop( true ); } }; doAnimation.finish = doAnimation; return empty || optall.queue === false ? this.each( doAnimation ) : this.queue( optall.queue, doAnimation ); }, stop: function( type, clearQueue, gotoEnd ) { var stopQueue = function( hooks ) { var stop = hooks.stop; delete hooks.stop; stop( gotoEnd ); }; if ( typeof type !== "string" ) { gotoEnd = clearQueue; clearQueue = type; type = undefined; } if ( clearQueue && type !== false ) { this.queue( type || "fx", [] ); } return this.each(function() { var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = jQuery._data( this ); if ( index ) { if ( data[ index ] && data[ index ].stop ) { stopQueue( data[ index ] ); } } else { for ( index in data ) { if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { stopQueue( data[ index ] ); } } } for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { timers[ index ].anim.stop( gotoEnd ); dequeue = false; timers.splice( index, 1 ); } } // start the next in the queue if the last step wasn't forced // timers currently will call their complete callbacks, which will dequeue // but only if they were gotoEnd if ( dequeue || !gotoEnd ) { jQuery.dequeue( this, type ); } }); }, finish: function( type ) { if ( type !== false ) { type = type || "fx"; } return this.each(function() { var index, data = jQuery._data( this ), queue = data[ type + "queue" ], hooks = data[ type + "queueHooks" ], timers = jQuery.timers, length = queue ? queue.length : 0; // enable finishing flag on private data data.finish = true; // empty the queue first jQuery.queue( this, type, [] ); if ( hooks && hooks.stop ) { hooks.stop.call( this, true ); } // look for any active animations, and finish them for ( index = timers.length; index--; ) { if ( timers[ index ].elem === this && timers[ index ].queue === type ) { timers[ index ].anim.stop( true ); timers.splice( index, 1 ); } } // look for any animations in the old queue and finish them for ( index = 0; index < length; index++ ) { if ( queue[ index ] && queue[ index ].finish ) { queue[ index ].finish.call( this ); } } // turn off finishing flag delete data.finish; }); } }); jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? cssFn.apply( this, arguments ) : this.animate( genFx( name, true ), speed, easing, callback ); }; }); // Generate shortcuts for custom animations jQuery.each({ slideDown: genFx("show"), slideUp: genFx("hide"), slideToggle: genFx("toggle"), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }, fadeToggle: { opacity: "toggle" } }, function( name, props ) { jQuery.fn[ name ] = function( speed, easing, callback ) { return this.animate( props, speed, easing, callback ); }; }); jQuery.timers = []; jQuery.fx.tick = function() { var timer, timers = jQuery.timers, i = 0; fxNow = jQuery.now(); for ( ; i < timers.length; i++ ) { timer = timers[ i ]; // Checks the timer has not already been removed if ( !timer() && timers[ i ] === timer ) { timers.splice( i--, 1 ); } } if ( !timers.length ) { jQuery.fx.stop(); } fxNow = undefined; }; jQuery.fx.timer = function( timer ) { jQuery.timers.push( timer ); if ( timer() ) { jQuery.fx.start(); } else { jQuery.timers.pop(); } }; jQuery.fx.interval = 13; jQuery.fx.start = function() { if ( !timerId ) { timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); } }; jQuery.fx.stop = function() { clearInterval( timerId ); timerId = null; }; jQuery.fx.speeds = { slow: 600, fast: 200, // Default speed _default: 400 }; // Based off of the plugin by Clint Helfers, with permission. // http://blindsignals.com/index.php/2009/07/jquery-delay/ jQuery.fn.delay = function( time, type ) { time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; type = type || "fx"; return this.queue( type, function( next, hooks ) { var timeout = setTimeout( next, time ); hooks.stop = function() { clearTimeout( timeout ); }; }); }; (function() { // Minified: var a,b,c,d,e var input, div, select, a, opt; // Setup div = document.createElement( "div" ); div.setAttribute( "className", "t" ); div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; a = div.getElementsByTagName("a")[ 0 ]; // First batch of tests. select = document.createElement("select"); opt = select.appendChild( document.createElement("option") ); input = div.getElementsByTagName("input")[ 0 ]; a.style.cssText = "top:1px"; // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) support.getSetAttribute = div.className !== "t"; // Get the style information from getAttribute // (IE uses .cssText instead) support.style = /top/.test( a.getAttribute("style") ); // Make sure that URLs aren't manipulated // (IE normalizes it by default) support.hrefNormalized = a.getAttribute("href") === "/a"; // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) support.checkOn = !!input.value; // Make sure that a selected-by-default option has a working selected property. // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) support.optSelected = opt.selected; // Tests for enctype support on a form (#6743) support.enctype = !!document.createElement("form").enctype; // Make sure that the options inside disabled selects aren't marked as disabled // (WebKit marks them as disabled) select.disabled = true; support.optDisabled = !opt.disabled; // Support: IE8 only // Check if we can trust getAttribute("value") input = document.createElement( "input" ); input.setAttribute( "value", "" ); support.input = input.getAttribute( "value" ) === ""; // Check if an input maintains its value after becoming a radio input.value = "t"; input.setAttribute( "type", "radio" ); support.radioValue = input.value === "t"; })(); var rreturn = /\r/g; jQuery.fn.extend({ val: function( value ) { var hooks, ret, isFunction, elem = this[0]; if ( !arguments.length ) { if ( elem ) { hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { return ret; } ret = elem.value; return typeof ret === "string" ? // handle most common string cases ret.replace(rreturn, "") : // handle cases where value is null/undef or number ret == null ? "" : ret; } return; } isFunction = jQuery.isFunction( value ); return this.each(function( i ) { var val; if ( this.nodeType !== 1 ) { return; } if ( isFunction ) { val = value.call( this, i, jQuery( this ).val() ); } else { val = value; } // Treat null/undefined as ""; convert numbers to string if ( val == null ) { val = ""; } else if ( typeof val === "number" ) { val += ""; } else if ( jQuery.isArray( val ) ) { val = jQuery.map( val, function( value ) { return value == null ? "" : value + ""; }); } hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; // If set returns undefined, fall back to normal setting if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { this.value = val; } }); } }); jQuery.extend({ valHooks: { option: { get: function( elem ) { var val = jQuery.find.attr( elem, "value" ); return val != null ? val : // Support: IE10-11+ // option.text throws exceptions (#14686, #14858) jQuery.trim( jQuery.text( elem ) ); } }, select: { get: function( elem ) { var value, option, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one" || index < 0, values = one ? null : [], max = one ? index + 1 : options.length, i = index < 0 ? max : one ? index : 0; // Loop through all the selected options for ( ; i < max; i++ ) { option = options[ i ]; // oldIE doesn't update selected after form reset (#2551) if ( ( option.selected || i === index ) && // Don't return options that are disabled or in a disabled optgroup ( support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { // Get the specific value for the option value = jQuery( option ).val(); // We don't need an array for one selects if ( one ) { return value; } // Multi-Selects return an array values.push( value ); } } return values; }, set: function( elem, value ) { var optionSet, option, options = elem.options, values = jQuery.makeArray( value ), i = options.length; while ( i-- ) { option = options[ i ]; if ( jQuery.inArray( jQuery.valHooks.option.get( option ), values ) >= 0 ) { // Support: IE6 // When new option element is added to select box we need to // force reflow of newly added node in order to workaround delay // of initialization properties try { option.selected = optionSet = true; } catch ( _ ) { // Will be executed only in IE6 option.scrollHeight; } } else { option.selected = false; } } // Force browsers to behave consistently when non-matching value is set if ( !optionSet ) { elem.selectedIndex = -1; } return options; } } } }); // Radios and checkboxes getter/setter jQuery.each([ "radio", "checkbox" ], function() { jQuery.valHooks[ this ] = { set: function( elem, value ) { if ( jQuery.isArray( value ) ) { return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); } } }; if ( !support.checkOn ) { jQuery.valHooks[ this ].get = function( elem ) { // Support: Webkit // "" is returned instead of "on" if a value isn't specified return elem.getAttribute("value") === null ? "on" : elem.value; }; } }); var nodeHook, boolHook, attrHandle = jQuery.expr.attrHandle, ruseDefault = /^(?:checked|selected)$/i, getSetAttribute = support.getSetAttribute, getSetInput = support.input; jQuery.fn.extend({ attr: function( name, value ) { return access( this, jQuery.attr, name, value, arguments.length > 1 ); }, removeAttr: function( name ) { return this.each(function() { jQuery.removeAttr( this, name ); }); } }); jQuery.extend({ attr: function( elem, name, value ) { var hooks, ret, nType = elem.nodeType; // don't get/set attributes on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } // Fallback to prop when attributes are not supported if ( typeof elem.getAttribute === strundefined ) { return jQuery.prop( elem, name, value ); } // All attributes are lowercase // Grab necessary hook if one is defined if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { name = name.toLowerCase(); hooks = jQuery.attrHooks[ name ] || ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); } if ( value !== undefined ) { if ( value === null ) { jQuery.removeAttr( elem, name ); } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { return ret; } else { elem.setAttribute( name, value + "" ); return value; } } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { return ret; } else { ret = jQuery.find.attr( elem, name ); // Non-existent attributes return null, we normalize to undefined return ret == null ? undefined : ret; } }, removeAttr: function( elem, value ) { var name, propName, i = 0, attrNames = value && value.match( rnotwhite ); if ( attrNames && elem.nodeType === 1 ) { while ( (name = attrNames[i++]) ) { propName = jQuery.propFix[ name ] || name; // Boolean attributes get special treatment (#10870) if ( jQuery.expr.match.bool.test( name ) ) { // Set corresponding property to false if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { elem[ propName ] = false; // Support: IE<9 // Also clear defaultChecked/defaultSelected (if appropriate) } else { elem[ jQuery.camelCase( "default-" + name ) ] = elem[ propName ] = false; } // See #9699 for explanation of this approach (setting first, then removal) } else { jQuery.attr( elem, name, "" ); } elem.removeAttribute( getSetAttribute ? name : propName ); } } }, attrHooks: { type: { set: function( elem, value ) { if ( !support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { // Setting the type on a radio button after the value resets the value in IE6-9 // Reset value to default in case type is set after value during creation var val = elem.value; elem.setAttribute( "type", value ); if ( val ) { elem.value = val; } return value; } } } } }); // Hook for boolean attributes boolHook = { set: function( elem, value, name ) { if ( value === false ) { // Remove boolean attributes when set to false jQuery.removeAttr( elem, name ); } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { // IE<8 needs the *property* name elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); // Use defaultChecked and defaultSelected for oldIE } else { elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; } return name; } }; // Retrieve booleans specially jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { var getter = attrHandle[ name ] || jQuery.find.attr; attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? function( elem, name, isXML ) { var ret, handle; if ( !isXML ) { // Avoid an infinite loop by temporarily removing this function from the getter handle = attrHandle[ name ]; attrHandle[ name ] = ret; ret = getter( elem, name, isXML ) != null ? name.toLowerCase() : null; attrHandle[ name ] = handle; } return ret; } : function( elem, name, isXML ) { if ( !isXML ) { return elem[ jQuery.camelCase( "default-" + name ) ] ? name.toLowerCase() : null; } }; }); // fix oldIE attroperties if ( !getSetInput || !getSetAttribute ) { jQuery.attrHooks.value = { set: function( elem, value, name ) { if ( jQuery.nodeName( elem, "input" ) ) { // Does not return so that setAttribute is also used elem.defaultValue = value; } else { // Use nodeHook if defined (#1954); otherwise setAttribute is fine return nodeHook && nodeHook.set( elem, value, name ); } } }; } // IE6/7 do not support getting/setting some attributes with get/setAttribute if ( !getSetAttribute ) { // Use this for any attribute in IE6/7 // This fixes almost every IE6/7 issue nodeHook = { set: function( elem, value, name ) { // Set the existing or create a new attribute node var ret = elem.getAttributeNode( name ); if ( !ret ) { elem.setAttributeNode( (ret = elem.ownerDocument.createAttribute( name )) ); } ret.value = value += ""; // Break association with cloned elements by also using setAttribute (#9646) if ( name === "value" || value === elem.getAttribute( name ) ) { return value; } } }; // Some attributes are constructed with empty-string values when not defined attrHandle.id = attrHandle.name = attrHandle.coords = function( elem, name, isXML ) { var ret; if ( !isXML ) { return (ret = elem.getAttributeNode( name )) && ret.value !== "" ? ret.value : null; } }; // Fixing value retrieval on a button requires this module jQuery.valHooks.button = { get: function( elem, name ) { var ret = elem.getAttributeNode( name ); if ( ret && ret.specified ) { return ret.value; } }, set: nodeHook.set }; // Set contenteditable to false on removals(#10429) // Setting to empty string throws an error as an invalid value jQuery.attrHooks.contenteditable = { set: function( elem, value, name ) { nodeHook.set( elem, value === "" ? false : value, name ); } }; // Set width and height to auto instead of 0 on empty string( Bug #8150 ) // This is for removals jQuery.each([ "width", "height" ], function( i, name ) { jQuery.attrHooks[ name ] = { set: function( elem, value ) { if ( value === "" ) { elem.setAttribute( name, "auto" ); return value; } } }; }); } if ( !support.style ) { jQuery.attrHooks.style = { get: function( elem ) { // Return undefined in the case of empty string // Note: IE uppercases css property names, but if we were to .toLowerCase() // .cssText, that would destroy case senstitivity in URL's, like in "background" return elem.style.cssText || undefined; }, set: function( elem, value ) { return ( elem.style.cssText = value + "" ); } }; } var rfocusable = /^(?:input|select|textarea|button|object)$/i, rclickable = /^(?:a|area)$/i; jQuery.fn.extend({ prop: function( name, value ) { return access( this, jQuery.prop, name, value, arguments.length > 1 ); }, removeProp: function( name ) { name = jQuery.propFix[ name ] || name; return this.each(function() { // try/catch handles cases where IE balks (such as removing a property on window) try { this[ name ] = undefined; delete this[ name ]; } catch( e ) {} }); } }); jQuery.extend({ propFix: { "for": "htmlFor", "class": "className" }, prop: function( elem, name, value ) { var ret, hooks, notxml, nType = elem.nodeType; // don't get/set properties on text, comment and attribute nodes if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { return; } notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); if ( notxml ) { // Fix name and attach hooks name = jQuery.propFix[ name ] || name; hooks = jQuery.propHooks[ name ]; } if ( value !== undefined ) { return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? ret : ( elem[ name ] = value ); } else { return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? ret : elem[ name ]; } }, propHooks: { tabIndex: { get: function( elem ) { // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ // Use proper attribute retrieval(#12072) var tabindex = jQuery.find.attr( elem, "tabindex" ); return tabindex ? parseInt( tabindex, 10 ) : rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? 0 : -1; } } } }); // Some attributes require a special call on IE // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx if ( !support.hrefNormalized ) { // href/src property should get the full normalized URL (#10299/#12915) jQuery.each([ "href", "src" ], function( i, name ) { jQuery.propHooks[ name ] = { get: function( elem ) { return elem.getAttribute( name, 4 ); } }; }); } // Support: Safari, IE9+ // mis-reports the default selected property of an option // Accessing the parent's selectedIndex property fixes it if ( !support.optSelected ) { jQuery.propHooks.selected = { get: function( elem ) { var parent = elem.parentNode; if ( parent ) { parent.selectedIndex; // Make sure that it also works with optgroups, see #5701 if ( parent.parentNode ) { parent.parentNode.selectedIndex; } } return null; } }; } jQuery.each([ "tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable" ], function() { jQuery.propFix[ this.toLowerCase() ] = this; }); // IE6/7 call enctype encoding if ( !support.enctype ) { jQuery.propFix.enctype = "encoding"; } var rclass = /[\t\r\n\f]/g; jQuery.fn.extend({ addClass: function( value ) { var classes, elem, cur, clazz, j, finalValue, i = 0, len = this.length, proceed = typeof value === "string" && value; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).addClass( value.call( this, j, this.className ) ); }); } if ( proceed ) { // The disjunction here is for better compressibility (see removeClass) classes = ( value || "" ).match( rnotwhite ) || []; for ( ; i < len; i++ ) { elem = this[ i ]; cur = elem.nodeType === 1 && ( elem.className ? ( " " + elem.className + " " ).replace( rclass, " " ) : " " ); if ( cur ) { j = 0; while ( (clazz = classes[j++]) ) { if ( cur.indexOf( " " + clazz + " " ) < 0 ) { cur += clazz + " "; } } // only assign if different to avoid unneeded rendering. finalValue = jQuery.trim( cur ); if ( elem.className !== finalValue ) { elem.className = finalValue; } } } } return this; }, removeClass: function( value ) { var classes, elem, cur, clazz, j, finalValue, i = 0, len = this.length, proceed = arguments.length === 0 || typeof value === "string" && value; if ( jQuery.isFunction( value ) ) { return this.each(function( j ) { jQuery( this ).removeClass( value.call( this, j, this.className ) ); }); } if ( proceed ) { classes = ( value || "" ).match( rnotwhite ) || []; for ( ; i < len; i++ ) { elem = this[ i ]; // This expression is here for better compressibility (see addClass) cur = elem.nodeType === 1 && ( elem.className ? ( " " + elem.className + " " ).replace( rclass, " " ) : "" ); if ( cur ) { j = 0; while ( (clazz = classes[j++]) ) { // Remove *all* instances while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { cur = cur.replace( " " + clazz + " ", " " ); } } // only assign if different to avoid unneeded rendering. finalValue = value ? jQuery.trim( cur ) : ""; if ( elem.className !== finalValue ) { elem.className = finalValue; } } } } return this; }, toggleClass: function( value, stateVal ) { var type = typeof value; if ( typeof stateVal === "boolean" && type === "string" ) { return stateVal ? this.addClass( value ) : this.removeClass( value ); } if ( jQuery.isFunction( value ) ) { return this.each(function( i ) { jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); }); } return this.each(function() { if ( type === "string" ) { // toggle individual class names var className, i = 0, self = jQuery( this ), classNames = value.match( rnotwhite ) || []; while ( (className = classNames[ i++ ]) ) { // check each className given, space separated list if ( self.hasClass( className ) ) { self.removeClass( className ); } else { self.addClass( className ); } } // Toggle whole class name } else if ( type === strundefined || type === "boolean" ) { if ( this.className ) { // store className if set jQuery._data( this, "__className__", this.className ); } // If the element has a class name or if we're passed "false", // then remove the whole classname (if there was one, the above saved it). // Otherwise bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; } }); }, hasClass: function( selector ) { var className = " " + selector + " ", i = 0, l = this.length; for ( ; i < l; i++ ) { if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { return true; } } return false; } }); // Return jQuery for attributes-only inclusion jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { // Handle event binding jQuery.fn[ name ] = function( data, fn ) { return arguments.length > 0 ? this.on( name, null, data, fn ) : this.trigger( name ); }; }); jQuery.fn.extend({ hover: function( fnOver, fnOut ) { return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); }, bind: function( types, data, fn ) { return this.on( types, null, data, fn ); }, unbind: function( types, fn ) { return this.off( types, null, fn ); }, delegate: function( selector, types, data, fn ) { return this.on( types, selector, data, fn ); }, undelegate: function( selector, types, fn ) { // ( namespace ) or ( selector, types [, fn] ) return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); } }); var nonce = jQuery.now(); var rquery = (/\?/); var rvalidtokens = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g; jQuery.parseJSON = function( data ) { // Attempt to parse using the native JSON parser first if ( window.JSON && window.JSON.parse ) { // Support: Android 2.3 // Workaround failure to string-cast null input return window.JSON.parse( data + "" ); } var requireNonComma, depth = null, str = jQuery.trim( data + "" ); // Guard against invalid (and possibly dangerous) input by ensuring that nothing remains // after removing valid tokens return str && !jQuery.trim( str.replace( rvalidtokens, function( token, comma, open, close ) { // Force termination if we see a misplaced comma if ( requireNonComma && comma ) { depth = 0; } // Perform no more replacements after returning to outermost depth if ( depth === 0 ) { return token; } // Commas must not follow "[", "{", or "," requireNonComma = open || comma; // Determine new depth // array/object open ("[" or "{"): depth += true - false (increment) // array/object close ("]" or "}"): depth += false - true (decrement) // other cases ("," or primitive): depth += true - true (numeric cast) depth += !close - !open; // Remove this token return ""; }) ) ? ( Function( "return " + str ) )() : jQuery.error( "Invalid JSON: " + data ); }; // Cross-browser xml parsing jQuery.parseXML = function( data ) { var xml, tmp; if ( !data || typeof data !== "string" ) { return null; } try { if ( window.DOMParser ) { // Standard tmp = new DOMParser(); xml = tmp.parseFromString( data, "text/xml" ); } else { // IE xml = new ActiveXObject( "Microsoft.XMLDOM" ); xml.async = "false"; xml.loadXML( data ); } } catch( e ) { xml = undefined; } if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { jQuery.error( "Invalid XML: " + data ); } return xml; }; var // Document location ajaxLocParts, ajaxLocation, rhash = /#.*$/, rts = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL // #7653, #8125, #8152: local protocol detection rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, /* Prefilters * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) * 2) These are called: * - BEFORE asking for a transport * - AFTER param serialization (s.data is a string if s.processData is true) * 3) key is the dataType * 4) the catchall symbol "*" can be used * 5) execution will start with transport dataType and THEN continue down to "*" if needed */ prefilters = {}, /* Transports bindings * 1) key is the dataType * 2) the catchall symbol "*" can be used * 3) selection will start with transport dataType and THEN go to "*" if needed */ transports = {}, // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression allTypes = "*/".concat("*"); // #8138, IE may throw an exception when accessing // a field from window.location if document.domain has been set try { ajaxLocation = location.href; } catch( e ) { // Use the href attribute of an A element // since IE will modify it given document.location ajaxLocation = document.createElement( "a" ); ajaxLocation.href = ""; ajaxLocation = ajaxLocation.href; } // Segment location into parts ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { // dataTypeExpression is optional and defaults to "*" return function( dataTypeExpression, func ) { if ( typeof dataTypeExpression !== "string" ) { func = dataTypeExpression; dataTypeExpression = "*"; } var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || []; if ( jQuery.isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( (dataType = dataTypes[i++]) ) { // Prepend if requested if ( dataType.charAt( 0 ) === "+" ) { dataType = dataType.slice( 1 ) || "*"; (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); // Otherwise append } else { (structure[ dataType ] = structure[ dataType ] || []).push( func ); } } } }; } // Base inspection function for prefilters and transports function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { var inspected = {}, seekingTransport = ( structure === transports ); function inspect( dataType ) { var selected; inspected[ dataType ] = true; jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { options.dataTypes.unshift( dataTypeOrTransport ); inspect( dataTypeOrTransport ); return false; } else if ( seekingTransport ) { return !( selected = dataTypeOrTransport ); } }); return selected; } return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); } // A special extend for ajax options // that takes "flat" options (not to be deep extended) // Fixes #9887 function ajaxExtend( target, src ) { var deep, key, flatOptions = jQuery.ajaxSettings.flatOptions || {}; for ( key in src ) { if ( src[ key ] !== undefined ) { ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; } } if ( deep ) { jQuery.extend( true, target, deep ); } return target; } /* Handles responses to an ajax request: * - finds the right dataType (mediates between content-type and expected dataType) * - returns the corresponding response */ function ajaxHandleResponses( s, jqXHR, responses ) { var firstDataType, ct, finalDataType, type, contents = s.contents, dataTypes = s.dataTypes; // Remove auto dataType and get content-type in the process while ( dataTypes[ 0 ] === "*" ) { dataTypes.shift(); if ( ct === undefined ) { ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); } } // Check if we're dealing with a known content-type if ( ct ) { for ( type in contents ) { if ( contents[ type ] && contents[ type ].test( ct ) ) { dataTypes.unshift( type ); break; } } } // Check to see if we have a response for the expected dataType if ( dataTypes[ 0 ] in responses ) { finalDataType = dataTypes[ 0 ]; } else { // Try convertible dataTypes for ( type in responses ) { if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { finalDataType = type; break; } if ( !firstDataType ) { firstDataType = type; } } // Or just use first one finalDataType = finalDataType || firstDataType; } // If we found a dataType // We add the dataType to the list if needed // and return the corresponding response if ( finalDataType ) { if ( finalDataType !== dataTypes[ 0 ] ) { dataTypes.unshift( finalDataType ); } return responses[ finalDataType ]; } } /* Chain conversions given the request and the original response * Also sets the responseXXX fields on the jqXHR instance */ function ajaxConvert( s, response, jqXHR, isSuccess ) { var conv2, current, conv, tmp, prev, converters = {}, // Work with a copy of dataTypes in case we need to modify it for conversion dataTypes = s.dataTypes.slice(); // Create converters map with lowercased keys if ( dataTypes[ 1 ] ) { for ( conv in s.converters ) { converters[ conv.toLowerCase() ] = s.converters[ conv ]; } } current = dataTypes.shift(); // Convert to each sequential dataType while ( current ) { if ( s.responseFields[ current ] ) { jqXHR[ s.responseFields[ current ] ] = response; } // Apply the dataFilter if provided if ( !prev && isSuccess && s.dataFilter ) { response = s.dataFilter( response, s.dataType ); } prev = current; current = dataTypes.shift(); if ( current ) { // There's only work to do if current dataType is non-auto if ( current === "*" ) { current = prev; // Convert response if prev dataType is non-auto and differs from current } else if ( prev !== "*" && prev !== current ) { // Seek a direct converter conv = converters[ prev + " " + current ] || converters[ "* " + current ]; // If none found, seek a pair if ( !conv ) { for ( conv2 in converters ) { // If conv2 outputs current tmp = conv2.split( " " ); if ( tmp[ 1 ] === current ) { // If prev can be converted to accepted input conv = converters[ prev + " " + tmp[ 0 ] ] || converters[ "* " + tmp[ 0 ] ]; if ( conv ) { // Condense equivalence converters if ( conv === true ) { conv = converters[ conv2 ]; // Otherwise, insert the intermediate dataType } else if ( converters[ conv2 ] !== true ) { current = tmp[ 0 ]; dataTypes.unshift( tmp[ 1 ] ); } break; } } } } // Apply converter (if not an equivalence) if ( conv !== true ) { // Unless errors are allowed to bubble, catch and return them if ( conv && s[ "throws" ] ) { response = conv( response ); } else { try { response = conv( response ); } catch ( e ) { return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; } } } } } } return { state: "success", data: response }; } jQuery.extend({ // Counter for holding the number of active queries active: 0, // Last-Modified header cache for next request lastModified: {}, etag: {}, ajaxSettings: { url: ajaxLocation, type: "GET", isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), global: true, processData: true, async: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", /* timeout: 0, data: null, dataType: null, username: null, password: null, cache: null, throws: false, traditional: false, headers: {}, */ accepts: { "*": allTypes, text: "text/plain", html: "text/html", xml: "application/xml, text/xml", json: "application/json, text/javascript" }, contents: { xml: /xml/, html: /html/, json: /json/ }, responseFields: { xml: "responseXML", text: "responseText", json: "responseJSON" }, // Data converters // Keys separate source (or catchall "*") and destination types with a single space converters: { // Convert anything to text "* text": String, // Text to html (true = no transformation) "text html": true, // Evaluate text as a json expression "text json": jQuery.parseJSON, // Parse text as xml "text xml": jQuery.parseXML }, // For options that shouldn't be deep extended: // you can add your own custom options here if // and when you create one that shouldn't be // deep extended (see ajaxExtend) flatOptions: { url: true, context: true } }, // Creates a full fledged settings object into target // with both ajaxSettings and settings fields. // If target is omitted, writes into ajaxSettings. ajaxSetup: function( target, settings ) { return settings ? // Building a settings object ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : // Extending ajaxSettings ajaxExtend( jQuery.ajaxSettings, target ); }, ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), ajaxTransport: addToPrefiltersOrTransports( transports ), // Main method ajax: function( url, options ) { // If url is an object, simulate pre-1.5 signature if ( typeof url === "object" ) { options = url; url = undefined; } // Force options to be an object options = options || {}; var // Cross-domain detection vars parts, // Loop variable i, // URL without anti-cache param cacheURL, // Response headers as string responseHeadersString, // timeout handle timeoutTimer, // To know if global events are to be dispatched fireGlobals, transport, // Response headers responseHeaders, // Create the final options object s = jQuery.ajaxSetup( {}, options ), // Callbacks context callbackContext = s.context || s, // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? jQuery( callbackContext ) : jQuery.event, // Deferreds deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks("once memory"), // Status-dependent callbacks statusCode = s.statusCode || {}, // Headers (they are sent all at once) requestHeaders = {}, requestHeadersNames = {}, // The jqXHR state state = 0, // Default abort message strAbort = "canceled", // Fake xhr jqXHR = { readyState: 0, // Builds headers hashtable if needed getResponseHeader: function( key ) { var match; if ( state === 2 ) { if ( !responseHeaders ) { responseHeaders = {}; while ( (match = rheaders.exec( responseHeadersString )) ) { responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; } } match = responseHeaders[ key.toLowerCase() ]; } return match == null ? null : match; }, // Raw string getAllResponseHeaders: function() { return state === 2 ? responseHeadersString : null; }, // Caches the header setRequestHeader: function( name, value ) { var lname = name.toLowerCase(); if ( !state ) { name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; requestHeaders[ name ] = value; } return this; }, // Overrides response content-type header overrideMimeType: function( type ) { if ( !state ) { s.mimeType = type; } return this; }, // Status-dependent callbacks statusCode: function( map ) { var code; if ( map ) { if ( state < 2 ) { for ( code in map ) { // Lazy-add the new callback in a way that preserves old ones statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; } } else { // Execute the appropriate callbacks jqXHR.always( map[ jqXHR.status ] ); } } return this; }, // Cancel the request abort: function( statusText ) { var finalText = statusText || strAbort; if ( transport ) { transport.abort( finalText ); } done( 0, finalText ); return this; } }; // Attach deferreds deferred.promise( jqXHR ).complete = completeDeferred.add; jqXHR.success = jqXHR.done; jqXHR.error = jqXHR.fail; // Remove hash character (#7531: and string promotion) // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) // Handle falsy url in the settings object (#10093: consistency with old signature) // We also use the url parameter if available s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); // Alias method option to type as per ticket #12004 s.type = options.method || options.type || s.method || s.type; // Extract dataTypes list s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ]; // A cross-domain request is in order when we have a protocol:host:port mismatch if ( s.crossDomain == null ) { parts = rurl.exec( s.url.toLowerCase() ); s.crossDomain = !!( parts && ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !== ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ) ); } // Convert data if not already a string if ( s.data && s.processData && typeof s.data !== "string" ) { s.data = jQuery.param( s.data, s.traditional ); } // Apply prefilters inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); // If request was aborted inside a prefilter, stop there if ( state === 2 ) { return jqXHR; } // We can fire global events as of now if asked to fireGlobals = s.global; // Watch for a new set of requests if ( fireGlobals && jQuery.active++ === 0 ) { jQuery.event.trigger("ajaxStart"); } // Uppercase the type s.type = s.type.toUpperCase(); // Determine if request has content s.hasContent = !rnoContent.test( s.type ); // Save the URL in case we're toying with the If-Modified-Since // and/or If-None-Match header later on cacheURL = s.url; // More options handling for requests with no content if ( !s.hasContent ) { // If data is available, append data to url if ( s.data ) { cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); // #9682: remove data so that it's not used in an eventual retry delete s.data; } // Add anti-cache in url if needed if ( s.cache === false ) { s.url = rts.test( cacheURL ) ? // If there is already a '_' parameter, set its value cacheURL.replace( rts, "$1_=" + nonce++ ) : // Otherwise add one to the end cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++; } } // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { if ( jQuery.lastModified[ cacheURL ] ) { jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); } if ( jQuery.etag[ cacheURL ] ) { jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); } } // Set the correct header, if data is being sent if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { jqXHR.setRequestHeader( "Content-Type", s.contentType ); } // Set the Accepts header for the server, depending on the dataType jqXHR.setRequestHeader( "Accept", s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : s.accepts[ "*" ] ); // Check for headers option for ( i in s.headers ) { jqXHR.setRequestHeader( i, s.headers[ i ] ); } // Allow custom headers/mimetypes and early abort if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { // Abort if not done already and return return jqXHR.abort(); } // aborting is no longer a cancellation strAbort = "abort"; // Install callbacks on deferreds for ( i in { success: 1, error: 1, complete: 1 } ) { jqXHR[ i ]( s[ i ] ); } // Get transport transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); // If no transport, we auto-abort if ( !transport ) { done( -1, "No Transport" ); } else { jqXHR.readyState = 1; // Send global event if ( fireGlobals ) { globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); } // Timeout if ( s.async && s.timeout > 0 ) { timeoutTimer = setTimeout(function() { jqXHR.abort("timeout"); }, s.timeout ); } try { state = 1; transport.send( requestHeaders, done ); } catch ( e ) { // Propagate exception as error if not done if ( state < 2 ) { done( -1, e ); // Simply rethrow otherwise } else { throw e; } } } // Callback for when everything is done function done( status, nativeStatusText, responses, headers ) { var isSuccess, success, error, response, modified, statusText = nativeStatusText; // Called once if ( state === 2 ) { return; } // State is "done" now state = 2; // Clear timeout if it exists if ( timeoutTimer ) { clearTimeout( timeoutTimer ); } // Dereference transport for early garbage collection // (no matter how long the jqXHR object will be used) transport = undefined; // Cache response headers responseHeadersString = headers || ""; // Set readyState jqXHR.readyState = status > 0 ? 4 : 0; // Determine if successful isSuccess = status >= 200 && status < 300 || status === 304; // Get response data if ( responses ) { response = ajaxHandleResponses( s, jqXHR, responses ); } // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); // If successful, handle type chaining if ( isSuccess ) { // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. if ( s.ifModified ) { modified = jqXHR.getResponseHeader("Last-Modified"); if ( modified ) { jQuery.lastModified[ cacheURL ] = modified; } modified = jqXHR.getResponseHeader("etag"); if ( modified ) { jQuery.etag[ cacheURL ] = modified; } } // if no content if ( status === 204 || s.type === "HEAD" ) { statusText = "nocontent"; // if not modified } else if ( status === 304 ) { statusText = "notmodified"; // If we have data, let's convert it } else { statusText = response.state; success = response.data; error = response.error; isSuccess = !error; } } else { // We extract error from statusText // then normalize statusText and status for non-aborts error = statusText; if ( status || !statusText ) { statusText = "error"; if ( status < 0 ) { status = 0; } } } // Set data for the fake xhr object jqXHR.status = status; jqXHR.statusText = ( nativeStatusText || statusText ) + ""; // Success/Error if ( isSuccess ) { deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); } else { deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); } // Status-dependent callbacks jqXHR.statusCode( statusCode ); statusCode = undefined; if ( fireGlobals ) { globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", [ jqXHR, s, isSuccess ? success : error ] ); } // Complete completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); if ( fireGlobals ) { globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); // Handle the global AJAX counter if ( !( --jQuery.active ) ) { jQuery.event.trigger("ajaxStop"); } } } return jqXHR; }, getJSON: function( url, data, callback ) { return jQuery.get( url, data, callback, "json" ); }, getScript: function( url, callback ) { return jQuery.get( url, undefined, callback, "script" ); } }); jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // shift arguments if data argument was omitted if ( jQuery.isFunction( data ) ) { type = type || callback; callback = data; data = undefined; } return jQuery.ajax({ url: url, type: method, dataType: type, data: data, success: callback }); }; }); // Attach a bunch of functions for handling common AJAX events jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) { jQuery.fn[ type ] = function( fn ) { return this.on( type, fn ); }; }); jQuery._evalUrl = function( url ) { return jQuery.ajax({ url: url, type: "GET", dataType: "script", async: false, global: false, "throws": true }); }; jQuery.fn.extend({ wrapAll: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapAll( html.call(this, i) ); }); } if ( this[0] ) { // The elements to wrap the target around var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); if ( this[0].parentNode ) { wrap.insertBefore( this[0] ); } wrap.map(function() { var elem = this; while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { elem = elem.firstChild; } return elem; }).append( this ); } return this; }, wrapInner: function( html ) { if ( jQuery.isFunction( html ) ) { return this.each(function(i) { jQuery(this).wrapInner( html.call(this, i) ); }); } return this.each(function() { var self = jQuery( this ), contents = self.contents(); if ( contents.length ) { contents.wrapAll( html ); } else { self.append( html ); } }); }, wrap: function( html ) { var isFunction = jQuery.isFunction( html ); return this.each(function(i) { jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); }); }, unwrap: function() { return this.parent().each(function() { if ( !jQuery.nodeName( this, "body" ) ) { jQuery( this ).replaceWith( this.childNodes ); } }).end(); } }); jQuery.expr.filters.hidden = function( elem ) { // Support: Opera <= 12.12 // Opera reports offsetWidths and offsetHeights less than zero on some elements return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || (!support.reliableHiddenOffsets() && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); }; jQuery.expr.filters.visible = function( elem ) { return !jQuery.expr.filters.hidden( elem ); }; var r20 = /%20/g, rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i; function buildParams( prefix, obj, traditional, add ) { var name; if ( jQuery.isArray( obj ) ) { // Serialize array item. jQuery.each( obj, function( i, v ) { if ( traditional || rbracket.test( prefix ) ) { // Treat each array item as a scalar. add( prefix, v ); } else { // Item is non-scalar (array or object), encode its numeric index. buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); } }); } else if ( !traditional && jQuery.type( obj ) === "object" ) { // Serialize object item. for ( name in obj ) { buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); } } else { // Serialize scalar item. add( prefix, obj ); } } // Serialize an array of form elements or a set of // key/values into a query string jQuery.param = function( a, traditional ) { var prefix, s = [], add = function( key, value ) { // If value is a function, invoke it and return its value value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); }; // Set traditional to true for jQuery <= 1.3.2 behavior. if ( traditional === undefined ) { traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; } // If an array was passed in, assume that it is an array of form elements. if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { // Serialize the form elements jQuery.each( a, function() { add( this.name, this.value ); }); } else { // If traditional, encode the "old" way (the way 1.3.2 or older // did it), otherwise encode params recursively. for ( prefix in a ) { buildParams( prefix, a[ prefix ], traditional, add ); } } // Return the resulting serialization return s.join( "&" ).replace( r20, "+" ); }; jQuery.fn.extend({ serialize: function() { return jQuery.param( this.serializeArray() ); }, serializeArray: function() { return this.map(function() { // Can add propHook for "elements" to filter or add form elements var elements = jQuery.prop( this, "elements" ); return elements ? jQuery.makeArray( elements ) : this; }) .filter(function() { var type = this.type; // Use .is(":disabled") so that fieldset[disabled] works return this.name && !jQuery( this ).is( ":disabled" ) && rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !rcheckableType.test( type ) ); }) .map(function( i, elem ) { var val = jQuery( this ).val(); return val == null ? null : jQuery.isArray( val ) ? jQuery.map( val, function( val ) { return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }) : { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; }).get(); } }); // Create the request object // (This is still attached to ajaxSettings for backward compatibility) jQuery.ajaxSettings.xhr = window.ActiveXObject !== undefined ? // Support: IE6+ function() { // XHR cannot access local files, always use ActiveX for that case return !this.isLocal && // Support: IE7-8 // oldIE XHR does not support non-RFC2616 methods (#13240) // See http://msdn.microsoft.com/en-us/library/ie/ms536648(v=vs.85).aspx // and http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9 // Although this check for six methods instead of eight // since IE also does not support "trace" and "connect" /^(get|post|head|put|delete|options)$/i.test( this.type ) && createStandardXHR() || createActiveXHR(); } : // For all other browsers, use the standard XMLHttpRequest object createStandardXHR; var xhrId = 0, xhrCallbacks = {}, xhrSupported = jQuery.ajaxSettings.xhr(); // Support: IE<10 // Open requests must be manually aborted on unload (#5280) if ( window.ActiveXObject ) { jQuery( window ).on( "unload", function() { for ( var key in xhrCallbacks ) { xhrCallbacks[ key ]( undefined, true ); } }); } // Determine support properties support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); xhrSupported = support.ajax = !!xhrSupported; // Create transport if the browser can provide an xhr if ( xhrSupported ) { jQuery.ajaxTransport(function( options ) { // Cross domain only allowed if supported through XMLHttpRequest if ( !options.crossDomain || support.cors ) { var callback; return { send: function( headers, complete ) { var i, xhr = options.xhr(), id = ++xhrId; // Open the socket xhr.open( options.type, options.url, options.async, options.username, options.password ); // Apply custom fields if provided if ( options.xhrFields ) { for ( i in options.xhrFields ) { xhr[ i ] = options.xhrFields[ i ]; } } // Override mime type if needed if ( options.mimeType && xhr.overrideMimeType ) { xhr.overrideMimeType( options.mimeType ); } // X-Requested-With header // For cross-domain requests, seeing as conditions for a preflight are // akin to a jigsaw puzzle, we simply never set it to be sure. // (it can always be set on a per-request basis or even using ajaxSetup) // For same-domain requests, won't change header if already provided. if ( !options.crossDomain && !headers["X-Requested-With"] ) { headers["X-Requested-With"] = "XMLHttpRequest"; } // Set headers for ( i in headers ) { // Support: IE<9 // IE's ActiveXObject throws a 'Type Mismatch' exception when setting // request header to a null-value. // // To keep consistent with other XHR implementations, cast the value // to string and ignore `undefined`. if ( headers[ i ] !== undefined ) { xhr.setRequestHeader( i, headers[ i ] + "" ); } } // Do send the request // This may raise an exception which is actually // handled in jQuery.ajax (so no try/catch here) xhr.send( ( options.hasContent && options.data ) || null ); // Listener callback = function( _, isAbort ) { var status, statusText, responses; // Was never called and is aborted or complete if ( callback && ( isAbort || xhr.readyState === 4 ) ) { // Clean up delete xhrCallbacks[ id ]; callback = undefined; xhr.onreadystatechange = jQuery.noop; // Abort manually if needed if ( isAbort ) { if ( xhr.readyState !== 4 ) { xhr.abort(); } } else { responses = {}; status = xhr.status; // Support: IE<10 // Accessing binary-data responseText throws an exception // (#11426) if ( typeof xhr.responseText === "string" ) { responses.text = xhr.responseText; } // Firefox throws an exception when accessing // statusText for faulty cross-domain requests try { statusText = xhr.statusText; } catch( e ) { // We normalize with Webkit giving an empty statusText statusText = ""; } // Filter status for non standard behaviors // If the request is local and we have data: assume a success // (success with no data won't get notified, that's the best we // can do given current implementations) if ( !status && options.isLocal && !options.crossDomain ) { status = responses.text ? 200 : 404; // IE - #1450: sometimes returns 1223 when it should be 204 } else if ( status === 1223 ) { status = 204; } } } // Call complete if needed if ( responses ) { complete( status, statusText, responses, xhr.getAllResponseHeaders() ); } }; if ( !options.async ) { // if we're in sync mode we fire the callback callback(); } else if ( xhr.readyState === 4 ) { // (IE6 & IE7) if it's in cache and has been // retrieved directly we need to fire the callback setTimeout( callback ); } else { // Add to the list of active xhr callbacks xhr.onreadystatechange = xhrCallbacks[ id ] = callback; } }, abort: function() { if ( callback ) { callback( undefined, true ); } } }; } }); } // Functions to create xhrs function createStandardXHR() { try { return new window.XMLHttpRequest(); } catch( e ) {} } function createActiveXHR() { try { return new window.ActiveXObject( "Microsoft.XMLHTTP" ); } catch( e ) {} } // Install script dataType jQuery.ajaxSetup({ accepts: { script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" }, contents: { script: /(?:java|ecma)script/ }, converters: { "text script": function( text ) { jQuery.globalEval( text ); return text; } } }); // Handle cache's special case and global jQuery.ajaxPrefilter( "script", function( s ) { if ( s.cache === undefined ) { s.cache = false; } if ( s.crossDomain ) { s.type = "GET"; s.global = false; } }); // Bind script tag hack transport jQuery.ajaxTransport( "script", function(s) { // This transport only deals with cross domain requests if ( s.crossDomain ) { var script, head = document.head || jQuery("head")[0] || document.documentElement; return { send: function( _, callback ) { script = document.createElement("script"); script.async = true; if ( s.scriptCharset ) { script.charset = s.scriptCharset; } script.src = s.url; // Attach handlers for all browsers script.onload = script.onreadystatechange = function( _, isAbort ) { if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { // Handle memory leak in IE script.onload = script.onreadystatechange = null; // Remove the script if ( script.parentNode ) { script.parentNode.removeChild( script ); } // Dereference the script script = null; // Callback if not abort if ( !isAbort ) { callback( 200, "success" ); } } }; // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending // Use native DOM manipulation to avoid our domManip AJAX trickery head.insertBefore( script, head.firstChild ); }, abort: function() { if ( script ) { script.onload( undefined, true ); } } }; } }); var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/; // Default jsonp settings jQuery.ajaxSetup({ jsonp: "callback", jsonpCallback: function() { var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); this[ callback ] = true; return callback; } }); // Detect, normalize options and install callbacks for jsonp requests jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { var callbackName, overwritten, responseContainer, jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? "url" : typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" ); // Handle iff the expected data type is "jsonp" or we have a parameter to set if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { // Get callback name, remembering preexisting value associated with it callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback; // Insert callback into url or form data if ( jsonProp ) { s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); } else if ( s.jsonp !== false ) { s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; } // Use data converter to retrieve json after script execution s.converters["script json"] = function() { if ( !responseContainer ) { jQuery.error( callbackName + " was not called" ); } return responseContainer[ 0 ]; }; // force json dataType s.dataTypes[ 0 ] = "json"; // Install callback overwritten = window[ callbackName ]; window[ callbackName ] = function() { responseContainer = arguments; }; // Clean-up function (fires after converters) jqXHR.always(function() { // Restore preexisting value window[ callbackName ] = overwritten; // Save back as free if ( s[ callbackName ] ) { // make sure that re-using the options doesn't screw things around s.jsonpCallback = originalSettings.jsonpCallback; // save the callback name for future use oldCallbacks.push( callbackName ); } // Call if it was a function and we have a response if ( responseContainer && jQuery.isFunction( overwritten ) ) { overwritten( responseContainer[ 0 ] ); } responseContainer = overwritten = undefined; }); // Delegate to script return "script"; } }); // data: string of html // context (optional): If specified, the fragment will be created in this context, defaults to document // keepScripts (optional): If true, will include scripts passed in the html string jQuery.parseHTML = function( data, context, keepScripts ) { if ( !data || typeof data !== "string" ) { return null; } if ( typeof context === "boolean" ) { keepScripts = context; context = false; } context = context || document; var parsed = rsingleTag.exec( data ), scripts = !keepScripts && []; // Single tag if ( parsed ) { return [ context.createElement( parsed[1] ) ]; } parsed = jQuery.buildFragment( [ data ], context, scripts ); if ( scripts && scripts.length ) { jQuery( scripts ).remove(); } return jQuery.merge( [], parsed.childNodes ); }; // Keep a copy of the old load method var _load = jQuery.fn.load; /** * Load a url into a page */ jQuery.fn.load = function( url, params, callback ) { if ( typeof url !== "string" && _load ) { return _load.apply( this, arguments ); } var selector, response, type, self = this, off = url.indexOf(" "); if ( off >= 0 ) { selector = jQuery.trim( url.slice( off, url.length ) ); url = url.slice( 0, off ); } // If it's a function if ( jQuery.isFunction( params ) ) { // We assume that it's the callback callback = params; params = undefined; // Otherwise, build a param string } else if ( params && typeof params === "object" ) { type = "POST"; } // If we have elements to modify, make the request if ( self.length > 0 ) { jQuery.ajax({ url: url, // if "type" variable is undefined, then "GET" method will be used type: type, dataType: "html", data: params }).done(function( responseText ) { // Save response for use in complete callback response = arguments; self.html( selector ? // If a selector was specified, locate the right elements in a dummy div // Exclude scripts to avoid IE 'Permission Denied' errors jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : // Otherwise use the full result responseText ); }).complete( callback && function( jqXHR, status ) { self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); }); } return this; }; jQuery.expr.filters.animated = function( elem ) { return jQuery.grep(jQuery.timers, function( fn ) { return elem === fn.elem; }).length; }; var docElem = window.document.documentElement; /** * Gets a window from an element */ function getWindow( elem ) { return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 ? elem.defaultView || elem.parentWindow : false; } jQuery.offset = { setOffset: function( elem, options, i ) { var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery.css( elem, "position" ), curElem = jQuery( elem ), props = {}; // set position first, in-case top/left are set even on static elem if ( position === "static" ) { elem.style.position = "relative"; } curOffset = curElem.offset(); curCSSTop = jQuery.css( elem, "top" ); curCSSLeft = jQuery.css( elem, "left" ); calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [ curCSSTop, curCSSLeft ] ) > -1; // need to be able to calculate position if either top or left is auto and position is either absolute or fixed if ( calculatePosition ) { curPosition = curElem.position(); curTop = curPosition.top; curLeft = curPosition.left; } else { curTop = parseFloat( curCSSTop ) || 0; curLeft = parseFloat( curCSSLeft ) || 0; } if ( jQuery.isFunction( options ) ) { options = options.call( elem, i, curOffset ); } if ( options.top != null ) { props.top = ( options.top - curOffset.top ) + curTop; } if ( options.left != null ) { props.left = ( options.left - curOffset.left ) + curLeft; } if ( "using" in options ) { options.using.call( elem, props ); } else { curElem.css( props ); } } }; jQuery.fn.extend({ offset: function( options ) { if ( arguments.length ) { return options === undefined ? this : this.each(function( i ) { jQuery.offset.setOffset( this, options, i ); }); } var docElem, win, box = { top: 0, left: 0 }, elem = this[ 0 ], doc = elem && elem.ownerDocument; if ( !doc ) { return; } docElem = doc.documentElement; // Make sure it's not a disconnected DOM node if ( !jQuery.contains( docElem, elem ) ) { return box; } // If we don't have gBCR, just use 0,0 rather than error // BlackBerry 5, iOS 3 (original iPhone) if ( typeof elem.getBoundingClientRect !== strundefined ) { box = elem.getBoundingClientRect(); } win = getWindow( doc ); return { top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) }; }, position: function() { if ( !this[ 0 ] ) { return; } var offsetParent, offset, parentOffset = { top: 0, left: 0 }, elem = this[ 0 ]; // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent if ( jQuery.css( elem, "position" ) === "fixed" ) { // we assume that getBoundingClientRect is available when computed position is fixed offset = elem.getBoundingClientRect(); } else { // Get *real* offsetParent offsetParent = this.offsetParent(); // Get correct offsets offset = this.offset(); if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { parentOffset = offsetParent.offset(); } // Add offsetParent borders parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); } // Subtract parent offsets and element margins // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 return { top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) }; }, offsetParent: function() { return this.map(function() { var offsetParent = this.offsetParent || docElem; while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) { offsetParent = offsetParent.offsetParent; } return offsetParent || docElem; }); } }); // Create scrollLeft and scrollTop methods jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { var top = /Y/.test( prop ); jQuery.fn[ method ] = function( val ) { return access( this, function( elem, method, val ) { var win = getWindow( elem ); if ( val === undefined ) { return win ? (prop in win) ? win[ prop ] : win.document.documentElement[ method ] : elem[ method ]; } if ( win ) { win.scrollTo( !top ? val : jQuery( win ).scrollLeft(), top ? val : jQuery( win ).scrollTop() ); } else { elem[ method ] = val; } }, method, val, arguments.length, null ); }; }); // Add the top/left cssHooks using jQuery.fn.position // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 // getComputedStyle returns percent when specified for top/left/bottom/right // rather than make the css module depend on the offset module, we just check for it here jQuery.each( [ "top", "left" ], function( i, prop ) { jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, function( elem, computed ) { if ( computed ) { computed = curCSS( elem, prop ); // if curCSS returns percentage, fallback to offset return rnumnonpx.test( computed ) ? jQuery( elem ).position()[ prop ] + "px" : computed; } } ); }); // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { // margin is only for outerHeight, outerWidth jQuery.fn[ funcName ] = function( margin, value ) { var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); return access( this, function( elem, type, value ) { var doc; if ( jQuery.isWindow( elem ) ) { // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there // isn't a whole lot we can do. See pull request at this URL for discussion: // https://github.com/jquery/jquery/pull/764 return elem.document.documentElement[ "client" + name ]; } // Get document width or height if ( elem.nodeType === 9 ) { doc = elem.documentElement; // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. return Math.max( elem.body[ "scroll" + name ], doc[ "scroll" + name ], elem.body[ "offset" + name ], doc[ "offset" + name ], doc[ "client" + name ] ); } return value === undefined ? // Get width or height on the element, requesting but not forcing parseFloat jQuery.css( elem, type, extra ) : // Set width or height on the element jQuery.style( elem, type, value, extra ); }, type, chainable ? margin : undefined, chainable, null ); }; }); }); // The number of elements contained in the matched element set jQuery.fn.size = function() { return this.length; }; jQuery.fn.andSelf = jQuery.fn.addBack; // Register as a named AMD module, since jQuery can be concatenated with other // files that may use define, but not via a proper concatenation script that // understands anonymous AMD modules. A named AMD is safest and most robust // way to register. Lowercase jquery is used because AMD module names are // derived from file names, and jQuery is normally delivered in a lowercase // file name. Do this after creating the global so that if an AMD module wants // to call noConflict to hide this version of jQuery, it will work. // Note that for maximum portability, libraries that are not jQuery should // declare themselves as anonymous modules, and avoid setting a global if an // AMD loader is present. jQuery is a special case. For more information, see // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon if ( typeof define === "function" && define.amd ) { define( "jquery", [], function() { return jQuery; }); } var // Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$; jQuery.noConflict = function( deep ) { if ( window.$ === jQuery ) { window.$ = _$; } if ( deep && window.jQuery === jQuery ) { window.jQuery = _jQuery; } return jQuery; }; // Expose jQuery and $ identifiers, even in // AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // and CommonJS for browser emulators (#13566) if ( typeof noGlobal === strundefined ) { window.jQuery = window.$ = jQuery; } return jQuery; }));
ajax/libs/angular-google-maps/2.0.2/angular-google-maps.js
jakubfiala/cdnjs
/*! angular-google-maps 2.0.2 2014-10-21 * AngularJS directives for Google Maps * git: https://github.com/angular-ui/angular-google-maps.git */ (function() { String.prototype.contains = function(value, fromIndex) { return this.indexOf(value, fromIndex) !== -1; }; String.prototype.flare = function(flare) { if (flare == null) { flare = 'uiGmap'; } return flare + this; }; String.prototype.ns = String.prototype.flare; }).call(this); /* Author Nick McCready Intersection of Objects if the arrays have something in common each intersecting object will be returned in an new array. */ (function() { _.intersectionObjects = function(array1, array2, comparison) { var res; if (comparison == null) { comparison = void 0; } res = _.map(array1, (function(_this) { return function(obj1) { return _.find(array2, function(obj2) { if (comparison != null) { return comparison(obj1, obj2); } else { return _.isEqual(obj1, obj2); } }); }; })(this)); return _.filter(res, function(o) { return o != null; }); }; _.containsObject = _.includeObject = function(obj, target, comparison) { if (comparison == null) { comparison = void 0; } if (obj === null) { return false; } return _.any(obj, (function(_this) { return function(value) { if (comparison != null) { return comparison(value, target); } else { return _.isEqual(value, target); } }; })(this)); }; _.differenceObjects = function(array1, array2, comparison) { if (comparison == null) { comparison = void 0; } return _.filter(array1, function(value) { return !_.containsObject(array2, value, comparison); }); }; _.withoutObjects = _.differenceObjects; _.indexOfObject = function(array, item, comparison, isSorted) { var i, length; if (array == null) { return -1; } i = 0; length = array.length; if (isSorted) { if (typeof isSorted === "number") { i = (isSorted < 0 ? Math.max(0, length + isSorted) : isSorted); } else { i = _.sortedIndex(array, item); return (array[i] === item ? i : -1); } } while (i < length) { if (comparison != null) { if (comparison(array[i], item)) { return i; } } else { if (_.isEqual(array[i], item)) { return i; } } i++; } return -1; }; _["extends"] = function(arrayOfObjectsToCombine) { return _.reduce(arrayOfObjectsToCombine, function(combined, toAdd) { return _.extend(combined, toAdd); }, {}); }; _.isNullOrUndefined = function(thing) { return _.isNull(thing || _.isUndefined(thing)); }; }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ (function() { angular.module('google-maps.providers'.ns(), []); angular.module("google-maps.wrapped".ns(), []); angular.module("google-maps.extensions".ns(), ["google-maps.wrapped".ns(), 'google-maps.providers'.ns()]); angular.module("google-maps.directives.api.utils".ns(), ['google-maps.extensions'.ns()]); angular.module("google-maps.directives.api.managers".ns(), []); angular.module("google-maps.directives.api.options".ns(), ["google-maps.directives.api.utils".ns()]); angular.module("google-maps.directives.api.options.builders".ns(), []); angular.module("google-maps.directives.api.models.child".ns(), ["google-maps.directives.api.utils".ns(), "google-maps.directives.api.options".ns(), "google-maps.directives.api.options.builders".ns()]); angular.module("google-maps.directives.api.models.parent".ns(), ["google-maps.directives.api.managers".ns(), "google-maps.directives.api.models.child".ns(), 'google-maps.providers'.ns()]); angular.module("google-maps.directives.api".ns(), ["google-maps.directives.api.models.parent".ns()]); angular.module("google-maps".ns(), ["google-maps.directives.api".ns(), 'google-maps.providers'.ns()]).factory("debounce".ns(), [ "$timeout", function($timeout) { return function(fn) { var nthCall; nthCall = 0; return function() { var argz, later, that; that = this; argz = arguments; nthCall++; later = (function(version) { return function() { if (version === nthCall) { return fn.apply(that, argz); } }; })(nthCall); return $timeout(later, 0, true); }; }; } ]); }).call(this); (function() { angular.module('google-maps.providers'.ns()).factory('MapScriptLoader'.ns(), [ '$q', 'uuid'.ns(), function($q, uuid) { var scriptId; scriptId = void 0; return { load: function(options) { var deferred, query, randomizedFunctionName, script; deferred = $q.defer(); if (angular.isDefined(window.google) && angular.isDefined(window.google.maps)) { deferred.resolve(window.google.maps); return deferred.promise; } randomizedFunctionName = options.callback = 'onGoogleMapsReady' + Math.round(Math.random() * 1000); window[randomizedFunctionName] = function() { window[randomizedFunctionName] = null; deferred.resolve(window.google.maps); }; query = _.map(options, function(v, k) { return k + '=' + v; }); if (scriptId) { document.getElementById(scriptId).remove(); } query = query.join('&'); script = document.createElement('script'); scriptId = "ui_gmap_map_load_" + uuid.generate(); script.id = scriptId; script.type = 'text/javascript'; script.src = 'https://maps.googleapis.com/maps/api/js?' + query; document.body.appendChild(script); return deferred.promise; } }; } ]).provider('GoogleMapApi'.ns(), function() { this.options = { v: '3.17', libraries: '', language: 'en', sensor: 'false' }; this.configure = function(options) { angular.extend(this.options, options); }; this.$get = [ 'MapScriptLoader'.ns(), (function(_this) { return function(loader) { return loader.load(_this.options); }; })(this) ]; return this; }); }).call(this); (function() { angular.module("google-maps.extensions".ns()).service('ExtendGWin'.ns(), function() { return { init: _.once(function() { if (!(google || (typeof google !== "undefined" && google !== null ? google.maps : void 0) || (google.maps.InfoWindow != null))) { return; } google.maps.InfoWindow.prototype._open = google.maps.InfoWindow.prototype.open; google.maps.InfoWindow.prototype._close = google.maps.InfoWindow.prototype.close; google.maps.InfoWindow.prototype._isOpen = false; google.maps.InfoWindow.prototype.open = function(map, anchor, recurse) { if (recurse != null) { return; } this._isOpen = true; this._open(map, anchor, true); }; google.maps.InfoWindow.prototype.close = function(recurse) { if (recurse != null) { return; } this._isOpen = false; this._close(true); }; google.maps.InfoWindow.prototype.isOpen = function(val) { if (val == null) { val = void 0; } if (val == null) { return this._isOpen; } else { return this._isOpen = val; } }; /* Do the same for InfoBox TODO: Clean this up so the logic is defined once, wait until develop becomes master as this will be easier */ if (window.InfoBox) { window.InfoBox.prototype._open = window.InfoBox.prototype.open; window.InfoBox.prototype._close = window.InfoBox.prototype.close; window.InfoBox.prototype._isOpen = false; window.InfoBox.prototype.open = function(map, anchor) { this._isOpen = true; this._open(map, anchor); }; window.InfoBox.prototype.close = function() { this._isOpen = false; this._close(); }; window.InfoBox.prototype.isOpen = function(val) { if (val == null) { val = void 0; } if (val == null) { return this._isOpen; } else { return this._isOpen = val; } }; } if (window.MarkerLabel_) { window.MarkerLabel_.prototype.setContent = function() { var content; content = this.marker_.get("labelContent"); if (!content || _.isEqual(this.oldContent, content)) { return; } if (typeof (content != null ? content.nodeType : void 0) === "undefined") { this.labelDiv_.innerHTML = content; this.eventDiv_.innerHTML = this.labelDiv_.innerHTML; this.oldContent = content; } else { this.labelDiv_.innerHTML = ""; this.labelDiv_.appendChild(content); content = content.cloneNode(true); this.eventDiv_.appendChild(content); this.oldContent = content; } }; /* Removes the DIV for the label from the DOM. It also removes all event handlers. This method is called automatically when the marker's <code>setMap(null)</code> method is called. @private */ return window.MarkerLabel_.prototype.onRemove = function() { if (this.labelDiv_.parentNode != null) { this.labelDiv_.parentNode.removeChild(this.labelDiv_); } if (this.eventDiv_.parentNode != null) { this.eventDiv_.parentNode.removeChild(this.eventDiv_); } if (!this.listeners_) { return; } if (!this.listeners_.length) { return; } this.listeners_.forEach(function(l) { return google.maps.event.removeListener(l); }); }; } }) }; }); }).call(this); (function() { angular.module("google-maps.directives.api.utils".ns()).service("_sync".ns(), [ function() { return { fakePromise: function() { var _cb; _cb = void 0; return { then: function(cb) { return _cb = cb; }, resolve: function() { return _cb.apply(void 0, arguments); } }; } }; } ]).factory("_async".ns(), [ function() { var defaultChunkSize, doChunk, each, map, waitOrGo; defaultChunkSize = 20; /* utility to reduce code bloat. The whole point is to check if there is existing synchronous work going on. If so we wait on it. Note: This is fully intended to be mutable (ie existingPiecesObj is getting existingPieces prop slapped on) */ waitOrGo = function(existingPiecesObj, fnPromise) { if (!existingPiecesObj.existingPieces) { return existingPiecesObj.existingPieces = fnPromise(); } else { return existingPiecesObj.existingPieces = existingPiecesObj.existingPieces.then(function() { return fnPromise(); }); } }; /* Author: Nicholas McCready & jfriend00 _async handles things asynchronous-like :), to allow the UI to be free'd to do other things Code taken from http://stackoverflow.com/questions/10344498/best-way-to-iterate-over-an-array-without-blocking-the-ui The design of any functionality of _async is to be like lodash/underscore and replicate it but call things asynchronously underneath. Each should be sufficient for most things to be derived from. Optional Asynchronous Chunking via promises. */ doChunk = function(array, chunkSizeOrDontChunk, pauseMilli, chunkCb, pauseCb, overallD, index) { var cnt, e, i; try { if (chunkSizeOrDontChunk && chunkSizeOrDontChunk < array.length) { cnt = chunkSizeOrDontChunk; } else { cnt = array.length; } i = index; while (cnt-- && i < (array ? array.length : i + 1)) { chunkCb(array[i], i); ++i; } if (array) { if (i < array.length) { index = i; if (chunkSizeOrDontChunk) { if (typeof pauseCb === "function") { pauseCb(); } return setTimeout(function() { return doChunk(array, chunkSizeOrDontChunk, pauseMilli, chunkCb, pauseCb, overallD, index); }, pauseMilli); } } else { return overallD.resolve(); } } } catch (_error) { e = _error; return overallD.reject("error within chunking iterator: " + e); } }; each = function(array, chunk, pauseCb, chunkSizeOrDontChunk, index, pauseMilli) { var overallD, ret; if (chunkSizeOrDontChunk == null) { chunkSizeOrDontChunk = defaultChunkSize; } if (index == null) { index = 0; } if (pauseMilli == null) { pauseMilli = 1; } ret = void 0; overallD = Promise.defer(); ret = overallD.promise; if (!pauseMilli) { overallD.reject("pause (delay) must be set from _async!"); return ret; } if (array === void 0 || (array != null ? array.length : void 0) <= 0) { overallD.resolve(); return ret; } doChunk(array, chunkSizeOrDontChunk, pauseMilli, chunk, pauseCb, overallD, index); return ret; }; map = function(objs, iterator, pauseCb, chunkSizeOrDontChunk, index, pauseMilli) { var results; results = []; if (!((objs != null) && (objs != null ? objs.length : void 0) > 0)) { return Promise.resolve(results); } return each(objs, function(o) { return results.push(iterator(o)); }, pauseCb, chunkSizeOrDontChunk, index, pauseMilli).then(function() { return results; }); }; return { each: each, map: map, waitOrGo: waitOrGo, defaultChunkSize: defaultChunkSize }; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; angular.module("google-maps.directives.api.utils".ns()).factory("BaseObject".ns(), function() { var BaseObject, baseObjectKeywords; baseObjectKeywords = ['extended', 'included']; BaseObject = (function() { function BaseObject() { this.getProp = __bind(this.getProp, this); } BaseObject.extend = function(obj) { var key, value, _ref; for (key in obj) { value = obj[key]; if (__indexOf.call(baseObjectKeywords, key) < 0) { this[key] = value; } } if ((_ref = obj.extended) != null) { _ref.apply(this); } return this; }; BaseObject.include = function(obj) { var key, value, _ref; for (key in obj) { value = obj[key]; if (__indexOf.call(baseObjectKeywords, key) < 0) { this.prototype[key] = value; } } if ((_ref = obj.included) != null) { _ref.apply(this); } return this; }; BaseObject.prototype.getProp = function(propName, otherObject) { var object; object = otherObject != null ? otherObject : this; if (object[propName] != null) { return object[propName]; } return void 0; }; return BaseObject; })(); return BaseObject; }); }).call(this); /* Useful function callbacks that should be defined at later time. Mainly to be used for specs to verify creation / linking. This is to lead a common design in notifying child stuff. */ (function() { angular.module("google-maps.directives.api.utils".ns()).factory("ChildEvents".ns(), function() { return { onChildCreation: function(child) {} }; }); }).call(this); (function() { angular.module("google-maps.directives.api.utils".ns()).service("CtrlHandle".ns(), [ '$q', function($q) { var CtrlHandle; return CtrlHandle = { handle: function($scope, $element) { $scope.$on('$destroy', function() { return CtrlHandle.handle($scope); }); $scope.deferred = $q.defer(); return { getScope: function() { return $scope; } }; }, mapPromise: function(scope, ctrl) { var mapScope; mapScope = ctrl.getScope(); mapScope.deferred.promise.then(function(map) { return scope.map = map; }); return mapScope.deferred.promise; } }; } ]); }).call(this); (function() { angular.module("google-maps.directives.api.utils".ns()).service("EventsHelper".ns(), [ "Logger".ns(), function($log) { return { setEvents: function(gObject, scope, model, ignores) { if (angular.isDefined(scope.events) && (scope.events != null) && angular.isObject(scope.events)) { return _.compact(_.map(scope.events, function(eventHandler, eventName) { var doIgnore; if (ignores) { doIgnore = _(ignores).contains(eventName); } if (scope.events.hasOwnProperty(eventName) && angular.isFunction(scope.events[eventName]) && !doIgnore) { return google.maps.event.addListener(gObject, eventName, function() { return scope.$apply(eventHandler.apply(scope, [gObject, eventName, model, arguments])); }); } else { return $log.info("EventHelper: invalid event listener " + eventName); } })); } }, removeEvents: function(listeners) { return listeners != null ? listeners.forEach(function(l) { return google.maps.event.removeListener(l); }) : void 0; } }; } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.utils".ns()).factory("FitHelper".ns(), [ "BaseObject".ns(), "Logger".ns(), "_async".ns(), function(BaseObject, $log, _async) { var FitHelper; return FitHelper = (function(_super) { __extends(FitHelper, _super); function FitHelper() { return FitHelper.__super__.constructor.apply(this, arguments); } FitHelper.prototype.fit = function(gMarkers, gMap) { var bounds, everSet; if (gMap && gMarkers && gMarkers.length > 0) { bounds = new google.maps.LatLngBounds(); everSet = false; return _async.each(gMarkers, (function(_this) { return function(gMarker) { if (gMarker) { if (!everSet) { everSet = true; } return bounds.extend(gMarker.getPosition()); } }; })(this)).then(function() { if (everSet) { return gMap.fitBounds(bounds); } }); } }; return FitHelper; })(BaseObject); } ]); }).call(this); (function() { angular.module("google-maps.directives.api.utils".ns()).service("GmapUtil".ns(), [ "Logger".ns(), "$compile", function(Logger, $compile) { var getCoords, getLatitude, getLongitude, validateCoords; getLatitude = function(value) { if (Array.isArray(value) && value.length === 2) { return value[1]; } else if (angular.isDefined(value.type) && value.type === "Point") { return value.coordinates[1]; } else { return value.latitude; } }; getLongitude = function(value) { if (Array.isArray(value) && value.length === 2) { return value[0]; } else if (angular.isDefined(value.type) && value.type === "Point") { return value.coordinates[0]; } else { return value.longitude; } }; getCoords = function(value) { if (!value) { return; } if (Array.isArray(value) && value.length === 2) { return new google.maps.LatLng(value[1], value[0]); } else if (angular.isDefined(value.type) && value.type === "Point") { return new google.maps.LatLng(value.coordinates[1], value.coordinates[0]); } else { return new google.maps.LatLng(value.latitude, value.longitude); } }; validateCoords = function(coords) { if (angular.isUndefined(coords)) { return false; } if (_.isArray(coords)) { if (coords.length === 2) { return true; } } else if ((coords != null) && (coords != null ? coords.type : void 0)) { if (coords.type === "Point" && _.isArray(coords.coordinates) && coords.coordinates.length === 2) { return true; } } if (coords && angular.isDefined((coords != null ? coords.latitude : void 0) && angular.isDefined(coords != null ? coords.longitude : void 0))) { return true; } return false; }; return { setCoordsFromEvent: function(prevValue, newLatLon) { if (!prevValue) { return; } if (Array.isArray(prevValue) && prevValue.length === 2) { prevValue[1] = newLatLon.lat(); prevValue[0] = newLatLon.lng(); } else if (angular.isDefined(prevValue.type) && prevValue.type === "Point") { prevValue.coordinates[1] = newLatLon.lat(); prevValue.coordinates[0] = newLatLon.lng(); } else { prevValue.latitude = newLatLon.lat(); prevValue.longitude = newLatLon.lng(); } return prevValue; }, getLabelPositionPoint: function(anchor) { var xPos, yPos; if (anchor === void 0) { return void 0; } anchor = /^([-\d\.]+)\s([-\d\.]+)$/.exec(anchor); xPos = parseFloat(anchor[1]); yPos = parseFloat(anchor[2]); if ((xPos != null) && (yPos != null)) { return new google.maps.Point(xPos, yPos); } }, createWindowOptions: function(gMarker, scope, content, defaults) { var options; if ((content != null) && (defaults != null) && ($compile != null)) { options = angular.extend({}, defaults, { content: this.buildContent(scope, defaults, content), position: defaults.position != null ? defaults.position : angular.isObject(gMarker) ? gMarker.getPosition() : getCoords(scope.coords) }); if ((gMarker != null) && ((options != null ? options.pixelOffset : void 0) == null)) { if (options.boxClass == null) { } else { options.pixelOffset = { height: 0, width: -2 }; } } return options; } else { if (!defaults) { Logger.error("infoWindow defaults not defined"); if (!content) { return Logger.error("infoWindow content not defined"); } } else { return defaults; } } }, buildContent: function(scope, defaults, content) { var parsed, ret; if (defaults.content != null) { ret = defaults.content; } else { if ($compile != null) { parsed = $compile(content)(scope); if (parsed.length > 0) { ret = parsed[0]; } } else { ret = content; } } return ret; }, defaultDelay: 50, isTrue: function(val) { return angular.isDefined(val) && val !== null && val === true || val === "1" || val === "y" || val === "true"; }, isFalse: function(value) { return ['false', 'FALSE', 0, 'n', 'N', 'no', 'NO'].indexOf(value) !== -1; }, getCoords: getCoords, validateCoords: validateCoords, equalCoords: function(coord1, coord2) { return getLatitude(coord1) === getLatitude(coord2) && getLongitude(coord1) === getLongitude(coord2); }, validatePath: function(path) { var array, i, polygon, trackMaxVertices; i = 0; if (angular.isUndefined(path.type)) { if (!Array.isArray(path) || path.length < 2) { return false; } while (i < path.length) { if (!((angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) || (typeof path[i].lat === "function" && typeof path[i].lng === "function"))) { return false; } i++; } return true; } else { if (angular.isUndefined(path.coordinates)) { return false; } if (path.type === "Polygon") { if (path.coordinates[0].length < 4) { return false; } array = path.coordinates[0]; } else if (path.type === "MultiPolygon") { trackMaxVertices = { max: 0, index: 0 }; _.forEach(path.coordinates, function(polygon, index) { if (polygon[0].length > this.max) { this.max = polygon[0].length; return this.index = index; } }, trackMaxVertices); polygon = path.coordinates[trackMaxVertices.index]; array = polygon[0]; if (array.length < 4) { return false; } } else if (path.type === "LineString") { if (path.coordinates.length < 2) { return false; } array = path.coordinates; } else { return false; } while (i < array.length) { if (array[i].length !== 2) { return false; } i++; } return true; } }, convertPathPoints: function(path) { var array, i, latlng, result, trackMaxVertices; i = 0; result = new google.maps.MVCArray(); if (angular.isUndefined(path.type)) { while (i < path.length) { latlng; if (angular.isDefined(path[i].latitude) && angular.isDefined(path[i].longitude)) { latlng = new google.maps.LatLng(path[i].latitude, path[i].longitude); } else if (typeof path[i].lat === "function" && typeof path[i].lng === "function") { latlng = path[i]; } result.push(latlng); i++; } } else { array; if (path.type === "Polygon") { array = path.coordinates[0]; } else if (path.type === "MultiPolygon") { trackMaxVertices = { max: 0, index: 0 }; _.forEach(path.coordinates, function(polygon, index) { if (polygon[0].length > this.max) { this.max = polygon[0].length; return this.index = index; } }, trackMaxVertices); array = path.coordinates[trackMaxVertices.index][0]; } else if (path.type === "LineString") { array = path.coordinates; } while (i < array.length) { result.push(new google.maps.LatLng(array[i][1], array[i][0])); i++; } } return result; }, extendMapBounds: function(map, points) { var bounds, i; bounds = new google.maps.LatLngBounds(); i = 0; while (i < points.length) { bounds.extend(points.getAt(i)); i++; } return map.fitBounds(bounds); }, getPath: function(object, key) { var obj; obj = object; _.each(key.split("."), function(value) { if (obj) { return obj = obj[value]; } }); return obj; }, validateBoundPoints: function(bounds) { if (angular.isUndefined(bounds.sw.latitude) || angular.isUndefined(bounds.sw.longitude) || angular.isUndefined(bounds.ne.latitude) || angular.isUndefined(bounds.ne.longitude)) { return false; } return true; }, convertBoundPoints: function(bounds) { var result; result = new google.maps.LatLngBounds(new google.maps.LatLng(bounds.sw.latitude, bounds.sw.longitude), new google.maps.LatLng(bounds.ne.latitude, bounds.ne.longitude)); return result; }, fitMapBounds: function(map, bounds) { return map.fitBounds(bounds); } }; } ]); }).call(this); (function() { angular.module("google-maps.directives.api.utils".ns()).service("IsReady".ns(), [ '$q', '$timeout', function($q, $timeout) { var ctr, promises, proms; ctr = 0; proms = []; promises = function() { return $q.all(proms); }; return { spawn: function() { var d; d = $q.defer(); proms.push(d.promise); ctr += 1; return { instance: ctr, deferred: d }; }, promises: promises, instances: function() { return ctr; }, promise: function(expect) { var d, ohCrap; if (expect == null) { expect = 1; } d = $q.defer(); ohCrap = function() { return $timeout(function() { if (ctr !== expect) { return ohCrap(); } else { return d.resolve(promises()); } }); }; ohCrap(); return d.promise; }, reset: function() { ctr = 0; return proms.length = 0; } }; } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.utils".ns()).factory("Linked".ns(), [ "BaseObject".ns(), function(BaseObject) { var Linked; Linked = (function(_super) { __extends(Linked, _super); function Linked(scope, element, attrs, ctrls) { this.scope = scope; this.element = element; this.attrs = attrs; this.ctrls = ctrls; } return Linked; })(BaseObject); return Linked; } ]); }).call(this); (function() { angular.module("google-maps.directives.api.utils".ns()).service("Logger".ns(), [ "$log", function($log) { return { doLog: false, info: function(msg) { if (this.doLog) { if ($log != null) { return $log.info(msg); } else { return console.info(msg); } } }, log: function(msg) { if (this.doLog) { if ($log != null) { return $log.log(msg); } else { return console.log(msg); } } }, error: function(msg) { if (this.doLog) { if ($log != null) { return $log.error(msg); } else { return console.error(msg); } } }, debug: function(msg) { if (this.doLog) { if ($log != null) { return $log.debug(msg); } else { return console.debug(msg); } } }, warn: function(msg) { if (this.doLog) { if ($log != null) { return $log.warn(msg); } else { return console.warn(msg); } } } }; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.utils".ns()).factory("ModelKey".ns(), [ "BaseObject".ns(), "GmapUtil".ns(), function(BaseObject, GmapUtil) { var ModelKey; return ModelKey = (function(_super) { __extends(ModelKey, _super); function ModelKey(scope) { this.scope = scope; this.getChanges = __bind(this.getChanges, this); this.setIdKey = __bind(this.setIdKey, this); this.modelKeyComparison = __bind(this.modelKeyComparison, this); ModelKey.__super__.constructor.call(this); this.defaultIdKey = "id"; this.idKey = void 0; } ModelKey.prototype.evalModelHandle = function(model, modelKey) { if (model === void 0 || modelKey === void 0) { return void 0; } if (modelKey === 'self') { return model; } else { return GmapUtil.getPath(model, modelKey); } }; ModelKey.prototype.modelKeyComparison = function(model1, model2) { var scope; scope = this.scope.coords != null ? this.scope : this.parentScope; if (scope == null) { throw "No scope or parentScope set!"; } return GmapUtil.equalCoords(this.evalModelHandle(model1, scope.coords), this.evalModelHandle(model2, scope.coords)); }; ModelKey.prototype.setIdKey = function(scope) { return this.idKey = scope.idKey != null ? scope.idKey : this.defaultIdKey; }; ModelKey.prototype.setVal = function(model, key, newValue) { var thingToSet; thingToSet = this.modelOrKey(model, key); thingToSet = newValue; return model; }; ModelKey.prototype.modelOrKey = function(model, key) { var thing; thing = key !== 'self' ? model[key] : model; return thing; }; /* For the cases were watching a large object we only want to know the list of props that actually changed. Also we want to limit the amount of props we analyze to whitelisted props that are actually tracked by scope. (should make things faster with whitelisted) */ ModelKey.prototype.getChanges = function(prev, now, whitelistedProps) { var c, changes, prop; if (whitelistedProps) { prev = _.pick(prev, whitelistedProps); now = _.pick(now, whitelistedProps); } changes = {}; prop = {}; c = {}; for (prop in now) { if (!prev || prev[prop] !== now[prop]) { if (_.isArray(now[prop])) { changes[prop] = now[prop]; } else if (_.isObject(now[prop])) { c = this.getChanges(prev[prop], now[prop]); if (!_.isEmpty(c)) { changes[prop] = c; } } else { changes[prop] = now[prop]; } } } return changes; }; return ModelKey; })(BaseObject); } ]); }).call(this); (function() { angular.module("google-maps.directives.api.utils".ns()).factory("ModelsWatcher".ns(), [ "Logger".ns(), "_async".ns(), function(Logger, _async) { return { figureOutState: function(idKey, scope, childObjects, comparison, callBack) { var adds, mappedScopeModelIds, removals, updates; adds = []; mappedScopeModelIds = {}; removals = []; updates = []; return _async.each(scope.models, function(m) { var child; if (m[idKey] != null) { mappedScopeModelIds[m[idKey]] = {}; if (childObjects[m[idKey]] == null) { return adds.push(m); } else { child = childObjects[m[idKey]]; if (!comparison(m, child.model)) { return updates.push({ model: m, child: child }); } } } else { return Logger.error(" id missing for model " + (m.toString()) + ",\ncan not use do comparison/insertion"); } }).then((function(_this) { return function() { return _async.each(childObjects.values(), function(c) { var id; if (c == null) { Logger.error("child undefined in ModelsWatcher."); return; } if (c.model == null) { Logger.error("child.model undefined in ModelsWatcher."); return; } id = c.model[idKey]; if (mappedScopeModelIds[id] == null) { return removals.push(c); } }); }; })(this)).then((function(_this) { return function() { return callBack({ adds: adds, removals: removals, updates: updates }); }; })(this)); } }; } ]); }).call(this); /* Simple Object Map with a lenght property to make it easy to track length/size */ (function() { var propsToPop, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; propsToPop = ['get', 'put', 'remove', 'values', 'keys', 'length', 'push', 'didValueStateChange', 'didKeyStateChange', 'slice', 'removeAll', 'allVals', 'allKeys', 'stateChanged']; window.PropMap = (function() { function PropMap() { this.removeAll = __bind(this.removeAll, this); this.slice = __bind(this.slice, this); this.push = __bind(this.push, this); this.keys = __bind(this.keys, this); this.values = __bind(this.values, this); this.remove = __bind(this.remove, this); this.put = __bind(this.put, this); this.stateChanged = __bind(this.stateChanged, this); this.get = __bind(this.get, this); this.length = 0; this.didValueStateChange = false; this.didKeyStateChange = false; this.allVals = []; this.allKeys = []; } PropMap.prototype.get = function(key) { return this[key]; }; PropMap.prototype.stateChanged = function() { this.didValueStateChange = true; return this.didKeyStateChange = true; }; PropMap.prototype.put = function(key, value) { if (this.get(key) == null) { this.length++; } this.stateChanged(); return this[key] = value; }; PropMap.prototype.remove = function(key, isSafe) { var value; if (isSafe == null) { isSafe = false; } if (isSafe && !this.get(key)) { return void 0; } value = this[key]; delete this[key]; this.length--; this.stateChanged(); return value; }; PropMap.prototype.values = function() { var all; if (!this.didValueStateChange) { return this.allVals; } all = []; this.keys().forEach((function(_this) { return function(key) { if (_.indexOf(propsToPop, key) === -1) { return all.push(_this[key]); } }; })(this)); all; this.didValueStateChange = false; this.keys(); return this.allVals = all; }; PropMap.prototype.keys = function() { var all, keys; if (!this.didKeyStateChange) { return this.allKeys; } keys = _.keys(this); all = []; _.each(keys, (function(_this) { return function(prop) { if (_.indexOf(propsToPop, prop) === -1) { return all.push(prop); } }; })(this)); this.didKeyStateChange = false; this.values(); return this.allKeys = all; }; PropMap.prototype.push = function(obj, key) { if (key == null) { key = "key"; } return this.put(obj[key], obj); }; PropMap.prototype.slice = function() { return this.keys().map((function(_this) { return function(k) { return _this.remove(k); }; })(this)); }; PropMap.prototype.removeAll = function() { return this.slice(); }; return PropMap; })(); angular.module("google-maps.directives.api.utils".ns()).factory("PropMap".ns(), function() { return window.PropMap; }); }).call(this); (function() { angular.module("google-maps.directives.api.utils".ns()).factory("PropertyAction".ns(), [ "Logger".ns(), function(Logger) { var PropertyAction; PropertyAction = function(setterFn, isFirstSet, key) { var self; self = this; this.setIfChange = function(newVal, oldVal) { var callingKey; callingKey = this.exp; if (!_.isEqual(oldVal, newVal || isFirstSet)) { return setterFn(callingKey, newVal); } }; this.sic = this.setIfChange; return this; }; return PropertyAction; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.managers".ns()).factory("ClustererMarkerManager".ns(), [ "Logger".ns(), "FitHelper".ns(), "PropMap".ns(), function($log, FitHelper, PropMap) { var ClustererMarkerManager; ClustererMarkerManager = (function(_super) { __extends(ClustererMarkerManager, _super); ClustererMarkerManager.type = 'ClustererMarkerManager'; function ClustererMarkerManager(gMap, opt_markers, opt_options, opt_events) { var self; this.opt_events = opt_events; this.checkSync = __bind(this.checkSync, this); this.getGMarkers = __bind(this.getGMarkers, this); this.fit = __bind(this.fit, this); this.destroy = __bind(this.destroy, this); this.clear = __bind(this.clear, this); this.draw = __bind(this.draw, this); this.removeMany = __bind(this.removeMany, this); this.remove = __bind(this.remove, this); this.addMany = __bind(this.addMany, this); this.add = __bind(this.add, this); ClustererMarkerManager.__super__.constructor.call(this); this.type = ClustererMarkerManager.type; self = this; this.opt_options = opt_options; if ((opt_options != null) && opt_markers === void 0) { this.clusterer = new NgMapMarkerClusterer(gMap, void 0, opt_options); } else if ((opt_options != null) && (opt_markers != null)) { this.clusterer = new NgMapMarkerClusterer(gMap, opt_markers, opt_options); } else { this.clusterer = new NgMapMarkerClusterer(gMap); } this.propMapGMarkers = new PropMap(); this.attachEvents(this.opt_events, "opt_events"); this.clusterer.setIgnoreHidden(true); this.noDrawOnSingleAddRemoves = true; $log.info(this); } ClustererMarkerManager.prototype.checkKey = function(gMarker) { var msg; if (gMarker.key == null) { msg = "gMarker.key undefined and it is REQUIRED!!"; return Logger.error(msg); } }; ClustererMarkerManager.prototype.add = function(gMarker) { var exists; this.checkKey(gMarker); exists = this.propMapGMarkers.get(gMarker.key) != null; this.clusterer.addMarker(gMarker, this.noDrawOnSingleAddRemoves); this.propMapGMarkers.put(gMarker.key, gMarker); return this.checkSync(); }; ClustererMarkerManager.prototype.addMany = function(gMarkers) { return gMarkers.forEach((function(_this) { return function(gMarker) { return _this.add(gMarker); }; })(this)); }; ClustererMarkerManager.prototype.remove = function(gMarker) { var exists; this.checkKey(gMarker); exists = this.propMapGMarkers.get(gMarker.key); if (exists) { this.clusterer.removeMarker(gMarker, this.noDrawOnSingleAddRemoves); this.propMapGMarkers.remove(gMarker.key); } return this.checkSync(); }; ClustererMarkerManager.prototype.removeMany = function(gMarkers) { return gMarkers.forEach((function(_this) { return function(gMarker) { return _this.remove(gMarker); }; })(this)); }; ClustererMarkerManager.prototype.draw = function() { return this.clusterer.repaint(); }; ClustererMarkerManager.prototype.clear = function() { this.removeMany(this.getGMarkers()); return this.clusterer.repaint(); }; ClustererMarkerManager.prototype.attachEvents = function(options, optionsName) { var eventHandler, eventName, _results; if (angular.isDefined(options) && (options != null) && angular.isObject(options)) { _results = []; for (eventName in options) { eventHandler = options[eventName]; if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) { $log.info("" + optionsName + ": Attaching event: " + eventName + " to clusterer"); _results.push(google.maps.event.addListener(this.clusterer, eventName, options[eventName])); } else { _results.push(void 0); } } return _results; } }; ClustererMarkerManager.prototype.clearEvents = function(options) { var eventHandler, eventName, _results; if (angular.isDefined(options) && (options != null) && angular.isObject(options)) { _results = []; for (eventName in options) { eventHandler = options[eventName]; if (options.hasOwnProperty(eventName) && angular.isFunction(options[eventName])) { $log.info("" + optionsName + ": Clearing event: " + eventName + " to clusterer"); _results.push(google.maps.event.clearListeners(this.clusterer, eventName)); } else { _results.push(void 0); } } return _results; } }; ClustererMarkerManager.prototype.destroy = function() { this.clearEvents(this.opt_events); this.clearEvents(this.opt_internal_events); return this.clear(); }; ClustererMarkerManager.prototype.fit = function() { return ClustererMarkerManager.__super__.fit.call(this, this.getGMarkers(), this.clusterer.getMap()); }; ClustererMarkerManager.prototype.getGMarkers = function() { return this.clusterer.getMarkers().values(); }; ClustererMarkerManager.prototype.checkSync = function() { if (this.getGMarkers().length !== this.propMapGMarkers.length) { throw "GMarkers out of Sync in MarkerClusterer"; } }; return ClustererMarkerManager; })(FitHelper); return ClustererMarkerManager; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.managers".ns()).factory("MarkerManager".ns(), [ "Logger".ns(), "FitHelper".ns(), "PropMap".ns(), function(Logger, FitHelper, PropMap) { var MarkerManager; MarkerManager = (function(_super) { __extends(MarkerManager, _super); MarkerManager.include(FitHelper); MarkerManager.type = 'MarkerManager'; function MarkerManager(gMap, opt_markers, opt_options) { this.getGMarkers = __bind(this.getGMarkers, this); this.fit = __bind(this.fit, this); this.handleOptDraw = __bind(this.handleOptDraw, this); this.clear = __bind(this.clear, this); this.draw = __bind(this.draw, this); this.removeMany = __bind(this.removeMany, this); this.remove = __bind(this.remove, this); this.addMany = __bind(this.addMany, this); this.add = __bind(this.add, this); MarkerManager.__super__.constructor.call(this); this.type = MarkerManager.type; this.gMap = gMap; this.gMarkers = new PropMap(); this.$log = Logger; this.$log.info(this); } MarkerManager.prototype.add = function(gMarker, optDraw) { var exists, msg; if (optDraw == null) { optDraw = true; } if (gMarker.key == null) { msg = "gMarker.key undefined and it is REQUIRED!!"; Logger.error(msg); throw msg; } exists = (this.gMarkers.get(gMarker.key)) != null; if (!exists) { this.handleOptDraw(gMarker, optDraw, true); return this.gMarkers.put(gMarker.key, gMarker); } }; MarkerManager.prototype.addMany = function(gMarkers) { return gMarkers.forEach((function(_this) { return function(gMarker) { return _this.add(gMarker); }; })(this)); }; MarkerManager.prototype.remove = function(gMarker, optDraw) { if (optDraw == null) { optDraw = true; } this.handleOptDraw(gMarker, optDraw, false); if (this.gMarkers.get(gMarker.key)) { return this.gMarkers.remove(gMarker.key); } }; MarkerManager.prototype.removeMany = function(gMarkers) { return this.gMarkers.values().forEach((function(_this) { return function(marker) { return _this.remove(marker); }; })(this)); }; MarkerManager.prototype.draw = function() { var deletes; deletes = []; this.gMarkers.values().forEach((function(_this) { return function(gMarker) { if (!gMarker.isDrawn) { if (gMarker.doAdd) { gMarker.setMap(_this.gMap); return gMarker.isDrawn = true; } else { return deletes.push(gMarker); } } }; })(this)); return deletes.forEach((function(_this) { return function(gMarker) { gMarker.isDrawn = false; return _this.remove(gMarker, true); }; })(this)); }; MarkerManager.prototype.clear = function() { this.gMarkers.values().forEach(function(gMarker) { return gMarker.setMap(null); }); delete this.gMarkers; return this.gMarkers = new PropMap(); }; MarkerManager.prototype.handleOptDraw = function(gMarker, optDraw, doAdd) { if (optDraw === true) { if (doAdd) { gMarker.setMap(this.gMap); } else { gMarker.setMap(null); } return gMarker.isDrawn = true; } else { gMarker.isDrawn = false; return gMarker.doAdd = doAdd; } }; MarkerManager.prototype.fit = function() { return MarkerManager.__super__.fit.call(this, this.getGMarkers(), this.gMap); }; MarkerManager.prototype.getGMarkers = function() { return this.gMarkers.values(); }; return MarkerManager; })(FitHelper); return MarkerManager; } ]); }).call(this); (function() { angular.module("google-maps".ns()).factory("add-events".ns(), [ "$timeout", function($timeout) { var addEvent, addEvents; addEvent = function(target, eventName, handler) { return google.maps.event.addListener(target, eventName, function() { handler.apply(this, arguments); return $timeout((function() {}), true); }); }; addEvents = function(target, eventName, handler) { var remove; if (handler) { return addEvent(target, eventName, handler); } remove = []; angular.forEach(eventName, function(_handler, key) { return remove.push(addEvent(target, key, _handler)); }); return function() { angular.forEach(remove, function(listener) { return google.maps.event.removeListener(listener); }); return remove = null; }; }; return addEvents; } ]); }).call(this); (function() { angular.module("google-maps".ns()).factory("array-sync".ns(), [ "add-events".ns(), function(mapEvents) { return function(mapArray, scope, pathEval, pathChangedFn) { var geojsonArray, geojsonHandlers, geojsonWatcher, isSetFromScope, legacyHandlers, legacyWatcher, mapArrayListener, scopePath, watchListener; isSetFromScope = false; scopePath = scope.$eval(pathEval); if (!scope["static"]) { legacyHandlers = { set_at: function(index) { var value; if (isSetFromScope) { return; } value = mapArray.getAt(index); if (!value) { return; } if (!value.lng || !value.lat) { return scopePath[index] = value; } else { scopePath[index].latitude = value.lat(); return scopePath[index].longitude = value.lng(); } }, insert_at: function(index) { var value; if (isSetFromScope) { return; } value = mapArray.getAt(index); if (!value) { return; } if (!value.lng || !value.lat) { return scopePath.splice(index, 0, value); } else { return scopePath.splice(index, 0, { latitude: value.lat(), longitude: value.lng() }); } }, remove_at: function(index) { if (isSetFromScope) { return; } return scopePath.splice(index, 1); } }; geojsonArray; if (scopePath.type === "Polygon") { geojsonArray = scopePath.coordinates[0]; } else if (scopePath.type === "LineString") { geojsonArray = scopePath.coordinates; } geojsonHandlers = { set_at: function(index) { var value; if (isSetFromScope) { return; } value = mapArray.getAt(index); if (!value) { return; } if (!value.lng || !value.lat) { return; } geojsonArray[index][1] = value.lat(); return geojsonArray[index][0] = value.lng(); }, insert_at: function(index) { var value; if (isSetFromScope) { return; } value = mapArray.getAt(index); if (!value) { return; } if (!value.lng || !value.lat) { return; } return geojsonArray.splice(index, 0, [value.lng(), value.lat()]); }, remove_at: function(index) { if (isSetFromScope) { return; } return geojsonArray.splice(index, 1); } }; mapArrayListener = mapEvents(mapArray, angular.isUndefined(scopePath.type) ? legacyHandlers : geojsonHandlers); } legacyWatcher = function(newPath) { var changed, i, l, newLength, newValue, oldArray, oldLength, oldValue; isSetFromScope = true; oldArray = mapArray; changed = false; if (newPath) { i = 0; oldLength = oldArray.getLength(); newLength = newPath.length; l = Math.min(oldLength, newLength); newValue = void 0; while (i < l) { oldValue = oldArray.getAt(i); newValue = newPath[i]; if (typeof newValue.equals === "function") { if (!newValue.equals(oldValue)) { oldArray.setAt(i, newValue); changed = true; } } else { if ((oldValue.lat() !== newValue.latitude) || (oldValue.lng() !== newValue.longitude)) { oldArray.setAt(i, new google.maps.LatLng(newValue.latitude, newValue.longitude)); changed = true; } } i++; } while (i < newLength) { newValue = newPath[i]; if (typeof newValue.lat === "function" && typeof newValue.lng === "function") { oldArray.push(newValue); } else { oldArray.push(new google.maps.LatLng(newValue.latitude, newValue.longitude)); } changed = true; i++; } while (i < oldLength) { oldArray.pop(); changed = true; i++; } } isSetFromScope = false; if (changed) { return pathChangedFn(oldArray); } }; geojsonWatcher = function(newPath) { var array, changed, i, l, newLength, newValue, oldArray, oldLength, oldValue; isSetFromScope = true; oldArray = mapArray; changed = false; if (newPath) { array; if (scopePath.type === "Polygon") { array = newPath.coordinates[0]; } else if (scopePath.type === "LineString") { array = newPath.coordinates; } i = 0; oldLength = oldArray.getLength(); newLength = array.length; l = Math.min(oldLength, newLength); newValue = void 0; while (i < l) { oldValue = oldArray.getAt(i); newValue = array[i]; if ((oldValue.lat() !== newValue[1]) || (oldValue.lng() !== newValue[0])) { oldArray.setAt(i, new google.maps.LatLng(newValue[1], newValue[0])); changed = true; } i++; } while (i < newLength) { newValue = array[i]; oldArray.push(new google.maps.LatLng(newValue[1], newValue[0])); changed = true; i++; } while (i < oldLength) { oldArray.pop(); changed = true; i++; } } isSetFromScope = false; if (changed) { return pathChangedFn(oldArray); } }; watchListener; if (!scope["static"]) { if (angular.isUndefined(scopePath.type)) { watchListener = scope.$watchCollection(pathEval, legacyWatcher); } else { watchListener = scope.$watch(pathEval, geojsonWatcher, true); } } return function() { if (mapArrayListener) { mapArrayListener(); mapArrayListener = null; } if (watchListener) { watchListener(); return watchListener = null; } }; }; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.options.builders".ns()).service("CommonOptionsBuilder".ns(), [ "BaseObject".ns(), "Logger".ns(), function(BaseObject, $log) { var CommonOptionsBuilder; return CommonOptionsBuilder = (function(_super) { __extends(CommonOptionsBuilder, _super); function CommonOptionsBuilder() { this.watchProps = __bind(this.watchProps, this); this.buildOpts = __bind(this.buildOpts, this); return CommonOptionsBuilder.__super__.constructor.apply(this, arguments); } CommonOptionsBuilder.prototype.props = [ 'clickable', 'draggable', 'editable', 'visible', { prop: 'stroke', isColl: true } ]; CommonOptionsBuilder.prototype.buildOpts = function(customOpts, forEachOpts) { var hasModel, model, opts, _ref, _ref1, _ref2; if (customOpts == null) { customOpts = {}; } if (forEachOpts == null) { forEachOpts = {}; } if (!this.scope) { $log.error("this.scope not defined in CommonOptionsBuilder can not buildOpts"); return; } if (!this.map) { $log.error("this.map not defined in CommonOptionsBuilder can not buildOpts"); return; } hasModel = _(this.scope).chain().keys().contains('model').value(); model = hasModel ? this.scope.model : this.scope; opts = angular.extend(customOpts, this.DEFAULTS, { map: this.map, strokeColor: (_ref = model.stroke) != null ? _ref.color : void 0, strokeOpacity: (_ref1 = model.stroke) != null ? _ref1.opacity : void 0, strokeWeight: (_ref2 = model.stroke) != null ? _ref2.weight : void 0 }); angular.forEach(angular.extend(forEachOpts, { clickable: true, draggable: false, editable: false, "static": false, fit: false, visible: true, zIndex: 0 }), (function(_this) { return function(defaultValue, key) { if (angular.isUndefined(model[key] || model[key] === null)) { return opts[key] = defaultValue; } else { return opts[key] = model[key]; } }; })(this)); if (opts["static"]) { opts.editable = false; } return opts; }; CommonOptionsBuilder.prototype.watchProps = function(props) { if (props == null) { props = this.props; } return props.forEach((function(_this) { return function(prop) { if ((_this.attrs[prop] != null) || (_this.attrs[prop != null ? prop.prop : void 0] != null)) { if (prop != null ? prop.isColl : void 0) { return _this.scope.$watchCollection(prop.prop, _this.setMyOptions); } else { return _this.scope.$watch(prop, _this.setMyOptions); } } }; })(this)); }; return CommonOptionsBuilder; })(BaseObject); } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.options.builders".ns()).factory("PolylineOptionsBuilder".ns(), [ "CommonOptionsBuilder".ns(), function(CommonOptionsBuilder) { var PolylineOptionsBuilder; return PolylineOptionsBuilder = (function(_super) { __extends(PolylineOptionsBuilder, _super); function PolylineOptionsBuilder() { return PolylineOptionsBuilder.__super__.constructor.apply(this, arguments); } PolylineOptionsBuilder.prototype.buildOpts = function(pathPoints) { return PolylineOptionsBuilder.__super__.buildOpts.call(this, { path: pathPoints }, { geodesic: false }); }; return PolylineOptionsBuilder; })(CommonOptionsBuilder); } ]).factory("ShapeOptionsBuilder".ns(), [ "CommonOptionsBuilder".ns(), function(CommonOptionsBuilder) { var ShapeOptionsBuilder; return ShapeOptionsBuilder = (function(_super) { __extends(ShapeOptionsBuilder, _super); function ShapeOptionsBuilder() { return ShapeOptionsBuilder.__super__.constructor.apply(this, arguments); } ShapeOptionsBuilder.prototype.buildOpts = function(customOpts, forEachOpts) { var _ref, _ref1; customOpts = angular.extend(customOpts, { fillColor: (_ref = this.scope.fill) != null ? _ref.color : void 0, fillOpacity: (_ref1 = this.scope.fill) != null ? _ref1.opacity : void 0 }); return ShapeOptionsBuilder.__super__.buildOpts.call(this, customOpts, forEachOpts); }; return ShapeOptionsBuilder; })(CommonOptionsBuilder); } ]).factory("PolygonOptionsBuilder".ns(), [ "ShapeOptionsBuilder".ns(), function(ShapeOptionsBuilder) { var PolygonOptionsBuilder; return PolygonOptionsBuilder = (function(_super) { __extends(PolygonOptionsBuilder, _super); function PolygonOptionsBuilder() { return PolygonOptionsBuilder.__super__.constructor.apply(this, arguments); } PolygonOptionsBuilder.prototype.buildOpts = function(pathPoints) { return PolygonOptionsBuilder.__super__.buildOpts.call(this, { path: pathPoints }, { geodesic: false }); }; return PolygonOptionsBuilder; })(ShapeOptionsBuilder); } ]).factory("RectangleOptionsBuilder".ns(), [ "ShapeOptionsBuilder".ns(), function(ShapeOptionsBuilder) { var RectangleOptionsBuilder; return RectangleOptionsBuilder = (function(_super) { __extends(RectangleOptionsBuilder, _super); function RectangleOptionsBuilder() { return RectangleOptionsBuilder.__super__.constructor.apply(this, arguments); } RectangleOptionsBuilder.prototype.buildOpts = function(bounds) { return RectangleOptionsBuilder.__super__.buildOpts.call(this, { bounds: bounds }); }; return RectangleOptionsBuilder; })(ShapeOptionsBuilder); } ]).factory("CircleOptionsBuilder".ns(), [ "ShapeOptionsBuilder".ns(), function(ShapeOptionsBuilder) { var CircleOptionsBuilder; return CircleOptionsBuilder = (function(_super) { __extends(CircleOptionsBuilder, _super); function CircleOptionsBuilder() { return CircleOptionsBuilder.__super__.constructor.apply(this, arguments); } CircleOptionsBuilder.prototype.buildOpts = function(center, radius) { return CircleOptionsBuilder.__super__.buildOpts.call(this, { center: center, radius: radius }); }; return CircleOptionsBuilder; })(ShapeOptionsBuilder); } ]); }).call(this); (function() { angular.module("google-maps.directives.api.options".ns()).service("MarkerOptions".ns(), [ "Logger".ns(), "GmapUtil".ns(), function($log, GmapUtil) { return _.extend(GmapUtil, { createOptions: function(coords, icon, defaults, map) { var opts; if (map == null) { map = void 0; } if (defaults == null) { defaults = {}; } opts = angular.extend({}, defaults, { position: defaults.position != null ? defaults.position : GmapUtil.getCoords(coords), visible: defaults.visible != null ? defaults.visible : GmapUtil.validateCoords(coords) }); if ((defaults.icon != null) || (icon != null)) { opts = angular.extend(opts, { icon: defaults.icon != null ? defaults.icon : icon }); } if (map != null) { opts.map = map; } return opts; }, isLabel: function(options) { if ((options.labelContent != null) || (options.labelAnchor != null) || (options.labelClass != null) || (options.labelStyle != null) || (options.labelVisible != null)) { return true; } else { return false; } } }); } ]); }).call(this); /* angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicholas McCready - https://twitter.com/nmccready Original idea from: http://stackoverflow.com/questions/22758950/google-map-drawing-freehand , & http://jsfiddle.net/YsQdh/88/ */ (function() { angular.module("google-maps.directives.api.models.child".ns()).factory("DrawFreeHandChildModel".ns(), [ "Logger".ns(), '$q', function($log, $q) { var drawFreeHand, freeHandMgr; drawFreeHand = function(map, polys, enable) { var move, poly; this.polys = polys; poly = new google.maps.Polyline({ map: map, clickable: false }); move = google.maps.event.addListener(map, 'mousemove', function(e) { return poly.getPath().push(e.latLng); }); google.maps.event.addListenerOnce(map, 'mouseup', function(e) { var path; google.maps.event.removeListener(move); path = poly.getPath(); poly.setMap(null); polys.push(new google.maps.Polygon({ map: map, path: path })); poly = null; google.maps.event.clearListeners(map.getDiv(), 'mousedown'); return enable(); }); return void 0; }; freeHandMgr = function(map) { var disableMap, enable; this.map = map; enable = (function(_this) { return function() { var _ref; if ((_ref = _this.deferred) != null) { _ref.resolve(); } return _this.map.setOptions(_this.oldOptions); }; })(this); disableMap = (function(_this) { return function() { $log.info('disabling map move'); _this.oldOptions = map.getOptions(); return _this.map.setOptions({ draggable: false, zoomControl: false, scrollwheel: false, disableDoubleClickZoom: false }); }; })(this); this.engage = (function(_this) { return function(polys) { _this.polys = polys; _this.deferred = $q.defer(); disableMap(); $log.info('DrawFreeHandChildModel is engaged (drawing).'); google.maps.event.addDomListener(_this.map.getDiv(), 'mousedown', function(e) { return drawFreeHand(_this.map, _this.polys, enable); }); return _this.deferred.promise; }; })(this); return this; }; return freeHandMgr; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.child".ns()).factory("MarkerChildModel".ns(), [ "ModelKey".ns(), "GmapUtil".ns(), "Logger".ns(), "EventsHelper".ns(), "PropertyAction".ns(), "MarkerOptions".ns(), "IMarker".ns(), "MarkerManager".ns(), function(ModelKey, GmapUtil, $log, EventsHelper, PropertyAction, MarkerOptions, IMarker, MarkerManager) { var MarkerChildModel, keys; keys = ['coords', 'icon', 'options', 'fit']; MarkerChildModel = (function(_super) { var destroy; __extends(MarkerChildModel, _super); MarkerChildModel.include(GmapUtil); MarkerChildModel.include(EventsHelper); MarkerChildModel.include(MarkerOptions); destroy = function(child) { if ((child != null ? child.gMarker : void 0) != null) { child.removeEvents(child.externalListeners); child.removeEvents(child.internalListeners); if (child != null ? child.gMarker : void 0) { if (child.removeFromManager) { child.gMarkerManager.remove(child.gMarker); } child.gMarker.setMap(null); return child.gMarker = null; } } }; function MarkerChildModel(scope, model, keys, gMap, defaults, doClick, gMarkerManager, doDrawSelf, trackModel, needRedraw) { var action, firstTime; this.model = model; this.keys = keys; this.gMap = gMap; this.defaults = defaults; this.doClick = doClick; this.gMarkerManager = gMarkerManager; this.doDrawSelf = doDrawSelf != null ? doDrawSelf : true; this.trackModel = trackModel != null ? trackModel : true; this.needRedraw = needRedraw != null ? needRedraw : false; this.internalEvents = __bind(this.internalEvents, this); this.setLabelOptions = __bind(this.setLabelOptions, this); this.setOptions = __bind(this.setOptions, this); this.setIcon = __bind(this.setIcon, this); this.setCoords = __bind(this.setCoords, this); this.isNotValid = __bind(this.isNotValid, this); this.maybeSetScopeValue = __bind(this.maybeSetScopeValue, this); this.createMarker = __bind(this.createMarker, this); this.setMyScope = __bind(this.setMyScope, this); this.destroy = __bind(this.destroy, this); this.deferred = Promise.defer(); _.each(this.keys, (function(_this) { return function(v, k) { return _this[k + 'Key'] = _.isFunction(_this.keys[k]) ? _this.keys[k]() : _this.keys[k]; }; })(this)); this.idKey = this.idKeyKey || "id"; if (this.model[this.idKey] != null) { this.id = this.model[this.idKey]; } MarkerChildModel.__super__.constructor.call(this, scope); this.setMyScope('all', this.model, void 0, true); this.createMarker(this.model); firstTime = true; if (this.trackModel) { this.scope.model = this.model; this.scope.$watch('model', (function(_this) { return function(newValue, oldValue) { var changes; if (newValue !== oldValue) { changes = _this.getChanges(newValue, oldValue, IMarker.keys); return _.each(changes, function(v, k) { _this.setMyScope(k, newValue, oldValue); return _this.needRedraw = true; }); } }; })(this), true); } else { action = new PropertyAction((function(_this) { return function(calledKey, newVal) { return _this.setMyScope(calledKey, scope); }; })(this), false); _.each(this.keys, function(v, k) { return scope.$watch(k, action.sic, true); }); } this.scope.$on("$destroy", (function(_this) { return function() { return destroy(_this); }; })(this)); $log.info(this); } MarkerChildModel.prototype.destroy = function(removeFromManager) { if (removeFromManager == null) { removeFromManager = true; } this.removeFromManager = removeFromManager; return this.scope.$destroy(); }; MarkerChildModel.prototype.setMyScope = function(thingThatChanged, model, oldModel, isInit) { var justCreated; if (oldModel == null) { oldModel = void 0; } if (isInit == null) { isInit = false; } if (model == null) { model = this.model; } if (!this.gMarker) { this.setOptions(this.scope); justCreated = true; } switch (thingThatChanged) { case 'all': return _.each(this.keys, (function(_this) { return function(v, k) { return _this.setMyScope(k, model, oldModel, isInit); }; })(this)); case 'icon': return this.maybeSetScopeValue('icon', model, oldModel, this.iconKey, this.evalModelHandle, isInit, this.setIcon); case 'coords': return this.maybeSetScopeValue('coords', model, oldModel, this.coordsKey, this.evalModelHandle, isInit, this.setCoords); case 'click': if (_.isFunction(this.clickKey)) { this.scope.click = (function(_this) { return function() {}; })(this); return this.clickKey(this.gMarker, "click", this.model, void 0); } else { return this.maybeSetScopeValue('click', model, oldModel, this.clickKey, this.evalModelHandle, isInit); } break; case 'options': if (!justCreated) { return this.createMarker(model, oldModel, isInit); } } }; MarkerChildModel.prototype.createMarker = function(model, oldModel, isInit) { if (oldModel == null) { oldModel = void 0; } if (isInit == null) { isInit = false; } return this.maybeSetScopeValue('options', model, oldModel, this.optionsKey, this.evalModelHandle, isInit, this.setOptions); }; MarkerChildModel.prototype.maybeSetScopeValue = function(scopePropName, model, oldModel, modelKey, evaluate, isInit, gSetter) { var newValue, oldVal; if (gSetter == null) { gSetter = void 0; } if (oldModel === void 0) { this.scope[scopePropName] = evaluate(model, modelKey); if (gSetter != null) { gSetter(this.scope); } return; } oldVal = evaluate(oldModel, modelKey); newValue = evaluate(model, modelKey); if (newValue !== oldVal) { this.scope[scopePropName] = newValue; if (!isInit) { if (gSetter != null) { gSetter(this.scope); } if (this.doDrawSelf) { return this.gMarkerManager.draw(); } } } }; MarkerChildModel.prototype.isNotValid = function(scope, doCheckGmarker) { var hasIdenticalScopes, hasNoGmarker; if (doCheckGmarker == null) { doCheckGmarker = true; } hasNoGmarker = !doCheckGmarker ? false : this.gMarker === void 0; hasIdenticalScopes = !this.trackModel ? scope.$id !== this.scope.$id : false; return hasIdenticalScopes || hasNoGmarker; }; MarkerChildModel.prototype.setCoords = function(scope) { if (this.isNotValid(scope) || (this.gMarker == null)) { return; } if (scope.coords != null) { if (!this.validateCoords(this.scope.coords)) { $log.debug("MarkerChild does not have coords yet. They may be defined later."); return; } this.gMarker.setPosition(this.getCoords(scope.coords)); this.gMarker.setVisible(this.validateCoords(scope.coords)); return this.gMarkerManager.add(this.gMarker); } else { return this.gMarkerManager.remove(this.gMarker); } }; MarkerChildModel.prototype.setIcon = function(scope) { if (this.isNotValid(scope) || (this.gMarker == null)) { return; } this.gMarker.setIcon(scope.icon); this.gMarkerManager.add(this.gMarker); this.gMarker.setPosition(this.getCoords(scope.coords)); return this.gMarker.setVisible(this.validateCoords(scope.coords)); }; MarkerChildModel.prototype.setOptions = function(scope) { if (this.isNotValid(scope, false)) { return; } if (scope.coords == null) { return; } this.opts = this.createOptions(scope.coords, this.getProp('icon', scope.icon), this.getProp('options', scope.options)); if (this.gMarker != null) { this.gMarker.setOptions(this.opts); } if (!this.gMarker) { if (this.isLabel(this.opts)) { this.gMarker = new MarkerWithLabel(this.setLabelOptions(this.opts)); } else { this.gMarker = new google.maps.Marker(this.opts); } } if (this.externalListeners) { this.removeEvents(this.externalListeners); } if (this.internalListeners) { this.removeEvents(this.internalListeners); } this.externalListeners = this.setEvents(this.gMarker, this.scope, this.model, ['dragend']); this.internalListeners = this.setEvents(this.gMarker, { events: this.internalEvents(), $apply: function() {} }, this.model); if (this.id != null) { this.gMarker.key = this.id; } this.gMarkerManager.add(this.gMarker); if (this.gMarker && (this.gMarker.getMap() || this.gMarkerManager.type !== MarkerManager.type)) { this.deferred.resolve(this.gMarker); } else { if (!this.gMarker) { this.deferred.reject("gMarker is null"); } if (!(this.gMarker.getMap() && this.gMarkerManager.type === MarkerManager.type)) { this.deferred.reject("gMarker has no map"); } } if (this.model[this.fitKey]) { return this.gMarkerManager.fit(); } }; MarkerChildModel.prototype.setLabelOptions = function(opts) { opts.labelAnchor = this.getLabelPositionPoint(opts.labelAnchor); return opts; }; MarkerChildModel.prototype.internalEvents = function() { return { dragend: (function(_this) { return function(marker, eventName, model, mousearg) { var modelToSet, newCoords, _ref; modelToSet = _this.trackModel ? _this.scope.model : _this.model; newCoords = _this.setCoordsFromEvent(_this.modelOrKey(modelToSet, _this.coordsKey), _this.gMarker.getPosition()); modelToSet = _this.setVal(model, _this.coordsKey, newCoords); if (((_ref = _this.scope.events) != null ? _ref.dragend : void 0) != null) { _this.scope.events.dragend(marker, eventName, modelToSet, mousearg); } return _this.scope.$apply(); }; })(this), click: (function(_this) { return function(marker, eventName, model, mousearg) { if (_this.doClick && (_this.scope.click != null)) { return _this.scope.$apply(_this.scope.click(marker, eventName, _this.model, mousearg)); } }; })(this) }; }; return MarkerChildModel; })(ModelKey); return MarkerChildModel; } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("PolygonChildModel".ns(), [ "PolygonOptionsBuilder".ns(), "Logger".ns(), "$timeout", "array-sync".ns(), "GmapUtil".ns(), "EventsHelper".ns(), function(Builder, $log, $timeout, arraySync, GmapUtil, EventsHelper) { var PolygonChildModel; return PolygonChildModel = (function(_super) { __extends(PolygonChildModel, _super); PolygonChildModel.include(GmapUtil); PolygonChildModel.include(EventsHelper); function PolygonChildModel(scope, attrs, map, defaults, model) { var arraySyncer, pathPoints, polygon; this.scope = scope; this.attrs = attrs; this.map = map; this.defaults = defaults; this.model = model; this.listeners = void 0; if (angular.isUndefined(scope.path) || scope.path === null || !this.validatePath(scope.path)) { $log.error("polygon: no valid path attribute found"); return; } pathPoints = this.convertPathPoints(scope.path); polygon = new google.maps.Polygon(this.buildOpts(pathPoints)); if (scope.fit) { this.extendMapBounds(this.map, pathPoints); } if (!scope["static"] && angular.isDefined(scope.editable)) { scope.$watch("editable", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setEditable(newValue); } }); } if (angular.isDefined(scope.draggable)) { scope.$watch("draggable", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setDraggable(newValue); } }); } if (angular.isDefined(scope.visible)) { scope.$watch("visible", function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setVisible(newValue); } }); } if (angular.isDefined(scope.geodesic)) { scope.$watch("geodesic", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(_this.buildOpts(polygon.getPath())); } }; })(this)); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.opacity)) { scope.$watch("stroke.opacity", (function(_this) { return function(newValue, oldValue) { return polygon.setOptions(_this.buildOpts(polygon.getPath())); }; })(this)); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.weight)) { scope.$watch("stroke.weight", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(_this.buildOpts(polygon.getPath())); } }; })(this)); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.color)) { scope.$watch("stroke.color", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(_this.buildOpts(polygon.getPath())); } }; })(this)); } if (angular.isDefined(scope.fill) && angular.isDefined(scope.fill.color)) { scope.$watch("fill.color", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(_this.buildOpts(polygon.getPath())); } }; })(this)); } if (angular.isDefined(scope.fill) && angular.isDefined(scope.fill.opacity)) { scope.$watch("fill.opacity", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(_this.buildOpts(polygon.getPath())); } }; })(this)); } if (angular.isDefined(scope.zIndex)) { scope.$watch("zIndex", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return polygon.setOptions(_this.buildOpts(polygon.getPath())); } }; })(this)); } if (angular.isDefined(scope.events) && scope.events !== null && angular.isObject(scope.events)) { this.listeners = EventsHelper.setEvents(polygon, scope, scope); } arraySyncer = arraySync(polygon.getPath(), scope, "path", (function(_this) { return function(pathPoints) { if (scope.fit) { return _this.extendMapBounds(_this.map, pathPoints); } }; })(this)); scope.$on("$destroy", (function(_this) { return function() { polygon.setMap(null); _this.removeEvents(_this.listeners); if (arraySyncer) { arraySyncer(); return arraySyncer = null; } }; })(this)); } return PolygonChildModel; })(Builder); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("PolylineChildModel".ns(), [ "PolylineOptionsBuilder".ns(), "Logger".ns(), "$timeout", "array-sync".ns(), "GmapUtil".ns(), "EventsHelper".ns(), function(Builder, $log, $timeout, arraySync, GmapUtil, EventsHelper) { var PolylineChildModel; return PolylineChildModel = (function(_super) { __extends(PolylineChildModel, _super); PolylineChildModel.include(GmapUtil); PolylineChildModel.include(EventsHelper); function PolylineChildModel(scope, attrs, map, defaults, model) { var createPolyline; this.scope = scope; this.attrs = attrs; this.map = map; this.defaults = defaults; this.model = model; this.clean = __bind(this.clean, this); createPolyline = (function(_this) { return function() { var pathPoints; pathPoints = _this.convertPathPoints(_this.scope.path); if (_this.polyline != null) { _this.clean(); } if (pathPoints.length > 0) { _this.polyline = new google.maps.Polyline(_this.buildOpts(pathPoints)); } if (_this.polyline) { if (_this.scope.fit) { _this.extendMapBounds(map, pathPoints); } arraySync(_this.polyline.getPath(), _this.scope, "path", function(pathPoints) { if (_this.scope.fit) { return _this.extendMapBounds(map, pathPoints); } }); return _this.listeners = _this.model ? _this.setEvents(_this.polyline, _this.scope, _this.model) : _this.setEvents(_this.polyline, _this.scope, _this.scope); } }; })(this); createPolyline(); scope.$watch('path', (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue) || !_this.polyline) { return createPolyline(); } }; })(this)); if (!scope["static"] && angular.isDefined(scope.editable)) { scope.$watch("editable", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setEditable(newValue) : void 0; } }; })(this)); } if (angular.isDefined(scope.draggable)) { scope.$watch("draggable", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setDraggable(newValue) : void 0; } }; })(this)); } if (angular.isDefined(scope.visible)) { scope.$watch("visible", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setVisible(newValue) : void 0; } }; })(this)); } if (angular.isDefined(scope.geodesic)) { scope.$watch("geodesic", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setOptions(_this.buildOpts(_this.polyline.getPath())) : void 0; } }; })(this)); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.weight)) { scope.$watch("stroke.weight", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setOptions(_this.buildOpts(_this.polyline.getPath())) : void 0; } }; })(this)); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.color)) { scope.$watch("stroke.color", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setOptions(_this.buildOpts(_this.polyline.getPath())) : void 0; } }; })(this)); } if (angular.isDefined(scope.stroke) && angular.isDefined(scope.stroke.opacity)) { scope.$watch("stroke.opacity", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setOptions(_this.buildOpts(_this.polyline.getPath())) : void 0; } }; })(this)); } if (angular.isDefined(scope.icons)) { scope.$watch("icons", (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { return (_ref = _this.polyline) != null ? _ref.setOptions(_this.buildOpts(_this.polyline.getPath())) : void 0; } }; })(this)); } scope.$on("$destroy", (function(_this) { return function() { _this.clean(); return _this.scope = null; }; })(this)); $log.info(this); } PolylineChildModel.prototype.clean = function() { var arraySyncer, _ref; this.removeEvents(this.listeners); if ((_ref = this.polyline) != null) { _ref.setMap(null); } this.polyline = null; if (arraySyncer) { arraySyncer(); return arraySyncer = null; } }; PolylineChildModel.prototype.destroy = function() { return this.scope.$destroy(); }; return PolylineChildModel; })(Builder); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.child".ns()).factory("WindowChildModel".ns(), [ "BaseObject".ns(), "GmapUtil".ns(), "Logger".ns(), "$compile", "$http", "$templateCache", function(BaseObject, GmapUtil, $log, $compile, $http, $templateCache) { var WindowChildModel; WindowChildModel = (function(_super) { __extends(WindowChildModel, _super); WindowChildModel.include(GmapUtil); function WindowChildModel(model, scope, opts, isIconVisibleOnClick, mapCtrl, markerCtrl, element, needToManualDestroy, markerIsVisibleAfterWindowClose) { this.model = model; this.scope = scope; this.opts = opts; this.isIconVisibleOnClick = isIconVisibleOnClick; this.mapCtrl = mapCtrl; this.markerCtrl = markerCtrl; this.element = element; this.needToManualDestroy = needToManualDestroy != null ? needToManualDestroy : false; this.markerIsVisibleAfterWindowClose = markerIsVisibleAfterWindowClose != null ? markerIsVisibleAfterWindowClose : true; this.getGWin = __bind(this.getGWin, this); this.destroy = __bind(this.destroy, this); this.remove = __bind(this.remove, this); this.getLatestPosition = __bind(this.getLatestPosition, this); this.hideWindow = __bind(this.hideWindow, this); this.showWindow = __bind(this.showWindow, this); this.handleClick = __bind(this.handleClick, this); this.watchOptions = __bind(this.watchOptions, this); this.watchCoords = __bind(this.watchCoords, this); this.createGWin = __bind(this.createGWin, this); this.watchElement = __bind(this.watchElement, this); this.watchAndDoShow = __bind(this.watchAndDoShow, this); this.doShow = __bind(this.doShow, this); this.googleMapsHandles = []; this.createGWin(); if (this.markerCtrl != null) { this.markerCtrl.setClickable(true); } this.watchElement(); this.watchOptions(); this.watchCoords(); this.watchAndDoShow(); this.scope.$on("$destroy", (function(_this) { return function() { return _this.destroy(); }; })(this)); $log.info(this); } WindowChildModel.prototype.doShow = function() { if (this.scope.show) { return this.showWindow(); } }; WindowChildModel.prototype.watchAndDoShow = function() { if (this.model.show != null) { this.scope.show = this.model.show; } this.scope.$watch('show', this.doShow, true); return this.doShow(); }; WindowChildModel.prototype.watchElement = function() { return this.scope.$watch((function(_this) { return function() { var _ref; if (!_this.element || !_this.html) { return; } if (_this.html !== _this.element.html()) { if (_this.gWin) { if ((_ref = _this.opts) != null) { _ref.content = void 0; } _this.remove(); return _this.createGWin(); } } }; })(this)); }; WindowChildModel.prototype.createGWin = function() { var defaults, _opts; if (this.gWin == null) { defaults = {}; if (this.opts != null) { if (this.scope.coords) { this.opts.position = this.getCoords(this.scope.coords); } defaults = this.opts; } if (this.element) { this.html = _.isObject(this.element) ? this.element.html() : this.element; } _opts = this.scope.options ? this.scope.options : defaults; this.opts = this.createWindowOptions(this.markerCtrl, this.scope, this.html, _opts); } if ((this.opts != null) && !this.gWin) { if (this.opts.boxClass && (window.InfoBox && typeof window.InfoBox === 'function')) { this.gWin = new window.InfoBox(this.opts); } else { this.gWin = new google.maps.InfoWindow(this.opts); } this.handleClick(); this.doShow(); return this.googleMapsHandles.push(google.maps.event.addListener(this.gWin, 'closeclick', (function(_this) { return function() { if (_this.markerCtrl) { _this.markerCtrl.setAnimation(_this.oldMarkerAnimation); if (_this.markerIsVisibleAfterWindowClose) { _.delay(function() { _this.markerCtrl.setVisible(false); return _this.markerCtrl.setVisible(_this.markerIsVisibleAfterWindowClose); }, 250); } } _this.gWin.isOpen(false); _this.model.show = false; if (_this.scope.closeClick != null) { return _this.scope.$apply(_this.scope.closeClick()); } else { return _this.scope.$apply(); } }; })(this))); } }; WindowChildModel.prototype.watchCoords = function() { var scope; scope = this.markerCtrl != null ? this.scope.$parent : this.scope; return scope.$watch('coords', (function(_this) { return function(newValue, oldValue) { var pos; if (newValue !== oldValue) { if (newValue == null) { return _this.hideWindow(); } else { if (!_this.validateCoords(newValue)) { $log.error("WindowChildMarker cannot render marker as scope.coords as no position on marker: " + (JSON.stringify(_this.model))); return; } pos = _this.getCoords(newValue); _this.gWin.setPosition(pos); if (_this.opts) { return _this.opts.position = pos; } } } }; })(this), true); }; WindowChildModel.prototype.watchOptions = function() { var scope; scope = this.markerCtrl != null ? this.scope.$parent : this.scope; return this.scope.$watch('options', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this.opts = newValue; if (_this.gWin != null) { _this.gWin.setOptions(_this.opts); if ((_this.opts.visible != null) && _this.opts.visible) { return _this.showWindow(); } else if (_this.opts.visible != null) { return _this.hideWindow(); } } } }; })(this), true); }; WindowChildModel.prototype.handleClick = function(forceClick) { var click; if (this.gWin == null) { return; } click = (function(_this) { return function() { var pos; if (_this.gWin == null) { _this.createGWin(); } pos = _this.markerCtrl.getPosition(); if (_this.gWin != null) { _this.gWin.setPosition(pos); if (_this.opts) { _this.opts.position = pos; } _this.showWindow(); } _this.initialMarkerVisibility = _this.markerCtrl.getVisible(); _this.oldMarkerAnimation = _this.markerCtrl.getAnimation(); return _this.markerCtrl.setVisible(_this.isIconVisibleOnClick); }; })(this); if (this.markerCtrl != null) { if (forceClick) { click(); } return this.googleMapsHandles.push(google.maps.event.addListener(this.markerCtrl, 'click', click)); } }; WindowChildModel.prototype.showWindow = function() { var compiled, show, templateScope; show = (function(_this) { return function() { if (_this.gWin != null) { if (!_this.gWin.isOpen()) { _this.gWin.open(_this.mapCtrl, _this.markerCtrl ? _this.markerCtrl : void 0); return _this.model.show = _this.gWin.isOpen(); } } }; })(this); if (this.scope.templateUrl) { if (this.gWin != null) { $http.get(this.scope.templateUrl, { cache: $templateCache }).then((function(_this) { return function(content) { var compiled, templateScope; templateScope = _this.scope.$new(); if (angular.isDefined(_this.scope.templateParameter)) { templateScope.parameter = _this.scope.templateParameter; } compiled = $compile(content.data)(templateScope); return _this.gWin.setContent(compiled[0]); }; })(this)); } } else if (this.scope.template) { if (this.gWin != null) { templateScope = this.scope.$new(); if (angular.isDefined(this.scope.templateParameter)) { templateScope.parameter = this.scope.templateParameter; } compiled = $compile(this.scope.template)(templateScope); this.gWin.setContent(compiled[0]); } } return show(); }; WindowChildModel.prototype.hideWindow = function() { if ((this.gWin != null) && this.gWin.isOpen()) { return this.gWin.close(); } }; WindowChildModel.prototype.getLatestPosition = function(overridePos) { if ((this.gWin != null) && (this.markerCtrl != null) && !overridePos) { return this.gWin.setPosition(this.markerCtrl.getPosition()); } else { if (overridePos) { return this.gWin.setPosition(overridePos); } } }; WindowChildModel.prototype.remove = function() { this.hideWindow(); _.each(this.googleMapsHandles, function(h) { return google.maps.event.removeListener(h); }); this.googleMapsHandles.length = 0; delete this.gWin; return delete this.opts; }; WindowChildModel.prototype.destroy = function(manualOverride) { var self, _ref; if (manualOverride == null) { manualOverride = false; } this.remove(); if ((this.scope != null) && ((_ref = this.scope) != null ? _ref.$$destroyed : void 0) && (this.needToManualDestroy || manualOverride)) { this.scope.$destroy(); } return self = void 0; }; WindowChildModel.prototype.getGWin = function() { return this.gWin; }; return WindowChildModel; })(BaseObject); return WindowChildModel; } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent".ns()).factory("CircleParentModel".ns(), [ 'Logger'.ns(), '$timeout', "GmapUtil".ns(), "EventsHelper".ns(), "CircleOptionsBuilder".ns(), function($log, $timeout, GmapUtil, EventsHelper, Builder) { var CircleParentModel; return CircleParentModel = (function(_super) { __extends(CircleParentModel, _super); CircleParentModel.include(GmapUtil); CircleParentModel.include(EventsHelper); function CircleParentModel(scope, element, attrs, map, DEFAULTS) { var circle, listeners; this.scope = scope; this.attrs = attrs; this.map = map; this.DEFAULTS = DEFAULTS; circle = new google.maps.Circle(this.buildOpts(GmapUtil.getCoords(scope.center), scope.radius)); this.setMyOptions = (function(_this) { return function(newVals, oldVals) { if (!_.isEqual(newVals, oldVals)) { return circle.setOptions(_this.buildOpts(GmapUtil.getCoords(scope.center), scope.radius)); } }; })(this); this.props = this.props.concat([ { prop: 'center', isColl: true }, { prop: 'fill', isColl: true }, 'radius' ]); this.watchProps(); listeners = this.setEvents(circle, scope, scope); google.maps.event.addListener(circle, 'radius_changed', function() { scope.radius = circle.getRadius(); return $timeout(function() { return scope.$apply(); }); }); google.maps.event.addListener(circle, 'center_changed', function() { if (angular.isDefined(scope.center.type)) { scope.center.coordinates[1] = circle.getCenter().lat(); scope.center.coordinates[0] = circle.getCenter().lng(); } else { scope.center.latitude = circle.getCenter().lat(); scope.center.longitude = circle.getCenter().lng(); } return $timeout(function() { return scope.$apply(); }); }); scope.$on("$destroy", (function(_this) { return function() { _this.removeEvents(listeners); return circle.setMap(null); }; })(this)); $log.info(this); } return CircleParentModel; })(Builder); } ]); }).call(this); (function() { angular.module("google-maps.directives.api.models.parent".ns()).factory("DrawingManagerParentModel".ns(), [ 'Logger'.ns(), '$timeout', function($log, $timeout) { var DrawingManagerParentModel; return DrawingManagerParentModel = (function() { function DrawingManagerParentModel(scope, element, attrs, map) { var drawingManager; this.scope = scope; this.attrs = attrs; this.map = map; drawingManager = new google.maps.drawing.DrawingManager(this.scope.options); drawingManager.setMap(this.map); if (this.scope.control != null) { this.scope.control.getDrawingManager = (function(_this) { return function() { return drawingManager; }; })(this); } if (!this.scope["static"] && this.scope.options) { this.scope.$watch("options", (function(_this) { return function(newValue) { return drawingManager != null ? drawingManager.setOptions(newValue) : void 0; }; })(this), true); } scope.$on("$destroy", (function(_this) { return function() { drawingManager.setMap(null); return drawingManager = null; }; })(this)); } return DrawingManagerParentModel; })(); } ]); }).call(this); /* - interface for all markers to derrive from - to enforce a minimum set of requirements - attributes - coords - icon - implementation needed on watches */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent".ns()).factory("IMarkerParentModel".ns(), [ "ModelKey".ns(), "Logger".ns(), function(ModelKey, Logger) { var IMarkerParentModel; IMarkerParentModel = (function(_super) { __extends(IMarkerParentModel, _super); IMarkerParentModel.prototype.DEFAULTS = {}; function IMarkerParentModel(scope, element, attrs, map) { this.scope = scope; this.element = element; this.attrs = attrs; this.map = map; this.onDestroy = __bind(this.onDestroy, this); this.onWatch = __bind(this.onWatch, this); this.watch = __bind(this.watch, this); this.validateScope = __bind(this.validateScope, this); IMarkerParentModel.__super__.constructor.call(this, this.scope); this.$log = Logger; if (!this.validateScope(scope)) { throw new String("Unable to construct IMarkerParentModel due to invalid scope"); } this.doClick = angular.isDefined(attrs.click); if (scope.options != null) { this.DEFAULTS = scope.options; } this.watch('coords', this.scope); this.watch('icon', this.scope); this.watch('options', this.scope); scope.$on("$destroy", (function(_this) { return function() { return _this.onDestroy(scope); }; })(this)); } IMarkerParentModel.prototype.validateScope = function(scope) { var ret; if (scope == null) { this.$log.error(this.constructor.name + ": invalid scope used"); return false; } ret = scope.coords != null; if (!ret) { this.$log.error(this.constructor.name + ": no valid coords attribute found"); return false; } return ret; }; IMarkerParentModel.prototype.watch = function(propNameToWatch, scope) { return scope.$watch(propNameToWatch, (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { return _this.onWatch(propNameToWatch, scope, newValue, oldValue); } }; })(this), true); }; IMarkerParentModel.prototype.onWatch = function(propNameToWatch, scope, newValue, oldValue) {}; IMarkerParentModel.prototype.onDestroy = function(scope) { throw new String("OnDestroy Not Implemented!!"); }; return IMarkerParentModel; })(ModelKey); return IMarkerParentModel; } ]); }).call(this); /* - interface directive for all window(s) to derrive from */ (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent".ns()).factory("IWindowParentModel".ns(), [ "ModelKey".ns(), "GmapUtil".ns(), "Logger".ns(), function(ModelKey, GmapUtil, Logger) { var IWindowParentModel; IWindowParentModel = (function(_super) { __extends(IWindowParentModel, _super); IWindowParentModel.include(GmapUtil); function IWindowParentModel(scope, element, attrs, ctrls, $timeout, $compile, $http, $templateCache) { IWindowParentModel.__super__.constructor.call(this, scope); this.$log = Logger; this.$timeout = $timeout; this.$compile = $compile; this.$http = $http; this.$templateCache = $templateCache; this.DEFAULTS = {}; if (scope.options != null) { this.DEFAULTS = scope.options; } } return IWindowParentModel; })(ModelKey); return IWindowParentModel; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent".ns()).factory("LayerParentModel".ns(), [ "BaseObject".ns(), "Logger".ns(), '$timeout', function(BaseObject, Logger, $timeout) { var LayerParentModel; LayerParentModel = (function(_super) { __extends(LayerParentModel, _super); function LayerParentModel(scope, element, attrs, gMap, onLayerCreated, $log) { this.scope = scope; this.element = element; this.attrs = attrs; this.gMap = gMap; this.onLayerCreated = onLayerCreated != null ? onLayerCreated : void 0; this.$log = $log != null ? $log : Logger; this.createGoogleLayer = __bind(this.createGoogleLayer, this); if (this.attrs.type == null) { this.$log.info("type attribute for the layer directive is mandatory. Layer creation aborted!!"); return; } this.createGoogleLayer(); this.doShow = true; if (angular.isDefined(this.attrs.show)) { this.doShow = this.scope.show; } if (this.doShow && (this.gMap != null)) { this.layer.setMap(this.gMap); } this.scope.$watch("show", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this.doShow = newValue; if (newValue) { return _this.layer.setMap(_this.gMap); } else { return _this.layer.setMap(null); } } }; })(this), true); this.scope.$watch("options", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this.layer.setMap(null); _this.layer = null; return _this.createGoogleLayer(); } }; })(this), true); this.scope.$on("$destroy", (function(_this) { return function() { return _this.layer.setMap(null); }; })(this)); } LayerParentModel.prototype.createGoogleLayer = function() { var fn; if (this.attrs.options == null) { this.layer = this.attrs.namespace === void 0 ? new google.maps[this.attrs.type]() : new google.maps[this.attrs.namespace][this.attrs.type](); } else { this.layer = this.attrs.namespace === void 0 ? new google.maps[this.attrs.type](this.scope.options) : new google.maps[this.attrs.namespace][this.attrs.type](this.scope.options); } if ((this.layer != null) && (this.onLayerCreated != null)) { fn = this.onLayerCreated(this.scope, this.layer); if (fn) { return fn(this.layer); } } }; return LayerParentModel; })(BaseObject); return LayerParentModel; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent".ns()).factory("MapTypeParentModel".ns(), [ "BaseObject".ns(), "Logger".ns(), '$timeout', function(BaseObject, Logger, $timeout) { var MapTypeParentModel; MapTypeParentModel = (function(_super) { __extends(MapTypeParentModel, _super); function MapTypeParentModel(scope, element, attrs, gMap, $log) { this.scope = scope; this.element = element; this.attrs = attrs; this.gMap = gMap; this.$log = $log != null ? $log : Logger; this.hideOverlay = __bind(this.hideOverlay, this); this.showOverlay = __bind(this.showOverlay, this); this.refreshMapType = __bind(this.refreshMapType, this); this.createMapType = __bind(this.createMapType, this); if (this.attrs.options == null) { this.$log.info("options attribute for the map-type directive is mandatory. Map type creation aborted!!"); return; } this.id = this.gMap.overlayMapTypesCount = this.gMap.overlayMapTypesCount + 1 || 0; this.doShow = true; this.createMapType(); if (angular.isDefined(this.attrs.show)) { this.doShow = this.scope.show; } if (this.doShow && (this.gMap != null)) { this.showOverlay(); } this.scope.$watch("show", (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this.doShow = newValue; if (newValue) { return _this.showOverlay(); } else { return _this.hideOverlay(); } } }; })(this), true); this.scope.$watch("options", (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { return _this.refreshMapType(); } }; })(this), true); if (angular.isDefined(this.attrs.refresh)) { this.scope.$watch("refresh", (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { return _this.refreshMapType(); } }; })(this), true); } this.scope.$on("$destroy", (function(_this) { return function() { _this.hideOverlay(); return _this.mapType = null; }; })(this)); } MapTypeParentModel.prototype.createMapType = function() { if (this.scope.options.getTile != null) { this.mapType = this.scope.options; } else if (this.scope.options.getTileUrl != null) { this.mapType = new google.maps.ImageMapType(this.scope.options); } else { this.$log.info("options should provide either getTile or getTileUrl methods. Map type creation aborted!!"); return; } if (this.attrs.id && this.scope.id) { this.gMap.mapTypes.set(this.scope.id, this.mapType); if (!angular.isDefined(this.attrs.show)) { this.doShow = false; } } return this.mapType.layerId = this.id; }; MapTypeParentModel.prototype.refreshMapType = function() { this.hideOverlay(); this.mapType = null; this.createMapType(); if (this.doShow && (this.gMap != null)) { return this.showOverlay(); } }; MapTypeParentModel.prototype.showOverlay = function() { return this.gMap.overlayMapTypes.push(this.mapType); }; MapTypeParentModel.prototype.hideOverlay = function() { var found; found = false; return this.gMap.overlayMapTypes.forEach((function(_this) { return function(mapType, index) { if (!found && mapType.layerId === _this.id) { found = true; _this.gMap.overlayMapTypes.removeAt(index); } }; })(this)); }; return MapTypeParentModel; })(BaseObject); return MapTypeParentModel; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent".ns()).factory("MarkersParentModel".ns(), [ "IMarkerParentModel".ns(), "ModelsWatcher".ns(), "PropMap".ns(), "MarkerChildModel".ns(), "_async".ns(), "ClustererMarkerManager".ns(), "MarkerManager".ns(), "$timeout", "IMarker".ns(), function(IMarkerParentModel, ModelsWatcher, PropMap, MarkerChildModel, _async, ClustererMarkerManager, MarkerManager, $timeout, IMarker) { var MarkersParentModel; MarkersParentModel = (function(_super) { __extends(MarkersParentModel, _super); MarkersParentModel.include(ModelsWatcher); function MarkersParentModel(scope, element, attrs, map) { this.onDestroy = __bind(this.onDestroy, this); this.newChildMarker = __bind(this.newChildMarker, this); this.updateChild = __bind(this.updateChild, this); this.pieceMeal = __bind(this.pieceMeal, this); this.reBuildMarkers = __bind(this.reBuildMarkers, this); this.createMarkersFromScratch = __bind(this.createMarkersFromScratch, this); this.validateScope = __bind(this.validateScope, this); this.onWatch = __bind(this.onWatch, this); var self; MarkersParentModel.__super__.constructor.call(this, scope, element, attrs, map); self = this; this.scope.markerModels = new PropMap(); this.$log.info(this); this.doRebuildAll = this.scope.doRebuildAll != null ? this.scope.doRebuildAll : false; this.setIdKey(scope); this.scope.$watch('doRebuildAll', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return _this.doRebuildAll = newValue; } }; })(this)); this.watch('models', scope); this.watch('doCluster', scope); this.watch('clusterOptions', scope); this.watch('clusterEvents', scope); this.watch('fit', scope); this.watch('idKey', scope); this.gMarkerManager = void 0; this.createMarkersFromScratch(scope); } MarkersParentModel.prototype.onWatch = function(propNameToWatch, scope, newValue, oldValue) { if (propNameToWatch === "idKey" && newValue !== oldValue) { this.idKey = newValue; } if (this.doRebuildAll) { return this.reBuildMarkers(scope); } else { return this.pieceMeal(scope); } }; MarkersParentModel.prototype.validateScope = function(scope) { var modelsNotDefined; modelsNotDefined = angular.isUndefined(scope.models) || scope.models === void 0; if (modelsNotDefined) { this.$log.error(this.constructor.name + ": no valid models attribute found"); } return MarkersParentModel.__super__.validateScope.call(this, scope) || modelsNotDefined; }; MarkersParentModel.prototype.createMarkersFromScratch = function(scope) { if (scope.doCluster) { if (scope.clusterEvents) { this.clusterInternalOptions = _.once((function(_this) { return function() { var self, _ref, _ref1, _ref2; self = _this; if (!_this.origClusterEvents) { _this.origClusterEvents = { click: (_ref = scope.clusterEvents) != null ? _ref.click : void 0, mouseout: (_ref1 = scope.clusterEvents) != null ? _ref1.mouseout : void 0, mouseover: (_ref2 = scope.clusterEvents) != null ? _ref2.mouseover : void 0 }; return _.extend(scope.clusterEvents, { click: function(cluster) { return self.maybeExecMappedEvent(cluster, 'click'); }, mouseout: function(cluster) { return self.maybeExecMappedEvent(cluster, 'mouseout'); }, mouseover: function(cluster) { return self.maybeExecMappedEvent(cluster, 'mouseover'); } }); } }; })(this))(); } if (scope.clusterOptions || scope.clusterEvents) { if (this.gMarkerManager === void 0) { this.gMarkerManager = new ClustererMarkerManager(this.map, void 0, scope.clusterOptions, this.clusterInternalOptions); } else { if (this.gMarkerManager.opt_options !== scope.clusterOptions) { this.gMarkerManager = new ClustererMarkerManager(this.map, void 0, scope.clusterOptions, this.clusterInternalOptions); } } } else { this.gMarkerManager = new ClustererMarkerManager(this.map); } } else { this.gMarkerManager = new MarkerManager(this.map); } return _async.waitOrGo(this, (function(_this) { return function() { return _async.each(scope.models, function(model) { return _this.newChildMarker(model, scope); }, false).then(function() { _this.gMarkerManager.draw(); if (scope.fit) { return _this.gMarkerManager.fit(); } }); }; })(this)).then((function(_this) { return function() { return _this.existingPieces = void 0; }; })(this)); }; MarkersParentModel.prototype.reBuildMarkers = function(scope) { var _ref; if (!scope.doRebuild && scope.doRebuild !== void 0) { return; } if ((_ref = this.scope.markerModels) != null ? _ref.length : void 0) { this.onDestroy(scope); } return this.createMarkersFromScratch(scope); }; MarkersParentModel.prototype.pieceMeal = function(scope) { var doChunk; doChunk = this.existingPieces != null ? false : _async.defaultChunkSize; if ((this.scope.models != null) && this.scope.models.length > 0 && this.scope.markerModels.length > 0) { return this.figureOutState(this.idKey, scope, this.scope.markerModels, this.modelKeyComparison, (function(_this) { return function(state) { var payload; payload = state; return _async.waitOrGo(_this, function() { return _async.each(payload.removals, function(child) { if (child != null) { if (child.destroy != null) { child.destroy(); } return _this.scope.markerModels.remove(child.id); } }, doChunk).then(function() { return _async.each(payload.adds, function(modelToAdd) { return _this.newChildMarker(modelToAdd, scope); }, doChunk); }).then(function() { return _async.each(payload.updates, function(update) { return _this.updateChild(update.child, update.model); }, doChunk); }).then(function() { if (payload.adds.length > 0 || payload.removals.length > 0 || payload.updates.length > 0) { _this.gMarkerManager.draw(); scope.markerModels = _this.scope.markerModels; if (scope.fit) { return _this.gMarkerManager.fit(); } } }); }).then(function() { return _this.existingPieces = void 0; }); }; })(this)); } else { return this.reBuildMarkers(scope); } }; MarkersParentModel.prototype.updateChild = function(child, model) { if (model[this.idKey] == null) { this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); return; } return child.setMyScope(model, child.model, false); }; MarkersParentModel.prototype.newChildMarker = function(model, scope) { var child, childScope, doDrawSelf, keys; if (model[this.idKey] == null) { this.$log.error("Marker model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); return; } this.$log.info('child', child, 'markers', this.scope.markerModels); childScope = scope.$new(true); childScope.events = scope.events; keys = {}; _.each(IMarker.scopeKeys, function(v, k) { return keys[k] = scope[k]; }); child = new MarkerChildModel(childScope, model, keys, this.map, this.DEFAULTS, this.doClick, this.gMarkerManager, doDrawSelf = false); this.scope.markerModels.put(model[this.idKey], child); return child; }; MarkersParentModel.prototype.onDestroy = function(scope) { return _async.waitOrGo(this, (function(_this) { return function() { _.each(_this.scope.markerModels.values(), function(model) { if (model != null) { return model.destroy(false); } }); delete _this.scope.markerModels; if (_this.gMarkerManager != null) { _this.gMarkerManager.clear(); } _this.scope.markerModels = new PropMap(); return Promise.resolve(); }; })(this)); }; MarkersParentModel.prototype.maybeExecMappedEvent = function(cluster, fnName) { var pair, _ref; if (_.isFunction((_ref = this.scope.clusterEvents) != null ? _ref[fnName] : void 0)) { pair = this.mapClusterToMarkerModels(cluster); if (this.origClusterEvents[fnName]) { return this.origClusterEvents[fnName](pair.cluster, pair.mapped); } } }; MarkersParentModel.prototype.mapClusterToMarkerModels = function(cluster) { var gMarkers, mapped; gMarkers = cluster.getMarkers().values(); mapped = gMarkers.map((function(_this) { return function(g) { return _this.scope.markerModels[g.key].model; }; })(this)); return { cluster: cluster, mapped: mapped }; }; return MarkersParentModel; })(IMarkerParentModel); return MarkersParentModel; } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent".ns()).factory("PolylinesParentModel".ns(), [ "$timeout", "Logger".ns(), "ModelKey".ns(), "ModelsWatcher".ns(), "PropMap".ns(), "PolylineChildModel".ns(), "_async".ns(), function($timeout, Logger, ModelKey, ModelsWatcher, PropMap, PolylineChildModel, _async) { var PolylinesParentModel; return PolylinesParentModel = (function(_super) { __extends(PolylinesParentModel, _super); PolylinesParentModel.include(ModelsWatcher); function PolylinesParentModel(scope, element, attrs, gMap, defaults) { var self; this.scope = scope; this.element = element; this.attrs = attrs; this.gMap = gMap; this.defaults = defaults; this.modelKeyComparison = __bind(this.modelKeyComparison, this); this.setChildScope = __bind(this.setChildScope, this); this.createChild = __bind(this.createChild, this); this.pieceMeal = __bind(this.pieceMeal, this); this.createAllNew = __bind(this.createAllNew, this); this.watchIdKey = __bind(this.watchIdKey, this); this.createChildScopes = __bind(this.createChildScopes, this); this.watchOurScope = __bind(this.watchOurScope, this); this.watchDestroy = __bind(this.watchDestroy, this); this.rebuildAll = __bind(this.rebuildAll, this); this.doINeedToWipe = __bind(this.doINeedToWipe, this); this.watchModels = __bind(this.watchModels, this); this.watch = __bind(this.watch, this); PolylinesParentModel.__super__.constructor.call(this, scope); self = this; this.$log = Logger; this.plurals = new PropMap(); this.scopePropNames = ['path', 'stroke', 'clickable', 'draggable', 'editable', 'geodesic', 'icons', 'visible']; _.each(this.scopePropNames, (function(_this) { return function(name) { return _this[name + 'Key'] = void 0; }; })(this)); this.models = void 0; this.firstTime = true; this.$log.info(this); this.watchOurScope(scope); this.createChildScopes(); } PolylinesParentModel.prototype.watch = function(scope, name, nameKey) { return scope.$watch(name, (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { _this[nameKey] = typeof newValue === 'function' ? newValue() : newValue; return _async.waitOrGo(_this, function() { return _async.each(_.values(_this.plurals), function(model) { return model.scope[name] = _this[nameKey] === 'self' ? model : model[_this[nameKey]]; }); }); } }; })(this)); }; PolylinesParentModel.prototype.watchModels = function(scope) { return scope.$watch('models', (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { if (_this.doINeedToWipe(newValue)) { return _this.rebuildAll(scope, true, true); } else { return _this.createChildScopes(false); } } }; })(this), true); }; PolylinesParentModel.prototype.doINeedToWipe = function(newValue) { var newValueIsEmpty; newValueIsEmpty = newValue != null ? newValue.length === 0 : true; return this.plurals.length > 0 && newValueIsEmpty; }; PolylinesParentModel.prototype.rebuildAll = function(scope, doCreate, doDelete) { return _async.waitOrGo(this, (function(_this) { return function() { return _async.each(_this.plurals.values(), function(model) { return model.destroy(); }).then(function() { if (doDelete) { delete _this.plurals; } _this.plurals = new PropMap(); if (doCreate) { return _this.createChildScopes(); } }); }; })(this)); }; PolylinesParentModel.prototype.watchDestroy = function(scope) { return scope.$on("$destroy", (function(_this) { return function() { return _this.rebuildAll(scope, false, true); }; })(this)); }; PolylinesParentModel.prototype.watchOurScope = function(scope) { return _.each(this.scopePropNames, (function(_this) { return function(name) { var nameKey; nameKey = name + 'Key'; _this[nameKey] = typeof scope[name] === 'function' ? scope[name]() : scope[name]; return _this.watch(scope, name, nameKey); }; })(this)); }; PolylinesParentModel.prototype.createChildScopes = function(isCreatingFromScratch) { if (isCreatingFromScratch == null) { isCreatingFromScratch = true; } if (angular.isUndefined(this.scope.models)) { this.$log.error("No models to create polylines from! I Need direct models!"); return; } if (this.gMap != null) { if (this.scope.models != null) { this.watchIdKey(this.scope); if (isCreatingFromScratch) { return this.createAllNew(this.scope, false); } else { return this.pieceMeal(this.scope, false); } } } }; PolylinesParentModel.prototype.watchIdKey = function(scope) { this.setIdKey(scope); return scope.$watch('idKey', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue && (newValue == null)) { _this.idKey = newValue; return _this.rebuildAll(scope, true, true); } }; })(this)); }; PolylinesParentModel.prototype.createAllNew = function(scope, isArray) { if (isArray == null) { isArray = false; } this.models = scope.models; if (this.firstTime) { this.watchModels(scope); this.watchDestroy(scope); } return _async.waitOrGo(this, (function(_this) { return function() { return _async.each(scope.models, function(model) { return _this.createChild(model, _this.gMap); }); }; })(this)).then((function(_this) { return function() { _this.firstTime = false; return _this.existingPieces = void 0; }; })(this)); }; PolylinesParentModel.prototype.pieceMeal = function(scope, isArray) { var doChunk; if (isArray == null) { isArray = true; } doChunk = this.existingPieces != null ? false : _async.defaultChunkSize; this.models = scope.models; if ((scope != null) && (scope.models != null) && scope.models.length > 0 && this.plurals.length > 0) { return this.figureOutState(this.idKey, scope, this.plurals, this.modelKeyComparison, (function(_this) { return function(state) { var payload; payload = state; return _async.waitOrGo(_this, function() { return _async.each(payload.removals, function(id) { var child; child = _this.plurals[id]; if (child != null) { child.destroy(); return _this.plurals.remove(id); } }).then(function() { return _async.each(payload.adds, function(modelToAdd) { return _this.createChild(modelToAdd, _this.gMap); }); }).then(function() { return _this.existingPieces = void 0; }); }); }; })(this)); } else { return this.rebuildAll(this.scope, true, true); } }; PolylinesParentModel.prototype.createChild = function(model, gMap) { var child, childScope; childScope = this.scope.$new(false); this.setChildScope(childScope, model); childScope.$watch('model', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return _this.setChildScope(childScope, newValue); } }; })(this), true); childScope["static"] = this.scope["static"]; child = new PolylineChildModel(childScope, this.attrs, gMap, this.defaults, model); if (model[this.idKey] == null) { this.$log.error("Polyline model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); return; } this.plurals.put(model[this.idKey], child); return child; }; PolylinesParentModel.prototype.setChildScope = function(childScope, model) { _.each(this.scopePropNames, (function(_this) { return function(name) { var nameKey, newValue; nameKey = name + 'Key'; newValue = _this[nameKey] === 'self' ? model : model[_this[nameKey]]; if (newValue !== childScope[name]) { return childScope[name] = newValue; } }; })(this)); return childScope.model = model; }; PolylinesParentModel.prototype.modelKeyComparison = function(model1, model2) { return _.isEqual(this.evalModelHandle(model1, this.scope.path), this.evalModelHandle(model2, this.scope.path)); }; return PolylinesParentModel; })(ModelKey); } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent".ns()).factory("RectangleParentModel".ns(), [ "Logger".ns(), "GmapUtil".ns(), "EventsHelper".ns(), "RectangleOptionsBuilder".ns(), function($log, GmapUtil, EventsHelper, Builder) { var RectangleParentModel; return RectangleParentModel = (function(_super) { __extends(RectangleParentModel, _super); RectangleParentModel.include(GmapUtil); RectangleParentModel.include(EventsHelper); function RectangleParentModel(scope, element, attrs, map, DEFAULTS) { var bounds, clear, createBounds, dragging, fit, init, listeners, myListeners, rectangle, settingBoundsFromScope, updateBounds; this.scope = scope; this.attrs = attrs; this.map = map; this.DEFAULTS = DEFAULTS; bounds = void 0; dragging = false; myListeners = []; listeners = void 0; fit = (function(_this) { return function() { if (_this.isTrue(attrs.fit)) { return _this.fitMapBounds(_this.map, bounds); } }; })(this); createBounds = (function(_this) { return function() { var _ref, _ref1; if ((scope.bounds != null) && (((_ref = scope.bounds) != null ? _ref.sw : void 0) != null) && (((_ref1 = scope.bounds) != null ? _ref1.ne : void 0) != null) && _this.validateBoundPoints(scope.bounds)) { bounds = _this.convertBoundPoints(scope.bounds); return $log.info("new new bounds created: " + rectangle); } else if ((scope.bounds.getNorthEast != null) && (scope.bounds.getSouthWest != null)) { return bounds = scope.bounds; } else { if (typeof bound !== "undefined" && bound !== null) { return $log.error("Invalid bounds for newValue: " + (JSON.stringify(scope.bounds))); } } }; })(this); createBounds(); rectangle = new google.maps.Rectangle(this.buildOpts(bounds)); $log.info("rectangle created: " + rectangle); settingBoundsFromScope = false; updateBounds = (function(_this) { return function() { var b, ne, sw; b = rectangle.getBounds(); ne = b.getNorthEast(); sw = b.getSouthWest(); if (settingBoundsFromScope) { return; } return _.defer(function() { return scope.$apply(function(s) { if ((s.bounds != null) && (s.bounds.sw != null) && (s.bounds.ne != null)) { s.bounds.ne = { latitude: ne.lat(), longitude: ne.lng() }; s.bounds.sw = { latitude: sw.lat(), longitude: sw.lng() }; } if ((s.bounds.getNorthEast != null) && (s.bounds.getSouthWest != null)) { return s.bounds = b; } }); }); }; })(this); init = (function(_this) { return function() { fit(); _this.removeEvents(myListeners); myListeners.push(google.maps.event.addListener(rectangle, "dragstart", function() { return dragging = true; })); myListeners.push(google.maps.event.addListener(rectangle, "dragend", function() { dragging = false; return updateBounds(); })); return myListeners.push(google.maps.event.addListener(rectangle, "bounds_changed", function() { if (dragging) { return; } return updateBounds(); })); }; })(this); clear = (function(_this) { return function() { _this.removeEvents(myListeners); if (listeners != null) { _this.removeEvents(listeners); } return rectangle.setMap(null); }; })(this); if (bounds != null) { init(); } scope.$watch("bounds", (function(newValue, oldValue) { var isNew; if (_.isEqual(newValue, oldValue) && (bounds != null) || dragging) { return; } settingBoundsFromScope = true; if (newValue == null) { clear(); return; } if (bounds == null) { isNew = true; } else { fit(); } createBounds(); rectangle.setBounds(bounds); settingBoundsFromScope = false; if (isNew && (bounds != null)) { return init(); } }), true); this.setMyOptions = (function(_this) { return function(newVals, oldVals) { if (!_.isEqual(newVals, oldVals)) { if ((bounds != null) && (newVals != null)) { return rectangle.setOptions(_this.buildOpts(bounds)); } } }; })(this); this.props.push('bounds'); this.watchProps(this.props); if (attrs.events != null) { listeners = this.setEvents(rectangle, scope, scope); scope.$watch("events", (function(_this) { return function(newValue, oldValue) { if (!_.isEqual(newValue, oldValue)) { if (listeners != null) { _this.removeEvents(listeners); } return listeners = _this.setEvents(rectangle, scope, scope); } }; })(this)); } scope.$on("$destroy", (function(_this) { return function() { return clear(); }; })(this)); $log.info(this); } return RectangleParentModel; })(Builder); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent".ns()).factory("SearchBoxParentModel".ns(), [ "BaseObject".ns(), "Logger".ns(), "EventsHelper".ns(), '$timeout', '$http', '$templateCache', function(BaseObject, Logger, EventsHelper, $timeout, $http, $templateCache) { var SearchBoxParentModel; SearchBoxParentModel = (function(_super) { __extends(SearchBoxParentModel, _super); SearchBoxParentModel.include(EventsHelper); function SearchBoxParentModel(scope, element, attrs, gMap, ctrlPosition, template, $log) { var controlDiv; this.scope = scope; this.element = element; this.attrs = attrs; this.gMap = gMap; this.ctrlPosition = ctrlPosition; this.template = template; this.$log = $log != null ? $log : Logger; this.getBounds = __bind(this.getBounds, this); this.setBounds = __bind(this.setBounds, this); this.createSearchBox = __bind(this.createSearchBox, this); this.addToParentDiv = __bind(this.addToParentDiv, this); this.addAsMapControl = __bind(this.addAsMapControl, this); this.init = __bind(this.init, this); if (this.attrs.template == null) { this.$log.error("template attribute for the search-box directive is mandatory. Places Search Box creation aborted!!"); return; } controlDiv = angular.element('<div></div>'); controlDiv.append(this.template); this.input = controlDiv.find('input')[0]; this.init(); } SearchBoxParentModel.prototype.init = function() { this.createSearchBox(); if (this.attrs.parentdiv != null) { this.addToParentDiv(); } else { this.addAsMapControl(); } this.listener = google.maps.event.addListener(this.searchBox, 'places_changed', (function(_this) { return function() { return _this.places = _this.searchBox.getPlaces(); }; })(this)); this.listeners = this.setEvents(this.searchBox, this.scope, this.scope); this.$log.info(this); this.scope.$watch("options", (function(_this) { return function(newValue, oldValue) { if (angular.isObject(newValue)) { if (newValue.bounds != null) { return _this.setBounds(newValue.bounds); } } }; })(this), true); return this.scope.$on("$destroy", (function(_this) { return function() { return _this.searchBox = null; }; })(this)); }; SearchBoxParentModel.prototype.addAsMapControl = function() { return this.gMap.controls[google.maps.ControlPosition[this.ctrlPosition]].push(this.input); }; SearchBoxParentModel.prototype.addToParentDiv = function() { this.parentDiv = angular.element(document.getElementById(this.scope.parentdiv)); return this.parentDiv.append(this.input); }; SearchBoxParentModel.prototype.createSearchBox = function() { return this.searchBox = new google.maps.places.SearchBox(this.input, this.scope.options); }; SearchBoxParentModel.prototype.setBounds = function(bounds) { if (angular.isUndefined(bounds.isEmpty)) { this.$log.error("Error: SearchBoxParentModel setBounds. Bounds not an instance of LatLngBounds."); } else { if (bounds.isEmpty() === false) { if (this.searchBox != null) { return this.searchBox.setBounds(bounds); } } } }; SearchBoxParentModel.prototype.getBounds = function() { return this.searchBox.getBounds(); }; return SearchBoxParentModel; })(BaseObject); return SearchBoxParentModel; } ]); }).call(this); /* Windows directive where many windows map to the models property */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api.models.parent".ns()).factory("WindowsParentModel".ns(), [ "IWindowParentModel".ns(), "ModelsWatcher".ns(), "PropMap".ns(), "WindowChildModel".ns(), "Linked".ns(), "_async".ns(), "Logger".ns(), '$timeout', '$compile', '$http', '$templateCache', '$interpolate', function(IWindowParentModel, ModelsWatcher, PropMap, WindowChildModel, Linked, _async, $log, $timeout, $compile, $http, $templateCache, $interpolate) { var WindowsParentModel; WindowsParentModel = (function(_super) { __extends(WindowsParentModel, _super); WindowsParentModel.include(ModelsWatcher); function WindowsParentModel(scope, element, attrs, ctrls, gMap, markersScope) { var self; this.gMap = gMap; this.markersScope = markersScope; this.interpolateContent = __bind(this.interpolateContent, this); this.setChildScope = __bind(this.setChildScope, this); this.createWindow = __bind(this.createWindow, this); this.setContentKeys = __bind(this.setContentKeys, this); this.pieceMealWindows = __bind(this.pieceMealWindows, this); this.createAllNewWindows = __bind(this.createAllNewWindows, this); this.watchIdKey = __bind(this.watchIdKey, this); this.createChildScopesWindows = __bind(this.createChildScopesWindows, this); this.watchOurScope = __bind(this.watchOurScope, this); this.watchDestroy = __bind(this.watchDestroy, this); this.rebuildAll = __bind(this.rebuildAll, this); this.doINeedToWipe = __bind(this.doINeedToWipe, this); this.watchModels = __bind(this.watchModels, this); this.go = __bind(this.go, this); WindowsParentModel.__super__.constructor.call(this, scope, element, attrs, ctrls, $timeout, $compile, $http, $templateCache); self = this; this.windows = new PropMap(); this.scopePropNames = ['coords', 'template', 'templateUrl', 'templateParameter', 'isIconVisibleOnClick', 'closeClick', 'options', 'show']; _.each(this.scopePropNames, (function(_this) { return function(name) { return _this[name + 'Key'] = void 0; }; })(this)); this.linked = new Linked(scope, element, attrs, ctrls); this.models = void 0; this.contentKeys = void 0; this.isIconVisibleOnClick = void 0; this.firstTime = true; this.firstWatchModels = true; this.$log.info(self); this.parentScope = void 0; this.go(scope); } WindowsParentModel.prototype.go = function(scope) { this.watchOurScope(scope); this.doRebuildAll = this.scope.doRebuildAll != null ? this.scope.doRebuildAll : false; scope.$watch('doRebuildAll', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue) { return _this.doRebuildAll = newValue; } }; })(this)); return this.createChildScopesWindows(); }; WindowsParentModel.prototype.watchModels = function(scope) { return scope.$watch('models', (function(_this) { return function(newValue, oldValue) { var doScratch; if (!_.isEqual(newValue, oldValue) || _this.firstWatchModels) { _this.firstWatchModels = false; if (_this.doRebuildAll || _this.doINeedToWipe(newValue)) { return _this.rebuildAll(scope, true, true); } else { doScratch = _this.windows.length === 0; if (_this.existingPieces != null) { return _this.existingPieces.then(function() { return _this.createChildScopesWindows(doScratch); }); } else { return _this.createChildScopesWindows(doScratch); } } } }; })(this)); }; WindowsParentModel.prototype.doINeedToWipe = function(newValue) { var newValueIsEmpty; newValueIsEmpty = newValue != null ? newValue.length === 0 : true; return this.windows.length > 0 && newValueIsEmpty; }; WindowsParentModel.prototype.rebuildAll = function(scope, doCreate, doDelete) { return _async.waitOrGo(this, (function(_this) { return function() { return _async.each(_this.windows.values(), function(model) { return model.destroy(); }).then(function() { if (doDelete) { delete _this.windows; } _this.windows = new PropMap(); if (doCreate) { _this.createChildScopesWindows(); } return Promise.resolve(); }); }; })(this)); }; WindowsParentModel.prototype.watchDestroy = function(scope) { return scope.$on("$destroy", (function(_this) { return function() { _this.firstWatchModels = true; _this.firstTime = true; return _this.rebuildAll(scope, false, true); }; })(this)); }; WindowsParentModel.prototype.watchOurScope = function(scope) { return _.each(this.scopePropNames, (function(_this) { return function(name) { var nameKey; nameKey = name + 'Key'; return _this[nameKey] = typeof scope[name] === 'function' ? scope[name]() : scope[name]; }; })(this)); }; WindowsParentModel.prototype.createChildScopesWindows = function(isCreatingFromScratch) { var modelsNotDefined, _ref, _ref1; if (isCreatingFromScratch == null) { isCreatingFromScratch = true; } /* being that we cannot tell the difference in Key String vs. a normal value string (TemplateUrl) we will assume that all scope values are string expressions either pointing to a key (propName) or using 'self' to point the model as container/object of interest. This may force redundant information into the model, but this appears to be the most flexible approach. */ this.isIconVisibleOnClick = true; if (angular.isDefined(this.linked.attrs.isiconvisibleonclick)) { this.isIconVisibleOnClick = this.linked.scope.isIconVisibleOnClick; } modelsNotDefined = angular.isUndefined(this.linked.scope.models); if (modelsNotDefined && (this.markersScope === void 0 || (((_ref = this.markersScope) != null ? _ref.markerModels : void 0) === void 0 || ((_ref1 = this.markersScope) != null ? _ref1.models : void 0) === void 0))) { this.$log.error("No models to create windows from! Need direct models or models derrived from markers!"); return; } if (this.gMap != null) { if (this.linked.scope.models != null) { this.watchIdKey(this.linked.scope); if (isCreatingFromScratch) { return this.createAllNewWindows(this.linked.scope, false); } else { return this.pieceMealWindows(this.linked.scope, false); } } else { this.parentScope = this.markersScope; this.watchIdKey(this.parentScope); if (isCreatingFromScratch) { return this.createAllNewWindows(this.markersScope, true, 'markerModels', false); } else { return this.pieceMealWindows(this.markersScope, true, 'markerModels', false); } } } }; WindowsParentModel.prototype.watchIdKey = function(scope) { this.setIdKey(scope); return scope.$watch('idKey', (function(_this) { return function(newValue, oldValue) { if (newValue !== oldValue && (newValue == null)) { _this.idKey = newValue; return _this.rebuildAll(scope, true, true); } }; })(this)); }; WindowsParentModel.prototype.createAllNewWindows = function(scope, hasGMarker, modelsPropToIterate, isArray) { if (modelsPropToIterate == null) { modelsPropToIterate = 'models'; } if (isArray == null) { isArray = false; } this.models = scope.models; if (this.firstTime) { this.watchModels(scope); this.watchDestroy(scope); } this.setContentKeys(scope.models); return _async.waitOrGo(this, (function(_this) { return function() { return _async.each(scope.models, function(model) { var gMarker, _ref; gMarker = hasGMarker ? (_ref = scope[modelsPropToIterate][[model[_this.idKey]]]) != null ? _ref.gMarker : void 0 : void 0; return _this.createWindow(model, gMarker, _this.gMap); }); }; })(this)).then((function(_this) { return function() { return _this.firstTime = false; }; })(this)); }; WindowsParentModel.prototype.pieceMealWindows = function(scope, hasGMarker, modelsPropToIterate, isArray) { var doChunk; if (modelsPropToIterate == null) { modelsPropToIterate = 'models'; } if (isArray == null) { isArray = true; } doChunk = this.existingPieces != null ? false : _async.defaultChunkSize; this.models = scope.models; if ((scope != null) && (scope.models != null) && scope.models.length > 0 && this.windows.length > 0) { return this.figureOutState(this.idKey, scope, this.windows, this.modelKeyComparison, (function(_this) { return function(state) { var payload; payload = state; return _async.waitOrGo(_this, function() { return _async.each(payload.removals, function(child) { if (child != null) { _this.windows.remove(child.id); if (child.destroy != null) { return child.destroy(true); } } }, doChunk).then(function() { return _async.each(payload.adds, function(modelToAdd) { var gMarker, _ref; gMarker = (_ref = scope[modelsPropToIterate][modelToAdd[_this.idKey]]) != null ? _ref.gMarker : void 0; if (!gMarker) { throw "Gmarker undefined"; } return _this.createWindow(modelToAdd, gMarker, _this.gMap); }, doChunk); }); }).then(function() { return _this.existingPieces = void 0; })["catch"](function(e) { return $log.error("Error while pieceMealing Windows!"); }); }; })(this)); } else { return this.rebuildAll(this.scope, true, true); } }; WindowsParentModel.prototype.setContentKeys = function(models) { if (models.length > 0) { return this.contentKeys = Object.keys(models[0]); } }; WindowsParentModel.prototype.createWindow = function(model, gMarker, gMap) { var child, childScope, fakeElement, opts; childScope = this.linked.scope.$new(false); this.setChildScope(childScope, model); childScope.$watch('model', (function(_this) { return function(newValue, oldValue) { var _ref; if (newValue !== oldValue) { _this.setChildScope(childScope, newValue); if (_this.markersScope) { return _this.windows[newValue[_this.idKey]].markerCtrl = (_ref = _this.markersScope.markerModels[newValue[_this.idKey]]) != null ? _ref.gMarker : void 0; } } }; })(this), true); fakeElement = { html: (function(_this) { return function() { return _this.interpolateContent(_this.linked.element.html(), model); }; })(this) }; this.DEFAULTS = this.markersScope ? model[this.optionsKey] || {} : this.DEFAULTS; opts = this.createWindowOptions(gMarker, childScope, fakeElement.html(), this.DEFAULTS); child = new WindowChildModel(model, childScope, opts, this.isIconVisibleOnClick, gMap, gMarker, fakeElement, false, true); if (model[this.idKey] == null) { this.$log.error("Window model has no id to assign a child to. This is required for performance. Please assign id, or redirect id to a different key."); return; } this.windows.put(model[this.idKey], child); return child; }; WindowsParentModel.prototype.setChildScope = function(childScope, model) { _.each(this.scopePropNames, (function(_this) { return function(name) { var nameKey, newValue; nameKey = name + 'Key'; newValue = _this[nameKey] === 'self' ? model : model[_this[nameKey]]; if (newValue !== childScope[name]) { return childScope[name] = newValue; } }; })(this)); return childScope.model = model; }; WindowsParentModel.prototype.interpolateContent = function(content, model) { var exp, interpModel, key, _i, _len, _ref; if (this.contentKeys === void 0 || this.contentKeys.length === 0) { return; } exp = $interpolate(content); interpModel = {}; _ref = this.contentKeys; for (_i = 0, _len = _ref.length; _i < _len; _i++) { key = _ref[_i]; interpModel[key] = model[key]; } return exp(interpModel); }; return WindowsParentModel; })(IWindowParentModel); return WindowsParentModel; } ]); }).call(this); (function() { angular.module("google-maps.directives.api".ns()).factory("Circle".ns(), [ "ICircle".ns(), "CircleParentModel".ns(), function(ICircle, CircleParentModel) { return _.extend(ICircle, { link: function(scope, element, attrs, mapCtrl) { return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { return new CircleParentModel(scope, element, attrs, map); }; })(this)); } }); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("Control".ns(), [ "IControl".ns(), "$http", "$templateCache", "$compile", "$controller", 'GoogleMapApi'.ns(), function(IControl, $http, $templateCache, $compile, $controller, GoogleMapApi) { var Control; return Control = (function(_super) { __extends(Control, _super); function Control() { this.link = __bind(this.link, this); Control.__super__.constructor.call(this); } Control.prototype.link = function(scope, element, attrs, ctrl) { return GoogleMapApi.then((function(_this) { return function(maps) { var index, position; if (angular.isUndefined(scope.template)) { _this.$log.error('mapControl: could not find a valid template property'); return; } index = angular.isDefined(scope.index && !isNaN(parseInt(scope.index))) ? parseInt(scope.index) : void 0; position = angular.isDefined(scope.position) ? scope.position.toUpperCase().replace(/-/g, '_') : 'TOP_CENTER'; if (!maps.ControlPosition[position]) { _this.$log.error('mapControl: invalid position property'); return; } return IControl.mapPromise(scope, ctrl).then(function(map) { var control, controlDiv; control = void 0; controlDiv = angular.element('<div></div>'); return $http.get(scope.template, { cache: $templateCache }).success(function(template) { var templateCtrl, templateScope; templateScope = scope.$new(); controlDiv.append(template); if (index) { controlDiv[0].index = index; } if (angular.isDefined(scope.controller)) { templateCtrl = $controller(scope.controller, { $scope: templateScope }); controlDiv.children().data('$ngControllerController', templateCtrl); } return control = $compile(controlDiv.contents())(templateScope); }).error(function(error) { return _this.$log.error('mapControl: template could not be found'); }).then(function() { return map.controls[google.maps.ControlPosition[position]].push(control[0]); }); }); }; })(this)); }; return Control; })(IControl); } ]); }).call(this); (function() { angular.module("google-maps.directives.api".ns()).factory("DrawingManager".ns(), [ "IDrawingManager".ns(), "DrawingManagerParentModel".ns(), function(IDrawingManager, DrawingManagerParentModel) { return _.extend(IDrawingManager, { link: function(scope, element, attrs, mapCtrl) { return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { return new DrawingManagerParentModel(scope, element, attrs, map); }; })(this)); } }); } ]); }).call(this); /* - Link up Polygons to be sent back to a controller - inject the draw function into a controllers scope so that controller can call the directive to draw on demand - draw function creates the DrawFreeHandChildModel which manages itself */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory('ApiFreeDrawPolygons'.ns(), [ "Logger".ns(), 'BaseObject'.ns(), "CtrlHandle".ns(), "DrawFreeHandChildModel".ns(), function($log, BaseObject, CtrlHandle, DrawFreeHandChildModel) { var FreeDrawPolygons; return FreeDrawPolygons = (function(_super) { __extends(FreeDrawPolygons, _super); function FreeDrawPolygons() { this.link = __bind(this.link, this); return FreeDrawPolygons.__super__.constructor.apply(this, arguments); } FreeDrawPolygons.include(CtrlHandle); FreeDrawPolygons.prototype.restrict = 'EMA'; FreeDrawPolygons.prototype.replace = true; FreeDrawPolygons.prototype.require = '^' + 'GoogleMap'.ns(); FreeDrawPolygons.prototype.scope = { polygons: '=', draw: '=' }; FreeDrawPolygons.prototype.link = function(scope, element, attrs, ctrl) { return this.mapPromise(scope, ctrl).then((function(_this) { return function(map) { var freeHand, listener; if (!scope.polygons) { return $log.error("No polygons to bind to!"); } if (!_.isArray(scope.polygons)) { return $log.error("Free Draw Polygons must be of type Array!"); } freeHand = new DrawFreeHandChildModel(map, scope.originalMapOpts); listener = void 0; return scope.draw = function() { if (typeof listener === "function") { listener(); } return freeHand.engage(scope.polygons).then(function() { var firstTime; firstTime = true; return listener = scope.$watch('polygons', function(newValue, oldValue) { var removals; if (firstTime) { firstTime = false; return; } removals = _.differenceObjects(oldValue, newValue); return removals.forEach(function(p) { return p.setMap(null); }); }); }); }; }; })(this)); }; return FreeDrawPolygons; })(BaseObject); } ]); }).call(this); (function() { angular.module("google-maps.directives.api".ns()).service("ICircle".ns(), [ function() { var DEFAULTS; DEFAULTS = {}; return { restrict: "EA", replace: true, require: '^' + 'GoogleMap'.ns(), scope: { center: "=center", radius: "=radius", stroke: "=stroke", fill: "=fill", clickable: "=", draggable: "=", editable: "=", geodesic: "=", icons: "=icons", visible: "=", events: "=" } }; } ]); }).call(this); /* - interface for all controls to derive from - to enforce a minimum set of requirements - attributes - template - position - controller - index */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("IControl".ns(), [ "BaseObject".ns(), "Logger".ns(), "CtrlHandle".ns(), function(BaseObject, Logger, CtrlHandle) { var IControl; return IControl = (function(_super) { __extends(IControl, _super); IControl.extend(CtrlHandle); function IControl() { this.link = __bind(this.link, this); this.restrict = 'EA'; this.replace = true; this.require = '^' + 'GoogleMap'.ns(); this.scope = { template: '@template', position: '@position', controller: '@controller', index: '@index' }; this.$log = Logger; } IControl.prototype.link = function(scope, element, attrs, ctrl) { throw new Exception("Not implemented!!"); }; return IControl; })(BaseObject); } ]); }).call(this); (function() { angular.module("google-maps.directives.api".ns()).service("IDrawingManager".ns(), [ function() { return { restrict: "EA", replace: true, require: '^' + 'GoogleMap'.ns(), scope: { "static": "@", control: "=", options: "=" } }; } ]); }).call(this); /* - interface for all markers to derrive from - to enforce a minimum set of requirements - attributes - coords - icon - implementation needed on watches */ (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("IMarker".ns(), [ "Logger".ns(), "BaseObject".ns(), "CtrlHandle".ns(), function(Logger, BaseObject, CtrlHandle) { var IMarker; return IMarker = (function(_super) { __extends(IMarker, _super); IMarker.scopeKeys = { coords: '=coords', icon: '=icon', click: '&click', options: '=options', events: '=events', fit: '=fit', idKey: '=idkey', control: '=control' }; IMarker.keys = _.keys(IMarker.scopeKeys); IMarker.extend(CtrlHandle); function IMarker() { this.$log = Logger; this.restrict = 'EMA'; this.require = '^' + 'GoogleMap'.ns(); this.priority = -1; this.transclude = true; this.replace = true; this.scope = IMarker.scopeKeys; } return IMarker; })(BaseObject); } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("IPolygon".ns(), [ "GmapUtil".ns(), "BaseObject".ns(), "Logger".ns(), "CtrlHandle".ns(), function(GmapUtil, BaseObject, Logger, CtrlHandle) { var IPolygon; return IPolygon = (function(_super) { __extends(IPolygon, _super); IPolygon.include(GmapUtil); IPolygon.extend(CtrlHandle); function IPolygon() {} IPolygon.prototype.restrict = "EMA"; IPolygon.prototype.replace = true; IPolygon.prototype.require = '^' + 'GoogleMap'.ns(); IPolygon.prototype.scope = { path: "=path", stroke: "=stroke", clickable: "=", draggable: "=", editable: "=", geodesic: "=", fill: "=", icons: "=icons", visible: "=", "static": "=", events: "=", zIndex: "=zindex", fit: "=", control: "=control" }; IPolygon.prototype.DEFAULTS = {}; IPolygon.prototype.$log = Logger; return IPolygon; })(BaseObject); } ]); }).call(this); (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("IPolyline".ns(), [ "GmapUtil".ns(), "BaseObject".ns(), "Logger".ns(), "CtrlHandle".ns(), function(GmapUtil, BaseObject, Logger, CtrlHandle) { var IPolyline; return IPolyline = (function(_super) { __extends(IPolyline, _super); IPolyline.include(GmapUtil); IPolyline.extend(CtrlHandle); function IPolyline() {} IPolyline.prototype.restrict = "EMA"; IPolyline.prototype.replace = true; IPolyline.prototype.require = '^' + 'GoogleMap'.ns(); IPolyline.prototype.scope = { path: "=", stroke: "=", clickable: "=", draggable: "=", editable: "=", geodesic: "=", icons: "=", visible: "=", "static": "=", fit: "=", events: "=" }; IPolyline.prototype.DEFAULTS = {}; IPolyline.prototype.$log = Logger; return IPolyline; })(BaseObject); } ]); }).call(this); (function() { angular.module("google-maps.directives.api".ns()).service("IRectangle".ns(), [ function() { "use strict"; var DEFAULTS; DEFAULTS = {}; return { restrict: "EMA", require: '^' + 'GoogleMap'.ns(), replace: true, scope: { bounds: "=", stroke: "=", clickable: "=", draggable: "=", editable: "=", fill: "=", visible: "=", events: "=" } }; } ]); }).call(this); /* - interface directive for all window(s) to derive from */ (function() { var __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("IWindow".ns(), [ "BaseObject".ns(), "ChildEvents".ns(), "Logger".ns(), "CtrlHandle".ns(), function(BaseObject, ChildEvents, Logger, CtrlHandle) { var IWindow; return IWindow = (function(_super) { __extends(IWindow, _super); IWindow.include(ChildEvents); IWindow.extend(CtrlHandle); function IWindow() { this.restrict = 'EMA'; this.template = void 0; this.transclude = true; this.priority = -100; this.require = '^' + 'GoogleMap'.ns(); this.replace = true; this.scope = { coords: '=coords', template: '=template', templateUrl: '=templateurl', templateParameter: '=templateparameter', isIconVisibleOnClick: '=isiconvisibleonclick', closeClick: '&closeclick', options: '=options', control: '=control', show: '=show' }; this.$log = Logger; } return IWindow; })(BaseObject); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("Map".ns(), [ "$timeout", '$q', "Logger".ns(), "GmapUtil".ns(), "BaseObject".ns(), "CtrlHandle".ns(), 'IsReady'.ns(), "uuid".ns(), "ExtendGWin".ns(), "ExtendMarkerClusterer".ns(), "GoogleMapsUtilV3".ns(), 'GoogleMapApi'.ns(), function($timeout, $q, $log, GmapUtil, BaseObject, CtrlHandle, IsReady, uuid, ExtendGWin, ExtendMarkerClusterer, GoogleMapsUtilV3, GoogleMapApi) { "use strict"; var DEFAULTS, Map, initializeItems; DEFAULTS = void 0; initializeItems = [GoogleMapsUtilV3, ExtendGWin, ExtendMarkerClusterer]; return Map = (function(_super) { __extends(Map, _super); Map.include(GmapUtil); function Map() { this.link = __bind(this.link, this); var ctrlFn, self; ctrlFn = function($scope) { var ctrlObj, retCtrl; retCtrl = void 0; $scope.$on('$destroy', function() { return IsReady.reset(); }); ctrlObj = CtrlHandle.handle($scope); $scope.ctrlType = 'Map'; $scope.deferred.promise.then(function() { return initializeItems.forEach(function(i) { return i.init(); }); }); ctrlObj.getMap = function() { return $scope.map; }; retCtrl = _.extend(this, ctrlObj); return retCtrl; }; this.controller = ["$scope", ctrlFn]; self = this; } Map.prototype.restrict = "EMA"; Map.prototype.transclude = true; Map.prototype.replace = false; Map.prototype.template = '<div class="angular-google-map"><div class="angular-google-map-container"></div><div ng-transclude style="display: none"></div></div>'; Map.prototype.scope = { center: "=", zoom: "=", dragging: "=", control: "=", options: "=", events: "=", styles: "=", bounds: "=" }; /* @param scope @param element @param attrs */ Map.prototype.link = function(scope, element, attrs) { return GoogleMapApi.then((function(_this) { return function(maps) { var dragging, el, eventName, getEventHandler, mapOptions, opts, resolveSpawned, settingCenterFromScope, spawned, type, _m; DEFAULTS = { mapTypeId: maps.MapTypeId.ROADMAP }; spawned = IsReady.spawn(); resolveSpawned = function() { return spawned.deferred.resolve({ instance: spawned.instance, map: _m }); }; if (!_this.validateCoords(scope.center)) { $log.error("angular-google-maps: could not find a valid center property"); return; } if (!angular.isDefined(scope.zoom)) { $log.error("angular-google-maps: map zoom property not set"); return; } el = angular.element(element); el.addClass("angular-google-map"); opts = { options: {} }; if (attrs.options) { opts.options = scope.options; } if (attrs.styles) { opts.styles = scope.styles; } if (attrs.type) { type = attrs.type.toUpperCase(); if (google.maps.MapTypeId.hasOwnProperty(type)) { opts.mapTypeId = google.maps.MapTypeId[attrs.type.toUpperCase()]; } else { $log.error("angular-google-maps: invalid map type '" + attrs.type + "'"); } } mapOptions = angular.extend({}, DEFAULTS, opts, { center: _this.getCoords(scope.center), zoom: scope.zoom, bounds: scope.bounds }); _m = new google.maps.Map(el.find("div")[1], mapOptions); _m['_id'.ns()] = uuid.generate(); dragging = false; google.maps.event.addListenerOnce(_m, 'idle', function() { scope.deferred.resolve(_m); return resolveSpawned(); }); google.maps.event.addListener(_m, "dragstart", function() { dragging = true; return _.defer(function() { return scope.$apply(function(s) { if (s.dragging != null) { return s.dragging = dragging; } }); }); }); google.maps.event.addListener(_m, "dragend", function() { dragging = false; return _.defer(function() { return scope.$apply(function(s) { if (s.dragging != null) { return s.dragging = dragging; } }); }); }); google.maps.event.addListener(_m, "drag", function() { var c; c = _m.center; return _.defer(function() { return scope.$apply(function(s) { if (angular.isDefined(s.center.type)) { s.center.coordinates[1] = c.lat(); return s.center.coordinates[0] = c.lng(); } else { s.center.latitude = c.lat(); return s.center.longitude = c.lng(); } }); }); }); google.maps.event.addListener(_m, "zoom_changed", function() { if (scope.zoom !== _m.zoom) { return _.defer(function() { return scope.$apply(function(s) { return s.zoom = _m.zoom; }); }); } }); settingCenterFromScope = false; google.maps.event.addListener(_m, "center_changed", function() { var c; c = _m.center; if (settingCenterFromScope) { return; } return _.defer(function() { return scope.$apply(function(s) { if (!_m.dragging) { if (angular.isDefined(s.center.type)) { if (s.center.coordinates[1] !== c.lat()) { s.center.coordinates[1] = c.lat(); } if (s.center.coordinates[0] !== c.lng()) { return s.center.coordinates[0] = c.lng(); } } else { if (s.center.latitude !== c.lat()) { s.center.latitude = c.lat(); } if (s.center.longitude !== c.lng()) { return s.center.longitude = c.lng(); } } } }); }); }); google.maps.event.addListener(_m, "idle", function() { var b, ne, sw; b = _m.getBounds(); ne = b.getNorthEast(); sw = b.getSouthWest(); return _.defer(function() { return scope.$apply(function(s) { if (s.bounds !== null && s.bounds !== undefined && s.bounds !== void 0) { s.bounds.northeast = { latitude: ne.lat(), longitude: ne.lng() }; return s.bounds.southwest = { latitude: sw.lat(), longitude: sw.lng() }; } }); }); }); if (angular.isDefined(scope.events) && scope.events !== null && angular.isObject(scope.events)) { getEventHandler = function(eventName) { return function() { return scope.events[eventName].apply(scope, [_m, eventName, arguments]); }; }; for (eventName in scope.events) { if (scope.events.hasOwnProperty(eventName) && angular.isFunction(scope.events[eventName])) { google.maps.event.addListener(_m, eventName, getEventHandler(eventName)); } } } _m.getOptions = function() { return mapOptions; }; scope.map = _m; if ((attrs.control != null) && (scope.control != null)) { scope.control.refresh = function(maybeCoords) { var coords; if (_m == null) { return; } google.maps.event.trigger(_m, "resize"); if (((maybeCoords != null ? maybeCoords.latitude : void 0) != null) && ((maybeCoords != null ? maybeCoords.latitude : void 0) != null)) { coords = _this.getCoords(maybeCoords); if (_this.isTrue(attrs.pan)) { return _m.panTo(coords); } else { return _m.setCenter(coords); } } }; /* I am sure you all will love this. You want the instance here you go.. BOOM! */ scope.control.getGMap = function() { return _m; }; scope.control.getMapOptions = function() { return mapOptions; }; } scope.$watch("center", (function(newValue, oldValue) { var coords; coords = _this.getCoords(newValue); if (coords.lat() === _m.center.lat() && coords.lng() === _m.center.lng()) { return; } settingCenterFromScope = true; if (!dragging) { if (!_this.validateCoords(newValue)) { $log.error("Invalid center for newValue: " + (JSON.stringify(newValue))); } if (_this.isTrue(attrs.pan) && scope.zoom === _m.zoom) { _m.panTo(coords); } else { _m.setCenter(coords); } } return settingCenterFromScope = false; }), true); scope.$watch("zoom", function(newValue, oldValue) { if (_.isEqual(newValue, oldValue)) { return; } return _.defer(function() { return _m.setZoom(newValue); }); }); scope.$watch("bounds", function(newValue, oldValue) { var bounds, ne, sw; if (newValue === oldValue) { return; } if ((newValue.northeast.latitude == null) || (newValue.northeast.longitude == null) || (newValue.southwest.latitude == null) || (newValue.southwest.longitude == null)) { $log.error("Invalid map bounds for new value: " + (JSON.stringify(newValue))); return; } ne = new google.maps.LatLng(newValue.northeast.latitude, newValue.northeast.longitude); sw = new google.maps.LatLng(newValue.southwest.latitude, newValue.southwest.longitude); bounds = new google.maps.LatLngBounds(sw, ne); return _m.fitBounds(bounds); }); return ['options', 'styles'].forEach(function(toWatch) { return scope.$watch(toWatch, function(newValue, oldValue) { var watchItem; watchItem = this.exp; if (_.isEqual(newValue, oldValue)) { return; } opts.options = newValue; if (_m != null) { return _m.setOptions(opts); } }); }, true); }; })(this)); }; return Map; })(BaseObject); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("Marker".ns(), [ "IMarker".ns(), "MarkerChildModel".ns(), "MarkerManager".ns(), function(IMarker, MarkerChildModel, MarkerManager) { var Marker; return Marker = (function(_super) { __extends(Marker, _super); function Marker() { this.link = __bind(this.link, this); var deferred; Marker.__super__.constructor.call(this); this.template = '<span class="angular-google-map-marker" ng-transclude></span>'; this.$log.info(this); deferred = void 0; } Marker.prototype.controller = [ '$scope', '$element', function($scope, $element) { $scope.ctrlType = 'Marker'; return _.extend(this, IMarker.handle($scope, $element)); } ]; Marker.prototype.link = function(scope, element, attrs, ctrl) { var doFit; if (scope.fit) { doFit = true; } this.mapPromise = IMarker.mapPromise(scope, ctrl); this.mapPromise.then((function(_this) { return function(map) { var doClick, doDrawSelf, keys, m, trackModel; if (!_this.gMarkerManager) { _this.gMarkerManager = new MarkerManager(map); } keys = _.object(IMarker.keys, IMarker.keys); m = new MarkerChildModel(scope, scope, keys, map, {}, doClick = true, _this.gMarkerManager, doDrawSelf = false, trackModel = false); m.deferred.promise.then(function(gMarker) { return scope.deferred.resolve(gMarker); }); if (scope.control != null) { return scope.control.getGMarkers = _this.gMarkerManager.getGMarkers; } }; })(this)); return scope.$on('$destroy', (function(_this) { return function() { _this.gMarkerManager.clear(); return _this.gMarkerManager = null; }; })(this)); }; return Marker; })(IMarker); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("Markers".ns(), [ "IMarker".ns(), "MarkersParentModel".ns(), "_sync".ns(), function(IMarker, MarkersParentModel, _sync) { var Markers; return Markers = (function(_super) { __extends(Markers, _super); function Markers($timeout) { this.link = __bind(this.link, this); Markers.__super__.constructor.call(this, $timeout); this.template = '<span class="angular-google-map-markers" ng-transclude></span>'; this.scope = _.extend(this.scope || {}, { idKey: '=idkey', doRebuildAll: '=dorebuildall', models: '=models', doCluster: '=docluster', clusterOptions: '=clusteroptions', clusterEvents: '=clusterevents' }); this.$log.info(this); } Markers.prototype.controller = [ '$scope', '$element', function($scope, $element) { $scope.ctrlType = 'Markers'; return _.extend(this, IMarker.handle($scope, $element)); } ]; Markers.prototype.link = function(scope, element, attrs, ctrl) { var parentModel, ready; parentModel = void 0; ready = (function(_this) { return function() { if (scope.control != null) { scope.control.getGMarkers = function() { var _ref; return (_ref = parentModel.gMarkerManager) != null ? _ref.getGMarkers() : void 0; }; scope.control.getChildMarkers = function() { return parentModel.markerModels; }; } return scope.deferred.resolve(); }; })(this); return IMarker.mapPromise(scope, ctrl).then((function(_this) { return function(map) { parentModel = new MarkersParentModel(scope, element, attrs, map); return parentModel.existingPieces.then(function() { return ready(); }); }; })(this)); }; return Markers; })(IMarker); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("Polygon".ns(), [ "IPolygon".ns(), "$timeout", "array-sync".ns(), "PolygonChildModel".ns(), function(IPolygon, $timeout, arraySync, PolygonChild) { var Polygon; return Polygon = (function(_super) { __extends(Polygon, _super); function Polygon() { this.link = __bind(this.link, this); return Polygon.__super__.constructor.apply(this, arguments); } Polygon.prototype.link = function(scope, element, attrs, mapCtrl) { var children, promise; children = []; promise = IPolygon.mapPromise(scope, mapCtrl); if (scope.control != null) { scope.control.getInstance = this; scope.control.polygons = children; scope.control.promise = promise; } return promise.then((function(_this) { return function(map) { return children.push(new PolygonChild(scope, attrs, map, _this.DEFAULTS)); }; })(this)); }; return Polygon; })(IPolygon); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("Polyline".ns(), [ "IPolyline".ns(), "$timeout", "array-sync".ns(), "PolylineChildModel".ns(), function(IPolyline, $timeout, arraySync, PolylineChildModel) { var Polyline; return Polyline = (function(_super) { __extends(Polyline, _super); function Polyline() { this.link = __bind(this.link, this); return Polyline.__super__.constructor.apply(this, arguments); } Polyline.prototype.link = function(scope, element, attrs, mapCtrl) { if (angular.isUndefined(scope.path) || scope.path === null || !this.validatePath(scope.path)) { this.$log.error("polyline: no valid path attribute found"); return; } return IPolyline.mapPromise(scope, mapCtrl).then((function(_this) { return function(map) { return new PolylineChildModel(scope, attrs, map, _this.DEFAULTS); }; })(this)); }; return Polyline; })(IPolyline); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("Polylines".ns(), [ "IPolyline".ns(), "$timeout", "array-sync".ns(), "PolylinesParentModel".ns(), function(IPolyline, $timeout, arraySync, PolylinesParentModel) { var Polylines; return Polylines = (function(_super) { __extends(Polylines, _super); function Polylines() { this.link = __bind(this.link, this); Polylines.__super__.constructor.call(this); this.scope.idKey = '=idkey'; this.scope.models = '=models'; this.$log.info(this); } Polylines.prototype.link = function(scope, element, attrs, mapCtrl) { if (angular.isUndefined(scope.path) || scope.path === null) { this.$log.error("polylines: no valid path attribute found"); return; } if (!scope.models) { this.$log.error("polylines: no models found to create from"); return; } return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { return new PolylinesParentModel(scope, element, attrs, map, _this.DEFAULTS); }; })(this)); }; return Polylines; })(IPolyline); } ]); }).call(this); (function() { angular.module("google-maps.directives.api".ns()).factory("Rectangle".ns(), [ "Logger".ns(), "GmapUtil".ns(), "IRectangle".ns(), "RectangleParentModel".ns(), function($log, GmapUtil, IRectangle, RectangleParentModel) { return _.extend(IRectangle, { link: function(scope, element, attrs, mapCtrl) { return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { return new RectangleParentModel(scope, element, attrs, map); }; })(this)); } }); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("Window".ns(), [ "IWindow".ns(), "GmapUtil".ns(), "WindowChildModel".ns(), function(IWindow, GmapUtil, WindowChildModel) { var Window; return Window = (function(_super) { __extends(Window, _super); Window.include(GmapUtil); function Window() { this.link = __bind(this.link, this); Window.__super__.constructor.call(this); this.require = ['^' + 'GoogleMap'.ns(), '^?' + 'Marker'.ns()]; this.template = '<span class="angular-google-maps-window" ng-transclude></span>'; this.$log.info(this); this.childWindows = []; } Window.prototype.link = function(scope, element, attrs, ctrls) { var markerCtrl, markerScope; markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1] : void 0; markerScope = markerCtrl != null ? markerCtrl.getScope() : void 0; this.mapPromise = IWindow.mapPromise(scope, ctrls[0]); return this.mapPromise.then((function(_this) { return function(mapCtrl) { var isIconVisibleOnClick; isIconVisibleOnClick = true; if (angular.isDefined(attrs.isiconvisibleonclick)) { isIconVisibleOnClick = scope.isIconVisibleOnClick; } if (!markerCtrl) { _this.init(scope, element, isIconVisibleOnClick, mapCtrl); return; } return markerScope.deferred.promise.then(function(gMarker) { return _this.init(scope, element, isIconVisibleOnClick, mapCtrl, markerScope, gMarker); }); }; })(this)); }; Window.prototype.init = function(scope, element, isIconVisibleOnClick, mapCtrl, markerScope, gMarker) { var childWindow, defaults, hasScopeCoords, opts; defaults = scope.options != null ? scope.options : {}; hasScopeCoords = (scope != null) && this.validateCoords(scope.coords); if (markerScope != null) { markerScope.$watch('coords', (function(_this) { return function(newValue, oldValue) { if ((gMarker != null) && !childWindow.markerCtrl) { childWindow.markerCtrl = gMarker; childWindow.handleClick(true); } if (!_this.validateCoords(newValue)) { return childWindow.hideWindow(); } if (!angular.equals(newValue, oldValue)) { return childWindow.getLatestPosition(_this.getCoords(newValue)); } }; })(this), true); } opts = hasScopeCoords ? this.createWindowOptions(gMarker, scope, element.html(), defaults) : defaults; if (mapCtrl != null) { childWindow = new WindowChildModel({}, scope, opts, isIconVisibleOnClick, mapCtrl, gMarker, element); this.childWindows.push(childWindow); scope.$on("$destroy", (function(_this) { return function() { _this.childWindows = _.withoutObjects(_this.childWindows, [childWindow], function(child1, child2) { return child1.scope.$id === child2.scope.$id; }); return _this.childWindows.length = 0; }; })(this)); } if (scope.control != null) { scope.control.getGWindows = (function(_this) { return function() { return _this.childWindows.map(function(child) { return child.gWin; }); }; })(this); scope.control.getChildWindows = (function(_this) { return function() { return _this.childWindows; }; })(this); scope.control.showWindow = (function(_this) { return function() { return _this.childWindows.map(function(child) { return child.showWindow(); }); }; })(this); scope.control.hideWindow = (function(_this) { return function() { return _this.childWindows.map(function(child) { return child.hideWindow(); }); }; })(this); } if ((this.onChildCreation != null) && (childWindow != null)) { return this.onChildCreation(childWindow); } }; return Window; })(IWindow); } ]); }).call(this); (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; angular.module("google-maps.directives.api".ns()).factory("Windows".ns(), [ "IWindow".ns(), "WindowsParentModel".ns(), function(IWindow, WindowsParentModel) { /* Windows directive where many windows map to the models property */ var Windows; return Windows = (function(_super) { __extends(Windows, _super); function Windows() { this.init = __bind(this.init, this); this.link = __bind(this.link, this); Windows.__super__.constructor.call(this); this.require = ['^' + 'GoogleMap'.ns(), '^?' + 'Markers'.ns()]; this.template = '<span class="angular-google-maps-windows" ng-transclude></span>'; this.scope.idKey = '=idkey'; this.scope.doRebuildAll = '=dorebuildall'; this.scope.models = '=models'; this.$log.debug(this); } Windows.prototype.link = function(scope, element, attrs, ctrls) { var mapScope, markerCtrl, markerScope; mapScope = ctrls[0].getScope(); markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1] : void 0; markerScope = markerCtrl != null ? markerCtrl.getScope() : void 0; return mapScope.deferred.promise.then((function(_this) { return function(map) { var promise, _ref; promise = (markerScope != null ? (_ref = markerScope.deferred) != null ? _ref.promise : void 0 : void 0) || Promise.resolve(); return promise.then(function() { var pieces, _ref1; pieces = (_ref1 = _this.parentModel) != null ? _ref1.existingPieces : void 0; if (pieces) { return pieces.then(function() { return _this.init(scope, element, attrs, ctrls, map, markerScope); }); } else { return _this.init(scope, element, attrs, ctrls, map, markerScope); } }); }; })(this)); }; Windows.prototype.init = function(scope, element, attrs, ctrls, map, additionalScope) { var parentModel; parentModel = new WindowsParentModel(scope, element, attrs, ctrls, map, additionalScope); if (scope.control != null) { scope.control.getGWindows = (function(_this) { return function() { return parentModel.windows.map(function(child) { return child.gWin; }); }; })(this); return scope.control.getChildWindows = (function(_this) { return function() { return parentModel.windows; }; })(this); } }; return Windows; })(IWindow); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready Nick Baugh - https://github.com/niftylettuce */ (function() { angular.module("google-maps".ns()).directive("GoogleMap".ns(), [ "Map".ns(), function(Map) { return new Map(); } ]); }).call(this); /* @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ /* Map marker directive This directive is used to create a marker on an existing map. This directive creates a new scope. {attribute coords required} object containing latitude and longitude properties {attribute icon optional} string url to image used for marker icon {attribute animate optional} if set to false, the marker won't be animated (on by default) */ (function() { angular.module("google-maps".ns()).directive("Marker".ns(), [ "$timeout", "Marker".ns(), function($timeout, Marker) { return new Marker($timeout); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ /* Map marker directive This directive is used to create a marker on an existing map. This directive creates a new scope. {attribute coords required} object containing latitude and longitude properties {attribute icon optional} string url to image used for marker icon {attribute animate optional} if set to false, the marker won't be animated (on by default) */ (function() { angular.module("google-maps".ns()).directive("Markers".ns(), [ "$timeout", "Markers".ns(), function($timeout, Markers) { return new Markers($timeout); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready Rick Huizinga - https://plus.google.com/+RickHuizinga */ (function() { angular.module("google-maps".ns()).directive("Polygon".ns(), [ 'Polygon'.ns(), function(Polygon) { return new Polygon(); } ]); }).call(this); /* @authors Julian Popescu - https://github.com/jpopesculian Rick Huizinga - https://plus.google.com/+RickHuizinga */ (function() { angular.module("google-maps".ns()).directive("Circle".ns(), [ "Circle".ns(), function(Circle) { return Circle; } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ (function() { angular.module("google-maps".ns()).directive("Polyline".ns(), [ "Polyline".ns(), function(Polyline) { return new Polyline(); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ (function() { angular.module("google-maps".ns()).directive("Polylines".ns(), [ "Polylines".ns(), function(Polylines) { return new Polylines(); } ]); }).call(this); /* @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready Chentsu Lin - https://github.com/ChenTsuLin */ (function() { angular.module("google-maps".ns()).directive("Rectangle".ns(), [ "Logger".ns(), "Rectangle".ns(), function($log, Rectangle) { return Rectangle; } ]); }).call(this); /* @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ /* Map info window directive This directive is used to create an info window on an existing map. This directive creates a new scope. {attribute coords required} object containing latitude and longitude properties {attribute show optional} map will show when this expression returns true */ (function() { angular.module("google-maps".ns()).directive("Window".ns(), [ "$timeout", "$compile", "$http", "$templateCache", "Window".ns(), function($timeout, $compile, $http, $templateCache, Window) { return new Window($timeout, $compile, $http, $templateCache); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicolas Laplante - https://plus.google.com/108189012221374960701 Nicholas McCready - https://twitter.com/nmccready */ /* Map info window directive This directive is used to create an info window on an existing map. This directive creates a new scope. {attribute coords required} object containing latitude and longitude properties {attribute show optional} map will show when this expression returns true */ (function() { angular.module("google-maps".ns()).directive("Windows".ns(), [ "$timeout", "$compile", "$http", "$templateCache", "$interpolate", "Windows".ns(), function($timeout, $compile, $http, $templateCache, $interpolate, Windows) { return new Windows($timeout, $compile, $http, $templateCache, $interpolate); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors: - Nicolas Laplante https://plus.google.com/108189012221374960701 - Nicholas McCready - https://twitter.com/nmccready */ /* Map Layer directive This directive is used to create any type of Layer from the google maps sdk. This directive creates a new scope. {attribute show optional} true (default) shows the trafficlayer otherwise it is hidden */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; angular.module("google-maps".ns()).directive("Layer".ns(), [ "$timeout", "Logger".ns(), "LayerParentModel".ns(), function($timeout, Logger, LayerParentModel) { var Layer; Layer = (function() { function Layer() { this.link = __bind(this.link, this); this.$log = Logger; this.restrict = "EMA"; this.require = '^' + 'GoogleMap'.ns(); this.priority = -1; this.transclude = true; this.template = '<span class=\"angular-google-map-layer\" ng-transclude></span>'; this.replace = true; this.scope = { show: "=show", type: "=type", namespace: "=namespace", options: '=options', onCreated: '&oncreated' }; } Layer.prototype.link = function(scope, element, attrs, mapCtrl) { return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { if (scope.onCreated != null) { return new LayerParentModel(scope, element, attrs, map, scope.onCreated); } else { return new LayerParentModel(scope, element, attrs, map); } }; })(this)); }; return Layer; })(); return new Layer(); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Adam Kreitals, [email protected] */ /* mapControl directive This directive is used to create a custom control element on an existing map. This directive creates a new scope. {attribute template required} string url of the template to be used for the control {attribute position optional} string position of the control of the form top-left or TOP_LEFT defaults to TOP_CENTER {attribute controller optional} string controller to be applied to the template {attribute index optional} number index for controlling the order of similarly positioned mapControl elements */ (function() { angular.module("google-maps".ns()).directive("MapControl".ns(), [ "Control".ns(), function(Control) { return new Control(); } ]); }).call(this); (function() { angular.module("google-maps".ns()).directive("DrawingManager".ns(), [ "DrawingManager".ns(), function(DrawingManager) { return DrawingManager; } ]); }).call(this); /* angular-google-maps https://github.com/nlaplante/angular-google-maps @authors Nicholas McCready - https://twitter.com/nmccready * Brunt of the work is in DrawFreeHandChildModel */ (function() { angular.module('google-maps'.ns()).directive('FreeDrawPolygons'.ns(), [ 'ApiFreeDrawPolygons'.ns(), function(FreeDrawPolygons) { return new FreeDrawPolygons(); } ]); }).call(this); /* ! The MIT License Copyright (c) 2010-2013 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. angular-google-maps https://github.com/nlaplante/angular-google-maps @authors: - Nicolas Laplante https://plus.google.com/108189012221374960701 - Nicholas McCready - https://twitter.com/nmccready */ /* Map Layer directive This directive is used to create any type of Layer from the google maps sdk. This directive creates a new scope. {attribute show optional} true (default) shows the trafficlayer otherwise it is hidden */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; angular.module("google-maps".ns()).directive("MapType".ns(), [ "$timeout", "Logger".ns(), "MapTypeParentModel".ns(), function($timeout, Logger, MapTypeParentModel) { var MapType; MapType = (function() { function MapType() { this.link = __bind(this.link, this); this.$log = Logger; this.restrict = "EMA"; this.require = '^' + 'GoogleMap'.ns(); this.priority = -1; this.transclude = true; this.template = '<span class=\"angular-google-map-layer\" ng-transclude></span>'; this.replace = true; this.scope = { show: "=show", options: '=options', refresh: '=refresh', id: '@' }; } MapType.prototype.link = function(scope, element, attrs, mapCtrl) { return mapCtrl.getScope().deferred.promise.then((function(_this) { return function(map) { return new MapTypeParentModel(scope, element, attrs, map); }; })(this)); }; return MapType; })(); return new MapType(); } ]); }).call(this); /* @authors: - Nicolas Laplante https://plus.google.com/108189012221374960701 - Nicholas McCready - https://twitter.com/nmccready - Carrie Kengle - http://about.me/carrie */ /* Places Search Box directive This directive is used to create a Places Search Box. This directive creates a new scope. {attribute input required} HTMLInputElement {attribute options optional} The options that can be set on a SearchBox object (google.maps.places.SearchBoxOptions object specification) */ (function() { var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; angular.module("google-maps".ns()).directive("SearchBox".ns(), [ "GoogleMapApi".ns(), "Logger".ns(), "SearchBoxParentModel".ns(), '$http', '$templateCache', function(GoogleMapApi, Logger, SearchBoxParentModel, $http, $templateCache) { var SearchBox; SearchBox = (function() { function SearchBox() { this.link = __bind(this.link, this); this.$log = Logger; this.restrict = "EMA"; this.require = '^' + 'GoogleMap'.ns(); this.priority = -1; this.transclude = true; this.template = '<span class=\"angular-google-map-search\" ng-transclude></span>'; this.replace = true; this.scope = { template: '=template', position: '=position', options: '=options', events: '=events', parentdiv: '=parentdiv' }; } SearchBox.prototype.link = function(scope, element, attrs, mapCtrl) { return GoogleMapApi.then((function(_this) { return function(maps) { return $http.get(scope.template, { cache: $templateCache }).success(function(template) { return mapCtrl.getScope().deferred.promise.then(function(map) { var ctrlPosition; ctrlPosition = angular.isDefined(scope.position) ? scope.position.toUpperCase().replace(/-/g, '_') : 'TOP_LEFT'; if (!maps.ControlPosition[ctrlPosition]) { _this.$log.error('searchBox: invalid position property'); return; } return new SearchBoxParentModel(scope, element, attrs, map, ctrlPosition, template); }); }); }; })(this)); }; return SearchBox; })(); return new SearchBox(); } ]); }).call(this); ;angular.module("google-maps.wrapped".ns()).service("uuid".ns(), function() { //BEGIN REPLACE /* Version: core-1.0 The MIT License: Copyright (c) 2012 LiosK. */ function UUID(){}UUID.generate=function(){var a=UUID._gri,b=UUID._ha;return b(a(32),8)+"-"+b(a(16),4)+"-"+b(16384|a(12),4)+"-"+b(32768|a(14),4)+"-"+b(a(48),12)};UUID._gri=function(a){return 0>a?NaN:30>=a?0|Math.random()*(1<<a):53>=a?(0|1073741824*Math.random())+1073741824*(0|Math.random()*(1<<a-30)):NaN};UUID._ha=function(a,b){for(var c=a.toString(16),d=b-c.length,e="0";0<d;d>>>=1,e+=e)d&1&&(c=e+c);return c}; //END REPLACE return UUID; });;// wrap the utility libraries needed in ./lib // http://google-maps-utility-library-v3.googlecode.com/svn/ angular.module('google-maps.wrapped'.ns()).service('GoogleMapsUtilV3'.ns(), function () { return { init: _.once(function () { //BEGIN REPLACE /*! angular-google-maps 2.0.2 2014-10-21 * AngularJS directives for Google Maps * git: https://github.com/angular-ui/angular-google-maps.git */ /** * @name InfoBox * @version 1.1.12 [December 11, 2012] * @author Gary Little (inspired by proof-of-concept code from Pamela Fox of Google) * @copyright Copyright 2010 Gary Little [gary at luxcentral.com] * @fileoverview InfoBox extends the Google Maps JavaScript API V3 <tt>OverlayView</tt> class. * <p> * An InfoBox behaves like a <tt>google.maps.InfoWindow</tt>, but it supports several * additional properties for advanced styling. An InfoBox can also be used as a map label. * <p> * An InfoBox also fires the same events as a <tt>google.maps.InfoWindow</tt>. */ /*! * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /*jslint browser:true */ /*global google */ /** * @name InfoBoxOptions * @class This class represents the optional parameter passed to the {@link InfoBox} constructor. * @property {string|Node} content The content of the InfoBox (plain text or an HTML DOM node). * @property {boolean} [disableAutoPan=false] Disable auto-pan on <tt>open</tt>. * @property {number} maxWidth The maximum width (in pixels) of the InfoBox. Set to 0 if no maximum. * @property {Size} pixelOffset The offset (in pixels) from the top left corner of the InfoBox * (or the bottom left corner if the <code>alignBottom</code> property is <code>true</code>) * to the map pixel corresponding to <tt>position</tt>. * @property {LatLng} position The geographic location at which to display the InfoBox. * @property {number} zIndex The CSS z-index style value for the InfoBox. * Note: This value overrides a zIndex setting specified in the <tt>boxStyle</tt> property. * @property {string} [boxClass="infoBox"] The name of the CSS class defining the styles for the InfoBox container. * @property {Object} [boxStyle] An object literal whose properties define specific CSS * style values to be applied to the InfoBox. Style values defined here override those that may * be defined in the <code>boxClass</code> style sheet. If this property is changed after the * InfoBox has been created, all previously set styles (except those defined in the style sheet) * are removed from the InfoBox before the new style values are applied. * @property {string} closeBoxMargin The CSS margin style value for the close box. * The default is "2px" (a 2-pixel margin on all sides). * @property {string} closeBoxURL The URL of the image representing the close box. * Note: The default is the URL for Google's standard close box. * Set this property to "" if no close box is required. * @property {Size} infoBoxClearance Minimum offset (in pixels) from the InfoBox to the * map edge after an auto-pan. * @property {boolean} [isHidden=false] Hide the InfoBox on <tt>open</tt>. * [Deprecated in favor of the <tt>visible</tt> property.] * @property {boolean} [visible=true] Show the InfoBox on <tt>open</tt>. * @property {boolean} alignBottom Align the bottom left corner of the InfoBox to the <code>position</code> * location (default is <tt>false</tt> which means that the top left corner of the InfoBox is aligned). * @property {string} pane The pane where the InfoBox is to appear (default is "floatPane"). * Set the pane to "mapPane" if the InfoBox is being used as a map label. * Valid pane names are the property names for the <tt>google.maps.MapPanes</tt> object. * @property {boolean} enableEventPropagation Propagate mousedown, mousemove, mouseover, mouseout, * mouseup, click, dblclick, touchstart, touchend, touchmove, and contextmenu events in the InfoBox * (default is <tt>false</tt> to mimic the behavior of a <tt>google.maps.InfoWindow</tt>). Set * this property to <tt>true</tt> if the InfoBox is being used as a map label. */ /** * Creates an InfoBox with the options specified in {@link InfoBoxOptions}. * Call <tt>InfoBox.open</tt> to add the box to the map. * @constructor * @param {InfoBoxOptions} [opt_opts] */ function InfoBox(opt_opts) { opt_opts = opt_opts || {}; google.maps.OverlayView.apply(this, arguments); // Standard options (in common with google.maps.InfoWindow): // this.content_ = opt_opts.content || ""; this.disableAutoPan_ = opt_opts.disableAutoPan || false; this.maxWidth_ = opt_opts.maxWidth || 0; this.pixelOffset_ = opt_opts.pixelOffset || new google.maps.Size(0, 0); this.position_ = opt_opts.position || new google.maps.LatLng(0, 0); this.zIndex_ = opt_opts.zIndex || null; // Additional options (unique to InfoBox): // this.boxClass_ = opt_opts.boxClass || "infoBox"; this.boxStyle_ = opt_opts.boxStyle || {}; this.closeBoxMargin_ = opt_opts.closeBoxMargin || "2px"; this.closeBoxURL_ = opt_opts.closeBoxURL || "http://www.google.com/intl/en_us/mapfiles/close.gif"; if (opt_opts.closeBoxURL === "") { this.closeBoxURL_ = ""; } this.infoBoxClearance_ = opt_opts.infoBoxClearance || new google.maps.Size(1, 1); if (typeof opt_opts.visible === "undefined") { if (typeof opt_opts.isHidden === "undefined") { opt_opts.visible = true; } else { opt_opts.visible = !opt_opts.isHidden; } } this.isHidden_ = !opt_opts.visible; this.alignBottom_ = opt_opts.alignBottom || false; this.pane_ = opt_opts.pane || "floatPane"; this.enableEventPropagation_ = opt_opts.enableEventPropagation || false; this.div_ = null; this.closeListener_ = null; this.moveListener_ = null; this.contextListener_ = null; this.eventListeners_ = null; this.fixedWidthSet_ = null; } /* InfoBox extends OverlayView in the Google Maps API v3. */ InfoBox.prototype = new google.maps.OverlayView(); /** * Creates the DIV representing the InfoBox. * @private */ InfoBox.prototype.createInfoBoxDiv_ = function () { var i; var events; var bw; var me = this; // This handler prevents an event in the InfoBox from being passed on to the map. // var cancelHandler = function (e) { e.cancelBubble = true; if (e.stopPropagation) { e.stopPropagation(); } }; // This handler ignores the current event in the InfoBox and conditionally prevents // the event from being passed on to the map. It is used for the contextmenu event. // var ignoreHandler = function (e) { e.returnValue = false; if (e.preventDefault) { e.preventDefault(); } if (!me.enableEventPropagation_) { cancelHandler(e); } }; if (!this.div_) { this.div_ = document.createElement("div"); this.setBoxStyle_(); if (typeof this.content_.nodeType === "undefined") { this.div_.innerHTML = this.getCloseBoxImg_() + this.content_; } else { this.div_.innerHTML = this.getCloseBoxImg_(); this.div_.appendChild(this.content_); } // Add the InfoBox DIV to the DOM this.getPanes()[this.pane_].appendChild(this.div_); this.addClickHandler_(); if (this.div_.style.width) { this.fixedWidthSet_ = true; } else { if (this.maxWidth_ !== 0 && this.div_.offsetWidth > this.maxWidth_) { this.div_.style.width = this.maxWidth_; this.div_.style.overflow = "auto"; this.fixedWidthSet_ = true; } else { // The following code is needed to overcome problems with MSIE bw = this.getBoxWidths_(); this.div_.style.width = (this.div_.offsetWidth - bw.left - bw.right) + "px"; this.fixedWidthSet_ = false; } } this.panBox_(this.disableAutoPan_); if (!this.enableEventPropagation_) { this.eventListeners_ = []; // Cancel event propagation. // // Note: mousemove not included (to resolve Issue 152) events = ["mousedown", "mouseover", "mouseout", "mouseup", "click", "dblclick", "touchstart", "touchend", "touchmove"]; for (i = 0; i < events.length; i++) { this.eventListeners_.push(google.maps.event.addDomListener(this.div_, events[i], cancelHandler)); } // Workaround for Google bug that causes the cursor to change to a pointer // when the mouse moves over a marker underneath InfoBox. this.eventListeners_.push(google.maps.event.addDomListener(this.div_, "mouseover", function (e) { this.style.cursor = "default"; })); } this.contextListener_ = google.maps.event.addDomListener(this.div_, "contextmenu", ignoreHandler); /** * This event is fired when the DIV containing the InfoBox's content is attached to the DOM. * @name InfoBox#domready * @event */ google.maps.event.trigger(this, "domready"); } }; /** * Returns the HTML <IMG> tag for the close box. * @private */ InfoBox.prototype.getCloseBoxImg_ = function () { var img = ""; if (this.closeBoxURL_ !== "") { img = "<img"; img += " src='" + this.closeBoxURL_ + "'"; img += " align=right"; // Do this because Opera chokes on style='float: right;' img += " style='"; img += " position: relative;"; // Required by MSIE img += " cursor: pointer;"; img += " margin: " + this.closeBoxMargin_ + ";"; img += "'>"; } return img; }; /** * Adds the click handler to the InfoBox close box. * @private */ InfoBox.prototype.addClickHandler_ = function () { var closeBox; if (this.closeBoxURL_ !== "") { closeBox = this.div_.firstChild; this.closeListener_ = google.maps.event.addDomListener(closeBox, "click", this.getCloseClickHandler_()); } else { this.closeListener_ = null; } }; /** * Returns the function to call when the user clicks the close box of an InfoBox. * @private */ InfoBox.prototype.getCloseClickHandler_ = function () { var me = this; return function (e) { // 1.0.3 fix: Always prevent propagation of a close box click to the map: e.cancelBubble = true; if (e.stopPropagation) { e.stopPropagation(); } /** * This event is fired when the InfoBox's close box is clicked. * @name InfoBox#closeclick * @event */ google.maps.event.trigger(me, "closeclick"); me.close(); }; }; /** * Pans the map so that the InfoBox appears entirely within the map's visible area. * @private */ InfoBox.prototype.panBox_ = function (disablePan) { var map; var bounds; var xOffset = 0, yOffset = 0; if (!disablePan) { map = this.getMap(); if (map instanceof google.maps.Map) { // Only pan if attached to map, not panorama if (!map.getBounds().contains(this.position_)) { // Marker not in visible area of map, so set center // of map to the marker position first. map.setCenter(this.position_); } bounds = map.getBounds(); var mapDiv = map.getDiv(); var mapWidth = mapDiv.offsetWidth; var mapHeight = mapDiv.offsetHeight; var iwOffsetX = this.pixelOffset_.width; var iwOffsetY = this.pixelOffset_.height; var iwWidth = this.div_.offsetWidth; var iwHeight = this.div_.offsetHeight; var padX = this.infoBoxClearance_.width; var padY = this.infoBoxClearance_.height; var pixPosition = this.getProjection().fromLatLngToContainerPixel(this.position_); if (pixPosition.x < (-iwOffsetX + padX)) { xOffset = pixPosition.x + iwOffsetX - padX; } else if ((pixPosition.x + iwWidth + iwOffsetX + padX) > mapWidth) { xOffset = pixPosition.x + iwWidth + iwOffsetX + padX - mapWidth; } if (this.alignBottom_) { if (pixPosition.y < (-iwOffsetY + padY + iwHeight)) { yOffset = pixPosition.y + iwOffsetY - padY - iwHeight; } else if ((pixPosition.y + iwOffsetY + padY) > mapHeight) { yOffset = pixPosition.y + iwOffsetY + padY - mapHeight; } } else { if (pixPosition.y < (-iwOffsetY + padY)) { yOffset = pixPosition.y + iwOffsetY - padY; } else if ((pixPosition.y + iwHeight + iwOffsetY + padY) > mapHeight) { yOffset = pixPosition.y + iwHeight + iwOffsetY + padY - mapHeight; } } if (!(xOffset === 0 && yOffset === 0)) { // Move the map to the shifted center. // var c = map.getCenter(); map.panBy(xOffset, yOffset); } } } }; /** * Sets the style of the InfoBox by setting the style sheet and applying * other specific styles requested. * @private */ InfoBox.prototype.setBoxStyle_ = function () { var i, boxStyle; if (this.div_) { // Apply style values from the style sheet defined in the boxClass parameter: this.div_.className = this.boxClass_; // Clear existing inline style values: this.div_.style.cssText = ""; // Apply style values defined in the boxStyle parameter: boxStyle = this.boxStyle_; for (i in boxStyle) { if (boxStyle.hasOwnProperty(i)) { this.div_.style[i] = boxStyle[i]; } } // Fix up opacity style for benefit of MSIE: // if (typeof this.div_.style.opacity !== "undefined" && this.div_.style.opacity !== "") { this.div_.style.filter = "alpha(opacity=" + (this.div_.style.opacity * 100) + ")"; } // Apply required styles: // this.div_.style.position = "absolute"; this.div_.style.visibility = 'hidden'; if (this.zIndex_ !== null) { this.div_.style.zIndex = this.zIndex_; } } }; /** * Get the widths of the borders of the InfoBox. * @private * @return {Object} widths object (top, bottom left, right) */ InfoBox.prototype.getBoxWidths_ = function () { var computedStyle; var bw = {top: 0, bottom: 0, left: 0, right: 0}; var box = this.div_; if (document.defaultView && document.defaultView.getComputedStyle) { computedStyle = box.ownerDocument.defaultView.getComputedStyle(box, ""); if (computedStyle) { // The computed styles are always in pixel units (good!) bw.top = parseInt(computedStyle.borderTopWidth, 10) || 0; bw.bottom = parseInt(computedStyle.borderBottomWidth, 10) || 0; bw.left = parseInt(computedStyle.borderLeftWidth, 10) || 0; bw.right = parseInt(computedStyle.borderRightWidth, 10) || 0; } } else if (document.documentElement.currentStyle) { // MSIE if (box.currentStyle) { // The current styles may not be in pixel units, but assume they are (bad!) bw.top = parseInt(box.currentStyle.borderTopWidth, 10) || 0; bw.bottom = parseInt(box.currentStyle.borderBottomWidth, 10) || 0; bw.left = parseInt(box.currentStyle.borderLeftWidth, 10) || 0; bw.right = parseInt(box.currentStyle.borderRightWidth, 10) || 0; } } return bw; }; /** * Invoked when <tt>close</tt> is called. Do not call it directly. */ InfoBox.prototype.onRemove = function () { if (this.div_) { this.div_.parentNode.removeChild(this.div_); this.div_ = null; } }; /** * Draws the InfoBox based on the current map projection and zoom level. */ InfoBox.prototype.draw = function () { this.createInfoBoxDiv_(); var pixPosition = this.getProjection().fromLatLngToDivPixel(this.position_); this.div_.style.left = (pixPosition.x + this.pixelOffset_.width) + "px"; if (this.alignBottom_) { this.div_.style.bottom = -(pixPosition.y + this.pixelOffset_.height) + "px"; } else { this.div_.style.top = (pixPosition.y + this.pixelOffset_.height) + "px"; } if (this.isHidden_) { this.div_.style.visibility = 'hidden'; } else { this.div_.style.visibility = "visible"; } }; /** * Sets the options for the InfoBox. Note that changes to the <tt>maxWidth</tt>, * <tt>closeBoxMargin</tt>, <tt>closeBoxURL</tt>, and <tt>enableEventPropagation</tt> * properties have no affect until the current InfoBox is <tt>close</tt>d and a new one * is <tt>open</tt>ed. * @param {InfoBoxOptions} opt_opts */ InfoBox.prototype.setOptions = function (opt_opts) { if (typeof opt_opts.boxClass !== "undefined") { // Must be first this.boxClass_ = opt_opts.boxClass; this.setBoxStyle_(); } if (typeof opt_opts.boxStyle !== "undefined") { // Must be second this.boxStyle_ = opt_opts.boxStyle; this.setBoxStyle_(); } if (typeof opt_opts.content !== "undefined") { this.setContent(opt_opts.content); } if (typeof opt_opts.disableAutoPan !== "undefined") { this.disableAutoPan_ = opt_opts.disableAutoPan; } if (typeof opt_opts.maxWidth !== "undefined") { this.maxWidth_ = opt_opts.maxWidth; } if (typeof opt_opts.pixelOffset !== "undefined") { this.pixelOffset_ = opt_opts.pixelOffset; } if (typeof opt_opts.alignBottom !== "undefined") { this.alignBottom_ = opt_opts.alignBottom; } if (typeof opt_opts.position !== "undefined") { this.setPosition(opt_opts.position); } if (typeof opt_opts.zIndex !== "undefined") { this.setZIndex(opt_opts.zIndex); } if (typeof opt_opts.closeBoxMargin !== "undefined") { this.closeBoxMargin_ = opt_opts.closeBoxMargin; } if (typeof opt_opts.closeBoxURL !== "undefined") { this.closeBoxURL_ = opt_opts.closeBoxURL; } if (typeof opt_opts.infoBoxClearance !== "undefined") { this.infoBoxClearance_ = opt_opts.infoBoxClearance; } if (typeof opt_opts.isHidden !== "undefined") { this.isHidden_ = opt_opts.isHidden; } if (typeof opt_opts.visible !== "undefined") { this.isHidden_ = !opt_opts.visible; } if (typeof opt_opts.enableEventPropagation !== "undefined") { this.enableEventPropagation_ = opt_opts.enableEventPropagation; } if (this.div_) { this.draw(); } }; /** * Sets the content of the InfoBox. * The content can be plain text or an HTML DOM node. * @param {string|Node} content */ InfoBox.prototype.setContent = function (content) { this.content_ = content; if (this.div_) { if (this.closeListener_) { google.maps.event.removeListener(this.closeListener_); this.closeListener_ = null; } // Odd code required to make things work with MSIE. // if (!this.fixedWidthSet_) { this.div_.style.width = ""; } if (typeof content.nodeType === "undefined") { this.div_.innerHTML = this.getCloseBoxImg_() + content; } else { this.div_.innerHTML = this.getCloseBoxImg_(); this.div_.appendChild(content); } // Perverse code required to make things work with MSIE. // (Ensures the close box does, in fact, float to the right.) // if (!this.fixedWidthSet_) { this.div_.style.width = this.div_.offsetWidth + "px"; if (typeof content.nodeType === "undefined") { this.div_.innerHTML = this.getCloseBoxImg_() + content; } else { this.div_.innerHTML = this.getCloseBoxImg_(); this.div_.appendChild(content); } } this.addClickHandler_(); } /** * This event is fired when the content of the InfoBox changes. * @name InfoBox#content_changed * @event */ google.maps.event.trigger(this, "content_changed"); }; /** * Sets the geographic location of the InfoBox. * @param {LatLng} latlng */ InfoBox.prototype.setPosition = function (latlng) { this.position_ = latlng; if (this.div_) { this.draw(); } /** * This event is fired when the position of the InfoBox changes. * @name InfoBox#position_changed * @event */ google.maps.event.trigger(this, "position_changed"); }; /** * Sets the zIndex style for the InfoBox. * @param {number} index */ InfoBox.prototype.setZIndex = function (index) { this.zIndex_ = index; if (this.div_) { this.div_.style.zIndex = index; } /** * This event is fired when the zIndex of the InfoBox changes. * @name InfoBox#zindex_changed * @event */ google.maps.event.trigger(this, "zindex_changed"); }; /** * Sets the visibility of the InfoBox. * @param {boolean} isVisible */ InfoBox.prototype.setVisible = function (isVisible) { this.isHidden_ = !isVisible; if (this.div_) { this.div_.style.visibility = (this.isHidden_ ? "hidden" : "visible"); } }; /** * Returns the content of the InfoBox. * @returns {string} */ InfoBox.prototype.getContent = function () { return this.content_; }; /** * Returns the geographic location of the InfoBox. * @returns {LatLng} */ InfoBox.prototype.getPosition = function () { return this.position_; }; /** * Returns the zIndex for the InfoBox. * @returns {number} */ InfoBox.prototype.getZIndex = function () { return this.zIndex_; }; /** * Returns a flag indicating whether the InfoBox is visible. * @returns {boolean} */ InfoBox.prototype.getVisible = function () { var isVisible; if ((typeof this.getMap() === "undefined") || (this.getMap() === null)) { isVisible = false; } else { isVisible = !this.isHidden_; } return isVisible; }; /** * Shows the InfoBox. [Deprecated; use <tt>setVisible</tt> instead.] */ InfoBox.prototype.show = function () { this.isHidden_ = false; if (this.div_) { this.div_.style.visibility = "visible"; } }; /** * Hides the InfoBox. [Deprecated; use <tt>setVisible</tt> instead.] */ InfoBox.prototype.hide = function () { this.isHidden_ = true; if (this.div_) { this.div_.style.visibility = "hidden"; } }; /** * Adds the InfoBox to the specified map or Street View panorama. If <tt>anchor</tt> * (usually a <tt>google.maps.Marker</tt>) is specified, the position * of the InfoBox is set to the position of the <tt>anchor</tt>. If the * anchor is dragged to a new location, the InfoBox moves as well. * @param {Map|StreetViewPanorama} map * @param {MVCObject} [anchor] */ InfoBox.prototype.open = function (map, anchor) { var me = this; if (anchor) { this.position_ = anchor.getPosition(); this.moveListener_ = google.maps.event.addListener(anchor, "position_changed", function () { me.setPosition(this.getPosition()); }); } this.setMap(map); if (this.div_) { this.panBox_(); } }; /** * Removes the InfoBox from the map. */ InfoBox.prototype.close = function () { var i; if (this.closeListener_) { google.maps.event.removeListener(this.closeListener_); this.closeListener_ = null; } if (this.eventListeners_) { for (i = 0; i < this.eventListeners_.length; i++) { google.maps.event.removeListener(this.eventListeners_[i]); } this.eventListeners_ = null; } if (this.moveListener_) { google.maps.event.removeListener(this.moveListener_); this.moveListener_ = null; } if (this.contextListener_) { google.maps.event.removeListener(this.contextListener_); this.contextListener_ = null; } this.setMap(null); };;/** * @name MarkerClustererPlus for Google Maps V3 * @version 2.1.1 [November 4, 2013] * @author Gary Little * @fileoverview * The library creates and manages per-zoom-level clusters for large amounts of markers. * <p> * This is an enhanced V3 implementation of the * <a href="http://gmaps-utility-library-dev.googlecode.com/svn/tags/markerclusterer/" * >V2 MarkerClusterer</a> by Xiaoxi Wu. It is based on the * <a href="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/" * >V3 MarkerClusterer</a> port by Luke Mahe. MarkerClustererPlus was created by Gary Little. * <p> * v2.0 release: MarkerClustererPlus v2.0 is backward compatible with MarkerClusterer v1.0. It * adds support for the <code>ignoreHidden</code>, <code>title</code>, <code>batchSizeIE</code>, * and <code>calculator</code> properties as well as support for four more events. It also allows * greater control over the styling of the text that appears on the cluster marker. The * documentation has been significantly improved and the overall code has been simplified and * polished. Very large numbers of markers can now be managed without causing Javascript timeout * errors on Internet Explorer. Note that the name of the <code>clusterclick</code> event has been * deprecated. The new name is <code>click</code>, so please change your application code now. */ /** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @name ClusterIconStyle * @class This class represents the object for values in the <code>styles</code> array passed * to the {@link MarkerClusterer} constructor. The element in this array that is used to * style the cluster icon is determined by calling the <code>calculator</code> function. * * @property {string} url The URL of the cluster icon image file. Required. * @property {number} height The display height (in pixels) of the cluster icon. Required. * @property {number} width The display width (in pixels) of the cluster icon. Required. * @property {Array} [anchorText] The position (in pixels) from the center of the cluster icon to * where the text label is to be centered and drawn. The format is <code>[yoffset, xoffset]</code> * where <code>yoffset</code> increases as you go down from center and <code>xoffset</code> * increases to the right of center. The default is <code>[0, 0]</code>. * @property {Array} [anchorIcon] The anchor position (in pixels) of the cluster icon. This is the * spot on the cluster icon that is to be aligned with the cluster position. The format is * <code>[yoffset, xoffset]</code> where <code>yoffset</code> increases as you go down and * <code>xoffset</code> increases to the right of the top-left corner of the icon. The default * anchor position is the center of the cluster icon. * @property {string} [textColor="black"] The color of the label text shown on the * cluster icon. * @property {number} [textSize=11] The size (in pixels) of the label text shown on the * cluster icon. * @property {string} [textDecoration="none"] The value of the CSS <code>text-decoration</code> * property for the label text shown on the cluster icon. * @property {string} [fontWeight="bold"] The value of the CSS <code>font-weight</code> * property for the label text shown on the cluster icon. * @property {string} [fontStyle="normal"] The value of the CSS <code>font-style</code> * property for the label text shown on the cluster icon. * @property {string} [fontFamily="Arial,sans-serif"] The value of the CSS <code>font-family</code> * property for the label text shown on the cluster icon. * @property {string} [backgroundPosition="0 0"] The position of the cluster icon image * within the image defined by <code>url</code>. The format is <code>"xpos ypos"</code> * (the same format as for the CSS <code>background-position</code> property). You must set * this property appropriately when the image defined by <code>url</code> represents a sprite * containing multiple images. Note that the position <i>must</i> be specified in px units. */ /** * @name ClusterIconInfo * @class This class is an object containing general information about a cluster icon. This is * the object that a <code>calculator</code> function returns. * * @property {string} text The text of the label to be shown on the cluster icon. * @property {number} index The index plus 1 of the element in the <code>styles</code> * array to be used to style the cluster icon. * @property {string} title The tooltip to display when the mouse moves over the cluster icon. * If this value is <code>undefined</code> or <code>""</code>, <code>title</code> is set to the * value of the <code>title</code> property passed to the MarkerClusterer. */ /** * A cluster icon. * * @constructor * @extends google.maps.OverlayView * @param {Cluster} cluster The cluster with which the icon is to be associated. * @param {Array} [styles] An array of {@link ClusterIconStyle} defining the cluster icons * to use for various cluster sizes. * @private */ function ClusterIcon(cluster, styles) { cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView); this.cluster_ = cluster; this.className_ = cluster.getMarkerClusterer().getClusterClass(); this.styles_ = styles; this.center_ = null; this.div_ = null; this.sums_ = null; this.visible_ = false; this.setMap(cluster.getMap()); // Note: this causes onAdd to be called } /** * Adds the icon to the DOM. */ ClusterIcon.prototype.onAdd = function () { var cClusterIcon = this; var cMouseDownInCluster; var cDraggingMapByCluster; this.div_ = document.createElement("div"); this.div_.className = this.className_; if (this.visible_) { this.show(); } this.getPanes().overlayMouseTarget.appendChild(this.div_); // Fix for Issue 157 this.boundsChangedListener_ = google.maps.event.addListener(this.getMap(), "bounds_changed", function () { cDraggingMapByCluster = cMouseDownInCluster; }); google.maps.event.addDomListener(this.div_, "mousedown", function () { cMouseDownInCluster = true; cDraggingMapByCluster = false; }); google.maps.event.addDomListener(this.div_, "click", function (e) { cMouseDownInCluster = false; if (!cDraggingMapByCluster) { var theBounds; var mz; var mc = cClusterIcon.cluster_.getMarkerClusterer(); /** * This event is fired when a cluster marker is clicked. * @name MarkerClusterer#click * @param {Cluster} c The cluster that was clicked. * @event */ google.maps.event.trigger(mc, "click", cClusterIcon.cluster_); google.maps.event.trigger(mc, "clusterclick", cClusterIcon.cluster_); // deprecated name // The default click handler follows. Disable it by setting // the zoomOnClick property to false. if (mc.getZoomOnClick()) { // Zoom into the cluster. mz = mc.getMaxZoom(); theBounds = cClusterIcon.cluster_.getBounds(); mc.getMap().fitBounds(theBounds); // There is a fix for Issue 170 here: setTimeout(function () { mc.getMap().fitBounds(theBounds); // Don't zoom beyond the max zoom level if (mz !== null && (mc.getMap().getZoom() > mz)) { mc.getMap().setZoom(mz + 1); } }, 100); } // Prevent event propagation to the map: e.cancelBubble = true; if (e.stopPropagation) { e.stopPropagation(); } } }); google.maps.event.addDomListener(this.div_, "mouseover", function () { var mc = cClusterIcon.cluster_.getMarkerClusterer(); /** * This event is fired when the mouse moves over a cluster marker. * @name MarkerClusterer#mouseover * @param {Cluster} c The cluster that the mouse moved over. * @event */ google.maps.event.trigger(mc, "mouseover", cClusterIcon.cluster_); }); google.maps.event.addDomListener(this.div_, "mouseout", function () { var mc = cClusterIcon.cluster_.getMarkerClusterer(); /** * This event is fired when the mouse moves out of a cluster marker. * @name MarkerClusterer#mouseout * @param {Cluster} c The cluster that the mouse moved out of. * @event */ google.maps.event.trigger(mc, "mouseout", cClusterIcon.cluster_); }); }; /** * Removes the icon from the DOM. */ ClusterIcon.prototype.onRemove = function () { if (this.div_ && this.div_.parentNode) { this.hide(); google.maps.event.removeListener(this.boundsChangedListener_); google.maps.event.clearInstanceListeners(this.div_); this.div_.parentNode.removeChild(this.div_); this.div_ = null; } }; /** * Draws the icon. */ ClusterIcon.prototype.draw = function () { if (this.visible_) { var pos = this.getPosFromLatLng_(this.center_); this.div_.style.top = pos.y + "px"; this.div_.style.left = pos.x + "px"; } }; /** * Hides the icon. */ ClusterIcon.prototype.hide = function () { if (this.div_) { this.div_.style.display = "none"; } this.visible_ = false; }; /** * Positions and shows the icon. */ ClusterIcon.prototype.show = function () { if (this.div_) { var img = ""; // NOTE: values must be specified in px units var bp = this.backgroundPosition_.split(" "); var spriteH = parseInt(bp[0].trim(), 10); var spriteV = parseInt(bp[1].trim(), 10); var pos = this.getPosFromLatLng_(this.center_); this.div_.style.cssText = this.createCss(pos); img = "<img src='" + this.url_ + "' style='position: absolute; top: " + spriteV + "px; left: " + spriteH + "px; "; if (!this.cluster_.getMarkerClusterer().enableRetinaIcons_) { img += "clip: rect(" + (-1 * spriteV) + "px, " + ((-1 * spriteH) + this.width_) + "px, " + ((-1 * spriteV) + this.height_) + "px, " + (-1 * spriteH) + "px);"; } img += "'>"; this.div_.innerHTML = img + "<div style='" + "position: absolute;" + "top: " + this.anchorText_[0] + "px;" + "left: " + this.anchorText_[1] + "px;" + "color: " + this.textColor_ + ";" + "font-size: " + this.textSize_ + "px;" + "font-family: " + this.fontFamily_ + ";" + "font-weight: " + this.fontWeight_ + ";" + "font-style: " + this.fontStyle_ + ";" + "text-decoration: " + this.textDecoration_ + ";" + "text-align: center;" + "width: " + this.width_ + "px;" + "line-height:" + this.height_ + "px;" + "'>" + this.sums_.text + "</div>"; if (typeof this.sums_.title === "undefined" || this.sums_.title === "") { this.div_.title = this.cluster_.getMarkerClusterer().getTitle(); } else { this.div_.title = this.sums_.title; } this.div_.style.display = ""; } this.visible_ = true; }; /** * Sets the icon styles to the appropriate element in the styles array. * * @param {ClusterIconInfo} sums The icon label text and styles index. */ ClusterIcon.prototype.useStyle = function (sums) { this.sums_ = sums; var index = Math.max(0, sums.index - 1); index = Math.min(this.styles_.length - 1, index); var style = this.styles_[index]; this.url_ = style.url; this.height_ = style.height; this.width_ = style.width; this.anchorText_ = style.anchorText || [0, 0]; this.anchorIcon_ = style.anchorIcon || [parseInt(this.height_ / 2, 10), parseInt(this.width_ / 2, 10)]; this.textColor_ = style.textColor || "black"; this.textSize_ = style.textSize || 11; this.textDecoration_ = style.textDecoration || "none"; this.fontWeight_ = style.fontWeight || "bold"; this.fontStyle_ = style.fontStyle || "normal"; this.fontFamily_ = style.fontFamily || "Arial,sans-serif"; this.backgroundPosition_ = style.backgroundPosition || "0 0"; }; /** * Sets the position at which to center the icon. * * @param {google.maps.LatLng} center The latlng to set as the center. */ ClusterIcon.prototype.setCenter = function (center) { this.center_ = center; }; /** * Creates the cssText style parameter based on the position of the icon. * * @param {google.maps.Point} pos The position of the icon. * @return {string} The CSS style text. */ ClusterIcon.prototype.createCss = function (pos) { var style = []; style.push("cursor: pointer;"); style.push("position: absolute; top: " + pos.y + "px; left: " + pos.x + "px;"); style.push("width: " + this.width_ + "px; height: " + this.height_ + "px;"); return style.join(""); }; /** * Returns the position at which to place the DIV depending on the latlng. * * @param {google.maps.LatLng} latlng The position in latlng. * @return {google.maps.Point} The position in pixels. */ ClusterIcon.prototype.getPosFromLatLng_ = function (latlng) { var pos = this.getProjection().fromLatLngToDivPixel(latlng); pos.x -= this.anchorIcon_[1]; pos.y -= this.anchorIcon_[0]; pos.x = parseInt(pos.x, 10); pos.y = parseInt(pos.y, 10); return pos; }; /** * Creates a single cluster that manages a group of proximate markers. * Used internally, do not call this constructor directly. * @constructor * @param {MarkerClusterer} mc The <code>MarkerClusterer</code> object with which this * cluster is associated. */ function Cluster(mc) { this.markerClusterer_ = mc; this.map_ = mc.getMap(); this.gridSize_ = mc.getGridSize(); this.minClusterSize_ = mc.getMinimumClusterSize(); this.averageCenter_ = mc.getAverageCenter(); this.markers_ = []; this.center_ = null; this.bounds_ = null; this.clusterIcon_ = new ClusterIcon(this, mc.getStyles()); } /** * Returns the number of markers managed by the cluster. You can call this from * a <code>click</code>, <code>mouseover</code>, or <code>mouseout</code> event handler * for the <code>MarkerClusterer</code> object. * * @return {number} The number of markers in the cluster. */ Cluster.prototype.getSize = function () { return this.markers_.length; }; /** * Returns the array of markers managed by the cluster. You can call this from * a <code>click</code>, <code>mouseover</code>, or <code>mouseout</code> event handler * for the <code>MarkerClusterer</code> object. * * @return {Array} The array of markers in the cluster. */ Cluster.prototype.getMarkers = function () { return this.markers_; }; /** * Returns the center of the cluster. You can call this from * a <code>click</code>, <code>mouseover</code>, or <code>mouseout</code> event handler * for the <code>MarkerClusterer</code> object. * * @return {google.maps.LatLng} The center of the cluster. */ Cluster.prototype.getCenter = function () { return this.center_; }; /** * Returns the map with which the cluster is associated. * * @return {google.maps.Map} The map. * @ignore */ Cluster.prototype.getMap = function () { return this.map_; }; /** * Returns the <code>MarkerClusterer</code> object with which the cluster is associated. * * @return {MarkerClusterer} The associated marker clusterer. * @ignore */ Cluster.prototype.getMarkerClusterer = function () { return this.markerClusterer_; }; /** * Returns the bounds of the cluster. * * @return {google.maps.LatLngBounds} the cluster bounds. * @ignore */ Cluster.prototype.getBounds = function () { var i; var bounds = new google.maps.LatLngBounds(this.center_, this.center_); var markers = this.getMarkers(); for (i = 0; i < markers.length; i++) { bounds.extend(markers[i].getPosition()); } return bounds; }; /** * Removes the cluster from the map. * * @ignore */ Cluster.prototype.remove = function () { this.clusterIcon_.setMap(null); this.markers_ = []; delete this.markers_; }; /** * Adds a marker to the cluster. * * @param {google.maps.Marker} marker The marker to be added. * @return {boolean} True if the marker was added. * @ignore */ Cluster.prototype.addMarker = function (marker) { var i; var mCount; var mz; if (this.isMarkerAlreadyAdded_(marker)) { return false; } if (!this.center_) { this.center_ = marker.getPosition(); this.calculateBounds_(); } else { if (this.averageCenter_) { var l = this.markers_.length + 1; var lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l; var lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l; this.center_ = new google.maps.LatLng(lat, lng); this.calculateBounds_(); } } marker.isAdded = true; this.markers_.push(marker); mCount = this.markers_.length; mz = this.markerClusterer_.getMaxZoom(); if (mz !== null && this.map_.getZoom() > mz) { // Zoomed in past max zoom, so show the marker. if (marker.getMap() !== this.map_) { marker.setMap(this.map_); } } else if (mCount < this.minClusterSize_) { // Min cluster size not reached so show the marker. if (marker.getMap() !== this.map_) { marker.setMap(this.map_); } } else if (mCount === this.minClusterSize_) { // Hide the markers that were showing. for (i = 0; i < mCount; i++) { this.markers_[i].setMap(null); } } else { marker.setMap(null); } this.updateIcon_(); return true; }; /** * Determines if a marker lies within the cluster's bounds. * * @param {google.maps.Marker} marker The marker to check. * @return {boolean} True if the marker lies in the bounds. * @ignore */ Cluster.prototype.isMarkerInClusterBounds = function (marker) { return this.bounds_.contains(marker.getPosition()); }; /** * Calculates the extended bounds of the cluster with the grid. */ Cluster.prototype.calculateBounds_ = function () { var bounds = new google.maps.LatLngBounds(this.center_, this.center_); this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds); }; /** * Updates the cluster icon. */ Cluster.prototype.updateIcon_ = function () { var mCount = this.markers_.length; var mz = this.markerClusterer_.getMaxZoom(); if (mz !== null && this.map_.getZoom() > mz) { this.clusterIcon_.hide(); return; } if (mCount < this.minClusterSize_) { // Min cluster size not yet reached. this.clusterIcon_.hide(); return; } var numStyles = this.markerClusterer_.getStyles().length; var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles); this.clusterIcon_.setCenter(this.center_); this.clusterIcon_.useStyle(sums); this.clusterIcon_.show(); }; /** * Determines if a marker has already been added to the cluster. * * @param {google.maps.Marker} marker The marker to check. * @return {boolean} True if the marker has already been added. */ Cluster.prototype.isMarkerAlreadyAdded_ = function (marker) { var i; if (this.markers_.indexOf) { return this.markers_.indexOf(marker) !== -1; } else { for (i = 0; i < this.markers_.length; i++) { if (marker === this.markers_[i]) { return true; } } } return false; }; /** * @name MarkerClustererOptions * @class This class represents the optional parameter passed to * the {@link MarkerClusterer} constructor. * @property {number} [gridSize=60] The grid size of a cluster in pixels. The grid is a square. * @property {number} [maxZoom=null] The maximum zoom level at which clustering is enabled or * <code>null</code> if clustering is to be enabled at all zoom levels. * @property {boolean} [zoomOnClick=true] Whether to zoom the map when a cluster marker is * clicked. You may want to set this to <code>false</code> if you have installed a handler * for the <code>click</code> event and it deals with zooming on its own. * @property {boolean} [averageCenter=false] Whether the position of a cluster marker should be * the average position of all markers in the cluster. If set to <code>false</code>, the * cluster marker is positioned at the location of the first marker added to the cluster. * @property {number} [minimumClusterSize=2] The minimum number of markers needed in a cluster * before the markers are hidden and a cluster marker appears. * @property {boolean} [ignoreHidden=false] Whether to ignore hidden markers in clusters. You * may want to set this to <code>true</code> to ensure that hidden markers are not included * in the marker count that appears on a cluster marker (this count is the value of the * <code>text</code> property of the result returned by the default <code>calculator</code>). * If set to <code>true</code> and you change the visibility of a marker being clustered, be * sure to also call <code>MarkerClusterer.repaint()</code>. * @property {string} [title=""] The tooltip to display when the mouse moves over a cluster * marker. (Alternatively, you can use a custom <code>calculator</code> function to specify a * different tooltip for each cluster marker.) * @property {function} [calculator=MarkerClusterer.CALCULATOR] The function used to determine * the text to be displayed on a cluster marker and the index indicating which style to use * for the cluster marker. The input parameters for the function are (1) the array of markers * represented by a cluster marker and (2) the number of cluster icon styles. It returns a * {@link ClusterIconInfo} object. The default <code>calculator</code> returns a * <code>text</code> property which is the number of markers in the cluster and an * <code>index</code> property which is one higher than the lowest integer such that * <code>10^i</code> exceeds the number of markers in the cluster, or the size of the styles * array, whichever is less. The <code>styles</code> array element used has an index of * <code>index</code> minus 1. For example, the default <code>calculator</code> returns a * <code>text</code> value of <code>"125"</code> and an <code>index</code> of <code>3</code> * for a cluster icon representing 125 markers so the element used in the <code>styles</code> * array is <code>2</code>. A <code>calculator</code> may also return a <code>title</code> * property that contains the text of the tooltip to be used for the cluster marker. If * <code>title</code> is not defined, the tooltip is set to the value of the <code>title</code> * property for the MarkerClusterer. * @property {string} [clusterClass="cluster"] The name of the CSS class defining general styles * for the cluster markers. Use this class to define CSS styles that are not set up by the code * that processes the <code>styles</code> array. * @property {Array} [styles] An array of {@link ClusterIconStyle} elements defining the styles * of the cluster markers to be used. The element to be used to style a given cluster marker * is determined by the function defined by the <code>calculator</code> property. * The default is an array of {@link ClusterIconStyle} elements whose properties are derived * from the values for <code>imagePath</code>, <code>imageExtension</code>, and * <code>imageSizes</code>. * @property {boolean} [enableRetinaIcons=false] Whether to allow the use of cluster icons that * have sizes that are some multiple (typically double) of their actual display size. Icons such * as these look better when viewed on high-resolution monitors such as Apple's Retina displays. * Note: if this property is <code>true</code>, sprites cannot be used as cluster icons. * @property {number} [batchSize=MarkerClusterer.BATCH_SIZE] Set this property to the * number of markers to be processed in a single batch when using a browser other than * Internet Explorer (for Internet Explorer, use the batchSizeIE property instead). * @property {number} [batchSizeIE=MarkerClusterer.BATCH_SIZE_IE] When Internet Explorer is * being used, markers are processed in several batches with a small delay inserted between * each batch in an attempt to avoid Javascript timeout errors. Set this property to the * number of markers to be processed in a single batch; select as high a number as you can * without causing a timeout error in the browser. This number might need to be as low as 100 * if 15,000 markers are being managed, for example. * @property {string} [imagePath=MarkerClusterer.IMAGE_PATH] * The full URL of the root name of the group of image files to use for cluster icons. * The complete file name is of the form <code>imagePath</code>n.<code>imageExtension</code> * where n is the image file number (1, 2, etc.). * @property {string} [imageExtension=MarkerClusterer.IMAGE_EXTENSION] * The extension name for the cluster icon image files (e.g., <code>"png"</code> or * <code>"jpg"</code>). * @property {Array} [imageSizes=MarkerClusterer.IMAGE_SIZES] * An array of numbers containing the widths of the group of * <code>imagePath</code>n.<code>imageExtension</code> image files. * (The images are assumed to be square.) */ /** * Creates a MarkerClusterer object with the options specified in {@link MarkerClustererOptions}. * @constructor * @extends google.maps.OverlayView * @param {google.maps.Map} map The Google map to attach to. * @param {Array.<google.maps.nggmap-marker>} [opt_markers] The markers to be added to the cluster. * @param {MarkerClustererOptions} [opt_options] The optional parameters. */ function MarkerClusterer(map, opt_markers, opt_options) { // MarkerClusterer implements google.maps.OverlayView interface. We use the // extend function to extend MarkerClusterer with google.maps.OverlayView // because it might not always be available when the code is defined so we // look for it at the last possible moment. If it doesn't exist now then // there is no point going ahead :) this.extend(MarkerClusterer, google.maps.OverlayView); opt_markers = opt_markers || []; opt_options = opt_options || {}; this.markers_ = []; this.clusters_ = []; this.listeners_ = []; this.activeMap_ = null; this.ready_ = false; this.gridSize_ = opt_options.gridSize || 60; this.minClusterSize_ = opt_options.minimumClusterSize || 2; this.maxZoom_ = opt_options.maxZoom || null; this.styles_ = opt_options.styles || []; this.title_ = opt_options.title || ""; this.zoomOnClick_ = true; if (opt_options.zoomOnClick !== undefined) { this.zoomOnClick_ = opt_options.zoomOnClick; } this.averageCenter_ = false; if (opt_options.averageCenter !== undefined) { this.averageCenter_ = opt_options.averageCenter; } this.ignoreHidden_ = false; if (opt_options.ignoreHidden !== undefined) { this.ignoreHidden_ = opt_options.ignoreHidden; } this.enableRetinaIcons_ = false; if (opt_options.enableRetinaIcons !== undefined) { this.enableRetinaIcons_ = opt_options.enableRetinaIcons; } this.imagePath_ = opt_options.imagePath || MarkerClusterer.IMAGE_PATH; this.imageExtension_ = opt_options.imageExtension || MarkerClusterer.IMAGE_EXTENSION; this.imageSizes_ = opt_options.imageSizes || MarkerClusterer.IMAGE_SIZES; this.calculator_ = opt_options.calculator || MarkerClusterer.CALCULATOR; this.batchSize_ = opt_options.batchSize || MarkerClusterer.BATCH_SIZE; this.batchSizeIE_ = opt_options.batchSizeIE || MarkerClusterer.BATCH_SIZE_IE; this.clusterClass_ = opt_options.clusterClass || "cluster"; if (navigator.userAgent.toLowerCase().indexOf("msie") !== -1) { // Try to avoid IE timeout when processing a huge number of markers: this.batchSize_ = this.batchSizeIE_; } this.setupStyles_(); this.addMarkers(opt_markers, true); this.setMap(map); // Note: this causes onAdd to be called } /** * Implementation of the onAdd interface method. * @ignore */ MarkerClusterer.prototype.onAdd = function () { var cMarkerClusterer = this; this.activeMap_ = this.getMap(); this.ready_ = true; this.repaint(); // Add the map event listeners this.listeners_ = [ google.maps.event.addListener(this.getMap(), "zoom_changed", function () { cMarkerClusterer.resetViewport_(false); // Workaround for this Google bug: when map is at level 0 and "-" of // zoom slider is clicked, a "zoom_changed" event is fired even though // the map doesn't zoom out any further. In this situation, no "idle" // event is triggered so the cluster markers that have been removed // do not get redrawn. Same goes for a zoom in at maxZoom. if (this.getZoom() === (this.get("minZoom") || 0) || this.getZoom() === this.get("maxZoom")) { google.maps.event.trigger(this, "idle"); } }), google.maps.event.addListener(this.getMap(), "idle", function () { cMarkerClusterer.redraw_(); }) ]; }; /** * Implementation of the onRemove interface method. * Removes map event listeners and all cluster icons from the DOM. * All managed markers are also put back on the map. * @ignore */ MarkerClusterer.prototype.onRemove = function () { var i; // Put all the managed markers back on the map: for (i = 0; i < this.markers_.length; i++) { if (this.markers_[i].getMap() !== this.activeMap_) { this.markers_[i].setMap(this.activeMap_); } } // Remove all clusters: for (i = 0; i < this.clusters_.length; i++) { this.clusters_[i].remove(); } this.clusters_ = []; // Remove map event listeners: for (i = 0; i < this.listeners_.length; i++) { google.maps.event.removeListener(this.listeners_[i]); } this.listeners_ = []; this.activeMap_ = null; this.ready_ = false; }; /** * Implementation of the draw interface method. * @ignore */ MarkerClusterer.prototype.draw = function () {}; /** * Sets up the styles object. */ MarkerClusterer.prototype.setupStyles_ = function () { var i, size; if (this.styles_.length > 0) { return; } for (i = 0; i < this.imageSizes_.length; i++) { size = this.imageSizes_[i]; this.styles_.push({ url: this.imagePath_ + (i + 1) + "." + this.imageExtension_, height: size, width: size }); } }; /** * Fits the map to the bounds of the markers managed by the clusterer. */ MarkerClusterer.prototype.fitMapToMarkers = function () { var i; var markers = this.getMarkers(); var bounds = new google.maps.LatLngBounds(); for (i = 0; i < markers.length; i++) { bounds.extend(markers[i].getPosition()); } this.getMap().fitBounds(bounds); }; /** * Returns the value of the <code>gridSize</code> property. * * @return {number} The grid size. */ MarkerClusterer.prototype.getGridSize = function () { return this.gridSize_; }; /** * Sets the value of the <code>gridSize</code> property. * * @param {number} gridSize The grid size. */ MarkerClusterer.prototype.setGridSize = function (gridSize) { this.gridSize_ = gridSize; }; /** * Returns the value of the <code>minimumClusterSize</code> property. * * @return {number} The minimum cluster size. */ MarkerClusterer.prototype.getMinimumClusterSize = function () { return this.minClusterSize_; }; /** * Sets the value of the <code>minimumClusterSize</code> property. * * @param {number} minimumClusterSize The minimum cluster size. */ MarkerClusterer.prototype.setMinimumClusterSize = function (minimumClusterSize) { this.minClusterSize_ = minimumClusterSize; }; /** * Returns the value of the <code>maxZoom</code> property. * * @return {number} The maximum zoom level. */ MarkerClusterer.prototype.getMaxZoom = function () { return this.maxZoom_; }; /** * Sets the value of the <code>maxZoom</code> property. * * @param {number} maxZoom The maximum zoom level. */ MarkerClusterer.prototype.setMaxZoom = function (maxZoom) { this.maxZoom_ = maxZoom; }; /** * Returns the value of the <code>styles</code> property. * * @return {Array} The array of styles defining the cluster markers to be used. */ MarkerClusterer.prototype.getStyles = function () { return this.styles_; }; /** * Sets the value of the <code>styles</code> property. * * @param {Array.<ClusterIconStyle>} styles The array of styles to use. */ MarkerClusterer.prototype.setStyles = function (styles) { this.styles_ = styles; }; /** * Returns the value of the <code>title</code> property. * * @return {string} The content of the title text. */ MarkerClusterer.prototype.getTitle = function () { return this.title_; }; /** * Sets the value of the <code>title</code> property. * * @param {string} title The value of the title property. */ MarkerClusterer.prototype.setTitle = function (title) { this.title_ = title; }; /** * Returns the value of the <code>zoomOnClick</code> property. * * @return {boolean} True if zoomOnClick property is set. */ MarkerClusterer.prototype.getZoomOnClick = function () { return this.zoomOnClick_; }; /** * Sets the value of the <code>zoomOnClick</code> property. * * @param {boolean} zoomOnClick The value of the zoomOnClick property. */ MarkerClusterer.prototype.setZoomOnClick = function (zoomOnClick) { this.zoomOnClick_ = zoomOnClick; }; /** * Returns the value of the <code>averageCenter</code> property. * * @return {boolean} True if averageCenter property is set. */ MarkerClusterer.prototype.getAverageCenter = function () { return this.averageCenter_; }; /** * Sets the value of the <code>averageCenter</code> property. * * @param {boolean} averageCenter The value of the averageCenter property. */ MarkerClusterer.prototype.setAverageCenter = function (averageCenter) { this.averageCenter_ = averageCenter; }; /** * Returns the value of the <code>ignoreHidden</code> property. * * @return {boolean} True if ignoreHidden property is set. */ MarkerClusterer.prototype.getIgnoreHidden = function () { return this.ignoreHidden_; }; /** * Sets the value of the <code>ignoreHidden</code> property. * * @param {boolean} ignoreHidden The value of the ignoreHidden property. */ MarkerClusterer.prototype.setIgnoreHidden = function (ignoreHidden) { this.ignoreHidden_ = ignoreHidden; }; /** * Returns the value of the <code>enableRetinaIcons</code> property. * * @return {boolean} True if enableRetinaIcons property is set. */ MarkerClusterer.prototype.getEnableRetinaIcons = function () { return this.enableRetinaIcons_; }; /** * Sets the value of the <code>enableRetinaIcons</code> property. * * @param {boolean} enableRetinaIcons The value of the enableRetinaIcons property. */ MarkerClusterer.prototype.setEnableRetinaIcons = function (enableRetinaIcons) { this.enableRetinaIcons_ = enableRetinaIcons; }; /** * Returns the value of the <code>imageExtension</code> property. * * @return {string} The value of the imageExtension property. */ MarkerClusterer.prototype.getImageExtension = function () { return this.imageExtension_; }; /** * Sets the value of the <code>imageExtension</code> property. * * @param {string} imageExtension The value of the imageExtension property. */ MarkerClusterer.prototype.setImageExtension = function (imageExtension) { this.imageExtension_ = imageExtension; }; /** * Returns the value of the <code>imagePath</code> property. * * @return {string} The value of the imagePath property. */ MarkerClusterer.prototype.getImagePath = function () { return this.imagePath_; }; /** * Sets the value of the <code>imagePath</code> property. * * @param {string} imagePath The value of the imagePath property. */ MarkerClusterer.prototype.setImagePath = function (imagePath) { this.imagePath_ = imagePath; }; /** * Returns the value of the <code>imageSizes</code> property. * * @return {Array} The value of the imageSizes property. */ MarkerClusterer.prototype.getImageSizes = function () { return this.imageSizes_; }; /** * Sets the value of the <code>imageSizes</code> property. * * @param {Array} imageSizes The value of the imageSizes property. */ MarkerClusterer.prototype.setImageSizes = function (imageSizes) { this.imageSizes_ = imageSizes; }; /** * Returns the value of the <code>calculator</code> property. * * @return {function} the value of the calculator property. */ MarkerClusterer.prototype.getCalculator = function () { return this.calculator_; }; /** * Sets the value of the <code>calculator</code> property. * * @param {function(Array.<google.maps.nggmap-marker>, number)} calculator The value * of the calculator property. */ MarkerClusterer.prototype.setCalculator = function (calculator) { this.calculator_ = calculator; }; /** * Returns the value of the <code>batchSizeIE</code> property. * * @return {number} the value of the batchSizeIE property. */ MarkerClusterer.prototype.getBatchSizeIE = function () { return this.batchSizeIE_; }; /** * Sets the value of the <code>batchSizeIE</code> property. * * @param {number} batchSizeIE The value of the batchSizeIE property. */ MarkerClusterer.prototype.setBatchSizeIE = function (batchSizeIE) { this.batchSizeIE_ = batchSizeIE; }; /** * Returns the value of the <code>clusterClass</code> property. * * @return {string} the value of the clusterClass property. */ MarkerClusterer.prototype.getClusterClass = function () { return this.clusterClass_; }; /** * Sets the value of the <code>clusterClass</code> property. * * @param {string} clusterClass The value of the clusterClass property. */ MarkerClusterer.prototype.setClusterClass = function (clusterClass) { this.clusterClass_ = clusterClass; }; /** * Returns the array of markers managed by the clusterer. * * @return {Array} The array of markers managed by the clusterer. */ MarkerClusterer.prototype.getMarkers = function () { return this.markers_; }; /** * Returns the number of markers managed by the clusterer. * * @return {number} The number of markers. */ MarkerClusterer.prototype.getTotalMarkers = function () { return this.markers_.length; }; /** * Returns the current array of clusters formed by the clusterer. * * @return {Array} The array of clusters formed by the clusterer. */ MarkerClusterer.prototype.getClusters = function () { return this.clusters_; }; /** * Returns the number of clusters formed by the clusterer. * * @return {number} The number of clusters formed by the clusterer. */ MarkerClusterer.prototype.getTotalClusters = function () { return this.clusters_.length; }; /** * Adds a marker to the clusterer. The clusters are redrawn unless * <code>opt_nodraw</code> is set to <code>true</code>. * * @param {google.maps.Marker} marker The marker to add. * @param {boolean} [opt_nodraw] Set to <code>true</code> to prevent redrawing. */ MarkerClusterer.prototype.addMarker = function (marker, opt_nodraw) { this.pushMarkerTo_(marker); if (!opt_nodraw) { this.redraw_(); } }; /** * Adds an array of markers to the clusterer. The clusters are redrawn unless * <code>opt_nodraw</code> is set to <code>true</code>. * * @param {Array.<google.maps.nggmap-marker>} markers The markers to add. * @param {boolean} [opt_nodraw] Set to <code>true</code> to prevent redrawing. */ MarkerClusterer.prototype.addMarkers = function (markers, opt_nodraw) { var key; for (key in markers) { if (markers.hasOwnProperty(key)) { this.pushMarkerTo_(markers[key]); } } if (!opt_nodraw) { this.redraw_(); } }; /** * Pushes a marker to the clusterer. * * @param {google.maps.Marker} marker The marker to add. */ MarkerClusterer.prototype.pushMarkerTo_ = function (marker) { // If the marker is draggable add a listener so we can update the clusters on the dragend: if (marker.getDraggable()) { var cMarkerClusterer = this; google.maps.event.addListener(marker, "dragend", function () { if (cMarkerClusterer.ready_) { this.isAdded = false; cMarkerClusterer.repaint(); } }); } marker.isAdded = false; this.markers_.push(marker); }; /** * Removes a marker from the cluster. The clusters are redrawn unless * <code>opt_nodraw</code> is set to <code>true</code>. Returns <code>true</code> if the * marker was removed from the clusterer. * * @param {google.maps.Marker} marker The marker to remove. * @param {boolean} [opt_nodraw] Set to <code>true</code> to prevent redrawing. * @return {boolean} True if the marker was removed from the clusterer. */ MarkerClusterer.prototype.removeMarker = function (marker, opt_nodraw) { var removed = this.removeMarker_(marker); if (!opt_nodraw && removed) { this.repaint(); } return removed; }; /** * Removes an array of markers from the cluster. The clusters are redrawn unless * <code>opt_nodraw</code> is set to <code>true</code>. Returns <code>true</code> if markers * were removed from the clusterer. * * @param {Array.<google.maps.nggmap-marker>} markers The markers to remove. * @param {boolean} [opt_nodraw] Set to <code>true</code> to prevent redrawing. * @return {boolean} True if markers were removed from the clusterer. */ MarkerClusterer.prototype.removeMarkers = function (markers, opt_nodraw) { var i, r; var removed = false; for (i = 0; i < markers.length; i++) { r = this.removeMarker_(markers[i]); removed = removed || r; } if (!opt_nodraw && removed) { this.repaint(); } return removed; }; /** * Removes a marker and returns true if removed, false if not. * * @param {google.maps.Marker} marker The marker to remove * @return {boolean} Whether the marker was removed or not */ MarkerClusterer.prototype.removeMarker_ = function (marker) { var i; var index = -1; if (this.markers_.indexOf) { index = this.markers_.indexOf(marker); } else { for (i = 0; i < this.markers_.length; i++) { if (marker === this.markers_[i]) { index = i; break; } } } if (index === -1) { // Marker is not in our list of markers, so do nothing: return false; } marker.setMap(null); this.markers_.splice(index, 1); // Remove the marker from the list of managed markers return true; }; /** * Removes all clusters and markers from the map and also removes all markers * managed by the clusterer. */ MarkerClusterer.prototype.clearMarkers = function () { this.resetViewport_(true); this.markers_ = []; }; /** * Recalculates and redraws all the marker clusters from scratch. * Call this after changing any properties. */ MarkerClusterer.prototype.repaint = function () { var oldClusters = this.clusters_.slice(); this.clusters_ = []; this.resetViewport_(false); this.redraw_(); // Remove the old clusters. // Do it in a timeout to prevent blinking effect. setTimeout(function () { var i; for (i = 0; i < oldClusters.length; i++) { oldClusters[i].remove(); } }, 0); }; /** * Returns the current bounds extended by the grid size. * * @param {google.maps.LatLngBounds} bounds The bounds to extend. * @return {google.maps.LatLngBounds} The extended bounds. * @ignore */ MarkerClusterer.prototype.getExtendedBounds = function (bounds) { var projection = this.getProjection(); // Turn the bounds into latlng. var tr = new google.maps.LatLng(bounds.getNorthEast().lat(), bounds.getNorthEast().lng()); var bl = new google.maps.LatLng(bounds.getSouthWest().lat(), bounds.getSouthWest().lng()); // Convert the points to pixels and the extend out by the grid size. var trPix = projection.fromLatLngToDivPixel(tr); trPix.x += this.gridSize_; trPix.y -= this.gridSize_; var blPix = projection.fromLatLngToDivPixel(bl); blPix.x -= this.gridSize_; blPix.y += this.gridSize_; // Convert the pixel points back to LatLng var ne = projection.fromDivPixelToLatLng(trPix); var sw = projection.fromDivPixelToLatLng(blPix); // Extend the bounds to contain the new bounds. bounds.extend(ne); bounds.extend(sw); return bounds; }; /** * Redraws all the clusters. */ MarkerClusterer.prototype.redraw_ = function () { this.createClusters_(0); }; /** * Removes all clusters from the map. The markers are also removed from the map * if <code>opt_hide</code> is set to <code>true</code>. * * @param {boolean} [opt_hide] Set to <code>true</code> to also remove the markers * from the map. */ MarkerClusterer.prototype.resetViewport_ = function (opt_hide) { var i, marker; // Remove all the clusters for (i = 0; i < this.clusters_.length; i++) { this.clusters_[i].remove(); } this.clusters_ = []; // Reset the markers to not be added and to be removed from the map. for (i = 0; i < this.markers_.length; i++) { marker = this.markers_[i]; marker.isAdded = false; if (opt_hide) { marker.setMap(null); } } }; /** * Calculates the distance between two latlng locations in km. * * @param {google.maps.LatLng} p1 The first lat lng point. * @param {google.maps.LatLng} p2 The second lat lng point. * @return {number} The distance between the two points in km. * @see http://www.movable-type.co.uk/scripts/latlong.html */ MarkerClusterer.prototype.distanceBetweenPoints_ = function (p1, p2) { var R = 6371; // Radius of the Earth in km var dLat = (p2.lat() - p1.lat()) * Math.PI / 180; var dLon = (p2.lng() - p1.lng()) * Math.PI / 180; var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) * Math.sin(dLon / 2) * Math.sin(dLon / 2); var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); var d = R * c; return d; }; /** * Determines if a marker is contained in a bounds. * * @param {google.maps.Marker} marker The marker to check. * @param {google.maps.LatLngBounds} bounds The bounds to check against. * @return {boolean} True if the marker is in the bounds. */ MarkerClusterer.prototype.isMarkerInBounds_ = function (marker, bounds) { return bounds.contains(marker.getPosition()); }; /** * Adds a marker to a cluster, or creates a new cluster. * * @param {google.maps.Marker} marker The marker to add. */ MarkerClusterer.prototype.addToClosestCluster_ = function (marker) { var i, d, cluster, center; var distance = 40000; // Some large number var clusterToAddTo = null; for (i = 0; i < this.clusters_.length; i++) { cluster = this.clusters_[i]; center = cluster.getCenter(); if (center) { d = this.distanceBetweenPoints_(center, marker.getPosition()); if (d < distance) { distance = d; clusterToAddTo = cluster; } } } if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) { clusterToAddTo.addMarker(marker); } else { cluster = new Cluster(this); cluster.addMarker(marker); this.clusters_.push(cluster); } }; /** * Creates the clusters. This is done in batches to avoid timeout errors * in some browsers when there is a huge number of markers. * * @param {number} iFirst The index of the first marker in the batch of * markers to be added to clusters. */ MarkerClusterer.prototype.createClusters_ = function (iFirst) { var i, marker; var mapBounds; var cMarkerClusterer = this; if (!this.ready_) { return; } // Cancel previous batch processing if we're working on the first batch: if (iFirst === 0) { /** * This event is fired when the <code>MarkerClusterer</code> begins * clustering markers. * @name MarkerClusterer#clusteringbegin * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. * @event */ google.maps.event.trigger(this, "clusteringbegin", this); if (typeof this.timerRefStatic !== "undefined") { clearTimeout(this.timerRefStatic); delete this.timerRefStatic; } } // Get our current map view bounds. // Create a new bounds object so we don't affect the map. // // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug: if (this.getMap().getZoom() > 3) { mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(), this.getMap().getBounds().getNorthEast()); } else { mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625)); } var bounds = this.getExtendedBounds(mapBounds); var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length); for (i = iFirst; i < iLast; i++) { marker = this.markers_[i]; if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) { if (!this.ignoreHidden_ || (this.ignoreHidden_ && marker.getVisible())) { this.addToClosestCluster_(marker); } } } if (iLast < this.markers_.length) { this.timerRefStatic = setTimeout(function () { cMarkerClusterer.createClusters_(iLast); }, 0); } else { delete this.timerRefStatic; /** * This event is fired when the <code>MarkerClusterer</code> stops * clustering markers. * @name MarkerClusterer#clusteringend * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. * @event */ google.maps.event.trigger(this, "clusteringend", this); } }; /** * Extends an object's prototype by another's. * * @param {Object} obj1 The object to be extended. * @param {Object} obj2 The object to extend with. * @return {Object} The new extended object. * @ignore */ MarkerClusterer.prototype.extend = function (obj1, obj2) { return (function (object) { var property; for (property in object.prototype) { this.prototype[property] = object.prototype[property]; } return this; }).apply(obj1, [obj2]); }; /** * The default function for determining the label text and style * for a cluster icon. * * @param {Array.<google.maps.nggmap-marker>} markers The array of markers represented by the cluster. * @param {number} numStyles The number of marker styles available. * @return {ClusterIconInfo} The information resource for the cluster. * @constant * @ignore */ MarkerClusterer.CALCULATOR = function (markers, numStyles) { var index = 0; var title = ""; var count = markers.length.toString(); var dv = count; while (dv !== 0) { dv = parseInt(dv / 10, 10); index++; } index = Math.min(index, numStyles); return { text: count, index: index, title: title }; }; /** * The number of markers to process in one batch. * * @type {number} * @constant */ MarkerClusterer.BATCH_SIZE = 2000; /** * The number of markers to process in one batch (IE only). * * @type {number} * @constant */ MarkerClusterer.BATCH_SIZE_IE = 500; /** * The default root name for the marker cluster images. * * @type {string} * @constant */ MarkerClusterer.IMAGE_PATH = "http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m"; /** * The default extension name for the marker cluster images. * * @type {string} * @constant */ MarkerClusterer.IMAGE_EXTENSION = "png"; /** * The default array of sizes for the marker cluster images. * * @type {Array.<number>} * @constant */ MarkerClusterer.IMAGE_SIZES = [53, 56, 66, 78, 90]; if (typeof String.prototype.trim !== 'function') { /** * IE hack since trim() doesn't exist in all browsers * @return {string} The string with removed whitespace */ String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); } } ;/** * 1.1.9-patched * @name MarkerWithLabel for V3 * @version 1.1.8 [February 26, 2013] * @author Gary Little (inspired by code from Marc Ridey of Google). * @copyright Copyright 2012 Gary Little [gary at luxcentral.com] * @fileoverview MarkerWithLabel extends the Google Maps JavaScript API V3 * <code>google.maps.Marker</code> class. * <p> * MarkerWithLabel allows you to define markers with associated labels. As you would expect, * if the marker is draggable, so too will be the label. In addition, a marker with a label * responds to all mouse events in the same manner as a regular marker. It also fires mouse * events and "property changed" events just as a regular marker would. Version 1.1 adds * support for the raiseOnDrag feature introduced in API V3.3. * <p> * If you drag a marker by its label, you can cancel the drag and return the marker to its * original position by pressing the <code>Esc</code> key. This doesn't work if you drag the marker * itself because this feature is not (yet) supported in the <code>google.maps.Marker</code> class. */ /*! * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /*jslint browser:true */ /*global document,google */ /** * @param {Function} childCtor Child class. * @param {Function} parentCtor Parent class. */ function inherits(childCtor, parentCtor) { /** @constructor */ function tempCtor() {} tempCtor.prototype = parentCtor.prototype; childCtor.superClass_ = parentCtor.prototype; childCtor.prototype = new tempCtor(); /** @override */ childCtor.prototype.constructor = childCtor; } /** * This constructor creates a label and associates it with a marker. * It is for the private use of the MarkerWithLabel class. * @constructor * @param {Marker} marker The marker with which the label is to be associated. * @param {string} crossURL The URL of the cross image =. * @param {string} handCursor The URL of the hand cursor. * @private */ function MarkerLabel_(marker, crossURL, handCursorURL) { this.marker_ = marker; this.handCursorURL_ = marker.handCursorURL; this.labelDiv_ = document.createElement("div"); this.labelDiv_.style.cssText = "position: absolute; overflow: hidden;"; // Set up the DIV for handling mouse events in the label. This DIV forms a transparent veil // in the "overlayMouseTarget" pane, a veil that covers just the label. This is done so that // events can be captured even if the label is in the shadow of a google.maps.InfoWindow. // Code is included here to ensure the veil is always exactly the same size as the label. this.eventDiv_ = document.createElement("div"); this.eventDiv_.style.cssText = this.labelDiv_.style.cssText; // This is needed for proper behavior on MSIE: this.eventDiv_.setAttribute("onselectstart", "return false;"); this.eventDiv_.setAttribute("ondragstart", "return false;"); // Get the DIV for the "X" to be displayed when the marker is raised. this.crossDiv_ = MarkerLabel_.getSharedCross(crossURL); } inherits(MarkerLabel_, google.maps.OverlayView); /** * Returns the DIV for the cross used when dragging a marker when the * raiseOnDrag parameter set to true. One cross is shared with all markers. * @param {string} crossURL The URL of the cross image =. * @private */ MarkerLabel_.getSharedCross = function (crossURL) { var div; if (typeof MarkerLabel_.getSharedCross.crossDiv === "undefined") { div = document.createElement("img"); div.style.cssText = "position: absolute; z-index: 1000002; display: none;"; // Hopefully Google never changes the standard "X" attributes: div.style.marginLeft = "-8px"; div.style.marginTop = "-9px"; div.src = crossURL; MarkerLabel_.getSharedCross.crossDiv = div; } return MarkerLabel_.getSharedCross.crossDiv; }; /** * Adds the DIV representing the label to the DOM. This method is called * automatically when the marker's <code>setMap</code> method is called. * @private */ MarkerLabel_.prototype.onAdd = function () { var me = this; var cMouseIsDown = false; var cDraggingLabel = false; var cSavedZIndex; var cLatOffset, cLngOffset; var cIgnoreClick; var cRaiseEnabled; var cStartPosition; var cStartCenter; // Constants: var cRaiseOffset = 20; var cDraggingCursor = "url(" + this.handCursorURL_ + ")"; // Stops all processing of an event. // var cAbortEvent = function (e) { if (e.preventDefault) { e.preventDefault(); } e.cancelBubble = true; if (e.stopPropagation) { e.stopPropagation(); } }; var cStopBounce = function () { me.marker_.setAnimation(null); }; this.getPanes().overlayImage.appendChild(this.labelDiv_); this.getPanes().overlayMouseTarget.appendChild(this.eventDiv_); // One cross is shared with all markers, so only add it once: if (typeof MarkerLabel_.getSharedCross.processed === "undefined") { this.getPanes().overlayImage.appendChild(this.crossDiv_); MarkerLabel_.getSharedCross.processed = true; } this.listeners_ = [ google.maps.event.addDomListener(this.eventDiv_, "mouseover", function (e) { if (me.marker_.getDraggable() || me.marker_.getClickable()) { this.style.cursor = "pointer"; google.maps.event.trigger(me.marker_, "mouseover", e); } }), google.maps.event.addDomListener(this.eventDiv_, "mouseout", function (e) { if ((me.marker_.getDraggable() || me.marker_.getClickable()) && !cDraggingLabel) { this.style.cursor = me.marker_.getCursor(); google.maps.event.trigger(me.marker_, "mouseout", e); } }), google.maps.event.addDomListener(this.eventDiv_, "mousedown", function (e) { cDraggingLabel = false; if (me.marker_.getDraggable()) { cMouseIsDown = true; this.style.cursor = cDraggingCursor; } if (me.marker_.getDraggable() || me.marker_.getClickable()) { google.maps.event.trigger(me.marker_, "mousedown", e); cAbortEvent(e); // Prevent map pan when starting a drag on a label } }), google.maps.event.addDomListener(document, "mouseup", function (mEvent) { var position; if (cMouseIsDown) { cMouseIsDown = false; me.eventDiv_.style.cursor = "pointer"; google.maps.event.trigger(me.marker_, "mouseup", mEvent); } if (cDraggingLabel) { if (cRaiseEnabled) { // Lower the marker & label position = me.getProjection().fromLatLngToDivPixel(me.marker_.getPosition()); position.y += cRaiseOffset; me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position)); // This is not the same bouncing style as when the marker portion is dragged, // but it will have to do: try { // Will fail if running Google Maps API earlier than V3.3 me.marker_.setAnimation(google.maps.Animation.BOUNCE); setTimeout(cStopBounce, 1406); } catch (e) {} } me.crossDiv_.style.display = "none"; me.marker_.setZIndex(cSavedZIndex); cIgnoreClick = true; // Set flag to ignore the click event reported after a label drag cDraggingLabel = false; mEvent.latLng = me.marker_.getPosition(); google.maps.event.trigger(me.marker_, "dragend", mEvent); } }), google.maps.event.addListener(me.marker_.getMap(), "mousemove", function (mEvent) { var position; if (cMouseIsDown) { if (cDraggingLabel) { // Change the reported location from the mouse position to the marker position: mEvent.latLng = new google.maps.LatLng(mEvent.latLng.lat() - cLatOffset, mEvent.latLng.lng() - cLngOffset); position = me.getProjection().fromLatLngToDivPixel(mEvent.latLng); if (cRaiseEnabled) { me.crossDiv_.style.left = position.x + "px"; me.crossDiv_.style.top = position.y + "px"; me.crossDiv_.style.display = ""; position.y -= cRaiseOffset; } me.marker_.setPosition(me.getProjection().fromDivPixelToLatLng(position)); if (cRaiseEnabled) { // Don't raise the veil; this hack needed to make MSIE act properly me.eventDiv_.style.top = (position.y + cRaiseOffset) + "px"; } google.maps.event.trigger(me.marker_, "drag", mEvent); } else { // Calculate offsets from the click point to the marker position: cLatOffset = mEvent.latLng.lat() - me.marker_.getPosition().lat(); cLngOffset = mEvent.latLng.lng() - me.marker_.getPosition().lng(); cSavedZIndex = me.marker_.getZIndex(); cStartPosition = me.marker_.getPosition(); cStartCenter = me.marker_.getMap().getCenter(); cRaiseEnabled = me.marker_.get("raiseOnDrag"); cDraggingLabel = true; me.marker_.setZIndex(1000000); // Moves the marker & label to the foreground during a drag mEvent.latLng = me.marker_.getPosition(); google.maps.event.trigger(me.marker_, "dragstart", mEvent); } } }), google.maps.event.addDomListener(document, "keydown", function (e) { if (cDraggingLabel) { if (e.keyCode === 27) { // Esc key cRaiseEnabled = false; me.marker_.setPosition(cStartPosition); me.marker_.getMap().setCenter(cStartCenter); google.maps.event.trigger(document, "mouseup", e); } } }), google.maps.event.addDomListener(this.eventDiv_, "click", function (e) { if (me.marker_.getDraggable() || me.marker_.getClickable()) { if (cIgnoreClick) { // Ignore the click reported when a label drag ends cIgnoreClick = false; } else { google.maps.event.trigger(me.marker_, "click", e); cAbortEvent(e); // Prevent click from being passed on to map } } }), google.maps.event.addDomListener(this.eventDiv_, "dblclick", function (e) { if (me.marker_.getDraggable() || me.marker_.getClickable()) { google.maps.event.trigger(me.marker_, "dblclick", e); cAbortEvent(e); // Prevent map zoom when double-clicking on a label } }), google.maps.event.addListener(this.marker_, "dragstart", function (mEvent) { if (!cDraggingLabel) { cRaiseEnabled = this.get("raiseOnDrag"); } }), google.maps.event.addListener(this.marker_, "drag", function (mEvent) { if (!cDraggingLabel) { if (cRaiseEnabled) { me.setPosition(cRaiseOffset); // During a drag, the marker's z-index is temporarily set to 1000000 to // ensure it appears above all other markers. Also set the label's z-index // to 1000000 (plus or minus 1 depending on whether the label is supposed // to be above or below the marker). me.labelDiv_.style.zIndex = 1000000 + (this.get("labelInBackground") ? -1 : +1); } } }), google.maps.event.addListener(this.marker_, "dragend", function (mEvent) { if (!cDraggingLabel) { if (cRaiseEnabled) { me.setPosition(0); // Also restores z-index of label } } }), google.maps.event.addListener(this.marker_, "position_changed", function () { me.setPosition(); }), google.maps.event.addListener(this.marker_, "zindex_changed", function () { me.setZIndex(); }), google.maps.event.addListener(this.marker_, "visible_changed", function () { me.setVisible(); }), google.maps.event.addListener(this.marker_, "labelvisible_changed", function () { me.setVisible(); }), google.maps.event.addListener(this.marker_, "title_changed", function () { me.setTitle(); }), google.maps.event.addListener(this.marker_, "labelcontent_changed", function () { me.setContent(); }), google.maps.event.addListener(this.marker_, "labelanchor_changed", function () { me.setAnchor(); }), google.maps.event.addListener(this.marker_, "labelclass_changed", function () { me.setStyles(); }), google.maps.event.addListener(this.marker_, "labelstyle_changed", function () { me.setStyles(); }) ]; }; /** * Removes the DIV for the label from the DOM. It also removes all event handlers. * This method is called automatically when the marker's <code>setMap(null)</code> * method is called. * @private */ MarkerLabel_.prototype.onRemove = function () { var i; if (this.labelDiv_.parentNode !== null) this.labelDiv_.parentNode.removeChild(this.labelDiv_); if (this.eventDiv_.parentNode !== null) this.eventDiv_.parentNode.removeChild(this.eventDiv_); // Remove event listeners: for (i = 0; i < this.listeners_.length; i++) { google.maps.event.removeListener(this.listeners_[i]); } }; /** * Draws the label on the map. * @private */ MarkerLabel_.prototype.draw = function () { this.setContent(); this.setTitle(); this.setStyles(); }; /** * Sets the content of the label. * The content can be plain text or an HTML DOM node. * @private */ MarkerLabel_.prototype.setContent = function () { var content = this.marker_.get("labelContent"); if (typeof content.nodeType === "undefined") { this.labelDiv_.innerHTML = content; this.eventDiv_.innerHTML = this.labelDiv_.innerHTML; } else { this.labelDiv_.innerHTML = ""; // Remove current content this.labelDiv_.appendChild(content); content = content.cloneNode(true); this.eventDiv_.appendChild(content); } }; /** * Sets the content of the tool tip for the label. It is * always set to be the same as for the marker itself. * @private */ MarkerLabel_.prototype.setTitle = function () { this.eventDiv_.title = this.marker_.getTitle() || ""; }; /** * Sets the style of the label by setting the style sheet and applying * other specific styles requested. * @private */ MarkerLabel_.prototype.setStyles = function () { var i, labelStyle; // Apply style values from the style sheet defined in the labelClass parameter: this.labelDiv_.className = this.marker_.get("labelClass"); this.eventDiv_.className = this.labelDiv_.className; // Clear existing inline style values: this.labelDiv_.style.cssText = ""; this.eventDiv_.style.cssText = ""; // Apply style values defined in the labelStyle parameter: labelStyle = this.marker_.get("labelStyle"); for (i in labelStyle) { if (labelStyle.hasOwnProperty(i)) { this.labelDiv_.style[i] = labelStyle[i]; this.eventDiv_.style[i] = labelStyle[i]; } } this.setMandatoryStyles(); }; /** * Sets the mandatory styles to the DIV representing the label as well as to the * associated event DIV. This includes setting the DIV position, z-index, and visibility. * @private */ MarkerLabel_.prototype.setMandatoryStyles = function () { this.labelDiv_.style.position = "absolute"; this.labelDiv_.style.overflow = "hidden"; // Make sure the opacity setting causes the desired effect on MSIE: if (typeof this.labelDiv_.style.opacity !== "undefined" && this.labelDiv_.style.opacity !== "") { this.labelDiv_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(opacity=" + (this.labelDiv_.style.opacity * 100) + ")\""; this.labelDiv_.style.filter = "alpha(opacity=" + (this.labelDiv_.style.opacity * 100) + ")"; } this.eventDiv_.style.position = this.labelDiv_.style.position; this.eventDiv_.style.overflow = this.labelDiv_.style.overflow; this.eventDiv_.style.opacity = 0.01; // Don't use 0; DIV won't be clickable on MSIE this.eventDiv_.style.MsFilter = "\"progid:DXImageTransform.Microsoft.Alpha(opacity=1)\""; this.eventDiv_.style.filter = "alpha(opacity=1)"; // For MSIE this.setAnchor(); this.setPosition(); // This also updates z-index, if necessary. this.setVisible(); }; /** * Sets the anchor point of the label. * @private */ MarkerLabel_.prototype.setAnchor = function () { var anchor = this.marker_.get("labelAnchor"); this.labelDiv_.style.marginLeft = -anchor.x + "px"; this.labelDiv_.style.marginTop = -anchor.y + "px"; this.eventDiv_.style.marginLeft = -anchor.x + "px"; this.eventDiv_.style.marginTop = -anchor.y + "px"; }; /** * Sets the position of the label. The z-index is also updated, if necessary. * @private */ MarkerLabel_.prototype.setPosition = function (yOffset) { var position = this.getProjection().fromLatLngToDivPixel(this.marker_.getPosition()); if (typeof yOffset === "undefined") { yOffset = 0; } this.labelDiv_.style.left = Math.round(position.x) + "px"; this.labelDiv_.style.top = Math.round(position.y - yOffset) + "px"; this.eventDiv_.style.left = this.labelDiv_.style.left; this.eventDiv_.style.top = this.labelDiv_.style.top; this.setZIndex(); }; /** * Sets the z-index of the label. If the marker's z-index property has not been defined, the z-index * of the label is set to the vertical coordinate of the label. This is in keeping with the default * stacking order for Google Maps: markers to the south are in front of markers to the north. * @private */ MarkerLabel_.prototype.setZIndex = function () { var zAdjust = (this.marker_.get("labelInBackground") ? -1 : +1); if (typeof this.marker_.getZIndex() === "undefined") { this.labelDiv_.style.zIndex = parseInt(this.labelDiv_.style.top, 10) + zAdjust; this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex; } else { this.labelDiv_.style.zIndex = this.marker_.getZIndex() + zAdjust; this.eventDiv_.style.zIndex = this.labelDiv_.style.zIndex; } }; /** * Sets the visibility of the label. The label is visible only if the marker itself is * visible (i.e., its visible property is true) and the labelVisible property is true. * @private */ MarkerLabel_.prototype.setVisible = function () { if (this.marker_.get("labelVisible")) { this.labelDiv_.style.display = this.marker_.getVisible() ? "block" : "none"; } else { this.labelDiv_.style.display = "none"; } this.eventDiv_.style.display = this.labelDiv_.style.display; }; /** * @name MarkerWithLabelOptions * @class This class represents the optional parameter passed to the {@link MarkerWithLabel} constructor. * The properties available are the same as for <code>google.maps.Marker</code> with the addition * of the properties listed below. To change any of these additional properties after the labeled * marker has been created, call <code>google.maps.Marker.set(propertyName, propertyValue)</code>. * <p> * When any of these properties changes, a property changed event is fired. The names of these * events are derived from the name of the property and are of the form <code>propertyname_changed</code>. * For example, if the content of the label changes, a <code>labelcontent_changed</code> event * is fired. * <p> * @property {string|Node} [labelContent] The content of the label (plain text or an HTML DOM node). * @property {Point} [labelAnchor] By default, a label is drawn with its anchor point at (0,0) so * that its top left corner is positioned at the anchor point of the associated marker. Use this * property to change the anchor point of the label. For example, to center a 50px-wide label * beneath a marker, specify a <code>labelAnchor</code> of <code>google.maps.Point(25, 0)</code>. * (Note: x-values increase to the right and y-values increase to the top.) * @property {string} [labelClass] The name of the CSS class defining the styles for the label. * Note that style values for <code>position</code>, <code>overflow</code>, <code>top</code>, * <code>left</code>, <code>zIndex</code>, <code>display</code>, <code>marginLeft</code>, and * <code>marginTop</code> are ignored; these styles are for internal use only. * @property {Object} [labelStyle] An object literal whose properties define specific CSS * style values to be applied to the label. Style values defined here override those that may * be defined in the <code>labelClass</code> style sheet. If this property is changed after the * label has been created, all previously set styles (except those defined in the style sheet) * are removed from the label before the new style values are applied. * Note that style values for <code>position</code>, <code>overflow</code>, <code>top</code>, * <code>left</code>, <code>zIndex</code>, <code>display</code>, <code>marginLeft</code>, and * <code>marginTop</code> are ignored; these styles are for internal use only. * @property {boolean} [labelInBackground] A flag indicating whether a label that overlaps its * associated marker should appear in the background (i.e., in a plane below the marker). * The default is <code>false</code>, which causes the label to appear in the foreground. * @property {boolean} [labelVisible] A flag indicating whether the label is to be visible. * The default is <code>true</code>. Note that even if <code>labelVisible</code> is * <code>true</code>, the label will <i>not</i> be visible unless the associated marker is also * visible (i.e., unless the marker's <code>visible</code> property is <code>true</code>). * @property {boolean} [raiseOnDrag] A flag indicating whether the label and marker are to be * raised when the marker is dragged. The default is <code>true</code>. If a draggable marker is * being created and a version of Google Maps API earlier than V3.3 is being used, this property * must be set to <code>false</code>. * @property {boolean} [optimized] A flag indicating whether rendering is to be optimized for the * marker. <b>Important: The optimized rendering technique is not supported by MarkerWithLabel, * so the value of this parameter is always forced to <code>false</code>. * @property {string} [crossImage="http://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png"] * The URL of the cross image to be displayed while dragging a marker. * @property {string} [handCursor="http://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur"] * The URL of the cursor to be displayed while dragging a marker. */ /** * Creates a MarkerWithLabel with the options specified in {@link MarkerWithLabelOptions}. * @constructor * @param {MarkerWithLabelOptions} [opt_options] The optional parameters. */ function MarkerWithLabel(opt_options) { opt_options = opt_options || {}; opt_options.labelContent = opt_options.labelContent || ""; opt_options.labelAnchor = opt_options.labelAnchor || new google.maps.Point(0, 0); opt_options.labelClass = opt_options.labelClass || "markerLabels"; opt_options.labelStyle = opt_options.labelStyle || {}; opt_options.labelInBackground = opt_options.labelInBackground || false; if (typeof opt_options.labelVisible === "undefined") { opt_options.labelVisible = true; } if (typeof opt_options.raiseOnDrag === "undefined") { opt_options.raiseOnDrag = true; } if (typeof opt_options.clickable === "undefined") { opt_options.clickable = true; } if (typeof opt_options.draggable === "undefined") { opt_options.draggable = false; } if (typeof opt_options.optimized === "undefined") { opt_options.optimized = false; } opt_options.crossImage = opt_options.crossImage || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png"; opt_options.handCursor = opt_options.handCursor || "http" + (document.location.protocol === "https:" ? "s" : "") + "://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur"; opt_options.optimized = false; // Optimized rendering is not supported this.label = new MarkerLabel_(this, opt_options.crossImage, opt_options.handCursor); // Bind the label to the marker // Call the parent constructor. It calls Marker.setValues to initialize, so all // the new parameters are conveniently saved and can be accessed with get/set. // Marker.set triggers a property changed event (called "propertyname_changed") // that the marker label listens for in order to react to state changes. google.maps.Marker.apply(this, arguments); } inherits(MarkerWithLabel, google.maps.Marker); /** * Overrides the standard Marker setMap function. * @param {Map} theMap The map to which the marker is to be added. * @private */ MarkerWithLabel.prototype.setMap = function (theMap) { // Call the inherited function... google.maps.Marker.prototype.setMap.apply(this, arguments); // ... then deal with the label: this.label.setMap(theMap); }; //END REPLACE window.InfoBox = InfoBox; window.Cluster = Cluster; window.ClusterIcon = ClusterIcon; window.MarkerClusterer = MarkerClusterer; window.MarkerLabel_ = MarkerLabel_; window.MarkerWithLabel = MarkerWithLabel; }) }; });;/** * Performance overrides on MarkerClusterer custom to Angular Google Maps * * Created by Petr Bruna ccg1415 and Nick McCready on 7/13/14. */ angular.module('google-maps.extensions'.ns()).service('ExtendMarkerClusterer'.ns(), function () { return { init: _.once(function () { (function () { var __hasProp = {}.hasOwnProperty, __extends = function (child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; window.NgMapCluster = (function (_super) { __extends(NgMapCluster, _super); function NgMapCluster(opts) { NgMapCluster.__super__.constructor.call(this, opts); this.markers_ = new window.PropMap(); } /** * Adds a marker to the cluster. * * @param {google.maps.Marker} marker The marker to be added. * @return {boolean} True if the marker was added. * @ignore */ NgMapCluster.prototype.addMarker = function (marker) { var i; var mCount; var mz; if (this.isMarkerAlreadyAdded_(marker)) { var oldMarker = this.markers_.get(marker.key); if (oldMarker.getPosition().lat() == marker.getPosition().lat() && oldMarker.getPosition().lon() == marker.getPosition().lon()) //if nothing has changed return false; } if (!this.center_) { this.center_ = marker.getPosition(); this.calculateBounds_(); } else { if (this.averageCenter_) { var l = this.markers_.length + 1; var lat = (this.center_.lat() * (l - 1) + marker.getPosition().lat()) / l; var lng = (this.center_.lng() * (l - 1) + marker.getPosition().lng()) / l; this.center_ = new google.maps.LatLng(lat, lng); this.calculateBounds_(); } } marker.isAdded = true; this.markers_.push(marker); mCount = this.markers_.length; mz = this.markerClusterer_.getMaxZoom(); if (mz !== null && this.map_.getZoom() > mz) { // Zoomed in past max zoom, so show the marker. if (marker.getMap() !== this.map_) { marker.setMap(this.map_); } } else if (mCount < this.minClusterSize_) { // Min cluster size not reached so show the marker. if (marker.getMap() !== this.map_) { marker.setMap(this.map_); } } else if (mCount === this.minClusterSize_) { // Hide the markers that were showing. this.markers_.values().forEach(function (m) { m.setMap(null); }); } else { marker.setMap(null); } // this.updateIcon_(); return true; }; /** * Determines if a marker has already been added to the cluster. * * @param {google.maps.Marker} marker The marker to check. * @return {boolean} True if the marker has already been added. */ NgMapCluster.prototype.isMarkerAlreadyAdded_ = function (marker) { return _.isNullOrUndefined(this.markers_.get(marker.key)); }; /** * Returns the bounds of the cluster. * * @return {google.maps.LatLngBounds} the cluster bounds. * @ignore */ NgMapCluster.prototype.getBounds = function () { var i; var bounds = new google.maps.LatLngBounds(this.center_, this.center_); var markers = this.getMarkers().values(); for (i = 0; i < markers.length; i++) { bounds.extend(markers[i].getPosition()); } return bounds; }; /** * Removes the cluster from the map. * * @ignore */ NgMapCluster.prototype.remove = function () { this.clusterIcon_.setMap(null); this.markers_ = new PropMap(); delete this.markers_; }; return NgMapCluster; })(Cluster); window.NgMapMarkerClusterer = (function (_super) { __extends(NgMapMarkerClusterer, _super); function NgMapMarkerClusterer(map, opt_markers, opt_options) { NgMapMarkerClusterer.__super__.constructor.call(this, map, opt_markers, opt_options); this.markers_ = new window.PropMap(); } /** * Removes all clusters and markers from the map and also removes all markers * managed by the clusterer. */ NgMapMarkerClusterer.prototype.clearMarkers = function () { this.resetViewport_(true); this.markers_ = new PropMap(); }; /** * Removes a marker and returns true if removed, false if not. * * @param {google.maps.Marker} marker The marker to remove * @return {boolean} Whether the marker was removed or not */ NgMapMarkerClusterer.prototype.removeMarker_ = function (marker) { if (!this.markers_.get(marker.key)) { return false; } marker.setMap(null); this.markers_.remove(marker.key); // Remove the marker from the list of managed markers return true; }; /** * Creates the clusters. This is done in batches to avoid timeout errors * in some browsers when there is a huge number of markers. * * @param {number} iFirst The index of the first marker in the batch of * markers to be added to clusters. */ NgMapMarkerClusterer.prototype.createClusters_ = function (iFirst) { var i, marker; var mapBounds; var cMarkerClusterer = this; if (!this.ready_) { return; } // Cancel previous batch processing if we're working on the first batch: if (iFirst === 0) { /** * This event is fired when the <code>MarkerClusterer</code> begins * clustering markers. * @name MarkerClusterer#clusteringbegin * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. * @event */ google.maps.event.trigger(this, "clusteringbegin", this); if (typeof this.timerRefStatic !== "undefined") { clearTimeout(this.timerRefStatic); delete this.timerRefStatic; } } // Get our current map view bounds. // Create a new bounds object so we don't affect the map. // // See Comments 9 & 11 on Issue 3651 relating to this workaround for a Google Maps bug: if (this.getMap().getZoom() > 3) { mapBounds = new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(), this.getMap().getBounds().getNorthEast()); } else { mapBounds = new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472, -178.48388434375), new google.maps.LatLng(-85.08136444384544, 178.00048865625)); } var bounds = this.getExtendedBounds(mapBounds); var iLast = Math.min(iFirst + this.batchSize_, this.markers_.length); for (i = iFirst; i < iLast; i++) { marker = this.markers_.values()[i]; if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) { if (!this.ignoreHidden_ || (this.ignoreHidden_ && marker.getVisible())) { this.addToClosestCluster_(marker); } } } if (iLast < this.markers_.length) { this.timerRefStatic = setTimeout(function () { cMarkerClusterer.createClusters_(iLast); }, 0); } else { // custom addition by ngmaps // update icon for all clusters for (i = 0; i < this.clusters_.length; i++) { this.clusters_[i].updateIcon_(); } delete this.timerRefStatic; /** * This event is fired when the <code>MarkerClusterer</code> stops * clustering markers. * @name MarkerClusterer#clusteringend * @param {MarkerClusterer} mc The MarkerClusterer whose markers are being clustered. * @event */ google.maps.event.trigger(this, "clusteringend", this); } }; /** * Adds a marker to a cluster, or creates a new cluster. * * @param {google.maps.Marker} marker The marker to add. */ NgMapMarkerClusterer.prototype.addToClosestCluster_ = function (marker) { var i, d, cluster, center; var distance = 40000; // Some large number var clusterToAddTo = null; for (i = 0; i < this.clusters_.length; i++) { cluster = this.clusters_[i]; center = cluster.getCenter(); if (center) { d = this.distanceBetweenPoints_(center, marker.getPosition()); if (d < distance) { distance = d; clusterToAddTo = cluster; } } } if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) { clusterToAddTo.addMarker(marker); } else { cluster = new NgMapCluster(this); cluster.addMarker(marker); this.clusters_.push(cluster); } }; /** * Redraws all the clusters. */ NgMapMarkerClusterer.prototype.redraw_ = function () { this.createClusters_(0); }; /** * Removes all clusters from the map. The markers are also removed from the map * if <code>opt_hide</code> is set to <code>true</code>. * * @param {boolean} [opt_hide] Set to <code>true</code> to also remove the markers * from the map. */ NgMapMarkerClusterer.prototype.resetViewport_ = function (opt_hide) { var i, marker; // Remove all the clusters for (i = 0; i < this.clusters_.length; i++) { this.clusters_[i].remove(); } this.clusters_ = []; // Reset the markers to not be added and to be removed from the map. this.markers_.values().forEach(function (marker) { marker.isAdded = false; if (opt_hide) { marker.setMap(null); } }); }; /** * Extends an object's prototype by another's. * * @param {Object} obj1 The object to be extended. * @param {Object} obj2 The object to extend with. * @return {Object} The new extended object. * @ignore */ NgMapMarkerClusterer.prototype.extend = function (obj1, obj2) { return (function (object) { var property; for (property in object.prototype) { if (property !== 'constructor') this.prototype[property] = object.prototype[property]; } return this; }).apply(obj1, [obj2]); }; return NgMapMarkerClusterer; })(MarkerClusterer); }).call(this); }) }; });
src/Card/LinkHeader/LinkHeader.spec.js
nirhart/wix-style-react
import React from 'react'; import ReactTestUtils from 'react-addons-test-utils'; import linkHeaderDriverFactory from './LinkHeader.driver'; import {createDriverFactory} from '../../test-common'; import LinkHeader from './LinkHeader'; import {linkHeaderTestkitFactory, textLinkTestkitFactory} from '../../../testkit'; import {linkHeaderTestkitFactory as enzymeButtonHeaderTestkitFactory} from '../../../testkit/enzyme'; import {mount} from 'enzyme'; describe('LinkHeader', () => { const createDriver = createDriverFactory(linkHeaderDriverFactory); it('should have a title', () => { const driver = createDriver(<LinkHeader linkTitle="Wix" linkTo="http://www.wix.com/" title="Header Title"/>); expect(driver.title()).toBe('Header Title'); }); it('should have a subtitle', () => { const driver = createDriver(<LinkHeader linkTitle="Wix" linkTo="http://www.wix.com/" title="Header Title" subtitle="Header Subtitle"/>); expect(driver.subtitle()).toBe('Header Subtitle'); }); it('should have a TextLink testKit', () => { const driver = createDriver(<LinkHeader linkTitle="Wix" linkTo="http://www.wix.com/" title="Header Title" subtitle="Header Subtitle"/>); const textLinkDriverTestkit = textLinkTestkitFactory({wrapper: driver.element(), dataHook: driver.linkDataHook()}); expect(textLinkDriverTestkit.getContent()).toBe('Wix'); }); describe('testkit', () => { it('should exist', () => { const div = document.createElement('div'); const dataHook = 'myDataHook'; const wrapper = div.appendChild(ReactTestUtils.renderIntoDocument(<div><LinkHeader linkTitle="Wix" linkTo="http://www.wix.com/" title="Header Title" subtitle="Header Subtitle" dataHook={dataHook}/></div>)); const linkHeaderTestkit = linkHeaderTestkitFactory({wrapper, dataHook}); expect(linkHeaderTestkit.exists()).toBeTruthy(); }); }); describe('enzyme testkit', () => { it('should exist', () => { const dataHook = 'myDataHook'; const wrapper = mount(<LinkHeader linkTitle="Wix" linkTo="http://www.wix.com/" title="Header Title" subtitle="Header Subtitle" dataHook={dataHook}/>); const linkDriverTestkit = enzymeButtonHeaderTestkitFactory({wrapper, dataHook}); expect(linkDriverTestkit.exists()).toBeTruthy(); }); }); });
ajax/libs/buy-button-js/0.1.4/buybutton.js
cdnjs/cdnjs
var ShopifyBuy = (function () { 'use strict'; var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {} function interopDefault(ex) { return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex; } function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } var shopifyBuy_umd_polyfilled = createCommonjsModule(function (module, exports) { /** * The MIT License (MIT) * * Copyright (c) 2016 Shopify Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * Version: 0.3.2 Commit: 6ad83e3 **/(function(global,factory){if(typeof define==="function"&&define.amd){define('shopify-buy',['module'],factory);}else if(typeof exports!=="undefined"){factory(module);}else{var mod={exports:{}};factory(mod);global.ShopifyBuy=mod.exports;}})(commonjsGlobal,function(module){'use strict';function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2;}else{return Array.from(arr);}}var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};(function(){'use strict';if(self.fetch){return;}function normalizeName(name){if(typeof name!=='string'){name=String(name);}if(/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)){throw new TypeError('Invalid character in header field name');}return name.toLowerCase();}function normalizeValue(value){if(typeof value!=='string'){value=String(value);}return value;}function Headers(headers){this.map={};if(headers instanceof Headers){headers.forEach(function(value,name){this.append(name,value);},this);}else if(headers){Object.getOwnPropertyNames(headers).forEach(function(name){this.append(name,headers[name]);},this);}}Headers.prototype.append=function(name,value){name=normalizeName(name);value=normalizeValue(value);var list=this.map[name];if(!list){list=[];this.map[name]=list;}list.push(value);};Headers.prototype['delete']=function(name){delete this.map[normalizeName(name)];};Headers.prototype.get=function(name){var values=this.map[normalizeName(name)];return values?values[0]:null;};Headers.prototype.getAll=function(name){return this.map[normalizeName(name)]||[];};Headers.prototype.has=function(name){return this.map.hasOwnProperty(normalizeName(name));};Headers.prototype.set=function(name,value){this.map[normalizeName(name)]=[normalizeValue(value)];};Headers.prototype.forEach=function(callback,thisArg){Object.getOwnPropertyNames(this.map).forEach(function(name){this.map[name].forEach(function(value){callback.call(thisArg,value,name,this);},this);},this);};function consumed(body){if(body.bodyUsed){return Promise.reject(new TypeError('Already read'));}body.bodyUsed=true;}function fileReaderReady(reader){return new Promise(function(resolve,reject){reader.onload=function(){resolve(reader.result);};reader.onerror=function(){reject(reader.error);};});}function readBlobAsArrayBuffer(blob){var reader=new FileReader();reader.readAsArrayBuffer(blob);return fileReaderReady(reader);}function readBlobAsText(blob){var reader=new FileReader();reader.readAsText(blob);return fileReaderReady(reader);}var support={blob:'FileReader'in self&&'Blob'in self&&function(){try{new Blob();return true;}catch(e){return false;}}(),formData:'FormData'in self,arrayBuffer:'ArrayBuffer'in self};function Body(){this.bodyUsed=false;this._initBody=function(body){this._bodyInit=body;if(typeof body==='string'){this._bodyText=body;}else if(support.blob&&Blob.prototype.isPrototypeOf(body)){this._bodyBlob=body;}else if(support.formData&&FormData.prototype.isPrototypeOf(body)){this._bodyFormData=body;}else if(!body){this._bodyText='';}else if(support.arrayBuffer&&ArrayBuffer.prototype.isPrototypeOf(body)){// Only support ArrayBuffers for POST method. // Receiving ArrayBuffers happens via Blobs, instead. }else{throw new Error('unsupported BodyInit type');}};if(support.blob){this.blob=function(){var rejected=consumed(this);if(rejected){return rejected;}if(this._bodyBlob){return Promise.resolve(this._bodyBlob);}else if(this._bodyFormData){throw new Error('could not read FormData body as blob');}else{return Promise.resolve(new Blob([this._bodyText]));}};this.arrayBuffer=function(){return this.blob().then(readBlobAsArrayBuffer);};this.text=function(){var rejected=consumed(this);if(rejected){return rejected;}if(this._bodyBlob){return readBlobAsText(this._bodyBlob);}else if(this._bodyFormData){throw new Error('could not read FormData body as text');}else{return Promise.resolve(this._bodyText);}};}else{this.text=function(){var rejected=consumed(this);return rejected?rejected:Promise.resolve(this._bodyText);};}if(support.formData){this.formData=function(){return this.text().then(decode);};}this.json=function(){return this.text().then(JSON.parse);};return this;}// HTTP methods whose capitalization should be normalized var methods=['DELETE','GET','HEAD','OPTIONS','POST','PUT'];function normalizeMethod(method){var upcased=method.toUpperCase();return methods.indexOf(upcased)>-1?upcased:method;}function Request(input,options){options=options||{};var body=options.body;if(Request.prototype.isPrototypeOf(input)){if(input.bodyUsed){throw new TypeError('Already read');}this.url=input.url;this.credentials=input.credentials;if(!options.headers){this.headers=new Headers(input.headers);}this.method=input.method;this.mode=input.mode;if(!body){body=input._bodyInit;input.bodyUsed=true;}}else{this.url=input;}this.credentials=options.credentials||this.credentials||'omit';if(options.headers||!this.headers){this.headers=new Headers(options.headers);}this.method=normalizeMethod(options.method||this.method||'GET');this.mode=options.mode||this.mode||null;this.referrer=null;if((this.method==='GET'||this.method==='HEAD')&&body){throw new TypeError('Body not allowed for GET or HEAD requests');}this._initBody(body);}Request.prototype.clone=function(){return new Request(this);};function decode(body){var form=new FormData();body.trim().split('&').forEach(function(bytes){if(bytes){var split=bytes.split('=');var name=split.shift().replace(/\+/g,' ');var value=split.join('=').replace(/\+/g,' ');form.append(decodeURIComponent(name),decodeURIComponent(value));}});return form;}function headers(xhr){var head=new Headers();var pairs=xhr.getAllResponseHeaders().trim().split('\n');pairs.forEach(function(header){var split=header.trim().split(':');var key=split.shift().trim();var value=split.join(':').trim();head.append(key,value);});return head;}Body.call(Request.prototype);function Response(bodyInit,options){if(!options){options={};}this._initBody(bodyInit);this.type='default';this.status=options.status;this.ok=this.status>=200&&this.status<300;this.statusText=options.statusText;this.headers=options.headers instanceof Headers?options.headers:new Headers(options.headers);this.url=options.url||'';}Body.call(Response.prototype);Response.prototype.clone=function(){return new Response(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Headers(this.headers),url:this.url});};Response.error=function(){var response=new Response(null,{status:0,statusText:''});response.type='error';return response;};var redirectStatuses=[301,302,303,307,308];Response.redirect=function(url,status){if(redirectStatuses.indexOf(status)===-1){throw new RangeError('Invalid status code');}return new Response(null,{status:status,headers:{location:url}});};self.Headers=Headers;self.Request=Request;self.Response=Response;self.fetch=function(input,init){return new Promise(function(resolve,reject){var request;if(Request.prototype.isPrototypeOf(input)&&!init){request=input;}else{request=new Request(input,init);}var xhr=new XMLHttpRequest();function responseURL(){if('responseURL'in xhr){return xhr.responseURL;}// Avoid security warnings on getResponseHeader when not allowed by CORS if(/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())){return xhr.getResponseHeader('X-Request-URL');}return;}xhr.onload=function(){var status=xhr.status===1223?204:xhr.status;if(status<100||status>599){reject(new TypeError('Network request failed'));return;}var options={status:status,statusText:xhr.statusText,headers:headers(xhr),url:responseURL()};var body='response'in xhr?xhr.response:xhr.responseText;resolve(new Response(body,options));};xhr.onerror=function(){reject(new TypeError('Network request failed'));};xhr.open(request.method,request.url,true);if(request.credentials==='include'){xhr.withCredentials=true;}if('responseType'in xhr&&support.blob){xhr.responseType='blob';}request.headers.forEach(function(value,name){xhr.setRequestHeader(name,value);});xhr.send(typeof request._bodyInit==='undefined'?null:request._bodyInit);});};self.fetch.polyfill=true;})();function interopDefault(ex){return ex&&(typeof ex==='undefined'?'undefined':_typeof(ex))==='object'&&'default'in ex?ex['default']:ex;}function createCommonjsModule(fn,module){return module={exports:{}},fn(module,module.exports),module.exports;}var _cof=createCommonjsModule(function(module){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1);};});var _cof$1=interopDefault(_cof);var require$$0=Object.freeze({'default':_cof$1});var _global=createCommonjsModule(function(module){// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global=module.exports=typeof window!='undefined'&&window.Math==Math?window:typeof self!='undefined'&&self.Math==Math?self:Function('return this')();if(typeof __g=='number')__g=global;// eslint-disable-line no-undef });var _global$1=interopDefault(_global);var require$$3$1=Object.freeze({'default':_global$1});var _shared=createCommonjsModule(function(module){var global=interopDefault(require$$3$1),SHARED='__core-js_shared__',store=global[SHARED]||(global[SHARED]={});module.exports=function(key){return store[key]||(store[key]={});};});var _shared$1=interopDefault(_shared);var require$$1=Object.freeze({'default':_shared$1});var _uid=createCommonjsModule(function(module){var id=0,px=Math.random();module.exports=function(key){return'Symbol('.concat(key===undefined?'':key,')_',(++id+px).toString(36));};});var _uid$1=interopDefault(_uid);var require$$0$2=Object.freeze({'default':_uid$1});var _wks=createCommonjsModule(function(module){var store=interopDefault(require$$1)('wks'),uid=interopDefault(require$$0$2),_Symbol=interopDefault(require$$3$1).Symbol,USE_SYMBOL=typeof _Symbol=='function';var $exports=module.exports=function(name){return store[name]||(store[name]=USE_SYMBOL&&_Symbol[name]||(USE_SYMBOL?_Symbol:uid)('Symbol.'+name));};$exports.store=store;});var _wks$1=interopDefault(_wks);var require$$0$1=Object.freeze({'default':_wks$1});var _classof=createCommonjsModule(function(module){// getting tag from 19.1.3.6 Object.prototype.toString() var cof=interopDefault(require$$0),TAG=interopDefault(require$$0$1)('toStringTag')// ES3 wrong here ,ARG=cof(function(){return arguments;}())=='Arguments';// fallback for IE11 Script Access Denied error var tryGet=function tryGet(it,key){try{return it[key];}catch(e){/* empty */}};module.exports=function(it){var O,T,B;return it===undefined?'Undefined':it===null?'Null'// @@toStringTag case :typeof(T=tryGet(O=Object(it),TAG))=='string'?T// builtinTag case :ARG?cof(O)// ES3 arguments fallback :(B=cof(O))=='Object'&&typeof O.callee=='function'?'Arguments':B;};});var _classof$1=interopDefault(_classof);var require$$3=Object.freeze({'default':_classof$1});var _isObject=createCommonjsModule(function(module){module.exports=function(it){return(typeof it==='undefined'?'undefined':_typeof(it))==='object'?it!==null:typeof it==='function';};});var _isObject$1=interopDefault(_isObject);var require$$12=Object.freeze({'default':_isObject$1});var _anObject=createCommonjsModule(function(module){var isObject=interopDefault(require$$12);module.exports=function(it){if(!isObject(it))throw TypeError(it+' is not an object!');return it;};});var _anObject$1=interopDefault(_anObject);var require$$2$1=Object.freeze({'default':_anObject$1});var _fails=createCommonjsModule(function(module){module.exports=function(exec){try{return!!exec();}catch(e){return true;}};});var _fails$1=interopDefault(_fails);var require$$0$5=Object.freeze({'default':_fails$1});var _descriptors=createCommonjsModule(function(module){// Thank's IE8 for his funny defineProperty module.exports=!interopDefault(require$$0$5)(function(){return Object.defineProperty({},'a',{get:function get(){return 7;}}).a!=7;});});var _descriptors$1=interopDefault(_descriptors);var require$$1$1=Object.freeze({'default':_descriptors$1});var _domCreate=createCommonjsModule(function(module){var isObject=interopDefault(require$$12),document=interopDefault(require$$3$1).document// in old IE typeof document.createElement is 'object' ,is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{};};});var _domCreate$1=interopDefault(_domCreate);var require$$2$3=Object.freeze({'default':_domCreate$1});var _ie8DomDefine=createCommonjsModule(function(module){module.exports=!interopDefault(require$$1$1)&&!interopDefault(require$$0$5)(function(){return Object.defineProperty(interopDefault(require$$2$3)('div'),'a',{get:function get(){return 7;}}).a!=7;});});var _ie8DomDefine$1=interopDefault(_ie8DomDefine);var require$$2$2=Object.freeze({'default':_ie8DomDefine$1});var _toPrimitive=createCommonjsModule(function(module){// 7.1.1 ToPrimitive(input [, PreferredType]) var isObject=interopDefault(require$$12);// instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports=function(it,S){if(!isObject(it))return it;var fn,val;if(S&&typeof(fn=it.toString)=='function'&&!isObject(val=fn.call(it)))return val;if(typeof(fn=it.valueOf)=='function'&&!isObject(val=fn.call(it)))return val;if(!S&&typeof(fn=it.toString)=='function'&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to primitive value");};});var _toPrimitive$1=interopDefault(_toPrimitive);var require$$1$2=Object.freeze({'default':_toPrimitive$1});var _objectDp=createCommonjsModule(function(module,exports){var anObject=interopDefault(require$$2$1),IE8_DOM_DEFINE=interopDefault(require$$2$2),toPrimitive=interopDefault(require$$1$2),dP=Object.defineProperty;exports.f=interopDefault(require$$1$1)?Object.defineProperty:function defineProperty(O,P,Attributes){anObject(O);P=toPrimitive(P,true);anObject(Attributes);if(IE8_DOM_DEFINE)try{return dP(O,P,Attributes);}catch(e){/* empty */}if('get'in Attributes||'set'in Attributes)throw TypeError('Accessors not supported!');if('value'in Attributes)O[P]=Attributes.value;return O;};});var _objectDp$1=interopDefault(_objectDp);var f=_objectDp.f;var require$$2=Object.freeze({'default':_objectDp$1,f:f});var _propertyDesc=createCommonjsModule(function(module){module.exports=function(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value};};});var _propertyDesc$1=interopDefault(_propertyDesc);var require$$3$2=Object.freeze({'default':_propertyDesc$1});var _hide=createCommonjsModule(function(module){var dP=interopDefault(require$$2),createDesc=interopDefault(require$$3$2);module.exports=interopDefault(require$$1$1)?function(object,key,value){return dP.f(object,key,createDesc(1,value));}:function(object,key,value){object[key]=value;return object;};});var _hide$1=interopDefault(_hide);var require$$0$4=Object.freeze({'default':_hide$1});var _has=createCommonjsModule(function(module){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key);};});var _has$1=interopDefault(_has);var require$$2$4=Object.freeze({'default':_has$1});var _core=createCommonjsModule(function(module){var core=module.exports={version:'2.4.0'};if(typeof __e=='number')__e=core;// eslint-disable-line no-undef });var _core$1=interopDefault(_core);var version=_core.version;var require$$0$6=Object.freeze({'default':_core$1,version:version});var _redefine=createCommonjsModule(function(module){var global=interopDefault(require$$3$1),hide=interopDefault(require$$0$4),has=interopDefault(require$$2$4),SRC=interopDefault(require$$0$2)('src'),TO_STRING='toString',$toString=Function[TO_STRING],TPL=(''+$toString).split(TO_STRING);interopDefault(require$$0$6).inspectSource=function(it){return $toString.call(it);};(module.exports=function(O,key,val,safe){var isFunction=typeof val=='function';if(isFunction)has(val,'name')||hide(val,'name',key);if(O[key]===val)return;if(isFunction)has(val,SRC)||hide(val,SRC,O[key]?''+O[key]:TPL.join(String(key)));if(O===global){O[key]=val;}else{if(!safe){delete O[key];hide(O,key,val);}else{if(O[key])O[key]=val;else hide(O,key,val);}}// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype,TO_STRING,function toString(){return typeof this=='function'&&this[SRC]||$toString.call(this);});});var _redefine$1=interopDefault(_redefine);var require$$0$3=Object.freeze({'default':_redefine$1});var es6_object_toString=createCommonjsModule(function(module){'use strict';// 19.1.3.6 Object.prototype.toString() var classof=interopDefault(require$$3),test={};test[interopDefault(require$$0$1)('toStringTag')]='z';if(test+''!='[object z]'){interopDefault(require$$0$3)(Object.prototype,'toString',function toString(){return'[object '+classof(this)+']';},true);}});interopDefault(es6_object_toString);var _toInteger=createCommonjsModule(function(module){// 7.1.4 ToInteger var ceil=Math.ceil,floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it);};});var _toInteger$1=interopDefault(_toInteger);var require$$0$7=Object.freeze({'default':_toInteger$1});var _defined=createCommonjsModule(function(module){// 7.2.1 RequireObjectCoercible(argument) module.exports=function(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it;};});var _defined$1=interopDefault(_defined);var require$$0$8=Object.freeze({'default':_defined$1});var _stringAt=createCommonjsModule(function(module){var toInteger=interopDefault(require$$0$7),defined=interopDefault(require$$0$8);// true -> String#at // false -> String#codePointAt module.exports=function(TO_STRING){return function(that,pos){var s=String(defined(that)),i=toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?'':undefined;a=s.charCodeAt(i);return a<0xd800||a>0xdbff||i+1===l||(b=s.charCodeAt(i+1))<0xdc00||b>0xdfff?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-0xd800<<10)+(b-0xdc00)+0x10000;};};});var _stringAt$1=interopDefault(_stringAt);var require$$1$3=Object.freeze({'default':_stringAt$1});var _library=createCommonjsModule(function(module){module.exports=false;});var _library$1=interopDefault(_library);var require$$17=Object.freeze({'default':_library$1});var _aFunction=createCommonjsModule(function(module){module.exports=function(it){if(typeof it!='function')throw TypeError(it+' is not a function!');return it;};});var _aFunction$1=interopDefault(_aFunction);var require$$1$4=Object.freeze({'default':_aFunction$1});var _ctx=createCommonjsModule(function(module){// optional / simple context binding var aFunction=interopDefault(require$$1$4);module.exports=function(fn,that,length){aFunction(fn);if(that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a);};case 2:return function(a,b){return fn.call(that,a,b);};case 3:return function(a,b,c){return fn.call(that,a,b,c);};}return function()/* ...args */{return fn.apply(that,arguments);};};});var _ctx$1=interopDefault(_ctx);var require$$5=Object.freeze({'default':_ctx$1});var _export=createCommonjsModule(function(module){var global=interopDefault(require$$3$1),core=interopDefault(require$$0$6),hide=interopDefault(require$$0$4),redefine=interopDefault(require$$0$3),ctx=interopDefault(require$$5),PROTOTYPE='prototype';var $export=function $export(type,name,source){var IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,target=IS_GLOBAL?global:IS_STATIC?global[name]||(global[name]={}):(global[name]||{})[PROTOTYPE],exports=IS_GLOBAL?core:core[name]||(core[name]={}),expProto=exports[PROTOTYPE]||(exports[PROTOTYPE]={}),key,own,out,exp;if(IS_GLOBAL)source=name;for(key in source){// contains in native own=!IS_FORCED&&target&&target[key]!==undefined;// export native or passed out=(own?target:source)[key];// bind timers to global for call from export context exp=IS_BIND&&own?ctx(out,global):IS_PROTO&&typeof out=='function'?ctx(Function.call,out):out;// extend global if(target)redefine(target,key,out,type&$export.U);// export if(exports[key]!=out)hide(exports,key,exp);if(IS_PROTO&&expProto[key]!=out)expProto[key]=out;}};global.core=core;// type bitmap $export.F=1;// forced $export.G=2;// global $export.S=4;// static $export.P=8;// proto $export.B=16;// bind $export.W=32;// wrap $export.U=64;// safe $export.R=128;// real proto method for `library` module.exports=$export;});var _export$1=interopDefault(_export);var require$$13=Object.freeze({'default':_export$1});var _iterators=createCommonjsModule(function(module){module.exports={};});var _iterators$1=interopDefault(_iterators);var require$$1$5=Object.freeze({'default':_iterators$1});var _iobject=createCommonjsModule(function(module){// fallback for non-array-like ES3 and non-enumerable old V8 strings var cof=interopDefault(require$$0);module.exports=Object('z').propertyIsEnumerable(0)?Object:function(it){return cof(it)=='String'?it.split(''):Object(it);};});var _iobject$1=interopDefault(_iobject);var require$$1$9=Object.freeze({'default':_iobject$1});var _toIobject=createCommonjsModule(function(module){// to indexed object, toObject with fallback for non-array-like ES3 strings var IObject=interopDefault(require$$1$9),defined=interopDefault(require$$0$8);module.exports=function(it){return IObject(defined(it));};});var _toIobject$1=interopDefault(_toIobject);var require$$1$8=Object.freeze({'default':_toIobject$1});var _toLength=createCommonjsModule(function(module){// 7.1.15 ToLength var toInteger=interopDefault(require$$0$7),min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),0x1fffffffffffff):0;// pow(2, 53) - 1 == 9007199254740991 };});var _toLength$1=interopDefault(_toLength);var require$$1$11=Object.freeze({'default':_toLength$1});var _toIndex=createCommonjsModule(function(module){var toInteger=interopDefault(require$$0$7),max=Math.max,min=Math.min;module.exports=function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length);};});var _toIndex$1=interopDefault(_toIndex);var require$$0$10=Object.freeze({'default':_toIndex$1});var _arrayIncludes=createCommonjsModule(function(module){// false -> Array#indexOf // true -> Array#includes var toIObject=interopDefault(require$$1$8),toLength=interopDefault(require$$1$11),toIndex=interopDefault(require$$0$10);module.exports=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIObject($this),length=toLength(O.length),index=toIndex(fromIndex,length),value;// Array#includes uses SameValueZero equality algorithm if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];if(value!=value)return true;// Array#toIndex ignores holes, Array#includes - not }else for(;length>index;index++){if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index||0;}}return!IS_INCLUDES&&-1;};};});var _arrayIncludes$1=interopDefault(_arrayIncludes);var require$$1$10=Object.freeze({'default':_arrayIncludes$1});var _sharedKey=createCommonjsModule(function(module){var shared=interopDefault(require$$1)('keys'),uid=interopDefault(require$$0$2);module.exports=function(key){return shared[key]||(shared[key]=uid(key));};});var _sharedKey$1=interopDefault(_sharedKey);var require$$0$11=Object.freeze({'default':_sharedKey$1});var _objectKeysInternal=createCommonjsModule(function(module){var has=interopDefault(require$$2$4),toIObject=interopDefault(require$$1$8),arrayIndexOf=interopDefault(require$$1$10)(false),IE_PROTO=interopDefault(require$$0$11)('IE_PROTO');module.exports=function(object,names){var O=toIObject(object),i=0,result=[],key;for(key in O){if(key!=IE_PROTO)has(O,key)&&result.push(key);}// Don't enum bug & hidden keys while(names.length>i){if(has(O,key=names[i++])){~arrayIndexOf(result,key)||result.push(key);}}return result;};});var _objectKeysInternal$1=interopDefault(_objectKeysInternal);var require$$1$7=Object.freeze({'default':_objectKeysInternal$1});var _enumBugKeys=createCommonjsModule(function(module){// IE 8- don't enum bug keys module.exports='constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',');});var _enumBugKeys$1=interopDefault(_enumBugKeys);var require$$0$12=Object.freeze({'default':_enumBugKeys$1});var _objectKeys=createCommonjsModule(function(module){// 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys=interopDefault(require$$1$7),enumBugKeys=interopDefault(require$$0$12);module.exports=Object.keys||function keys(O){return $keys(O,enumBugKeys);};});var _objectKeys$1=interopDefault(_objectKeys);var require$$1$6=Object.freeze({'default':_objectKeys$1});var _objectDps=createCommonjsModule(function(module){var dP=interopDefault(require$$2),anObject=interopDefault(require$$2$1),getKeys=interopDefault(require$$1$6);module.exports=interopDefault(require$$1$1)?Object.defineProperties:function defineProperties(O,Properties){anObject(O);var keys=getKeys(Properties),length=keys.length,i=0,P;while(length>i){dP.f(O,P=keys[i++],Properties[P]);}return O;};});var _objectDps$1=interopDefault(_objectDps);var require$$4$1=Object.freeze({'default':_objectDps$1});var _html=createCommonjsModule(function(module){module.exports=interopDefault(require$$3$1).document&&document.documentElement;});var _html$1=interopDefault(_html);var require$$3$4=Object.freeze({'default':_html$1});var _objectCreate=createCommonjsModule(function(module){// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject=interopDefault(require$$2$1),dPs=interopDefault(require$$4$1),enumBugKeys=interopDefault(require$$0$12),IE_PROTO=interopDefault(require$$0$11)('IE_PROTO'),Empty=function Empty(){/* empty */},PROTOTYPE='prototype';// Create object with fake `null` prototype: use iframe Object with cleared prototype var _createDict=function createDict(){// Thrash, waste and sodomy: IE GC bug var iframe=interopDefault(require$$2$3)('iframe'),i=enumBugKeys.length,lt='<',gt='>',iframeDocument;iframe.style.display='none';interopDefault(require$$3$4).appendChild(iframe);iframe.src='javascript:';// eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write(lt+'script'+gt+'document.F=Object'+lt+'/script'+gt);iframeDocument.close();_createDict=iframeDocument.F;while(i--){delete _createDict[PROTOTYPE][enumBugKeys[i]];}return _createDict();};module.exports=Object.create||function create(O,Properties){var result;if(O!==null){Empty[PROTOTYPE]=anObject(O);result=new Empty();Empty[PROTOTYPE]=null;// add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO]=O;}else result=_createDict();return Properties===undefined?result:dPs(result,Properties);};});var _objectCreate$1=interopDefault(_objectCreate);var require$$4=Object.freeze({'default':_objectCreate$1});var _setToStringTag=createCommonjsModule(function(module){var def=interopDefault(require$$2).f,has=interopDefault(require$$2$4),TAG=interopDefault(require$$0$1)('toStringTag');module.exports=function(it,tag,stat){if(it&&!has(it=stat?it:it.prototype,TAG))def(it,TAG,{configurable:true,value:tag});};});var _setToStringTag$1=interopDefault(_setToStringTag);var require$$3$5=Object.freeze({'default':_setToStringTag$1});var _iterCreate=createCommonjsModule(function(module){'use strict';var create=interopDefault(require$$4),descriptor=interopDefault(require$$3$2),setToStringTag=interopDefault(require$$3$5),IteratorPrototype={};// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() interopDefault(require$$0$4)(IteratorPrototype,interopDefault(require$$0$1)('iterator'),function(){return this;});module.exports=function(Constructor,NAME,next){Constructor.prototype=create(IteratorPrototype,{next:descriptor(1,next)});setToStringTag(Constructor,NAME+' Iterator');};});var _iterCreate$1=interopDefault(_iterCreate);var require$$3$3=Object.freeze({'default':_iterCreate$1});var _toObject=createCommonjsModule(function(module){// 7.1.13 ToObject(argument) var defined=interopDefault(require$$0$8);module.exports=function(it){return Object(defined(it));};});var _toObject$1=interopDefault(_toObject);var require$$1$13=Object.freeze({'default':_toObject$1});var _objectGpo=createCommonjsModule(function(module){// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has=interopDefault(require$$2$4),toObject=interopDefault(require$$1$13),IE_PROTO=interopDefault(require$$0$11)('IE_PROTO'),ObjectProto=Object.prototype;module.exports=Object.getPrototypeOf||function(O){O=toObject(O);if(has(O,IE_PROTO))return O[IE_PROTO];if(typeof O.constructor=='function'&&O instanceof O.constructor){return O.constructor.prototype;}return O instanceof Object?ObjectProto:null;};});var _objectGpo$1=interopDefault(_objectGpo);var require$$1$12=Object.freeze({'default':_objectGpo$1});var _iterDefine=createCommonjsModule(function(module){'use strict';var LIBRARY=interopDefault(require$$17),$export=interopDefault(require$$13),redefine=interopDefault(require$$0$3),hide=interopDefault(require$$0$4),has=interopDefault(require$$2$4),Iterators=interopDefault(require$$1$5),$iterCreate=interopDefault(require$$3$3),setToStringTag=interopDefault(require$$3$5),getPrototypeOf=interopDefault(require$$1$12),ITERATOR=interopDefault(require$$0$1)('iterator'),BUGGY=!([].keys&&'next'in[].keys())// Safari has buggy iterators w/o `next` ,FF_ITERATOR='@@iterator',KEYS='keys',VALUES='values';var returnThis=function returnThis(){return this;};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCED){$iterCreate(Constructor,NAME,next);var getMethod=function getMethod(kind){if(!BUGGY&&kind in proto)return proto[kind];switch(kind){case KEYS:return function keys(){return new Constructor(this,kind);};case VALUES:return function values(){return new Constructor(this,kind);};}return function entries(){return new Constructor(this,kind);};};var TAG=NAME+' Iterator',DEF_VALUES=DEFAULT==VALUES,VALUES_BUG=false,proto=Base.prototype,$native=proto[ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],$default=$native||getMethod(DEFAULT),$entries=DEFAULT?!DEF_VALUES?$default:getMethod('entries'):undefined,$anyNative=NAME=='Array'?proto.entries||$native:$native,methods,key,IteratorPrototype;// Fix native if($anyNative){IteratorPrototype=getPrototypeOf($anyNative.call(new Base()));if(IteratorPrototype!==Object.prototype){// Set @@toStringTag to native iterators setToStringTag(IteratorPrototype,TAG,true);// fix for some old engines if(!LIBRARY&&!has(IteratorPrototype,ITERATOR))hide(IteratorPrototype,ITERATOR,returnThis);}}// fix Array#{values, @@iterator}.name in V8 / FF if(DEF_VALUES&&$native&&$native.name!==VALUES){VALUES_BUG=true;$default=function values(){return $native.call(this);};}// Define iterator if((!LIBRARY||FORCED)&&(BUGGY||VALUES_BUG||!proto[ITERATOR])){hide(proto,ITERATOR,$default);}// Plug for library Iterators[NAME]=$default;Iterators[TAG]=returnThis;if(DEFAULT){methods={values:DEF_VALUES?$default:getMethod(VALUES),keys:IS_SET?$default:getMethod(KEYS),entries:$entries};if(FORCED)for(key in methods){if(!(key in proto))redefine(proto,key,methods[key]);}else $export($export.P+$export.F*(BUGGY||VALUES_BUG),NAME,methods);}return methods;};});var _iterDefine$1=interopDefault(_iterDefine);var require$$0$9=Object.freeze({'default':_iterDefine$1});var es6_string_iterator=createCommonjsModule(function(module){'use strict';var $at=interopDefault(require$$1$3)(true);// 21.1.3.27 String.prototype[@@iterator]() interopDefault(require$$0$9)(String,'String',function(iterated){this._t=String(iterated);// target this._i=0;// next index // 21.1.5.2.1 %StringIteratorPrototype%.next() },function(){var O=this._t,index=this._i,point;if(index>=O.length)return{value:undefined,done:true};point=$at(O,index);this._i+=point.length;return{value:point,done:false};});});interopDefault(es6_string_iterator);var _addToUnscopables=createCommonjsModule(function(module){// 22.1.3.31 Array.prototype[@@unscopables] var UNSCOPABLES=interopDefault(require$$0$1)('unscopables'),ArrayProto=Array.prototype;if(ArrayProto[UNSCOPABLES]==undefined)interopDefault(require$$0$4)(ArrayProto,UNSCOPABLES,{});module.exports=function(key){ArrayProto[UNSCOPABLES][key]=true;};});var _addToUnscopables$1=interopDefault(_addToUnscopables);var require$$4$2=Object.freeze({'default':_addToUnscopables$1});var _iterStep=createCommonjsModule(function(module){module.exports=function(done,value){return{value:value,done:!!done};};});var _iterStep$1=interopDefault(_iterStep);var require$$3$6=Object.freeze({'default':_iterStep$1});var es6_array_iterator=createCommonjsModule(function(module){'use strict';var addToUnscopables=interopDefault(require$$4$2),step=interopDefault(require$$3$6),Iterators=interopDefault(require$$1$5),toIObject=interopDefault(require$$1$8);// 22.1.3.4 Array.prototype.entries() // 22.1.3.13 Array.prototype.keys() // 22.1.3.29 Array.prototype.values() // 22.1.3.30 Array.prototype[@@iterator]() module.exports=interopDefault(require$$0$9)(Array,'Array',function(iterated,kind){this._t=toIObject(iterated);// target this._i=0;// next index this._k=kind;// kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() },function(){var O=this._t,kind=this._k,index=this._i++;if(!O||index>=O.length){this._t=undefined;return step(1);}if(kind=='keys')return step(0,index);if(kind=='values')return step(0,O[index]);return step(0,[index,O[index]]);},'values');// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments=Iterators.Array;addToUnscopables('keys');addToUnscopables('values');addToUnscopables('entries');});var es6_array_iterator$1=interopDefault(es6_array_iterator);var require$$5$1=Object.freeze({'default':es6_array_iterator$1});var web_dom_iterable=createCommonjsModule(function(module){var $iterators=interopDefault(require$$5$1),redefine=interopDefault(require$$0$3),global=interopDefault(require$$3$1),hide=interopDefault(require$$0$4),Iterators=interopDefault(require$$1$5),wks=interopDefault(require$$0$1),ITERATOR=wks('iterator'),TO_STRING_TAG=wks('toStringTag'),ArrayValues=Iterators.Array;for(var collections=['NodeList','DOMTokenList','MediaList','StyleSheetList','CSSRuleList'],i=0;i<5;i++){var NAME=collections[i],Collection=global[NAME],proto=Collection&&Collection.prototype,key;if(proto){if(!proto[ITERATOR])hide(proto,ITERATOR,ArrayValues);if(!proto[TO_STRING_TAG])hide(proto,TO_STRING_TAG,NAME);Iterators[NAME]=ArrayValues;for(key in $iterators){if(!proto[key])redefine(proto,key,$iterators[key],true);}}}});interopDefault(web_dom_iterable);var _anInstance=createCommonjsModule(function(module){module.exports=function(it,Constructor,name,forbiddenField){if(!(it instanceof Constructor)||forbiddenField!==undefined&&forbiddenField in it){throw TypeError(name+': incorrect invocation!');}return it;};});var _anInstance$1=interopDefault(_anInstance);var require$$10=Object.freeze({'default':_anInstance$1});var _iterCall=createCommonjsModule(function(module){// call something on iterator step with safe closing on error var anObject=interopDefault(require$$2$1);module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value);// 7.4.6 IteratorClose(iterator, completion) }catch(e){var ret=iterator['return'];if(ret!==undefined)anObject(ret.call(iterator));throw e;}};});var _iterCall$1=interopDefault(_iterCall);var require$$4$3=Object.freeze({'default':_iterCall$1});var _isArrayIter=createCommonjsModule(function(module){// check on default Array iterator var Iterators=interopDefault(require$$1$5),ITERATOR=interopDefault(require$$0$1)('iterator'),ArrayProto=Array.prototype;module.exports=function(it){return it!==undefined&&(Iterators.Array===it||ArrayProto[ITERATOR]===it);};});var _isArrayIter$1=interopDefault(_isArrayIter);var require$$3$7=Object.freeze({'default':_isArrayIter$1});var core_getIteratorMethod=createCommonjsModule(function(module){var classof=interopDefault(require$$3),ITERATOR=interopDefault(require$$0$1)('iterator'),Iterators=interopDefault(require$$1$5);module.exports=interopDefault(require$$0$6).getIteratorMethod=function(it){if(it!=undefined)return it[ITERATOR]||it['@@iterator']||Iterators[classof(it)];};});var core_getIteratorMethod$1=interopDefault(core_getIteratorMethod);var require$$0$13=Object.freeze({'default':core_getIteratorMethod$1});var _forOf=createCommonjsModule(function(module){var ctx=interopDefault(require$$5),call=interopDefault(require$$4$3),isArrayIter=interopDefault(require$$3$7),anObject=interopDefault(require$$2$1),toLength=interopDefault(require$$1$11),getIterFn=interopDefault(require$$0$13),BREAK={},RETURN={};var exports=module.exports=function(iterable,entries,fn,that,ITERATOR){var iterFn=ITERATOR?function(){return iterable;}:getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0,length,step,iterator,result;if(typeof iterFn!='function')throw TypeError(iterable+' is not iterable!');// fast case for arrays with default iterator if(isArrayIter(iterFn))for(length=toLength(iterable.length);length>index;index++){result=entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index]);if(result===BREAK||result===RETURN)return result;}else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;){result=call(iterator,f,step.value,entries);if(result===BREAK||result===RETURN)return result;}};exports.BREAK=BREAK;exports.RETURN=RETURN;});var _forOf$1=interopDefault(_forOf);var require$$9=Object.freeze({'default':_forOf$1});var _speciesConstructor=createCommonjsModule(function(module){// 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject=interopDefault(require$$2$1),aFunction=interopDefault(require$$1$4),SPECIES=interopDefault(require$$0$1)('species');module.exports=function(O,D){var C=anObject(O).constructor,S;return C===undefined||(S=anObject(C)[SPECIES])==undefined?D:aFunction(S);};});var _speciesConstructor$1=interopDefault(_speciesConstructor);var require$$8=Object.freeze({'default':_speciesConstructor$1});var _invoke=createCommonjsModule(function(module){// fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);}return fn.apply(that,args);};});var _invoke$1=interopDefault(_invoke);var require$$4$4=Object.freeze({'default':_invoke$1});var _task=createCommonjsModule(function(module){var ctx=interopDefault(require$$5),invoke=interopDefault(require$$4$4),html=interopDefault(require$$3$4),cel=interopDefault(require$$2$3),global=interopDefault(require$$3$1),process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE='onreadystatechange',defer,channel,port;var run=function run(){var id=+this;if(queue.hasOwnProperty(id)){var fn=queue[id];delete queue[id];fn();}};var listener=function listener(event){run.call(event.data);};// Node.js 0.9+ & IE10+ has setImmediate, otherwise: if(!setTask||!clearTask){setTask=function setImmediate(fn){var args=[],i=1;while(arguments.length>i){args.push(arguments[i++]);}queue[++counter]=function(){invoke(typeof fn=='function'?fn:Function(fn),args);};defer(counter);return counter;};clearTask=function clearImmediate(id){delete queue[id];};// Node.js 0.8- if(interopDefault(require$$0)(process)=='process'){defer=function defer(id){process.nextTick(ctx(run,id,1));};// Browsers with MessageChannel, includes WebWorkers }else if(MessageChannel){channel=new MessageChannel();port=channel.port2;channel.port1.onmessage=listener;defer=ctx(port.postMessage,port,1);// Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' }else if(global.addEventListener&&typeof postMessage=='function'&&!global.importScripts){defer=function defer(id){global.postMessage(id+'','*');};global.addEventListener('message',listener,false);// IE8- }else if(ONREADYSTATECHANGE in cel('script')){defer=function defer(id){html.appendChild(cel('script'))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run.call(id);};};// Rest old browsers }else{defer=function defer(id){setTimeout(ctx(run,id,1),0);};}}module.exports={set:setTask,clear:clearTask};});var _task$1=interopDefault(_task);var set=_task.set;var clear=_task.clear;var require$$1$14=Object.freeze({'default':_task$1,set:set,clear:clear});var _microtask=createCommonjsModule(function(module){var global=interopDefault(require$$3$1),macrotask=interopDefault(require$$1$14).set,Observer=global.MutationObserver||global.WebKitMutationObserver,process=global.process,Promise=global.Promise,isNode=interopDefault(require$$0)(process)=='process';module.exports=function(){var head,last,notify;var flush=function flush(){var parent,fn;if(isNode&&(parent=process.domain))parent.exit();while(head){fn=head.fn;head=head.next;try{fn();}catch(e){if(head)notify();else last=undefined;throw e;}}last=undefined;if(parent)parent.enter();};// Node.js if(isNode){notify=function notify(){process.nextTick(flush);};// browsers with MutationObserver }else if(Observer){var toggle=true,node=document.createTextNode('');new Observer(flush).observe(node,{characterData:true});// eslint-disable-line no-new notify=function notify(){node.data=toggle=!toggle;};// environments with maybe non-completely correct, but existent Promise }else if(Promise&&Promise.resolve){var promise=Promise.resolve();notify=function notify(){promise.then(flush);};// for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout }else{notify=function notify(){// strange IE + webpack dev server bug - use .call(global) macrotask.call(global,flush);};}return function(fn){var task={fn:fn,next:undefined};if(last)last.next=task;if(!head){head=task;notify();}last=task;};};});var _microtask$1=interopDefault(_microtask);var require$$6=Object.freeze({'default':_microtask$1});var _redefineAll=createCommonjsModule(function(module){var redefine=interopDefault(require$$0$3);module.exports=function(target,src,safe){for(var key in src){redefine(target,key,src[key],safe);}return target;};});var _redefineAll$1=interopDefault(_redefineAll);var require$$4$5=Object.freeze({'default':_redefineAll$1});var _setSpecies=createCommonjsModule(function(module){'use strict';var global=interopDefault(require$$3$1),dP=interopDefault(require$$2),DESCRIPTORS=interopDefault(require$$1$1),SPECIES=interopDefault(require$$0$1)('species');module.exports=function(KEY){var C=global[KEY];if(DESCRIPTORS&&C&&!C[SPECIES])dP.f(C,SPECIES,{configurable:true,get:function get(){return this;}});};});var _setSpecies$1=interopDefault(_setSpecies);var require$$2$5=Object.freeze({'default':_setSpecies$1});var _iterDetect=createCommonjsModule(function(module){var ITERATOR=interopDefault(require$$0$1)('iterator'),SAFE_CLOSING=false;try{var riter=[7][ITERATOR]();riter['return']=function(){SAFE_CLOSING=true;};Array.from(riter,function(){throw 2;});}catch(e){/* empty */}module.exports=function(exec,skipClosing){if(!skipClosing&&!SAFE_CLOSING)return false;var safe=false;try{var arr=[7],iter=arr[ITERATOR]();iter.next=function(){return{done:safe=true};};arr[ITERATOR]=function(){return iter;};exec(arr);}catch(e){/* empty */}return safe;};});var _iterDetect$1=interopDefault(_iterDetect);var require$$0$14=Object.freeze({'default':_iterDetect$1});var es6_promise=createCommonjsModule(function(module){'use strict';var LIBRARY=interopDefault(require$$17),global=interopDefault(require$$3$1),ctx=interopDefault(require$$5),classof=interopDefault(require$$3),$export=interopDefault(require$$13),isObject=interopDefault(require$$12),aFunction=interopDefault(require$$1$4),anInstance=interopDefault(require$$10),forOf=interopDefault(require$$9),speciesConstructor=interopDefault(require$$8),task=interopDefault(require$$1$14).set,microtask=interopDefault(require$$6)(),PROMISE='Promise',TypeError=global.TypeError,process=global.process,$Promise=global[PROMISE],process=global.process,isNode=classof(process)=='process',empty=function empty(){/* empty */},Internal,GenericPromiseCapability,Wrapper;var USE_NATIVE=!!function(){try{// correct subclassing with @@species support var promise=$Promise.resolve(1),FakePromise=(promise.constructor={})[interopDefault(require$$0$1)('species')]=function(exec){exec(empty,empty);};// unhandled rejections tracking support, NodeJS Promise without it fails @@species test return(isNode||typeof PromiseRejectionEvent=='function')&&promise.then(empty)instanceof FakePromise;}catch(e){/* empty */}}();// helpers var sameConstructor=function sameConstructor(a,b){// with library wrapper special case return a===b||a===$Promise&&b===Wrapper;};var isThenable=function isThenable(it){var then;return isObject(it)&&typeof(then=it.then)=='function'?then:false;};var newPromiseCapability=function newPromiseCapability(C){return sameConstructor($Promise,C)?new PromiseCapability(C):new GenericPromiseCapability(C);};var PromiseCapability=GenericPromiseCapability=function GenericPromiseCapability(C){var resolve,reject;this.promise=new C(function($$resolve,$$reject){if(resolve!==undefined||reject!==undefined)throw TypeError('Bad Promise constructor');resolve=$$resolve;reject=$$reject;});this.resolve=aFunction(resolve);this.reject=aFunction(reject);};var perform=function perform(exec){try{exec();}catch(e){return{error:e};}};var notify=function notify(promise,isReject){if(promise._n)return;promise._n=true;var chain=promise._c;microtask(function(){var value=promise._v,ok=promise._s==1,i=0;var run=function run(reaction){var handler=ok?reaction.ok:reaction.fail,resolve=reaction.resolve,reject=reaction.reject,domain=reaction.domain,result,then;try{if(handler){if(!ok){if(promise._h==2)onHandleUnhandled(promise);promise._h=1;}if(handler===true)result=value;else{if(domain)domain.enter();result=handler(value);if(domain)domain.exit();}if(result===reaction.promise){reject(TypeError('Promise-chain cycle'));}else if(then=isThenable(result)){then.call(result,resolve,reject);}else resolve(result);}else reject(value);}catch(e){reject(e);}};while(chain.length>i){run(chain[i++]);}// variable length - can't use forEach promise._c=[];promise._n=false;if(isReject&&!promise._h)onUnhandled(promise);});};var onUnhandled=function onUnhandled(promise){task.call(global,function(){var value=promise._v,abrupt,handler,console;if(isUnhandled(promise)){abrupt=perform(function(){if(isNode){process.emit('unhandledRejection',value,promise);}else if(handler=global.onunhandledrejection){handler({promise:promise,reason:value});}else if((console=global.console)&&console.error){console.error('Unhandled promise rejection',value);}});// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should promise._h=isNode||isUnhandled(promise)?2:1;}promise._a=undefined;if(abrupt)throw abrupt.error;});};var isUnhandled=function isUnhandled(promise){if(promise._h==1)return false;var chain=promise._a||promise._c,i=0,reaction;while(chain.length>i){reaction=chain[i++];if(reaction.fail||!isUnhandled(reaction.promise))return false;}return true;};var onHandleUnhandled=function onHandleUnhandled(promise){task.call(global,function(){var handler;if(isNode){process.emit('rejectionHandled',promise);}else if(handler=global.onrejectionhandled){handler({promise:promise,reason:promise._v});}});};var $reject=function $reject(value){var promise=this;if(promise._d)return;promise._d=true;promise=promise._w||promise;// unwrap promise._v=value;promise._s=2;if(!promise._a)promise._a=promise._c.slice();notify(promise,true);};var $resolve=function $resolve(value){var promise=this,then;if(promise._d)return;promise._d=true;promise=promise._w||promise;// unwrap try{if(promise===value)throw TypeError("Promise can't be resolved itself");if(then=isThenable(value)){microtask(function(){var wrapper={_w:promise,_d:false};// wrap try{then.call(value,ctx($resolve,wrapper,1),ctx($reject,wrapper,1));}catch(e){$reject.call(wrapper,e);}});}else{promise._v=value;promise._s=1;notify(promise,false);}}catch(e){$reject.call({_w:promise,_d:false},e);// wrap }};// constructor polyfill if(!USE_NATIVE){// 25.4.3.1 Promise(executor) $Promise=function Promise(executor){anInstance(this,$Promise,PROMISE,'_h');aFunction(executor);Internal.call(this);try{executor(ctx($resolve,this,1),ctx($reject,this,1));}catch(err){$reject.call(this,err);}};Internal=function Promise(executor){this._c=[];// <- awaiting reactions this._a=undefined;// <- checked in isUnhandled reactions this._s=0;// <- state this._d=false;// <- done this._v=undefined;// <- value this._h=0;// <- rejection state, 0 - default, 1 - handled, 2 - unhandled this._n=false;// <- notify };Internal.prototype=interopDefault(require$$4$5)($Promise.prototype,{// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) then:function then(onFulfilled,onRejected){var reaction=newPromiseCapability(speciesConstructor(this,$Promise));reaction.ok=typeof onFulfilled=='function'?onFulfilled:true;reaction.fail=typeof onRejected=='function'&&onRejected;reaction.domain=isNode?process.domain:undefined;this._c.push(reaction);if(this._a)this._a.push(reaction);if(this._s)notify(this,false);return reaction.promise;},// 25.4.5.1 Promise.prototype.catch(onRejected) 'catch':function _catch(onRejected){return this.then(undefined,onRejected);}});PromiseCapability=function PromiseCapability(){var promise=new Internal();this.promise=promise;this.resolve=ctx($resolve,promise,1);this.reject=ctx($reject,promise,1);};}$export($export.G+$export.W+$export.F*!USE_NATIVE,{Promise:$Promise});interopDefault(require$$3$5)($Promise,PROMISE);interopDefault(require$$2$5)(PROMISE);Wrapper=interopDefault(require$$0$6)[PROMISE];// statics $export($export.S+$export.F*!USE_NATIVE,PROMISE,{// 25.4.4.5 Promise.reject(r) reject:function reject(r){var capability=newPromiseCapability(this),$$reject=capability.reject;$$reject(r);return capability.promise;}});$export($export.S+$export.F*(LIBRARY||!USE_NATIVE),PROMISE,{// 25.4.4.6 Promise.resolve(x) resolve:function resolve(x){// instanceof instead of internal slot check because we should fix it without replacement native Promise core if(x instanceof $Promise&&sameConstructor(x.constructor,this))return x;var capability=newPromiseCapability(this),$$resolve=capability.resolve;$$resolve(x);return capability.promise;}});$export($export.S+$export.F*!(USE_NATIVE&&interopDefault(require$$0$14)(function(iter){$Promise.all(iter)['catch'](empty);})),PROMISE,{// 25.4.4.1 Promise.all(iterable) all:function all(iterable){var C=this,capability=newPromiseCapability(C),resolve=capability.resolve,reject=capability.reject;var abrupt=perform(function(){var values=[],index=0,remaining=1;forOf(iterable,false,function(promise){var $index=index++,alreadyCalled=false;values.push(undefined);remaining++;C.resolve(promise).then(function(value){if(alreadyCalled)return;alreadyCalled=true;values[$index]=value;--remaining||resolve(values);},reject);});--remaining||resolve(values);});if(abrupt)reject(abrupt.error);return capability.promise;},// 25.4.4.4 Promise.race(iterable) race:function race(iterable){var C=this,capability=newPromiseCapability(C),reject=capability.reject;var abrupt=perform(function(){forOf(iterable,false,function(promise){C.resolve(promise).then(capability.resolve,reject);});});if(abrupt)reject(abrupt.error);return capability.promise;}});});interopDefault(es6_promise);var promise=createCommonjsModule(function(module){module.exports=interopDefault(require$$0$6).Promise;});var promisePoly=interopDefault(promise);var base64=createCommonjsModule(function(module,exports){;(function(){var object=typeof exports!='undefined'?exports:this;// #8: web workers var chars='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';function InvalidCharacterError(message){this.message=message;}InvalidCharacterError.prototype=new Error();InvalidCharacterError.prototype.name='InvalidCharacterError';// encoder // [https://gist.github.com/999166] by [https://github.com/nignag] object.btoa||(object.btoa=function(input){var str=String(input);for(// initialize result and counter var block,charCode,idx=0,map=chars,output='';// if the next str index does not exist: // change the mapping table to "=" // check if d has no fractional digits str.charAt(idx|0)||(map='=',idx%1);// "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 output+=map.charAt(63&block>>8-idx%1*8)){charCode=str.charCodeAt(idx+=3/4);if(charCode>0xFF){throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");}block=block<<8|charCode;}return output;});// decoder // [https://gist.github.com/1020396] by [https://github.com/atk] object.atob||(object.atob=function(input){var str=String(input).replace(/=+$/,'');if(str.length%4==1){throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded.");}for(// initialize result and counters var bc=0,bs,buffer,idx=0,output='';// get next character buffer=str.charAt(idx++);// character found in table? initialize bit storage and add its ascii value; ~buffer&&(bs=bc%4?bs*64+buffer:buffer,// and if not first of each 4 characters, // convert the first 8 bits to one ascii character bc++%4)?output+=String.fromCharCode(255&bs>>(-2*bc&6)):0){// try to find character in table (0-63, not found => -1) buffer=chars.indexOf(buffer);}return output;});})();});var base64$1=interopDefault(base64);/* global global */var globalNamespace=void 0;if(typeof commonjsGlobal==='undefined'){globalNamespace=window;}else{globalNamespace=commonjsGlobal;}function add(key,value){if(!globalNamespace[key]){globalNamespace[key]=value;}}var global$1=globalNamespace;// drop in polyfills from base64 add('btoa',base64$1.btoa);add('atob',base64$1.atob);// drop in polyfills from Promise add('Promise',promisePoly);/* eslint no-undefined: 0 */var assign=void 0;if(typeof Object.assign==='function'){assign=Object.assign;}else{assign=function assign(target){if(target===undefined||target===null){throw new TypeError('Cannot convert undefined or null to object');}var output=Object(target);var propertyObjects=[].slice.call(arguments,1);if(propertyObjects.length>0){propertyObjects.forEach(function(source){if(source!==undefined&&source!==null){var nextKey=void 0;for(nextKey in source){if(source.hasOwnProperty(nextKey)){output[nextKey]=source[nextKey];}}}});}return output;};}var assign$1=assign;var includes=void 0;if(!Array.prototype.includes){includes=function includes(array,searchElement){var ObjectifiedArray=Object(array);var length=parseInt(ObjectifiedArray.length,10)||0;if(length===0){return false;}var startIndex=parseInt(arguments[1],10)||0;var index=void 0;if(startIndex>=0){index=startIndex;}else{index=length+startIndex;if(index<0){index=0;}}while(index<length){var currentElement=ObjectifiedArray[index];/* eslint no-self-compare:0 */if(searchElement===currentElement||searchElement!==searchElement&&currentElement!==currentElement){// NaN !== NaN return true;}index++;}return false;};}else{includes=function includes(array){var args=[].slice.call(arguments,1);return Array.prototype.includes.apply(array,args);};}var includes$1=includes;function wrap(func,superFunc){function superWrapper(){var originalSuper=this['super'];this['super']=function(){return superFunc.apply(this,arguments);};var ret=func.apply(this,arguments);this['super']=originalSuper;return ret;}superWrapper.wrappedFunction=func;return superWrapper;}function defineProperties(names,proto,destination){var parentProto=Object.getPrototypeOf(destination);names.forEach(function(name){var descriptor=Object.getOwnPropertyDescriptor(proto,name);var parentDescriptor=parentProto.hasOwnProperty(name)&&Object.getOwnPropertyDescriptor(parentProto,name);if(typeof parentDescriptor.value==='function'&&typeof descriptor.value==='function'){var wrappedFunction=wrap(descriptor.value,parentDescriptor.value);Object.defineProperty(destination,name,{value:wrappedFunction});}else{Object.defineProperty(destination,name,descriptor);}});}function createClass(props){var parent=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Object;var Constructor=wrap(props.constructor,parent);var instancePropertyNames=Object.getOwnPropertyNames(props).filter(function(key){return!includes$1(['constructor','static'],key);});assign$1(Constructor,parent);Constructor.prototype=Object.create(parent.prototype);defineProperties(instancePropertyNames,props,Constructor.prototype);Constructor.prototype.constructor=Constructor;var staticProps=props['static'];if(staticProps){var staticPropertyNames=Object.getOwnPropertyNames(staticProps);defineProperties(staticPropertyNames,staticProps,Constructor);}return Constructor;}var CoreObject=createClass({constructor:function constructor(){},'static':{extend:function extend(subClassProps){return createClass(subClassProps,this);}}});function wrapConsole(logCommand){var logMethod=function logMethod(){var log=void 0;/* eslint-disable no-console */if(console[logCommand]){log=Function.prototype.bind.call(console[logCommand],console);}else{log=Function.prototype.bind.call(console.log,console);}log.apply(undefined,arguments);/* eslint-enable no-console */};return function(){var args=[].concat(Array.prototype.slice.call(arguments));args.unshift('[JS-BUY-SDK]: ');logMethod.apply(undefined,_toConsumableArray(args));};}var Logger=CoreObject.extend({constructor:function constructor(){},debug:wrapConsole('debug'),info:wrapConsole('info'),warn:wrapConsole('warn'),error:wrapConsole('error')});var logger=new Logger();/** * @module shopify-buy * @submodule config */var Config=CoreObject.extend({constructor:function constructor(attrs){var _this=this;Object.keys(this.deprecatedProperties).forEach(function(key){if(attrs.hasOwnProperty(key)){var transformName=_this.deprecatedProperties[key];var transform=_this[transformName];transform(attrs[key],attrs);}});this.requiredProperties.forEach(function(key){if(!attrs.hasOwnProperty(key)){throw new Error('new Config() requires the option \''+key+'\'');}else{_this[key]=attrs[key];}});},/** * An object with keys for deprecated properties and values as functions that * will transform the value into a usable value. A depracation transform should * have the value signature function(deprecated_value, config_to_be_transformed) * @attribute deprecatedProperties * @default { myShopifyDomain: this.transformMyShopifyDomain } * @type Object * @private */deprecatedProperties:{myShopifyDomain:'transformMyShopifyDomain'},transformMyShopifyDomain:function transformMyShopifyDomain(subdomain,attrs){logger.warn('Config - ','myShopifyDomain is deprecated, please use domain and provide the full shop domain.');attrs.domain=subdomain+'.myshopify.com';},/** * Properties that must be set on initializations * @attribute requiredProperties * @default ['apiKey', 'appId', 'myShopifyDomain'] * @type Array * @private */requiredProperties:['apiKey','appId','domain'],/** * The apiKey for authenticating against shopify. This is your api client's * public api token. Not the shared secret. Set during initialation. * @attribute apiKey * @default '' * @type String * @public */apiKey:'',/** * @attribute appId * @default '' * @type String * @public */appId:'',/** * The domain that all the api requests will go to * @attribute domain * @default '' * @type String * @public */domain:'',/** * The subdomain of myshopify.io that all the api requests will go to * @attribute myShopifyDomain * @default '' * @type String * @public * @deprecated Use `config.domain` instead. */myShopifyDomain:''});var version$1=undefined;var BaseModel=CoreObject.extend({constructor:function constructor(){var attrs=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var metaAttrs=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};this.attrs=attrs;assign$1(this,metaAttrs);},attrs:null,serializer:null,adapter:null,shopClient:null});/** * Class for product option * @class Option * @constructor */var ProductOptionModel=BaseModel.extend(Object.defineProperties({constructor:function constructor(){this['super'].apply(this,arguments);this.selected=this.values[0];}},{name:{get:function get(){return this.attrs.name;},configurable:true,enumerable:true},values:{get:function get(){return this.attrs.values;},configurable:true,enumerable:true},selected:{get:function get(){return this._selected;},set:function set(value){if(includes$1(this.values,value)){this._selected=value;}else{throw new Error('Invalid option selection for '+this.name+'.');}return value;},configurable:true,enumerable:true}}));/** * Model for product variant * @class ProductVariantModel * @constructor */var ProductVariantModel=BaseModel.extend(Object.defineProperties({constructor:function constructor(){this['super'].apply(this,arguments);},checkoutUrl:function checkoutUrl(){var quantity=arguments.length>0&&arguments[0]!==undefined?arguments[0]:1;var config=this.config;var baseUrl='https://'+config.domain+'/cart';var variantPath=this.id+':'+parseInt(quantity,10);var query='api_key='+config.apiKey;return baseUrl+'/'+variantPath+'?'+query;}},{id:{get:function get(){return this.attrs.variant.id;},configurable:true,enumerable:true},productId:{get:function get(){return this.attrs.product.id;},configurable:true,enumerable:true},title:{get:function get(){return this.attrs.variant.title;},configurable:true,enumerable:true},productTitle:{get:function get(){return this.attrs.product.title;},configurable:true,enumerable:true},compareAtPrice:{get:function get(){return this.attrs.variant.compare_at_price;},configurable:true,enumerable:true},price:{get:function get(){return this.attrs.variant.price;},configurable:true,enumerable:true},formattedPrice:{get:function get(){return this.attrs.variant.formatted_price;},configurable:true,enumerable:true},grams:{get:function get(){return this.attrs.variant.grams;},configurable:true,enumerable:true},optionValues:{get:function get(){return this.attrs.variant.option_values;},configurable:true,enumerable:true},available:{get:function get(){return this.attrs.variant.available;},configurable:true,enumerable:true},image:{get:function get(){var id=this.id;var images=this.attrs.product.images;var primaryImage=images[0];var variantImage=images.filter(function(image){return image.variant_ids.indexOf(id)!==-1;})[0];return variantImage||primaryImage;},configurable:true,enumerable:true},imageVariants:{get:function get(){var image=this.image;if(!image){return[];}var src=this.image.src;var extensionIndex=src.lastIndexOf('.');var pathAndBasename=src.slice(0,extensionIndex);var extension=src.slice(extensionIndex);var variants=[{name:'pico',dimension:'16x16'},{name:'icon',dimension:'32x32'},{name:'thumb',dimension:'50x50'},{name:'small',dimension:'100x100'},{name:'compact',dimension:'160x160'},{name:'medium',dimension:'240x240'},{name:'large',dimension:'480x480'},{name:'grande',dimension:'600x600'},{name:'1024x1024',dimension:'1024x1024'},{name:'2048x2048',dimension:'2048x2048'}];variants.forEach(function(variant){variant.src=pathAndBasename+'_'+variant.name+extension;});return variants;},configurable:true,enumerable:true}}));function uniq(array){return array.reduce(function(uniqueArray,item){if(uniqueArray.indexOf(item)<0){uniqueArray.push(item);}return uniqueArray;},[]);}var NO_IMAGE_URI='https://widgets.shopifyapps.com/assets/no-image.svg';/** * Class for products returned by fetch('product') * @class ProductModel * @constructor */var ProductModel=BaseModel.extend(Object.defineProperties({constructor:function constructor(){this['super'].apply(this,arguments);}},{id:{get:function get(){return this.attrs.product_id;},configurable:true,enumerable:true},title:{get:function get(){return this.attrs.title;},configurable:true,enumerable:true},description:{get:function get(){return this.attrs.body_html;},configurable:true,enumerable:true},images:{get:function get(){return this.attrs.images;},configurable:true,enumerable:true},memoized:{get:function get(){this._memoized=this._memoized||{};return this._memoized;},configurable:true,enumerable:true},options:{get:function get(){if(this.memoized.options){return this.memoized.options;}var baseOptions=this.attrs.options;var variants=this.variants;this.memoized.options=baseOptions.map(function(option){var name=option.name;var dupedValues=variants.reduce(function(valueList,variant){var optionValueForOption=variant.optionValues.filter(function(optionValue){return optionValue.name===option.name;})[0];valueList.push(optionValueForOption.value);return valueList;},[]);var values=uniq(dupedValues);return new ProductOptionModel({name:name,values:values});});return this.memoized.options;},configurable:true,enumerable:true},variants:{get:function get(){var _this2=this;return this.attrs.variants.map(function(variant){return new ProductVariantModel({variant:variant,product:_this2},{config:_this2.config});});},configurable:true,enumerable:true},selections:{get:function get(){return this.options.map(function(option){return option.selected;});},configurable:true,enumerable:true},selectedVariant:{get:function get(){var variantTitle=this.selections.join(' / ');return this.variants.filter(function(variant){return variant.title===variantTitle;})[0]||null;},configurable:true,enumerable:true},selectedVariantImage:{get:function get(){if(!this.selectedVariant){return null;}return this.selectedVariant.image;},configurable:true,enumerable:true}}));var ListingsSerializer=CoreObject.extend({constructor:function constructor(config){this.config=config;},rootKeyForType:function rootKeyForType(type){return type.slice(0,-1)+'_listing';},models:{collections:BaseModel,products:ProductModel},modelForType:function modelForType(type){return this.models[type];},deserializeSingle:function deserializeSingle(type){var singlePayload=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var metaAttrs=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var modelAttrs=singlePayload[this.rootKeyForType(type)];var model=this.modelFromAttrs(type,modelAttrs,metaAttrs);return model;},deserializeMultiple:function deserializeMultiple(type){var _this3=this;var collectionPayload=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var metaAttrs=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var models=collectionPayload[this.rootKeyForType(type)+'s'];return models.map(function(attrs){var model=_this3.modelFromAttrs(type,attrs,metaAttrs);return model;});},modelFromAttrs:function modelFromAttrs(type,attrs,metaAttrs){var Model=this.modelForType(type);metaAttrs.config=this.config;return new Model(attrs,metaAttrs);}});function authToUrl(url,opts){var authorization=void 0;if(opts.headers){Object.keys(opts.headers).forEach(function(key){if(key.toLowerCase()==='authorization'){authorization=opts.headers[key];}});}if(authorization){var hashedKey=authorization.split(' ').slice(-1)[0];try{var plainKey=atob(hashedKey);var newUrl=void 0;if(url.indexOf('?')>-1){newUrl=url+'&_x_http_authorization='+plainKey;}else{newUrl=url+'?_x_http_authorization='+plainKey;}return newUrl;}catch(e){// atob choked on non-encoded data. Therefore, not a form of auth we // support. // // NOOP // }}/* eslint newline-before-return: 0 */return url;}function ie9Ajax(method,url,opts){return new Promise(function(resolve,reject){var xdr=new XDomainRequest();xdr.onload=function(){try{var json=JSON.parse(xdr.responseText);resolve({json:json,originalResponse:xdr,isJSON:true});}catch(e){resolve({text:xdr.responseText,originalResponse:xdr,isText:true});}};function handleError(){reject(new Error('There was an error with the XDR'));}xdr.onerror=handleError;xdr.ontimeout=handleError;xdr.open(method,authToUrl(url,opts));xdr.send(opts.data);});}function isNodeLikeEnvironment(){var windowAbsent=typeof window==='undefined';var requirePresent='function'==='function';return windowAbsent&&requirePresent;}function checkStatus(response){if(response.status>=200&&response.status<300){return response;}var error=new Error(response.statusText);error.status=response.status;error.response=response;throw error;}function parseResponse(response){return response.json().then(function(json){return{json:json,originalResponse:response,isJSON:true};})['catch'](function(){var responseClone=response.clone();return responseClone.text().then(function(text){return{text:text,originalResponse:responseClone,isText:true};});});}function ajax(method,url){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};// we need to check that we're not running in Node // before we should check if this is ie9 if(!isNodeLikeEnvironment()){var xhr=new XMLHttpRequest();if(!('withCredentials'in xhr)){return ie9Ajax.apply(undefined,arguments);}}opts.method=method;opts.mode='cors';return fetch(url,opts).then(checkStatus).then(parseResponse);}var ListingsAdapter=CoreObject.extend(Object.defineProperties({ajax:ajax,constructor:function constructor(config){this.config=config;},pathForType:function pathForType(type){return'/'+type.slice(0,-1)+'_listings';},buildUrl:function buildUrl(singleOrMultiple,type,idOrQuery){switch(singleOrMultiple){case'multiple':return this.buildMultipleUrl(type,idOrQuery);case'single':return this.buildSingleUrl(type,idOrQuery);default:return'';}},buildMultipleUrl:function buildMultipleUrl(type){var query=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var url=''+this.baseUrl+this.pathForType(type);var paramNames=Object.keys(query);if(paramNames.length>0){var queryString=paramNames.map(function(key){var value=void 0;if(Array.isArray(query[key])){value=query[key].join(',');}else{value=query[key];}return key+'='+encodeURIComponent(value);}).join('&');return url+'?'+queryString;}return url;},buildSingleUrl:function buildSingleUrl(type,id){return''+this.baseUrl+this.pathForType(type)+'/'+id;},fetchMultiple:function fetchMultiple()/* type, [query] */{var url=this.buildUrl.apply(this,['multiple'].concat(Array.prototype.slice.call(arguments)));return this.ajax('GET',url,{headers:this.headers}).then(function(response){return response.json;});},fetchSingle:function fetchSingle()/* type, id */{var url=this.buildUrl.apply(this,['single'].concat(Array.prototype.slice.call(arguments)));return this.ajax('GET',url,{headers:this.headers}).then(function(response){return response.json;});}},{base64ApiKey:{get:function get(){return btoa(this.config.apiKey);},configurable:true,enumerable:true},baseUrl:{get:function get(){var _config=this.config;var domain=_config.domain;var appId=_config.appId;return'https://'+domain+'/api/apps/'+appId;},configurable:true,enumerable:true},headers:{get:function get(){return{Authorization:'Basic '+this.base64ApiKey,'Content-Type':'application/json','X-SDK-Variant':'javascript','X-SDK-Version':version$1};},configurable:true,enumerable:true}}));/* eslint no-undefined: 0 complexity: 0 */var GUID_KEY='shopify-buy-uuid';var GUID_PREFIX='shopify-buy.'+Date.now();var GUID_DESC={writable:true,configurable:true,enumerable:true,value:null};var uuidSeed=0;function uuid(){return++uuidSeed;}var numberCache={};var stringCache={};function setGuidFor(obj){if(obj&&obj[GUID_KEY]){return obj[GUID_KEY];}if(obj===undefined){return'(undefined)';}if(obj===null){return'(null)';}var type=typeof obj==='undefined'?'undefined':_typeof(obj);var id=void 0;switch(type){case'number':id=numberCache[obj];if(!id){id=numberCache[obj]='nu'+obj;}break;case'string':id=stringCache[obj];if(!id){id=stringCache[obj]='st'+uuid();}break;case'boolean':if(obj){id='(true)';}else{id='(false)';}break;default:if(obj===Object){id='(Object)';break;}if(obj===Array){id='(Array)';break;}id=GUID_PREFIX+'.'+uuid();if(obj[GUID_KEY]===null){obj[GUID_KEY]=id;}else{GUID_DESC.value=id;Object.defineProperty(obj,GUID_KEY,GUID_DESC);}}return id;}var CartLineItem=BaseModel.extend(Object.defineProperties({constructor:function constructor(){this['super'].apply(this,arguments);}},{id:{get:function get(){return this.attrs[GUID_KEY];},configurable:true,enumerable:true},variant_id:{get:function get(){return this.attrs.variant_id;},configurable:true,enumerable:true},product_id:{get:function get(){return this.attrs.product_id;},configurable:true,enumerable:true},image:{get:function get(){return this.attrs.image;},configurable:true,enumerable:true},title:{get:function get(){return this.attrs.title;},configurable:true,enumerable:true},quantity:{get:function get(){return this.attrs.quantity;},set:function set(value){var parsedValue=parseInt(value,10);if(parsedValue<0){throw new Error('Quantities must be positive');}else if(parsedValue!==parseFloat(value)){/* incidentally, this covers all NaN values, because NaN !== Nan */throw new Error('Quantities must be whole numbers');}this.attrs.quantity=parsedValue;return this.attrs.quantity;},configurable:true,enumerable:true},properties:{get:function get(){return this.attrs.properties||{};},set:function set(value){this.attrs.properties=value||{};return value;},configurable:true,enumerable:true},variant_title:{get:function get(){return this.attrs.variant_title;},configurable:true,enumerable:true},price:{get:function get(){return this.attrs.price;},configurable:true,enumerable:true},compare_at_price:{get:function get(){return this.attrs.compare_at_price;},configurable:true,enumerable:true},line_price:{get:function get(){return(this.quantity*parseFloat(this.price)).toFixed(2);},configurable:true,enumerable:true},grams:{get:function get(){return this.attrs.grams;},configurable:true,enumerable:true}}));function objectsEqual(one,two){if(one===two){return true;}return Object.keys(one).every(function(key){if(one[key]instanceof Date){return one[key].toString()===two[key].toString();}else if(_typeof(one[key])==='object'){return objectsEqual(one[key],two[key]);}return one[key]===two[key];});}var CartModel=BaseModel.extend(Object.defineProperties({constructor:function constructor(){this['super'].apply(this,arguments);},addVariants:function addVariants(){var newLineItems=[].concat(Array.prototype.slice.call(arguments)).map(function(item){var lineItem={image:item.variant.image,variant_id:item.variant.id,product_id:item.variant.productId,title:item.variant.productTitle,quantity:parseInt(item.quantity,10),properties:item.properties||{},variant_title:item.variant.title,price:item.variant.price,compare_at_price:item.variant.compareAtPrice,grams:item.variant.grams};setGuidFor(lineItem);return lineItem;});var existingLineItems=this.attrs.line_items;existingLineItems.push.apply(existingLineItems,_toConsumableArray(newLineItems));var dedupedLineItems=existingLineItems.reduce(function(itemAcc,item){var matchingItem=itemAcc.filter(function(existingItem){return existingItem.variant_id===item.variant_id&&objectsEqual(existingItem.properties,item.properties);})[0];if(matchingItem){matchingItem.quantity=matchingItem.quantity+item.quantity;}else{itemAcc.push(item);}return itemAcc;},[]);// Users may pass negative numbers and remove items. This ensures there's no // item with a quantity of zero or less. this.attrs.line_items=dedupedLineItems.reduce(function(itemAcc,item){if(item.quantity>=1){itemAcc.push(item);}return itemAcc;},[]);return this.updateModel();},updateLineItem:function updateLineItem(id,quantity){if(quantity<1){return this.removeLineItem(id);}var lineItem=this.lineItems.filter(function(item){return item.id===id;})[0];if(lineItem){lineItem.quantity=quantity;return this.updateModel();}return new Promise(function(resolve,reject){reject(new Error('line item with id: '+id+' not found in cart#'+this.id));});},removeLineItem:function removeLineItem(id){var oldLength=this.lineItems.length;var newLineItems=this.lineItems.filter(function(item){return item.id!==id;});var newLength=newLineItems.length;if(newLength<oldLength){this.attrs.line_items=newLineItems.map(function(item){return item.attrs;});return this.updateModel();}return new Promise(function(resolve,reject){reject(new Error('line item with id: '+id+' not found in cart#'+this.id));});},clearLineItems:function clearLineItems(){this.attrs.line_items=[];return this.updateModel();},updateModel:function updateModel(){var _this4=this;return this.shopClient.update('carts',this).then(function(updateCart){assign$1(_this4.attrs,updateCart.attrs);return _this4;});}},{id:{get:function get(){return this.attrs[GUID_KEY];},configurable:true,enumerable:true},lineItems:{get:function get(){return(this.attrs.line_items||[]).map(function(item){return new CartLineItem(item);});},configurable:true,enumerable:true},lineItemCount:{get:function get(){return this.lineItems.reduce(function(total,item){return total+item.quantity;},0);},configurable:true,enumerable:true},subtotal:{get:function get(){var subtotal=this.lineItems.reduce(function(runningTotal,lineItem){return runningTotal+parseFloat(lineItem.line_price);},0);return subtotal.toFixed(2);},configurable:true,enumerable:true},checkoutUrl:{get:function get(){var config=this.config;var baseUrl='https://'+config.domain+'/cart';var variantPath=this.lineItems.map(function(item){return item.variant_id+':'+item.quantity;});var query='api_key='+config.apiKey;if(typeof global$1.ga==='function'){var linkerParam=void 0;global$1.ga(function(tracker){linkerParam=tracker.get('linkerParam');});if(linkerParam){query+='&'+linkerParam;}}return baseUrl+'/'+variantPath+'?'+query;},configurable:true,enumerable:true}}));var CartSerializer=CoreObject.extend({constructor:function constructor(config){this.config=config;},rootKeyForType:function rootKeyForType(type){return type.slice(0,-1);},modelForType:function modelForType()/* type */{return CartModel;},deserializeSingle:function deserializeSingle(type){var singlePayload=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var metaAttrs=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var modelAttrs=singlePayload[this.rootKeyForType(type)];var model=this.modelFromAttrs(type,modelAttrs,metaAttrs);return model;},modelFromAttrs:function modelFromAttrs(type,attrs,metaAttrs){var Model=this.modelForType(type);metaAttrs.config=this.config;return new Model(attrs,metaAttrs);},serialize:function serialize(type,model){var root=this.rootKeyForType(type);var payload={};var attrs=assign$1({},model.attrs);payload[root]=attrs;delete attrs.attributes;Object.keys(attrs).forEach(function(key){var value=attrs[key];if(value===null||typeof value==='string'&&value.length===0){delete attrs[key];}});return payload;}});var ReferenceModel=BaseModel.extend(Object.defineProperties({constructor:function constructor(attrs){if(Object.keys(attrs).indexOf('referenceId')<0){throw new Error('Missing key referenceId of reference. References to null are not allowed');}this['super'].apply(this,arguments);}},{id:{get:function get(){return this.attrs[GUID_KEY];},configurable:true,enumerable:true},referenceId:{get:function get(){return this.attrs.referenceId;},set:function set(value){this.attrs.referenceId=value;return value;},configurable:true,enumerable:true}}));var ReferenceSerializer=CoreObject.extend({constructor:function constructor(config){this.config=config;},modelForType:function modelForType()/* type */{return ReferenceModel;},deserializeSingle:function deserializeSingle(type){var singlePayload=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var metaAttrs=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var Model=this.modelForType(type);return new Model(singlePayload,metaAttrs);},serialize:function serialize(type,model){var attrs=assign$1({},model.attrs);return attrs;}});var Store=CoreObject.extend({constructor:function constructor(){this.localStorageAvailable=this.storageAvailable('localStorage');this.cache={};},setItem:function setItem(key,value){if(this.localStorageAvailable){localStorage.setItem(key,JSON.stringify(value));}else{this.cache[key]=value;}return value;},getItem:function getItem(key){if(this.localStorageAvailable){var stringValue=localStorage.getItem(key);try{return JSON.parse(stringValue);}catch(e){return null;}}else{return this.cache[key]||null;}},storageAvailable:function storageAvailable(type){try{var storage=global$1[type];var x='__storage_test__';storage.setItem(x,x);storage.removeItem(x);return true;}catch(e){return false;}}});var LocalStorageAdapter=CoreObject.extend({constructor:function constructor(){this.store=new Store();},idKeyForType:function idKeyForType()/* type */{return GUID_KEY;},fetchSingle:function fetchSingle(type,id){var _this5=this;return new Promise(function(resolve,reject){var value=_this5.store.getItem(_this5.storageKey(type,id));if(value===null){reject(new Error(type+'#'+id+' not found'));return;}resolve(value);});},create:function create(type,payload){var _this6=this;return new Promise(function(resolve){var id=_this6.identify(payload);_this6.store.setItem(_this6.storageKey(type,id),payload);resolve(payload);});},update:function update(type,id,payload){var _this7=this;return new Promise(function(resolve){_this7.store.setItem(_this7.storageKey(type,id),payload);resolve(payload);});},storageKey:function storageKey(type,id){return type+'.'+id;},identify:function identify(payload){var keys=Object.keys(payload);if(keys.length===1&&_typeof(payload[keys[0]])==='object'){return setGuidFor(payload[keys[0]]);}return setGuidFor(payload);}});/** * @module shopify-buy * @submodule shop-client */function fetchFactory(fetchType,type){var func=void 0;switch(fetchType){case'all':func=function func(){return this.fetchAll(type);};break;case'one':func=function func(){return this.fetch.apply(this,[type].concat(Array.prototype.slice.call(arguments)));};break;case'query':func=function func(){return this.fetchQuery.apply(this,[type].concat(Array.prototype.slice.call(arguments)));};break;}return func;}var ShopClient=CoreObject.extend(Object.defineProperties({constructor:function constructor(config){this.config=config;this.serializers={products:ListingsSerializer,collections:ListingsSerializer,carts:CartSerializer,references:ReferenceSerializer};this.adapters={products:ListingsAdapter,collections:ListingsAdapter,carts:LocalStorageAdapter,references:LocalStorageAdapter};},config:null,fetchAll:function fetchAll(type){var _this8=this;var adapter=new this.adapters[type](this.config);return adapter.fetchMultiple(type).then(function(payload){return _this8.deserialize(type,payload,adapter,null,{multiple:true});});},fetch:function fetch(type,id){var _this9=this;var adapter=new this.adapters[type](this.config);return adapter.fetchSingle(type,id).then(function(payload){return _this9.deserialize(type,payload,adapter,null,{single:true});});},fetchQuery:function fetchQuery(type,query){var _this10=this;var adapter=new this.adapters[type](this.config);return adapter.fetchMultiple(type,query).then(function(payload){return _this10.deserialize(type,payload,adapter,null,{multiple:true});});},create:function create(type){var _this11=this;var modelAttrs=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var adapter=new this.adapters[type](this.config);var serializer=new this.serializers[type](this.config);var Model=serializer.modelForType(type);var model=new Model(modelAttrs,{shopClient:this});var attrs=serializer.serialize(type,model);return adapter.create(type,attrs).then(function(payload){return _this11.deserialize(type,payload,adapter,serializer,{single:true});});},update:function update(type,updatedModel){var _this12=this;var adapter=updatedModel.adapter;var serializer=updatedModel.serializer;var serializedModel=serializer.serialize(type,updatedModel);var id=updatedModel.attrs[adapter.idKeyForType(type)];return adapter.update(type,id,serializedModel).then(function(payload){return _this12.deserialize(type,payload,adapter,serializer,{single:true});});},deserialize:function deserialize(type,payload,adapter,existingSerializer){var opts=arguments.length>4&&arguments[4]!==undefined?arguments[4]:{};var serializer=existingSerializer||new this.serializers[type](this.config);var meta={shopClient:this,adapter:adapter,serializer:serializer,type:type};var serializedPayload=void 0;if(opts.multiple){serializedPayload=serializer.deserializeMultiple(type,payload,meta);}else{serializedPayload=serializer.deserializeSingle(type,payload,meta);}return serializedPayload;},createCart:function createCart(){var userAttrs=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var baseAttrs={line_items:[]};var attrs={};assign$1(attrs,baseAttrs);assign$1(attrs,userAttrs);return this.create('carts',attrs);},updateCart:function updateCart(updatedCart){return this.update('carts',updatedCart);},/** * Retrieve a previously created cart by its key. * * ```javascript * client.fetchCart('shopify-buy.1459804699118.2').then(cart => { * console.log(cart); // The retrieved cart * }); * * @method fetchCart * @public * @param {String} id The cart's unique identifier * @return {Promise|CartModel} The cart model. * */fetchCart:fetchFactory('one','carts'),/** * Convenience wrapper for {{#crossLink "ShopClient/fetchAll:method"}} * {{/crossLink}}. Equivalent to: * * ```javascript * client.fetchAll('products'); * ``` * * @method fetchAllProducts * @private * @return {Promise|Array} The product models. */fetchAllProducts:fetchFactory('all','products'),/** * Convenience wrapper for {{#crossLink "ShopClient/fetchAll:method"}} * {{/crossLink}}. Equivalent to: * * ```javascript * client.fetchAll('collections'); * ``` * * @method fetchAllCollections * @private * @return {Promise|Array} The collection models. */fetchAllCollections:fetchFactory('all','collections'),/** * Fetch one product by its ID. * * ```javascript * client.fetchProduct(123).then(product => { * console.log(product); // The product with an ID of 123 * }); * ``` * * @method fetchProduct * @public * @param {String|Number} id a unique identifier * @return {Promise|BaseModel} The product model with the specified ID. */fetchProduct:fetchFactory('one','products'),/** * Fetch one collection by its ID. * * ```javascript * client.fetchCollection(123).then(collection => { * console.log(collection); // The collection with an ID of 123 * }); * ``` * * @method fetchCollection * @public * @param {String|Number} id a unique identifier * @return {Promise|BaseModel} The collection model with the specified ID. */fetchCollection:fetchFactory('one','collections'),/** * Fetches a list of products matching a specified query. * * ```javascript * client.fetchQueryProducts({ collection_id: 123, tag: ['hats'] }).then(products => { * console.log(products); // An array of products in collection `123` having the tag `hats` * }); * ``` * @method fetchQueryProducts * @public * @param {Object} query A query sent to the api server containing one or more of: * @param {String|Number} [query.collection_id] The ID of a collection to retrieve products from * @param {Array} [query.tag] A list of tags to filter the products by. Accepts up to 10 tags. * @param {Array} [query.product_ids] A list of product IDs to retrieve * @param {String|Number} [query.page=1] The page offset number of the current lookup (based on the `limit`) * @param {String|Number} [query.limit=50] The number of products to retrieve per page * @param {String} [query.handle] The handle of the product to look up * @param {String} [query.updated_at_min] Products updated since the supplied timestamp (format: 2008-12-31 03:00) * @return {Promise|Array} The product models. */fetchQueryProducts:fetchFactory('query','products'),/** * Fetches a list of collections matching a specified query. * * ```javascript * client.fetchQueryCollections({page: 2, limit: 20}).then(collections => { * console.log(collections); // An array of collection resources * }); * ``` * * @method fetchQueryCollections * @public * @param {Object} query a query sent to the api server. * @param {String|Number} [query.page=1] the page offset number of the current lookup (based on the `limit`) * @param {String|Number} [query.limit=50] the number of collections to retrieve per page * @return {Promise|Array} The collection models. */fetchQueryCollections:fetchFactory('query','collections'),fetchRecentCart:function fetchRecentCart(){var _this13=this;return this.fetch('references',this.config.domain+'.recent-cart').then(function(reference){var cartId=reference.referenceId;return _this13.fetchCart(cartId);})['catch'](function(){return _this13.createCart().then(function(cart){var refAttrs={referenceId:cart.id};refAttrs[GUID_KEY]=_this13.config.domain+'.recent-cart';_this13.create('references',refAttrs);return cart;});});}},{serializers:{get:function get(){return assign$1({},this.shadowedSerializers);},set:function set(values){this.shadowedSerializers=assign$1({},values);},configurable:true,enumerable:true},adapters:{get:function get(){return assign$1({},this.shadowedAdapters);},set:function set(values){this.shadowedAdapters=assign$1({},values);},configurable:true,enumerable:true}}));var fetch$1=global$1.fetch;if(!fetch$1&&isNodeLikeEnvironment()){/* this indirection is needed because babel throws errors when * transpiling require('node-fetch') using `amd` plugin with babel6 */var localRequire=require;global$1.fetch=localRequire('node-fetch');global$1.Response=global$1.fetch.Response;}var btoa$1=global$1.btoa;if(!btoa$1&&isNodeLikeEnvironment()){global$1.btoa=function(string){return new Buffer(string).toString('base64');};}/** * @module shopify-buy * @submodule shopify *//** * This namespace contains all globally accessible classes * @class ShopifyBuy * @static */var Shopify={ShopClient:ShopClient,Config:Config,version:version$1,NO_IMAGE_URI:NO_IMAGE_URI,buildClient:function buildClient(){var configAttrs=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var config=new this.Config(configAttrs);return new this.ShopClient(config);}};module.exports=Shopify;}); }); var ShopifyBuy = interopDefault(shopifyBuy_umd_polyfilled); function merge(target) { for (var _len = arguments.length, sources = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { sources[_key - 1] = arguments[_key]; } sources.forEach(function (source) { if (source) { Object.keys(source).forEach(function (key) { if (Object.prototype.toString.call(source[key]) === '[object Object]') { target[key] = merge(target[key] || {}, source[key]); } else { target[key] = source[key]; } }); } }); return target; } var index = createCommonjsModule(function (module) { // Create a range object for efficently rendering strings to elements. var range; var testEl = (typeof document !== 'undefined') ? document.body || document.createElement('div') : {}; var XHTML = 'http://www.w3.org/1999/xhtml'; var ELEMENT_NODE = 1; var TEXT_NODE = 3; var COMMENT_NODE = 8; // Fixes <https://github.com/patrick-steele-idem/morphdom/issues/32> // (IE7+ support) <=IE7 does not support el.hasAttribute(name) var hasAttributeNS; if (testEl.hasAttributeNS) { hasAttributeNS = function(el, namespaceURI, name) { return el.hasAttributeNS(namespaceURI, name); }; } else if (testEl.hasAttribute) { hasAttributeNS = function(el, namespaceURI, name) { return el.hasAttribute(name); }; } else { hasAttributeNS = function(el, namespaceURI, name) { return !!el.getAttributeNode(name); }; } function empty(o) { for (var k in o) { if (o.hasOwnProperty(k)) { return false; } } return true; } function toElement(str) { if (!range && document.createRange) { range = document.createRange(); range.selectNode(document.body); } var fragment; if (range && range.createContextualFragment) { fragment = range.createContextualFragment(str); } else { fragment = document.createElement('body'); fragment.innerHTML = str; } return fragment.childNodes[0]; } var specialElHandlers = { /** * Needed for IE. Apparently IE doesn't think that "selected" is an * attribute when reading over the attributes using selectEl.attributes */ OPTION: function(fromEl, toEl) { fromEl.selected = toEl.selected; if (fromEl.selected) { fromEl.setAttribute('selected', ''); } else { fromEl.removeAttribute('selected', ''); } }, /** * The "value" attribute is special for the <input> element since it sets * the initial value. Changing the "value" attribute without changing the * "value" property will have no effect since it is only used to the set the * initial value. Similar for the "checked" attribute, and "disabled". */ INPUT: function(fromEl, toEl) { fromEl.checked = toEl.checked; if (fromEl.checked) { fromEl.setAttribute('checked', ''); } else { fromEl.removeAttribute('checked'); } if (fromEl.value !== toEl.value) { fromEl.value = toEl.value; } if (!hasAttributeNS(toEl, null, 'value')) { fromEl.removeAttribute('value'); } fromEl.disabled = toEl.disabled; if (fromEl.disabled) { fromEl.setAttribute('disabled', ''); } else { fromEl.removeAttribute('disabled'); } }, TEXTAREA: function(fromEl, toEl) { var newValue = toEl.value; if (fromEl.value !== newValue) { fromEl.value = newValue; } if (fromEl.firstChild) { fromEl.firstChild.nodeValue = newValue; } } }; function noop() {} /** * Returns true if two node's names and namespace URIs are the same. * * @param {Element} a * @param {Element} b * @return {boolean} */ var compareNodeNames = function(a, b) { return a.nodeName === b.nodeName && a.namespaceURI === b.namespaceURI; }; /** * Create an element, optionally with a known namespace URI. * * @param {string} name the element name, e.g. 'div' or 'svg' * @param {string} [namespaceURI] the element's namespace URI, i.e. the value of * its `xmlns` attribute or its inferred namespace. * * @return {Element} */ function createElementNS(name, namespaceURI) { return !namespaceURI || namespaceURI === XHTML ? document.createElement(name) : document.createElementNS(namespaceURI, name); } /** * Loop over all of the attributes on the target node and make sure the original * DOM node has the same attributes. If an attribute found on the original node * is not on the new node then remove it from the original node. * * @param {Element} fromNode * @param {Element} toNode */ function morphAttrs(fromNode, toNode) { var attrs = toNode.attributes; var i; var attr; var attrName; var attrNamespaceURI; var attrValue; var fromValue; for (i = attrs.length - 1; i >= 0; i--) { attr = attrs[i]; attrName = attr.name; attrValue = attr.value; attrNamespaceURI = attr.namespaceURI; if (attrNamespaceURI) { attrName = attr.localName || attrName; fromValue = fromNode.getAttributeNS(attrNamespaceURI, attrName); } else { fromValue = fromNode.getAttribute(attrName); } if (fromValue !== attrValue) { if (attrNamespaceURI) { fromNode.setAttributeNS(attrNamespaceURI, attrName, attrValue); } else { fromNode.setAttribute(attrName, attrValue); } } } // Remove any extra attributes found on the original DOM element that // weren't found on the target element. attrs = fromNode.attributes; for (i = attrs.length - 1; i >= 0; i--) { attr = attrs[i]; if (attr.specified !== false) { attrName = attr.name; attrNamespaceURI = attr.namespaceURI; if (!hasAttributeNS(toNode, attrNamespaceURI, attrNamespaceURI ? attrName = attr.localName || attrName : attrName)) { if (attrNamespaceURI) { fromNode.removeAttributeNS(attrNamespaceURI, attr.localName); } else { fromNode.removeAttribute(attrName); } } } } } /** * Copies the children of one DOM element to another DOM element */ function moveChildren(fromEl, toEl) { var curChild = fromEl.firstChild; while (curChild) { var nextChild = curChild.nextSibling; toEl.appendChild(curChild); curChild = nextChild; } return toEl; } function defaultGetNodeKey(node) { return node.id; } function morphdom(fromNode, toNode, options) { if (!options) { options = {}; } if (typeof toNode === 'string') { if (fromNode.nodeName === '#document' || fromNode.nodeName === 'HTML') { var toNodeHtml = toNode; toNode = document.createElement('html'); toNode.innerHTML = toNodeHtml; } else { toNode = toElement(toNode); } } // XXX optimization: if the nodes are equal, don't morph them /* if (fromNode.isEqualNode(toNode)) { return fromNode; } */ var savedEls = {}; // Used to save off DOM elements with IDs var unmatchedEls = {}; var getNodeKey = options.getNodeKey || defaultGetNodeKey; var onBeforeNodeAdded = options.onBeforeNodeAdded || noop; var onNodeAdded = options.onNodeAdded || noop; var onBeforeElUpdated = options.onBeforeElUpdated || options.onBeforeMorphEl || noop; var onElUpdated = options.onElUpdated || noop; var onBeforeNodeDiscarded = options.onBeforeNodeDiscarded || noop; var onNodeDiscarded = options.onNodeDiscarded || noop; var onBeforeElChildrenUpdated = options.onBeforeElChildrenUpdated || options.onBeforeMorphElChildren || noop; var childrenOnly = options.childrenOnly === true; var movedEls = []; function removeNodeHelper(node, nestedInSavedEl) { var id = getNodeKey(node); // If the node has an ID then save it off since we will want // to reuse it in case the target DOM tree has a DOM element // with the same ID if (id) { savedEls[id] = node; } else if (!nestedInSavedEl) { // If we are not nested in a saved element then we know that this node has been // completely discarded and will not exist in the final DOM. onNodeDiscarded(node); } if (node.nodeType === ELEMENT_NODE) { var curChild = node.firstChild; while (curChild) { removeNodeHelper(curChild, nestedInSavedEl || id); curChild = curChild.nextSibling; } } } function walkDiscardedChildNodes(node) { if (node.nodeType === ELEMENT_NODE) { var curChild = node.firstChild; while (curChild) { if (!getNodeKey(curChild)) { // We only want to handle nodes that don't have an ID to avoid double // walking the same saved element. onNodeDiscarded(curChild); // Walk recursively walkDiscardedChildNodes(curChild); } curChild = curChild.nextSibling; } } } function removeNode(node, parentNode, alreadyVisited) { if (onBeforeNodeDiscarded(node) === false) { return; } parentNode.removeChild(node); if (alreadyVisited) { if (!getNodeKey(node)) { onNodeDiscarded(node); walkDiscardedChildNodes(node); } } else { removeNodeHelper(node); } } function morphEl(fromEl, toEl, alreadyVisited, childrenOnly) { var toElKey = getNodeKey(toEl); if (toElKey) { // If an element with an ID is being morphed then it is will be in the final // DOM so clear it out of the saved elements collection delete savedEls[toElKey]; } if (!childrenOnly) { if (onBeforeElUpdated(fromEl, toEl) === false) { return; } morphAttrs(fromEl, toEl); onElUpdated(fromEl); if (onBeforeElChildrenUpdated(fromEl, toEl) === false) { return; } } if (fromEl.nodeName !== 'TEXTAREA') { var curToNodeChild = toEl.firstChild; var curFromNodeChild = fromEl.firstChild; var curToNodeId; var fromNextSibling; var toNextSibling; var savedEl; var unmatchedEl; outer: while (curToNodeChild) { toNextSibling = curToNodeChild.nextSibling; curToNodeId = getNodeKey(curToNodeChild); while (curFromNodeChild) { var curFromNodeId = getNodeKey(curFromNodeChild); fromNextSibling = curFromNodeChild.nextSibling; if (!alreadyVisited) { if (curFromNodeId && (unmatchedEl = unmatchedEls[curFromNodeId])) { unmatchedEl.parentNode.replaceChild(curFromNodeChild, unmatchedEl); morphEl(curFromNodeChild, unmatchedEl, alreadyVisited); curFromNodeChild = fromNextSibling; continue; } } var curFromNodeType = curFromNodeChild.nodeType; if (curFromNodeType === curToNodeChild.nodeType) { var isCompatible = false; // Both nodes being compared are Element nodes if (curFromNodeType === ELEMENT_NODE) { if (compareNodeNames(curFromNodeChild, curToNodeChild)) { // We have compatible DOM elements if (curFromNodeId || curToNodeId) { // If either DOM element has an ID then we // handle those differently since we want to // match up by ID if (curToNodeId === curFromNodeId) { isCompatible = true; } } else { isCompatible = true; } } if (isCompatible) { // We found compatible DOM elements so transform // the current "from" node to match the current // target DOM node. morphEl(curFromNodeChild, curToNodeChild, alreadyVisited); } // Both nodes being compared are Text or Comment nodes } else if (curFromNodeType === TEXT_NODE || curFromNodeType == COMMENT_NODE) { isCompatible = true; // Simply update nodeValue on the original node to // change the text value curFromNodeChild.nodeValue = curToNodeChild.nodeValue; } if (isCompatible) { curToNodeChild = toNextSibling; curFromNodeChild = fromNextSibling; continue outer; } } // No compatible match so remove the old node from the DOM // and continue trying to find a match in the original DOM removeNode(curFromNodeChild, fromEl, alreadyVisited); curFromNodeChild = fromNextSibling; } if (curToNodeId) { if ((savedEl = savedEls[curToNodeId])) { if (compareNodeNames(savedEl, curToNodeChild)) { morphEl(savedEl, curToNodeChild, true); // We want to append the saved element instead curToNodeChild = savedEl; } else { delete savedEls[curToNodeId]; onNodeDiscarded(savedEl); } } else { // The current DOM element in the target tree has an ID // but we did not find a match in any of the // corresponding siblings. We just put the target // element in the old DOM tree but if we later find an // element in the old DOM tree that has a matching ID // then we will replace the target element with the // corresponding old element and morph the old element unmatchedEls[curToNodeId] = curToNodeChild; } } // If we got this far then we did not find a candidate match for // our "to node" and we exhausted all of the children "from" // nodes. Therefore, we will just append the current "to node" // to the end if (onBeforeNodeAdded(curToNodeChild) !== false) { fromEl.appendChild(curToNodeChild); onNodeAdded(curToNodeChild); } if (curToNodeChild.nodeType === ELEMENT_NODE && (curToNodeId || curToNodeChild.firstChild)) { // The element that was just added to the original DOM may // have some nested elements with a key/ID that needs to be // matched up with other elements. We'll add the element to // a list so that we can later process the nested elements // if there are any unmatched keyed elements that were // discarded movedEls.push(curToNodeChild); } curToNodeChild = toNextSibling; curFromNodeChild = fromNextSibling; } // We have processed all of the "to nodes". If curFromNodeChild is // non-null then we still have some from nodes left over that need // to be removed while (curFromNodeChild) { fromNextSibling = curFromNodeChild.nextSibling; removeNode(curFromNodeChild, fromEl, alreadyVisited); curFromNodeChild = fromNextSibling; } } var specialElHandler = specialElHandlers[fromEl.nodeName]; if (specialElHandler) { specialElHandler(fromEl, toEl); } } // END: morphEl(...) var morphedNode = fromNode; var morphedNodeType = morphedNode.nodeType; var toNodeType = toNode.nodeType; if (!childrenOnly) { // Handle the case where we are given two DOM nodes that are not // compatible (e.g. <div> --> <span> or <div> --> TEXT) if (morphedNodeType === ELEMENT_NODE) { if (toNodeType === ELEMENT_NODE) { if (!compareNodeNames(fromNode, toNode)) { onNodeDiscarded(fromNode); morphedNode = moveChildren(fromNode, createElementNS(toNode.nodeName, toNode.namespaceURI)); } } else { // Going from an element node to a text node morphedNode = toNode; } } else if (morphedNodeType === TEXT_NODE || morphedNodeType === COMMENT_NODE) { // Text or comment node if (toNodeType === morphedNodeType) { morphedNode.nodeValue = toNode.nodeValue; return morphedNode; } else { // Text node to something else morphedNode = toNode; } } } if (morphedNode === toNode) { // The "to node" was not compatible with the "from node" so we had to // toss out the "from node" and use the "to node" onNodeDiscarded(fromNode); } else { morphEl(morphedNode, toNode, false, childrenOnly); /** * What we will do here is walk the tree for the DOM element that was * moved from the target DOM tree to the original DOM tree and we will * look for keyed elements that could be matched to keyed elements that * were earlier discarded. If we find a match then we will move the * saved element into the final DOM tree. */ var handleMovedEl = function(el) { var curChild = el.firstChild; while (curChild) { var nextSibling = curChild.nextSibling; var key = getNodeKey(curChild); if (key) { var savedEl = savedEls[key]; if (savedEl && compareNodeNames(curChild, savedEl)) { curChild.parentNode.replaceChild(savedEl, curChild); // true: already visited the saved el tree morphEl(savedEl, curChild, true); curChild = nextSibling; if (empty(savedEls)) { return false; } continue; } } if (curChild.nodeType === ELEMENT_NODE) { handleMovedEl(curChild); } curChild = nextSibling; } }; // The loop below is used to possibly match up any discarded // elements in the original DOM tree with elemenets from the // target tree that were moved over without visiting their // children if (!empty(savedEls)) { handleMovedElsLoop: while (movedEls.length) { var movedElsTemp = movedEls; movedEls = []; for (var i=0; i<movedElsTemp.length; i++) { if (handleMovedEl(movedElsTemp[i]) === false) { // There are no more unmatched elements so completely end // the loop break handleMovedElsLoop; } } } } // Fire the "onNodeDiscarded" event for any saved elements // that never found a new home in the morphed DOM for (var savedElId in savedEls) { if (savedEls.hasOwnProperty(savedElId)) { var savedEl = savedEls[savedElId]; onNodeDiscarded(savedEl); walkDiscardedChildNodes(savedEl); } } } if (!childrenOnly && morphedNode !== fromNode && fromNode.parentNode) { // If we had to swap out the from node with a new node because the old // node was not compatible with the target node then we need to // replace the old DOM node in the original DOM tree. This is only // possible if the original DOM node was part of a DOM tree which // we know is the case if it has a parent node. fromNode.parentNode.replaceChild(morphedNode, fromNode); } return morphedNode; } module.exports = morphdom; }); var morphdom = interopDefault(index); function isFunction(obj) { return !!(obj && obj.constructor && obj.call && obj.apply); }; var quantityTemplate = '<div class="{{data.classes.product.quantity}} {{data.quantityClass}}">\n {{#data.contents.quantityDecrement}}\n <button class="{{data.classes.product.quantityButton}} {{data.classes.product.quantityDecrement}}" type="button"><span>-</span><span class="visuallyhidden">Decrement</span></button>\n {{/data.contents.quantityDecrement}}\n {{#data.contents.quantityInput}}\n <input class="{{data.classes.product.quantityInput}}" type="number" min="0" aria-label="Quantity" value="{{data.selectedQuantity}}">\n {{/data.contents.quantityInput}}\n {{#data.contents.quantityIncrement}}\n <button class="{{data.classes.product.quantityButton}} {{data.classes.product.quantityIncrement}}" type="button"><span>+</span><span class="visuallyhidden">Increment</span></button>\n {{/data.contents.quantityIncrement}}\n </div>'; var buttonTemplate = '<button {{#data.buttonDisabled}}disabled{{/data.buttonDisabled}} class="{{data.classes.product.button}} {{data.buttonClass}}">{{data.buttonText}}</button>'; var productTemplate = { img: '<div class="{{data.classes.product.imgWrapper}}"><img class="{{data.classes.product.img}}" src="{{data.currentImage.src}}" /></div>', title: '<h1 class="{{data.classes.product.title}}">{{data.title}}</h1>', variantTitle: '{{#data.hasVariants}}<h2 class="{{data.classes.product.variantTitle}}">{{data.selectedVariant.title}}</h2>{{/data.hasVariants}}', options: '{{#data.hasVariants}}<div class="{{data.classes.product.options}}">{{{data.optionsHtml}}}</div>{{/data.hasVariants}}', price: '<div class="{{data.classes.product.prices}}">\n {{#data.selectedVariant}}\n <span class="{{data.classes.product.price}} {{data.priceClass}}">{{data.formattedPrice}}</span>\n {{#data.selectedVariant.compareAtPrice}}<span class="{{data.classes.product.compareAt}}">{{data.formattedCompareAtPrice}}</span>{{/data.selectedVariant.compareAtPrice}}\n {{/data.selectedVariant}}\n </div>', description: '<div class="{{data.classes.product.description}}">{{{data.description}}}</div>', button: buttonTemplate, quantity: quantityTemplate, buttonWithQuantity: '<div class="{{data.classes.product.buttonWithQuantity}}">' + quantityTemplate + buttonTemplate + '</div>' }; var cartTemplates = { title: "<div class=\"{{data.classes.cart.header}}\">\n <h2 class=\"{{data.classes.cart.title}}\">{{data.text.title}}</h2>\n <button class=\"{{data.classes.cart.close}}\">\n <span aria-role=\"hidden\">&times;</span>\n <span class=\"visuallyhidden\">Close</span>\n </button>\n </div>", lineItems: "<div class=\"{{data.classes.cart.cartScroll}}\">\n {{#data.isEmpty}}<p class=\"{{data.classes.cart.emptyCart}}\">{{data.text.empty}}</p>{{/data.isEmpty}}\n <div class=\"{{data.classes.cart.lineItems}}\">{{{data.lineItemsHtml}}}</div>\n </div>", footer: "<div class=\"{{data.classes.cart.footer}}\">\n <p class=\"{{data.classes.cart.subtotalText}}\">{{data.text.total}}</p>\n <p class=\"{{data.classes.cart.subtotal}}\"><span class=\"{{data.classes.currency}}\"></span>{{data.formattedTotal}}</p>\n <p class=\"{{data.classes.cart.notice}}\">{{data.text.notice}}</p>\n <button class=\"{{data.classes.cart.button}}\" type=\"button\">{{data.text.button}}</button>\n </div>" }; var optionTemplates = { option: "<div class={{data.classes.option.option}}>\n <label class=\"{{data.classes.option.label}} {{#data.onlyOption}}visuallyhidden{{/data.onlyOption}}\">{{data.name}}</label>\n <div class=\"{{data.classes.option.wrapper}}\">\n <select class=\"{{data.classes.option.select}}\" name=\"{{data.name}}\">\n {{#data.values}}\n <option {{#selected}}selected{{/selected}} value=\"{{name}}\">{{name}}</option>\n {{/data.values}}\n </select>\n <svg class=\"{{data.classes.option.selectIcon}}\" viewBox=\"0 0 24 24\"><path d=\"M21 5.176l-9.086 9.353L3 5.176.686 7.647 12 19.382 23.314 7.647 21 5.176z\"></path></svg>\n </div>\n </div>" }; var toggleTemplates = { title: '<h5 class="{{data.classes.toggle.title}}">{{data.text.title}}</h5>', icon: '<svg xmlns="http://www.w3.org/2000/svg" class="{{data.classes.toggle.icon}}" viewBox="0 0 25 25" enable-background="new 0 0 25 25"><g class="{{data.classes.toggle.iconPath}}"><path d="M24.6 3.6c-.3-.4-.8-.6-1.3-.6h-18.4l-.1-.5c-.3-1.5-1.7-1.5-2.5-1.5h-1.3c-.6 0-1 .4-1 1s.4 1 1 1h1.8l3 13.6c.2 1.2 1.3 2.4 2.5 2.4h12.7c.6 0 1-.4 1-1s-.4-1-1-1h-12.7c-.2 0-.5-.4-.6-.8l-.2-1.2h12.6c1.3 0 2.3-1.4 2.5-2.4l2.4-7.4v-.2c.1-.5-.1-1-.4-1.4zm-4 8.5v.2c-.1.3-.4.8-.5.8h-13l-1.8-8.1h17.6l-2.3 7.1z"/><circle cx="9" cy="22" r="2"/><circle cx="19" cy="22" r="2"/></g></svg>', count: '<div class="{{data.classes.toggle.count}}">{{data.count}}</div>' }; var lineItemTemplates = { image: '<div class="{{data.classes.lineItem.image}}" style="background-image: url({{data.lineItemImage.src}})"></div>', variantTitle: '<div class="{{data.classes.lineItem.variantTitle}}">{{data.variantTitle}}</div>', title: '<span class="{{data.classes.lineItem.itemTitle}}">{{data.title}}</span>', price: '<span class="{{data.classes.lineItem.price}}">${{data.line_price}}</span>', quantity: '<div class="{{data.classes.lineItem.quantity}}">\n <button class="{{data.classes.lineItem.quantityButton}} {{data.classes.lineItem.quantityDecrement}}" type="button" data-line-item-id="{{data.id}}"><span>-</span><span class="visuallyhidden">Decrement</span></button>\n <input class="{{data.classes.lineItem.quantityInput}}" type="number" min="0" aria-label="Quantity" data-line-item-id="{{data.id}}" value="{{data.quantity}}">\n <button class="{{data.classes.lineItem.quantityButton}} {{data.classes.lineItem.quantityIncrement}}" type="button" data-line-item-id="{{data.id}}"><span>+</span><span class="visuallyhidden">Increment</span></button>\n </div>' }; var modalTemplates = { contents: "\n <button class=\"{{data.classes.modal.close}}\">\n <span aria-role=\"hidden\">&times;</span>\n <span class=\"visuallyhidden\">Close</span>\n </button>\n " }; var defaults = { product: { iframe: true, buttonDestination: 'cart', layout: 'vertical', manifest: ['product', 'option'], width: '240px', order: ['img', 'title', 'variantTitle', 'price', 'options', 'quantity', 'button', 'buttonWithQuantity', 'description'], contents: { img: true, title: true, variantTitle: false, price: true, options: true, quantity: false, quantityIncrement: false, quantityDecrement: false, quantityInput: true, button: true, buttonWithQuantity: false, description: false }, templates: productTemplate, classes: { wrapper: 'shopify-buy__product-wrapper', product: 'shopify-buy__product', img: 'shopify-buy__product__variant-img', imgWrapper: 'shopify-buy__product-img-wrapper', blockButton: 'shopify-buy__btn--parent', button: 'shopify-buy__btn', title: 'shopify-buy__product__title', prices: 'shopify-buy__product__price', price: 'shopify-buy__product__actual-price', compareAt: 'shopify-buy__product__compare-price', loweredPrice: 'shopify-buy__price--lowered', variantTitle: 'shopify-buy__product__variant-title', description: 'shopify-buy__product-description', options: 'shopify-buy__product__variant-selectors', disabled: 'shopify-buy__btn-disabled', buttonBesideQty: 'shopify-buy__beside-quantity', quantity: 'shopify-buy__quantity-container', quantityInput: 'shopify-buy__quantity', quantityButton: 'shopify-buy__btn--seamless', quantityIncrement: 'shopify-buy__quantity-increment', quantityDecrement: 'shopify-buy__quantity-decrement', buttonWithQuantity: 'shopify-buy__btn-and-quantity', quantityWithButtons: 'shopify-buy__quantity-with-btns', vertical: 'shopify-buy__layout-vertical', horizontal: 'shopify-buy__layout-horizontal' }, text: { button: 'SHOP NOW', outOfStock: 'Out of stock', unavailable: 'Unavailable' } }, modalProduct: { iframe: false, layout: 'horizontal', contents: { img: true, title: true, variantTitle: false, price: true, options: true, button: false, buttonWithQuantity: true, quantity: false, quantityIncrement: false, quantityDecrement: false, description: true }, order: ['img', 'title', 'variantTitle', 'price', 'options', 'buttonWithQuantity', 'button', 'description'], classes: { wrapper: 'shopify-buy__modal-product-wrapper', hasImage: 'has-image' }, buttonDestination: 'cart', text: { button: 'ADD TO CART' } }, modal: { iframe: true, manifest: ['modal', 'product', 'option'], classes: { overlay: 'shopify-buy__modal-overlay', modal: 'shopify-buy__modal', contents: 'shopify-buy__modal-contents', close: 'shopify-buy__btn--close', wrapper: 'shopify-buy__modal-wrapper', product: 'shopify-buy__product-modal', img: 'shopify-buy__modal-img', footer: 'shopify-buy__modal-footer', footerWithImg: 'shopify-buy__modal-footer--has-img', imgWithImg: 'shopify-buy__modal-img--has-img', contentsWithImg: 'shopify-buy__modal-contents--has-img', scrollContents: 'shopify-buy__modal-scroll-contents' }, contents: { contents: true }, order: ['contents'], templates: modalTemplates }, productSet: { iframe: true, manifest: ['product', 'option', 'productSet'], contents: { title: false, products: true, pagination: true }, order: ['title', 'products', 'pagination'], templates: { title: '<h2 class="{{data.classes.productSet.title}}">{{data.collection.attrs.title}}</h2>', products: '<div class="{{data.classes.productSet.products}}"></div>', pagination: '<button class="{{data.classes.productSet.paginationButton}} {{data.nextButtonClass}}">{{data.text.nextPageButton}}</button>' }, classes: { wrapper: 'shopify-buy__collection-wrapper', productSet: 'shopify-buy__collection', title: 'shopify-buy__collection__title', collection: 'shopify-buy__collection', products: 'shopify-buy__collection-products', product: 'shopify-buy__collection-product', paginationButton: 'shopify-buy__collection-pagination-button shopify-buy__btn' }, text: { nextPageButton: 'Next page' } }, option: { templates: optionTemplates, contents: { option: true }, order: ['option'], classes: { option: 'shopify-buy__option-select', wrapper: 'shopify-buy__option-select-wrapper', select: 'shopify-buy__option-select__select', label: 'shopify-buy__option-select__label', optionDisabled: 'shopify-buy__option--disabled', optionSelected: 'shopify-buy__option--selected', selectIcon: 'shopify-buy__select-icon' } }, cart: { iframe: true, templates: cartTemplates, startOpen: false, manifest: ['cart', 'lineItem', 'toggle'], contents: { title: true, lineItems: true, footer: true }, order: ['title', 'lineItems', 'footer'], classes: { wrapper: 'shopify-buy__cart-wrapper', cart: 'shopify-buy__cart', header: 'shopify-buy__cart__header', title: 'shopify-buy__cart__title', lineItems: 'shopify-buy__cart-items', footer: 'shopify-buy__cart-bottom', subtotalText: 'shopify-buy__cart__subtotal__text', subtotal: 'shopify-buy__cart__subtotal__price', notice: 'shopify-buy__cart__notice', currency: 'shopify-buy__cart__currency', button: 'shopify-buy__btn shopify-buy__btn--cart-checkout', close: 'shopify-buy__btn--close', cartScroll: 'shopify-buy__cart-scroll', emptyCart: 'shopify-buy__cart-empty-text' }, text: { title: 'Cart', empty: 'Your cart is empty.', button: 'Checkout', total: 'Subtotal', currency: 'CAD', notice: 'Shipping and discount codes are added at checkout.' } }, lineItem: { templates: lineItemTemplates, contents: { image: true, variantTitle: true, title: true, price: true, quantity: true, quantityIncrement: true, quantityDecrement: true, quantityInput: true }, order: ['image', 'variantTitle', 'title', 'price', 'quantity'], classes: { lineItem: 'shopify-buy__cart-item', image: 'shopify-buy__cart-item__image', variantTitle: 'shopify-buy__cart-item__variant-title', itemTitle: 'shopify-buy__cart-item__title', price: 'shopify-buy__cart-item__price', quantity: 'shopify-buy__quantity-container clearfix', quantityInput: 'shopify-buy__quantity shopify-buy__cart-item__quantity-input', quantityButton: 'shopify-buy__btn--seamless', quantityIncrement: 'shopify-buy__quantity-increment', quantityDecrement: 'shopify-buy__quantity-decrement' } }, toggle: { templates: toggleTemplates, manifest: ['toggle'], iframe: true, sticky: true, contents: { count: true, icon: true, title: false }, order: ['count', 'icon', 'title'], classes: { wrapper: 'shopify-buy__cart-toggle-wrapper', toggle: 'shopify-buy__cart-toggle', title: 'shopify-buy__cart-toggle__title', count: 'shopify-buy__cart-toggle__count', icon: 'shopify-buy__icon-cart shopify-buy__icon-cart--side', iconPath: 'shopify-buy__icon-cart__group' }, text: { title: 'cart' } }, window: { height: 600, width: 600, toolbar: 0, scrollbars: 0, status: 0, resizable: 1, left: 0, top: 0, center: 0, createnew: 1, location: 0, menubar: 0, onUnload: null } }; var classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; 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; }; }(); var defineProperty = function (obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }; var possibleConstructorReturn = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }; var slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var toConsumableArray = function (arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } }; function wrapConsole(logCommand) { var logMethod = function logMethod() { var hostConsole = window.console; var args = Array.prototype.slice.apply(arguments).join(' '); /* eslint-disable no-console */ if (hostConsole) { hostConsole[logCommand](args); } /* eslint-enable no-console */ }; return function () { var args = [].concat(Array.prototype.slice.call(arguments)); args.unshift('[SHOPIFY-BUY-UI]: '); logMethod.apply(undefined, toConsumableArray(args)); }; } var logger = { debug: wrapConsole('debug'), info: wrapConsole('info'), warn: wrapConsole('warn'), error: wrapConsole('error'), log: wrapConsole('log') }; function isArray(arg) { return Object.prototype.toString.call(arg) === '[object Array]'; } function logNotFound(component) { var errInfo = ''; if (component.id) { if (isArray(component.id)) { errInfo = 'for ids ' + component.id.join(', ') + '.'; } else { errInfo = 'for id ' + component.id + '.'; } } else if (component.handle) { errInfo = 'for handle "' + component.handle + '".'; } var message = 'Not Found: ' + component.typeKey + ' not found ' + errInfo; logger.warn(message); } var compiler = createCommonjsModule(function (module, exports) { /* * Copyright 2011 Twitter, Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ (function (Hogan) { // Setup regex assignments // remove whitespace according to Mustache spec var rIsWhitespace = /\S/, rQuot = /\"/g, rNewline = /\n/g, rCr = /\r/g, rSlash = /\\/g, rLineSep = /\u2028/, rParagraphSep = /\u2029/; Hogan.tags = { '#': 1, '^': 2, '<': 3, '$': 4, '/': 5, '!': 6, '>': 7, '=': 8, '_v': 9, '{': 10, '&': 11, '_t': 12 }; Hogan.scan = function scan(text, delimiters) { var len = text.length, IN_TEXT = 0, IN_TAG_TYPE = 1, IN_TAG = 2, state = IN_TEXT, tagType = null, tag = null, buf = '', tokens = [], seenTag = false, i = 0, lineStart = 0, otag = '{{', ctag = '}}'; function addBuf() { if (buf.length > 0) { tokens.push({tag: '_t', text: new String(buf)}); buf = ''; } } function lineIsWhitespace() { var isAllWhitespace = true; for (var j = lineStart; j < tokens.length; j++) { isAllWhitespace = (Hogan.tags[tokens[j].tag] < Hogan.tags['_v']) || (tokens[j].tag == '_t' && tokens[j].text.match(rIsWhitespace) === null); if (!isAllWhitespace) { return false; } } return isAllWhitespace; } function filterLine(haveSeenTag, noNewLine) { addBuf(); if (haveSeenTag && lineIsWhitespace()) { for (var j = lineStart, next; j < tokens.length; j++) { if (tokens[j].text) { if ((next = tokens[j+1]) && next.tag == '>') { // set indent to token value next.indent = tokens[j].text.toString() } tokens.splice(j, 1); } } } else if (!noNewLine) { tokens.push({tag:'\n'}); } seenTag = false; lineStart = tokens.length; } function changeDelimiters(text, index) { var close = '=' + ctag, closeIndex = text.indexOf(close, index), delimiters = trim( text.substring(text.indexOf('=', index) + 1, closeIndex) ).split(' '); otag = delimiters[0]; ctag = delimiters[delimiters.length - 1]; return closeIndex + close.length - 1; } if (delimiters) { delimiters = delimiters.split(' '); otag = delimiters[0]; ctag = delimiters[1]; } for (i = 0; i < len; i++) { if (state == IN_TEXT) { if (tagChange(otag, text, i)) { --i; addBuf(); state = IN_TAG_TYPE; } else { if (text.charAt(i) == '\n') { filterLine(seenTag); } else { buf += text.charAt(i); } } } else if (state == IN_TAG_TYPE) { i += otag.length - 1; tag = Hogan.tags[text.charAt(i + 1)]; tagType = tag ? text.charAt(i + 1) : '_v'; if (tagType == '=') { i = changeDelimiters(text, i); state = IN_TEXT; } else { if (tag) { i++; } state = IN_TAG; } seenTag = i; } else { if (tagChange(ctag, text, i)) { tokens.push({tag: tagType, n: trim(buf), otag: otag, ctag: ctag, i: (tagType == '/') ? seenTag - otag.length : i + ctag.length}); buf = ''; i += ctag.length - 1; state = IN_TEXT; if (tagType == '{') { if (ctag == '}}') { i++; } else { cleanTripleStache(tokens[tokens.length - 1]); } } } else { buf += text.charAt(i); } } } filterLine(seenTag, true); return tokens; } function cleanTripleStache(token) { if (token.n.substr(token.n.length - 1) === '}') { token.n = token.n.substring(0, token.n.length - 1); } } function trim(s) { if (s.trim) { return s.trim(); } return s.replace(/^\s*|\s*$/g, ''); } function tagChange(tag, text, index) { if (text.charAt(index) != tag.charAt(0)) { return false; } for (var i = 1, l = tag.length; i < l; i++) { if (text.charAt(index + i) != tag.charAt(i)) { return false; } } return true; } // the tags allowed inside super templates var allowedInSuper = {'_t': true, '\n': true, '$': true, '/': true}; function buildTree(tokens, kind, stack, customTags) { var instructions = [], opener = null, tail = null, token = null; tail = stack[stack.length - 1]; while (tokens.length > 0) { token = tokens.shift(); if (tail && tail.tag == '<' && !(token.tag in allowedInSuper)) { throw new Error('Illegal content in < super tag.'); } if (Hogan.tags[token.tag] <= Hogan.tags['$'] || isOpener(token, customTags)) { stack.push(token); token.nodes = buildTree(tokens, token.tag, stack, customTags); } else if (token.tag == '/') { if (stack.length === 0) { throw new Error('Closing tag without opener: /' + token.n); } opener = stack.pop(); if (token.n != opener.n && !isCloser(token.n, opener.n, customTags)) { throw new Error('Nesting error: ' + opener.n + ' vs. ' + token.n); } opener.end = token.i; return instructions; } else if (token.tag == '\n') { token.last = (tokens.length == 0) || (tokens[0].tag == '\n'); } instructions.push(token); } if (stack.length > 0) { throw new Error('missing closing tag: ' + stack.pop().n); } return instructions; } function isOpener(token, tags) { for (var i = 0, l = tags.length; i < l; i++) { if (tags[i].o == token.n) { token.tag = '#'; return true; } } } function isCloser(close, open, tags) { for (var i = 0, l = tags.length; i < l; i++) { if (tags[i].c == close && tags[i].o == open) { return true; } } } function stringifySubstitutions(obj) { var items = []; for (var key in obj) { items.push('"' + esc(key) + '": function(c,p,t,i) {' + obj[key] + '}'); } return "{ " + items.join(",") + " }"; } function stringifyPartials(codeObj) { var partials = []; for (var key in codeObj.partials) { partials.push('"' + esc(key) + '":{name:"' + esc(codeObj.partials[key].name) + '", ' + stringifyPartials(codeObj.partials[key]) + "}"); } return "partials: {" + partials.join(",") + "}, subs: " + stringifySubstitutions(codeObj.subs); } Hogan.stringify = function(codeObj, text, options) { return "{code: function (c,p,i) { " + Hogan.wrapMain(codeObj.code) + " }," + stringifyPartials(codeObj) + "}"; } var serialNo = 0; Hogan.generate = function(tree, text, options) { serialNo = 0; var context = { code: '', subs: {}, partials: {} }; Hogan.walk(tree, context); if (options.asString) { return this.stringify(context, text, options); } return this.makeTemplate(context, text, options); } Hogan.wrapMain = function(code) { return 'var t=this;t.b(i=i||"");' + code + 'return t.fl();'; } Hogan.template = Hogan.Template; Hogan.makeTemplate = function(codeObj, text, options) { var template = this.makePartials(codeObj); template.code = new Function('c', 'p', 'i', this.wrapMain(codeObj.code)); return new this.template(template, text, this, options); } Hogan.makePartials = function(codeObj) { var key, template = {subs: {}, partials: codeObj.partials, name: codeObj.name}; for (key in template.partials) { template.partials[key] = this.makePartials(template.partials[key]); } for (key in codeObj.subs) { template.subs[key] = new Function('c', 'p', 't', 'i', codeObj.subs[key]); } return template; } function esc(s) { return s.replace(rSlash, '\\\\') .replace(rQuot, '\\\"') .replace(rNewline, '\\n') .replace(rCr, '\\r') .replace(rLineSep, '\\u2028') .replace(rParagraphSep, '\\u2029'); } function chooseMethod(s) { return (~s.indexOf('.')) ? 'd' : 'f'; } function createPartial(node, context) { var prefix = "<" + (context.prefix || ""); var sym = prefix + node.n + serialNo++; context.partials[sym] = {name: node.n, partials: {}}; context.code += 't.b(t.rp("' + esc(sym) + '",c,p,"' + (node.indent || '') + '"));'; return sym; } Hogan.codegen = { '#': function(node, context) { context.code += 'if(t.s(t.' + chooseMethod(node.n) + '("' + esc(node.n) + '",c,p,1),' + 'c,p,0,' + node.i + ',' + node.end + ',"' + node.otag + " " + node.ctag + '")){' + 't.rs(c,p,' + 'function(c,p,t){'; Hogan.walk(node.nodes, context); context.code += '});c.pop();}'; }, '^': function(node, context) { context.code += 'if(!t.s(t.' + chooseMethod(node.n) + '("' + esc(node.n) + '",c,p,1),c,p,1,0,0,"")){'; Hogan.walk(node.nodes, context); context.code += '};'; }, '>': createPartial, '<': function(node, context) { var ctx = {partials: {}, code: '', subs: {}, inPartial: true}; Hogan.walk(node.nodes, ctx); var template = context.partials[createPartial(node, context)]; template.subs = ctx.subs; template.partials = ctx.partials; }, '$': function(node, context) { var ctx = {subs: {}, code: '', partials: context.partials, prefix: node.n}; Hogan.walk(node.nodes, ctx); context.subs[node.n] = ctx.code; if (!context.inPartial) { context.code += 't.sub("' + esc(node.n) + '",c,p,i);'; } }, '\n': function(node, context) { context.code += write('"\\n"' + (node.last ? '' : ' + i')); }, '_v': function(node, context) { context.code += 't.b(t.v(t.' + chooseMethod(node.n) + '("' + esc(node.n) + '",c,p,0)));'; }, '_t': function(node, context) { context.code += write('"' + esc(node.text) + '"'); }, '{': tripleStache, '&': tripleStache } function tripleStache(node, context) { context.code += 't.b(t.t(t.' + chooseMethod(node.n) + '("' + esc(node.n) + '",c,p,0)));'; } function write(s) { return 't.b(' + s + ');'; } Hogan.walk = function(nodelist, context) { var func; for (var i = 0, l = nodelist.length; i < l; i++) { func = Hogan.codegen[nodelist[i].tag]; func && func(nodelist[i], context); } return context; } Hogan.parse = function(tokens, text, options) { options = options || {}; return buildTree(tokens, '', [], options.sectionTags || []); } Hogan.cache = {}; Hogan.cacheKey = function(text, options) { return [text, !!options.asString, !!options.disableLambda, options.delimiters, !!options.modelGet].join('||'); } Hogan.compile = function(text, options) { options = options || {}; var key = Hogan.cacheKey(text, options); var template = this.cache[key]; if (template) { var partials = template.partials; for (var name in partials) { delete partials[name].instance; } return template; } template = this.generate(this.parse(this.scan(text, options.delimiters), text, options), text, options); return this.cache[key] = template; } })(typeof exports !== 'undefined' ? exports : Hogan); }); var compiler$1 = interopDefault(compiler); var require$$1 = Object.freeze({ default: compiler$1 }); var template = createCommonjsModule(function (module, exports) { /* * Copyright 2011 Twitter, Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ var Hogan = {}; (function (Hogan) { Hogan.Template = function (codeObj, text, compiler, options) { codeObj = codeObj || {}; this.r = codeObj.code || this.r; this.c = compiler; this.options = options || {}; this.text = text || ''; this.partials = codeObj.partials || {}; this.subs = codeObj.subs || {}; this.buf = ''; } Hogan.Template.prototype = { // render: replaced by generated code. r: function (context, partials, indent) { return ''; }, // variable escaping v: hoganEscape, // triple stache t: coerceToString, render: function render(context, partials, indent) { return this.ri([context], partials || {}, indent); }, // render internal -- a hook for overrides that catches partials too ri: function (context, partials, indent) { return this.r(context, partials, indent); }, // ensurePartial ep: function(symbol, partials) { var partial = this.partials[symbol]; // check to see that if we've instantiated this partial before var template = partials[partial.name]; if (partial.instance && partial.base == template) { return partial.instance; } if (typeof template == 'string') { if (!this.c) { throw new Error("No compiler available."); } template = this.c.compile(template, this.options); } if (!template) { return null; } // We use this to check whether the partials dictionary has changed this.partials[symbol].base = template; if (partial.subs) { // Make sure we consider parent template now if (!partials.stackText) partials.stackText = {}; for (key in partial.subs) { if (!partials.stackText[key]) { partials.stackText[key] = (this.activeSub !== undefined && partials.stackText[this.activeSub]) ? partials.stackText[this.activeSub] : this.text; } } template = createSpecializedPartial(template, partial.subs, partial.partials, this.stackSubs, this.stackPartials, partials.stackText); } this.partials[symbol].instance = template; return template; }, // tries to find a partial in the current scope and render it rp: function(symbol, context, partials, indent) { var partial = this.ep(symbol, partials); if (!partial) { return ''; } return partial.ri(context, partials, indent); }, // render a section rs: function(context, partials, section) { var tail = context[context.length - 1]; if (!isArray(tail)) { section(context, partials, this); return; } for (var i = 0; i < tail.length; i++) { context.push(tail[i]); section(context, partials, this); context.pop(); } }, // maybe start a section s: function(val, ctx, partials, inverted, start, end, tags) { var pass; if (isArray(val) && val.length === 0) { return false; } if (typeof val == 'function') { val = this.ms(val, ctx, partials, inverted, start, end, tags); } pass = !!val; if (!inverted && pass && ctx) { ctx.push((typeof val == 'object') ? val : ctx[ctx.length - 1]); } return pass; }, // find values with dotted names d: function(key, ctx, partials, returnFound) { var found, names = key.split('.'), val = this.f(names[0], ctx, partials, returnFound), doModelGet = this.options.modelGet, cx = null; if (key === '.' && isArray(ctx[ctx.length - 2])) { val = ctx[ctx.length - 1]; } else { for (var i = 1; i < names.length; i++) { found = findInScope(names[i], val, doModelGet); if (found !== undefined) { cx = val; val = found; } else { val = ''; } } } if (returnFound && !val) { return false; } if (!returnFound && typeof val == 'function') { ctx.push(cx); val = this.mv(val, ctx, partials); ctx.pop(); } return val; }, // find values with normal names f: function(key, ctx, partials, returnFound) { var val = false, v = null, found = false, doModelGet = this.options.modelGet; for (var i = ctx.length - 1; i >= 0; i--) { v = ctx[i]; val = findInScope(key, v, doModelGet); if (val !== undefined) { found = true; break; } } if (!found) { return (returnFound) ? false : ""; } if (!returnFound && typeof val == 'function') { val = this.mv(val, ctx, partials); } return val; }, // higher order templates ls: function(func, cx, partials, text, tags) { var oldTags = this.options.delimiters; this.options.delimiters = tags; this.b(this.ct(coerceToString(func.call(cx, text)), cx, partials)); this.options.delimiters = oldTags; return false; }, // compile text ct: function(text, cx, partials) { if (this.options.disableLambda) { throw new Error('Lambda features disabled.'); } return this.c.compile(text, this.options).render(cx, partials); }, // template result buffering b: function(s) { this.buf += s; }, fl: function() { var r = this.buf; this.buf = ''; return r; }, // method replace section ms: function(func, ctx, partials, inverted, start, end, tags) { var textSource, cx = ctx[ctx.length - 1], result = func.call(cx); if (typeof result == 'function') { if (inverted) { return true; } else { textSource = (this.activeSub && this.subsText && this.subsText[this.activeSub]) ? this.subsText[this.activeSub] : this.text; return this.ls(result, cx, partials, textSource.substring(start, end), tags); } } return result; }, // method replace variable mv: function(func, ctx, partials) { var cx = ctx[ctx.length - 1]; var result = func.call(cx); if (typeof result == 'function') { return this.ct(coerceToString(result.call(cx)), cx, partials); } return result; }, sub: function(name, context, partials, indent) { var f = this.subs[name]; if (f) { this.activeSub = name; f(context, partials, this, indent); this.activeSub = false; } } }; //Find a key in an object function findInScope(key, scope, doModelGet) { var val; if (scope && typeof scope == 'object') { if (scope[key] !== undefined) { val = scope[key]; // try lookup with get for backbone or similar model data } else if (doModelGet && scope.get && typeof scope.get == 'function') { val = scope.get(key); } } return val; } function createSpecializedPartial(instance, subs, partials, stackSubs, stackPartials, stackText) { function PartialTemplate() {}; PartialTemplate.prototype = instance; function Substitutions() {}; Substitutions.prototype = instance.subs; var key; var partial = new PartialTemplate(); partial.subs = new Substitutions(); partial.subsText = {}; //hehe. substext. partial.buf = ''; stackSubs = stackSubs || {}; partial.stackSubs = stackSubs; partial.subsText = stackText; for (key in subs) { if (!stackSubs[key]) stackSubs[key] = subs[key]; } for (key in stackSubs) { partial.subs[key] = stackSubs[key]; } stackPartials = stackPartials || {}; partial.stackPartials = stackPartials; for (key in partials) { if (!stackPartials[key]) stackPartials[key] = partials[key]; } for (key in stackPartials) { partial.partials[key] = stackPartials[key]; } return partial; } var rAmp = /&/g, rLt = /</g, rGt = />/g, rApos = /\'/g, rQuot = /\"/g, hChars = /[&<>\"\']/; function coerceToString(val) { return String((val === null || val === undefined) ? '' : val); } function hoganEscape(str) { str = coerceToString(str); return hChars.test(str) ? str .replace(rAmp, '&amp;') .replace(rLt, '&lt;') .replace(rGt, '&gt;') .replace(rApos, '&#39;') .replace(rQuot, '&quot;') : str; } var isArray = Array.isArray || function(a) { return Object.prototype.toString.call(a) === '[object Array]'; }; })(typeof exports !== 'undefined' ? exports : Hogan); }); var template$1 = interopDefault(template); var require$$0 = Object.freeze({ default: template$1 }); var hogan = createCommonjsModule(function (module) { /* * Copyright 2011 Twitter, Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // This file is for use with Node.js. See dist/ for browser files. var Hogan = interopDefault(require$$1); Hogan.Template = interopDefault(require$$0).Template; Hogan.template = Hogan.Template; module.exports = Hogan; }); var hogan$1 = interopDefault(hogan); var stylesTemplate = '{{#selectors}}' + '{{#media}} {{media}} { {{/media}}' + '{{selector}} { ' + '{{#declarations}}' + '{{property}}: {{{value}}};' + '{{/declarations}}' + ' } ' + '{{#media}} } {{/media}}' + '{{/selectors}}'; var conditionalStyles = ".shopify-buy__modal {\n display: none; }\n .is-active .shopify-buy__modal {\n display: block;\n opacity: 1;\n margin-left: auto;\n margin-right: auto; }\n"; var iframeStyles = { width: '100%', overflow: 'hidden', border: 'none' }; var iframeAttrs = { horizontalscrolling: 'no', verticalscrolling: 'no', allowTransparency: 'true', frameBorder: '0', scrolling: 'no' }; var webfontScript = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.16/webfont.js'; function isPseudoSelector$1(key) { return key.charAt(0) === ':'; } function isMedia$1(key) { return key.charAt(0) === '@'; } function isValue(test) { return typeof test === 'string' || typeof test === 'number'; } function ruleDeclarations(rule) { return Object.keys(rule).filter(function (key) { return isValue(rule[key]); }).map(function (key) { return { property: key, value: rule[key] }; }); } function selectorStyleGroup(selector, selectorClass, classes) { var styleGroup = []; if (selector && selectorClass) { (function () { var formattedSelector = selectorClass.split(' ').join('.'); if (!isPseudoSelector$1(formattedSelector)) { formattedSelector = '.' + formattedSelector; } styleGroup = Object.keys(selector).filter(function (decKey) { return !isValue(selector[decKey]); }).reduce(function (acc, decKey) { var className = classes[decKey] || decKey; return acc.concat(selectorStyleGroup(selector[decKey], className, classes).map(function (group) { var groupSelector = ''; if (isPseudoSelector$1(group.selector)) { groupSelector = '' + formattedSelector + group.selector; } else if (isMedia$1(decKey)) { groupSelector = formattedSelector; } else { groupSelector = formattedSelector + ' ' + group.selector; } return { selector: groupSelector, declarations: group.declarations, media: isMedia$1(decKey) ? decKey : null }; })); }, []); var declarations = ruleDeclarations(selector); if (declarations.length) { styleGroup.push({ selector: '' + formattedSelector, declarations: declarations }); } })(); } return styleGroup; } var iframe = function () { function iframe(node, config) { var _this = this; classCallCheck(this, iframe); this.el = document.createElement('iframe'); this.parent = node; this.stylesheet = config.stylesheet; this.customStylesHash = config.customStyles || {}; this.classes = config.classes; this.browserFeatures = config.browserFeatures; this.googleFonts = config.googleFonts || []; this.name = config.name; if (config.width) { this.setWidth(config.width); } Object.keys(iframeStyles).forEach(function (key) { _this.el.style[key] = iframeStyles[key]; }); Object.keys(iframeAttrs).forEach(function (key) { return _this.el.setAttribute(key, iframeAttrs[key]); }); this.el.setAttribute('name', config.name); this.styleTag = null; } iframe.prototype.load = function load() { var _this2 = this; return new Promise(function (resolve) { _this2.el.onload = function () { return _this2.loadFonts().then(function () { _this2.appendStyleTag(); return resolve(); }); }; _this2.parent.appendChild(_this2.el); }); }; iframe.prototype.loadFonts = function loadFonts() { var _this3 = this; if (!this.googleFonts.length) { return Promise.resolve(true); } return this.loadFontScript().then(function () { if (window.WebFont) { window.WebFont.load({ google: { families: _this3.googleFonts }, context: frames[_this3.name] }); } return true; }); }; iframe.prototype.loadFontScript = function loadFontScript() { if (window.WebFont) { return Promise.resolve(); } var fontScript = document.createElement('script'); return new Promise(function (resolve) { fontScript.onload = function () { resolve(); }; fontScript.src = webfontScript; document.head.appendChild(fontScript); setTimeout(function () { resolve(); }, 500); }); }; iframe.prototype.setWidth = function setWidth(width) { this.parent.style['max-width'] = width; }; iframe.prototype.addClass = function addClass(className) { if (this.parent.className.indexOf(className) < 0) { this.parent.className += ' ' + className; } }; iframe.prototype.setName = function setName(name) { this.el.setAttribute('name', name); }; iframe.prototype.removeClass = function removeClass(className) { var newClass = this.parent.className.replace(className, ''); this.parent.className = newClass; }; iframe.prototype.updateStyles = function updateStyles(customStyles) { this.customStylesHash = customStyles; this.styleTag.innerHTML = this.css; }; iframe.prototype.appendStyleTag = function appendStyleTag() { if (!this.document.head) { return; } this.styleTag = this.document.createElement('style'); if (this.styleTag.styleSheet) { this.styleTag.styleSheet.cssText = this.css; } else { this.styleTag.appendChild(this.document.createTextNode(this.css)); } this.document.head.appendChild(this.styleTag); }; createClass(iframe, [{ key: 'width', get: function get() { return this.parent.style['max-width']; } }, { key: 'document', get: function get() { var doc = void 0; if (this.el.contentWindow && this.el.contentWindow.document.body) { doc = this.el.contentWindow.document; } else if (this.el.document && this.el.document.body) { doc = this.el.document; } else if (this.el.contentDocument && this.el.contentDocument.body) { doc = this.el.contentDocument; } return doc; } }, { key: 'customStyles', get: function get() { var _this4 = this; var customStyles = []; Object.keys(this.customStylesHash).forEach(function (typeKey) { if (_this4.customStylesHash[typeKey]) { Object.keys(_this4.customStylesHash[typeKey]).forEach(function (key) { var styleGroup = selectorStyleGroup(_this4.customStylesHash[typeKey][key], _this4.classes[typeKey][key], _this4.classes[typeKey]); customStyles = customStyles.concat(styleGroup); }); } }); return customStyles; } }, { key: 'conditionalCSS', get: function get() { if (this.browserFeatures.transition && this.browserFeatures.transform && this.browserFeatures.animation) { return ''; } return conditionalStyles; } }, { key: 'css', get: function get() { var compiled = hogan$1.compile(stylesTemplate); return this.stylesheet + ' \n ' + compiled.render({ selectors: this.customStyles }) + ' \n ' + this.conditionalCSS; } }]); return iframe; }(); var Template = function () { function Template(templates, contents, order) { classCallCheck(this, Template); this.templates = templates; this.contents = contents; this.order = order; this.templateFn = hogan$1.compile(this.masterTemplate); } Template.prototype.render = function render(data, cb) { var output = '' + this.templateFn.render(data); if (!cb) { return output; } return cb(output); }; createClass(Template, [{ key: 'masterTemplate', get: function get() { var _this = this; return this.order.reduce(function (acc, key) { var string = ''; if (_this.contents[key]) { string = _this.templates[key] || ''; } return acc + string; }, ''); } }]); return Template; }(); var styles = {}; styles.cart = 'html,body,h1,h2,h3,h4,h5,p{padding:0;margin:0}*{box-sizing:border-box}body,html{min-height:100%}html{font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-size:14px;line-height:1.2;color:#4c4c4c;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}ul{list-style:none;padding-left:0;margin:0}img{display:block;max-width:100%}input{-webkit-appearance:textfield;margin:0}.clearfix:after{content:"";display:table;clear:both}.visuallyhidden{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.component-container{overflow:hidden}.shopify-buy__type--center{text-align:center}.shopify-buy__btn{color:#fff;font-size:15px;background-color:#78b657;padding:12px 40px;letter-spacing:.3px;display:block;border-radius:3px;cursor:pointer;transition:background 200ms ease;max-width:100%;text-overflow:ellipsis;overflow:hidden;line-height:1.2;border:0;-moz-appearance:none;-webkit-appearance:none}.shopify-buy__btn:hover,.shopify-buy__btn:focus{background-color:#5f9d3e}.shopify-buy__btn--parent{background-color:transparent;border:0;line-height:1;padding:0;cursor:pointer;-moz-appearance:none;-webkit-appearance:none}.shopify-buy__btn--parent:hover .product__variant-img,.shopify-buy__btn--parent:focus .product__variant-img{opacity:.7}.shopify-buy__btn--cart-tab{padding:5px 11px;border-radius:3px 0 0 3px;position:fixed;right:0;top:50%;transform:translate(100%, -50%);opacity:0;min-width:inherit;width:auto;height:auto;z-index:2147483647}.shopify-buy__btn--cart-tab.is-active{transform:translateY(-50%);opacity:1}.shopify-buy__btn__counter{display:block;margin:0 auto 10px auto;font-size:18px}.shopify-buy__icon-cart--side{height:20px;width:20px}.shopify-buy__btn[disabled]{background-color:#999;pointer-events:none}.shopify-buy__btn--close{position:absolute;right:9px;top:8px;font-size:35px;color:#767676;border:none;background-color:transparent;transition:transform 100ms ease;cursor:pointer;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;padding-right:9px}.shopify-buy__btn--close:hover{transform:scale(1.2);color:dimgray}@keyframes flipin{from{max-height:0;transform:rotatex(90deg) translatey(-50%);margin-bottom:-65px;opacity:0}to{min-height:65px;margin-bottom:15px;transform:none;opacity:1}}.shopify-buy__cart-wrapper{height:100%;padding-left:10px}.shopify-buy__cart{height:100%;background-color:#fff;width:calc(100% - 10px);position:absolute;right:0;box-shadow:-5px 0 5px rgba(0,0,0,0.1)}.shopify-buy__cart__header{padding:20px;padding-right:40px;position:relative;z-index:2147483647}.shopify-buy__cart__title{font-size:18px;color:#767676;font-weight:normal;overflow:hidden;text-overflow:ellipsis}.shopify-buy__cart-scroll{padding:70px 0 135px 0;position:absolute;top:0;height:100%;width:100%}.shopify-buy__cart-items{overflow:hidden;overflow-y:auto;height:100%;position:relative;padding:0 20px 20px;-webkit-overflow-scrolling:touch;perspective:400px;perspective-origin:50% 0px}.shopify-buy__cart-item{min-height:65px;margin-bottom:20px;overflow:hidden;position:relative;transition:all 200ms;backface-visibility:visible;transform-style:preserve-3d;animation-name:flipIn;animation-duration:200ms}.shopify-buy__cart-item.is-hidden{transform:rotateX(90deg) translateY(-50%);margin-bottom:-65px;opacity:0;transition:all 200ms}.shopify-buy__cart-item__image{width:65px;height:65px;background-size:contain;background-repeat:no-repeat;background-position:center center;background-color:transparent;position:absolute;left:0;top:0}.shopify-buy__cart-item__title{font-size:14px;margin-left:80px;display:block;margin-bottom:10px}.shopify-buy__cart-item__price{float:right;font-size:14px;font-weight:bold}.shopify-buy__cart-item__variant-title{float:right;color:#4c4c4c;font-size:11px;font-weight:bold;max-width:220px;overflow:hidden;text-overflow:ellipsis}.shopify-buy__cart-bottom{background-color:#fff;position:absolute;width:100%;bottom:0;padding:20px}.shopify-buy__cart__subtotal__text{text-transform:uppercase;float:left;font-size:11px;color:#4c4c4c}.shopify-buy__cart__subtotal__price{float:right}.shopify-buy__cart__currency{font-size:12px}.shopify-buy__cart__notice{font-size:11px;clear:both;padding-top:10px;text-align:center;color:#4c4c4c}.shopify-buy__cart-empty-text{padding:10px 15px;text-align:center}.shopify-buy__btn--cart-checkout{clear:both;margin-top:15px;width:100%;padding:10px 5px;font-size:16px}.shopify-buy__quantity-container{margin-left:80px}.shopify-buy__cart-item__quantity-input{float:left;background:transparent}.shopify-buy__quantity-decrement,.shopify-buy__quantity-increment{color:#4c4c4c;display:block;height:26px;float:left;line-height:16px;font-family:monospace;width:26px;padding:0;border:none;background:transparent;box-shadow:none;cursor:pointer;font-size:18px;text-align:center;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;border:1px solid #767676}.shopify-buy__quantity-decrement{border-radius:3px 0 0 3px}.shopify-buy__quantity-increment{border-radius:0 3px 3px 0}.shopify-buy__quantity{color:black;width:45px;height:26px;font-size:12px;border:none;text-align:center;-moz-appearance:textfield;-webkit-appearance:none;display:inline-block;padding:0;border-radius:0;border-top:1px solid #767676;border-bottom:1px solid #767676}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.shopify-buy__quantity-container.shopify-buy__quantity-with-btns{overflow:hidden}.shopify-buy__quantity-container.shopify-buy__quantity-with-btns .shopify-buy__quantity{border-left:0;border-right:0;float:left} '; styles.modal = 'html,body,h1,h2,h3,h4,h5,p{padding:0;margin:0}*{box-sizing:border-box}body,html{min-height:100%}html{font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-size:14px;line-height:1.2;color:#4c4c4c;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}ul{list-style:none;padding-left:0;margin:0}img{display:block;max-width:100%}input{-webkit-appearance:textfield;margin:0}.clearfix:after{content:"";display:table;clear:both}.visuallyhidden{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.component-container{overflow:hidden}.shopify-buy__type--center{text-align:center}.shopify-buy__quantity-decrement,.shopify-buy__quantity-increment{color:#4c4c4c;display:block;height:26px;float:left;line-height:16px;font-family:monospace;width:26px;padding:0;border:none;background:transparent;box-shadow:none;cursor:pointer;font-size:18px;text-align:center;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;border:1px solid #767676}.shopify-buy__quantity-decrement{border-radius:3px 0 0 3px}.shopify-buy__quantity-increment{border-radius:0 3px 3px 0}.shopify-buy__quantity{color:black;width:45px;height:26px;font-size:12px;border:none;text-align:center;-moz-appearance:textfield;-webkit-appearance:none;display:inline-block;padding:0;border-radius:0;border-top:1px solid #767676;border-bottom:1px solid #767676}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.shopify-buy__quantity-container.shopify-buy__quantity-with-btns{overflow:hidden}.shopify-buy__quantity-container.shopify-buy__quantity-with-btns .shopify-buy__quantity{border-left:0;border-right:0;float:left}.shopify-buy__btn{color:#fff;font-size:15px;background-color:#78b657;padding:12px 40px;letter-spacing:.3px;display:block;border-radius:3px;cursor:pointer;transition:background 200ms ease;max-width:100%;text-overflow:ellipsis;overflow:hidden;line-height:1.2;border:0;-moz-appearance:none;-webkit-appearance:none}.shopify-buy__btn:hover,.shopify-buy__btn:focus{background-color:#5f9d3e}.shopify-buy__btn--parent{background-color:transparent;border:0;line-height:1;padding:0;cursor:pointer;-moz-appearance:none;-webkit-appearance:none}.shopify-buy__btn--parent:hover .product__variant-img,.shopify-buy__btn--parent:focus .product__variant-img{opacity:.7}.shopify-buy__btn--cart-tab{padding:5px 11px;border-radius:3px 0 0 3px;position:fixed;right:0;top:50%;transform:translate(100%, -50%);opacity:0;min-width:inherit;width:auto;height:auto;z-index:2147483647}.shopify-buy__btn--cart-tab.is-active{transform:translateY(-50%);opacity:1}.shopify-buy__btn__counter{display:block;margin:0 auto 10px auto;font-size:18px}.shopify-buy__icon-cart--side{height:20px;width:20px}.shopify-buy__btn[disabled]{background-color:#999;pointer-events:none}.shopify-buy__btn--close{position:absolute;right:9px;top:8px;font-size:35px;color:#767676;border:none;background-color:transparent;transition:transform 100ms ease;cursor:pointer;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;padding-right:9px}.shopify-buy__btn--close:hover{transform:scale(1.2);color:dimgray}.shopify-buy__option-select-wrapper{border:1px solid #d3dbe2;border-radius:3px;box-sizing:border-box;position:relative;background:#fff;overflow:hidden;vertical-align:bottom}.shopify-buy__select-icon{cursor:pointer;display:block;fill:#798c9c;position:absolute;right:10px;top:50%;margin-top:-6px;pointer-events:none;width:12px;height:12px;vertical-align:middle}.shopify-buy__option-select+.shopify-buy__option-select{margin-top:7.5px}.shopify-buy__option-select__label{display:block;font-size:14px;margin-top:15px;margin-bottom:5px}.shopify-buy__btn--parent .shopify-buy__option-select__label{cursor:pointer}.shopify-buy__option-select__select{font-size:inherit;padding:7px 10px;padding-right:32px;border:0;width:100%;background:transparent;-webkit-appearance:none;-moz-appearance:none}.shopify-buy__btn--parent .shopify-buy__option-select__select{cursor:pointer}.shopify-buy__product{overflow:hidden;width:100%}.shopify-buy__product__variant-img{margin:0 auto 15px auto;transition:opacity 0.3s ease;opacity:1}.shopify-buy__product__variant-img.is-transitioning{opacity:0}.shopify-buy__is-button{cursor:pointer}.shopify-buy__no-image .shopify-buy__product__variant-img{display:none}.shopify-buy__product__title{font-size:18px;line-height:1.2;color:#4a4a4a;margin-bottom:15px;font-weight:700}.shopify-buy__layout-horizontal .shopify-buy__product__title{margin-top:10px}.shopify-buy__product__variant-title{font-size:18px;color:#666;font-weight:400;text-align:center;margin-bottom:15px}.shopify-buy__product__price{margin-bottom:15px}.shopify-buy__product-description{margin-top:30px;line-height:1.65;color:#4a4a4a}.shopify-buy__product-description p,.shopify-buy__product-description ul,.shopify-buy__product-description ol,.shopify-buy__product-description img{margin-bottom:10px}.shopify-buy__product-description p:last-child,.shopify-buy__product-description ul:last-child,.shopify-buy__product-description ol:last-child,.shopify-buy__product-description img:last-child{margin-bottom:0}.shopify-buy__product-description a{color:inherit}.shopify-buy__product-description img{max-width:100%}.shopify-buy__product-description h1{font-size:20px}.shopify-buy__product-description h2{font-size:18px}.shopify-buy__product-description h3{font-size:17px}.shopify-buy__product-description ul,.shopify-buy__product-description ol{margin-left:2em}.shopify-buy__product-description ul{list-style-type:disc}.shopify-buy__layout-vertical{text-align:center}.shopify-buy__product__actual-price,.shopify-buy__product__compare-price{color:#4a4a4a;display:inline-block}.shopify-buy__product__actual-price{font-size:14px}.shopify-buy__product__compare-price{font-size:12px;text-decoration:line-through;padding-left:5px}.shopify-buy__product__variant-selectors{text-align:left;font-size:14px}.shopify-buy__quantity{border-left:1px solid;border-right:1px solid;border-radius:3px}.shopify-buy__quantity,.shopify-buy__quantity-increment,.shopify-buy__quantity-decrement{border-color:#d3dbe2;line-height:1.2;font-size:15px;height:auto;padding-top:12px;padding-bottom:12px}.shopify-buy__btn{display:block}.shopify-buy__btn.shopify-buy__beside-quantity{display:inline-block;vertical-align:top;border-top-left-radius:0;border-bottom-left-radius:0;border:1px solid transparent}.shopify-buy__btn-and-quantity .shopify-buy__quantity{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;background:#fff}.shopify-buy__btn-and-quantity .shopify-buy__quantity-container{display:inline-block}.shopify-buy__cart-item__quantity-container{margin-top:20px;display:inline-block}.shopify-buy__layout-vertical .shopify-buy__btn,.shopify-buy__layout-vertical .shopify-buy__quantity-container,.shopify-buy__layout-horizontal .shopify-buy__btn,.shopify-buy__layout-horizontal .shopify-buy__quantity-container{margin:20px auto 0}.shopify-buy__layout-vertical .shopify-buy__btn-and-quantity,.shopify-buy__layout-horizontal .shopify-buy__btn-and-quantity{margin:20px auto 0}.shopify-buy__layout-vertical .shopify-buy__btn-and-quantity .shopify-buy__btn,.shopify-buy__layout-vertical .shopify-buy__btn-and-quantity .shopify-buy__quantity-container,.shopify-buy__layout-horizontal .shopify-buy__btn-and-quantity .shopify-buy__btn,.shopify-buy__layout-horizontal .shopify-buy__btn-and-quantity .shopify-buy__quantity-container{margin:0 auto}.shopify-buy__layout-vertical .shopify-buy__product__variant-img,.shopify-buy__layout-horizontal .shopify-buy__product__variant-img{max-width:100%}@media (min-width: 500px){.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-img-wrapper{float:left;width:40%}.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-title{text-align:left}.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__price,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-description,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn:not(.shopify-buy__beside-quantity),.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn-and-quantity,.shopify-buy__layout-horizontal:not(.no-image)>.shopify-buy__quantity-container,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-selectors{margin-left:calc(40% + 25px)}}@media (min-width: 680px){.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-img-wrapper{float:left;width:60%}.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__price,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-description,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn:not(.shopify-buy__beside-quantity),.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn-and-quantity,.shopify-buy__layout-horizontal:not(.no-image)>.shopify-buy__quantity-container,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-selectors{margin-left:calc(60% + 25px)}}@keyframes dash{to{stroke-dashoffset:0}}.shopify-buy__btn--close{right:0px;font-size:45px;font-weight:100;z-index:2147483647;padding:0 10px}.shopify-buy__modal{background:#fff;width:calc(100% - 20px);position:absolute;left:0;right:0;z-index:2147483646}.shopify-buy__product{text-align:left}.shopify-buy__product__title,.shopify-buy__product__price,.shopify-buy__product__variant-title{text-align:left}.shopify-buy__product__title{font-size:26px;font-weight:700;line-height:1.4}.shopify-buy__product__compare-price{display:inline-block;margin-right:5px}.shopify-buy__product__actual-price{display:inline-block}.shopify-buy__modal .shopify-buy__modal-product-wrapper{width:100%}.shopify-buy__product__variant-image{margin:0}@media (max-width: 499px){body.is-active{overflow:hidden;position:fixed;height:100vh;transition:all 0s}.shopify-buy__modal{width:100%;min-height:100vh;position:fixed;overflow-y:auto}.shopify-buy__product{padding:15px;position:absolute;top:0;left:0}.shopify-buy__product__variant-img{max-height:60vh;margin:0 auto;width:auto;max-width:100%}.shopify-buy__btn--close{position:fixed;top:0;right:0}}@keyframes slideIn{from{opacity:0;transform:translateY(-200px);-webkit-transform:translateY(-200px)}to{opacity:1;transform:translateY(0);-webkit-transform:translateY(0)}}@media (min-width: 500px){html,body.is-active{height:100%}.shopify-buy__modal-overlay{width:100%;height:100%;position:fixed;overflow-y:scroll}.shopify-buy__modal{margin:100px auto 40px auto;opacity:0;border-radius:2px;border:1px solid rgba(0,0,0,0.72);transform:translateY(-200px);max-width:1000px;animation-name:slideOut;animation-duration:200ms;animation-fill-mode:forwards}.is-active .shopify-buy__modal{animation-name:slideIn;animation-duration:200ms;animation-fill-mode:forwards}.shopify-buy__product{padding:30px}.shopify-buy__product-img-wrapper{height:100%;padding-right:30px;max-height:570}.shopify-buy__product-img-wrapper{height:100%;max-height:570}.shopify-buy__product__variant-img{max-height:100%}.shopify-buy__btn--close{top:-60px;color:#fff}.shopify-buy__btn--close:hover{color:#fff}}@media (min-width: 680px){.shopify-buy__product{padding:45px}} '; styles.product = 'html,body,h1,h2,h3,h4,h5,p{padding:0;margin:0}*{box-sizing:border-box}body,html{min-height:100%}html{font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-size:14px;line-height:1.2;color:#4c4c4c;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}ul{list-style:none;padding-left:0;margin:0}img{display:block;max-width:100%}input{-webkit-appearance:textfield;margin:0}.clearfix:after{content:"";display:table;clear:both}.visuallyhidden{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.component-container{overflow:hidden}.shopify-buy__type--center{text-align:center}.shopify-buy__quantity-decrement,.shopify-buy__quantity-increment{color:#4c4c4c;display:block;height:26px;float:left;line-height:16px;font-family:monospace;width:26px;padding:0;border:none;background:transparent;box-shadow:none;cursor:pointer;font-size:18px;text-align:center;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;border:1px solid #767676}.shopify-buy__quantity-decrement{border-radius:3px 0 0 3px}.shopify-buy__quantity-increment{border-radius:0 3px 3px 0}.shopify-buy__quantity{color:black;width:45px;height:26px;font-size:12px;border:none;text-align:center;-moz-appearance:textfield;-webkit-appearance:none;display:inline-block;padding:0;border-radius:0;border-top:1px solid #767676;border-bottom:1px solid #767676}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.shopify-buy__quantity-container.shopify-buy__quantity-with-btns{overflow:hidden}.shopify-buy__quantity-container.shopify-buy__quantity-with-btns .shopify-buy__quantity{border-left:0;border-right:0;float:left}.shopify-buy__btn{color:#fff;font-size:15px;background-color:#78b657;padding:12px 40px;letter-spacing:.3px;display:block;border-radius:3px;cursor:pointer;transition:background 200ms ease;max-width:100%;text-overflow:ellipsis;overflow:hidden;line-height:1.2;border:0;-moz-appearance:none;-webkit-appearance:none}.shopify-buy__btn:hover,.shopify-buy__btn:focus{background-color:#5f9d3e}.shopify-buy__btn--parent{background-color:transparent;border:0;line-height:1;padding:0;cursor:pointer;-moz-appearance:none;-webkit-appearance:none}.shopify-buy__btn--parent:hover .product__variant-img,.shopify-buy__btn--parent:focus .product__variant-img{opacity:.7}.shopify-buy__btn--cart-tab{padding:5px 11px;border-radius:3px 0 0 3px;position:fixed;right:0;top:50%;transform:translate(100%, -50%);opacity:0;min-width:inherit;width:auto;height:auto;z-index:2147483647}.shopify-buy__btn--cart-tab.is-active{transform:translateY(-50%);opacity:1}.shopify-buy__btn__counter{display:block;margin:0 auto 10px auto;font-size:18px}.shopify-buy__icon-cart--side{height:20px;width:20px}.shopify-buy__btn[disabled]{background-color:#999;pointer-events:none}.shopify-buy__btn--close{position:absolute;right:9px;top:8px;font-size:35px;color:#767676;border:none;background-color:transparent;transition:transform 100ms ease;cursor:pointer;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;padding-right:9px}.shopify-buy__btn--close:hover{transform:scale(1.2);color:dimgray}.shopify-buy__option-select-wrapper{border:1px solid #d3dbe2;border-radius:3px;box-sizing:border-box;position:relative;background:#fff;overflow:hidden;vertical-align:bottom}.shopify-buy__select-icon{cursor:pointer;display:block;fill:#798c9c;position:absolute;right:10px;top:50%;margin-top:-6px;pointer-events:none;width:12px;height:12px;vertical-align:middle}.shopify-buy__option-select+.shopify-buy__option-select{margin-top:7.5px}.shopify-buy__option-select__label{display:block;font-size:14px;margin-top:15px;margin-bottom:5px}.shopify-buy__btn--parent .shopify-buy__option-select__label{cursor:pointer}.shopify-buy__option-select__select{font-size:inherit;padding:7px 10px;padding-right:32px;border:0;width:100%;background:transparent;-webkit-appearance:none;-moz-appearance:none}.shopify-buy__btn--parent .shopify-buy__option-select__select{cursor:pointer}.shopify-buy__product{overflow:hidden;width:100%}.shopify-buy__product__variant-img{margin:0 auto 15px auto;transition:opacity 0.3s ease;opacity:1}.shopify-buy__product__variant-img.is-transitioning{opacity:0}.shopify-buy__is-button{cursor:pointer}.shopify-buy__no-image .shopify-buy__product__variant-img{display:none}.shopify-buy__product__title{font-size:18px;line-height:1.2;color:#4a4a4a;margin-bottom:15px;font-weight:700}.shopify-buy__layout-horizontal .shopify-buy__product__title{margin-top:10px}.shopify-buy__product__variant-title{font-size:18px;color:#666;font-weight:400;text-align:center;margin-bottom:15px}.shopify-buy__product__price{margin-bottom:15px}.shopify-buy__product-description{margin-top:30px;line-height:1.65;color:#4a4a4a}.shopify-buy__product-description p,.shopify-buy__product-description ul,.shopify-buy__product-description ol,.shopify-buy__product-description img{margin-bottom:10px}.shopify-buy__product-description p:last-child,.shopify-buy__product-description ul:last-child,.shopify-buy__product-description ol:last-child,.shopify-buy__product-description img:last-child{margin-bottom:0}.shopify-buy__product-description a{color:inherit}.shopify-buy__product-description img{max-width:100%}.shopify-buy__product-description h1{font-size:20px}.shopify-buy__product-description h2{font-size:18px}.shopify-buy__product-description h3{font-size:17px}.shopify-buy__product-description ul,.shopify-buy__product-description ol{margin-left:2em}.shopify-buy__product-description ul{list-style-type:disc}.shopify-buy__layout-vertical{text-align:center}.shopify-buy__product__actual-price,.shopify-buy__product__compare-price{color:#4a4a4a;display:inline-block}.shopify-buy__product__actual-price{font-size:14px}.shopify-buy__product__compare-price{font-size:12px;text-decoration:line-through;padding-left:5px}.shopify-buy__product__variant-selectors{text-align:left;font-size:14px}.shopify-buy__quantity{border-left:1px solid;border-right:1px solid;border-radius:3px}.shopify-buy__quantity,.shopify-buy__quantity-increment,.shopify-buy__quantity-decrement{border-color:#d3dbe2;line-height:1.2;font-size:15px;height:auto;padding-top:12px;padding-bottom:12px}.shopify-buy__btn{display:block}.shopify-buy__btn.shopify-buy__beside-quantity{display:inline-block;vertical-align:top;border-top-left-radius:0;border-bottom-left-radius:0;border:1px solid transparent}.shopify-buy__btn-and-quantity .shopify-buy__quantity{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;background:#fff}.shopify-buy__btn-and-quantity .shopify-buy__quantity-container{display:inline-block}.shopify-buy__cart-item__quantity-container{margin-top:20px;display:inline-block}.shopify-buy__layout-vertical .shopify-buy__btn,.shopify-buy__layout-vertical .shopify-buy__quantity-container,.shopify-buy__layout-horizontal .shopify-buy__btn,.shopify-buy__layout-horizontal .shopify-buy__quantity-container{margin:20px auto 0}.shopify-buy__layout-vertical .shopify-buy__btn-and-quantity,.shopify-buy__layout-horizontal .shopify-buy__btn-and-quantity{margin:20px auto 0}.shopify-buy__layout-vertical .shopify-buy__btn-and-quantity .shopify-buy__btn,.shopify-buy__layout-vertical .shopify-buy__btn-and-quantity .shopify-buy__quantity-container,.shopify-buy__layout-horizontal .shopify-buy__btn-and-quantity .shopify-buy__btn,.shopify-buy__layout-horizontal .shopify-buy__btn-and-quantity .shopify-buy__quantity-container{margin:0 auto}.shopify-buy__layout-vertical .shopify-buy__product__variant-img,.shopify-buy__layout-horizontal .shopify-buy__product__variant-img{max-width:100%}@media (min-width: 500px){.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-img-wrapper{float:left;width:40%}.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-title{text-align:left}.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__price,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-description,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn:not(.shopify-buy__beside-quantity),.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn-and-quantity,.shopify-buy__layout-horizontal:not(.no-image)>.shopify-buy__quantity-container,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-selectors{margin-left:calc(40% + 25px)}}@media (min-width: 680px){.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-img-wrapper{float:left;width:60%}.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__price,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-description,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn:not(.shopify-buy__beside-quantity),.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn-and-quantity,.shopify-buy__layout-horizontal:not(.no-image)>.shopify-buy__quantity-container,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-selectors{margin-left:calc(60% + 25px)}}@keyframes dash{to{stroke-dashoffset:0}} '; styles.productSet = 'html,body,h1,h2,h3,h4,h5,p{padding:0;margin:0}*{box-sizing:border-box}body,html{min-height:100%}html{font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-size:14px;line-height:1.2;color:#4c4c4c;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}ul{list-style:none;padding-left:0;margin:0}img{display:block;max-width:100%}input{-webkit-appearance:textfield;margin:0}.clearfix:after{content:"";display:table;clear:both}.visuallyhidden{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.component-container{overflow:hidden}.shopify-buy__type--center{text-align:center}.shopify-buy__btn{color:#fff;font-size:15px;background-color:#78b657;padding:12px 40px;letter-spacing:.3px;display:block;border-radius:3px;cursor:pointer;transition:background 200ms ease;max-width:100%;text-overflow:ellipsis;overflow:hidden;line-height:1.2;border:0;-moz-appearance:none;-webkit-appearance:none}.shopify-buy__btn:hover,.shopify-buy__btn:focus{background-color:#5f9d3e}.shopify-buy__btn--parent{background-color:transparent;border:0;line-height:1;padding:0;cursor:pointer;-moz-appearance:none;-webkit-appearance:none}.shopify-buy__btn--parent:hover .product__variant-img,.shopify-buy__btn--parent:focus .product__variant-img{opacity:.7}.shopify-buy__btn--cart-tab{padding:5px 11px;border-radius:3px 0 0 3px;position:fixed;right:0;top:50%;transform:translate(100%, -50%);opacity:0;min-width:inherit;width:auto;height:auto;z-index:2147483647}.shopify-buy__btn--cart-tab.is-active{transform:translateY(-50%);opacity:1}.shopify-buy__btn__counter{display:block;margin:0 auto 10px auto;font-size:18px}.shopify-buy__icon-cart--side{height:20px;width:20px}.shopify-buy__btn[disabled]{background-color:#999;pointer-events:none}.shopify-buy__btn--close{position:absolute;right:9px;top:8px;font-size:35px;color:#767676;border:none;background-color:transparent;transition:transform 100ms ease;cursor:pointer;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;padding-right:9px}.shopify-buy__btn--close:hover{transform:scale(1.2);color:dimgray}.shopify-buy__quantity-decrement,.shopify-buy__quantity-increment{color:#4c4c4c;display:block;height:26px;float:left;line-height:16px;font-family:monospace;width:26px;padding:0;border:none;background:transparent;box-shadow:none;cursor:pointer;font-size:18px;text-align:center;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;border:1px solid #767676}.shopify-buy__quantity-decrement{border-radius:3px 0 0 3px}.shopify-buy__quantity-increment{border-radius:0 3px 3px 0}.shopify-buy__quantity{color:black;width:45px;height:26px;font-size:12px;border:none;text-align:center;-moz-appearance:textfield;-webkit-appearance:none;display:inline-block;padding:0;border-radius:0;border-top:1px solid #767676;border-bottom:1px solid #767676}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.shopify-buy__quantity-container.shopify-buy__quantity-with-btns{overflow:hidden}.shopify-buy__quantity-container.shopify-buy__quantity-with-btns .shopify-buy__quantity{border-left:0;border-right:0;float:left}.shopify-buy__option-select-wrapper{border:1px solid #d3dbe2;border-radius:3px;box-sizing:border-box;position:relative;background:#fff;overflow:hidden;vertical-align:bottom}.shopify-buy__select-icon{cursor:pointer;display:block;fill:#798c9c;position:absolute;right:10px;top:50%;margin-top:-6px;pointer-events:none;width:12px;height:12px;vertical-align:middle}.shopify-buy__option-select+.shopify-buy__option-select{margin-top:7.5px}.shopify-buy__option-select__label{display:block;font-size:14px;margin-top:15px;margin-bottom:5px}.shopify-buy__btn--parent .shopify-buy__option-select__label{cursor:pointer}.shopify-buy__option-select__select{font-size:inherit;padding:7px 10px;padding-right:32px;border:0;width:100%;background:transparent;-webkit-appearance:none;-moz-appearance:none}.shopify-buy__btn--parent .shopify-buy__option-select__select{cursor:pointer}.shopify-buy__product{overflow:hidden;width:100%}.shopify-buy__product__variant-img{margin:0 auto 15px auto;transition:opacity 0.3s ease;opacity:1}.shopify-buy__product__variant-img.is-transitioning{opacity:0}.shopify-buy__is-button{cursor:pointer}.shopify-buy__no-image .shopify-buy__product__variant-img{display:none}.shopify-buy__product__title{font-size:18px;line-height:1.2;color:#4a4a4a;margin-bottom:15px;font-weight:700}.shopify-buy__layout-horizontal .shopify-buy__product__title{margin-top:10px}.shopify-buy__product__variant-title{font-size:18px;color:#666;font-weight:400;text-align:center;margin-bottom:15px}.shopify-buy__product__price{margin-bottom:15px}.shopify-buy__product-description{margin-top:30px;line-height:1.65;color:#4a4a4a}.shopify-buy__product-description p,.shopify-buy__product-description ul,.shopify-buy__product-description ol,.shopify-buy__product-description img{margin-bottom:10px}.shopify-buy__product-description p:last-child,.shopify-buy__product-description ul:last-child,.shopify-buy__product-description ol:last-child,.shopify-buy__product-description img:last-child{margin-bottom:0}.shopify-buy__product-description a{color:inherit}.shopify-buy__product-description img{max-width:100%}.shopify-buy__product-description h1{font-size:20px}.shopify-buy__product-description h2{font-size:18px}.shopify-buy__product-description h3{font-size:17px}.shopify-buy__product-description ul,.shopify-buy__product-description ol{margin-left:2em}.shopify-buy__product-description ul{list-style-type:disc}.shopify-buy__layout-vertical{text-align:center}.shopify-buy__product__actual-price,.shopify-buy__product__compare-price{color:#4a4a4a;display:inline-block}.shopify-buy__product__actual-price{font-size:14px}.shopify-buy__product__compare-price{font-size:12px;text-decoration:line-through;padding-left:5px}.shopify-buy__product__variant-selectors{text-align:left;font-size:14px}.shopify-buy__quantity{border-left:1px solid;border-right:1px solid;border-radius:3px}.shopify-buy__quantity,.shopify-buy__quantity-increment,.shopify-buy__quantity-decrement{border-color:#d3dbe2;line-height:1.2;font-size:15px;height:auto;padding-top:12px;padding-bottom:12px}.shopify-buy__btn{display:block}.shopify-buy__btn.shopify-buy__beside-quantity{display:inline-block;vertical-align:top;border-top-left-radius:0;border-bottom-left-radius:0;border:1px solid transparent}.shopify-buy__btn-and-quantity .shopify-buy__quantity{border-right:0;border-top-right-radius:0;border-bottom-right-radius:0;background:#fff}.shopify-buy__btn-and-quantity .shopify-buy__quantity-container{display:inline-block}.shopify-buy__cart-item__quantity-container{margin-top:20px;display:inline-block}.shopify-buy__layout-vertical .shopify-buy__btn,.shopify-buy__layout-vertical .shopify-buy__quantity-container,.shopify-buy__layout-horizontal .shopify-buy__btn,.shopify-buy__layout-horizontal .shopify-buy__quantity-container{margin:20px auto 0}.shopify-buy__layout-vertical .shopify-buy__btn-and-quantity,.shopify-buy__layout-horizontal .shopify-buy__btn-and-quantity{margin:20px auto 0}.shopify-buy__layout-vertical .shopify-buy__btn-and-quantity .shopify-buy__btn,.shopify-buy__layout-vertical .shopify-buy__btn-and-quantity .shopify-buy__quantity-container,.shopify-buy__layout-horizontal .shopify-buy__btn-and-quantity .shopify-buy__btn,.shopify-buy__layout-horizontal .shopify-buy__btn-and-quantity .shopify-buy__quantity-container{margin:0 auto}.shopify-buy__layout-vertical .shopify-buy__product__variant-img,.shopify-buy__layout-horizontal .shopify-buy__product__variant-img{max-width:100%}@media (min-width: 500px){.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-img-wrapper{float:left;width:40%}.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-title{text-align:left}.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__price,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-description,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn:not(.shopify-buy__beside-quantity),.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn-and-quantity,.shopify-buy__layout-horizontal:not(.no-image)>.shopify-buy__quantity-container,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-selectors{margin-left:calc(40% + 25px)}}@media (min-width: 680px){.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-img-wrapper{float:left;width:60%}.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-title,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__price,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product-description,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn:not(.shopify-buy__beside-quantity),.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__btn-and-quantity,.shopify-buy__layout-horizontal:not(.no-image)>.shopify-buy__quantity-container,.shopify-buy__layout-horizontal:not(.no-image) .shopify-buy__product__variant-selectors{margin-left:calc(60% + 25px)}}@keyframes dash{to{stroke-dashoffset:0}}.shopify-buy__collection{overflow:hidden}.shopify-buy__collection-products{display:flex;justify-content:center;flex-wrap:wrap;margin-left:-15px}@media (max-width: 600px){.shopify-buy__collection-products{display:block}}.shopify-buy__product{margin-left:15px;margin-bottom:15px;flex:0 0 auto;display:inline-block;max-width:250px}.shopify-buy__btn.shopify-buy__collection-pagination-button{display:none;margin:15px auto}.shopify-buy__btn.shopify-buy__collection-pagination-button.is-active{display:block} '; styles.toggle = 'html,body,h1,h2,h3,h4,h5,p{padding:0;margin:0}*{box-sizing:border-box}body,html{min-height:100%}html{font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;font-size:14px;line-height:1.2;color:#4c4c4c;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}ul{list-style:none;padding-left:0;margin:0}img{display:block;max-width:100%}input{-webkit-appearance:textfield;margin:0}.clearfix:after{content:"";display:table;clear:both}.visuallyhidden{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.component-container{overflow:hidden}.shopify-buy__type--center{text-align:center}.shopify-buy__btn{color:#fff;font-size:15px;background-color:#78b657;padding:12px 40px;letter-spacing:.3px;display:block;border-radius:3px;cursor:pointer;transition:background 200ms ease;max-width:100%;text-overflow:ellipsis;overflow:hidden;line-height:1.2;border:0;-moz-appearance:none;-webkit-appearance:none}.shopify-buy__btn:hover,.shopify-buy__btn:focus{background-color:#5f9d3e}.shopify-buy__btn--parent{background-color:transparent;border:0;line-height:1;padding:0;cursor:pointer;-moz-appearance:none;-webkit-appearance:none}.shopify-buy__btn--parent:hover .product__variant-img,.shopify-buy__btn--parent:focus .product__variant-img{opacity:.7}.shopify-buy__btn--cart-tab{padding:5px 11px;border-radius:3px 0 0 3px;position:fixed;right:0;top:50%;transform:translate(100%, -50%);opacity:0;min-width:inherit;width:auto;height:auto;z-index:2147483647}.shopify-buy__btn--cart-tab.is-active{transform:translateY(-50%);opacity:1}.shopify-buy__btn__counter{display:block;margin:0 auto 10px auto;font-size:18px}.shopify-buy__icon-cart--side{height:20px;width:20px}.shopify-buy__btn[disabled]{background-color:#999;pointer-events:none}.shopify-buy__btn--close{position:absolute;right:9px;top:8px;font-size:35px;color:#767676;border:none;background-color:transparent;transition:transform 100ms ease;cursor:pointer;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;padding-right:9px}.shopify-buy__btn--close:hover{transform:scale(1.2);color:dimgray}.shopify-buy__cart-toggle-wrapper{display:inline-block}.shopify-buy__cart-toggle{background-color:#78b657;color:#fff;border-radius:3px 0 0 3px;padding:8px 10px;text-align:center;display:inline-block;min-width:46px;margin-right:0;cursor:pointer;transition:background 200ms ease}.shopify-buy__cart-toggle:hover{background-color:#5f9d3e}.shopify-buy__cart-toggle__count{font-size:18px;margin-bottom:10px}.shopify-buy__icon-cart__group{fill:#fff}.is-inline .shopify-buy__icon-cart,.is-inline .shopify-buy__cart-toggle__title,.is-inline .shopify-buy__cart-toggle__count{display:inline-block;vertical-align:middle}.is-inline .shopify-buy__icon-cart{margin-right:5px}.is-inline .shopify-buy__cart-toggle__title{font-size:16px;font-weight:normal}.is-inline .shopify-buy__cart-toggle__count{margin-left:21px;margin-bottom:0;position:relative}.is-inline .shopify-buy__cart-toggle__count:before{content:"";display:block;position:absolute;left:-12px;height:100%;width:1px;background-color:#fff;opacity:0.3}.is-inline.shopify-buy__cart-toggle{border-radius:3px} '; var delegateEventSplitter = /^(\S+)\s*(.*)$/; var ESC_KEY$1 = 27; /** * Manages rendering, lifecycle, and data fetching of a cmoponent. */ var Component = function () { /** * creates a component. * @param {Object} config - configuration object. * @param {Object} props - data and utilities passed down from UI instance. */ function Component(config, props) { classCallCheck(this, Component); this.id = config.id; this.handle = config.handle; this.node = config.node; this.debug = config.debug; this.moneyFormat = config.moneyFormat || '${{amount}}'; this.config = merge({}, defaults, config.options || {}); this.props = props; this.model = {}; this.template = new Template(this.options.templates, this.options.contents, this.options.order); this.children = null; } /** * get reference to client from props. * @return {Object} client instance */ /** * initializes component by creating model and rendering view. * @param {Object} [data] - data to initialize model with. * @return {Promise} promise resolving to instance. */ Component.prototype.init = function init(data) { var _this = this; this._userEvent('beforeInit'); return this.setupView().then(function () { return _this.setupModel(data); }).then(function (model) { _this.model = model; _this.render(); _this.delegateEvents(); _this._userEvent('afterInit'); return _this; }).catch(function (err) { if (err.message.indexOf('Not Found') > -1) { logNotFound(_this); } else { throw err; } }); }; /** * instantiates and configures Iframe if necessary. * @return {Promise} resolves when iframe is loaded. */ Component.prototype.setupView = function setupView() { if (this.iframe) { return Promise.resolve(); } if (this.options.iframe) { this.iframe = new iframe(this.node, { classes: this.classes, customStyles: this.styles, stylesheet: styles[this.typeKey], browserFeatures: this.props.browserFeatures, googleFonts: this.googleFonts, name: this.name, width: this.options.layout === 'vertical' ? this.options.width : null }); this.node.className += ' shopify-buy-frame shopify-buy-frame--' + this.typeKey; this.iframe.addClass(this.iframeClass); return this.iframe.load(); } else { this.iframe = null; return Promise.resolve(); } }; /** * fetches data if necessary * @param {Object} [data] - data to initialize model with. */ Component.prototype.setupModel = function setupModel(data) { if (data) { return Promise.resolve(data); } else { return this.fetchData(); } }; /** * renders string template using viewData to wrapper element. */ Component.prototype.render = function render() { var _this2 = this; this._userEvent('beforeRender'); var html = this.template.render({ data: this.viewData }, function (data) { return _this2.wrapTemplate(data); }); if (!this.wrapper) { this.wrapper = this._createWrapper(); } this.updateNode(this.wrapper, html); this.resize(); this._userEvent('afterRender'); }; /** * delegates DOM events to event listeners. */ Component.prototype.delegateEvents = function delegateEvents() { var _this3 = this; this._userEvent('beforeDelegateEvents'); this._closeComponentsOnEsc(); Object.keys(this.DOMEvents).forEach(function (key) { var _key$match = key.match(delegateEventSplitter); var _key$match2 = slicedToArray(_key$match, 3); var eventName = _key$match2[1]; var selectorString = _key$match2[2]; if (selectorString) { _this3._on(eventName, selectorString, function (evt, target) { _this3.DOMEvents[key].call(_this3, evt, target); }); } else { _this3.wrapper.addEventListener('click', function (evt) { _this3.DOMEvents[key].call(_this3, evt); }); } }); this._userEvent('afterDelegateEvents'); }; /** * get total height of iframe contents * @return {String} value in pixels. */ /** * resize iframe if necessary. */ Component.prototype.resize = function resize() { if (!this.iframe) { return; } if (this.shouldResizeX) { this._resizeX(); } if (this.shouldResizeY) { this._resizeY(); } }; /** * re-assign configuration and re-render component. * @param {Object} config - new configuration object. */ Component.prototype.updateConfig = function updateConfig(config) { this._userEvent('beforeUpdateConfig'); this.config = merge(this.config, config.options); this.template = new Template(this.options.templates, this.options.contents, this.options.order); if (this.iframe) { this.iframe.updateStyles(this.styles); } this.render(); this.resize(); this._userEvent('afterUpdateConfig'); }; /** * remove node from DOM. */ Component.prototype.destroy = function destroy() { this.node.parentNode.removeChild(this.node); }; /** * update the contents of a DOM node with template * @param {String} className - class name to select node. * @param {Object} template - template to be rendered. */ Component.prototype.renderChild = function renderChild(className, template) { var selector = '.' + className.split(' ').join('.'); var node = this.wrapper.querySelector(selector); var html = template.render({ data: this.viewData }); this.updateNode(node, html); }; /** * call morpdom on a node with new HTML * @param {Object} node - DOM node to be updated. * @param {String} html - HTML to update DOM node with. */ Component.prototype.updateNode = function updateNode(node, html) { var div = document.createElement('div'); div.innerHTML = html; morphdom(node, div.firstElementChild); }; /** * wrap HTML string in containing elements. * May be defined in subclass. * @param {String} html - HTML string. * @return {String} wrapped string. */ Component.prototype.wrapTemplate = function wrapTemplate(html) { return '<div class="' + this.classes[this.typeKey][this.typeKey] + '">' + html + '</div>'; }; /** * Focus first focusable element in wrapper. */ Component.prototype.setFocus = function setFocus() { var focusable = this.wrapper.querySelectorAll('a, button, input, select')[0]; if (focusable) { focusable.focus(); } }; Component.prototype._resizeX = function _resizeX() { this.iframe.el.style.width = this.document.body.clientWidth + 'px'; }; Component.prototype._resizeY = function _resizeY(value) { var newHeight = value || this.outerHeight; this.iframe.el.style.height = newHeight; }; Component.prototype._createWrapper = function _createWrapper() { var wrapper = document.createElement('div'); wrapper.className = this.classes[this.typeKey][this.typeKey]; if (this.iframe) { this.document.body.appendChild(wrapper); } else { this.node.appendChild(wrapper); } return wrapper; }; Component.prototype._closeComponentsOnEsc = function _closeComponentsOnEsc() { var _this4 = this; if (!this.iframe) { return; } this.document.addEventListener('keydown', function (evt) { if (evt.keyCode !== ESC_KEY$1) { return; } _this4.props.closeModal(); _this4.props.closeCart(); }); }; Component.prototype._userEvent = function _userEvent(methodName) { if (this.debug) { logger.info('EVENT: ' + methodName + ' (' + this.typeKey + ')'); } if (isFunction(this.events[methodName])) { this.events[methodName].call(this, this); } }; Component.prototype._on = function _on(eventName, selector, fn) { var _this5 = this; this.wrapper.addEventListener(eventName, function (evt) { var possibleTargets = Array.prototype.slice.call(_this5.wrapper.querySelectorAll(selector)); var target = evt.target; possibleTargets.forEach(function (possibleTarget) { var el = target; while (el && el !== _this5.wrapper) { if (el === possibleTarget) { return fn.call(possibleTarget, evt, possibleTarget); } el = el.parentNode; } return el; }); }, eventName === 'blur'); }; createClass(Component, [{ key: 'client', get: function get() { return this.props.client; } /** * get unique name for component. * @return {String} component name. */ }, { key: 'name', get: function get() { var uniqueHandle = ''; if (this.id) { uniqueHandle = '-' + this.id; } else if (this.handle) { uniqueHandle = '-' + this.handle; } return 'frame-' + this.typeKey + uniqueHandle; } /** * get configuration options specific to this component. * @return {Object} options object. */ }, { key: 'options', get: function get() { return merge({}, this.config[this.typeKey]); } /** * get events to be bound to DOM. * @return {Object} DOMEvents object. */ }, { key: 'DOMEvents', get: function get() { return this.options.DOMEvents || {}; } /** * get events to be called on lifecycle methods. * @return {Object} events object. */ }, { key: 'events', get: function get() { return this.options.events || {}; } /** * get styles for component and any components it contains as determined by manifest. * @return {Object} key-value pairs of CSS styles. */ }, { key: 'styles', get: function get() { var _this6 = this; return this.options.manifest.filter(function (component) { return _this6.config[component].styles; }).reduce(function (hash, component) { hash[component] = _this6.config[component].styles; return hash; }, {}); } /** * get classes for component and any components it contains as determined by manifest. * @return {Object} class keys and names. */ }, { key: 'classes', get: function get() { var _this7 = this; return this.options.manifest.filter(function (component) { return _this7.config[component].classes; }).reduce(function (hash, component) { hash[component] = _this7.config[component].classes; return hash; }, {}); } /** * get classes formatted as CSS selectors. * @return {Object} class keys and selectors. */ }, { key: 'selectors', get: function get() { var _this8 = this; return this.options.manifest.filter(function (component) { return _this8.config[component].classes; }).reduce(function (hash, component) { hash[component] = Object.keys(_this8.config[component].classes).reduce(function (classes, classKey) { classes[classKey] = '.' + _this8.classes[component][classKey].split(' ').join('.'); return classes; }, {}); return hash; }, {}); } /** * get google fonts for component and any components it contains as determined by manifest. * @return {Array} array of names of fonts to be loaded. */ }, { key: 'googleFonts', get: function get() { var _this9 = this; return this.options.manifest.filter(function (component) { return _this9.config[component].googleFonts; }).reduce(function (fonts, component) { return fonts.concat(_this9.config[component].googleFonts); }, []); } /** * get reference to document object. * @return {Objcet} instance of Document. */ }, { key: 'document', get: function get() { return this.iframe ? this.iframe.document : window.document; } /** * get data to be passed to view. * @return {Object} viewData object. */ }, { key: 'viewData', get: function get() { return merge(this.model, this.options.viewData, { classes: this.classes, text: this.options.text }); } /** * get callbacks for morphdom lifecycle events. * @return {Object} object. */ }, { key: 'morphCallbacks', get: function get() { return { onBeforeElUpdated: function onBeforeElUpdated(fromEl, toEl) { if (fromEl.tagName === 'IMG') { if (fromEl.src === toEl.getAttribute('data-src')) { return false; } } return true; } }; } /** * get class name for iframe element. Defined in subclass. * @return {String} */ }, { key: 'iframeClass', get: function get() { return ''; } /** * determines if iframe will require horizontal resizing to contain its children. * May be defined in subclass. * @return {Boolean} */ }, { key: 'shouldResizeX', get: function get() { return false; } /** * determines if iframe will require vertical resizing to contain its children. * May be defined in subclass. * @return {Boolean} */ }, { key: 'shouldResizeY', get: function get() { return false; } }, { key: 'outerHeight', get: function get() { return this.document.defaultView.getComputedStyle(this.wrapper, '').getPropertyValue('height'); } }]); return Component; }(); var Checkout = function () { function Checkout(config) { classCallCheck(this, Checkout); this.config = config; } Checkout.prototype.open = function open(url) { window.open(url, 'checkout', this.params); }; createClass(Checkout, [{ key: 'params', get: function get() { var _this = this; return Object.keys(this.config.window).reduce(function (acc, key) { return '' + acc + key + '=' + _this.config.window[key] + ','; }, ''); } }]); return Checkout; }(); var windowUtils = { location: function location() { return window.location.href; } }; function formatMoney(amount, format) { var cents = amount * 100; if (typeof cents == 'string') { cents = cents.replace('.', ''); } var value = ''; var placeholderRegex = /\{\{\s*(\w+)\s*\}\}/; var formatString = format || this.money_format; function defaultOption(opt, def) { return typeof opt == 'undefined' ? def : opt; } function formatWithDelimiters(number, precision, thousands, decimal) { precision = defaultOption(precision, 2); thousands = defaultOption(thousands, ','); decimal = defaultOption(decimal, '.'); if (isNaN(number) || number == null) { return 0; } number = (number / 100.0).toFixed(precision); var parts = number.split('.'), dollars = parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1' + thousands), cents = parts[1] ? decimal + parts[1] : ''; return dollars + cents; } switch (formatString.match(placeholderRegex)[1]) { case 'amount': value = formatWithDelimiters(cents, 2); break; case 'amount_no_decimals': value = formatWithDelimiters(cents, 0); break; case 'amount_with_comma_separator': value = formatWithDelimiters(cents, 2, '.', ','); break; case 'amount_no_decimals_with_comma_separator': value = formatWithDelimiters(cents, 0, '.', ','); break; case 'amount_no_decimals_with_space_separator': value = formatWithDelimiters(cents, 0, ' '); break; } return formatString.replace(placeholderRegex, value); } var pollInterval = 200; function isPseudoSelector(key) { return key.charAt(0) === ':'; } function isMedia(key) { return key.charAt(0) === '@'; } var MAX_WIDTH = '950px'; var propertiesWhitelist = ['background', 'background-color', 'border', 'border-radius', 'color', 'border-color', 'border-width', 'border-style', 'transition', 'text-transform', 'text-shadow', 'box-shadow', 'font-size', 'font-family']; function whitelistedProperties(selectorStyles) { return Object.keys(selectorStyles).reduce(function (filteredStyles, propertyName) { if (isPseudoSelector(propertyName) || isMedia(propertyName)) { filteredStyles[propertyName] = whitelistedProperties(selectorStyles[propertyName]); return filteredStyles; } if (propertiesWhitelist.indexOf(propertyName) > -1) { filteredStyles[propertyName] = selectorStyles[propertyName]; } return filteredStyles; }, {}); } /** * Renders and fetches data for product embed. * @extends Component. */ var Product = function (_Component) { inherits(Product, _Component); /** * create Product. * @param {Object} config - configuration object. * @param {Object} props - data and utilities passed down from UI instance. */ function Product(config, props) { classCallCheck(this, Product); var _this = possibleConstructorReturn(this, _Component.call(this, config, props)); _this.cartNode = config.cartNode; _this.modalNode = config.modalNode; _this.defaultVariantId = config.variantId; _this.cachedImage = null; _this.childTemplate = new Template(_this.config.option.templates, _this.config.option.contents, _this.config.option.order); _this.cart = null; _this.modal = null; _this.imgStyle = ''; _this.selectedQuantity = 1; return _this; } /** * get key for configuration object. * @return {String} */ /** * determines whether an option can resolve to an available variant given current selections * @return {Boolean} */ Product.prototype.optionValueCanBeSelected = function optionValueCanBeSelected(selections, name, value) { var variants = this.variantArray; var selectableValues = _extends({}, selections, defineProperty({}, name, value)); var satisfactoryVariants = variants.filter(function (variant) { var matchingOptions = Object.keys(selectableValues).filter(function (key) { return variant.optionValues[key] === selectableValues[key]; }); return matchingOptions.length === Object.keys(selectableValues).length; }); var variantSelectable = false; variantSelectable = satisfactoryVariants.reduce(function (variantExists, variant) { var variantAvailable = variant.available; if (!variantExists) { return variantAvailable; } return variantExists; }, false); return variantSelectable; }; /** * get options for product with selected value. * @return {Array} */ /** * open online store in new tab. */ Product.prototype.openOnlineStore = function openOnlineStore() { this._userEvent('openOnlineStore'); window.open(this.onlineStoreURL); }; /** * initializes component by creating model and rendering view. * Creates and initalizes cart if necessary. * @param {Object} [data] - data to initialize model with. * @return {Promise} promise resolving to instance. */ Product.prototype.init = function init(data) { var _this2 = this; return _Component.prototype.init.call(this, data).then(function (model) { return _this2.createCart().then(function (cart) { _this2.cart = cart; if (model) { _this2.render(); } return model; }); }); }; /** * renders string template using viewData to wrapper element. * Resizes iframe to match image size. */ Product.prototype.render = function render() { _Component.prototype.render.call(this); if (this.iframe) { this.resizeUntilLoaded(); } }; /** * creates cart if necessary. * @return {Promise} */ Product.prototype.createCart = function createCart() { if (this.shouldCreateCart) { return this.props.createCart({ moneyFormat: this.moneyFormat, node: this.cartNode, options: this.config }); } else { return Promise.resolve(null); } }; /** * fetches data if necessary. * Sets default variant for product. * @param {Object} [data] - data to initialize model with. */ Product.prototype.setupModel = function setupModel(data) { var _this3 = this; return _Component.prototype.setupModel.call(this, data).then(function (model) { return _this3.setDefaultVariant(model); }); }; Product.prototype.wrapTemplate = function wrapTemplate(html) { var ariaLabel = void 0; switch (this.options.buttonDestination) { case 'modal': ariaLabel = 'View details'; break; case 'cart': ariaLabel = 'Add to cart'; break; default: ariaLabel = 'Buy Now'; } if (this.options.contents.button || this.options.contents.buttonWithQuantity) { return '<div class="' + this.wrapperClass + ' ' + this.classes.product.product + '">' + html + '</div>'; } else { return '<div class="' + this.wrapperClass + ' ' + this.classes.product.product + '"><div tabindex="0" role="button" aria-label="' + ariaLabel + '" class="' + this.classes.product.blockButton + '">' + html + '</div></div>'; } }; /** * fetch product data from API. * @return {Promise} promise resolving to model data. */ Product.prototype.sdkFetch = function sdkFetch() { if (this.id) { return this.props.client.fetchProduct(this.id); } else if (this.handle) { return this.props.client.fetchQueryProducts({ handle: this.handle }).then(function (products) { return products[0]; }); } return Promise.reject(); }; /** * call sdkFetch and set selected quantity to 0. * @throw 'Not Found' if model not returned. * @return {Promise} promise resolving to model data. */ Product.prototype.fetchData = function fetchData() { return this.sdkFetch().then(function (model) { if (model) { model.selectedQuantity = 0; return model; } throw new Error('Not Found'); }); }; /** * re-assign configuration and re-render component. * Resize iframe based on change in dimensions of product. * Update Cart or Modal components if necessary. * @param {Object} config - new configuration object. */ Product.prototype.updateConfig = function updateConfig(config) { if (config.id || config.variantId) { this.id = config.id || this.id; this.defaultVariantId = config.variantId || this.defaultVariantId; this.init(); return; } var layout = this.options.layout; if (config.options && config.options.product) { if (config.options.product.layout) { layout = config.options.product.layout; } if (layout === 'vertical' && this.iframe.width === MAX_WIDTH) { this.iframe.setWidth(this.options.width); } if (layout === 'horizontal' && this.iframe.width && this.iframe.width !== MAX_WIDTH) { this.iframe.setWidth(MAX_WIDTH); } if (config.options.product.width && layout === 'vertical') { this.iframe.setWidth(config.options.product.width); } if (config.options.product.layout) { this.iframe.el.style.width = '100%'; } } if (this.iframe) { this.iframe.removeClass(this.classes.product.vertical); this.iframe.removeClass(this.classes.product.horizontal); this.iframe.addClass(this.classes.product[layout]); this.resizeUntilLoaded(); } _Component.prototype.updateConfig.call(this, config); if (this.cart) { this.cart.updateConfig(config); } if (this.modal) { this.modal.updateConfig(_extends({}, config, { options: _extends({}, this.config, { product: this.modalProductConfig }) })); } }; /** * check size of image until it is resolved, then set height of iframe. */ Product.prototype.resizeUntilLoaded = function resizeUntilLoaded() { var _this4 = this; if (!this.iframe || !this.model.selectedVariantImage) { return; } var img = this.wrapper.getElementsByClassName(this.classes.product.img)[0]; var intervals = 0; if (img) { (function () { var productResize = setInterval(function () { if (!img.naturalWidth && intervals < 30) { intervals++; return; } _this4.resize(); clearInterval(productResize); }, pollInterval); })(); } }; /** * prevent events from bubbling if entire product is being treated as button. */ Product.prototype.stopPropagation = function stopPropagation(evt) { if (!this.options.contents.button && !this.options.contents.buttonWithQuantity) { evt.stopImmediatePropagation(); } }; Product.prototype.onButtonClick = function onButtonClick(evt, target) { evt.stopPropagation(); if (this.options.buttonDestination === 'cart') { this.props.closeModal(); this._userEvent('addVariantToCart'); this.props.tracker.trackMethod(this.cart.addVariantToCart.bind(this), 'CART_ADD', this.selectedVariantTrackingInfo)(this.model.selectedVariant, this.model.selectedQuantity); if (this.iframe) { this.props.setActiveEl(target); } } else if (this.options.buttonDestination === 'modal') { this.props.setActiveEl(target); this.openModal(); } else if (this.options.buttonDestination === 'onlineStore') { this.openOnlineStore(); } else { this._userEvent('openCheckout'); new Checkout(this.config).open(this.model.selectedVariant.checkoutUrl(this.selectedQuantity)); } }; Product.prototype.onOptionSelect = function onOptionSelect(evt) { var target = evt.target; var value = target.options[target.selectedIndex].value; var name = target.getAttribute('name'); this.updateVariant(name, value); }; Product.prototype.onQuantityBlur = function onQuantityBlur(evt, target) { this.updateQuantity(function () { return target.value; }); }; Product.prototype.onQuantityIncrement = function onQuantityIncrement(qty) { this.updateQuantity(function (prevQty) { return prevQty + qty; }); }; Product.prototype.closeCartOnBgClick = function closeCartOnBgClick() { if (this.cart && this.cart.isVisible) { this.cart.close(); } }; /** * create modal instance and initialize. * @return {Promise} promise resolving to modal instance */ Product.prototype.openModal = function openModal() { if (!this.modal) { this.modal = this.props.createModal({ node: this.modalNode, moneyFormat: this.moneyFormat, options: _extends({}, this.config, { product: this.modalProductConfig, modal: _extends({}, this.config.modal, { googleFonts: this.options.googleFonts }) }) }, this.props); } this._userEvent('openModal'); return this.modal.init(this.model); }; /** * update quantity of selected variant and rerender. * @param {Function} fn - function which returns new quantity given current quantity. */ Product.prototype.updateQuantity = function updateQuantity(fn) { var quantity = fn(this.selectedQuantity); if (quantity < 0) { quantity = 0; } this.selectedQuantity = quantity; this._userEvent('updateQuantity'); this.render(); }; /** * Update variant based on option value. * @param {String} optionName - name of option being modified. * @param {String} value - value of selected option. * @return {Object} updated option object. */ Product.prototype.updateVariant = function updateVariant(optionName, value) { var updatedOption = this.model.options.filter(function (option) { return option.name === optionName; })[0]; updatedOption.selected = value; if (this.variantExists) { this.cachedImage = this.model.selectedVariantImage; } this.render(); this._userEvent('updateVariant'); return updatedOption; }; /** * set default variant to be selected on initialization. * @param {Object} model - model to be modified. */ Product.prototype.setDefaultVariant = function setDefaultVariant(model) { var _this5 = this; if (!this.defaultVariantId) { return model; } var selectedVariant = model.variants.filter(function (variant) { return variant.id === _this5.defaultVariantId; })[0]; if (selectedVariant) { model.options.forEach(function (option) { option.selected = selectedVariant.optionValues.filter(function (optionValue) { return optionValue.name === option.name; })[0].value; }); } else { // eslint-disable-next-line console.error('invalid variant ID'); } return model; }; createClass(Product, [{ key: 'typeKey', get: function get() { return 'product'; } /** * get class name for iframe element. * @return {String} iframe class. */ }, { key: 'iframeClass', get: function get() { return this.classes.product[this.options.layout]; } /** * determines if product requries a cart component based on buttonDestination. * @return {Boolean} */ }, { key: 'shouldCreateCart', get: function get() { return this.options.buttonDestination === 'cart' || this.options.buttonDestination === 'modal' && this.config.modalProduct.buttonDestination === 'cart'; } /** * determines when image src should be updated * @return {Boolean} */ }, { key: 'shouldUpdateImage', get: function get() { return !this.cachedImage || this.image && this.image.src && this.image.src !== this.cachedImage.src; } /** * get image for product and cache it. Return caches image if shouldUpdateImage is false. * @return {Object} image objcet. */ }, { key: 'currentImage', get: function get() { if (this.shouldUpdateImage) { this.cachedImage = this.image; } return this.cachedImage; } /** * get image for selected variant and size based on options or layout. * @return {Object} image object. */ }, { key: 'image', get: function get() { var _this6 = this; if (!this.model.selectedVariant || !this.model.selectedVariant.imageVariants) { return null; } if (this.options.imageSize) { return this.model.selectedVariant.imageVariants.filter(function (imageVariant) { return imageVariant.name === _this6.options.imageSize; })[0]; } if (this.options.width && this.options.layout === 'vertical') { return this.model.selectedVariant.imageVariants.filter(function (image) { var containerWidth = parseInt(_this6.options.width, 10); return parseInt(image.dimension, 10) >= containerWidth * 1.5; })[0]; } return this.model.selectedVariant.imageVariants.filter(function (imageVariant) { return imageVariant.name === 'grande'; })[0]; } }, { key: 'shouldResizeX', get: function get() { return false; } }, { key: 'shouldResizeY', get: function get() { return true; } /** * get formatted cart subtotal based on moneyFormat * @return {String} */ }, { key: 'formattedPrice', get: function get() { if (!this.model.selectedVariant) { return ''; } return formatMoney(this.model.selectedVariant.price, this.moneyFormat); } /** * get formatted cart subtotal based on moneyFormat * @return {String} */ }, { key: 'formattedCompareAtPrice', get: function get() { if (!this.model.selectedVariant) { return ''; } return formatMoney(this.model.selectedVariant.compareAtPrice, this.moneyFormat); } /** * get data to be passed to view. * @return {Object} viewData object. */ }, { key: 'viewData', get: function get() { return merge(this.model, this.options.viewData, { classes: this.classes, contents: this.options.contents, text: this.options.text, optionsHtml: this.optionsHtml, decoratedOptions: this.decoratedOptions, currentImage: this.currentImage, buttonClass: this.buttonClass, hasVariants: this.hasVariants, buttonDisabled: !this.buttonEnabled, selectedQuantity: this.selectedQuantity, buttonText: this.buttonText, imgStyle: this.imgStyle, quantityClass: this.quantityClass, priceClass: this.priceClass, formattedPrice: this.formattedPrice, formattedCompareAtPrice: this.formattedCompareAtPrice }); } }, { key: 'buttonClass', get: function get() { var disabledClass = this.buttonEnabled ? '' : this.classes.disabled; var quantityClass = this.options.contents.buttonWithQuantity ? this.classes.product.buttonBesideQty : ''; return disabledClass + ' ' + quantityClass; } }, { key: 'quantityClass', get: function get() { return this.options.contents.quantityIncrement || this.options.contents.quantityDecrement ? this.classes.product.quantityWithButtons : ''; } }, { key: 'buttonText', get: function get() { if (!this.variantExists) { return this.options.text.unavailable; } if (!this.variantInStock) { return this.options.text.outOfStock; } return this.options.text.button; } }, { key: 'buttonEnabled', get: function get() { return this.buttonActionAvailable && this.variantExists && this.variantInStock; } }, { key: 'variantExists', get: function get() { return Boolean(this.model.selectedVariant); } }, { key: 'variantInStock', get: function get() { return this.variantExists && this.model.selectedVariant.available; } }, { key: 'hasVariants', get: function get() { return this.model.variants.length > 1; } }, { key: 'requiresCart', get: function get() { return this.options.buttonDestination === 'cart'; } }, { key: 'buttonActionAvailable', get: function get() { return !this.requiresCart || Boolean(this.cart); } }, { key: 'hasQuantity', get: function get() { return this.options.contents.quantityInput; } }, { key: 'priceClass', get: function get() { return this.model.selectedVariant && this.model.selectedVariant.compareAtPrice ? this.classes.product.loweredPrice : ''; } }, { key: 'wrapperClass', get: function get() { return (this.currentImage ? 'has-image' : 'no-image') + ' ' + this.classes.product[this.options.layout]; } /** * get events to be bound to DOM. * @return {Object} */ }, { key: 'DOMEvents', get: function get() { var _merge; return merge({}, (_merge = { click: this.closeCartOnBgClick.bind(this) }, defineProperty(_merge, 'click ' + this.selectors.option.select, this.stopPropagation.bind(this)), defineProperty(_merge, 'focus ' + this.selectors.option.select, this.stopPropagation.bind(this)), defineProperty(_merge, 'click ' + this.selectors.option.wrapper, this.stopPropagation.bind(this)), defineProperty(_merge, 'click ' + this.selectors.product.quantityInput, this.stopPropagation.bind(this)), defineProperty(_merge, 'click ' + this.selectors.product.quantityButton, this.stopPropagation.bind(this)), defineProperty(_merge, 'change ' + this.selectors.option.select, this.onOptionSelect.bind(this)), defineProperty(_merge, 'click ' + this.selectors.product.button, this.onButtonClick.bind(this)), defineProperty(_merge, 'click ' + this.selectors.product.blockButton, this.onButtonClick.bind(this)), defineProperty(_merge, 'click ' + this.selectors.product.quantityIncrement, this.onQuantityIncrement.bind(this, 1)), defineProperty(_merge, 'click ' + this.selectors.product.quantityDecrement, this.onQuantityIncrement.bind(this, -1)), defineProperty(_merge, 'blur ' + this.selectors.product.quantityInput, this.onQuantityBlur.bind(this)), _merge), this.options.DOMEvents); } /** * get HTML for product options selector. * @return {String} HTML */ }, { key: 'optionsHtml', get: function get() { var _this7 = this; if (!this.options.contents.options) { return ''; } return this.decoratedOptions.reduce(function (acc, option) { var data = merge(option, _this7.options.viewData); data.classes = _this7.classes; data.onlyOption = _this7.model.options.length === 1; return acc + _this7.childTemplate.render({ data: data }); }, ''); } /** * get product variants with embedded options * @return {Array} array of variants */ }, { key: 'variantArray', get: function get() { delete this.variantArrayMemo; this.variantArrayMemo = this.model.variants.map(function (variant) { var betterVariant = { id: variant.id, available: variant.available, optionValues: {} }; variant.optionValues.forEach(function (optionValue) { betterVariant.optionValues[optionValue.name] = optionValue.value; }); return betterVariant; }); return this.variantArrayMemo; } /** * get selected values for options * @return {Object} object with option names as keys */ }, { key: 'selections', get: function get() { var _this8 = this; var selections = {}; this.model.selections.forEach(function (selection, index) { var option = _this8.model.options[index]; selections[option.name] = selection; }); return selections; } }, { key: 'decoratedOptions', get: function get() { var _this9 = this; var selections = this.selections; return this.model.options.map(function (option) { return { name: option.name, values: option.values.map(function (value) { return { name: value, selected: value === option.selected, disabled: !_this9.optionValueCanBeSelected(selections, option.name, value) }; }) }; }); } /** * get info about variant to be sent to tracker * @return {Object} */ }, { key: 'selectedVariantTrackingInfo', get: function get() { var variant = this.model.selectedVariant; return { id: variant.id, name: variant.productTitle, quantity: this.model.selectedQuantity, sku: null, price: variant.price }; } /** * get configuration object for product details modal based on product config and modalProduct config. * @return {Object} configuration object. */ }, { key: 'modalProductConfig', get: function get() { var _this10 = this; var modalProductStyles = void 0; if (this.config.product.styles) { modalProductStyles = merge({}, Object.keys(this.config.product.styles).reduce(function (productStyles, selectorKey) { productStyles[selectorKey] = whitelistedProperties(_this10.config.product.styles[selectorKey]); return productStyles; }, {}), this.config.modalProduct.styles); } else { modalProductStyles = {}; } return _extends({}, this.config.modalProduct, { styles: modalProductStyles }); } /** * get params for online store URL. * @return {Object} */ }, { key: 'onlineStoreParams', get: function get() { return { channel: 'buy_button', referrer: encodeURIComponent(windowUtils.location()), variant: this.model.selectedVariant.id }; } /** * get query string for online store URL from params * @return {String} */ }, { key: 'onlineStoreQueryString', get: function get() { var _this11 = this; return Object.keys(this.onlineStoreParams).reduce(function (string, key) { return '' + string + key + '=' + _this11.onlineStoreParams[key] + '&'; }, '?'); } /** * get URL to open online store page for product. * @return {String} */ }, { key: 'onlineStoreURL', get: function get() { return 'https://' + this.props.client.config.domain + '/products/' + this.id + this.onlineStoreQueryString; } }]); return Product; }(Component); function addClassToElement(className, element) { if (element.classList) { element.classList.add(className); } else { element.className += ' ' + className; } } function removeClassFromElement(className, element) { if (element.classList) { element.classList.remove(className); } else { element.className = element.className.replace(className, ''); } } /** * Renders product modal. * @extends Component. */ var Modal = function (_Component) { inherits(Modal, _Component); /** * create Modal. * @param {Object} config - configuration object. * @param {Object} props - data and utilities passed down from UI instance. */ function Modal(config, props) { classCallCheck(this, Modal); var _this = possibleConstructorReturn(this, _Component.call(this, config, props)); _this.node = config.node || document.body.appendChild(document.createElement('div')); _this.node.className = 'shopify-buy-modal-wrapper'; _this.product = null; return _this; } /** * get key for configuration object. * @return {String} */ /** * delegates DOM events to event listeners. * Adds event listener to wrapper to close modal on click. */ Modal.prototype.delegateEvents = function delegateEvents() { _Component.prototype.delegateEvents.call(this); this.wrapper.addEventListener('click', this.closeOnBgClick.bind(this)); }; Modal.prototype.closeOnBgClick = function closeOnBgClick(evt) { if (!this.productWrapper.contains(evt.target)) { this.props.closeModal(); } }; Modal.prototype.wrapTemplate = function wrapTemplate(html) { return '<div class="' + this.classes.modal.overlay + '"><div class="' + this.classes.modal.modal + '">' + html + '</div></div>'; }; /** * initializes component by creating model and rendering view. * Creates and initializes product component. * @param {Object} [data] - data to initialize model with. * @return {Promise} promise resolving to instance. */ Modal.prototype.init = function init(data) { var _this2 = this; this.isVisible = true; return _Component.prototype.init.call(this, data).then(function () { _this2.productWrapper = _this2.wrapper.getElementsByClassName(_this2.classes.modal.modal)[0]; _this2.product = new Product(_this2.productConfig, _this2.props); return _this2.product.init(_this2.model).then(function () { _this2.setFocus(); return _this2.resize(); }); }); }; /** * re-assign configuration and re-render component. * Update config on product within modal. * @param {Object} config - new configuration object. */ Modal.prototype.updateConfig = function updateConfig(config) { var _this3 = this; _Component.prototype.updateConfig.call(this, config); this.product = new Product(this.productConfig, this.props); return this.product.init(this.model).then(function () { return _this3.resize(); }); }; /** * close modal. */ Modal.prototype.close = function close() { var _this4 = this; this._userEvent('closeModal'); this.isVisible = false; removeClassFromElement('is-active', this.wrapper); if (!this.iframe) { return; } this.iframe.removeClass('is-active'); removeClassFromElement('is-active', this.document.body); if (this.props.browserFeatures.transition) { this.iframe.parent.addEventListener('transitionend', function () { _this4.iframe.removeClass('is-block'); }); } else { this.iframe.removeClass('is-block'); } }; /** * renders string template using viewData to wrapper element. */ Modal.prototype.render = function render() { if (!this.isVisible) { return; } _Component.prototype.render.call(this); addClassToElement('is-active', this.document.body); addClassToElement('is-active', this.wrapper); if (!this.iframe) { return; } this.iframe.addClass('is-active'); this.iframe.addClass('is-block'); }; createClass(Modal, [{ key: 'typeKey', get: function get() { return 'modal'; } /** * get events to be bound to DOM. * Combines Product events with modal events. * @return {Object} */ }, { key: 'DOMEvents', get: function get() { return _extends({}, defineProperty({}, 'click ' + this.selectors.modal.close, this.props.closeModal.bind(this)), this.options.DOMEvents); } /** * get configuration object for product within modal. Set product node to modal contents. * @return {Object} */ }, { key: 'productConfig', get: function get() { return { moneyFormat: this.moneyFormat, node: this.productWrapper, options: merge({}, this.config) }; } }]); return Modal; }(Component); var pollInterval$1 = 200; function isArray$1(arg) { return Object.prototype.toString.call(arg) === '[object Array]'; } /** * Renders and fetches data for collection and product set embed. * @extends Component. */ var ProductSet = function (_Component) { inherits(ProductSet, _Component); /** * create ProductSet * @param {Object} config - configuration object. * @param {Object} props - data and utilities passed down from UI instance. */ function ProductSet(config, props) { classCallCheck(this, ProductSet); var _this = possibleConstructorReturn(this, _Component.call(this, config, props)); _this.products = []; _this.cartNode = config.cartNode; _this.modalNode = config.modalNode; _this.cart = null; _this.page = 1; _this.nextModel = { products: [] }; _this.height = 0; _this.resizeCompleted = false; return _this; } /** * get key for configuration object. * @return {String} */ /** * initializes component by creating model and rendering view. * Creates and initalizes cart if necessary. * Calls renderProducts. * @param {Object} [data] - data to initialize model with. * @return {Promise} promise resolving to instance. */ ProductSet.prototype.init = function init(data) { var _this2 = this; return _Component.prototype.init.call(this, data).then(function (model) { return _this2.props.createCart({ options: _this2.config }).then(function (cart) { _this2.cart = cart; if (model) { return _this2.renderProducts(_this2.model.products); } return _this2; }); }); }; /** * fetches products from SDK based on provided config information. * @param {Object} options - query options for request * @return {Promise} promise resolving to collection data. */ ProductSet.prototype.sdkFetch = function sdkFetch() { var _this3 = this; var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; /* eslint-disable camelcase */ var queryOptions = _extends({}, this.fetchQuery, options); var method = void 0; if (this.id) { var queryKey = isArray$1(this.id) ? 'product_ids' : 'collection_id'; method = this.props.client.fetchQueryProducts(_extends({}, queryOptions, defineProperty({}, queryKey, this.id))); } else if (this.handle) { method = this.props.client.fetchQueryCollections({ handle: this.handle }).then(function (collections) { var collection = collections[0]; _this3.id = collection.attrs.collection_id; return _this3.sdkFetch(options); }); } return method; /* eslint-enable camelcase */ }; ProductSet.prototype.wrapTemplate = function wrapTemplate(html) { return '<div class="' + this.classes.productSet.productSet + '">' + html + '</div>'; }; /** * call sdkFetch and set model.products to products array. * @throw 'Not Found' if model not returned. * @return {Promise} promise resolving to model data. */ ProductSet.prototype.fetchData = function fetchData() { return this.sdkFetch().then(function (products) { if (products.length) { return { products: products }; } throw new Error('Not Found'); }); }; /** * make request to SDK for current page + 1 to determine if next page exists. Render button if next page exists. * @return {Promise} promise resolving when button is rendered or not. */ ProductSet.prototype.showPagination = function showPagination() { var _this4 = this; return this.sdkFetch({ page: this.page + 1 }).then(function (data) { _this4.nextModel = { products: data }; _this4.renderChild(_this4.classes.productSet.paginationButton, _this4.paginationTemplate); _this4.resize(); return; }); }; /** * append next page worth of products into the DOM */ ProductSet.prototype.nextPage = function nextPage() { this.model = this.nextModel; this.page = this.page + 1; this._userEvent('loadNextPage'); this.renderProducts(); }; /** * resize iframe until it is tall enough to contain all products. */ ProductSet.prototype.resizeUntilFits = function resizeUntilFits() { var _this5 = this; if (!this.iframe || this.resizeCompleted) { return; } var maxResizes = this.products.length; var resizes = 0; this.height = this.outerHeight; this.resize(); var productSetResize = setInterval(function () { var currentHeight = _this5.outerHeight; if (parseInt(currentHeight, 10) > parseInt(_this5.height, 10)) { resizes++; _this5.height = currentHeight; _this5.resize(currentHeight); } if (resizes > maxResizes) { _this5.resizeCompleted = true; clearInterval(productSetResize); } }, pollInterval$1); }; /** * re-assign configuration and re-render component. * Update Cart component if necessary. * Call renderProducts. * @param {Object} config - new configuration object. */ ProductSet.prototype.updateConfig = function updateConfig(config) { _Component.prototype.updateConfig.call(this, config); this.cart.updateConfig(config); this.renderProducts(); }; /** * render product components into productSet container. Show pagination button if necessary. * @return {Promise} promise resolving to instance. */ ProductSet.prototype.renderProducts = function renderProducts() { var _this6 = this; if (!this.model.products.length) { return Promise.resolve(); } var productConfig = { node: this.document.querySelector('.' + this.classes.productSet.products), modalNode: this.modalNode, cartNode: this.cartNode, options: merge({}, this.config, { product: { iframe: false, classes: { wrapper: this.classes.productSet.product } } }) }; var promises = this.model.products.map(function (productModel) { var product = new Product(productConfig, _this6.props); _this6.products.push(product); return product.init(productModel); }); return Promise.all(promises).then(function () { _this6.resizeUntilFits(); _this6.showPagination(); return _this6; }); }; createClass(ProductSet, [{ key: 'typeKey', get: function get() { return 'productSet'; } }, { key: 'nextButtonClass', get: function get() { return this.nextModel.products.length ? 'is-active' : ''; } }, { key: 'shouldResizeY', get: function get() { return true; } /** * get data to be passed to view. * @return {Object} viewData object. */ }, { key: 'viewData', get: function get() { return _extends({}, this.options.viewData, { classes: this.classes, text: this.options.text, nextButtonClass: this.nextButtonClass }); } /** * get events to be bound to DOM. * @return {Object} */ }, { key: 'DOMEvents', get: function get() { return _extends({}, defineProperty({}, 'click ' + this.selectors.productSet.paginationButton, this.nextPage.bind(this)), this.options.DOMEvents); } /** * get template for rendering pagination button. * @return {Object} Template instance */ }, { key: 'paginationTemplate', get: function get() { this._paginationTemplate = this._paginationTemplate || new Template({ pagination: this.options.templates.pagination }, { pagination: true }, ['pagination']); return this._paginationTemplate; } }, { key: 'fetchQuery', get: function get() { return { limit: 30, page: 1 }; } }]); return ProductSet; }(Component); var ENTER_KEY = 13; var CartToggle = function (_Component) { inherits(CartToggle, _Component); function CartToggle(config, props) { classCallCheck(this, CartToggle); var _this = possibleConstructorReturn(this, _Component.call(this, config, props)); _this.node = _this.props.cart.node.parentNode.insertBefore(document.createElement('div'), _this.props.cart.node); return _this; } CartToggle.prototype.delegateEvents = function delegateEvents() { var _this2 = this; _Component.prototype.delegateEvents.call(this); if (!this.iframe) { return; } this.iframe.parent.addEventListener('keydown', function (evt) { if (evt.keyCode !== ENTER_KEY) { return; } _this2.props.cart.toggleVisibility(_this2.props.cart); }); }; CartToggle.prototype.wrapTemplate = function wrapTemplate(html) { return '<div class="' + this.stickyClass + ' ' + this.classes.toggle.toggle + '">' + html + '</div>'; }; CartToggle.prototype.render = function render() { _Component.prototype.render.call(this); if (!this.iframe) { return; } this.iframe.parent.setAttribute('tabindex', 0); if (this.options.sticky) { this.iframe.addClass('is-sticky'); } if (this.isVisible) { this.iframe.addClass('is-active'); } else { this.iframe.removeClass('is-active'); } }; CartToggle.prototype._resizeX = function _resizeX() { this.iframe.el.style.width = this.wrapper.clientWidth + 'px'; }; createClass(CartToggle, [{ key: 'isVisible', get: function get() { return this.count > 0; } }, { key: 'typeKey', get: function get() { return 'toggle'; } }, { key: 'count', get: function get() { return this.props.cart.model.lineItems.reduce(function (acc, lineItem) { return acc + lineItem.quantity; }, 0); } }, { key: 'viewData', get: function get() { return _extends({}, this.options.viewData, { classes: this.classes, text: this.options.text, count: this.count }); } }, { key: 'shouldResizeY', get: function get() { return this.options.sticky; } }, { key: 'shouldResizeX', get: function get() { return this.options.sticky; } }, { key: 'stickyClass', get: function get() { return this.options.sticky ? 'is-sticky' : 'is-inline'; } }, { key: 'DOMEvents', get: function get() { return merge({}, { click: this.props.cart.toggleVisibility.bind(this.props.cart) }, this.options.DOMEvents); } }]); return CartToggle; }(Component); var NO_IMG_URL = '//sdks.shopifycdn.com/buy-button/latest/no-image.jpg'; /** * Renders and cart embed. * @extends Component. */ var Cart = function (_Component) { inherits(Cart, _Component); /** * create Cart. * @param {Object} config - configuration object. * @param {Object} props - data and utilities passed down from UI instance. * @param {Object} [storage] - object implementing the localStorage API for cart persistence. */ function Cart(config, props, storage) { classCallCheck(this, Cart); var _this = possibleConstructorReturn(this, _Component.call(this, config, props)); _this.storage = storage || window.localStorage; _this.addVariantToCart = _this.addVariantToCart.bind(_this); _this.childTemplate = new Template(_this.config.lineItem.templates, _this.config.lineItem.contents, _this.config.lineItem.order); _this.node = config.node || document.body.appendChild(document.createElement('div')); _this.node.className = 'shopify-buy-cart-wrapper'; _this.isVisible = _this.options.startOpen; _this.toggle = new CartToggle(config, _extends({}, _this.props, { cart: _this })); _this.checkout = new Checkout(_this.config); return _this; } /** * get key for configuration object. * @return {String} */ /** * get model data either by calling client.createCart or loading from localStorage. * @return {Promise} promise resolving to cart instance. */ Cart.prototype.fetchData = function fetchData() { var _this2 = this; if (this.storage.getItem('lastCartId')) { return this.props.client.fetchCart(this.storage.getItem('lastCartId')); } else { return this.props.client.createCart().then(function (cart) { try { _this2.storage.setItem('lastCartId', cart.id); } catch (err) { // eslint-disable-next-line console.warn('localStorage unsupported'); } return cart; }); } }; Cart.prototype.wrapTemplate = function wrapTemplate(html) { return '<div class="' + this.classes.cart.cart + '">' + html + '</div>'; }; /** * initializes component by creating model and rendering view. * Creates and initalizes toggle component. * @param {Object} [data] - data to initialize model with. * @return {Promise} promise resolving to instance. */ Cart.prototype.init = function init(data) { var _this3 = this; return _Component.prototype.init.call(this, data).then(function (cart) { return _this3.toggle.init({ lineItems: cart.model.lineItems }).then(function () { return _this3; }); }); }; /** * renders string template using viewData to wrapper element. * Sets iframe class based on visibility. */ Cart.prototype.render = function render() { _Component.prototype.render.call(this); if (!this.iframe) { return; } if (this.isVisible) { this.iframe.addClass('is-active'); } else { this.iframe.removeClass('is-active'); } }; Cart.prototype.destroy = function destroy() { _Component.prototype.destroy.call(this); this.toggle.destroy(); }; /** * closes cart */ Cart.prototype.close = function close() { this.isVisible = false; this.render(); }; /** * opens cart */ Cart.prototype.open = function open() { this.isVisible = true; this.render(); this.setFocus(); }; /** * toggles cart visibility * @param {Boolean} visible - desired state. */ Cart.prototype.toggleVisibility = function toggleVisibility(visible) { this.isVisible = visible || !this.isVisible; this.render(); if (this.isVisible) { this.setFocus(); } }; Cart.prototype.onQuantityBlur = function onQuantityBlur(evt, target) { this.setQuantity(target, function () { return target.value; }); }; Cart.prototype.onQuantityIncrement = function onQuantityIncrement(qty, evt, target) { this.setQuantity(target, function (prevQty) { return prevQty + qty; }); }; Cart.prototype.onCheckout = function onCheckout() { this.checkout.open(this.model.checkoutUrl); }; /** * set quantity for a line item. * @param {Object} target - DOM node of line item * @param {Function} fn - function to return new quantity given currrent quantity. */ Cart.prototype.setQuantity = function setQuantity(target, fn) { var id = target.getAttribute('data-line-item-id'); var item = this.model.lineItems.filter(function (lineItem) { return lineItem.id === id; })[0]; var newQty = fn(item.quantity); return this.props.tracker.trackMethod(this.updateItem.bind(this), 'CART_UPDATE', this.cartItemTrackingInfo(item, newQty))(id, newQty); }; /** * update line item. * @param {Number} id - lineItem id. * @param {Number} qty - quantity for line item. */ Cart.prototype.updateItem = function updateItem(id, qty) { var _this4 = this; this._userEvent('updateItemQuantity'); return this.model.updateLineItem(id, qty).then(function (cart) { _this4.model = cart; _this4.toggle.render(); if (!_this4.iframe) { _this4.render(); return cart; } if (qty > 0) { _this4.render(); } else { _this4._animateRemoveItem(id); } return cart; }); }; /** * re-assign configuration and re-render component. * Update toggle component. * @param {Object} config - new configuration object. */ Cart.prototype.updateConfig = function updateConfig(config) { _Component.prototype.updateConfig.call(this, config); this.toggle.updateConfig(config); }; /** * add variant to cart. * @param {Object} variant - variant object. * @param {Number} [quantity=1] - quantity to be added. */ Cart.prototype.addVariantToCart = function addVariantToCart(variant) { var _this5 = this; var quantity = arguments.length <= 1 || arguments[1] === undefined ? 1 : arguments[1]; if (quantity <= 0) { return null; } this.open(); return this.model.addVariants({ variant: variant, quantity: quantity }).then(function (cart) { _this5.render(); _this5.toggle.render(); _this5.setFocus(); return cart; }); }; /** * Remove all lineItems in the cart */ Cart.prototype.empty = function empty() { var _this6 = this; return this.model.clearLineItems().then(function () { _this6.render(); _this6.toggle.render(); return; }); }; /** * get info about line item to be sent to tracker * @return {Object} */ Cart.prototype.cartItemTrackingInfo = function cartItemTrackingInfo(item, quantity) { return { id: item.variant_id, name: item.title, sku: null, price: item.price, prevQuantity: item.quantity, quantity: parseFloat(quantity) }; }; Cart.prototype._animateRemoveItem = function _animateRemoveItem(id) { var _this7 = this; var el = this.document.getElementById(id); addClassToElement('is-hidden', el); if (this.props.browserFeatures.transition) { el.addEventListener('transitionend', function () { // eslint-disable-next-line // TODO: why is transitionend sometimes called twice? if (!el.parentNode) { return; } el.parentNode.removeChild(el); _this7.render(); }); } else { el.parentNode.removeChild(el); } }; createClass(Cart, [{ key: 'typeKey', get: function get() { return 'cart'; } /** * get events to be bound to DOM. * @return {Object} */ }, { key: 'DOMEvents', get: function get() { var _merge; return merge({}, (_merge = {}, defineProperty(_merge, 'click ' + this.selectors.cart.close, this.props.closeCart.bind(this)), defineProperty(_merge, 'click ' + this.selectors.lineItem.quantityIncrement, this.onQuantityIncrement.bind(this, 1)), defineProperty(_merge, 'click ' + this.selectors.lineItem.quantityDecrement, this.onQuantityIncrement.bind(this, -1)), defineProperty(_merge, 'click ' + this.selectors.cart.button, this.onCheckout.bind(this)), defineProperty(_merge, 'blur ' + this.selectors.lineItem.quantityInput, this.onQuantityBlur.bind(this)), _merge), this.options.DOMEvents); } /** * get HTML for cart line items. * @return {String} HTML */ }, { key: 'lineItemsHtml', get: function get() { var _this8 = this; return this.model.lineItems.reduce(function (acc, lineItem) { var data = merge(lineItem, _this8.options.viewData); data.classes = _this8.classes; data.lineItemImage = data.image || { src: NO_IMG_URL }; data.variantTitle = data.variant_title === 'Default Title' ? '' : data.variant_title; return acc + _this8.childTemplate.render({ data: data }, function (output) { return '<div id="' + lineItem.id + '" class=' + _this8.classes.lineItem.lineItem + '>' + output + '</div>'; }); }, ''); } /** * get data to be passed to view. * @return {Object} viewData object. */ }, { key: 'viewData', get: function get() { return merge(this.model, this.options.viewData, { text: this.options.text, classes: this.classes, lineItemsHtml: this.lineItemsHtml, isEmpty: this.isEmpty, formattedTotal: this.formattedTotal }); } /** * get formatted cart subtotal based on moneyFormat * @return {String} */ }, { key: 'formattedTotal', get: function get() { return formatMoney(this.model.subtotal, this.moneyFormat); } /** * whether cart is empty * @return {Boolean} */ }, { key: 'isEmpty', get: function get() { return this.model.lineItems.length < 1; } }, { key: 'wrapperClass', get: function get() { return this.isVisible ? 'is-active' : ''; } }]); return Cart; }(Component); var Tracker = function () { function Tracker(lib) { classCallCheck(this, Tracker); this.lib = lib || null; } Tracker.prototype.trackMethod = function trackMethod(fn, event, properties) { var self = this; return function () { var returnValue = fn.apply(undefined, arguments); if (returnValue && returnValue.then) { return returnValue.then(function (val) { self.callLib(event, properties); return val; }); } self.callLib(event, properties); return returnValue; }; }; Tracker.prototype.callLib = function callLib(eventName, properties) { switch (eventName) { case 'CART_UPDATE': if (properties.quantity < 1) { return this.track('CART_REMOVE', properties); } if (properties.quantity < properties.prevQuantity) { return this.track('CART_DECREMENT', properties); } return this.track('CART_INCREMENT', properties); default: return this.track(eventName, properties); } }; Tracker.prototype.trackPageview = function trackPageview() { if (this.lib && this.lib.page) { this.lib.page(); } }; Tracker.prototype.track = function track(eventName, properties) { properties.pageurl = document.referrer; if (this.lib && this.lib.track) { this.lib.track(eventName, properties); } }; return Tracker; }(); var hostStyles = ".shopify-buy-frame {\n display: inline-block; }\n .shopify-buy-frame iframe {\n width: 100%;\n display: block;\n height: 0;\n overflow: hidden; }\n\n.shopify-buy-frame--cart {\n width: 100%;\n max-width: 350px;\n position: fixed;\n top: 0;\n right: 0;\n height: 100%;\n z-index: 2147483647;\n transform: translateX(100%);\n -webkit-transform: translateX(100%);\n transition: all 250ms cubic-bezier(0.165, 0.84, 0.44, 1); }\n .shopify-buy-frame--cart iframe {\n height: 100%; }\n .shopify-buy-frame--cart.is-active {\n transform: translateX(0);\n -webkit-transform: translateX(0); }\n\n.shopify-buy-frame--product {\n display: block; }\n .shopify-buy-frame--product.layout-horizontal {\n display: block;\n margin-left: auto;\n margin-right: auto; }\n .shopify-buy-frame--product.layout-horizontal iframe {\n max-width: 100%; }\n @media (min-width: 950px) {\n .shopify-buy-frame--product.layout-horizontal iframe {\n max-width: 950px;\n margin-left: auto;\n margin-right: auto; } }\n\n.shopify-buy-frame--toggle.is-sticky {\n display: none;\n position: fixed;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n -webkit-transform: translateY(-50%);\n z-index: 2147483645; }\n\n.shopify-buy-frame--toggle.is-active {\n display: block; }\n\n.shopify-buy-frame--toggle iframe {\n height: auto;\n min-height: 67px; }\n\n.shopify-buy-frame--productSet {\n width: 100%; }\n\n.shopify-buy-frame--modal {\n position: fixed;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n z-index: 2147483646;\n display: none;\n transition: background 300ms ease; }\n .shopify-buy-frame--modal iframe {\n height: 100%;\n width: 100%;\n max-width: none; }\n .shopify-buy-frame--modal.is-active {\n background: rgba(0, 0, 0, 0.6); }\n .shopify-buy-frame--modal.is-block {\n display: block; }\n"; var conditionalStyles$1 = ".shopify-buy-frame--cart {\n display: none; }\n .shopify-buy-frame--cart.is-active {\n display: block; }\n"; var frameUtils = {}; var lastTime = 0; var vendors = ['ms', 'moz', 'webkit', 'o']; if (window.requestAnimationFrame && window.cancelAnimationFrame) { frameUtils.requestAnimationFrame = window.requestAnimationFrame; frameUtils.cancelAnimationFrame = window.cancelAnimationFrame; } else { for (var x = 0; x < vendors.length && !frameUtils.requestAnimationFrame; ++x) { frameUtils.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; frameUtils.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame']; } if (!frameUtils.requestAnimationFrame) frameUtils.requestAnimationFrame = function (callback, element) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = window.setTimeout(function () { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; if (!frameUtils.cancelAnimationFrame) frameUtils.cancelAnimationFrame = function (id) { clearTimeout(id); }; } function CustomEvent(event, params) { params = params || { bubbles: false, cancelable: false, detail: undefined }; var evt = document.createEvent('CustomEvent'); evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); return evt; }; CustomEvent.prototype = window.Event.prototype; var throttle = function throttle(type, name, obj) { obj = obj || window; var running = false; var func = function func() { if (running) { return; } running = true; frameUtils.requestAnimationFrame.call(window, function () { obj.dispatchEvent(new CustomEvent(name)); running = false; }); }; obj.addEventListener(type, func); }; function detectCSSFeature(featurename) { var feature = false, domPrefixes = 'Webkit Moz ms O'.split(' '), elm = document.createElement('div'), featurenameCapital = null; featurename = featurename.toLowerCase(); if (elm.style[featurename] !== undefined) { feature = true; } if (feature === false) { featurenameCapital = featurename.charAt(0).toUpperCase() + featurename.substr(1); for (var i = 0; i < domPrefixes.length; i++) { if (elm.style[domPrefixes[i] + featurenameCapital] !== undefined) { feature = true; break; } } } return feature; } var supportsAnimations = function supportsAnimations() { return detectCSSFeature('animation'); }; var supportsTransitions = function supportsTransitions() { return detectCSSFeature('transition'); }; var supportsTransforms = function supportsTransforms() { return detectCSSFeature('transform'); }; var browserFeatures = { animation: supportsAnimations(), transition: supportsTransitions(), transform: supportsTransforms() }; var DATA_ATTRIBUTE = 'data-shopify-buy-ui'; var ESC_KEY = 27; /** Initializes and coordinates components. */ var UI = function () { /** * create a UI instance * @param {Object} client - Instance of ShopifyBuy Client * @param {Object} integrations - optional tracker and logger integrations * @param {String} styleOverrides - additional CSS to be added to _host_ style tag */ function UI(client) { var integrations = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; var styleOverrides = arguments.length <= 2 || arguments[2] === undefined ? '' : arguments[2]; classCallCheck(this, UI); this.client = client; this.iframeComponents = []; this.components = { product: [], cart: [], collection: [], productSet: [], modal: [], toggle: [] }; this.componentTypes = { product: Product, cart: Cart, collection: ProductSet, productSet: ProductSet, toggle: CartToggle }; this.errorReporter = integrations.errorReporter; this.tracker = new Tracker(integrations.tracker); this.styleOverrides = styleOverrides; this.tracker.trackPageview(); this.activeEl = null; this._appendStyleTag(); this._bindResize(); this._bindHostClick(); this._bindEsc(window); this._bindPostMessage(); } /** * create a component of a type. * @param {String} type - one of 'product', 'productSet', 'collection', 'cart'. * @param {Object} config - configuration object * @return {Promise} resolves to instance of newly created component. */ UI.prototype.createComponent = function createComponent(type, config) { config.node = config.node || this._queryEntryNode(); var component = new this.componentTypes[type](config, this.componentProps); if (component.iframe) { this._bindEsc(component.iframe.el.contentWindow || component.iframe.el); } this.components[type].push(component); return component.init(); }; /** * destroy a component * @param {String} type - one of 'product', 'productSet', 'collection', 'cart'. * @param {Number} id - ID of the component's model. */ UI.prototype.destroyComponent = function destroyComponent(type, id) { var _this = this; this.components[type].forEach(function (component, index) { if (!component.model.id === id) { return; } _this.components[type][index].destroy(); _this.components[type].splice(index, 1); }); }; /** * create a cart object to be shared between components. * @param {Object} config - configuration object. * @return {Promise} a promise which resolves once the cart has been initialized. */ UI.prototype.createCart = function createCart(config) { if (this.components.cart.length) { return Promise.resolve(this.components.cart[0]); } else { var cart = new Cart(config, this.componentProps); this.components.cart.push(cart); return cart.init(); } }; /** * close any cart. */ UI.prototype.closeCart = function closeCart() { var _this2 = this; if (!this.components.cart.length) { return; } this.components.cart.forEach(function (cart) { if (!cart.isVisible) { return; } cart.close(); _this2.restoreFocus(); }); }; /** * open any cart. */ UI.prototype.openCart = function openCart() { if (this.components.cart.length) { this.components.cart.forEach(function (cart) { cart.open(); }); } }; /** * toggle visibility of cart. * @param {Boolean} [visibility] - desired state of cart. */ UI.prototype.toggleCart = function toggleCart(visibility) { if (this.components.cart.length) { this.components.cart.forEach(function (cart) { cart.toggleVisibility(visibility); }); } if (!visibility) { this.restoreFocus(); } }; /** * create a modal object to be shared between components. * @param {Object} config - configuration object. * @return {Modal} a Modal instance. */ UI.prototype.createModal = function createModal(config) { if (this.components.modal.length) { return this.components.modal[0]; } else { var modal = new Modal(config, this.componentProps); this.components.modal.push(modal); return modal; } }; UI.prototype.setActiveEl = function setActiveEl(el) { this.activeEl = el; }; /** * close any modals. */ UI.prototype.closeModal = function closeModal() { if (!this.components.modal.length) { return; } this.components.modal.forEach(function (modal) { return modal.close(); }); this.restoreFocus(); }; UI.prototype.restoreFocus = function restoreFocus() { if (this.activeEl && !this.modalOpen && !this.cartOpen) { this.activeEl.focus(); } }; /** * get properties to be passed to any component. * @return {Object} props object. */ UI.prototype._queryEntryNode = function _queryEntryNode() { this.entry = this.entry || window.document.querySelectorAll('script[' + DATA_ATTRIBUTE + ']')[0]; this.entry.removeAttribute(DATA_ATTRIBUTE); var div = document.createElement('div'); this.entry.parentNode.insertBefore(div, this.entry); return div; }; UI.prototype._appendStyleTag = function _appendStyleTag() { var styleTag = document.createElement('style'); if (styleTag.styleSheet) { styleTag.styleSheet.cssText = this.styleText; } else { styleTag.appendChild(document.createTextNode(this.styleText)); } document.head.appendChild(styleTag); }; UI.prototype._bindHostClick = function _bindHostClick() { var _this3 = this; document.addEventListener('click', function () { _this3.closeCart(); }); }; UI.prototype._bindResize = function _bindResize() { var _this4 = this; throttle('resize', 'safeResize'); window.addEventListener('safeResize', function () { _this4.components.collection.forEach(function (collection) { return collection.resize(); }); _this4.components.productSet.forEach(function (set) { return set.resize(); }); _this4.components.product.forEach(function (product) { return product._resizeY(); }); }); }; UI.prototype._bindEsc = function _bindEsc(context) { var _this5 = this; context.addEventListener('keydown', function (evt) { if (evt.keyCode !== ESC_KEY) { return; } _this5.closeModal(); _this5.closeCart(); }); }; UI.prototype._bindPostMessage = function _bindPostMessage() { var _this6 = this; window.addEventListener('message', function (msg) { var data = void 0; try { data = JSON.parse(msg.data); } catch (err) { data = {}; } if (data.syncCart || data.current_checkout_page && data.current_checkout_page === '/checkout/thank_you') { _this6.components.cart.forEach(function (cart) { cart.empty(); }); } }); }; createClass(UI, [{ key: 'modalOpen', get: function get() { return this.components.modal.reduce(function (isOpen, modal) { return isOpen || modal.isVisible; }, false); } }, { key: 'cartOpen', get: function get() { return this.components.cart.reduce(function (isOpen, cart) { return isOpen || cart.isVisible; }, false); } }, { key: 'componentProps', get: function get() { return { client: this.client, createCart: this.createCart.bind(this), closeCart: this.closeCart.bind(this), toggleCart: this.toggleCart.bind(this), createModal: this.createModal.bind(this), closeModal: this.closeModal.bind(this), setActiveEl: this.setActiveEl.bind(this), tracker: this.tracker, errorReporter: this.errorReporter, browserFeatures: browserFeatures }; } /** * get string of CSS to be inserted into host style tag. */ }, { key: 'styleText', get: function get() { if (browserFeatures.transition && browserFeatures.transform && browserFeatures.animation) { return hostStyles + this.styleOverrides; } return hostStyles + conditionalStyles$1 + this.styleOverrides; } }]); return UI; }(); ShopifyBuy.UI = { ui: null, init: function init(client) { var integrations = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; var styleOverrides = arguments[2]; if (!this.ui) { this.ui = new UI(client, integrations, styleOverrides); } return this.ui; }, adapterHelpers: { templates: { product: productTemplate } }, UIConstructor: UI }; window.ShopifyBuy = ShopifyBuy; return ShopifyBuy; }());
test/specs/collections/Breadcrumb/BreadcrumbDivider-test.js
koenvg/Semantic-UI-React
import React from 'react' import BreadcrumbDivider from 'src/collections/Breadcrumb/BreadcrumbDivider' import * as common from 'test/specs/commonTests' describe('BreadcrumbDivider', () => { common.isConformant(BreadcrumbDivider) common.rendersChildren(BreadcrumbDivider) common.implementsIconProp(BreadcrumbDivider, { shorthandDefaultProps: { className: 'divider', }, }) it('renders as a div by default', () => { shallow(<BreadcrumbDivider />) .should.have.tagName('div') }) })
app/components/MinimalForm/index.js
andreasasprou/react-boilerplate-auth
/** * * MinimalForm * */ import React from 'react'; import styled from 'styled-components'; import MinimalButton from '../MinimalButton/index'; const Form = styled.form` display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: #fafafa; `; const TextField = styled.input` display: block; border: 1px solid #eee; margin: 10px 0; background: white; padding: 5px; `; const Error = styled.h4` color: #cc0000; `; function MinimalForm({ onChangeUsername, onChangePassword, onSubmit, username, password, title, error }) { return ( <Form onSubmit={onSubmit} > {title && <h1>{title}</h1>} <TextField type="text" name="username" placeholder="username" value={username} onChange={onChangeUsername} required /> <TextField type="password" name="password" placeholder="password" value={password} onChange={onChangePassword} required /> <MinimalButton type="submit" value="Submit" onMouseDown={onSubmit} /> {error && <Error>{error}</Error>} </Form> ); } MinimalForm.propTypes = { onChangeUsername: React.PropTypes.func.isRequired, onChangePassword: React.PropTypes.func.isRequired, onSubmit: React.PropTypes.func.isRequired, username: React.PropTypes.string.isRequired, password: React.PropTypes.string.isRequired, title: React.PropTypes.string, error: React.PropTypes.string, }; export default MinimalForm;
02/ControlledInput.js
razh/react-intro-fall-2015
import React from 'react'; export default class ControlledInput extends React.Component { constructor( ...args ) { super( ...args ); this.state = { value: this.props.value, }; this.onChange = this.onChange.bind(this); } onChange() { this.setState({ value: this.refs.input.value }); } render() { const { value } = this.props; const id = 'input-' + value; return ( <div className="form-group"> <label htmlFor={id} className="col-md-2 control-label"> {value} </label> <div className="col-md-10"> <textarea ref="input" className="form-control" id={id} onChange={this.onChange} > {this.state.value} </textarea> </div> </div> ); } } ControlledInput.propTypes = { value: React.PropTypes.any.isRequired, };
src/documentation/WizardHookForm/WizardForm.stories.js
wfp/ui
import React from 'react'; import Wrapper from '../../components/Wrapper'; import RegularPage from '../RegularPage'; import markdown from '../WizardForm/README.mdx'; import WizardForm from './WizardForm'; // const markdown = 'TODO: sourcecode coming soon'; export default { title: 'Templates/WizardForm (react-hook-form)', parameters: { componentSubtitle: 'Example', status: 'released', mdx: markdown, }, }; export const Regular = (args) => { return( <Wrapper background="lighter" pageWidth="lg" spacing="xl"> <WizardForm/> </Wrapper> ) } Regular.decorators = [ (Story) => ( <RegularPage title="Wizard form" withoutSecondaryTabs pageWidth="lg"> <Story /> </RegularPage> ), ];
docs/src/IntroductionPage.js
bbc/react-bootstrap
import React from 'react'; import CodeExample from './CodeExample'; import NavMain from './NavMain'; import PageHeader from './PageHeader'; import PageFooter from './PageFooter'; const IntroductionPage = React.createClass({ render() { return ( <div> <NavMain activePage="introduction" /> <PageHeader title="Introduction" subTitle="The most popular front-end framework, rebuilt for React."/> <div className="container bs-docs-container"> <div className="row"> <div className="col-md-9" role="main"> <div className="bs-docs-section"> <p className="lead"> React-Bootstrap is a library of reuseable front-end components. You'll get the look-and-feel of Twitter Bootstrap, but with much cleaner code, via Facebook's React.js framework. </p> <p> Let's say you want a small button that says "Something", to trigger the function someCallback. If you were writing a native application, you might write something like: </p> <div className="highlight"> <CodeExample mode="javascript" codeText={ `button(size=SMALL, color=GREEN, text="Something", onClick=someCallback)` } /> </div> <p> With the most popular web front-end framework, Twitter Bootstrap, you'd write this in your HTML: </p> <div className="highlight"> <CodeExample mode="htmlmixed" codeText={ `<button id="something-btn" type="button" class="btn btn-success btn-sm"> Something </button>` } /> </div> <p> And something like <code className="js"> $('#something-btn').click(someCallback); </code> in your Javascript. </p> <p> By web standards this is quite nice, but it's still quite nasty. React-Bootstrap lets you write this: </p> <div className="highlight"> <CodeExample mode="javascript" codeText={ `<Button bsStyle="success" bsSize="small" onClick={someCallback}> Something </Button>` } /> </div> <p> The HTML/CSS implementation details are abstracted away, leaving you with an interface that more closely resembles what you would expect to write in other programming languages. </p> <h2>A better Bootstrap API using React.js</h2> <p> The Bootstrap code is so repetitive because HTML and CSS do not support the abstractions necessary for a nice library of components. That's why we have to write <code>btn</code> three times, within an element called <code>button</code>. </p> <p> <strong> The React.js solution is to write directly in Javascript. </strong> React takes over the page-rendering entirely. You just give it a tree of Javascript objects, and tell it how state is transmitted between them. </p> <p> For instance, we might tell React to render a page displaying a single button, styled using the handy Bootstrap CSS: </p> <div className="highlight"> <CodeExample mode="javascript" codeText={ `var button = React.DOM.button({ className: "btn btn-lg btn-success", children: "Register" }); React.render(button, mountNode);` } /> </div> <p> But now that we're in Javascript, we can wrap the HTML/CSS, and provide a much better API: </p> <div className="highlight"> <CodeExample mode="javascript" codeText={ `var button = ReactBootstrap.Button({ bsStyle: "success", bsSize: "large", children: "Register" }); React.render(button, mountNode);` } /> </div> <p> React-Bootstrap is a library of such components, which you can also easily extend and enhance with your own functionality. </p> <h3>JSX Syntax</h3> <p> While each React component is really just a Javascript object, writing tree-structures that way gets tedious. React encourages the use of a syntactic-sugar called JSX, which lets you write the tree in an HTML-like syntax: </p> <div className="highlight"> <CodeExample mode="javascript" codeText={ `var buttonGroupInstance = ( <ButtonGroup> <DropdownButton bsStyle="success" title="Dropdown"> <MenuItem key="1">Dropdown link</MenuItem> <MenuItem key="2">Dropdown link</MenuItem> </DropdownButton> <Button bsStyle="info">Middle</Button> <Button bsStyle="info">Right</Button> </ButtonGroup> ); React.render(buttonGroupInstance, mountNode);` } /> </div> <p> Some people's first impression of React.js is that it seems messy to mix Javascript and HTML in this way. However, compare the code required to add a dropdown button in the example above to the <a href="http://getbootstrap.com/javascript/#dropdowns"> Bootstrap Javascript</a> and <a href="http://getbootstrap.com/components/#btn-dropdowns"> Components</a> documentation for creating a dropdown button. The documentation is split in two because you have to implement the component in two places in your code: first you must add the HTML/CSS elements, and then you must call some Javascript setup code to wire the component together. </p> <p> The React-Bootstrap component library tries to follow the React.js philosophy that a single piece of functionality should be defined in a single place. View the current React-Bootstrap library on the <a href="/components.html">components page</a>. </p> </div> </div> </div> </div> <PageFooter /> </div> ); } }); export default IntroductionPage;
app/javascript/mastodon/containers/compose_container.js
glitch-soc/mastodon
import React from 'react'; import { Provider } from 'react-redux'; import PropTypes from 'prop-types'; import configureStore from '../store/configureStore'; import { hydrateStore } from '../actions/store'; import { IntlProvider, addLocaleData } from 'react-intl'; import { getLocale } from '../locales'; import Compose from '../features/standalone/compose'; import initialState from '../initial_state'; import { fetchCustomEmojis } from '../actions/custom_emojis'; const { localeData, messages } = getLocale(); addLocaleData(localeData); const store = configureStore(); if (initialState) { store.dispatch(hydrateStore(initialState)); } store.dispatch(fetchCustomEmojis()); export default class TimelineContainer extends React.PureComponent { static propTypes = { locale: PropTypes.string.isRequired, }; render () { const { locale } = this.props; return ( <IntlProvider locale={locale} messages={messages}> <Provider store={store}> <Compose /> </Provider> </IntlProvider> ); } }
src/routes/cursos/ckwd01/index.js
candk/codeflySite
import React from 'react'; import Ckwd01 from './ckwd01'; export default { path: '/cursos/ckwd01', action() { return <Ckwd01 />; }, };
src/components/Root/Root.dev.js
esphen/RESTED
import React from 'react'; import { Grid } from 'react-bootstrap'; import App from 'components/App'; import DevTools from 'components/DevTools'; export default function Root() { return ( <Grid fluid> <App /> <DevTools /> </Grid> ); }
server/game/cards/11.6-DitD/SerJasonMallister.js
cryogen/throneteki
const DrawCard = require('../../drawcard'); class SerJasonMallister extends DrawCard { setupCardAbilities(ability) { this.persistentEffect({ condition: () => this.game.getPlayers().every(player => player.shadows.length === 0), match: this, effect: [ ability.effects.addKeyword('Renown') ] }); this.reaction({ when: { afterChallenge: event => ( event.challenge.attackingPlayer === this.controller && event.challenge.winner === this.controller && this.isAttacking() ) }, target: { activePromptTitle: 'Select a card', cardCondition: card => card.location === 'shadows' && card.controller === this.game.currentChallenge.defendingPlayer }, handler: context => { context.target.owner.discardCard(context.target); this.game.addMessage('{0} uses {1} to discard a card in shadows controlled by {2}', context.player, this, this.game.currentChallenge.loser); } }); } } SerJasonMallister.code = '11101'; module.exports = SerJasonMallister;
frontend/app_v2/src/common/icons/Story.js
First-Peoples-Cultural-Council/fv-web-ui
import React from 'react' import PropTypes from 'prop-types' /** * @summary Story * @component * * @param {object} props * * @returns {node} jsx markup */ function Story({ styling }) { return ( <svg data-testid="Story" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" className={styling}> <path d="M12.52,5.59c0,0,4.44-2.95,9.44-2.95v16.69c0,0-6.75-0.56-9.44,2.13V5.59z" /> <path d="M11.49,5.59c0,0-4.44-2.95-9.44-2.95v16.69c0,0,6.75-0.56,9.44,2.13V5.59z" /> </svg> ) } // PROPTYPES const { string } = PropTypes Story.propTypes = { styling: string, } export default Story
client/routes.js
aNerdInTheHand/caretaker-manager
import React from 'react' import { Route, IndexRoute } from 'react-router' import App from './containers/App.jsx' import MatchContainer from './containers/MatchContainer.jsx' import Home from './containers/Home.jsx' export const routes = ( <Route path='/' component={App}> <IndexRoute component={Home} /> <Route path='/match' component={MatchContainer} /> </Route> )
ajax/libs/forerunnerdb/1.3.824/fdb-core.min.js
sajochiu/cdnjs
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){var d=a("../lib/Core");a("../lib/Shim.IE8");"undefined"!=typeof window&&(window.ForerunnerDB=d),b.exports=d},{"../lib/Core":6,"../lib/Shim.IE8":30}],2:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=new e,g=function(a,b,c){this.init.apply(this,arguments)};g.prototype.init=function(a,b,c,d,e){this._store=[],this._keys=[],void 0!==c&&this.primaryKey(c),void 0!==b&&this.index(b),void 0!==d&&this.compareFunc(d),void 0!==e&&this.hashFunc(e),void 0!==a&&this.data(a)},d.addModule("BinaryTree",g),d.mixin(g.prototype,"Mixin.ChainReactor"),d.mixin(g.prototype,"Mixin.Sorting"),d.mixin(g.prototype,"Mixin.Common"),d.synthesize(g.prototype,"compareFunc"),d.synthesize(g.prototype,"hashFunc"),d.synthesize(g.prototype,"indexDir"),d.synthesize(g.prototype,"primaryKey"),d.synthesize(g.prototype,"keys"),d.synthesize(g.prototype,"index",function(a){return void 0!==a&&(this.debug()&&console.log("Setting index",a,f.parse(a,!0)),this.keys(f.parse(a,!0))),this.$super.call(this,a)}),g.prototype.clear=function(){delete this._data,delete this._left,delete this._right,this._store=[]},g.prototype.data=function(a){return void 0!==a?(this._data=a,this._hashFunc&&(this._hash=this._hashFunc(a)),this):this._data},g.prototype.push=function(a){return void 0!==a?(this._store.push(a),this):!1},g.prototype.pull=function(a){if(void 0!==a){var b=this._store.indexOf(a);if(b>-1)return this._store.splice(b,1),this}return!1},g.prototype._compareFunc=function(a,b){var c,d,e=0;for(c=0;c<this._keys.length;c++)if(d=this._keys[c],1===d.value?e=this.sortAsc(f.get(a,d.path),f.get(b,d.path)):-1===d.value&&(e=this.sortDesc(f.get(a,d.path),f.get(b,d.path))),this.debug()&&console.log("Compared %s with %s order %d in path %s and result was %d",f.get(a,d.path),f.get(b,d.path),d.value,d.path,e),0!==e)return this.debug()&&console.log("Retuning result %d",e),e;return this.debug()&&console.log("Retuning result %d",e),e},g.prototype._hashFunc=function(a){return a[this._keys[0].path]},g.prototype.removeChildNode=function(a){this._left===a?delete this._left:this._right===a&&delete this._right},g.prototype.nodeBranch=function(a){return this._left===a?"left":this._right===a?"right":void 0},g.prototype.insert=function(a){var b,c,d,e;if(a instanceof Array){for(c=[],d=[],e=0;e<a.length;e++)this.insert(a[e])?c.push(a[e]):d.push(a[e]);return{inserted:c,failed:d}}return this.debug()&&console.log("Inserting",a),this._data?(b=this._compareFunc(this._data,a),0===b?(this.debug()&&console.log("Data is equal (currrent, new)",this._data,a),this._left?this._left.insert(a):(this._left=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._left._parent=this),!0):-1===b?(this.debug()&&console.log("Data is greater (currrent, new)",this._data,a),this._right?this._right.insert(a):(this._right=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._right._parent=this),!0):1===b?(this.debug()&&console.log("Data is less (currrent, new)",this._data,a),this._left?this._left.insert(a):(this._left=new g(a,this._index,this._binaryTree,this._compareFunc,this._hashFunc),this._left._parent=this),!0):!1):(this.debug()&&console.log("Node has no data, setting data",a),this.data(a),!0)},g.prototype.remove=function(a){var b,c,d,e=this.primaryKey();if(a instanceof Array){for(c=[],d=0;d<a.length;d++)this.remove(a[d])&&c.push(a[d]);return c}return this.debug()&&console.log("Removing",a),this._data[e]===a[e]?this._remove(this):(b=this._compareFunc(this._data,a),-1===b&&this._right?this._right.remove(a):1===b&&this._left?this._left.remove(a):!1)},g.prototype._remove=function(a){var b,c;return this._left?(b=this._left,c=this._right,this._left=b._left,this._right=b._right,this._data=b._data,this._store=b._store,c&&(b.rightMost()._right=c)):this._right?(c=this._right,this._left=c._left,this._right=c._right,this._data=c._data,this._store=c._store):this.clear(),!0},g.prototype.leftMost=function(){return this._left?this._left.leftMost():this},g.prototype.rightMost=function(){return this._right?this._right.rightMost():this},g.prototype.lookup=function(a,b,c,d){var e=this._compareFunc(this._data,a);return d=d||[],0===e&&(this._left&&this._left.lookup(a,b,c,d),d.push(this._data),this._right&&this._right.lookup(a,b,c,d)),-1===e&&this._right&&this._right.lookup(a,b,c,d),1===e&&this._left&&this._left.lookup(a,b,c,d),d},g.prototype.inOrder=function(a,b){switch(b=b||[],this._left&&this._left.inOrder(a,b),a){case"hash":b.push(this._hash);break;case"data":b.push(this._data);break;default:b.push({key:this._data,arr:this._store})}return this._right&&this._right.inOrder(a,b),b},g.prototype.startsWith=function(a,b,c,d){var e,g,h=f.get(this._data,a),i=h.substr(0,b.length);return d=d||[],void 0===d._visitedCount&&(d._visitedCount=0),d._visitedCount++,d._visitedNodes=d._visitedNodes||[],d._visitedNodes.push(h),g=this.sortAsc(i,b),e=i===b,0===g&&(this._left&&this._left.startsWith(a,b,c,d),e&&d.push(this._data),this._right&&this._right.startsWith(a,b,c,d)),-1===g&&(e&&d.push(this._data),this._right&&this._right.startsWith(a,b,c,d)),1===g&&(this._left&&this._left.startsWith(a,b,c,d),e&&d.push(this._data)),d},g.prototype.findRange=function(a,b,c,d,f,g){f=f||[],g=g||new e(b),this._left&&this._left.findRange(a,b,c,d,f,g);var h=g.value(this._data),i=this.sortAsc(h,c),j=this.sortAsc(h,d);if(!(0!==i&&1!==i||0!==j&&-1!==j))switch(a){case"hash":f.push(this._hash);break;case"data":f.push(this._data);break;default:f.push({key:this._data,arr:this._store})}return this._right&&this._right.findRange(a,b,c,d,f,g),f},g.prototype.match=function(a,b,c){var d,e,g,h=[],i=0;for(d=f.parseArr(this._index,{verbose:!0}),e=f.parseArr(a,c&&c.pathOptions?c.pathOptions:{ignore:/\$/,verbose:!0}),g=0;g<d.length;g++)e[g]===d[g]&&(i++,h.push(e[g]));return{matchedKeys:h,totalKeyCount:e.length,score:i}},d.finishModule("BinaryTree"),b.exports=g},{"./Path":26,"./Shared":29}],3:[function(a,b,c){"use strict";var d,e;d=function(){var a,b,c,d=[];for(b=0;256>b;b++){for(a=b,c=0;8>c;c++)a=1&a?3988292384^a>>>1:a>>>1;d[b]=a}return d}(),e=function(a){var b,c=-1;for(b=0;b<a.length;b++)c=c>>>8^d[255&(c^a.charCodeAt(b))];return(-1^c)>>>0},b.exports=e},{}],4:[function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o;d=a("./Shared");var p=function(a,b){this.init.apply(this,arguments)};p.prototype.init=function(a,b){this.sharedPathSolver=o,this._primaryKey="_id",this._primaryIndex=new g("primary"),this._primaryCrc=new g("primaryCrc"),this._crcLookup=new g("crcLookup"),this._name=a,this._data=[],this._metrics=new f,this._options=b||{changeTimestamp:!1},this._options.db&&this.db(this._options.db),this._metaData={},this._deferQueue={insert:[],update:[],remove:[],upsert:[],async:[]},this._deferThreshold={insert:100,update:100,remove:100,upsert:100},this._deferTime={insert:1,update:1,remove:1,upsert:1},this._deferredCalls=!0,this.subsetOf(this)},d.addModule("Collection",p),d.mixin(p.prototype,"Mixin.Common"),d.mixin(p.prototype,"Mixin.Events"),d.mixin(p.prototype,"Mixin.ChainReactor"),d.mixin(p.prototype,"Mixin.CRUD"),d.mixin(p.prototype,"Mixin.Constants"),d.mixin(p.prototype,"Mixin.Triggers"),d.mixin(p.prototype,"Mixin.Sorting"),d.mixin(p.prototype,"Mixin.Matching"),d.mixin(p.prototype,"Mixin.Updating"),d.mixin(p.prototype,"Mixin.Tags"),f=a("./Metrics"),g=a("./KeyValueStore"),h=a("./Path"),i=a("./IndexHashMap"),j=a("./IndexBinaryTree"),k=a("./Index2d"),e=d.modules.Db,l=a("./Overload"),m=a("./ReactorIO"),n=a("./Condition"),o=new h,d.synthesize(p.prototype,"deferredCalls"),d.synthesize(p.prototype,"state"),d.synthesize(p.prototype,"name"),d.synthesize(p.prototype,"metaData"),d.synthesize(p.prototype,"capped"),d.synthesize(p.prototype,"cappedSize"),p.prototype._asyncPending=function(a){this._deferQueue.async.push(a)},p.prototype._asyncComplete=function(a){for(var b=this._deferQueue.async.indexOf(a);b>-1;)this._deferQueue.async.splice(b,1),b=this._deferQueue.async.indexOf(a);0===this._deferQueue.async.length&&this.deferEmit("ready")},p.prototype.data=function(){return this._data},p.prototype.drop=function(a){var b;if(this.isDropped())return a&&a.call(this,!1,!0),!0;if(this._db&&this._db._collection&&this._name){if(this.debug()&&console.log(this.logIdentifier()+" Dropping"),this._state="dropped",this.emit("drop",this),delete this._db._collection[this._name],this._collate)for(b in this._collate)this._collate.hasOwnProperty(b)&&this.collateRemove(b);return delete this._primaryKey,delete this._primaryIndex,delete this._primaryCrc,delete this._crcLookup,delete this._data,delete this._metrics,delete this._listeners,a&&a.call(this,!1,!0),!0}return a&&a.call(this,!1,!0),!1},p.prototype.primaryKey=function(a){if(void 0!==a){if(this._primaryKey!==a){var b=this._primaryKey;this._primaryKey=a,this._primaryIndex.primaryKey(a),this.rebuildPrimaryKeyIndex(),this.chainSend("primaryKey",{keyName:a,oldData:b})}return this}return this._primaryKey},p.prototype._onInsert=function(a,b){this.emit("insert",a,b)},p.prototype._onUpdate=function(a){this.emit("update",a)},p.prototype._onRemove=function(a){this.emit("remove",a)},p.prototype._onChange=function(){this._options.changeTimestamp&&(this._metaData.lastChange=this.serialiser.convert(new Date))},d.synthesize(p.prototype,"db",function(a){return a&&"_id"===this.primaryKey()&&(this.primaryKey(a.primaryKey()),this.debug(a.debug())),this.$super.apply(this,arguments)}),d.synthesize(p.prototype,"mongoEmulation"),p.prototype.setData=new l("Collection.prototype.setData",{"*":function(a){return this.$main.call(this,a,{})},"*, object":function(a,b){return this.$main.call(this,a,b)},"*, function":function(a,b){return this.$main.call(this,a,{},b)},"*, *, function":function(a,b,c){return this.$main.call(this,a,b,c)},"*, *, *":function(a,b,c){return this.$main.call(this,a,b,c)},$main:function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";if(a){var d=this.deferredCalls(),e=[].concat(this._data);this.deferredCalls(!1),b=this.options(b),b.$decouple&&(a=this.decouple(a)),a instanceof Array||(a=[a]),this.remove({}),this.insert(a),this.deferredCalls(d),this._onChange(),this.emit("setData",this._data,e)}return c&&c.call(this),this}}),p.prototype.rebuildPrimaryKeyIndex=function(a){a=a||{$ensureKeys:void 0,$violationCheck:void 0};var b,c,d,e,f=a&&void 0!==a.$ensureKeys?a.$ensureKeys:!0,g=a&&void 0!==a.$violationCheck?a.$violationCheck:!0,h=this._primaryIndex,i=this._primaryCrc,j=this._crcLookup,k=this._primaryKey;for(h.truncate(),i.truncate(),j.truncate(),b=this._data,c=b.length;c--;){if(d=b[c],f&&this.ensurePrimaryKey(d),g){if(!h.uniqueSet(d[k],d))throw this.logIdentifier()+" Call to setData on collection failed because your data violates the primary key unique constraint. One or more documents are using the same primary key: "+d[this._primaryKey]}else h.set(d[k],d);e=this.hash(d),i.set(d[k],e),j.set(e,d)}},p.prototype.ensurePrimaryKey=function(a){void 0===a[this._primaryKey]&&(a[this._primaryKey]=this.objectId())},p.prototype.truncate=function(){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return this.emit("truncate",this._data),this._data.length=0,this._primaryIndex=new g("primary"),this._primaryCrc=new g("primaryCrc"),this._crcLookup=new g("crcLookup"),this._onChange(),this.emit("immediateChange",{type:"truncate"}),this.deferEmit("change",{type:"truncate"}),this},p.prototype.upsert=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";if(a){var c,d,e=this._deferQueue.upsert,f=this._deferThreshold.upsert,g={};if(a instanceof Array){if(this._deferredCalls&&a.length>f)return this._deferQueue.upsert=e.concat(a),this._asyncPending("upsert"),this.processQueue("upsert",b),{};for(g=[],d=0;d<a.length;d++)g.push(this.upsert(a[d]));return b&&b.call(this),g}switch(a[this._primaryKey]?(c={},c[this._primaryKey]=a[this._primaryKey],this._primaryIndex.lookup(c)[0]?g.op="update":g.op="insert"):g.op="insert",g.op){case"insert":g.result=this.insert(a,b);break;case"update":g.result=this.update(c,a,{},b)}return g}return b&&b.call(this),{}},p.prototype.filter=function(a,b,c){return this.find(a,c).filter(b)},p.prototype.filterUpdate=function(a,b,c){var d,e,f,g,h=this.find(a,c),i=[],j=this.primaryKey();for(g=0;g<h.length;g++)d=h[g],f=b(d),f&&(e={},e[j]=d[j],i.push(this.update(e,f)));return i},p.prototype.update=function(a,b,c,d){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return this.mongoEmulation()?(this.convertToFdb(a),this.convertToFdb(b)):b=this.decouple(b),b=this.transformIn(b),this._handleUpdate(a,b,c,d)},p.prototype._handleUpdate=function(a,b,c,d){var e,f,g=this,h=this._metrics.create("update"),i=function(d){var e,f,i,j=g.decouple(d);return g.willTrigger(g.TYPE_UPDATE,g.PHASE_BEFORE)||g.willTrigger(g.TYPE_UPDATE,g.PHASE_AFTER)?(e=g.decouple(d),f={type:"update",query:g.decouple(a),update:g.decouple(b),options:g.decouple(c),op:h},i=g.updateObject(e,f.update,f.query,f.options,""),g.processTrigger(f,g.TYPE_UPDATE,g.PHASE_BEFORE,d,e)!==!1?(i=g.updateObject(d,e,f.query,f.options,""),g.processTrigger(f,g.TYPE_UPDATE,g.PHASE_AFTER,j,e)):i=!1):i=g.updateObject(d,b,a,c,""),g._updateIndexes(j,d),i};return h.start(),h.time("Retrieve documents to update"),e=this.find(a,{$decouple:!1}),h.time("Retrieve documents to update"),e.length?(h.time("Update documents"),f=e.filter(i),h.time("Update documents"),f.length?(this.debug()&&console.log(this.logIdentifier()+" Updated some data"),h.time("Resolve chains"),this.chainWillSend()&&this.chainSend("update",{query:a,update:b,dataSet:this.decouple(f)},c),h.time("Resolve chains"),this._onUpdate(f),this._onChange(),d&&d.call(this,f||[]),this.emit("immediateChange",{type:"update",data:f}),this.deferEmit("change",{type:"update",data:f})):d&&d.call(this,f||[])):d&&d.call(this,f||[]),h.stop(),f||[]},p.prototype._replaceObj=function(a,b){var c;this._removeFromIndexes(a);for(c in a)a.hasOwnProperty(c)&&delete a[c];for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);if(!this._insertIntoIndexes(a))throw this.logIdentifier()+" Primary key violation in update! Key violated: "+a[this._primaryKey];return this},p.prototype.updateById=function(a,b){var c={};return c[this._primaryKey]=a,this.update(c,b)[0]},p.prototype.updateObject=function(a,b,c,d,e,f){b=this.decouple(b),e=e||"","."===e.substr(0,1)&&(e=e.substr(1,e.length-1));var g,i,j,k,l,m,n,o,p,q,r,s,t=!1,u=!1;for(s in b)if(b.hasOwnProperty(s)){if(g=!1,"$"===s.substr(0,1))switch(s){case"$key":case"$index":case"$data":case"$min":case"$max":g=!0;break;case"$each":for(g=!0,k=b.$each.length,j=0;k>j;j++)u=this.updateObject(a,b.$each[j],c,d,e),u&&(t=!0);t=t||u;break;case"$replace":g=!0,n=b.$replace,o=this.primaryKey();for(m in a)a.hasOwnProperty(m)&&m!==o&&void 0===n[m]&&(this._updateUnset(a,m),t=!0);for(m in n)n.hasOwnProperty(m)&&m!==o&&(this._updateOverwrite(a,m,n[m]),t=!0);break;default:g=!0,u=this.updateObject(a,b[s],c,d,e,s),t=t||u}if(this._isPositionalKey(s)&&(g=!0,s=s.substr(0,s.length-2),p=new h(e+"."+s),a[s]&&a[s]instanceof Array&&a[s].length)){for(i=[],j=0;j<a[s].length;j++)this._match(a[s][j],p.value(c)[0],d,"",{})&&i.push(j);for(j=0;j<i.length;j++)u=this.updateObject(a[s][i[j]],b[s+".$"],c,d,e+"."+s,f),t=t||u}if(!g)if(f||"object"!=typeof b[s])switch(f){case"$inc":var v=!0;b[s]>0?b.$max&&a[s]>=b.$max&&(v=!1):b[s]<0&&b.$min&&a[s]<=b.$min&&(v=!1),v&&(this._updateIncrement(a,s,b[s]),t=!0);break;case"$cast":switch(b[s]){case"array":a[s]instanceof Array||(this._updateProperty(a,s,b.$data||[]),t=!0);break;case"object":a[s]instanceof Object&&!(a[s]instanceof Array)||(this._updateProperty(a,s,b.$data||{}),t=!0);break;case"number":"number"!=typeof a[s]&&(this._updateProperty(a,s,Number(a[s])),t=!0);break;case"string":"string"!=typeof a[s]&&(this._updateProperty(a,s,String(a[s])),t=!0);break;default:throw this.logIdentifier()+" Cannot update cast to unknown type: "+b[s]}break;case"$push":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot push to a key that is not an array! ("+s+")";if(void 0!==b[s].$position&&b[s].$each instanceof Array)for(l=b[s].$position,k=b[s].$each.length,j=0;k>j;j++)this._updateSplicePush(a[s],l+j,b[s].$each[j]);else if(b[s].$each instanceof Array)for(k=b[s].$each.length,j=0;k>j;j++)this._updatePush(a[s],b[s].$each[j]);else this._updatePush(a[s],b[s]);t=!0;break;case"$pull":if(a[s]instanceof Array){for(i=[],j=0;j<a[s].length;j++)this._match(a[s][j],b[s],d,"",{})&&i.push(j);for(k=i.length;k--;)this._updatePull(a[s],i[k]),t=!0}break;case"$pullAll":if(a[s]instanceof Array){if(!(b[s]instanceof Array))throw this.logIdentifier()+" Cannot pullAll without being given an array of values to pull! ("+s+")";if(i=a[s],k=i.length,k>0)for(;k--;){for(l=0;l<b[s].length;l++)i[k]===b[s][l]&&(this._updatePull(a[s],k),k--,t=!0);if(0>k)break}}break;case"$addToSet":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot addToSet on a key that is not an array! ("+s+")";var w,x,y,z,A=a[s],B=A.length,C=!0,D=d&&d.$addToSet;for(b[s].$key?(y=!1,z=new h(b[s].$key),x=z.value(b[s])[0],delete b[s].$key):D&&D.key?(y=!1,z=new h(D.key),x=z.value(b[s])[0]):(x=this.jStringify(b[s]),y=!0),w=0;B>w;w++)if(y){if(this.jStringify(A[w])===x){C=!1;break}}else if(x===z.value(A[w])[0]){C=!1;break}C&&(this._updatePush(a[s],b[s]),t=!0);break;case"$splicePush":if(void 0===a[s]&&this._updateProperty(a,s,[]),!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot splicePush with a key that is not an array! ("+s+")";if(l=b.$index,void 0===l)throw this.logIdentifier()+" Cannot splicePush without a $index integer value!";delete b.$index,l>a[s].length&&(l=a[s].length),this._updateSplicePush(a[s],l,b[s]),t=!0;break;case"$move":if(!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot move on a key that is not an array! ("+s+")";for(j=0;j<a[s].length;j++)if(this._match(a[s][j],b[s],d,"",{})){var E=b.$index;if(void 0===E)throw this.logIdentifier()+" Cannot move without a $index integer value!";delete b.$index,this._updateSpliceMove(a[s],j,E),t=!0;break}break;case"$mul":this._updateMultiply(a,s,b[s]),t=!0;break;case"$rename":this._updateRename(a,s,b[s]),t=!0;break;case"$overwrite":this._updateOverwrite(a,s,b[s]),t=!0;break;case"$unset":this._updateUnset(a,s),t=!0;break;case"$clear":this._updateClear(a,s),t=!0;break;case"$pop":if(!(a[s]instanceof Array))throw this.logIdentifier()+" Cannot pop from a key that is not an array! ("+s+")";this._updatePop(a[s],b[s])&&(t=!0);break;case"$toggle":this._updateProperty(a,s,!a[s]),t=!0;break;default:a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0)}else if(null!==a[s]&&"object"==typeof a[s])if(q=a[s]instanceof Array,r=b[s]instanceof Array,q||r)if(!r&&q)for(j=0;j<a[s].length;j++)u=this.updateObject(a[s][j],b[s],c,d,e+"."+s,f),t=t||u;else a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0);else u=this.updateObject(a[s],b[s],c,d,e+"."+s,f),t=t||u;else a[s]!==b[s]&&(this._updateProperty(a,s,b[s]),t=!0)}return t},p.prototype._isPositionalKey=function(a){return".$"===a.substr(a.length-2,2)},p.prototype.remove=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";var d,e,f,g,h,i,j,k,l=this;if("function"==typeof b&&(c=b,b={}),this.mongoEmulation()&&this.convertToFdb(a),a instanceof Array){for(g=[],f=0;f<a.length;f++)g.push(this.remove(a[f],{noEmit:!0}));return(!b||b&&!b.noEmit)&&this._onRemove(g),c&&c.call(this,!1,g),g}if(g=[],d=this.find(a,{$decouple:!1}),d.length){h=function(a){l._removeFromIndexes(a),e=l._data.indexOf(a),l._dataRemoveAtIndex(e),g.push(a)};for(var m=0;m<d.length;m++)j=d[m],l.willTrigger(l.TYPE_REMOVE,l.PHASE_BEFORE)||l.willTrigger(l.TYPE_REMOVE,l.PHASE_AFTER)?(i={type:"remove"},k=l.decouple(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_BEFORE,k,k)!==!1&&(h(j),l.processTrigger(i,l.TYPE_REMOVE,l.PHASE_AFTER,k,k))):h(j);g.length&&(l.chainSend("remove",{query:a,dataSet:g},b),(!b||b&&!b.noEmit)&&this._onRemove(g),this._onChange(),this.emit("immediateChange",{type:"remove",data:g}),this.deferEmit("change",{type:"remove",data:g}))}return c&&c.call(this,!1,g),g},p.prototype.removeById=function(a){var b={};return b[this._primaryKey]=a,this.remove(b)[0]},p.prototype.processQueue=function(a,b,c){var d,e,f=this,g=this._deferQueue[a],h=this._deferThreshold[a],i=this._deferTime[a];if(c=c||{deferred:!0},g.length){switch(d=g.length>h?g.splice(0,h):g.splice(0,g.length),e=f[a](d),a){case"insert":c.inserted=c.inserted||[],c.failed=c.failed||[],c.inserted=c.inserted.concat(e.inserted),c.failed=c.failed.concat(e.failed)}setTimeout(function(){f.processQueue.call(f,a,b,c)},i)}else b&&b.call(this,c),this._asyncComplete(a);this.isProcessingQueue()||this.deferEmit("queuesComplete")},p.prototype.isProcessingQueue=function(){var a;for(a in this._deferQueue)if(this._deferQueue.hasOwnProperty(a)&&this._deferQueue[a].length)return!0;return!1},p.prototype.insert=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";return"function"==typeof b?(c=b,b=this._data.length):void 0===b&&(b=this._data.length),a=this.transformIn(a),this._insertHandle(a,b,c)},p.prototype._insertHandle=function(a,b,c){var d,e,f,g=this._deferQueue.insert,h=this._deferThreshold.insert,i=[],j=[];if(a instanceof Array){if(this._deferredCalls&&a.length>h)return this._deferQueue.insert=g.concat(a),this._asyncPending("insert"),void this.processQueue("insert",c);for(f=0;f<a.length;f++)d=this._insert(a[f],b+f),d===!0?i.push(a[f]):j.push({doc:a[f],reason:d})}else d=this._insert(a,b),d===!0?i.push(a):j.push({doc:a,reason:d});return e={deferred:!1,inserted:i,failed:j},this._onInsert(i,j),c&&c.call(this,e),this._onChange(),this.emit("immediateChange",{type:"insert",data:i,failed:j}),this.deferEmit("change",{type:"insert",data:i,failed:j}),e},p.prototype._insert=function(a,b){if(a){var c,d,e,f,g=this,h=this.capped(),i=this.cappedSize();if(this.ensurePrimaryKey(a),c=this.insertIndexViolation(a),e=function(a){g._insertIntoIndexes(a),b>g._data.length&&(b=g._data.length),g._dataInsertAtIndex(b,a),h&&g._data.length>i&&g.removeById(g._data[0][g._primaryKey]),g.chainWillSend()&&g.chainSend("insert",{dataSet:g.decouple([a])},{index:b})},c)return"Index violation in index: "+c;if(g.willTrigger(g.TYPE_INSERT,g.PHASE_BEFORE)||g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)){if(d={type:"insert"},g.processTrigger(d,g.TYPE_INSERT,g.PHASE_BEFORE,{},a)===!1)return"Trigger cancelled operation";e(a),g.willTrigger(g.TYPE_INSERT,g.PHASE_AFTER)&&(f=g.decouple(a),g.processTrigger(d,g.TYPE_INSERT,g.PHASE_AFTER,{},f))}else e(a);return!0}return"No document passed to insert"},p.prototype._dataInsertAtIndex=function(a,b){this._data.splice(a,0,b)},p.prototype._dataRemoveAtIndex=function(a){this._data.splice(a,1)},p.prototype._dataReplace=function(a){for(;this._data.length;)this._data.pop();this._data=this._data.concat(a)},p.prototype._insertIntoIndexes=function(a){var b,c,d=this._indexByName,e=this.hash(a),f=this._primaryKey;c=this._primaryIndex.uniqueSet(a[f],a),this._primaryCrc.uniqueSet(a[f],e),this._crcLookup.uniqueSet(e,a);for(b in d)d.hasOwnProperty(b)&&d[b].insert(a);return c},p.prototype._removeFromIndexes=function(a){var b,c=this._indexByName,d=this.hash(a),e=this._primaryKey;this._primaryIndex.unSet(a[e]),this._primaryCrc.unSet(a[e]),this._crcLookup.unSet(d);for(b in c)c.hasOwnProperty(b)&&c[b].remove(a)},p.prototype._updateIndexes=function(a,b){this._removeFromIndexes(a),this._insertIntoIndexes(b)},p.prototype._rebuildIndexes=function(){var a,b=this._indexByName;for(a in b)b.hasOwnProperty(a)&&b[a].rebuild()},p.prototype.subset=function(a,b){var c,d=this.find(a,b);return c=new p,c.db(this._db),c.subsetOf(this).primaryKey(this._primaryKey).setData(d),c},d.synthesize(p.prototype,"subsetOf"),p.prototype.isSubsetOf=function(a){return this._subsetOf===a},p.prototype.distinct=function(a,b,c){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";var d,e,f=this.find(b,c),g=new h(a),i={},j=[];for(e=0;e<f.length;e++)d=g.value(f[e])[0],d&&!i[d]&&(i[d]=!0,j.push(d));return j},p.prototype.findById=function(a,b){var c={};return c[this._primaryKey]=a,this.find(c,b)[0]},p.prototype.peek=function(a,b){var c,d,e=this._data,f=e.length,g=new p,h=typeof a;if("string"===h){for(c=0;f>c;c++)d=this.jStringify(e[c]),d.indexOf(a)>-1&&g.insert(e[c]);return g.find({},b)}return this.find(a,b)},p.prototype.explain=function(a,b){var c=this.find(a,b);return c.__fdbOp._data},p.prototype.options=function(a){return a=a||{},a.$decouple=void 0!==a.$decouple?a.$decouple:!0,a.$explain=void 0!==a.$explain?a.$explain:!1,a},p.prototype.find=function(a,b,c){return this.mongoEmulation()&&this.convertToFdb(a),c?(c.call(this,"Callbacks for the find() operation are not yet implemented!",[]),[]):this._find.call(this,a,b,c)},p.prototype._find=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";a=a||{};var c,d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=this._metrics.create("find"),y=this.primaryKey(),z=this,A=!0,B={},C=[],D=[],E=[],F={},G={};if(b instanceof Array||(b=this.options(b)),w=function(c){return z._match(c,a,b,"and",F)},x.start(),a){if(a instanceof Array){for(v=this,n=0;n<a.length;n++)v=v.subset(a[n],b&&b[n]?b[n]:{});return v.find()}if(a.$findSub){if(!a.$findSub.$path)throw"$findSub missing $path property!";return this.findSub(a.$findSub.$query,a.$findSub.$path,a.$findSub.$subQuery,a.$findSub.$subOptions)}if(a.$findSubOne){if(!a.$findSubOne.$path)throw"$findSubOne missing $path property!";return this.findSubOne(a.$findSubOne.$query,a.$findSubOne.$path,a.$findSubOne.$subQuery,a.$findSubOne.$subOptions)}if(x.time("analyseQuery"),c=this._analyseQuery(z.decouple(a),b,x),x.time("analyseQuery"),x.data("analysis",c),c.hasJoin&&c.queriesJoin){for(x.time("joinReferences"),f=0;f<c.joinsOn.length;f++)m=c.joinsOn[f],j=m.key,k=m.type,l=m.id,i=new h(c.joinQueries[j]),g=i.value(a)[0],B[l]=this._db[k](j).subset(g),delete a[c.joinQueries[j]];x.time("joinReferences")}if(c.indexMatch.length&&(!b||b&&!b.$skipIndex)?(x.data("index.potential",c.indexMatch),x.data("index.used",c.indexMatch[0].index),x.time("indexLookup"),e=c.indexMatch[0].lookup||[],x.time("indexLookup"),c.indexMatch[0].keyData.totalKeyCount===c.indexMatch[0].keyData.score&&(A=!1)):x.flag("usedIndex",!1),A&&(e&&e.length?(d=e.length,x.time("tableScan: "+d),e=e.filter(w)):(d=this._data.length,x.time("tableScan: "+d),e=this._data.filter(w)),x.time("tableScan: "+d)),b.$orderBy&&(x.time("sort"),e=this.sort(b.$orderBy,e),x.time("sort")),void 0!==b.$page&&void 0!==b.$limit&&(G.page=b.$page,G.pages=Math.ceil(e.length/b.$limit),G.records=e.length,b.$page&&b.$limit>0&&(x.data("cursor",G),e.splice(0,b.$page*b.$limit))),b.$skip&&(G.skip=b.$skip,e.splice(0,b.$skip),x.data("skip",b.$skip)),b.$limit&&e&&e.length>b.$limit&&(G.limit=b.$limit,e.length=b.$limit,x.data("limit",b.$limit)),b.$decouple&&(x.time("decouple"),e=this.decouple(e),x.time("decouple"),x.data("flag.decouple",!0)),b.$join&&(C=C.concat(this.applyJoin(e,b.$join,B)),x.data("flag.join",!0)),C.length&&(x.time("removalQueue"),this.spliceArrayByIndexList(e,C),x.time("removalQueue")),b.$transform){for(x.time("transform"),n=0;n<e.length;n++)e.splice(n,1,b.$transform(e[n]));x.time("transform"),x.data("flag.transform",!0)}this._transformEnabled&&this._transformOut&&(x.time("transformOut"),e=this.transformOut(e),x.time("transformOut")),x.data("results",e.length)}else e=[];if(!b.$aggregate){x.time("scanFields");for(n in b)b.hasOwnProperty(n)&&0!==n.indexOf("$")&&(1===b[n]?D.push(n):0===b[n]&&E.push(n));if(x.time("scanFields"),D.length||E.length){for(x.data("flag.limitFields",!0),x.data("limitFields.on",D),x.data("limitFields.off",E),x.time("limitFields"),n=0;n<e.length;n++){t=e[n];for(o in t)t.hasOwnProperty(o)&&(D.length&&o!==y&&-1===D.indexOf(o)&&delete t[o],E.length&&E.indexOf(o)>-1&&delete t[o])}x.time("limitFields")}if(b.$elemMatch){x.data("flag.elemMatch",!0),x.time("projection-elemMatch");for(n in b.$elemMatch)if(b.$elemMatch.hasOwnProperty(n))for(q=new h(n),o=0;o<e.length;o++)if(r=q.value(e[o])[0],r&&r.length)for(p=0;p<r.length;p++)if(z._match(r[p],b.$elemMatch[n],b,"",{})){q.set(e[o],n,[r[p]]);break}x.time("projection-elemMatch")}if(b.$elemsMatch){x.data("flag.elemsMatch",!0),x.time("projection-elemsMatch");for(n in b.$elemsMatch)if(b.$elemsMatch.hasOwnProperty(n))for(q=new h(n),o=0;o<e.length;o++)if(r=q.value(e[o])[0],r&&r.length){for(s=[],p=0;p<r.length;p++)z._match(r[p],b.$elemsMatch[n],b,"",{})&&s.push(r[p]);q.set(e[o],n,s)}x.time("projection-elemsMatch")}}return b.$aggregate&&(x.data("flag.aggregate",!0),x.time("aggregate"),u=new h(b.$aggregate),e=u.value(e),x.time("aggregate")),b.$groupBy&&(x.data("flag.group",!0),x.time("group"),e=this.group(b.$groupBy,e),x.time("group")),x.stop(),e.__fdbOp=x,e.$cursor=G,e},p.prototype.findOne=function(){return this.find.apply(this,arguments)[0]},p.prototype.indexOf=function(a,b){var c,d=this.find(a,{$decouple:!1})[0];return d?!b||b&&!b.$orderBy?this._data.indexOf(d):(b.$decouple=!1,c=this.find(a,b),c.indexOf(d)):-1},p.prototype.indexOfDocById=function(a,b){var c,d;return c="object"!=typeof a?this._primaryIndex.get(a):this._primaryIndex.get(a[this._primaryKey]),c?!b||b&&!b.$orderBy?this._data.indexOf(c):(b.$decouple=!1,d=this.find({},b),d.indexOf(c)):-1},p.prototype.removeByIndex=function(a){var b,c;return b=this._data[a],void 0!==b?(b=this.decouple(b),c=b[this.primaryKey()],this.removeById(c)):!1},p.prototype.transform=function(a){return void 0!==a?("object"==typeof a?(void 0!==a.enabled&&(this._transformEnabled=a.enabled),void 0!==a.dataIn&&(this._transformIn=a.dataIn),void 0!==a.dataOut&&(this._transformOut=a.dataOut)):this._transformEnabled=a!==!1,this):{enabled:this._transformEnabled,dataIn:this._transformIn,dataOut:this._transformOut}},p.prototype.transformIn=function(a){if(this._transformEnabled&&this._transformIn){if(a instanceof Array){var b,c,d=[];for(c=0;c<a.length;c++)b=this._transformIn(a[c]),b instanceof Array?d=d.concat(b):d.push(b);return d}return this._transformIn(a)}return a},p.prototype.transformOut=function(a){if(this._transformEnabled&&this._transformOut){if(a instanceof Array){var b,c,d=[];for(c=0;c<a.length;c++)b=this._transformOut(a[c]),b instanceof Array?d=d.concat(b):d.push(b);return d}return this._transformOut(a)}return a},p.prototype.sort=function(a,b){var c=this,d=o.parse(a,!0);return d.length&&b.sort(function(a,b){var e,f,g=0;for(e=0;e<d.length;e++)if(f=d[e],1===f.value?g=c.sortAsc(o.get(a,f.path),o.get(b,f.path)):-1===f.value&&(g=c.sortDesc(o.get(a,f.path),o.get(b,f.path))),0!==g)return g;return g}),b},p.prototype.group=function(a,b){var c,d,e,f=o.parse(a,!0),g=new h,i={};if(f.length)for(d=0;d<f.length;d++)for(g.path(f[d].path),e=0;e<b.length;e++)c=g.get(b[e]),i[c]=i[c]||[],i[c].push(b[e]);return i},p.prototype._sort=function(a,b){var c,d=this,e=new h,f=e.parse(a,!0)[0];if(e.path(f.path),1===f.value)c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortAsc(c,f)};else{if(-1!==f.value)throw this.logIdentifier()+" $orderBy clause has invalid direction: "+f.value+", accepted values are 1 or -1 for ascending or descending!";c=function(a,b){var c=e.value(a)[0],f=e.value(b)[0];return d.sortDesc(c,f)}}return b.sort(c)},p.prototype._analyseQuery=function(a,b,c){var d,e,f,g,i,j,k,l,m,n,o,p,q,r,s,t,u={queriesOn:[{id:"$collection."+this._name,type:"colletion",key:this._name}],indexMatch:[],hasJoin:!1,queriesJoin:!1,joinQueries:{},query:a,options:b},v=[],w=[];if(c.time("checkIndexes"),p=new h,q=p.parseArr(a,{ignore:/\$/,verbose:!0}).length){ void 0!==a[this._primaryKey]&&(r=typeof a[this._primaryKey],("string"===r||"number"===r||a[this._primaryKey]instanceof Array)&&(c.time("checkIndexMatch: Primary Key"),s=this._primaryIndex.lookup(a,b,c),u.indexMatch.push({lookup:s,keyData:{matchedKeys:[this._primaryKey],totalKeyCount:q,score:1},index:this._primaryIndex}),c.time("checkIndexMatch: Primary Key")));for(t in this._indexById)if(this._indexById.hasOwnProperty(t)&&(m=this._indexById[t],n=m.name(),c.time("checkIndexMatch: "+n),l=m.match(a,b),l.score>0&&(o=m.lookup(a,b,c),u.indexMatch.push({lookup:o,keyData:l,index:m})),c.time("checkIndexMatch: "+n),l.score===q))break;c.time("checkIndexes"),u.indexMatch.length>1&&(c.time("findOptimalIndex"),u.indexMatch.sort(function(a,b){return a.keyData.score>b.keyData.score?-1:a.keyData.score<b.keyData.score?1:a.keyData.score===b.keyData.score?a.lookup.length-b.lookup.length:void 0}),c.time("findOptimalIndex"))}if(b.$join){for(u.hasJoin=!0,d=0;d<b.$join.length;d++)for(e in b.$join[d])b.$join[d].hasOwnProperty(e)&&(i=b.$join[d][e],f=i.$sourceType||"collection",g="$"+f+"."+e,v.push({id:g,type:f,key:e}),void 0!==b.$join[d][e].$as?w.push(b.$join[d][e].$as):w.push(e));for(k=0;k<w.length;k++)j=this._queryReferencesSource(a,w[k],""),j&&(u.joinQueries[v[k].key]=j,u.queriesJoin=!0);u.joinsOn=v,u.queriesOn=u.queriesOn.concat(v)}return u},p.prototype._queryReferencesSource=function(a,b,c){var d;for(d in a)if(a.hasOwnProperty(d)){if(d===b)return c&&(c+="."),c+d;if("object"==typeof a[d])return c&&(c+="."),c+=d,this._queryReferencesSource(a[d],b,c)}return!1},p.prototype.count=function(a,b){return a?this.find(a,b).length:this._data.length},p.prototype.findSub=function(a,b,c,d){return this._findSub(this.find(a),b,c,d)},p.prototype._findSub=function(a,b,c,d){var e,f,g,i=new h(b),j=a.length,k=new p("__FDB_temp_"+this.objectId()).db(this._db),l={parents:j,subDocTotal:0,subDocs:[],pathFound:!1,err:""};for(d=d||{},e=0;j>e;e++)if(f=i.value(a[e])[0]){if(k.setData(f),g=k.find(c,d),d.returnFirst&&g.length)return g[0];d.$split?l.subDocs.push(g):l.subDocs=l.subDocs.concat(g),l.subDocTotal+=g.length,l.pathFound=!0}return k.drop(),l.pathFound||(l.err="No objects found in the parent documents with a matching path of: "+b),d.$stats?l:l.subDocs},p.prototype.findSubOne=function(a,b,c,d){return this.findSub(a,b,c,d)[0]},p.prototype.insertIndexViolation=function(a){var b,c,d,e=this._indexByName;if(this._primaryIndex.get(a[this._primaryKey]))b=this._primaryIndex;else for(c in e)if(e.hasOwnProperty(c)&&(d=e[c],d.unique()&&d.violation(a))){b=d;break}return b?b.name():!1},p.prototype.ensureIndex=function(a,b){if(this.isDropped())throw this.logIdentifier()+" Cannot operate in a dropped state!";this._indexByName=this._indexByName||{},this._indexById=this._indexById||{};var c,e={start:(new Date).getTime()};if(b)if(b.type){if(!d.index[b.type])throw this.logIdentifier()+' Cannot create index of type "'+b.type+'", type not found in the index type register (Shared.index)';c=new d.index[b.type](a,b,this)}else c=new i(a,b,this);else c=new i(a,b,this);return this._indexByName[c.name()]?{err:"Index with that name already exists"}:(c.rebuild(),this._indexByName[c.name()]=c,this._indexById[c.id()]=c,e.end=(new Date).getTime(),e.total=e.end-e.start,this._lastOp={type:"ensureIndex",stats:{time:e}},{index:c,id:c.id(),name:c.name(),state:c.state()})},p.prototype.index=function(a){return this._indexByName?this._indexByName[a]:void 0},p.prototype.lastOp=function(){return this._metrics.list()},p.prototype.diff=function(a){var b,c,d,e,f={insert:[],update:[],remove:[]},g=this.primaryKey();if(g!==a.primaryKey())throw this.logIdentifier()+" Diffing requires that both collections have the same primary key!";for(b=a._data;b&&!(b instanceof Array);)a=b,b=a._data;for(e=b.length,c=0;e>c;c++)d=b[c],this._primaryIndex.get(d[g])?this._primaryCrc.get(d[g])!==a._primaryCrc.get(d[g])&&f.update.push(d):f.insert.push(d);for(b=this._data,e=b.length,c=0;e>c;c++)d=b[c],a._primaryIndex.get(d[g])||f.remove.push(d);return f},p.prototype.collateAdd=new l("Collection.prototype.collateAdd",{"object, string":function(a,b){var c=this;c.collateAdd(a,function(d){var e,f;switch(d.type){case"insert":b?(e={$push:{}},e.$push[b]=c.decouple(d.data.dataSet),c.update({},e)):c.insert(d.data.dataSet);break;case"update":b?(e={},f={},e[b]=d.data.query,f[b+".$"]=d.data.update,c.update(e,f)):c.update(d.data.query,d.data.update);break;case"remove":b?(e={$pull:{}},e.$pull[b]={},e.$pull[b][c.primaryKey()]=d.data.dataSet[0][a.primaryKey()],c.update({},e)):c.remove(d.data.dataSet)}})},"object, function":function(a,b){if("string"==typeof a&&(a=this._db.collection(a,{autoCreate:!1,throwError:!1})),a)return this._collate=this._collate||{},this._collate[a.name()]=new m(a,this,b),this;throw"Cannot collate from a non-existent collection!"}}),p.prototype.collateRemove=function(a){if("object"==typeof a&&(a=a.name()),a)return this._collate[a].drop(),delete this._collate[a],this;throw"No collection name passed to collateRemove() or collection not found!"},p.prototype.when=function(a){var b=this.objectId();return this._when=this._when||{},this._when[b]=this._when[b]||new n(this,b,a),this._when[b]},e.prototype.collection=new l("Db.prototype.collection",{"":function(){return this.$main.call(this,{name:this.objectId()})},object:function(a){return a instanceof p?"droppped"!==a.state()?a:this.$main.call(this,{name:a.name()}):this.$main.call(this,a)},string:function(a){return this.$main.call(this,{name:a})},"string, string":function(a,b){return this.$main.call(this,{name:a,primaryKey:b})},"string, object":function(a,b){return b.name=a,this.$main.call(this,b)},"string, string, object":function(a,b,c){return c.name=a,c.primaryKey=b,this.$main.call(this,c)},$main:function(a){var b=this,c=a.name;if(c){if(this._collection[c])return this._collection[c];if(a&&a.autoCreate===!1){if(a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get collection "+c+" because it does not exist and auto-create has been disabled!";return}if(this.debug()&&console.log(this.logIdentifier()+" Creating collection "+c),this._collection[c]=this._collection[c]||new p(c,a).db(this),this._collection[c].mongoEmulation(this.mongoEmulation()),void 0!==a.primaryKey&&this._collection[c].primaryKey(a.primaryKey),void 0!==a.capped){if(void 0===a.size)throw this.logIdentifier()+" Cannot create a capped collection without specifying a size!";this._collection[c].capped(a.capped),this._collection[c].cappedSize(a.size)}return b._collection[c].on("change",function(){b.emit("change",b._collection[c],"collection",c)}),b.emit("create",b._collection[c],"collection",c),this._collection[c]}if(!a||a&&a.throwError!==!1)throw this.logIdentifier()+" Cannot get collection with undefined name!"}}),e.prototype.collectionExists=function(a){return Boolean(this._collection[a])},e.prototype.collections=function(a){var b,c,d=[],e=this._collection;a&&(a instanceof RegExp||(a=new RegExp(a)));for(c in e)e.hasOwnProperty(c)&&(b=e[c],a?a.exec(c)&&d.push({name:c,count:b.count(),linked:void 0!==b.isLinked?b.isLinked():!1}):d.push({name:c,count:b.count(),linked:void 0!==b.isLinked?b.isLinked():!1}));return d.sort(function(a,b){return a.name.localeCompare(b.name)}),d},d.finishModule("Collection"),b.exports=p},{"./Condition":5,"./Index2d":9,"./IndexBinaryTree":10,"./IndexHashMap":11,"./KeyValueStore":12,"./Metrics":13,"./Overload":25,"./Path":26,"./ReactorIO":27,"./Shared":29}],5:[function(a,b,c){"use strict";var d,e;d=a("./Shared"),e=function(){this.init.apply(this,arguments)},e.prototype.init=function(a,b,c){this._dataSource=a,this._id=b,this._query=[c],this._started=!1,this._state=[!1],this._satisfied=!1,this.earlyExit(!0)},d.addModule("Condition",e),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),d.synthesize(e.prototype,"id"),d.synthesize(e.prototype,"then"),d.synthesize(e.prototype,"else"),d.synthesize(e.prototype,"earlyExit"),d.synthesize(e.prototype,"debug"),e.prototype.and=function(a){return this._query.push(a),this._state.push(!1),this},e.prototype.start=function(a){if(!this._started){var b=this;0!==arguments.length&&(this._satisfied=a),this._updateStates(),b._onChange=function(){b._updateStates()},this._dataSource.on("change",b._onChange),this._started=!0}return this},e.prototype._updateStates=function(){var a,b=!0;for(a=0;a<this._query.length&&(this._state[a]=this._dataSource.count(this._query[a])>0,this._debug&&console.log(this.logIdentifier()+" Evaluating",this._query[a],"=",this._query[a]),this._state[a]||(b=!1,!this._earlyExit));a++);this._satisfied!==b&&(b?this._then&&this._then():this._else&&this._else(),this._satisfied=b)},e.prototype.stop=function(){return this._started&&(this._dataSource.off("change",this._onChange),delete this._onChange,this._started=!1),this},e.prototype.drop=function(){return this.stop(),delete this._dataSource.when[this._id],this},d.finishModule("Condition"),b.exports=e},{"./Shared":29}],6:[function(a,b,c){"use strict";var d,e,f,g,h=[];d=a("./Shared"),g=a("./Overload");var i=function(a){this.init.apply(this,arguments)};i.prototype.init=function(a){this._db={},this._debug={},this._name=a||"ForerunnerDB",h.push(this)},i.prototype.instantiatedCount=function(){return h.length},i.prototype.instances=function(a){return void 0!==a?h[a]:h},i.prototype.namedInstances=function(a){var b,c;{if(void 0===a){for(c=[],b=0;b<h.length;b++)c.push(h[b].name);return c}for(b=0;b<h.length;b++)if(h[b].name===a)return h[b]}},i.prototype.moduleLoaded=new g({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b&&b()}},"array, function":function(a,b){var c,e;for(e=0;e<a.length;e++)if(c=a[e],void 0!==c){c=c.replace(/ /g,"");var f,g=c.split(",");for(f=0;f<g.length;f++)if(!d.modules[g[f]])return!1}b&&b()},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),i.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)?(b&&b(),!0):!1:d.version},i.moduleLoaded=i.prototype.moduleLoaded,i.version=i.prototype.version,i.instances=i.prototype.instances,i.instantiatedCount=i.prototype.instantiatedCount,i.shared=d,i.prototype.shared=d,d.addModule("Core",i),d.mixin(i.prototype,"Mixin.Common"),d.mixin(i.prototype,"Mixin.Constants"),e=a("./Db.js"),f=a("./Metrics.js"),d.synthesize(i.prototype,"name"),d.synthesize(i.prototype,"mongoEmulation"),i.prototype._isServer=!1,i.prototype.isClient=function(){return!this._isServer},i.prototype.isServer=function(){return this._isServer},i.prototype.collection=function(){throw"ForerunnerDB's instantiation has changed since version 1.3.36 to support multiple database instances. Please see the readme.md file for the minor change you have to make to get your project back up and running, or see the issue related to this change at https://github.com/Irrelon/ForerunnerDB/issues/44"},b.exports=i},{"./Db.js":7,"./Metrics.js":13,"./Overload":25,"./Shared":29}],7:[function(a,b,c){"use strict";var d,e,f,g,h,i;d=a("./Shared"),i=a("./Overload");var j=function(a,b){this.init.apply(this,arguments)};j.prototype.init=function(a,b){this.core(b),this._primaryKey="_id",this._name=a,this._collection={},this._debug={}},d.addModule("Db",j),j.prototype.moduleLoaded=new i({string:function(a){if(void 0!==a){a=a.replace(/ /g,"");var b,c=a.split(",");for(b=0;b<c.length;b++)if(!d.modules[c[b]])return!1;return!0}return!1},"string, function":function(a,b){if(void 0!==a){a=a.replace(/ /g,"");var c,e=a.split(",");for(c=0;c<e.length;c++)if(!d.modules[e[c]])return!1;b&&b()}},"string, function, function":function(a,b,c){if(void 0!==a){a=a.replace(/ /g,"");var e,f=a.split(",");for(e=0;e<f.length;e++)if(!d.modules[f[e]])return c(),!1;b()}}}),j.prototype.version=function(a,b){return void 0!==a?0===d.version.indexOf(a)?(b&&b(),!0):!1:d.version},j.moduleLoaded=j.prototype.moduleLoaded,j.version=j.prototype.version,j.shared=d,j.prototype.shared=d,d.addModule("Db",j),d.mixin(j.prototype,"Mixin.Common"),d.mixin(j.prototype,"Mixin.ChainReactor"),d.mixin(j.prototype,"Mixin.Constants"),d.mixin(j.prototype,"Mixin.Tags"),e=d.modules.Core,f=a("./Collection.js"),g=a("./Metrics.js"),h=a("./Checksum.js"),j.prototype._isServer=!1,d.synthesize(j.prototype,"core"),d.synthesize(j.prototype,"primaryKey"),d.synthesize(j.prototype,"state"),d.synthesize(j.prototype,"name"),d.synthesize(j.prototype,"mongoEmulation"),j.prototype.isClient=function(){return!this._isServer},j.prototype.isServer=function(){return this._isServer},j.prototype.Checksum=h,j.prototype.isClient=function(){return!this._isServer},j.prototype.isServer=function(){return this._isServer},j.prototype.arrayToCollection=function(a){return(new f).setData(a)},j.prototype.on=function(a,b){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||[],this._listeners[a].push(b),this},j.prototype.off=function(a,b){if(a in this._listeners){var c=this._listeners[a],d=c.indexOf(b);d>-1&&c.splice(d,1)}return this},j.prototype.emit=function(a,b){if(this._listeners=this._listeners||{},a in this._listeners){var c,d=this._listeners[a],e=d.length;for(c=0;e>c;c++)d[c].apply(this,Array.prototype.slice.call(arguments,1))}return this},j.prototype.peek=function(a){var b,c,d=[],e=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],d="string"===e?d.concat(c.peek(a)):d.concat(c.find(a)));return d},j.prototype.peek=function(a){var b,c,d=[],e=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],d="string"===e?d.concat(c.peek(a)):d.concat(c.find(a)));return d},j.prototype.peekCat=function(a){var b,c,d,e={},f=typeof a;for(b in this._collection)this._collection.hasOwnProperty(b)&&(c=this._collection[b],"string"===f?(d=c.peek(a),d&&d.length&&(e[c.name()]=d)):(d=c.find(a),d&&d.length&&(e[c.name()]=d)));return e},j.prototype.drop=new i({"":function(){if(!this.isDropped()){var a,b=this.collections(),c=b.length;for(this._state="dropped",a=0;c>a;a++)this.collection(b[a].name).drop(),delete this._collection[b[a].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},"function":function(a){if(!this.isDropped()){var b,c=this.collections(),d=c.length,e=0,f=function(){e++,e===d&&a&&a()};for(this._state="dropped",b=0;d>b;b++)this.collection(c[b].name).drop(f),delete this._collection[c[b].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},"boolean":function(a){if(!this.isDropped()){var b,c=this.collections(),d=c.length;for(this._state="dropped",b=0;d>b;b++)this.collection(c[b].name).drop(a),delete this._collection[c[b].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0},"boolean, function":function(a,b){if(!this.isDropped()){var c,d=this.collections(),e=d.length,f=0,g=function(){f++,f===e&&b&&b()};for(this._state="dropped",c=0;e>c;c++)this.collection(d[c].name).drop(a,g),delete this._collection[d[c].name];this.emit("drop",this),delete this._listeners,delete this._core._db[this._name]}return!0}}),e.prototype.db=function(a){return a instanceof j?a:(a||(a=this.objectId()),this._db[a]=this._db[a]||new j(a,this),this._db[a].mongoEmulation(this.mongoEmulation()),this._db[a])},e.prototype.databases=function(a){var b,c,d,e=[];a&&(a instanceof RegExp||(a=new RegExp(a)));for(d in this._db)this._db.hasOwnProperty(d)&&(c=!0,a&&(a.exec(d)||(c=!1)),c&&(b={name:d,children:[]},this.shared.moduleExists("Collection")&&b.children.push({module:"collection",moduleName:"Collections",count:this._db[d].collections().length}),this.shared.moduleExists("CollectionGroup")&&b.children.push({module:"collectionGroup",moduleName:"Collection Groups",count:this._db[d].collectionGroups().length}),this.shared.moduleExists("Document")&&b.children.push({module:"document",moduleName:"Documents",count:this._db[d].documents().length}),this.shared.moduleExists("Grid")&&b.children.push({module:"grid",moduleName:"Grids",count:this._db[d].grids().length}),this.shared.moduleExists("Overview")&&b.children.push({module:"overview",moduleName:"Overviews",count:this._db[d].overviews().length}),this.shared.moduleExists("View")&&b.children.push({module:"view",moduleName:"Views",count:this._db[d].views().length}),e.push(b)));return e.sort(function(a,b){return a.name.localeCompare(b.name)}),e},d.finishModule("Db"),b.exports=j},{"./Checksum.js":3,"./Collection.js":4,"./Metrics.js":13,"./Overload":25,"./Shared":29}],8:[function(a,b,c){"use strict";var d,e,f,g,h=Math.PI/180,i=180/Math.PI,j=6371;d=[16,8,4,2,1],e="0123456789bcdefghjkmnpqrstuvwxyz",f={right:{even:"bc01fg45238967deuvhjyznpkmstqrwx"},left:{even:"238967debc01fg45kmstqrwxuvhjyznp"},top:{even:"p0r21436x8zb9dcf5h7kjnmqesgutwvy"},bottom:{even:"14365h7k9dcfesgujnmqp0r2twvyx8zb"}},g={right:{even:"bcfguvyz"},left:{even:"0145hjnp"},top:{even:"prxz"},bottom:{even:"028b"}},f.bottom.odd=f.left.even,f.top.odd=f.right.even,f.left.odd=f.bottom.even,f.right.odd=f.top.even,g.bottom.odd=g.left.even,g.top.odd=g.right.even,g.left.odd=g.bottom.even,g.right.odd=g.top.even;var k=function(){};k.prototype.radians=function(a){return a*h},k.prototype.degrees=function(a){return a*i},k.prototype.refineInterval=function(a,b,c){b&c?a[0]=(a[0]+a[1])/2:a[1]=(a[0]+a[1])/2},k.prototype.calculateNeighbours=function(a,b){var c;return b&&"object"!==b.type?(c=[],c[4]=a,c[3]=this.calculateAdjacent(a,"left"),c[5]=this.calculateAdjacent(a,"right"),c[1]=this.calculateAdjacent(a,"top"),c[7]=this.calculateAdjacent(a,"bottom"),c[0]=this.calculateAdjacent(c[3],"top"),c[2]=this.calculateAdjacent(c[5],"top"),c[6]=this.calculateAdjacent(c[3],"bottom"),c[8]=this.calculateAdjacent(c[5],"bottom")):(c={center:a,left:this.calculateAdjacent(a,"left"),right:this.calculateAdjacent(a,"right"),top:this.calculateAdjacent(a,"top"),bottom:this.calculateAdjacent(a,"bottom")},c.topLeft=this.calculateAdjacent(c.left,"top"),c.topRight=this.calculateAdjacent(c.right,"top"),c.bottomLeft=this.calculateAdjacent(c.left,"bottom"),c.bottomRight=this.calculateAdjacent(c.right,"bottom")),c},k.prototype.calculateLatLngByDistanceBearing=function(a,b,c){var d=a[1],e=a[0],f=Math.asin(Math.sin(this.radians(e))*Math.cos(b/j)+Math.cos(this.radians(e))*Math.sin(b/j)*Math.cos(this.radians(c))),g=this.radians(d)+Math.atan2(Math.sin(this.radians(c))*Math.sin(b/j)*Math.cos(this.radians(e)),Math.cos(b/j)-Math.sin(this.radians(e))*Math.sin(f)),h=(g+3*Math.PI)%(2*Math.PI)-Math.PI;return{lat:this.degrees(f),lng:this.degrees(h)}},k.prototype.calculateExtentByRadius=function(a,b){var c,d,e,f,g=[],h=[];return e=this.calculateLatLngByDistanceBearing(a,b,0),d=this.calculateLatLngByDistanceBearing(a,b,90),f=this.calculateLatLngByDistanceBearing(a,b,180),c=this.calculateLatLngByDistanceBearing(a,b,270),g[0]=e.lat,g[1]=f.lat,h[0]=c.lng,h[1]=d.lng,{lat:g,lng:h}},k.prototype.calculateHashArrayByRadius=function(a,b,c){var d,e,f,g=this.calculateExtentByRadius(a,b),h=[g.lat[0],g.lng[0]],i=[g.lat[0],g.lng[1]],j=[g.lat[1],g.lng[0]],k=this.encode(h[0],h[1],c),l=this.encode(i[0],i[1],c),m=this.encode(j[0],j[1],c),n=0,o=0,p=[];for(d=k,p.push(d);d!==l;)d=this.calculateAdjacent(d,"right"),n++,p.push(d);for(d=k;d!==m;)d=this.calculateAdjacent(d,"bottom"),o++;for(e=0;n>=e;e++)for(d=p[e],f=0;o>f;f++)d=this.calculateAdjacent(d,"bottom"),p.push(d);return p},k.prototype.calculateAdjacent=function(a,b){a=a.toLowerCase();var c=a.charAt(a.length-1),d=a.length%2?"odd":"even",h=a.substring(0,a.length-1);return-1!==g[b][d].indexOf(c)&&(h=this.calculateAdjacent(h,b)),h+e[f[b][d].indexOf(c)]},k.prototype.decode=function(a){var b,c,f,g,h,i,j,k=1,l=[],m=[];for(l[0]=-90,l[1]=90,m[0]=-180,m[1]=180,i=90,j=180,b=0;b<a.length;b++)for(c=a[b],f=e.indexOf(c),g=0;5>g;g++)h=d[g],k?(j/=2,this.refineInterval(m,f,h)):(i/=2,this.refineInterval(l,f,h)),k=!k;return l[2]=(l[0]+l[1])/2,m[2]=(m[0]+m[1])/2,{lat:l,lng:m}},k.prototype.encode=function(a,b,c){var f,g=1,h=[],i=[],j=0,k=0,l="";for(c||(c=12),h[0]=-90,h[1]=90,i[0]=-180,i[1]=180;l.length<c;)g?(f=(i[0]+i[1])/2,b>f?(k|=d[j],i[0]=f):i[1]=f):(f=(h[0]+h[1])/2,a>f?(k|=d[j],h[0]=f):h[1]=f),g=!g,4>j?j++:(l+=e[k],j=0,k=0);return l},"undefined"!=typeof b&&(b.exports=k)},{}],9:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=a("./BinaryTree"),g=a("./GeoHash"),h=new e,i=new g,j=[5e3,1250,156,39.1,4.89,1.22,.153,.0382,.00477,.00119,149e-6,372e-7],k=function(){this.init.apply(this,arguments)};k.prototype.init=function(a,b,c){this._btree=new f,this._btree.index(a),this._size=0,this._id=this._itemKeyHash(a,a),this._debug=b&&b.debug?b.debug:!1,this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&(this.collection(c),this._btree.primaryKey(c.primaryKey())),this.name(b&&b.name?b.name:this._id),this._btree.debug(this._debug)},d.addModule("Index2d",k),d.mixin(k.prototype,"Mixin.Common"),d.mixin(k.prototype,"Mixin.ChainReactor"),d.mixin(k.prototype,"Mixin.Sorting"),k.prototype.id=function(){return this._id},k.prototype.state=function(){return this._state},k.prototype.size=function(){return this._size},d.synthesize(k.prototype,"data"),d.synthesize(k.prototype,"name"),d.synthesize(k.prototype,"collection"),d.synthesize(k.prototype,"type"),d.synthesize(k.prototype,"unique"),k.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=h.parse(this._keys).length,this):this._keys},k.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._btree.clear(),this._size=0,this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},k.prototype.insert=function(a,b){var c,d=this._unique;a=this.decouple(a),d&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a);var e,f,g,j,k,l=this._btree.keys();for(k=0;k<l.length;k++)e=h.get(a,l[k].path),e instanceof Array&&(g=e[0],j=e[1],f=i.encode(g,j),h.set(a,l[k].path,f));return this._btree.insert(a)?(this._size++,!0):!1},k.prototype.remove=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),this._btree.remove(a)?(this._size--,!0):!1},k.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},k.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},k.prototype.lookup=function(a,b,c){var d,e,f,g,i=this._btree.keys();for(g=0;g<i.length;g++)if(d=i[g].path,e=h.get(a,d),"object"==typeof e)return e.$near&&(f=[],f=f.concat(this.near(d,e.$near,b,c))),e.$geoWithin&&(f=[],f=f.concat(this.geoWithin(d,e.$geoWithin,b,c))),f;return this._btree.lookup(a,b)},k.prototype.near=function(a,b,c,d){var e,f,g,k,l,m,n,o,p,q,r,s,t=this,u=[],v=this._collection.primaryKey();if("km"===b.$distanceUnits){for(o=b.$maxDistance,s=0;s<j.length;s++)if(o>j[s]){n=s+1;break}}else if("miles"===b.$distanceUnits)for(o=1.60934*b.$maxDistance,s=0;s<j.length;s++)if(o>j[s]){n=s+1;break}for(0===n&&(n=1),d&&d.time("index2d.calculateHashArea"),e=i.calculateHashArrayByRadius(b.$point,o,n),d&&d.time("index2d.calculateHashArea"),d&&(d.data("index2d.near.precision",n),d.data("index2d.near.hashArea",e),d.data("index2d.near.maxDistanceKm",o),d.data("index2d.near.centerPointCoords",[b.$point[0],b.$point[1]])),m=[],f=0,k={},g=[],d&&d.time("index2d.near.getDocsInsideHashArea"),s=0;s<e.length;s++)l=this._btree.startsWith(a,e[s]),k[e[s]]=l,f+=l._visitedCount,g=g.concat(l._visitedNodes),m=m.concat(l);if(d&&(d.time("index2d.near.getDocsInsideHashArea"),d.data("index2d.near.startsWith",k),d.data("index2d.near.visitedTreeNodes",g)),d&&d.time("index2d.near.lookupDocsById"),m=this._collection._primaryIndex.lookup(m),d&&d.time("index2d.near.lookupDocsById"),b.$distanceField&&(m=this.decouple(m)),m.length){for(p={},d&&d.time("index2d.near.calculateDistanceFromCenter"),s=0;s<m.length;s++)r=h.get(m[s],a),q=p[m[s][v]]=this.distanceBetweenPoints(b.$point[0],b.$point[1],r[0],r[1]),o>=q&&(b.$distanceField&&h.set(m[s],b.$distanceField,"km"===b.$distanceUnits?q:Math.round(.621371*q)),b.$geoHashField&&h.set(m[s],b.$geoHashField,i.encode(r[0],r[1],n)),u.push(m[s]));d&&d.time("index2d.near.calculateDistanceFromCenter"),d&&d.time("index2d.near.sortResultsByDistance"),u.sort(function(a,b){return t.sortAsc(p[a[v]],p[b[v]])}),d&&d.time("index2d.near.sortResultsByDistance")}return u},k.prototype.geoWithin=function(a,b,c){return console.log("geoWithin() is currently a prototype method with no actual implementation... it just returns a blank array."),[]},k.prototype.distanceBetweenPoints=function(a,b,c,d){var e=6371,f=this.toRadians(a),g=this.toRadians(c),h=this.toRadians(c-a),i=this.toRadians(d-b),j=Math.sin(h/2)*Math.sin(h/2)+Math.cos(f)*Math.cos(g)*Math.sin(i/2)*Math.sin(i/2),k=2*Math.atan2(Math.sqrt(j),Math.sqrt(1-j));return e*k},k.prototype.toRadians=function(a){return.01747722222222*a},k.prototype.match=function(a,b){return this._btree.match(a,b)},k.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},k.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},k.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.index["2d"]=k,d.finishModule("Index2d"),b.exports=k},{"./BinaryTree":2,"./GeoHash":8,"./Path":26,"./Shared":29}],10:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=a("./BinaryTree"),g=function(){this.init.apply(this,arguments)};g.prototype.init=function(a,b,c){this._btree=new f,this._btree.index(a),this._size=0,this._id=this._itemKeyHash(a,a),this._debug=b&&b.debug?b.debug:!1,this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&(this.collection(c),this._btree.primaryKey(c.primaryKey())),this.name(b&&b.name?b.name:this._id),this._btree.debug(this._debug)},d.addModule("IndexBinaryTree",g),d.mixin(g.prototype,"Mixin.ChainReactor"),d.mixin(g.prototype,"Mixin.Sorting"),g.prototype.id=function(){return this._id},g.prototype.state=function(){return this._state},g.prototype.size=function(){return this._size},d.synthesize(g.prototype,"data"),d.synthesize(g.prototype,"name"),d.synthesize(g.prototype,"collection"),d.synthesize(g.prototype,"type"),d.synthesize(g.prototype,"unique"),g.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},g.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._btree.clear(),this._size=0,this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},g.prototype.insert=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),this._btree.insert(a)?(this._size++,!0):!1},g.prototype.remove=function(a,b){var c,d=this._unique;return d&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),this._btree.remove(a)?(this._size--,!0):!1},g.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},g.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},g.prototype.lookup=function(a,b,c){return this._btree.lookup(a,b,c)},g.prototype.match=function(a,b){return this._btree.match(a,b)},g.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},g.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},g.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f];return j},d.index.btree=g,d.finishModule("IndexBinaryTree"),b.exports=g},{"./BinaryTree":2,"./Path":26,"./Shared":29}],11:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(a,b,c){this._crossRef={},this._size=0,this._id=this._itemKeyHash(a,a),this.data({}),this.unique(b&&b.unique?b.unique:!1),void 0!==a&&this.keys(a),void 0!==c&&this.collection(c),this.name(b&&b.name?b.name:this._id)},d.addModule("IndexHashMap",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.id=function(){return this._id},f.prototype.state=function(){return this._state},f.prototype.size=function(){return this._size},d.synthesize(f.prototype,"data"),d.synthesize(f.prototype,"name"),d.synthesize(f.prototype,"collection"),d.synthesize(f.prototype,"type"),d.synthesize(f.prototype,"unique"),f.prototype.keys=function(a){return void 0!==a?(this._keys=a,this._keyCount=(new e).parse(this._keys).length,this):this._keys},f.prototype.rebuild=function(){if(this._collection){var a,b=this._collection.subset({},{$decouple:!1,$orderBy:this._keys}),c=b.find(),d=c.length;for(this._data={},this._size=0,this._unique&&(this._uniqueLookup={}),a=0;d>a;a++)this.insert(c[a])}this._state={name:this._name,keys:this._keys,indexSize:this._size,built:new Date,updated:new Date,ok:!0}},f.prototype.insert=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),this._uniqueLookup[c]=a),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pushToPathValue(d[e],a)},f.prototype.update=function(a,b){},f.prototype.remove=function(a,b){var c,d,e,f=this._unique;for(f&&(c=this._itemHash(a,this._keys),delete this._uniqueLookup[c]),d=this._itemHashArr(a,this._keys),e=0;e<d.length;e++)this.pullFromPathValue(d[e],a)},f.prototype.violation=function(a){var b=this._itemHash(a,this._keys);return Boolean(this._uniqueLookup[b])},f.prototype.hashViolation=function(a){return Boolean(this._uniqueLookup[a])},f.prototype.pushToPathValue=function(a,b){var c=this._data[a]=this._data[a]||[];-1===c.indexOf(b)&&(c.push(b),this._size++,this.pushToCrossRef(b,c))},f.prototype.pullFromPathValue=function(a,b){var c,d=this._data[a];c=d.indexOf(b),c>-1&&(d.splice(c,1),this._size--,this.pullFromCrossRef(b,d)),d.length||delete this._data[a]},f.prototype.pull=function(a){var b,c,d=a[this._collection.primaryKey()],e=this._crossRef[d],f=e.length;for(b=0;f>b;b++)c=e[b],this._pullFromArray(c,a);this._size--,delete this._crossRef[d]},f.prototype._pullFromArray=function(a,b){for(var c=a.length;c--;)a[c]===b&&a.splice(c,1)},f.prototype.pushToCrossRef=function(a,b){var c,d=a[this._collection.primaryKey()];this._crossRef[d]=this._crossRef[d]||[],c=this._crossRef[d],-1===c.indexOf(b)&&c.push(b)},f.prototype.pullFromCrossRef=function(a,b){var c=a[this._collection.primaryKey()];delete this._crossRef[c]},f.prototype.lookup=function(a){return this._data[this._itemHash(a,this._keys)]||[]},f.prototype.match=function(a,b){var c,d=new e,f=d.parseArr(this._keys),g=d.parseArr(a),h=[],i=0;for(c=0;c<f.length;c++){if(g[c]!==f[c])return{matchedKeys:[],totalKeyCount:g.length,score:0};i++,h.push(g[c])}return{matchedKeys:h,totalKeyCount:g.length,score:i}},f.prototype._itemHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.value(a,c[d].path).join(":");return g},f.prototype._itemKeyHash=function(a,b){var c,d,f=new e,g="";for(c=f.parse(b),d=0;d<c.length;d++)g&&(g+="_"),g+=f.keyValue(a,c[d].path);return g},f.prototype._itemHashArr=function(a,b){var c,d,f,g,h,i=new e,j=[];for(c=i.parse(b),g=0;g<c.length;g++)for(d=i.value(a,c[g].path),f=0;f<d.length;f++)if(0===g)j.push(d[f]);else for(h=0;h<j.length;h++)j[h]=j[h]+"_"+d[f]; return j},d.index.hashed=f,d.finishModule("IndexHashMap"),b.exports=f},{"./Path":26,"./Shared":29}],12:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){this.init.apply(this,arguments)};e.prototype.init=function(a){this._name=a,this._data={},this._primaryKey="_id"},d.addModule("KeyValueStore",e),d.mixin(e.prototype,"Mixin.ChainReactor"),d.synthesize(e.prototype,"name"),e.prototype.primaryKey=function(a){return void 0!==a?(this._primaryKey=a,this):this._primaryKey},e.prototype.truncate=function(){return this._data={},this},e.prototype.set=function(a,b){return this._data[a]=b?b:!0,this},e.prototype.get=function(a){return this._data[a]},e.prototype.lookup=function(a){var b,c,d,e=this._primaryKey,f=typeof a,g=[];if("string"===f||"number"===f)return d=this.get(a),void 0!==d?[d]:[];if("object"===f){if(a instanceof Array){for(c=a.length,g=[],b=0;c>b;b++)d=this.lookup(a[b]),d&&(d instanceof Array?g=g.concat(d):g.push(d));return g}if(void 0!==a[e]&&null!==a[e])return this.lookup(a[e])}},e.prototype.unSet=function(a){return delete this._data[a],this},e.prototype.uniqueSet=function(a,b){return void 0===this._data[a]?(this._data[a]=b,!0):!1},d.finishModule("KeyValueStore"),b.exports=e},{"./Shared":29}],13:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Operation"),f=function(){this.init.apply(this,arguments)};f.prototype.init=function(){this._data=[]},d.addModule("Metrics",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.create=function(a){var b=new e(a);return this._enabled&&this._data.push(b),b},f.prototype.start=function(){return this._enabled=!0,this},f.prototype.stop=function(){return this._enabled=!1,this},f.prototype.clear=function(){return this._data=[],this},f.prototype.list=function(){return this._data},d.finishModule("Metrics"),b.exports=f},{"./Operation":24,"./Shared":29}],14:[function(a,b,c){"use strict";var d={preSetData:function(){},postSetData:function(){}};b.exports=d},{}],15:[function(a,b,c){"use strict";var d={chain:function(a){this.debug&&this.debug()&&(a._reactorIn&&a._reactorOut?console.log(a._reactorIn.logIdentifier()+' Adding target "'+a._reactorOut.instanceIdentifier()+'" to the chain reactor target list'):console.log(this.logIdentifier()+' Adding target "'+a.instanceIdentifier()+'" to the chain reactor target list')),this._chain=this._chain||[];var b=this._chain.indexOf(a);-1===b&&this._chain.push(a)},unChain:function(a){if(this.debug&&this.debug()&&(a._reactorIn&&a._reactorOut?console.log(a._reactorIn.logIdentifier()+' Removing target "'+a._reactorOut.instanceIdentifier()+'" from the chain reactor target list'):console.log(this.logIdentifier()+' Removing target "'+a.instanceIdentifier()+'" from the chain reactor target list')),this._chain){var b=this._chain.indexOf(a);b>-1&&this._chain.splice(b,1)}},chainEnabled:function(a){return void 0!==a?(this._chainDisabled=!a,this):!this._chainDisabled},chainWillSend:function(){return Boolean(this._chain&&!this._chainDisabled)},chainSend:function(a,b,c){if(this._chain&&!this._chainDisabled){var d,e,f=this._chain,g=f.length,h=this.decouple(b,g);for(e=0;g>e;e++){if(d=f[e],d._state&&(!d._state||d.isDropped()))throw console.log("Reactor Data:",a,b,c),console.log("Reactor Node:",d),"Chain reactor attempting to send data to target reactor node that is in a dropped state!";this.debug&&this.debug()&&(d._reactorIn&&d._reactorOut?console.log(d._reactorIn.logIdentifier()+' Sending data down the chain reactor pipe to "'+d._reactorOut.instanceIdentifier()+'"'):console.log(this.logIdentifier()+' Sending data down the chain reactor pipe to "'+d.instanceIdentifier()+'"')),d.chainReceive&&d.chainReceive(this,a,h[e],c)}}},chainReceive:function(a,b,c,d){var e={sender:a,type:b,data:c,options:d},f=!1;this.debug&&this.debug()&&console.log(this.logIdentifier()+" Received data from parent reactor node"),this._chainHandler&&(f=this._chainHandler(e)),f||this.chainSend(e.type,e.data,e.options)}};b.exports=d},{}],16:[function(a,b,c){"use strict";var d,e=0,f=a("./Overload"),g=a("./Serialiser"),h=new g;d={serialiser:h,make:function(a){return h.convert(a)},store:function(a,b){if(void 0!==a){if(void 0!==b)return this._store=this._store||{},this._store[a]=b,this;if(this._store)return this._store[a]}},unStore:function(a){return void 0!==a&&delete this._store[a],this},decouple:function(a,b){if(void 0!==a&&""!==a){if(b){var c,d=this.jStringify(a),e=[];for(c=0;b>c;c++)e.push(this.jParse(d));return e}return this.jParse(this.jStringify(a))}},jParse:function(a){return JSON.parse(a,h.reviver())},jStringify:function(a){return JSON.stringify(a)},objectId:function(a){var b,c=Math.pow(10,17);if(a){var d,f=0,g=a.length;for(d=0;g>d;d++)f+=a.charCodeAt(d)*c;b=f.toString(16)}else e++,b=(e+(Math.random()*c+Math.random()*c+Math.random()*c+Math.random()*c)).toString(16);return b},hash:function(a){return JSON.stringify(a)},debug:new f([function(){return this._debug&&this._debug.all},function(a){return void 0!==a?"boolean"==typeof a?(this._debug=this._debug||{},this._debug.all=a,this.chainSend("debug",this._debug),this):this._debug&&this._debug[a]||this._db&&this._db._debug&&this._db._debug[a]||this._debug&&this._debug.all:this._debug&&this._debug.all},function(a,b){return void 0!==a?void 0!==b?(this._debug=this._debug||{},this._debug[a]=b,this.chainSend("debug",this._debug),this):this._debug&&this._debug[b]||this._db&&this._db._debug&&this._db._debug[a]:this._debug&&this._debug.all}]),classIdentifier:function(){return"ForerunnerDB."+this.className},instanceIdentifier:function(){return"["+this.className+"]"+this.name()},logIdentifier:function(){return"ForerunnerDB "+this.instanceIdentifier()},convertToFdb:function(a){var b,c,d,e;for(e in a)if(a.hasOwnProperty(e)&&(d=a,e.indexOf(".")>-1)){for(e=e.replace(".$","[|$|]"),c=e.split(".");b=c.shift();)b=b.replace("[|$|]",".$"),c.length?d[b]={}:d[b]=a[e],d=d[b];delete a[e]}},isDropped:function(){return"dropped"===this._state},debounce:function(a,b,c){var d,e=this;e._debounce=e._debounce||{},e._debounce[a]&&clearTimeout(e._debounce[a].timeout),d={callback:b,timeout:setTimeout(function(){delete e._debounce[a],b()},c)},e._debounce[a]=d}},b.exports=d},{"./Overload":25,"./Serialiser":28}],17:[function(a,b,c){"use strict";var d={TYPE_INSERT:0,TYPE_UPDATE:1,TYPE_REMOVE:2,PHASE_BEFORE:0,PHASE_AFTER:1};b.exports=d},{}],18:[function(a,b,c){"use strict";var d=a("./Overload"),e={on:new d({"string, function":function(a,b){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a]["*"]=this._listeners[a]["*"]||[],this._listeners[a]["*"].push(b),this},"string, *, function":function(a,b,c){return this._listeners=this._listeners||{},this._listeners[a]=this._listeners[a]||{},this._listeners[a][b]=this._listeners[a][b]||[],this._listeners[a][b].push(c),this}}),once:new d({"string, function":function(a,b){var c=this,d=!1,e=function(){d||(c.off(a,e),b.apply(c,arguments),d=!0)};return this.on(a,e)},"string, *, function":function(a,b,c){var d=this,e=!1,f=function(){e||(d.off(a,b,f),c.apply(d,arguments),e=!0)};return this.on(a,b,f)}}),off:new d({string:function(a){var b=this;return this._emitting?(this._eventRemovalQueue=this._eventRemovalQueue||[],this._eventRemovalQueue.push(function(){b.off(a)})):this._listeners&&this._listeners[a]&&a in this._listeners&&delete this._listeners[a],this},"string, function":function(a,b){var c,d,e=this;return this._emitting?(this._eventRemovalQueue=this._eventRemovalQueue||[],this._eventRemovalQueue.push(function(){e.off(a,b)})):"string"==typeof b?this._listeners&&this._listeners[a]&&this._listeners[a][b]&&delete this._listeners[a][b]:this._listeners&&a in this._listeners&&(c=this._listeners[a]["*"],d=c.indexOf(b),d>-1&&c.splice(d,1)),this},"string, *, function":function(a,b,c){var d=this;if(this._emitting)this._eventRemovalQueue=this._eventRemovalQueue||[],this._eventRemovalQueue.push(function(){d.off(a,b,c)});else if(this._listeners&&a in this._listeners&&b in this.listeners[a]){var e=this._listeners[a][b],f=e.indexOf(c);f>-1&&e.splice(f,1)}},"string, *":function(a,b){var c=this;this._emitting?(this._eventRemovalQueue=this._eventRemovalQueue||[],this._eventRemovalQueue.push(function(){c.off(a,b)})):this._listeners&&a in this._listeners&&b in this._listeners[a]&&delete this._listeners[a][b]}}),emit:function(a,b){if(this._listeners=this._listeners||{},this._emitting=!0,a in this._listeners){var c,d,e,f,g,h,i;if(this._listeners[a]["*"])for(f=this._listeners[a]["*"],d=f.length,c=0;d>c;c++)e=f[c],"function"==typeof e&&e.apply(this,Array.prototype.slice.call(arguments,1));if(b instanceof Array&&b[0]&&b[0][this._primaryKey])for(g=this._listeners[a],d=b.length,c=0;d>c;c++)if(g[b[c][this._primaryKey]])for(h=g[b[c][this._primaryKey]].length,i=0;h>i;i++)e=g[b[c][this._primaryKey]][i],"function"==typeof e&&g[b[c][this._primaryKey]][i].apply(this,Array.prototype.slice.call(arguments,1))}return this._emitting=!1,this._processRemovalQueue(),this},_processRemovalQueue:function(){var a;if(this._eventRemovalQueue&&this._eventRemovalQueue.length){for(a=0;a<this._eventRemovalQueue.length;a++)this._eventRemovalQueue[a]();this._eventRemovalQueue=[]}},deferEmit:function(a,b){var c,d=this;return this._noEmitDefer||this._db&&(!this._db||this._db._noEmitDefer)?this.emit.apply(this,arguments):(c=arguments,this._deferTimeout=this._deferTimeout||{},this._deferTimeout[a]&&clearTimeout(this._deferTimeout[a]),this._deferTimeout[a]=setTimeout(function(){d.debug()&&console.log(d.logIdentifier()+" Emitting "+c[0]),d.emit.apply(d,c)},1)),this}};b.exports=e},{"./Overload":25}],19:[function(a,b,c){"use strict";var d={_match:function(a,b,c,d,e){var f,g,h,i,j,k,l=d,m=typeof a,n=typeof b,o=!0;if("object"===m&&null===a&&(m="null"),"object"===n&&null===b&&(n="null"),e=e||{},c=c||{},e.$rootQuery||(e.$rootQuery=b),e.$rootSource||(e.$rootSource=a),e.$currentQuery=b,e.$rootData=e.$rootData||{},"string"!==m&&"number"!==m&&"null"!==m||"string"!==n&&"number"!==n&&"null"!==n){if(("string"===m||"number"===m)&&"object"===n&&b instanceof RegExp)b.test(a)||(o=!1);else for(k in b)if(b.hasOwnProperty(k)){if(e.$previousQuery=e.$parent,e.$parent={query:b[k],key:k,parent:e.$previousQuery},f=!1,j=k.substr(0,2),"//"===j)continue;if(0===j.indexOf("$")&&(i=this._matchOp(k,a,b[k],c,e),i>-1)){if(i){if("or"===d)return!0}else o=i;f=!0}if(!f&&b[k]instanceof RegExp)if(f=!0,"object"===m&&void 0!==a[k]&&b[k].test(a[k])){if("or"===d)return!0}else o=!1;if(!f)if("object"==typeof b[k])if(void 0!==a[k])if(a[k]instanceof Array&&!(b[k]instanceof Array)){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else if(!(a[k]instanceof Array)&&b[k]instanceof Array){for(g=!1,h=0;h<b[k].length&&!(g=this._match(a[k],b[k][h],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else if("object"==typeof a)if(g=this._match(a[k],b[k],c,l,e)){if("or"===d)return!0}else o=!1;else if(g=this._match(void 0,b[k],c,l,e)){if("or"===d)return!0}else o=!1;else if(b[k]&&void 0!==b[k].$exists)if(g=this._match(void 0,b[k],c,l,e)){if("or"===d)return!0}else o=!1;else o=!1;else if(a&&a[k]===b[k]){if("or"===d)return!0}else if(a&&a[k]&&a[k]instanceof Array&&b[k]&&"object"!=typeof b[k]){for(g=!1,h=0;h<a[k].length&&!(g=this._match(a[k][h],b[k],c,l,e));h++);if(g){if("or"===d)return!0}else o=!1}else o=!1;if("and"===d&&!o)return!1}}else"number"===m||"null"===m||"null"===n?a!==b&&(o=!1):a.localeCompare(b)&&(o=!1);return o},_matchOp:function(a,b,c,d,e){switch(a){case"$gt":return b>c;case"$gte":return b>=c;case"$lt":return c>b;case"$lte":return c>=b;case"$exists":return void 0===b!==c;case"$eq":return b==c;case"$eeq":return b===c;case"$ne":return b!=c;case"$nee":return b!==c;case"$or":for(var f=0;f<c.length;f++)if(this._match(b,c[f],d,"and",e))return!0;return!1;case"$and":for(var g=0;g<c.length;g++)if(!this._match(b,c[g],d,"and",e))return!1;return!0;case"$in":if(c instanceof Array){var h,i=c,j=i.length;for(h=0;j>h;h++)if(this._match(b,i[h],d,"and",e))return!0;return!1}return"object"==typeof c?this._match(b,c,d,"and",e):(console.log(this.logIdentifier()+" Cannot use an $in operator on a non-array key: "+a,e.$rootQuery),!1);case"$nin":if(c instanceof Array){var k,l=c,m=l.length;for(k=0;m>k;k++)if(this._match(b,l[k],d,"and",e))return!1;return!0}return"object"==typeof c?this._match(b,c,d,"and",e):(console.log(this.logIdentifier()+" Cannot use a $nin operator on a non-array key: "+a,e.$rootQuery),!1);case"$fastIn":return c instanceof Array?-1!==c.indexOf(b):(console.log(this.logIdentifier()+" Cannot use an $fastIn operator on a non-array key: "+a,e.$rootQuery),!1);case"$distinct":e.$rootData["//distinctLookup"]=e.$rootData["//distinctLookup"]||{};for(var n in c)if(c.hasOwnProperty(n))return e.$rootData["//distinctLookup"][n]=e.$rootData["//distinctLookup"][n]||{},e.$rootData["//distinctLookup"][n][b[n]]?!1:(e.$rootData["//distinctLookup"][n][b[n]]=!0,!0);break;case"$count":var o,p,q;for(o in c)if(c.hasOwnProperty(o)&&(p=b[o],q="object"==typeof p&&p instanceof Array?p.length:0,!this._match(q,c[o],d,"and",e)))return!1;return!0;case"$find":case"$findOne":case"$findSub":var r,s,t,u,v,w,x="collection",y={};if(!c.$from)throw a+" missing $from property!";if(c.$fromType&&(x=c.$fromType,!this.db()[x]||"function"!=typeof this.db()[x]))throw a+' cannot operate against $fromType "'+x+'" because the database does not recognise this type of object!';if(r=c.$query||{},s=c.$options||{},"$findSub"===a){if(!c.$path)throw a+" missing $path property!";if(v=c.$path,t=c.$subQuery||{},u=c.$subOptions||{},!(e.$parent&&e.$parent.parent&&e.$parent.parent.key))return this._match(b,r,{},"and",e)&&(w=this._findSub([b],v,t,u)),w&&w.length>0;w=this.db()[x](c.$from).findSub(r,v,t,u)}else w=this.db()[x](c.$from)[a.substr(1)](r,s);return y[e.$parent.parent.key]=w,this._match(b,y,d,"and",e)}return-1},applyJoin:function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=this,y=[];for(a instanceof Array||(a=[a]),e=0;e<b.length;e++)for(f in b[e])if(b[e].hasOwnProperty(f))for(g=b[e][f],h=g.$sourceType||"collection",i="$"+h+"."+f,j=f,c[i]?k=c[i]:this._db[h]&&"function"==typeof this._db[h]&&(k=this._db[h](f)),l=0;l<a.length;l++){m={},n=!1,o=!1,p="";for(q in g)if(g.hasOwnProperty(q))if(r=g[q],"$"===q.substr(0,1))switch(q){case"$where":if(!r.$query&&!r.$options)throw'$join $where clause requires "$query" and / or "$options" keys to work!';r.$query&&(m=x.resolveDynamicQuery(r.$query,a[l])),r.$options&&(s=r.$options);break;case"$as":j=r;break;case"$multi":n=r;break;case"$require":o=r;break;case"$prefix":p=r}else m[q]=x.resolveDynamicQuery(r,a[l]);if(t=k.find(m,s),!o||o&&t[0])if("$root"===j){if(n!==!1)throw this.logIdentifier()+' Cannot combine [$as: "$root"] with [$multi: true] in $join clause!';u=t[0],v=a[l];for(w in u)u.hasOwnProperty(w)&&void 0===v[p+w]&&(v[p+w]=u[w])}else a[l][j]=n===!1?t[0]:t;else y.push(l)}return y},resolveDynamicQuery:function(a,b){var c,d,e,f,g,h=this;if("string"==typeof a)return f="$$."===a.substr(0,3)?this.sharedPathSolver.value(b,a.substr(3,a.length-3)):this.sharedPathSolver.value(b,a),f.length>1?{$in:f}:f[0];c={};for(g in a)if(a.hasOwnProperty(g))switch(d=typeof a[g],e=a[g],d){case"string":"$$."===e.substr(0,3)?c[g]=this.sharedPathSolver.value(b,e.substr(3,e.length-3))[0]:c[g]=e;break;case"object":c[g]=h.resolveDynamicQuery(e,b);break;default:c[g]=e}return c},spliceArrayByIndexList:function(a,b){var c;for(c=b.length-1;c>=0;c--)a.splice(b[c],1)}};b.exports=d},{}],20:[function(a,b,c){"use strict";var d={sortAsc:function(a,b){return"string"==typeof a&&"string"==typeof b?a.localeCompare(b):a>b?1:b>a?-1:0},sortDesc:function(a,b){return"string"==typeof a&&"string"==typeof b?b.localeCompare(a):a>b?-1:b>a?1:0}};b.exports=d},{}],21:[function(a,b,c){"use strict";var d,e={};d={tagAdd:function(a){var b,c=this,d=e[a]=e[a]||[];for(b=0;b<d.length;b++)if(d[b]===c)return!0;return d.push(c),c.on&&c.on("drop",function(){c.tagRemove(a)}),!0},tagRemove:function(a){var b,c=e[a];if(c)for(b=0;b<c.length;b++)if(c[b]===this)return c.splice(b,1),!0;return!1},tagLookup:function(a){return e[a]||[]},tagDrop:function(a,b){var c,d,e,f=this.tagLookup(a);if(c=function(){d--,b&&0===d&&b(!1)},f.length)for(d=f.length,e=f.length-1;e>=0;e--)f[e].drop(c);return!0}},b.exports=d},{}],22:[function(a,b,c){"use strict";var d=a("./Overload"),e={addTrigger:function(a,b,c,d){var e,f=this;return e=f._triggerIndexOf(a,b,c),-1===e?(f.triggerStack={},f._trigger=f._trigger||{},f._trigger[b]=f._trigger[b]||{},f._trigger[b][c]=f._trigger[b][c]||[],f._trigger[b][c].push({id:a,method:d,enabled:!0}),!0):!1},removeTrigger:function(a,b,c){var d,e=this;return d=e._triggerIndexOf(a,b,c),d>-1&&e._trigger[b][c].splice(d,1),!1},ignoreTriggers:function(a){return void 0!==a?(this._ignoreTriggers=a,this):this._ignoreTriggers},addLinkIO:function(a,b){var c,d,e,f,g,h,i,j,k,l=this;if(l._linkIO=l._linkIO||{},l._linkIO[a]=b,d=b["export"],e=b["import"],d&&(h=l.db().collection(d.to)),e&&(i=l.db().collection(e.from)),j=[l.TYPE_INSERT,l.TYPE_UPDATE,l.TYPE_REMOVE],c=function(a,b){b(!1,!0)},d&&(d.match||(d.match=c),d.types||(d.types=j),f=function(a,b,c){d.match(c,function(b,e){!b&&e&&d.data(c,a.type,function(b,c,d){!b&&c&&(h.ignoreTriggers(!0),"remove"!==a.type?h.upsert(c,d):h.remove(c,d),h.ignoreTriggers(!1))})})}),e&&(e.match||(e.match=c),e.types||(e.types=j),g=function(a,b,c){e.match(c,function(b,d){!b&&d&&e.data(c,a.type,function(b,c,d){!b&&c&&(h.ignoreTriggers(!0),"remove"!==a.type?l.upsert(c,d):l.remove(c,d),h.ignoreTriggers(!1))})})}),d)for(k=0;k<d.types.length;k++)l.addTrigger(a+"export"+d.types[k],d.types[k],l.PHASE_AFTER,f);if(e)for(k=0;k<e.types.length;k++)i.addTrigger(a+"import"+e.types[k],e.types[k],l.PHASE_AFTER,g)},removeLinkIO:function(a){var b,c,d,e,f=this,g=f._linkIO[a];if(g){if(b=g["export"],c=g["import"],b)for(e=0;e<b.types.length;e++)f.removeTrigger(a+"export"+b.types[e],b.types[e],f.db.PHASE_AFTER);if(c)for(d=f.db().collection(c.from),e=0;e<c.types.length;e++)d.removeTrigger(a+"import"+c.types[e],c.types[e],f.db.PHASE_AFTER);return delete f._linkIO[a],!0}return!1},enableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!0,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!0,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!0,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1?(d._trigger[b][c][e].enabled=!0,!0):!1}}),disableTrigger:new d({string:function(a){var b,c,d,e,f,g=this,h=g._trigger,i=!1;if(h)for(f in h)if(h.hasOwnProperty(f)&&(b=h[f]))for(d in b)if(b.hasOwnProperty(d))for(c=b[d],e=0;e<c.length;e++)c[e].id===a&&(c[e].enabled=!1,i=!0);return i},number:function(a){var b,c,d,e=this,f=e._trigger[a],g=!1;if(f)for(c in f)if(f.hasOwnProperty(c))for(b=f[c],d=0;d<b.length;d++)b[d].enabled=!1,g=!0;return g},"number, number":function(a,b){var c,d,e=this,f=e._trigger[a],g=!1;if(f&&(c=f[b]))for(d=0;d<c.length;d++)c[d].enabled=!1,g=!0;return g},"string, number, number":function(a,b,c){var d=this,e=d._triggerIndexOf(a,b,c);return e>-1?(d._trigger[b][c][e].enabled=!1,!0):!1}}),willTrigger:function(a,b){if(!this._ignoreTriggers&&this._trigger&&this._trigger[a]&&this._trigger[a][b]&&this._trigger[a][b].length){var c,d=this._trigger[a][b];for(c=0;c<d.length;c++)if(d[c].enabled)return!0}return!1},processTrigger:function(a,b,c,d,e){var f,g,h,i,j,k,l,m=this;if(!m._ignoreTriggers&&m._trigger&&m._trigger[b]&&m._trigger[b][c]){for(f=m._trigger[b][c],h=f.length,g=0;h>g;g++)if(i=f[g],i.enabled){if(m.debug()){switch(b){case this.TYPE_INSERT:k="insert";break;case this.TYPE_UPDATE:k="update";break;case this.TYPE_REMOVE:k="remove";break;default:k=""}switch(c){case this.PHASE_BEFORE:l="before";break;case this.PHASE_AFTER:l="after";break;default:l=""}console.log('Triggers: Processing trigger "'+i.id+'" for '+k+' in phase "'+l+'"')}if(m.triggerStack&&m.triggerStack[b]&&m.triggerStack[b][c]&&m.triggerStack[b][c][i.id]){m.debug()&&console.log('Triggers: Will not run trigger "'+i.id+'" for '+k+' in phase "'+l+'" as it is already in the stack!');continue}if(m.triggerStack=m.triggerStack||{},m.triggerStack[b]={},m.triggerStack[b][c]={},m.triggerStack[b][c][i.id]=!0,j=i.method.call(m,a,d,e),m.triggerStack=m.triggerStack||{},m.triggerStack[b]={},m.triggerStack[b][c]={},m.triggerStack[b][c][i.id]=!1,j===!1)return!1;if(void 0!==j&&j!==!0&&j!==!1)throw"ForerunnerDB.Mixin.Triggers: Trigger error: "+j}return!0}},_triggerIndexOf:function(a,b,c){var d,e,f,g=this;if(g._trigger&&g._trigger[b]&&g._trigger[b][c])for(d=g._trigger[b][c],e=d.length,f=0;e>f;f++)if(d[f].id===a)return f;return-1}};b.exports=e},{"./Overload":25}],23:[function(a,b,c){"use strict";var d={_updateProperty:function(a,b,c){a[b]=c,this.debug()&&console.log(this.logIdentifier()+' Setting non-data-bound document property "'+b+'" to val "'+c+'"')},_updateIncrement:function(a,b,c){a[b]+=c},_updateSpliceMove:function(a,b,c){a.splice(c,0,a.splice(b,1)[0]),this.debug()&&console.log(this.logIdentifier()+' Moving non-data-bound document array index from "'+b+'" to "'+c+'"')},_updateSplicePush:function(a,b,c){a.length>b?a.splice(b,0,c):a.push(c)},_updatePush:function(a,b){a.push(b)},_updatePull:function(a,b){a.splice(b,1)},_updateMultiply:function(a,b,c){a[b]*=c},_updateRename:function(a,b,c){a[c]=a[b],delete a[b]},_updateOverwrite:function(a,b,c){a[b]=c},_updateUnset:function(a,b){delete a[b]},_updateClear:function(a,b){var c,d=a[b];if(d&&"object"==typeof d)for(c in d)d.hasOwnProperty(c)&&this._updateUnset(d,c)},_updatePop:function(a,b){var c,d=!1;if(a.length>0)if(b>0){for(c=0;b>c;c++)a.pop();d=!0}else if(0>b){for(c=0;c>b;c--)a.shift();d=!0}return d}};b.exports=d},{}],24:[function(a,b,c){"use strict";var d=a("./Shared"),e=a("./Path"),f=function(a){this.pathSolver=new e,this.counter=0,this.init.apply(this,arguments)};f.prototype.init=function(a){this._data={operation:a,index:{potential:[],used:!1},steps:[],time:{startMs:0,stopMs:0,totalMs:0,process:{}},flag:{},log:[]}},d.addModule("Operation",f),d.mixin(f.prototype,"Mixin.ChainReactor"),f.prototype.start=function(){this._data.time.startMs=(new Date).getTime()},f.prototype.log=function(a){if(a){var b=this._log.length>0?this._data.log[this._data.log.length-1].time:0,c={event:a,time:(new Date).getTime(),delta:0};return this._data.log.push(c),b&&(c.delta=c.time-b),this}return this._data.log},f.prototype.time=function(a){if(void 0!==a){var b=this._data.time.process,c=b[a]=b[a]||{};return c.startMs?(c.stopMs=(new Date).getTime(),c.totalMs=c.stopMs-c.startMs,c.stepObj.totalMs=c.totalMs,delete c.stepObj):(c.startMs=(new Date).getTime(),c.stepObj={name:a},this._data.steps.push(c.stepObj)),this}return this._data.time},f.prototype.flag=function(a,b){return void 0===a||void 0===b?void 0!==a?this._data.flag[a]:this._data.flag:void(this._data.flag[a]=b)},f.prototype.data=function(a,b,c){return void 0!==b?(this.pathSolver.set(this._data,a,b),this):this.pathSolver.get(this._data,a)},f.prototype.pushData=function(a,b,c){this.pathSolver.push(this._data,a,b)},f.prototype.stop=function(){this._data.time.stopMs=(new Date).getTime(),this._data.time.totalMs=this._data.time.stopMs-this._data.time.startMs},d.finishModule("Operation"),b.exports=f},{"./Path":26,"./Shared":29}],25:[function(a,b,c){"use strict";var d=function(a,b){if(b||(b=a,a=void 0),b){var c,d,e,f,g,h,i=this;if(!(b instanceof Array)){e={};for(c in b)if(b.hasOwnProperty(c))if(f=c.replace(/ /g,""),-1===f.indexOf("*"))e[f]=b[c];else for(h=this.generateSignaturePermutations(f),g=0;g<h.length;g++)e[h[g]]||(e[h[g]]=b[c]);b=e}return function(){var e,f,g,h=[];if(b instanceof Array){for(d=b.length,c=0;d>c;c++)if(b[c].length===arguments.length)return i.callExtend(this,"$main",b,b[c],arguments)}else{for(c=0;c<arguments.length&&(f=typeof arguments[c],"object"===f&&arguments[c]instanceof Array&&(f="array"),1!==arguments.length||"undefined"!==f);c++)h.push(f);if(e=h.join(","),b[e])return i.callExtend(this,"$main",b,b[e],arguments);for(c=h.length;c>=0;c--)if(e=h.slice(0,c).join(","),b[e+",..."])return i.callExtend(this,"$main",b,b[e+",..."],arguments)}throw g=void 0!==a?a:"function"==typeof this.name?this.name():"Unknown",console.log("Overload Definition:",b),'ForerunnerDB.Overload "'+g+'": Overloaded method does not have a matching signature "'+e+'" for the passed arguments: '+this.jStringify(h)}}return function(){}};d.prototype.generateSignaturePermutations=function(a){var b,c,d=[],e=["array","string","object","number","function","undefined"];if(a.indexOf("*")>-1)for(c=0;c<e.length;c++)b=a.replace("*",e[c]),d=d.concat(this.generateSignaturePermutations(b));else d.push(a);return d},d.prototype.callExtend=function(a,b,c,d,e){var f,g;return a&&c[b]?(f=a[b],a[b]=c[b],g=d.apply(a,e),a[b]=f,g):d.apply(a,e)},b.exports=d},{}],26:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a){this.init.apply(this,arguments)};e.prototype.init=function(a){a&&this.path(a)},d.addModule("Path",e),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),e.prototype.path=function(a){return void 0!==a?(this._path=this.clean(a),this._pathParts=this._path.split("."),this):this._path},e.prototype.hasObjectPaths=function(a,b){var c,d=!0;for(c in a)if(a.hasOwnProperty(c)){if(void 0===b[c])return!1;if("object"==typeof a[c]&&(d=this.hasObjectPaths(a[c],b[c]),!d))return!1}return d},e.prototype.countKeys=function(a){var b,c=0;for(b in a)a.hasOwnProperty(b)&&void 0!==a[b]&&("object"!=typeof a[b]?c++:c+=this.countKeys(a[b]));return c},e.prototype.countObjectPaths=function(a,b){var c,d,e={},f=0,g=0;for(d in b)b.hasOwnProperty(d)&&("object"==typeof b[d]?(c=this.countObjectPaths(a[d],b[d]),e[d]=c.matchedKeys,g+=c.totalKeyCount,f+=c.matchedKeyCount):(g++,a&&a[d]&&"object"!=typeof a[d]?(e[d]=!0,f++):e[d]=!1));return{matchedKeys:e,matchedKeyCount:f,totalKeyCount:g}},e.prototype.parse=function(a,b){var c,d,e,f=[],g="";for(d in a)if(a.hasOwnProperty(d))if(g=d,"object"==typeof a[d])if(b)for(c=this.parse(a[d],b),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path,value:c[e].value});else for(c=this.parse(a[d]),e=0;e<c.length;e++)f.push({path:g+"."+c[e].path});else b?f.push({path:g,value:a[d]}):f.push({path:g});return f},e.prototype.parseArr=function(a,b){return b=b||{},this._parseArr(a,"",[],b)},e.prototype._parseArr=function(a,b,c,d){var e,f="";b=b||"",c=c||[];for(e in a)a.hasOwnProperty(e)&&(!d.ignore||d.ignore&&!d.ignore.test(e))&&(f=b?b+"."+e:e,"object"==typeof a[e]?(d.verbose&&c.push(f),this._parseArr(a[e],f,c,d)):c.push(f));return c},e.prototype.set=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;b=this.clean(b),d=b.split("."),e=d.shift(),d.length?(a[e]=a[e]||{},this.set(a[e],d.join("."),c)):a[e]=c}return a},e.prototype.get=function(a,b){return this.value(a,b)[0]},e.prototype.value=function(a,b,c){var d,e,f,g,h,i,j,k,l;if(b&&-1===b.indexOf("."))return[a[b]];if(void 0!==a&&"object"==typeof a){if((!c||c&&!c.skipArrCheck)&&a instanceof Array){for(j=[],k=0;k<a.length;k++)j.push(this.get(a[k],b));return j}for(i=[],void 0!==b&&(b=this.clean(b),d=b.split(".")),e=d||this._pathParts,f=e.length,g=a,k=0;f>k;k++){if(g=g[e[k]],h instanceof Array){for(l=0;l<h.length;l++)i=i.concat(this.value(h,l+"."+e[k],{skipArrCheck:!0}));return i}if(!g||"object"!=typeof g)break;h=g}return[g]}return[]},e.prototype.push=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;if(b=this.clean(b),d=b.split("."),e=d.shift(),d.length)a[e]=a[e]||{},this.set(a[e],d.join("."),c);else{if(a[e]=a[e]||[],!(a[e]instanceof Array))throw"ForerunnerDB.Path: Cannot push to a path whose endpoint is not an array!";a[e].push(c)}}return a},e.prototype.keyValue=function(a,b){var c,d,e,f,g,h,i;for(void 0!==b&&(b=this.clean(b),c=b.split(".")),d=c||this._pathParts,e=d.length,f=a,i=0;e>i;i++){if(f=f[d[i]],!f||"object"!=typeof f){h=d[i]+":"+f;break}g=f}return h},e.prototype.set=function(a,b,c){if(void 0!==a&&void 0!==b){var d,e;b=this.clean(b),d=b.split("."),e=d.shift(),d.length?(a[e]=a[e]||{},this.set(a[e],d.join("."),c)):a[e]=c}return a},e.prototype.clean=function(a){return"."===a.substr(0,1)&&(a=a.substr(1,a.length-1)),a},d.finishModule("Path"),b.exports=e},{"./Shared":29}],27:[function(a,b,c){"use strict";var d=a("./Shared"),e=function(a,b,c){if(!(a&&b&&c))throw"ForerunnerDB.ReactorIO: ReactorIO requires in, out and process arguments to instantiate!";if(this._reactorIn=a,this._reactorOut=b,this._chainHandler=c,!a.chain)throw"ForerunnerDB.ReactorIO: ReactorIO requires passed in and out objects to implement the ChainReactor mixin!";a.chain(this),this.chain(b)};d.addModule("ReactorIO",e),e.prototype.drop=function(){return this.isDropped()||(this._state="dropped",this._reactorIn&&this._reactorIn.unChain(this),this._reactorOut&&this.unChain(this._reactorOut),delete this._reactorIn,delete this._reactorOut,delete this._chainHandler,this.emit("drop",this),delete this._listeners),!0},d.synthesize(e.prototype,"state"),d.mixin(e.prototype,"Mixin.Common"),d.mixin(e.prototype,"Mixin.ChainReactor"),d.mixin(e.prototype,"Mixin.Events"),d.finishModule("ReactorIO"),b.exports=e},{"./Shared":29}],28:[function(a,b,c){"use strict";var d=function(){this.init.apply(this,arguments)};d.prototype.init=function(){var a=this;this._encoder=[],this._decoder=[],this.registerHandler("$date",function(a){return a instanceof Date?(a.toJSON=function(){return"$date:"+this.toISOString()},!0):!1},function(b){return"string"==typeof b&&0===b.indexOf("$date:")?a.convert(new Date(b.substr(6))):void 0}),this.registerHandler("$regexp",function(a){return a instanceof RegExp?(a.toJSON=function(){return"$regexp:"+this.source.length+":"+this.source+":"+(this.global?"g":"")+(this.ignoreCase?"i":"")},!0):!1},function(b){if("string"==typeof b&&0===b.indexOf("$regexp:")){var c=b.substr(8),d=c.indexOf(":"),e=Number(c.substr(0,d)),f=c.substr(d+1,e),g=c.substr(d+e+2);return a.convert(new RegExp(f,g))}})},d.prototype.registerHandler=function(a,b,c){void 0!==a&&(this._encoder.push(b),this._decoder.push(c))},d.prototype.convert=function(a){var b,c=this._encoder;for(b=0;b<c.length;b++)if(c[b](a))return a;return a},d.prototype.reviver=function(){var a=this._decoder;return function(b,c){var d,e;for(e=0;e<a.length;e++)if(d=a[e](c),void 0!==d)return d;return c}},b.exports=d},{}],29:[function(a,b,c){"use strict";var d=a("./Overload"),e={version:"1.3.824",modules:{},plugins:{},index:{},_synth:{},addModule:function(a,b){this.modules[a]=b,this.emit("moduleLoad",[a,b])},finishModule:function(a){if(!this.modules[a])throw"ForerunnerDB.Shared: finishModule called on a module that has not been registered with addModule(): "+a;this.modules[a]._fdbFinished=!0,this.modules[a].prototype?this.modules[a].prototype.className=a:this.modules[a].className=a,this.emit("moduleFinished",[a,this.modules[a]])},moduleFinished:function(a,b){this.modules[a]&&this.modules[a]._fdbFinished?b&&b(a,this.modules[a]):this.on("moduleFinished",b)},moduleExists:function(a){return Boolean(this.modules[a])},mixin:new d({"object, string":function(a,b){var c;if("string"==typeof b&&(c=this.mixins[b],!c))throw"ForerunnerDB.Shared: Cannot find mixin named: "+b;return this.$main.call(this,a,c)},"object, *":function(a,b){return this.$main.call(this,a,b)},$main:function(a,b){if(b&&"object"==typeof b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}}),synthesize:function(a,b,c){if(this._synth[b]=this._synth[b]||function(a){return void 0!==a?(this["_"+b]=a,this):this["_"+b]},c){var d=this;a[b]=function(){var a,e=this.$super;return this.$super=d._synth[b],a=c.apply(this,arguments),this.$super=e,a}}else a[b]=this._synth[b]},overload:d,mixins:{"Mixin.Common":a("./Mixin.Common"),"Mixin.Events":a("./Mixin.Events"),"Mixin.ChainReactor":a("./Mixin.ChainReactor"),"Mixin.CRUD":a("./Mixin.CRUD"),"Mixin.Constants":a("./Mixin.Constants"),"Mixin.Triggers":a("./Mixin.Triggers"),"Mixin.Sorting":a("./Mixin.Sorting"), "Mixin.Matching":a("./Mixin.Matching"),"Mixin.Updating":a("./Mixin.Updating"),"Mixin.Tags":a("./Mixin.Tags")}};e.mixin(e,"Mixin.Events"),b.exports=e},{"./Mixin.CRUD":14,"./Mixin.ChainReactor":15,"./Mixin.Common":16,"./Mixin.Constants":17,"./Mixin.Events":18,"./Mixin.Matching":19,"./Mixin.Sorting":20,"./Mixin.Tags":21,"./Mixin.Triggers":22,"./Mixin.Updating":23,"./Overload":25}],30:[function(a,b,c){Array.prototype.filter||(Array.prototype.filter=function(a){if(void 0===this||null===this)throw new TypeError;var b=Object(this),c=b.length>>>0;if("function"!=typeof a)throw new TypeError;for(var d=[],e=arguments.length>=2?arguments[1]:void 0,f=0;c>f;f++)if(f in b){var g=b[f];a.call(e,g,f,b)&&d.push(g)}return d}),"function"!=typeof Object.create&&(Object.create=function(){var a=function(){};return function(b){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;var c=new a;return a.prototype=null,c}}()),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null===this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=+b||0;if(Math.abs(f)===1/0&&(f=0),f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);e>c;){if(c in d&&d[c]===a)return c;c++}return-1}),b.exports={}},{}]},{},[1]);
demo/index.js
gerhardsletten/react-pinch-zoom-pan
import React from 'react' import {render} from 'react-dom' import App from './App' import { AppContainer } from 'react-hot-loader' render((<AppContainer><App /></AppContainer>), document.getElementById('main')) if (module.hot) { module.hot.accept('./App', () => { const NextRoot = require('./App').default render((<AppContainer><NextRoot /></AppContainer>), document.getElementById('main')) }) }
code/workspaces/web-app/src/containers/adminResources/ProjectClusters.spec.js
NERC-CEH/datalab
import React from 'react'; import { render } from '@testing-library/react'; import ProjectClusters from './ProjectClusters'; jest.mock('../clusters/ProjectClustersContainer', () => props => (<>ProjectClustersContainer Mock {JSON.stringify(props)}</>)); describe('ProjectClusters', () => { const promisedUserPermissions = { fetching: false, error: null, value: ['some-permission'], }; const project = { key: 'test-project', name: 'Test Project', }; const props = { promisedUserPermissions, project, }; it('renders to match snapshot passing correct props to children', () => { expect(render(<ProjectClusters {...props} />).container).toMatchSnapshot(); }); });
src/NavDropdown.js
sheep902/react-bootstrap
import React from 'react'; import Dropdown from './Dropdown'; class NavDropdown extends React.Component { render() { let { children, title, noCaret, ...props } = this.props; return ( <Dropdown {...props} componentClass="li"> <Dropdown.Toggle useAnchor disabled={props.disabled} noCaret={noCaret} > {title} </Dropdown.Toggle> <Dropdown.Menu> {children} </Dropdown.Menu> </Dropdown> ); } } NavDropdown.propTypes = { noCaret: React.PropTypes.bool, title: React.PropTypes.node.isRequired, ...Dropdown.propTypes }; export default NavDropdown;
app/js/App.js
dkilmer/cryptic-muse
import React from 'react'; import { connect } from 'react-redux' import TextBar from './TextBar'; import DataTable from './DataTable'; import { beginSearch, completeSearch, errorSearch, changeSearch } from './actions'; import d3 from 'd3'; var App = React.createClass({ onSearchClick: function(searchType, text) { this.props.dispatch(beginSearch(searchType, text)); var self = this; d3.json(searchType+"/"+text, function(error, json) { if (error) { self.props.dispatch(errorSearch(error)); return console.warn(error); } self.props.dispatch(completeSearch(json)); }); }, onSearchChange: function(text) { this.props.dispatch(changeSearch(text)); }, render: function() { return ( <div className="container" style={{'marginTop' : '20px'}}> <h2>cryptic muse</h2> <div> <TextBar onSearchClick={this.onSearchClick} onSearchChange={this.onSearchChange} queryInProgress={this.props.ui.queryInProgress} searchText={this.props.ui.searchText} /> </div> <DataTable searchHeader={this.props.search.type} queryHeader={this.props.search.query} onSearchChange={this.onSearchChange} data={this.props.results} /> </div> ); } }); function select(state) { return state; } export default connect(select)(App);
node_modules/semantic-ui-react/src/collections/Table/TableFooter.js
mowbell/clickdelivery-fed-test
import React from 'react' import { META } from '../../lib' import TableHeader from './TableHeader' /** * A table can have a footer. */ function TableFooter(props) { return <TableHeader {...props} /> } TableFooter._meta = { name: 'TableFooter', type: META.TYPES.COLLECTION, parent: 'Table', } TableFooter.defaultProps = { as: 'tfoot', } export default TableFooter
frontend/src/KeyTerms/KeyTerms.js
Jspsun/HackTheNorth2017
import React from 'react'; import { StyleSheet, css } from 'aphrodite'; import {MaterialCard} from '../UI/MaterialCard' export class KeyTerms extends React.Component { render = () => { console.log(this.props.url) if (this.props.url === 'https://www.youtube.com/embed/Ykc5COodXis') { return ( <MaterialCard className={styles.card}> <div className={css(styles.title)}> Key Terms <p>Scala - <span style={{fontSize: '14px'}}>a general-purpose programming language providing support for functional programming and a strong static type system.</span></p> <p>Closures - <span style={{fontSize: '14px'}}>are techniques for implementing lexically scoped name binding in languages with first-class functions.</span></p> </div> </MaterialCard> ) } else { return ( <MaterialCard className={styles.card}> <div className={css(styles.title)}> Key Terms <p>Molarity - <span style={{fontSize: '14px'}}>a unit of concentration measuring the number of moles of a solute per liter of solution.</span></p> <p>Chemistry - <span style={{fontSize: '14px'}}>a branch of physical science that studies the composition, structure, properties and change of matter.</span></p> </div> </MaterialCard> ) } } } const styles = StyleSheet.create({ card: { marginTop: '0px', marginLeft: '10px', width: '48%', display: 'inline-block', padding: '0px', marginRight: '0px' }, title: { padding:'20px', background: '#4E8BD9', color: '#fff' }, body: { padding:'20px', } });
js/BaseComponents/Radio.js
telldus/telldus-live-mobile-v3
/** * Copyright 2016-present Telldus Technologies AB. * * This file is part of the Telldus Live! app. * * Telldus Live! app is free : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Telldus Live! app is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Telldus Live! app. If not, see <http://www.gnu.org/licenses/>. */ // @flow 'use strict'; import React from 'react'; import { View, Platform } from 'react-native'; import Base from './Base'; import Icon from './Icon'; type Props = { selected: boolean, }; export default class Radio extends Base { props: Props; getInitialStyle(): Object { return { radio: {}, }; } render(): React$Element<any> { return ( <View > {(Platform.OS === 'ios') ? <Icon name={this.props.selected ? 'ios-radio-button-on' : 'ios-radio-button-off-outline'} style={{ color: this.props.selected ? this.getTheme().radioSelectedColor : this.getTheme().radioColor, lineHeight: this.getTheme().radioBtnSize + 4, fontSize: this.getTheme().radioBtnSize, }} /> : <Icon name={this.props.selected ? 'md-radio-button-on' : 'md-radio-button-off'} style={{ color: this.props.selected ? this.getTheme().radioSelectedColor : this.getTheme().radioColor, lineHeight: this.getTheme().radioBtnSize + 1, fontSize: this.getTheme().radioBtnSize, }} /> } </View> ); } }
yymobile/notice-bar/__tests__/index.test.native.js
77ircloud/yymobile2
import React from 'react'; import renderer from 'react-test-renderer'; import { shallow } from 'enzyme'; import NoticeBar from '../index'; describe('NoticeBar', () => { it('renders correctly', () => { const wrapper = renderer.create(<NoticeBar>foo</NoticeBar>); expect(wrapper.toJSON()).toMatchSnapshot(); }); describe('onClick', () => { let handleClick; let wrapper; beforeEach(() => { handleClick = jest.fn(); wrapper = shallow( <NoticeBar mode="closable" onClick={handleClick}> Notice: The arrival time of incomes and </NoticeBar>, ); wrapper.find('TouchableWithoutFeedback').simulate('press'); }); it('fires onClick event', () => { expect(handleClick).toBeCalledWith(); }); it('change state', () => { expect(wrapper.state('show')).toBe(false); }); }); });
src/server/root.js
earnubs/react-hot-loader-starter-kit
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; export default class Html extends Component { render() { const { assets, store, content } = this.props; const preloadedState = store.getState(); const helmet = Helmet.renderStatic(); const htmlAttrs = helmet.htmlAttributes.toComponent(); const bodyAttrs = helmet.bodyAttributes.toComponent(); return ( <html {...htmlAttrs}> <head> {helmet.title.toComponent()} {helmet.meta.toComponent()} </head> <body {...bodyAttrs}> <div id="content" dangerouslySetInnerHTML={{ __html: content }}/> <script dangerouslySetInnerHTML={{ __html: `window.__PRELOADED_STATE__ = ${JSON.stringify(preloadedState)}` }} /> <script src={ assets.vendor.js } /> <script src={ assets.main.js } /> </body> </html> ); } } Html.propTypes = { content: PropTypes.string, store: PropTypes.object, assets: PropTypes.object };
src/data/sequelize.js
DanielHabib/Float
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import Sequelize from 'sequelize'; import { databaseUrl } from '../config'; const sequelize = new Sequelize(databaseUrl, { define: { freezeTableName: true, }, }); export default sequelize;
public/back/js/jquery.min.js
thien3060/intern-project
/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){ return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
app/components/ContainerHeader.js
pbillerot/reacteur
'use strict'; import React from 'react'; import { Link } from 'react-router'; // W3 const {Button, Card, Content, Footer, Header, IconButton , Menubar, Nav, Navbar, NavGroup, Sidebar, Table, Window} = require('./w3.jsx') var PageLayout = { HOME: 'HOME', VIEW: 'VIEW', FORM: 'FORM', HELP: 'HELP' }; export default class HeaderContainer extends React.Component { constructor(props) { super(props); } render() { let table = this.props.table let view = this.props.view let form = this.props.form switch (this.props.layout) { case PageLayout.HOME: return ( <Header title={this.props.title} {...this.props}> </Header> ) case PageLayout.HELP: return ( <Header title={this.props.title} apex={this.props.ctx}> </Header> ) case PageLayout.VIEW: if (this.props.rows_selected.length == 1) { return ( <Header title={this.props.title} apex={this.props.ctx}> <Toolbar> <Button color="default" icon="plus-circled" onClick={(event) => { this.props.form = Dico.tables[table].views[view].form_update this.props.handleOpenForm('UPDATE') } } /> <Button color="default" icon="trash" onClick={(event) => { this.props.handleUpdateForm('DELETE') } } /> </Toolbar> </Header> ) } else if (this.props.rows_selected.length > 1) { return ( <Header title={this.props.title} apex={this.props.ctx}> <Toolbar> <Button color="default" icon="trash" onClick={(event) => this.props.ctx.handleUpdateForm('DELETE')} /> </Toolbar> </Header> ) } else { return ( <Header title={this.props.title} apex={this.props.ctx}> </Header> ) } case PageLayout.FORM: return ( <Header title={this.props.title}> </Header> ) default: return null } } }
packages/ringcentral-widgets-demo/dev-server/containers/App/index.js
u9520107/ringcentral-js-widget
import React from 'react'; import PropTypes from 'prop-types'; import { Provider } from 'react-redux'; import { Router, Route } from 'react-router'; import sleep from 'ringcentral-integration/lib/sleep'; import AlertContainer from 'ringcentral-widgets/containers/AlertContainer'; import WelcomePage from 'ringcentral-widgets/containers/WelcomePage'; import CallingSettingsPage from 'ringcentral-widgets/containers/CallingSettingsPage'; import RegionSettingsPage from 'ringcentral-widgets/containers/RegionSettingsPage'; import AudioSettingsPage from 'ringcentral-widgets/containers/AudioSettingsPage'; import DialerPage from 'ringcentral-widgets/containers/DialerPage'; import ComposeTextPage from 'ringcentral-widgets/containers/ComposeTextPage'; import ConversationPage from 'ringcentral-widgets/containers/ConversationPage'; import ConferencePage from 'ringcentral-widgets/containers/ConferencePage'; import ConferenceCommands from 'ringcentral-widgets/components/ConferenceCommands'; import MeetingPage from 'ringcentral-widgets/containers/MeetingPage'; import ConversationsPage from 'ringcentral-widgets/containers/ConversationsPage'; import SettingsPage from 'ringcentral-widgets/containers/SettingsPage'; import ActiveCallsPage from 'ringcentral-widgets/containers/ActiveCallsPage'; import CallHistoryPage from 'ringcentral-widgets/containers/CallHistoryPage'; import IncomingCallPage from 'ringcentral-widgets/containers/IncomingCallPage'; import CallCtrlPage from 'ringcentral-widgets/containers/CallCtrlPage'; import CallBadgeContainer from 'ringcentral-widgets/containers/CallBadgeContainer'; import RecentActivityContainer from 'ringcentral-widgets/containers/RecentActivityContainer'; import ContactsPage from 'ringcentral-widgets/containers/ContactsPage'; import ContactDetailsPage from 'ringcentral-widgets/containers/ContactDetailsPage'; import FeedbackPage from 'ringcentral-widgets/containers/FeedbackPage'; import UserGuidePage from 'ringcentral-widgets/containers/UserGuidePage'; import ConferenceCallDialerPage from 'ringcentral-widgets/containers/ConferenceCallDialerPage'; import ContactSourceFilter from 'ringcentral-widgets/components/ContactSourceFilter'; import MeetingScheduleButton from 'ringcentral-widgets/components/MeetingScheduleButton'; import PhoneProvider from 'ringcentral-widgets/lib/PhoneProvider'; import MainView from '../MainView'; import AppView from '../AppView'; export default function App({ phone, icon }) { const sourceIcons = { brandIcon: icon }; return ( <PhoneProvider phone={phone}> <Provider store={phone.store} > <Router history={phone.routerInteraction.history} > <Route component={routerProps => ( <AppView> {routerProps.children} <CallBadgeContainer defaultOffsetX={0} defaultOffsetY={45} hidden={routerProps.location.pathname === '/calls/active'} goToCallCtrl={() => { phone.routerInteraction.push('/calls/active'); }} /> <IncomingCallPage showContactDisplayPlaceholder={false} sourceIcons={sourceIcons} getAvatarUrl={ async (contact) => { const avatarUrl = await phone.contacts.getProfileImage(contact, false); return avatarUrl; } } > <AlertContainer callingSettingsUrl="/settings/calling" regionSettingsUrl="/settings/region" /> <RecentActivityContainer getSession={() => (phone.webphone.ringSession || {})} navigateTo={(path) => { phone.webphone.toggleMinimized( phone.webphone.ringSession && phone.webphone.ringSession.id ); phone.routerInteraction.push(path); }} useContact /> </IncomingCallPage> <UserGuidePage /> </AppView> )} > <Route path="/" component={() => ( <WelcomePage version={phone.version} > <AlertContainer callingSettingsUrl="/settings/calling" regionSettingsUrl="/settings/region" /> </WelcomePage> )} /> <Route path="/" component={props => ( <MainView> {props.children} <AlertContainer callingSettingsUrl="/settings/calling" regionSettingsUrl="/settings/region" /> </MainView> )} > <Route path="/dialer" component={() => ( <DialerPage /> )} /> <Route path="/settings" component={routerProps => ( <SettingsPage params={routerProps.location.query} /> )} /> <Route path="/settings/region" component={RegionSettingsPage} /> <Route path="/settings/calling" component={CallingSettingsPage} /> <Route path="/settings/audio" component={AudioSettingsPage} /> <Route path="/settings/feedback" component={FeedbackPage} /> <Route path="/calls" component={() => ( <ActiveCallsPage onLogCall={async () => { await sleep(1000); }} onCreateContact={() => { }} onCallsEmpty={() => { }} sourceIcons={sourceIcons} /> )} /> <Route path="/calls/active" component={() => ( <CallCtrlPage showContactDisplayPlaceholder={false} sourceIcons={sourceIcons} onAdd={() => { phone.routerInteraction.push('/dialer'); }} onBackButtonClick={() => { phone.routerInteraction.push('/calls'); }} getAvatarUrl={ async (contact) => { const avatarUrl = await phone.contacts.getProfileImage(contact, false); return avatarUrl; } } > <RecentActivityContainer getSession={() => (phone.webphone.activeSession || {})} navigateTo={(path) => { phone.routerInteraction.push(path); }} /> </CallCtrlPage> )} /> <Route path="/history" component={() => ( <CallHistoryPage showContactDisplayPlaceholder={false} onLogCall={async () => { await sleep(1000); }} onCreateContact={() => { }} /> )} /> <Route path="/conference" component={ConferencePage} /> <Route path="/conference/commands" component={() => ( <ConferenceCommands currentLocale={phone.locale.currentLocale} onBack={() => phone.routerInteraction.goBack()} /> )} /> <Route path="/composeText" component={ComposeTextPage} /> <Route path="/conversations/:conversationId" component={routerProps => ( <ConversationPage params={routerProps.params} onLogConversation={async () => { sleep(1000); }} showContactDisplayPlaceholder={false} sourceIcons={sourceIcons} showGroupNumberName /> )} /> <Route path="/messages" component={() => ( <ConversationsPage showContactDisplayPlaceholder={false} onLogConversation={async () => { await sleep(1000); }} onCreateContact={() => { }} sourceIcons={sourceIcons} showGroupNumberName /> )} /> <Route path="/contacts" component={props => (!props.location.query.direct ? ( <ContactsPage contactSourceFilterRenderer={props => ( <ContactSourceFilter {...props} /> )} > {props.children} </ContactsPage> ) : props.children) }> <Route path=":contactType/:contactId" component={routerProps => ( <ContactDetailsPage params={routerProps.params} > <RecentActivityContainer navigateTo={(path) => { phone.routerInteraction.push(path); }} contact={phone.contactDetails.contact} useContact /> </ContactDetailsPage> )} /> </Route> <Route path="/meeting" component={() => ( <MeetingPage scheduleButton={MeetingScheduleButton} /> )} /> <Route path="/conferenceCall/dialer/:fromNumber" component={routerProps => ( <ConferenceCallDialerPage params={routerProps.params} onBack={() => { phone.routerInteraction.goBack(); }} /> )} /> </Route> </Route> </Router> </Provider> </PhoneProvider> ); } App.propTypes = { phone: PropTypes.object.isRequired, icon: PropTypes.func }; App.defaultProps = { icon: undefined };
components/RadioButton.js
hellobrian/carbon-components-react
import PropTypes from 'prop-types'; import React from 'react'; import classNames from 'classnames'; import uid from '../lib/uniqueId'; class RadioButton extends React.Component { static propTypes = { checked: PropTypes.bool, className: PropTypes.string, defaultChecked: PropTypes.bool, disabled: PropTypes.bool, id: PropTypes.string, labelText: PropTypes.string, name: PropTypes.string, onChange: PropTypes.func, value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, }; static defaultProps = { labelText: 'Provide labelText', onChange: () => {}, }; componentWillMount() { this.uid = this.props.id || uid(); } handleChange = evt => { this.props.onChange(this.props.value, this.props.name, evt); }; render() { const wrapperClasses = classNames( 'radioButtonWrapper', this.props.className ); const { labelText, ...other } = this.props; return ( <div className={wrapperClasses}> <input {...other} type="radio" className="bx--radio-button" onChange={this.handleChange} id={this.uid} /> <label htmlFor={this.uid} className="bx--radio-button__label"> <span className="bx--radio-button__appearance" /> {labelText} </label> </div> ); } } export default RadioButton;
ajax/libs/react-native-web/0.15.1/exports/Touchable/index.js
cdnjs/cdnjs
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * * @format */ 'use strict'; function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } import AccessibilityUtil from '../../modules/AccessibilityUtil'; import BoundingDimensions from './BoundingDimensions'; import findNodeHandle from '../findNodeHandle'; import normalizeColor from 'normalize-css-color'; import Position from './Position'; import React from 'react'; import UIManager from '../UIManager'; import View from '../View'; var extractSingleTouch = function extractSingleTouch(nativeEvent) { var touches = nativeEvent.touches; var changedTouches = nativeEvent.changedTouches; var hasTouches = touches && touches.length > 0; var hasChangedTouches = changedTouches && changedTouches.length > 0; return !hasTouches && hasChangedTouches ? changedTouches[0] : hasTouches ? touches[0] : nativeEvent; }; /** * `Touchable`: Taps done right. * * You hook your `ResponderEventPlugin` events into `Touchable`. `Touchable` * will measure time/geometry and tells you when to give feedback to the user. * * ====================== Touchable Tutorial =============================== * The `Touchable` mixin helps you handle the "press" interaction. It analyzes * the geometry of elements, and observes when another responder (scroll view * etc) has stolen the touch lock. It notifies your component when it should * give feedback to the user. (bouncing/highlighting/unhighlighting). * * - When a touch was activated (typically you highlight) * - When a touch was deactivated (typically you unhighlight) * - When a touch was "pressed" - a touch ended while still within the geometry * of the element, and no other element (like scroller) has "stolen" touch * lock ("responder") (Typically you bounce the element). * * A good tap interaction isn't as simple as you might think. There should be a * slight delay before showing a highlight when starting a touch. If a * subsequent touch move exceeds the boundary of the element, it should * unhighlight, but if that same touch is brought back within the boundary, it * should rehighlight again. A touch can move in and out of that boundary * several times, each time toggling highlighting, but a "press" is only * triggered if that touch ends while within the element's boundary and no * scroller (or anything else) has stolen the lock on touches. * * To create a new type of component that handles interaction using the * `Touchable` mixin, do the following: * * - Initialize the `Touchable` state. * * getInitialState: function() { * return merge(this.touchableGetInitialState(), yourComponentState); * } * * - Choose the rendered component who's touches should start the interactive * sequence. On that rendered node, forward all `Touchable` responder * handlers. You can choose any rendered node you like. Choose a node whose * hit target you'd like to instigate the interaction sequence: * * // In render function: * return ( * <View * onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder} * onResponderTerminationRequest={this.touchableHandleResponderTerminationRequest} * onResponderGrant={this.touchableHandleResponderGrant} * onResponderMove={this.touchableHandleResponderMove} * onResponderRelease={this.touchableHandleResponderRelease} * onResponderTerminate={this.touchableHandleResponderTerminate}> * <View> * Even though the hit detection/interactions are triggered by the * wrapping (typically larger) node, we usually end up implementing * custom logic that highlights this inner one. * </View> * </View> * ); * * - You may set up your own handlers for each of these events, so long as you * also invoke the `touchable*` handlers inside of your custom handler. * * - Implement the handlers on your component class in order to provide * feedback to the user. See documentation for each of these class methods * that you should implement. * * touchableHandlePress: function() { * this.performBounceAnimation(); // or whatever you want to do. * }, * touchableHandleActivePressIn: function() { * this.beginHighlighting(...); // Whatever you like to convey activation * }, * touchableHandleActivePressOut: function() { * this.endHighlighting(...); // Whatever you like to convey deactivation * }, * * - There are more advanced methods you can implement (see documentation below): * touchableGetHighlightDelayMS: function() { * return 20; * } * // In practice, *always* use a predeclared constant (conserve memory). * touchableGetPressRectOffset: function() { * return {top: 20, left: 20, right: 20, bottom: 100}; * } */ /** * Touchable states. */ var States = { NOT_RESPONDER: 'NOT_RESPONDER', // Not the responder RESPONDER_INACTIVE_PRESS_IN: 'RESPONDER_INACTIVE_PRESS_IN', // Responder, inactive, in the `PressRect` RESPONDER_INACTIVE_PRESS_OUT: 'RESPONDER_INACTIVE_PRESS_OUT', // Responder, inactive, out of `PressRect` RESPONDER_ACTIVE_PRESS_IN: 'RESPONDER_ACTIVE_PRESS_IN', // Responder, active, in the `PressRect` RESPONDER_ACTIVE_PRESS_OUT: 'RESPONDER_ACTIVE_PRESS_OUT', // Responder, active, out of `PressRect` RESPONDER_ACTIVE_LONG_PRESS_IN: 'RESPONDER_ACTIVE_LONG_PRESS_IN', // Responder, active, in the `PressRect`, after long press threshold RESPONDER_ACTIVE_LONG_PRESS_OUT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT', // Responder, active, out of `PressRect`, after long press threshold ERROR: 'ERROR' }; /* * Quick lookup map for states that are considered to be "active" */ var baseStatesConditions = { NOT_RESPONDER: false, RESPONDER_INACTIVE_PRESS_IN: false, RESPONDER_INACTIVE_PRESS_OUT: false, RESPONDER_ACTIVE_PRESS_IN: false, RESPONDER_ACTIVE_PRESS_OUT: false, RESPONDER_ACTIVE_LONG_PRESS_IN: false, RESPONDER_ACTIVE_LONG_PRESS_OUT: false, ERROR: false }; var IsActive = _objectSpread(_objectSpread({}, baseStatesConditions), {}, { RESPONDER_ACTIVE_PRESS_OUT: true, RESPONDER_ACTIVE_PRESS_IN: true }); /** * Quick lookup for states that are considered to be "pressing" and are * therefore eligible to result in a "selection" if the press stops. */ var IsPressingIn = _objectSpread(_objectSpread({}, baseStatesConditions), {}, { RESPONDER_INACTIVE_PRESS_IN: true, RESPONDER_ACTIVE_PRESS_IN: true, RESPONDER_ACTIVE_LONG_PRESS_IN: true }); var IsLongPressingIn = _objectSpread(_objectSpread({}, baseStatesConditions), {}, { RESPONDER_ACTIVE_LONG_PRESS_IN: true }); /** * Inputs to the state machine. */ var Signals = { DELAY: 'DELAY', RESPONDER_GRANT: 'RESPONDER_GRANT', RESPONDER_RELEASE: 'RESPONDER_RELEASE', RESPONDER_TERMINATED: 'RESPONDER_TERMINATED', ENTER_PRESS_RECT: 'ENTER_PRESS_RECT', LEAVE_PRESS_RECT: 'LEAVE_PRESS_RECT', LONG_PRESS_DETECTED: 'LONG_PRESS_DETECTED' }; /** * Mapping from States x Signals => States */ var Transitions = { NOT_RESPONDER: { DELAY: States.ERROR, RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN, RESPONDER_RELEASE: States.ERROR, RESPONDER_TERMINATED: States.ERROR, ENTER_PRESS_RECT: States.ERROR, LEAVE_PRESS_RECT: States.ERROR, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_INACTIVE_PRESS_IN: { DELAY: States.RESPONDER_ACTIVE_PRESS_IN, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_INACTIVE_PRESS_OUT: { DELAY: States.RESPONDER_ACTIVE_PRESS_OUT, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_INACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_ACTIVE_PRESS_IN: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN }, RESPONDER_ACTIVE_PRESS_OUT: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, RESPONDER_ACTIVE_LONG_PRESS_IN: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT, LONG_PRESS_DETECTED: States.RESPONDER_ACTIVE_LONG_PRESS_IN }, RESPONDER_ACTIVE_LONG_PRESS_OUT: { DELAY: States.ERROR, RESPONDER_GRANT: States.ERROR, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_IN, LEAVE_PRESS_RECT: States.RESPONDER_ACTIVE_LONG_PRESS_OUT, LONG_PRESS_DETECTED: States.ERROR }, error: { DELAY: States.NOT_RESPONDER, RESPONDER_GRANT: States.RESPONDER_INACTIVE_PRESS_IN, RESPONDER_RELEASE: States.NOT_RESPONDER, RESPONDER_TERMINATED: States.NOT_RESPONDER, ENTER_PRESS_RECT: States.NOT_RESPONDER, LEAVE_PRESS_RECT: States.NOT_RESPONDER, LONG_PRESS_DETECTED: States.NOT_RESPONDER } }; // ==== Typical Constants for integrating into UI components ==== // var HIT_EXPAND_PX = 20; // var HIT_VERT_OFFSET_PX = 10; var HIGHLIGHT_DELAY_MS = 130; var PRESS_EXPAND_PX = 20; var LONG_PRESS_THRESHOLD = 500; var LONG_PRESS_DELAY_MS = LONG_PRESS_THRESHOLD - HIGHLIGHT_DELAY_MS; var LONG_PRESS_ALLOWED_MOVEMENT = 10; // Default amount "active" region protrudes beyond box /** * By convention, methods prefixed with underscores are meant to be @private, * and not @protected. Mixers shouldn't access them - not even to provide them * as callback handlers. * * * ========== Geometry ========= * `Touchable` only assumes that there exists a `HitRect` node. The `PressRect` * is an abstract box that is extended beyond the `HitRect`. * * +--------------------------+ * | | - "Start" events in `HitRect` cause `HitRect` * | +--------------------+ | to become the responder. * | | +--------------+ | | - `HitRect` is typically expanded around * | | | | | | the `VisualRect`, but shifted downward. * | | | VisualRect | | | - After pressing down, after some delay, * | | | | | | and before letting up, the Visual React * | | +--------------+ | | will become "active". This makes it eligible * | | HitRect | | for being highlighted (so long as the * | +--------------------+ | press remains in the `PressRect`). * | PressRect o | * +----------------------|---+ * Out Region | * +-----+ This gap between the `HitRect` and * `PressRect` allows a touch to move far away * from the original hit rect, and remain * highlighted, and eligible for a "Press". * Customize this via * `touchableGetPressRectOffset()`. * * * * ======= State Machine ======= * * +-------------+ <---+ RESPONDER_RELEASE * |NOT_RESPONDER| * +-------------+ <---+ RESPONDER_TERMINATED * + * | RESPONDER_GRANT (HitRect) * v * +---------------------------+ DELAY +-------------------------+ T + DELAY +------------------------------+ * |RESPONDER_INACTIVE_PRESS_IN|+-------->|RESPONDER_ACTIVE_PRESS_IN| +------------> |RESPONDER_ACTIVE_LONG_PRESS_IN| * +---------------------------+ +-------------------------+ +------------------------------+ * + ^ + ^ + ^ * |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ |LEAVE_ |ENTER_ * |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT |PRESS_RECT * | | | | | | * v + v + v + * +----------------------------+ DELAY +--------------------------+ +-------------------------------+ * |RESPONDER_INACTIVE_PRESS_OUT|+------->|RESPONDER_ACTIVE_PRESS_OUT| |RESPONDER_ACTIVE_LONG_PRESS_OUT| * +----------------------------+ +--------------------------+ +-------------------------------+ * * T + DELAY => LONG_PRESS_DELAY_MS + DELAY * * Not drawn are the side effects of each transition. The most important side * effect is the `touchableHandlePress` abstract method invocation that occurs * when a responder is released while in either of the "Press" states. * * The other important side effects are the highlight abstract method * invocations (internal callbacks) to be implemented by the mixer. * * * @lends Touchable.prototype */ var TouchableMixin = { // HACK (part 1): basic support for touchable interactions using a keyboard componentDidMount: function componentDidMount() { var _this = this; this._touchableNode = findNodeHandle(this); if (this._touchableNode && this._touchableNode.addEventListener) { this._touchableBlurListener = function (e) { if (_this._isTouchableKeyboardActive) { if (_this.state.touchable.touchState && _this.state.touchable.touchState !== States.NOT_RESPONDER) { _this.touchableHandleResponderTerminate({ nativeEvent: e }); } _this._isTouchableKeyboardActive = false; } }; this._touchableNode.addEventListener('blur', this._touchableBlurListener); } }, /** * Clear all timeouts on unmount */ componentWillUnmount: function componentWillUnmount() { if (this._touchableNode && this._touchableNode.addEventListener) { this._touchableNode.removeEventListener('blur', this._touchableBlurListener); } this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout); this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout); this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout); }, /** * It's prefer that mixins determine state in this way, having the class * explicitly mix the state in the one and only `getInitialState` method. * * @return {object} State object to be placed inside of * `this.state.touchable`. */ touchableGetInitialState: function touchableGetInitialState() { return { touchable: { touchState: undefined, responderID: null } }; }, // ==== Hooks to Gesture Responder system ==== /** * Must return true if embedded in a native platform scroll view. */ touchableHandleResponderTerminationRequest: function touchableHandleResponderTerminationRequest() { return !this.props.rejectResponderTermination; }, /** * Must return true to start the process of `Touchable`. */ touchableHandleStartShouldSetResponder: function touchableHandleStartShouldSetResponder() { return !this.props.disabled; }, /** * Return true to cancel press on long press. */ touchableLongPressCancelsPress: function touchableLongPressCancelsPress() { return true; }, /** * Place as callback for a DOM element's `onResponderGrant` event. * @param {SyntheticEvent} e Synthetic event from event system. * */ touchableHandleResponderGrant: function touchableHandleResponderGrant(e) { var dispatchID = e.currentTarget; // Since e is used in a callback invoked on another event loop // (as in setTimeout etc), we need to call e.persist() on the // event to make sure it doesn't get reused in the event object pool. e.persist(); this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout); this.pressOutDelayTimeout = null; this.state.touchable.touchState = States.NOT_RESPONDER; this.state.touchable.responderID = dispatchID; this._receiveSignal(Signals.RESPONDER_GRANT, e); var delayMS = this.touchableGetHighlightDelayMS !== undefined ? Math.max(this.touchableGetHighlightDelayMS(), 0) : HIGHLIGHT_DELAY_MS; delayMS = isNaN(delayMS) ? HIGHLIGHT_DELAY_MS : delayMS; if (delayMS !== 0) { this.touchableDelayTimeout = setTimeout(this._handleDelay.bind(this, e), delayMS); } else { this._handleDelay(e); } var longDelayMS = this.touchableGetLongPressDelayMS !== undefined ? Math.max(this.touchableGetLongPressDelayMS(), 10) : LONG_PRESS_DELAY_MS; longDelayMS = isNaN(longDelayMS) ? LONG_PRESS_DELAY_MS : longDelayMS; this.longPressDelayTimeout = setTimeout(this._handleLongDelay.bind(this, e), longDelayMS + delayMS); }, /** * Place as callback for a DOM element's `onResponderRelease` event. */ touchableHandleResponderRelease: function touchableHandleResponderRelease(e) { this.pressInLocation = null; this._receiveSignal(Signals.RESPONDER_RELEASE, e); }, /** * Place as callback for a DOM element's `onResponderTerminate` event. */ touchableHandleResponderTerminate: function touchableHandleResponderTerminate(e) { this.pressInLocation = null; this._receiveSignal(Signals.RESPONDER_TERMINATED, e); }, /** * Place as callback for a DOM element's `onResponderMove` event. */ touchableHandleResponderMove: function touchableHandleResponderMove(e) { // Measurement may not have returned yet. if (!this.state.touchable.positionOnActivate) { return; } var positionOnActivate = this.state.touchable.positionOnActivate; var dimensionsOnActivate = this.state.touchable.dimensionsOnActivate; var pressRectOffset = this.touchableGetPressRectOffset ? this.touchableGetPressRectOffset() : { left: PRESS_EXPAND_PX, right: PRESS_EXPAND_PX, top: PRESS_EXPAND_PX, bottom: PRESS_EXPAND_PX }; var pressExpandLeft = pressRectOffset.left; var pressExpandTop = pressRectOffset.top; var pressExpandRight = pressRectOffset.right; var pressExpandBottom = pressRectOffset.bottom; var hitSlop = this.touchableGetHitSlop ? this.touchableGetHitSlop() : null; if (hitSlop) { pressExpandLeft += hitSlop.left || 0; pressExpandTop += hitSlop.top || 0; pressExpandRight += hitSlop.right || 0; pressExpandBottom += hitSlop.bottom || 0; } var touch = extractSingleTouch(e.nativeEvent); var pageX = touch && touch.pageX; var pageY = touch && touch.pageY; if (this.pressInLocation) { var movedDistance = this._getDistanceBetweenPoints(pageX, pageY, this.pressInLocation.pageX, this.pressInLocation.pageY); if (movedDistance > LONG_PRESS_ALLOWED_MOVEMENT) { this._cancelLongPressDelayTimeout(); } } var isTouchWithinActive = pageX > positionOnActivate.left - pressExpandLeft && pageY > positionOnActivate.top - pressExpandTop && pageX < positionOnActivate.left + dimensionsOnActivate.width + pressExpandRight && pageY < positionOnActivate.top + dimensionsOnActivate.height + pressExpandBottom; if (isTouchWithinActive) { var prevState = this.state.touchable.touchState; this._receiveSignal(Signals.ENTER_PRESS_RECT, e); var curState = this.state.touchable.touchState; if (curState === States.RESPONDER_INACTIVE_PRESS_IN && prevState !== States.RESPONDER_INACTIVE_PRESS_IN) { // fix for t7967420 this._cancelLongPressDelayTimeout(); } } else { this._cancelLongPressDelayTimeout(); this._receiveSignal(Signals.LEAVE_PRESS_RECT, e); } }, /** * Invoked when the item receives focus. Mixers might override this to * visually distinguish the `VisualRect` so that the user knows that it * currently has the focus. Most platforms only support a single element being * focused at a time, in which case there may have been a previously focused * element that was blurred just prior to this. This can be overridden when * using `Touchable.Mixin.withoutDefaultFocusAndBlur`. */ touchableHandleFocus: function touchableHandleFocus(e) { this.props.onFocus && this.props.onFocus(e); }, /** * Invoked when the item loses focus. Mixers might override this to * visually distinguish the `VisualRect` so that the user knows that it * no longer has focus. Most platforms only support a single element being * focused at a time, in which case the focus may have moved to another. * This can be overridden when using * `Touchable.Mixin.withoutDefaultFocusAndBlur`. */ touchableHandleBlur: function touchableHandleBlur(e) { this.props.onBlur && this.props.onBlur(e); }, // ==== Abstract Application Callbacks ==== /** * Invoked when the item should be highlighted. Mixers should implement this * to visually distinguish the `VisualRect` so that the user knows that * releasing a touch will result in a "selection" (analog to click). * * @abstract * touchableHandleActivePressIn: function, */ /** * Invoked when the item is "active" (in that it is still eligible to become * a "select") but the touch has left the `PressRect`. Usually the mixer will * want to unhighlight the `VisualRect`. If the user (while pressing) moves * back into the `PressRect` `touchableHandleActivePressIn` will be invoked * again and the mixer should probably highlight the `VisualRect` again. This * event will not fire on an `touchEnd/mouseUp` event, only move events while * the user is depressing the mouse/touch. * * @abstract * touchableHandleActivePressOut: function */ /** * Invoked when the item is "selected" - meaning the interaction ended by * letting up while the item was either in the state * `RESPONDER_ACTIVE_PRESS_IN` or `RESPONDER_INACTIVE_PRESS_IN`. * * @abstract * touchableHandlePress: function */ /** * Invoked when the item is long pressed - meaning the interaction ended by * letting up while the item was in `RESPONDER_ACTIVE_LONG_PRESS_IN`. If * `touchableHandleLongPress` is *not* provided, `touchableHandlePress` will * be called as it normally is. If `touchableHandleLongPress` is provided, by * default any `touchableHandlePress` callback will not be invoked. To * override this default behavior, override `touchableLongPressCancelsPress` * to return false. As a result, `touchableHandlePress` will be called when * lifting up, even if `touchableHandleLongPress` has also been called. * * @abstract * touchableHandleLongPress: function */ /** * Returns the number of millis to wait before triggering a highlight. * * @abstract * touchableGetHighlightDelayMS: function */ /** * Returns the amount to extend the `HitRect` into the `PressRect`. Positive * numbers mean the size expands outwards. * * @abstract * touchableGetPressRectOffset: function */ // ==== Internal Logic ==== /** * Measures the `HitRect` node on activation. The Bounding rectangle is with * respect to viewport - not page, so adding the `pageXOffset/pageYOffset` * should result in points that are in the same coordinate system as an * event's `globalX/globalY` data values. * * - Consider caching this for the lifetime of the component, or possibly * being able to share this cache between any `ScrollMap` view. * * @sideeffects * @private */ _remeasureMetricsOnActivation: function _remeasureMetricsOnActivation() { var tag = this.state.touchable.responderID; if (tag == null) { return; } UIManager.measure(tag, this._handleQueryLayout); }, _handleQueryLayout: function _handleQueryLayout(l, t, w, h, globalX, globalY) { //don't do anything UIManager failed to measure node if (!l && !t && !w && !h && !globalX && !globalY) { return; } this.state.touchable.positionOnActivate && Position.release(this.state.touchable.positionOnActivate); this.state.touchable.dimensionsOnActivate && // $FlowFixMe BoundingDimensions.release(this.state.touchable.dimensionsOnActivate); this.state.touchable.positionOnActivate = Position.getPooled(globalX, globalY); // $FlowFixMe this.state.touchable.dimensionsOnActivate = BoundingDimensions.getPooled(w, h); }, _handleDelay: function _handleDelay(e) { this.touchableDelayTimeout = null; this._receiveSignal(Signals.DELAY, e); }, _handleLongDelay: function _handleLongDelay(e) { this.longPressDelayTimeout = null; var curState = this.state.touchable.touchState; if (curState !== States.RESPONDER_ACTIVE_PRESS_IN && curState !== States.RESPONDER_ACTIVE_LONG_PRESS_IN) { console.error('Attempted to transition from state `' + curState + '` to `' + States.RESPONDER_ACTIVE_LONG_PRESS_IN + '`, which is not supported. This is ' + 'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.'); } else { this._receiveSignal(Signals.LONG_PRESS_DETECTED, e); } }, /** * Receives a state machine signal, performs side effects of the transition * and stores the new state. Validates the transition as well. * * @param {Signals} signal State machine signal. * @throws Error if invalid state transition or unrecognized signal. * @sideeffects */ _receiveSignal: function _receiveSignal(signal, e) { var responderID = this.state.touchable.responderID; var curState = this.state.touchable.touchState; var nextState = Transitions[curState] && Transitions[curState][signal]; if (!responderID && signal === Signals.RESPONDER_RELEASE) { return; } if (!nextState) { throw new Error('Unrecognized signal `' + signal + '` or state `' + curState + '` for Touchable responder `' + responderID + '`'); } if (nextState === States.ERROR) { throw new Error('Touchable cannot transition from `' + curState + '` to `' + signal + '` for responder `' + responderID + '`'); } if (curState !== nextState) { this._performSideEffectsForTransition(curState, nextState, signal, e); this.state.touchable.touchState = nextState; } }, _cancelLongPressDelayTimeout: function _cancelLongPressDelayTimeout() { this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout); this.longPressDelayTimeout = null; }, _isHighlight: function _isHighlight(state) { return state === States.RESPONDER_ACTIVE_PRESS_IN || state === States.RESPONDER_ACTIVE_LONG_PRESS_IN; }, _savePressInLocation: function _savePressInLocation(e) { var touch = extractSingleTouch(e.nativeEvent); var pageX = touch && touch.pageX; var pageY = touch && touch.pageY; var locationX = touch && touch.locationX; var locationY = touch && touch.locationY; this.pressInLocation = { pageX: pageX, pageY: pageY, locationX: locationX, locationY: locationY }; }, _getDistanceBetweenPoints: function _getDistanceBetweenPoints(aX, aY, bX, bY) { var deltaX = aX - bX; var deltaY = aY - bY; return Math.sqrt(deltaX * deltaX + deltaY * deltaY); }, /** * Will perform a transition between touchable states, and identify any * highlighting or unhighlighting that must be performed for this particular * transition. * * @param {States} curState Current Touchable state. * @param {States} nextState Next Touchable state. * @param {Signal} signal Signal that triggered the transition. * @param {Event} e Native event. * @sideeffects */ _performSideEffectsForTransition: function _performSideEffectsForTransition(curState, nextState, signal, e) { var curIsHighlight = this._isHighlight(curState); var newIsHighlight = this._isHighlight(nextState); var isFinalSignal = signal === Signals.RESPONDER_TERMINATED || signal === Signals.RESPONDER_RELEASE; if (isFinalSignal) { this._cancelLongPressDelayTimeout(); } var isInitialTransition = curState === States.NOT_RESPONDER && nextState === States.RESPONDER_INACTIVE_PRESS_IN; var isActiveTransition = !IsActive[curState] && IsActive[nextState]; if (isInitialTransition || isActiveTransition) { this._remeasureMetricsOnActivation(); } if (IsPressingIn[curState] && signal === Signals.LONG_PRESS_DETECTED) { this.touchableHandleLongPress && this.touchableHandleLongPress(e); } if (newIsHighlight && !curIsHighlight) { this._startHighlight(e); } else if (!newIsHighlight && curIsHighlight) { this._endHighlight(e); } if (IsPressingIn[curState] && signal === Signals.RESPONDER_RELEASE) { var hasLongPressHandler = !!this.props.onLongPress; var pressIsLongButStillCallOnPress = IsLongPressingIn[curState] && ( // We *are* long pressing.. // But either has no long handler !hasLongPressHandler || !this.touchableLongPressCancelsPress()); // or we're told to ignore it. var shouldInvokePress = !IsLongPressingIn[curState] || pressIsLongButStillCallOnPress; if (shouldInvokePress && this.touchableHandlePress) { if (!newIsHighlight && !curIsHighlight) { // we never highlighted because of delay, but we should highlight now this._startHighlight(e); this._endHighlight(e); } this.touchableHandlePress(e); } } this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout); this.touchableDelayTimeout = null; }, _playTouchSound: function _playTouchSound() { UIManager.playTouchSound(); }, _startHighlight: function _startHighlight(e) { this._savePressInLocation(e); this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e); }, _endHighlight: function _endHighlight(e) { var _this2 = this; if (this.touchableHandleActivePressOut) { if (this.touchableGetPressOutDelayMS && this.touchableGetPressOutDelayMS()) { this.pressOutDelayTimeout = setTimeout(function () { _this2.touchableHandleActivePressOut(e); }, this.touchableGetPressOutDelayMS()); } else { this.touchableHandleActivePressOut(e); } } }, // HACK (part 2): basic support for touchable interactions using a keyboard (including // delays and longPress) touchableHandleKeyEvent: function touchableHandleKeyEvent(e) { var type = e.type, key = e.key; if (key === 'Enter' || key === ' ') { if (type === 'keydown') { if (!this._isTouchableKeyboardActive) { if (!this.state.touchable.touchState || this.state.touchable.touchState === States.NOT_RESPONDER) { this.touchableHandleResponderGrant(e); this._isTouchableKeyboardActive = true; } } } else if (type === 'keyup') { if (this._isTouchableKeyboardActive) { if (this.state.touchable.touchState && this.state.touchable.touchState !== States.NOT_RESPONDER) { this.touchableHandleResponderRelease(e); this._isTouchableKeyboardActive = false; } } } e.stopPropagation(); // prevent the default behaviour unless the Touchable functions as a link // and Enter is pressed if (!(key === 'Enter' && AccessibilityUtil.propsToAriaRole(this.props) === 'link')) { e.preventDefault(); } } }, withoutDefaultFocusAndBlur: {} }; /** * Provide an optional version of the mixin where `touchableHandleFocus` and * `touchableHandleBlur` can be overridden. This allows appropriate defaults to * be set on TV platforms, without breaking existing implementations of * `Touchable`. */ var touchableHandleFocus = TouchableMixin.touchableHandleFocus, touchableHandleBlur = TouchableMixin.touchableHandleBlur, TouchableMixinWithoutDefaultFocusAndBlur = _objectWithoutPropertiesLoose(TouchableMixin, ["touchableHandleFocus", "touchableHandleBlur"]); TouchableMixin.withoutDefaultFocusAndBlur = TouchableMixinWithoutDefaultFocusAndBlur; var Touchable = { Mixin: TouchableMixin, TOUCH_TARGET_DEBUG: false, // Highlights all touchable targets. Toggle with Inspector. /** * Renders a debugging overlay to visualize touch target with hitSlop (might not work on Android). */ renderDebugView: function renderDebugView(_ref) { var color = _ref.color, hitSlop = _ref.hitSlop; if (!Touchable.TOUCH_TARGET_DEBUG) { return null; } if (process.env.NODE_ENV !== 'production') { throw Error('Touchable.TOUCH_TARGET_DEBUG should not be enabled in prod!'); } var debugHitSlopStyle = {}; hitSlop = hitSlop || { top: 0, bottom: 0, left: 0, right: 0 }; for (var key in hitSlop) { debugHitSlopStyle[key] = -hitSlop[key]; } var normalizedColor = normalizeColor(color); if (typeof normalizedColor !== 'number') { return null; } var hexColor = '#' + ('00000000' + normalizedColor.toString(16)).substr(-8); return ( /*#__PURE__*/ React.createElement(View, { pointerEvents: "none", style: _objectSpread({ position: 'absolute', borderColor: hexColor.slice(0, -2) + '55', // More opaque borderWidth: 1, borderStyle: 'dashed', backgroundColor: hexColor.slice(0, -2) + '0F' }, debugHitSlopStyle) }) ); } }; export default Touchable;
6.0.5/examples/wizard/dist/bundle.js
erikras/redux-form-docs
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/dist/",t(0)}([function(e,t,n){n(272),e.exports=n(271)},function(e,t,n){var r=n(5),o=n(36),i=n(20),a=n(21),u=n(37),s="prototype",c=function(e,t,n){var l,p,f,d,h=e&c.F,v=e&c.G,m=e&c.S,y=e&c.P,g=e&c.B,b=v?r:m?r[t]||(r[t]={}):(r[t]||{})[s],_=v?o:o[t]||(o[t]={}),E=_[s]||(_[s]={});v&&(n=t);for(l in n)p=!h&&b&&void 0!==b[l],f=(p?b:n)[l],d=g&&p?u(f,r):y&&"function"==typeof f?u(Function.call,f):f,b&&a(b,l,f,e&c.U),_[l]!=f&&i(_,l,d),y&&E[l]!=f&&(E[l]=f)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,u],l=0;s=new Error(t.replace(/%s/g,function(){return c[l++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}e.exports=r},function(e,t,n){var r=n(8);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){"use strict";function n(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}e.exports=n},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";var r=n(29),o=r;e.exports=o},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(92)("wks"),o=n(58),i=n(5).Symbol,a="function"==typeof i,u=e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))};u.store=r},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,u=n(e),s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var c in r)o.call(r,c)&&(u[c]=r[c]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var l=0;l<a.length;l++)i.call(r,a[l])&&(u[a[l]]=r[a[l]])}}return u}},function(e,t,n){e.exports=!n(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(3),o=n(184),i=n(33),a=Object.defineProperty;t.f=n(11)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(u){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function o(e,t){var n=r(e);n._hostNode=t,t[v]=n}function i(e){var t=e._hostNode;t&&(delete t[v],e._hostNode=null)}function a(e,t){if(!(e._flags&h.hasCachedChildNodes)){var n=e._renderedChildren,i=t.firstChild;e:for(var a in n)if(n.hasOwnProperty(a)){var u=n[a],s=r(u)._domID;if(0!==s){for(;null!==i;i=i.nextSibling)if(1===i.nodeType&&i.getAttribute(d)===String(s)||8===i.nodeType&&i.nodeValue===" react-text: "+s+" "||8===i.nodeType&&i.nodeValue===" react-empty: "+s+" "){o(u,i);continue e}l("32",s)}}e._flags|=h.hasCachedChildNodes}}function u(e){if(e[v])return e[v];for(var t=[];!e[v];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,r;e&&(r=e[v]);e=t.pop())n=r,t.length&&a(r,e);return n}function s(e){var t=u(e);return null!=t&&t._hostNode===e?t:null}function c(e){if(void 0===e._hostNode?l("33"):void 0,e._hostNode)return e._hostNode;for(var t=[];!e._hostNode;)t.push(e),e._hostParent?void 0:l("34"),e=e._hostParent;for(;t.length;e=t.pop())a(e,e._hostNode);return e._hostNode}var l=n(4),p=n(68),f=n(232),d=(n(2),p.ID_ATTRIBUTE_NAME),h=f,v="__reactInternalInstance$"+Math.random().toString(36).slice(2),m={getClosestInstanceFromNode:u,getInstanceFromNode:s,getNodeFromInstance:c,precacheChildNodes:a,precacheNode:o,uncacheNode:i};e.exports=m},function(e,t,n){"use strict";e.exports=n(569)},function(e,t,n){var r=n(44),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(27);e.exports=function(e){return Object(r(e))}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=r},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(12),o=n(43);e.exports=n(11)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(5),o=n(20),i=n(17),a=n(58)("src"),u="toString",s=Function[u],c=(""+s).split(u);n(36).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,u){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(s&&(i(n,a)||o(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:u?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,u,function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t,n){var r=n(1),o=n(7),i=n(27),a=/"/g,u=function(e,t,n,r){var o=String(i(e)),u="<"+t;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,"&quot;")+'"'),u+">"+o+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(u),r(r.P+r.F*o(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){var r=n(71),o=n(27);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(72),o=n(43),i=n(23),a=n(33),u=n(17),s=n(184),c=Object.getOwnPropertyDescriptor;t.f=n(11)?c:function(e,t){if(e=i(e),t=a(t,!0),s)try{return c(e,t)}catch(n){}if(u(e,t))return o(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(17),o=n(16),i=n(127)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(7);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";var r=null;e.exports={debugTool:r}},function(e,t,n){var r=n(37),o=n(71),i=n(16),a=n(15),u=n(275);e.exports=function(e,t){var n=1==e,s=2==e,c=3==e,l=4==e,p=6==e,f=5==e||p,d=t||u;return function(t,u,h){for(var v,m,y=i(t),g=o(y),b=r(u,h,3),_=a(g.length),E=0,x=n?d(t,_):s?d(t,0):void 0;_>E;E++)if((f||E in g)&&(v=g[E],m=b(v,E,y),e))if(n)x[E]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return E;case 2:x.push(v)}else if(l)return!1;return p?-1:c||l?l:x}}},function(e,t,n){var r=n(1),o=n(36),i=n(7);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},function(e,t,n){var r=n(8);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var i=n(10),a=n(49),u=(n(6),n(245),Object.prototype.hasOwnProperty),s="function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103,c={key:!0,ref:!0,__self:!0,__source:!0},l=function(e,t,n,r,o,i,a){var u={$$typeof:s,type:e,key:t,ref:n,props:a,_owner:i};return u};l.createElement=function(e,t,n){var i,s={},p=null,f=null,d=null,h=null;if(null!=t){r(t)&&(f=t.ref),o(t)&&(p=""+t.key),d=void 0===t.__self?null:t.__self,h=void 0===t.__source?null:t.__source;for(i in t)u.call(t,i)&&!c.hasOwnProperty(i)&&(s[i]=t[i])}var v=arguments.length-2;if(1===v)s.children=n;else if(v>1){for(var m=Array(v),y=0;y<v;y++)m[y]=arguments[y+2];s.children=m}if(e&&e.defaultProps){var g=e.defaultProps;for(i in g)void 0===s[i]&&(s[i]=g[i])}return l(e,p,f,d,h,a.current,s)},l.createFactory=function(e){var t=l.createElement.bind(null,e);return t.type=e,t},l.cloneAndReplaceKey=function(e,t){var n=l(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},l.cloneElement=function(e,t,n){var s,p=i({},e.props),f=e.key,d=e.ref,h=e._self,v=e._source,m=e._owner;if(null!=t){r(t)&&(d=t.ref,m=a.current),o(t)&&(f=""+t.key);var y;e.type&&e.type.defaultProps&&(y=e.type.defaultProps);for(s in t)u.call(t,s)&&!c.hasOwnProperty(s)&&(void 0===t[s]&&void 0!==y?p[s]=y[s]:p[s]=t[s])}var g=arguments.length-2;if(1===g)p.children=n;else if(g>1){for(var b=Array(g),_=0;_<g;_++)b[_]=arguments[_+2];p.children=b}return l(e.type,f,d,h,v,m,p)},l.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===s},l.REACT_ELEMENT_TYPE=s,e.exports=l},function(e,t,n){"use strict";function r(){O.ReactReconcileTransaction&&E?void 0:l("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=f.getPooled(),this.reconcileTransaction=O.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,o,i,a){r(),E.batchedUpdates(e,t,n,o,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function u(e){var t=e.dirtyComponentsLength;t!==y.length?l("124",t,y.length):void 0,y.sort(a),g++;for(var n=0;n<t;n++){var r=y[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var i;if(h.logTopLevelRenders){var u=r;r._currentElement.props===r._renderedComponent._currentElement&&(u=r._renderedComponent),i="React update: "+u.getName(),console.time(i)}if(v.performUpdateIfNecessary(r,e.reconcileTransaction,g),i&&console.timeEnd(i),o)for(var s=0;s<o.length;s++)e.callbackQueue.enqueue(o[s],r.getPublicInstance())}}function s(e){return r(),E.isBatchingUpdates?(y.push(e),void(null==e._updateBatchNumber&&(e._updateBatchNumber=g+1))):void E.batchedUpdates(s,e)}function c(e,t){E.isBatchingUpdates?void 0:l("125"),b.enqueue(e,t),_=!0}var l=n(4),p=n(10),f=n(228),d=n(48),h=n(235),v=n(69),m=n(82),y=(n(2),[]),g=0,b=f.getPooled(),_=!1,E=null,x={initialize:function(){this.dirtyComponentsLength=y.length},close:function(){this.dirtyComponentsLength!==y.length?(y.splice(0,this.dirtyComponentsLength),P()):y.length=0}},C={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},w=[x,C];p(o.prototype,m.Mixin,{getTransactionWrappers:function(){return w},destructor:function(){this.dirtyComponentsLength=null,f.release(this.callbackQueue),this.callbackQueue=null,O.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return m.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),d.addPoolingTo(o);var P=function(){for(;y.length||_;){if(y.length){var e=o.getPooled();e.perform(u,null,e),o.release(e)}if(_){_=!1;var t=b;b=f.getPooled(),t.notifyAll(),f.release(t)}}},S={injectReconcileTransaction:function(e){e?void 0:l("126"),O.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:l("127"),"function"!=typeof e.batchedUpdates?l("128"):void 0,"boolean"!=typeof e.isBatchingUpdates?l("129"):void 0,E=e}},O={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:s,flushBatchedUpdates:P,injection:S,asap:c};e.exports=O},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){var r=n(19);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(200),o=n(1),i=n(92)("metadata"),a=i.store||(i.store=new(n(203))),u=function(e,t,n){var o=a.get(e);if(!o){if(!n)return;a.set(e,o=new r)}var i=o.get(t);if(!i){if(!n)return;o.set(t,i=new r)}return i},s=function(e,t,n){var r=u(t,n,!1);return void 0!==r&&r.has(e)},c=function(e,t,n){var r=u(t,n,!1);return void 0===r?void 0:r.get(e)},l=function(e,t,n,r){u(n,r,!0).set(e,t)},p=function(e,t){var n=u(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},f=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},d=function(e){o(o.S,"Reflect",e)};e.exports={store:a,map:u,has:s,get:c,set:l,keys:p,key:f,exp:d}},function(e,t,n){"use strict";if(n(11)){var r=n(51),o=n(5),i=n(7),a=n(1),u=n(93),s=n(134),c=n(37),l=n(50),p=n(43),f=n(20),d=n(55),h=n(44),v=n(15),m=n(57),y=n(33),g=n(17),b=n(197),_=n(70),E=n(8),x=n(16),C=n(119),w=n(52),P=n(25),S=n(53).f,O=n(136),T=n(58),R=n(9),A=n(31),k=n(83),M=n(128),N=n(137),I=n(62),j=n(89),F=n(56),D=n(112),L=n(177),U=n(12),V=n(24),B=U.f,W=V.f,q=o.RangeError,H=o.TypeError,z=o.Uint8Array,Y="ArrayBuffer",K="Shared"+Y,G="BYTES_PER_ELEMENT",$="prototype",X=Array[$],Q=s.ArrayBuffer,Z=s.DataView,J=A(0),ee=A(2),te=A(3),ne=A(4),re=A(5),oe=A(6),ie=k(!0),ae=k(!1),ue=N.values,se=N.keys,ce=N.entries,le=X.lastIndexOf,pe=X.reduce,fe=X.reduceRight,de=X.join,he=X.sort,ve=X.slice,me=X.toString,ye=X.toLocaleString,ge=R("iterator"),be=R("toStringTag"),_e=T("typed_constructor"),Ee=T("def_constructor"),xe=u.CONSTR,Ce=u.TYPED,we=u.VIEW,Pe="Wrong length!",Se=A(1,function(e,t){return Me(M(e,e[Ee]),t)}),Oe=i(function(){return 1===new z(new Uint16Array([1]).buffer)[0]}),Te=!!z&&!!z[$].set&&i(function(){new z(1).set({})}),Re=function(e,t){if(void 0===e)throw H(Pe);var n=+e,r=v(e);if(t&&!b(n,r))throw q(Pe);return r},Ae=function(e,t){var n=h(e);if(n<0||n%t)throw q("Wrong offset!");return n},ke=function(e){if(E(e)&&Ce in e)return e;throw H(e+" is not a typed array!")},Me=function(e,t){if(!(E(e)&&_e in e))throw H("It is not a typed array constructor!");return new e(t)},Ne=function(e,t){return Ie(M(e,e[Ee]),t)},Ie=function(e,t){for(var n=0,r=t.length,o=Me(e,r);r>n;)o[n]=t[n++];return o},je=function(e,t,n){B(e,t,{get:function(){return this._d[n]}})},Fe=function(e){var t,n,r,o,i,a,u=x(e),s=arguments.length,l=s>1?arguments[1]:void 0,p=void 0!==l,f=O(u);if(void 0!=f&&!C(f)){for(a=f.call(u),r=[],t=0;!(i=a.next()).done;t++)r.push(i.value);u=r}for(p&&s>2&&(l=c(l,arguments[2],2)),t=0,n=v(u.length),o=Me(this,n);n>t;t++)o[t]=p?l(u[t],t):u[t];return o},De=function(){for(var e=0,t=arguments.length,n=Me(this,t);t>e;)n[e]=arguments[e++];return n},Le=!!z&&i(function(){ye.call(new z(1))}),Ue=function(){return ye.apply(Le?ve.call(ke(this)):ke(this),arguments)},Ve={copyWithin:function(e,t){return L.call(ke(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ne(ke(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return D.apply(ke(this),arguments)},filter:function(e){return Ne(this,ee(ke(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return re(ke(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return oe(ke(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){J(ke(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ae(ke(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return ie(ke(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return de.apply(ke(this),arguments)},lastIndexOf:function(e){return le.apply(ke(this),arguments)},map:function(e){return Se(ke(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return pe.apply(ke(this),arguments)},reduceRight:function(e){return fe.apply(ke(this),arguments)},reverse:function(){for(var e,t=this,n=ke(t).length,r=Math.floor(n/2),o=0;o<r;)e=t[o],t[o++]=t[--n],t[n]=e;return t},some:function(e){return te(ke(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return he.call(ke(this),e)},subarray:function(e,t){var n=ke(this),r=n.length,o=m(e,r);return new(M(n,n[Ee]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,v((void 0===t?r:m(t,r))-o))}},Be=function(e,t){return Ne(this,ve.call(ke(this),e,t))},We=function(e){ke(this);var t=Ae(arguments[1],1),n=this.length,r=x(e),o=v(r.length),i=0;if(o+t>n)throw q(Pe);for(;i<o;)this[t+i]=r[i++]},qe={entries:function(){return ce.call(ke(this))},keys:function(){return se.call(ke(this))},values:function(){return ue.call(ke(this))}},He=function(e,t){return E(e)&&e[Ce]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},ze=function(e,t){return He(e,t=y(t,!0))?p(2,e[t]):W(e,t)},Ye=function(e,t,n){return!(He(e,t=y(t,!0))&&E(n)&&g(n,"value"))||g(n,"get")||g(n,"set")||n.configurable||g(n,"writable")&&!n.writable||g(n,"enumerable")&&!n.enumerable?B(e,t,n):(e[t]=n.value,e)};xe||(V.f=ze,U.f=Ye),a(a.S+a.F*!xe,"Object",{getOwnPropertyDescriptor:ze,defineProperty:Ye}),i(function(){me.call({})})&&(me=ye=function(){return de.call(this)});var Ke=d({},Ve);d(Ke,qe),f(Ke,ge,qe.values),d(Ke,{slice:Be,set:We,constructor:function(){},toString:me,toLocaleString:Ue}),je(Ke,"buffer","b"),je(Ke,"byteOffset","o"),je(Ke,"byteLength","l"),je(Ke,"length","e"),B(Ke,be,{get:function(){return this[Ce]}}),e.exports=function(e,t,n,s){s=!!s;var c=e+(s?"Clamped":"")+"Array",p="Uint8Array"!=c,d="get"+e,h="set"+e,m=o[c],y=m||{},g=m&&P(m),b=!m||!u.ABV,x={},C=m&&m[$],O=function(e,n){var r=e._d;return r.v[d](n*t+r.o,Oe)},T=function(e,n,r){var o=e._d;s&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[h](n*t+o.o,r,Oe)},R=function(e,t){B(e,t,{get:function(){return O(this,t)},set:function(e){return T(this,t,e)},enumerable:!0})};b?(m=n(function(e,n,r,o){l(e,m,c,"_d");var i,a,u,s,p=0,d=0;if(E(n)){if(!(n instanceof Q||(s=_(n))==Y||s==K))return Ce in n?Ie(m,n):Fe.call(m,n);i=n,d=Ae(r,t);var h=n.byteLength;if(void 0===o){if(h%t)throw q(Pe);if(a=h-d,a<0)throw q(Pe)}else if(a=v(o)*t,a+d>h)throw q(Pe);u=a/t}else u=Re(n,!0),a=u*t,i=new Q(a);for(f(e,"_d",{b:i,o:d,l:a,e:u,v:new Z(i)});p<u;)R(e,p++)}),C=m[$]=w(Ke),f(C,"constructor",m)):j(function(e){new m(null),new m(e)},!0)||(m=n(function(e,n,r,o){l(e,m,c);var i;return E(n)?n instanceof Q||(i=_(n))==Y||i==K?void 0!==o?new y(n,Ae(r,t),o):void 0!==r?new y(n,Ae(r,t)):new y(n):Ce in n?Ie(m,n):Fe.call(m,n):new y(Re(n,p))}),J(g!==Function.prototype?S(y).concat(S(g)):S(y),function(e){e in m||f(m,e,y[e])}),m[$]=C,r||(C.constructor=m));var A=C[ge],k=!!A&&("values"==A.name||void 0==A.name),M=qe.values;f(m,_e,!0),f(C,Ce,c),f(C,we,!0),f(C,Ee,m),(s?new m(1)[be]==c:be in C)||B(C,be,{get:function(){return c}}),x[c]=m,a(a.G+a.W+a.F*(m!=y),x),a(a.S,c,{BYTES_PER_ELEMENT:t,from:Fe,of:De}),G in C||f(C,G,t),a(a.P,c,Ve),F(c),a(a.P+a.F*Te,c,{set:We}),a(a.P+a.F*!k,c,qe),a(a.P+a.F*(C.toString!=me),c,{toString:me}),a(a.P+a.F*i(function(){new m(1).slice()}),c,{slice:Be}),a(a.P+a.F*(i(function(){return[1,2].toLocaleString()!=new m([1,2]).toLocaleString()})||!i(function(){C.toLocaleString.call([1,2])})),c,{toLocaleString:Ue}),I[c]=k?A:M,r||k||f(C,ge,M)}}else e.exports=function(){}},function(e,t,n){"use strict";var r=n(94),o=r({bubbled:null,captured:null}),i=r({topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topInvalid:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:o};e.exports=a},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var u=o[i];u?this[i]=u(n):"target"===i?this.target=r:this[i]=n[i]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return s?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var o=n(10),i=n(48),a=n(29),u=(n(6),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),s={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n<u.length;n++)this[u[n]]=null}}),r.Interface=s,r.augmentClass=function(e,t){var n=this,r=function(){};r.prototype=n.prototype;var a=new r;o(a,e.prototype),e.prototype=a,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,i.addPoolingTo(e,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),e.exports=r},function(e,t,n){var r=n(58)("meta"),o=n(8),i=n(17),a=n(12).f,u=0,s=Object.isExtensible||function(){return!0},c=!n(7)(function(){return s(Object.preventExtensions({}))}),l=function(e){a(e,r,{value:{i:"O"+ ++u,w:{}}})},p=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,r)){if(!s(e))return"F";if(!t)return"E";l(e)}return e[r].i},f=function(e,t){if(!i(e,r)){if(!s(e))return!0;if(!t)return!1;l(e)}return e[r].w},d=function(e){return c&&h.NEED&&s(e)&&!i(e,r)&&l(e),e},h=e.exports={KEY:r,NEED:!1,fastKey:p,getWeak:f,onFreeze:d}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t){"use strict";var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=n},function(e,t,n){var r=n(216),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r=n(4),o=(n(2),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},u=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},s=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},c=function(e){var t=this;e instanceof t?void 0:r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},l=10,p=o,f=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||p,n.poolSize||(n.poolSize=l),n.release=c,n},d={addPoolingTo:f,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:u,fiveArgumentPooler:s};e.exports=d},function(e,t){"use strict";var n={current:null};e.exports=n},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t){e.exports=!1},function(e,t,n){var r=n(3),o=n(190),i=n(115),a=n(127)("IE_PROTO"),u=function(){},s="prototype",c=function(){var e,t=n(114)("iframe"),r=i.length,o="<",a=">";for(t.style.display="none",n(117).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(o+"script"+a+"document.F=Object"+o+"/script"+a),e.close(),c=e.F;r--;)delete c[s][i[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(u[s]=r(e),n=new u,u[s]=null,n[a]=e):n=c(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(192),o=n(115).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){var r=n(192),o=n(115);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(21);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){"use strict";var r=n(5),o=n(12),i=n(11),a=n(9)("species");e.exports=function(e){var t=r[e];i&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(44),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):i(e,t)}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(547),i=r(o),a=n(653),u=r(a),s=n(262),c=r(s),l=n(652),p=r(l),f=n(650),d=r(f),h=n(651),v=r(h),m={empty:{},emptyList:[],getIn:c["default"],setIn:p["default"],deepEqual:d["default"],deleteIn:v["default"],fromJS:function(e){return e},size:function(e){return e?e.length:0},some:i["default"],splice:u["default"]};t["default"]=m},function(e,t,n){var r=n(9)("unscopables"),o=Array.prototype;void 0==o[r]&&n(20)(o,r,{}),e.exports=function(e){o[r][e]=!0}},function(e,t,n){var r=n(37),o=n(186),i=n(119),a=n(3),u=n(15),s=n(136),c={},l={},t=e.exports=function(e,t,n,p,f){var d,h,v,m,y=f?function(){return e}:s(e),g=r(n,p,t?2:1),b=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(i(y)){for(d=u(e.length);d>b;b++)if(m=t?g(a(h=e[b])[0],h[1]):g(e[b]),m===c||m===l)return m}else for(v=y.call(e);!(h=v.next()).done;)if(m=o(v,g,h.value,t),m===c||m===l)return m};t.BREAK=c,t.RETURN=l},function(e,t){e.exports={}},function(e,t,n){var r=n(12).f,o=n(17),i=n(9)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r=n(1),o=n(27),i=n(7),a=n(132),u="["+a+"]",s="​…",c=RegExp("^"+u+u+"*"),l=RegExp(u+u+"*$"),p=function(e,t,n){var o={},u=i(function(){return!!a[e]()||s[e]()!=s}),c=o[e]=u?t(f):a[e];n&&(o[n]=c),r(r.P+r.F*u,"String",o)},f=p.trim=function(e,t){return e=String(o(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(l,"")),e};e.exports=p},function(e,t,n){function r(e,t){var n=i(e,t);return o(n)?n:void 0}var o=n(486),i=n(506);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.connect=t.Provider=void 0;var o=n(556),i=r(o),a=n(557),u=r(a);t.Provider=i["default"],t.connect=u["default"]},function(e,t,n){"use strict";function r(e){if(m){var t=e.node,n=e.children;if(n.length)for(var r=0;r<n.length;r++)y(t,n[r],null);else null!=e.html?p(t,e.html):null!=e.text&&d(t,e.text)}}function o(e,t){e.parentNode.replaceChild(t.node,e),r(t)}function i(e,t){m?e.children.push(t):e.node.appendChild(t.node)}function a(e,t){m?e.html=t:p(e.node,t)}function u(e,t){m?e.text=t:d(e.node,t)}function s(){return this.node.nodeName}function c(e){return{node:e,children:[],html:null,text:null,toString:s}}var l=n(150),p=n(108),f=n(164),d=n(252),h=1,v=11,m="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),y=f(function(e,t,n){t.node.nodeType===v||t.node.nodeType===h&&"object"===t.node.nodeName.toLowerCase()&&(null==t.node.namespaceURI||t.node.namespaceURI===l.html)?(r(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),r(t))});c.insertTreeBefore=y,c.replaceChildWithTree=o,c.queueChild=i,c.queueHTML=a,c.queueText=u,e.exports=c},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=n(4),i=(n(2),{MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=i,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},s=e.DOMAttributeNames||{},c=e.DOMPropertyNames||{},l=e.DOMMutationMethods||{};e.isCustomAttribute&&u._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){u.properties.hasOwnProperty(p)?o("48",p):void 0;var f=p.toLowerCase(),d=n[p],h={attributeName:f,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseProperty:r(d,t.MUST_USE_PROPERTY),hasBooleanValue:r(d,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(d,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(d,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(d,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:o("50",p),s.hasOwnProperty(p)){var v=s[p];h.attributeName=v}a.hasOwnProperty(p)&&(h.attributeNamespace=a[p]),c.hasOwnProperty(p)&&(h.propertyName=c[p]),l.hasOwnProperty(p)&&(h.mutationMethod=l[p]),u.properties[p]=h}}}),a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",u={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<u._isCustomAttributeFunctions.length;t++){var n=u._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},injection:i};e.exports=u},function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(597),i=(n(30),n(6),{mountComponent:function(e,t,n,o,i,a){var u=e.mountComponent(t,n,o,i,a);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),u},getHostNode:function(e){return e.getHostNode()},unmountComponent:function(e,t){o.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,i){var a=e._currentElement; if(t!==a||i!==e._context){var u=o.shouldUpdateRefs(a,t);u&&o.detachRefs(e,a),e.receiveComponent(t,n,i),u&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t,n){e._updateBatchNumber===n&&e.performUpdateIfNecessary(t)}});e.exports=i},function(e,t,n){var r=n(26),o=n(9)("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(n){}};e.exports=function(e){var t,n,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=a(t=Object(e),o))?n:i?r(t):"Object"==(u=r(t))&&"function"==typeof t.callee?"Arguments":u}},function(e,t,n){var r=n(26);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,u],l=0;s=new Error(t.replace(/%s/g,function(){return c[l++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};e.exports=r},function(e,t,n){function r(e){if("string"==typeof e||o(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}var o=n(101),i=1/0;e.exports=r},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";var r=n(4),o=n(151),i=n(152),a=n(158),u=n(244),s=n(246),c=(n(2),{}),l=null,p=function(e,t){e&&(i.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},f=function(e){return p(e,!0)},d=function(e){return p(e,!1)},h=function(e){return"."+e._rootNodeID},v={injection:{injectEventPluginOrder:o.injectEventPluginOrder,injectEventPluginsByName:o.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?r("94",t,typeof n):void 0;var i=h(e),a=c[t]||(c[t]={});a[i]=n;var u=o.registrationNameModules[t];u&&u.didPutListener&&u.didPutListener(e,t,n)},getListener:function(e,t){var n=c[t],r=h(e);return n&&n[r]},deleteListener:function(e,t){var n=o.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=c[t];if(r){var i=h(e);delete r[i]}},deleteAllListeners:function(e){var t=h(e);for(var n in c)if(c.hasOwnProperty(n)&&c[n][t]){var r=o.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(e,n),delete c[n][t]}},extractEvents:function(e,t,n,r){for(var i,a=o.plugins,s=0;s<a.length;s++){var c=a[s];if(c){var l=c.extractEvents(e,t,n,r);l&&(i=u(i,l))}}return i},enqueueEvents:function(e){e&&(l=u(l,e))},processEventQueue:function(e){var t=l;l=null,e?s(t,f):s(t,d),l?r("95"):void 0,a.rethrowCaughtError()},__purge:function(){c={}},__getListenerBank:function(){return c}};e.exports=v},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return b(e,r)}function o(e,t,n){var o=t?g.bubbled:g.captured,i=r(e,n,o);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchInstances=m(n._dispatchInstances,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&v.traverseTwoPhase(e._targetInst,o,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?v.getParentInstance(t):null;v.traverseTwoPhase(n,o,e)}}function u(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=b(e,r);o&&(n._dispatchListeners=m(n._dispatchListeners,o),n._dispatchInstances=m(n._dispatchInstances,e))}}function s(e){e&&e.dispatchConfig.registrationName&&u(e._targetInst,null,e)}function c(e){y(e,i)}function l(e){y(e,a)}function p(e,t,n,r){v.traverseEnterLeave(n,r,u,e,t)}function f(e){y(e,s)}var d=n(40),h=n(78),v=n(152),m=n(244),y=n(246),g=(n(6),d.PropagationPhases),b=h.getListener,_={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:p};e.exports=_},function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=n},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(41),i=n(167),a={view:function(e){if(e.view)return e.view;var t=i(e);if(t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";var r=n(4),o=(n(2),{reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,o,i,a,u,s){this.isInTransaction()?r("27"):void 0;var c,l;try{this._isInTransaction=!0,c=!0,this.initializeAll(0),l=e.call(t,n,o,i,a,u,s),c=!1}finally{try{if(c)try{this.closeAll(0)}catch(p){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return l},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=i.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===i.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(o){}}}},closeAll:function(e){this.isInTransaction()?void 0:r("28");for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,a=t[n],u=this.wrapperInitData[n];try{o=!0,u!==i.OBSERVED_ERROR&&a.close&&a.close.call(this,u),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(s){}}}this.wrapperInitData.length=0}}),i={Mixin:o,OBSERVED_ERROR:{}};e.exports=i},function(e,t,n){var r=n(23),o=n(15),i=n(57);e.exports=function(e){return function(t,n,a){var u,s=r(t),c=o(s.length),l=i(a,c);if(e&&n!=n){for(;c>l;)if(u=s[l++],u!=u)return!0}else for(;c>l;l++)if((e||l in s)&&s[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n){"use strict";var r=n(5),o=n(1),i=n(21),a=n(55),u=n(42),s=n(61),c=n(50),l=n(8),p=n(7),f=n(89),d=n(63),h=n(118);e.exports=function(e,t,n,v,m,y){var g=r[e],b=g,_=m?"set":"add",E=b&&b.prototype,x={},C=function(e){var t=E[e];i(E,e,"delete"==e?function(e){return!(y&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(y||E.forEach&&!p(function(){(new b).entries().next()}))){var w=new b,P=w[_](y?{}:-0,1)!=w,S=p(function(){w.has(1)}),O=f(function(e){new b(e)}),T=!y&&p(function(){for(var e=new b,t=5;t--;)e[_](t,t);return!e.has(-0)});O||(b=t(function(t,n){c(t,b,e);var r=h(new g,t,b);return void 0!=n&&s(n,m,r[_],r),r}),b.prototype=E,E.constructor=b),(S||T)&&(C("delete"),C("has"),m&&C("get")),(T||P)&&C(_),y&&E.clear&&delete E.clear}else b=v.getConstructor(t,e,m,_),a(b.prototype,n),u.NEED=!0;return d(b,e),x[e]=b,o(o.G+o.W+o.F*(b!=g),x),y||v.setStrong(b,e,m),b}},function(e,t,n){"use strict";var r=n(20),o=n(21),i=n(7),a=n(27),u=n(9);e.exports=function(e,t,n){var s=u(e),c=n(a,s,""[e]),l=c[0],p=c[1];i(function(){var t={};return t[s]=function(){return 7},7!=""[e](t)})&&(o(String.prototype,e,l),r(RegExp.prototype,s,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){"use strict";var r=n(3);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(8),o=n(26),i=n(9)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(9)("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(a){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},e(i)}catch(u){}return n}},function(e,t,n){e.exports=n(51)||!n(7)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(5)[e]})},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(5),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,n){for(var r,o=n(5),i=n(20),a=n(58),u=a("typed_array"),s=a("view"),c=!(!o.ArrayBuffer||!o.DataView),l=c,p=0,f=9,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");p<f;)(r=o[d[p++]])?(i(r.prototype,u,!0),i(r.prototype,s,!0)):l=!1;e.exports={ABV:c,CONSTR:l,TYPED:u,VIEW:s}},function(e,t,n){"use strict";var r=n(2),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=o},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(517),i=n(518),a=n(519),u=n(520),s=n(521);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t,n){function r(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}var o=n(145);e.exports=r},function(e,t,n){function r(e,t){var n=e.__data__;return o(t)?n["string"==typeof t?"string":"hash"]:n.map}var o=n(514);e.exports=r},function(e,t,n){function r(e,t){if(o(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(u.test(e)||!a.test(e)||null!=t&&e in Object(t))}var o=n(47),i=n(101),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;e.exports=r},function(e,t,n){var r=n(65),o=r(Object,"create");e.exports=o},function(e,t,n){function r(e){return null!=e&&i(e.length)&&!o(e)}var o=n(223),i=n(146);e.exports=r},function(e,t,n){function r(e){return"symbol"==typeof e||o(e)&&u.call(e)==i}var o=n(77),i="[object Symbol]",a=Object.prototype,u=a.toString;e.exports=r},function(e,t,n){function r(e){return a(e)?o(e,c):u(e)?[e]:i(s(e))}var o=n(479),i=n(497),a=n(47),u=n(101),s=n(220),c=n(75);e.exports=r},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){v&&d&&(v=!1,d.length?h=d.concat(h):m=-1,h.length&&u())}function u(){if(!v){var e=o(a);v=!0;for(var t=h.length;t;){for(d=h,h=[];++m<t;)d&&d[m].run();m=-1,t=h.length}d=null,v=!1,i(e)}}function s(e,t){this.fun=e,this.array=t}function c(){}var l,p,f=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{p="function"==typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var d,h=[],v=!1,m=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new s(e,t)),1!==h.length||v||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t){"use strict";var n={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},r={getHostProps:function(e,t){if(!t.disabled)return t;var r={};for(var o in t)!n[o]&&t.hasOwnProperty(o)&&(r[o]=t[o]);return r}};e.exports=r},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=h++,f[e[m]]={}),f[e[m]]}var o,i=n(10),a=n(40),u=n(151),s=n(589),c=n(243),l=n(620),p=n(168),f={},d=!1,h=0,v={topAbort:"abort",topAnimationEnd:l("animationend")||"animationend",topAnimationIteration:l("animationiteration")||"animationiteration",topAnimationStart:l("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:l("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),y=i({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(y.handleTopLevel),y.ReactEventListener=e}},setEnabled:function(e){y.ReactEventListener&&y.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!y.ReactEventListener||!y.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),i=u.registrationNameDependencies[e],s=a.topLevelTypes,c=0;c<i.length;c++){var l=i[c];o.hasOwnProperty(l)&&o[l]||(l===s.topWheel?p("wheel")?y.ReactEventListener.trapBubbledEvent(s.topWheel,"wheel",n):p("mousewheel")?y.ReactEventListener.trapBubbledEvent(s.topWheel,"mousewheel",n):y.ReactEventListener.trapBubbledEvent(s.topWheel,"DOMMouseScroll",n):l===s.topScroll?p("scroll",!0)?y.ReactEventListener.trapCapturedEvent(s.topScroll,"scroll",n):y.ReactEventListener.trapBubbledEvent(s.topScroll,"scroll",y.ReactEventListener.WINDOW_HANDLE):l===s.topFocus||l===s.topBlur?(p("focus",!0)?(y.ReactEventListener.trapCapturedEvent(s.topFocus,"focus",n),y.ReactEventListener.trapCapturedEvent(s.topBlur,"blur",n)):p("focusin")&&(y.ReactEventListener.trapBubbledEvent(s.topFocus,"focusin",n),y.ReactEventListener.trapBubbledEvent(s.topBlur,"focusout",n)),o[s.topBlur]=!0,o[s.topFocus]=!0):v.hasOwnProperty(l)&&y.ReactEventListener.trapBubbledEvent(l,v[l],n),o[l]=!0)}},trapBubbledEvent:function(e,t,n){return y.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return y.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(void 0===o&&(o=document.createEvent&&"pageX"in document.createEvent("MouseEvent")),!o&&!d){var e=c.refreshScrollValues;y.ReactEventListener.monitorScrollValue(e),d=!0}}});e.exports=y},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(81),i=n(243),a=n(166),u={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,u),e.exports=r},function(e,t){"use strict";function n(e){var t=""+e,n=o.exec(t);if(!n)return t;var r,i="",a=0,u=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#x27;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}u!==a&&(i+=t.substring(u,a)),u=a+1,i+=r}return u!==a?i+t.substring(u,a):i}function r(e){return"boolean"==typeof e||"number"==typeof e?""+e:n(e)}var o=/["'&<>]/;e.exports=r},function(e,t,n){"use strict";var r,o=n(18),i=n(150),a=/^[ \r\n\t\f]/,u=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,s=n(164),c=s(function(e,t){if(e.namespaceURI!==i.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML="<svg>"+t+"</svg>";for(var n=r.firstChild.childNodes,o=0;o<n.length;o++)e.appendChild(n[o])}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&u.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.values=t.untouch=t.touch=t.SubmissionError=t.stopSubmit=t.stopAsyncValidation=t.startSubmit=t.startAsyncValidation=t.setSubmitSucceeded=t.setSubmitFailed=t.reset=t.reduxForm=t.reducer=t.propTypes=t.isValid=t.isPristine=t.isInvalid=t.isDirty=t.initialize=t.getFormValues=t.formValueSelector=t.focus=t.FieldArray=t.Fields=t.Field=t.destroy=t.change=t.autofill=t.blur=t.arrayUnshift=t.arraySwap=t.arraySplice=t.arrayShift=t.arrayRemoveAll=t.arrayRemove=t.arrayPush=t.arrayPop=t.arrayMove=t.arrayInsert=t.actionTypes=void 0;var o=n(632),i=r(o),a=n(59),u=r(a),s=(0,i["default"])(u["default"]),c=s.actionTypes,l=s.arrayInsert,p=s.arrayMove,f=s.arrayPop,d=s.arrayPush,h=s.arrayRemove,v=s.arrayRemoveAll,m=s.arrayShift,y=s.arraySplice,g=s.arraySwap,b=s.arrayUnshift,_=s.blur,E=s.autofill,x=s.change,C=s.destroy,w=s.Field,P=s.Fields,S=s.FieldArray,O=s.focus,T=s.formValueSelector,R=s.getFormValues,A=s.initialize,k=s.isDirty,M=s.isInvalid,N=s.isPristine,I=s.isValid,j=s.propTypes,F=s.reducer,D=s.reduxForm,L=s.reset,U=s.setSubmitFailed,V=s.setSubmitSucceeded,B=s.startAsyncValidation,W=s.startSubmit,q=s.stopAsyncValidation,H=s.stopSubmit,z=s.SubmissionError,Y=s.touch,K=s.untouch,G=s.values;t.actionTypes=c,t.arrayInsert=l,t.arrayMove=p,t.arrayPop=f,t.arrayPush=d,t.arrayRemove=h,t.arrayRemoveAll=v,t.arrayShift=m,t.arraySplice=y,t.arraySwap=g,t.arrayUnshift=b,t.blur=_,t.autofill=E,t.change=x,t.destroy=C,t.Field=w,t.Fields=P,t.FieldArray=S,t.focus=O,t.formValueSelector=T,t.getFormValues=R,t.initialize=A,t.isDirty=k,t.isInvalid=M,t.isPristine=N,t.isValid=I,t.propTypes=j,t.reducer=F,t.reduxForm=D,t.reset=L,t.setSubmitFailed=U,t.setSubmitSucceeded=V,t.startAsyncValidation=B,t.startSubmit=W,t.stopAsyncValidation=q,t.stopSubmit=H,t.SubmissionError=z,t.touch=Y,t.untouch=K,t.values=G},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var o=n(264),i=r(o),a=n(659),u=r(a),s=n(658),c=r(s),l=n(657),p=r(l),f=n(263),d=r(f),h=n(265);r(h);t.createStore=i["default"],t.combineReducers=u["default"],t.bindActionCreators=c["default"],t.applyMiddleware=p["default"],t.compose=d["default"]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t={};return e.firstName||(t.firstName="Required"),e.lastName||(t.lastName="Required"),e.email?/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(e.email)||(t.email="Invalid email address"):t.email="Required",e.sex||(t.sex="Required"),e.favoriteColor||(t.favoriteColor="Required"),t};t["default"]=n},function(e,t,n){"use strict";var r=n(16),o=n(57),i=n(15);e.exports=function(e){for(var t=r(this),n=i(t.length),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),s=a>2?arguments[2]:void 0,c=void 0===s?n:o(s,n);c>u;)t[u++]=e;return t}},function(e,t,n){"use strict";var r=n(12),o=n(43);e.exports=function(e,t,n){t in e?r.f(e,t,o(0,n)):e[t]=n}},function(e,t,n){var r=n(8),o=n(5).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(9)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(o){}}return!0}},function(e,t,n){e.exports=n(5).document&&document.documentElement},function(e,t,n){var r=n(8),o=n(126).set;e.exports=function(e,t,n){var i,a=t.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(e,i),e}},function(e,t,n){var r=n(62),o=n(9)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(26);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(52),o=n(43),i=n(63),a={};n(20)(a,n(9)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){"use strict";var r=n(51),o=n(1),i=n(21),a=n(20),u=n(17),s=n(62),c=n(121),l=n(63),p=n(25),f=n(9)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",v="keys",m="values",y=function(){return this};e.exports=function(e,t,n,g,b,_,E){c(n,t,g);var x,C,w,P=function(e){if(!d&&e in R)return R[e];switch(e){case v:return function(){return new n(this,e)};case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",O=b==m,T=!1,R=e.prototype,A=R[f]||R[h]||b&&R[b],k=A||P(b),M=b?O?P("entries"):k:void 0,N="Array"==t?R.entries||A:A;if(N&&(w=p(N.call(new e)),w!==Object.prototype&&(l(w,S,!0),r||u(w,f)||a(w,f,y))),O&&A&&A.name!==m&&(T=!0,k=function(){return A.call(this)}),r&&!E||!d&&!T&&R[f]||a(R,f,k),s[t]=k,s[S]=y,b)if(x={values:O?k:P(m),keys:_?k:P(v),entries:M},E)for(C in x)C in R||i(R,C,x[C]);else o(o.P+o.F*(d||T),t,x);return x}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var r=n(5),o=n(133).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,s="process"==n(26)(a);e.exports=function(){var e,t,n,c=function(){var r,o;for(s&&(r=a.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(i){throw e?n():t=void 0,i}}t=void 0,r&&r.enter()};if(s)n=function(){a.nextTick(c)};else if(i){var l=!0,p=document.createTextNode("");new i(c).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}else if(u&&u.resolve){var f=u.resolve();n=function(){f.then(c)}}else n=function(){o.call(r,c)};return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t,n){var r=n(8),o=n(3),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(37)(Function.call,n(24).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},function(e,t,n){var r=n(92)("keys"),o=n(58);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(3),o=n(19),i=n(9)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||void 0==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r=n(44),o=n(27);e.exports=function(e){return function(t,n){var i,a,u=String(o(t)),s=r(n),c=u.length;return s<0||s>=c?e?"":void 0:(i=u.charCodeAt(s),i<55296||i>56319||s+1===c||(a=u.charCodeAt(s+1))<56320||a>57343?e?u.charAt(s):i:e?u.slice(s,s+2):(i-55296<<10)+(a-56320)+65536)}}},function(e,t,n){var r=n(88),o=n(27);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},function(e,t,n){"use strict";var r=n(44),o=n(27);e.exports=function(e){var t=String(o(this)),n="",i=r(e);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t){e.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){var r,o,i,a=n(37),u=n(87),s=n(117),c=n(114),l=n(5),p=l.process,f=l.setImmediate,d=l.clearImmediate,h=l.MessageChannel,v=0,m={},y="onreadystatechange",g=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},b=function(e){g.call(e.data)};f&&d||(f=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return m[++v]=function(){u("function"==typeof e?e:Function(e),t)},r(v),v},d=function(e){delete m[e]},"process"==n(26)(p)?r=function(e){p.nextTick(a(g,e,1))}:h?(o=new h,i=o.port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",b,!1)):r=y in c("script")?function(e){s.appendChild(c("script"))[y]=function(){s.removeChild(this),g.call(e)}}:function(e){setTimeout(a(g,e,1),0)}),e.exports={set:f,clear:d}},function(e,t,n){"use strict";var r=n(5),o=n(11),i=n(51),a=n(93),u=n(20),s=n(55),c=n(7),l=n(50),p=n(44),f=n(15),d=n(53).f,h=n(12).f,v=n(112),m=n(63),y="ArrayBuffer",g="DataView",b="prototype",_="Wrong length!",E="Wrong index!",x=r[y],C=r[g],w=r.Math,P=r.RangeError,S=r.Infinity,O=x,T=w.abs,R=w.pow,A=w.floor,k=w.log,M=w.LN2,N="buffer",I="byteLength",j="byteOffset",F=o?"_b":N,D=o?"_l":I,L=o?"_o":j,U=function(e,t,n){var r,o,i,a=Array(n),u=8*n-t-1,s=(1<<u)-1,c=s>>1,l=23===t?R(2,-24)-R(2,-77):0,p=0,f=e<0||0===e&&1/e<0?1:0;for(e=T(e),e!=e||e===S?(o=e!=e?1:0,r=s):(r=A(k(e)/M),e*(i=R(2,-r))<1&&(r--,i*=2),e+=r+c>=1?l/i:l*R(2,1-c),e*i>=2&&(r++,i/=2),r+c>=s?(o=0,r=s):r+c>=1?(o=(e*i-1)*R(2,t),r+=c):(o=e*R(2,c-1)*R(2,t),r=0));t>=8;a[p++]=255&o,o/=256,t-=8);for(r=r<<t|o,u+=t;u>0;a[p++]=255&r,r/=256,u-=8);return a[--p]|=128*f,a},V=function(e,t,n){var r,o=8*n-t-1,i=(1<<o)-1,a=i>>1,u=o-7,s=n-1,c=e[s--],l=127&c;for(c>>=7;u>0;l=256*l+e[s],s--,u-=8);for(r=l&(1<<-u)-1,l>>=-u,u+=t;u>0;r=256*r+e[s],s--,u-=8);if(0===l)l=1-a;else{if(l===i)return r?NaN:c?-S:S;r+=R(2,t),l-=a}return(c?-1:1)*r*R(2,l-t)},B=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},W=function(e){return[255&e]},q=function(e){return[255&e,e>>8&255]},H=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},z=function(e){return U(e,52,8)},Y=function(e){return U(e,23,4)},K=function(e,t,n){h(e[b],t,{get:function(){return this[n]}})},G=function(e,t,n,r){var o=+n,i=p(o);if(o!=i||i<0||i+t>e[D])throw P(E);var a=e[F]._b,u=i+e[L],s=a.slice(u,u+t);return r?s:s.reverse()},$=function(e,t,n,r,o,i){var a=+n,u=p(a);if(a!=u||u<0||u+t>e[D])throw P(E);for(var s=e[F]._b,c=u+e[L],l=r(+o),f=0;f<t;f++)s[c+f]=l[i?f:t-f-1]},X=function(e,t){l(e,x,y);var n=+t,r=f(n);if(n!=r)throw P(_);return r};if(a.ABV){if(!c(function(){new x})||!c(function(){new x(.5)})){x=function(e){return new O(X(this,e))};for(var Q,Z=x[b]=O[b],J=d(O),ee=0;J.length>ee;)(Q=J[ee++])in x||u(x,Q,O[Q]);i||(Z.constructor=x)}var te=new C(new x(2)),ne=C[b].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||s(C[b],{setInt8:function(e,t){ne.call(this,e,t<<24>>24)},setUint8:function(e,t){ne.call(this,e,t<<24>>24)}},!0)}else x=function(e){var t=X(this,e);this._b=v.call(Array(t),0),this[D]=t},C=function(e,t,n){l(this,C,g),l(e,x,g);var r=e[D],o=p(t);if(o<0||o>r)throw P("Wrong offset!");if(n=void 0===n?r-o:f(n),o+n>r)throw P(_);this[F]=e,this[L]=o,this[D]=n},o&&(K(x,I,"_l"),K(C,N,"_b"),K(C,I,"_l"),K(C,j,"_o")),s(C[b],{getInt8:function(e){return G(this,1,e)[0]<<24>>24},getUint8:function(e){return G(this,1,e)[0]},getInt16:function(e){var t=G(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=G(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return B(G(this,4,e,arguments[1]))},getUint32:function(e){return B(G(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return V(G(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return V(G(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){$(this,1,e,W,t)},setUint8:function(e,t){$(this,1,e,W,t)},setInt16:function(e,t){$(this,2,e,q,t,arguments[2])},setUint16:function(e,t){$(this,2,e,q,t,arguments[2])},setInt32:function(e,t){$(this,4,e,H,t,arguments[2])},setUint32:function(e,t){$(this,4,e,H,t,arguments[2])},setFloat32:function(e,t){$(this,4,e,Y,t,arguments[2])},setFloat64:function(e,t){$(this,8,e,z,t,arguments[2])}});m(x,y),m(C,g),u(C[b],a.VIEW,!0),t[y]=x,t[g]=C},function(e,t,n){var r=n(5),o=n(36),i=n(51),a=n(199),u=n(12).f;e.exports=function(e){var t=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||u(t,e,{value:a.f(e)})}},function(e,t,n){var r=n(70),o=n(9)("iterator"),i=n(62);e.exports=n(36).getIteratorMethod=function(e){if(void 0!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){"use strict";var r=n(60),o=n(187),i=n(62),a=n(23);e.exports=n(122)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,n):"values"==t?o(0,e[n]):o(0,[n,e[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t){"use strict";function n(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function r(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(!o.call(t,r[a])||!n(e[r[a]],t[r[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=r},function(e,t){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=n},function(e,t,n){var r=n(65),o=n(46),i=r(o,"Map");e.exports=i},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(522),i=n(523),a=n(524),u=n(525),s=n(526);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t,n){function r(e,t,n,u,s){return e===t||(null==e||null==t||!i(e)&&!a(t)?e!==e&&t!==t:o(e,t,r,n,u,s))}var o=n(484),i=n(76),a=n(77);e.exports=r},function(e,t){function n(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}e.exports=n},function(e,t){function n(e,t){return t=null==t?r:t,!!t&&("number"==typeof e||o.test(e))&&e>-1&&e%1==0&&e<t}var r=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t,n){function r(e){if(!a(e)||d.call(e)!=u||i(e))return!1;var t=o(e);if(null===t)return!0;var n=p.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==f}var o=n(504),i=n(143),a=n(77),u="[object Object]",s=Function.prototype,c=Object.prototype,l=s.toString,p=c.hasOwnProperty,f=l.call(Object),d=c.toString; e.exports=r},function(e,t,n){function r(e){return a(e)?o(e):i(e)}var o=n(478),i=n(488),a=n(100);e.exports=r},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){l.insertTreeBefore(e,t,n)}function i(e,t,n){Array.isArray(t)?u(e,t[0],t[1],n):m(e,t,n)}function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],s(e,t,n),e.removeChild(n)}e.removeChild(t)}function u(e,t,n,r){for(var o=t;;){var i=o.nextSibling;if(m(e,o,r),o===n)break;o=i}}function s(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function c(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&m(r,document.createTextNode(n),o):n?(v(o,n),s(r,o,t)):s(r,e,t)}var l=n(67),p=n(564),f=n(239),d=(n(13),n(30),n(164)),h=n(108),v=n(252),m=d(function(e,t,n){e.insertBefore(t,n)}),y=p.dangerouslyReplaceNodeWithMarkup,g={dangerouslyReplaceNodeWithMarkup:y,replaceDelimitedText:c,processUpdates:function(e,t){for(var n=0;n<t.length;n++){var u=t[n];switch(u.type){case f.INSERT_MARKUP:o(e,u.content,r(e,u.afterNode));break;case f.MOVE_EXISTING:i(e,u.fromNode,r(e,u.afterNode));break;case f.SET_MARKUP:h(e,u.content);break;case f.TEXT_CONTENT:v(e,u.content);break;case f.REMOVE_NODE:a(e,u.fromNode)}}}};e.exports=g},function(e,t){"use strict";var n={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};e.exports=n},function(e,t,n){"use strict";function r(){if(u)for(var e in s){var t=s[e],n=u.indexOf(e);if(n>-1?void 0:a("96",e),!c.plugins[n]){t.extractEvents?void 0:a("97",e),c.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)?void 0:a("98",i,e)}}}function o(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,c.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];i(u,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),!0)}function i(e,t,n){c.registrationNameModules[e]?a("100",e):void 0,c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(4),u=(n(2),null),s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){u?a("101"):void 0,u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?a("102",n):void 0,s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=c.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){u=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=c},function(e,t,n){"use strict";function r(e){return e===g.topMouseUp||e===g.topTouchEnd||e===g.topTouchCancel}function o(e){return e===g.topMouseMove||e===g.topTouchMove}function i(e){return e===g.topMouseDown||e===g.topTouchStart}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=b.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(o,n,e):m.invokeGuardedCallback(o,n,e),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)a(e,t,n[o],r[o]);else n&&a(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null}function s(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function c(e){var t=s(e);return e._dispatchInstances=null,e._dispatchListeners=null,t}function l(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)?h("103"):void 0,e.currentTarget=t?b.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r}function p(e){return!!e._dispatchListeners}var f,d,h=n(4),v=n(40),m=n(158),y=(n(2),n(6),{injectComponentTree:function(e){f=e},injectTreeTraversal:function(e){d=e}}),g=v.topLevelTypes,b={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:l,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:c,hasDispatches:p,getInstanceFromNode:function(e){return f.getInstanceFromNode(e)},getNodeFromInstance:function(e){return f.getNodeFromInstance(e)},isAncestor:function(e,t){return d.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return d.getLowestCommonAncestor(e,t)},getParentInstance:function(e){return d.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return d.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,r,o){return d.traverseEnterLeave(e,t,n,r,o)},injection:y};e.exports=b},function(e,t){"use strict";function n(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function r(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var o={escape:n,unescape:r};e.exports=o},function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?u("87"):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?u("88"):void 0}function i(e){r(e),null!=e.checked||null!=e.onChange?u("89"):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var u=n(4),s=n(241),c=n(161),l=n(162),p=(n(2),n(6),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),f={value:function(e,t,n){return!e[t]||p[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:s.func},d={},h={checkPropTypes:function(e,t,n){for(var r in f){if(f.hasOwnProperty(r))var o=f[r](t,r,e,c.prop,null,l);if(o instanceof Error&&!(o.message in d)){d[o.message]=!0;a(n)}}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(i(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(i(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=h},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=a,this.updater=n||i}var o=n(4),i=n(159),a=(n(245),n(73));n(2),n(6);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?o("85"):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")};e.exports=r},function(e,t,n){"use strict";var r=n(4),o=(n(2),!1),i={replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o?r("104"):void 0,i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};e.exports=i},function(e,t,n){"use strict";function r(e){var t=Function.prototype.toString,n=Object.prototype.hasOwnProperty,r=RegExp("^"+t.call(n).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");try{var o=t.call(e);return r.test(o)}catch(i){return!1}}function o(e){return"."+e}function i(e){return parseInt(e.substr(1),10)}function a(e){if(C)return y.get(e);var t=o(e);return b[t]}function u(e){if(C)y["delete"](e);else{var t=o(e);delete b[t]}}function s(e,t,n){var r={element:t,parentID:n,text:null,childIDs:[],isMounted:!1,updateCount:0};if(C)y.set(e,r);else{var i=o(e);b[i]=r}}function c(e){if(C)g.add(e);else{var t=o(e);_[t]=!0}}function l(e){if(C)g["delete"](e);else{var t=o(e);delete _[t]}}function p(){return C?Array.from(y.keys()):Object.keys(b).map(i)}function f(){return C?Array.from(g.keys()):Object.keys(_).map(i)}function d(e){var t=a(e);if(t){var n=t.childIDs;u(e),n.forEach(d)}}function h(e,t,n){return"\n in "+e+(t?" (at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+")":n?" (created by "+n+")":"")}function v(e){return null==e?"#empty":"string"==typeof e||"number"==typeof e?"#text":"string"==typeof e.type?e.type:e.type.displayName||e.type.name||"Unknown"}function m(e){var t,n=P.getDisplayName(e),r=P.getElement(e),o=P.getOwnerID(e);return o&&(t=P.getDisplayName(o)),h(n,r&&r._source,t)}var y,g,b,_,E=n(4),x=n(49),C=(n(2),n(6),"function"==typeof Array.from&&"function"==typeof Map&&r(Map)&&null!=Map.prototype&&"function"==typeof Map.prototype.keys&&r(Map.prototype.keys)&&"function"==typeof Set&&r(Set)&&null!=Set.prototype&&"function"==typeof Set.prototype.keys&&r(Set.prototype.keys));C?(y=new Map,g=new Set):(b={},_={});var w=[],P={onSetChildren:function(e,t){var n=a(e);n.childIDs=t;for(var r=0;r<t.length;r++){var o=t[r],i=a(o);i?void 0:E("140"),null==i.childIDs&&"object"==typeof i.element&&null!=i.element?E("141"):void 0,i.isMounted?void 0:E("71"),null==i.parentID&&(i.parentID=e),i.parentID!==e?E("142",o,i.parentID,e):void 0}},onBeforeMountComponent:function(e,t,n){s(e,t,n)},onBeforeUpdateComponent:function(e,t){var n=a(e);n&&n.isMounted&&(n.element=t)},onMountComponent:function(e){var t=a(e);t.isMounted=!0;var n=0===t.parentID;n&&c(e)},onUpdateComponent:function(e){var t=a(e);t&&t.isMounted&&t.updateCount++},onUnmountComponent:function(e){var t=a(e);if(t){t.isMounted=!1;var n=0===t.parentID;n&&l(e)}w.push(e)},purgeUnmountedComponents:function(){if(!P._preventPurging){for(var e=0;e<w.length;e++){var t=w[e];d(t)}w.length=0}},isMounted:function(e){var t=a(e);return!!t&&t.isMounted},getCurrentStackAddendum:function(e){var t="";if(e){var n=e.type,r="function"==typeof n?n.displayName||n.name:n,o=e._owner;t+=h(r||"Unknown",e._source,o&&o.getName())}var i=x.current,a=i&&i._debugID;return t+=P.getStackAddendumByID(a)},getStackAddendumByID:function(e){for(var t="";e;)t+=m(e),e=P.getParentID(e);return t},getChildIDs:function(e){var t=a(e);return t?t.childIDs:[]},getDisplayName:function(e){var t=P.getElement(e);return t?v(t):null},getElement:function(e){var t=a(e);return t?t.element:null},getOwnerID:function(e){var t=P.getElement(e);return t&&t._owner?t._owner._debugID:null},getParentID:function(e){var t=a(e);return t?t.parentID:null},getSource:function(e){var t=a(e),n=t?t.element:null,r=null!=n?n._source:null;return r},getText:function(e){var t=P.getElement(e);return"string"==typeof t?t:"number"==typeof t?""+t:null},getUpdateCount:function(e){var t=a(e);return t?t.updateCount:0},getRegisteredIDs:p,getRootIDs:f};e.exports=P},function(e,t,n){"use strict";function r(e,t,n,r){try{return t(n,r)}catch(i){return void(null===o&&(o=i))}}var o=null,i={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var e=o;throw o=null,e}}};e.exports=i},function(e,t,n){"use strict";function r(e,t){}var o=(n(6),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")}});e.exports=o},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(94),o=r({prop:null,context:null,childContext:null});e.exports=o},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){"use strict";function r(e){s.enqueueUpdate(e)}function o(e){var t=typeof e;if("object"!==t)return t;var n=e.constructor&&e.constructor.name||t,r=Object.keys(e);return r.length>0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function i(e,t){var n=u.get(e);if(!n){return null}return n}var a=n(4),u=(n(49),n(80)),s=(n(30),n(35)),c=(n(2),n(6),{isMounted:function(e){var t=u.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){c.validateCallback(t,n);var o=i(e);return o?(o._pendingCallbacks?o._pendingCallbacks.push(t):o._pendingCallbacks=[t],void r(o)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=i(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=i(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=i(e,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?a("122",t,o(e)):void 0}});e.exports=c},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e};e.exports=n},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return!!r&&!!n[r]}function r(e){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t,n){"use strict";/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(18);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?c.escape(e.key):t.toString(36)}function o(e,t,n,i){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||u.isValidElement(e))return n(i,e,""===t?l+r(e,0):t),1;var d,h,v=0,m=""===t?l:t+p;if(Array.isArray(e))for(var y=0;y<e.length;y++)d=e[y],h=m+r(d,y),v+=o(d,h,n,i);else{var g=s(e);if(g){var b,_=g.call(e);if(g!==e.entries)for(var E=0;!(b=_.next()).done;)d=b.value,h=m+r(d,E++),v+=o(d,h,n,i);else for(;!(b=_.next()).done;){var x=b.value;x&&(d=x[1],h=m+c.escape(x[0])+p+r(d,0),v+=o(d,h,n,i))}}else if("object"===f){var C="",w=String(e);a("31","[object Object]"===w?"object with keys {"+Object.keys(e).join(", ")+"}":w,C)}}return v}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=n(4),u=(n(49),n(34)),s=n(248),c=(n(2),n(153)),l=(n(6),"."),p=":";e.exports=i},function(e,t,n){"use strict";var r=(n(10),n(29)),o=(n(6),r);e.exports=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ARRAY_INSERT="redux-form/ARRAY_INSERT",t.ARRAY_MOVE="redux-form/ARRAY_MOVE",t.ARRAY_POP="redux-form/ARRAY_POP",t.ARRAY_PUSH="redux-form/ARRAY_PUSH",t.ARRAY_REMOVE="redux-form/ARRAY_REMOVE",t.ARRAY_REMOVE_ALL="redux-form/ARRAY_REMOVE_ALL",t.ARRAY_SHIFT="redux-form/ARRAY_SHIFT",t.ARRAY_SPLICE="redux-form/ARRAY_SPLICE",t.ARRAY_UNSHIFT="redux-form/ARRAY_UNSHIFT",t.ARRAY_SWAP="redux-form/ARRAY_SWAP",t.AUTOFILL="redux-form/AUTOFILL",t.BLUR="redux-form/BLUR",t.CHANGE="redux-form/CHANGE",t.DESTROY="redux-form/DESTROY",t.FOCUS="redux-form/FOCUS",t.INITIALIZE="redux-form/INITIALIZE",t.REGISTER_FIELD="redux-form/REGISTER_FIELD",t.RESET="redux-form/RESET",t.SET_SUBMIT_FAILED="redux-form/SET_SUBMIT_FAILED",t.SET_SUBMIT_SUCCEEDED="redux-form/SET_SUBMIT_SUCCEEDED",t.START_ASYNC_VALIDATION="redux-form/START_ASYNC_VALIDATION",t.START_SUBMIT="redux-form/START_SUBMIT",t.STOP_ASYNC_VALIDATION="redux-form/STOP_ASYNC_VALIDATION",t.STOP_SUBMIT="redux-form/STOP_SUBMIT",t.TOUCH="redux-form/TOUCH",t.UNREGISTER_FIELD="redux-form/UNREGISTER_FIELD",t.UNTOUCH="redux-form/UNTOUCH",t.UPDATE_SYNC_ERRORS="redux-form/UPDATE_SYNC_ERRORS"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(643),i=r(o),a=function(e){var t=e.getIn,n=(0,i["default"])(e);return function(e){var r=arguments.length<=1||void 0===arguments[1]?function(e){return t(e,"form")}:arguments[1];return function(o){var i=r(o),a=t(i,e+".error");if(a)return!1;var u=t(i,e+".syncErrors"),s=t(i,e+".asyncErrors"),c=t(i,e+".submitErrors");if(!u&&!s&&!c)return!0;var l=t(i,e+".registeredFields")||[];return!l.some(function(e){return n(e,u,s,c)})}}};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(661),i=r(o),a=function(e,t,n){return!(0,i["default"])(e.props,t)||!(0,i["default"])(e.state,n)};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(14),a=r(i),u=function(e){var t=e.input,n=e.label,r=e.type,i=e.meta,u=i.touched,s=i.error;return a["default"].createElement("div",null,a["default"].createElement("label",null,n),a["default"].createElement("div",null,a["default"].createElement("input",o({},t,{placeholder:n,type:r})),u&&s&&a["default"].createElement("span",null,s)))};t["default"]=u},function(e,t,n){var r=n(26);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){"use strict";var r=n(16),o=n(57),i=n(15);e.exports=[].copyWithin||function(e,t){var n=r(this),a=i(n.length),u=o(e,a),s=o(t,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:o(c,a))-s,a-u),p=1;for(s<u&&u<s+l&&(p=-1,s+=l-1,u+=l-1);l-- >0;)s in n?n[u]=n[s]:delete n[u],u+=p,s+=p;return n}},function(e,t,n){var r=n(61);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){var r=n(19),o=n(16),i=n(71),a=n(15);e.exports=function(e,t,n,u,s){r(t);var c=o(e),l=i(c),p=a(c.length),f=s?p-1:0,d=s?-1:1;if(n<2)for(;;){if(f in l){u=l[f],f+=d;break}if(f+=d,s?f<0:p<=f)throw TypeError("Reduce of empty array with no initial value")}for(;s?f>=0:p>f;f+=d)f in l&&(u=t(u,l[f],f,c));return u}},function(e,t,n){"use strict";var r=n(19),o=n(8),i=n(87),a=[].slice,u={},s=function(e,t,n){if(!(t in u)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";u[t]=Function("F,a","return new F("+r.join(",")+")")}return u[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=a.call(arguments,1),u=function(){var r=n.concat(a.call(arguments));return this instanceof u?s(t,r.length,r):i(t,r,e)};return o(t.prototype)&&(u.prototype=t.prototype),u}},function(e,t,n){"use strict";var r=n(12).f,o=n(52),i=n(55),a=n(37),u=n(50),s=n(27),c=n(61),l=n(122),p=n(187),f=n(56),d=n(11),h=n(42).fastKey,v=d?"_s":"size",m=function(e,t){var n,r=h(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,l){var p=e(function(e,r){u(e,p,t,"_i"),e._i=o(null),e._f=void 0,e._l=void 0,e[v]=0,void 0!=r&&c(r,n,e[l],e)});return i(p.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[v]=0},"delete":function(e){var t=this,n=m(t,e);if(n){var r=n.n,o=n.p;delete t._i[n.i],n.r=!0,o&&(o.n=r),r&&(r.p=o),t._f==n&&(t._f=r),t._l==n&&(t._l=o),t[v]--}return!!n},forEach:function(e){u(this,p,"forEach");for(var t,n=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!m(this,e)}}),d&&r(p.prototype,"size",{get:function(){return s(this[v])}}),p},def:function(e,t,n){var r,o,i=m(e,t);return i?i.v=n:(e._l=i={i:o=h(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=i),r&&(r.n=i),e[v]++,"F"!==o&&(e._i[o]=i)),e},getEntry:m,setStrong:function(e,t,n){l(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?p(0,n.k):"values"==t?p(0,n.v):p(0,[n.k,n.v]):(e._t=void 0,p(1))},n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){var r=n(70),o=n(178);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return o(this)}}},function(e,t,n){"use strict";var r=n(55),o=n(42).getWeak,i=n(3),a=n(8),u=n(50),s=n(61),c=n(31),l=n(17),p=c(5),f=c(6),d=0,h=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},m=function(e,t){return p(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=m(this,e);if(t)return t[1]},has:function(e){return!!m(this,e)},set:function(e,t){var n=m(this,e);n?n[1]=t:this.a.push([e,t])},"delete":function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,i){var c=e(function(e,r){u(e,c,t,"_i"),e._i=d++,e._l=void 0,void 0!=r&&s(r,n,e[i],e)});return r(c.prototype,{"delete":function(e){if(!a(e))return!1;var t=o(e);return t===!0?h(this)["delete"](e):t&&l(t,this._i)&&delete t[this._i]},has:function(e){if(!a(e))return!1;var t=o(e);return t===!0?h(this).has(e):t&&l(t,this._i)}}),c},def:function(e,t,n){var r=o(i(t),!0);return r===!0?h(e).set(t,n):r[e._i]=n,e},ufstore:h}},function(e,t,n){e.exports=!n(11)&&!n(7)(function(){return 7!=Object.defineProperty(n(114)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(8),o=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t,n){var r=n(3);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(i){var a=e["return"];throw void 0!==a&&r(a.call(e)),i}}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){"use strict";var r=n(54),o=n(91),i=n(72),a=n(16),u=n(71),s=Object.assign;e.exports=!s||n(7)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=s({},e)[n]||Object.keys(s({},t)).join("")!=r})?function(e,t){for(var n=a(e),s=arguments.length,c=1,l=o.f,p=i.f;s>c;)for(var f,d=u(arguments[c++]),h=l?r(d).concat(l(d)):r(d),v=h.length,m=0;v>m;)p.call(d,f=h[m++])&&(n[f]=d[f]);return n}:s},function(e,t,n){var r=n(12),o=n(3),i=n(54);e.exports=n(11)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),u=a.length,s=0;u>s;)r.f(e,n=a[s++],t[n]);return e}},function(e,t,n){var r=n(23),o=n(53).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],u=function(e){try{return o(e)}catch(t){return a.slice()}};e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?u(e):o(r(e))}},function(e,t,n){var r=n(17),o=n(23),i=n(83)(!1),a=n(127)("IE_PROTO");e.exports=function(e,t){var n,u=o(e),s=0,c=[];for(n in u)n!=a&&r(u,n)&&c.push(n);for(;t.length>s;)r(u,n=t[s++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var r=n(54),o=n(23),i=n(72).f;e.exports=function(e){return function(t){for(var n,a=o(t),u=r(a),s=u.length,c=0,l=[];s>c;)i.call(a,n=u[c++])&&l.push(e?[n,a[n]]:a[n]);return l}}},function(e,t,n){var r=n(53),o=n(91),i=n(3),a=n(5).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(i(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(5).parseFloat,o=n(64).trim;e.exports=1/r(n(132)+"-0")!==-(1/0)?function(e){var t=o(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(5).parseInt,o=n(64).trim,i=n(132),a=/^[\-+]?0[xX]/;e.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(e,t){var n=o(String(e),3);return r(n,t>>>0||(a.test(n)?16:10))}:r},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(15),o=n(131),i=n(27);e.exports=function(e,t,n,a){var u=String(i(e)),s=u.length,c=void 0===n?" ":String(n),l=r(t);if(l<=s||""==c)return u;var p=l-s,f=o.call(c,Math.ceil(p/c.length));return f.length>p&&(f=f.slice(0,p)),a?f+u:u+f}},function(e,t,n){t.f=n(9)},function(e,t,n){"use strict";var r=n(181);e.exports=n(84)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},function(e,t,n){n(11)&&"g"!=/./g.flags&&n(12).f(RegExp.prototype,"flags",{configurable:!0,get:n(86)})},function(e,t,n){"use strict";var r=n(181);e.exports=n(84)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,o=n(31)(0),i=n(21),a=n(42),u=n(189),s=n(183),c=n(8),l=a.getWeak,p=Object.isExtensible,f=s.ufstore,d={},h=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(e){if(c(e)){var t=l(e);return t===!0?f(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return s.def(this,e,t)}},m=e.exports=n(84)("WeakMap",h,v,s,!0,!0);7!=(new m).set((Object.freeze||Object)(d),7).get(d)&&(r=s.getConstructor(h),u(r.prototype,v),a.NEED=!0,o(["delete","has","get","set"],function(e){var t=m.prototype,n=t[e];i(t,e,function(t,o){if(c(t)&&!p(t)){this._f||(this._f=new r);var i=this._f[e](t,o);return"set"==e?this:i}return n.call(this,t,o)})}))},function(e,t,n){"use strict";var r=n(29),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;e.exports=function(e,t,i){if("string"!=typeof t){var a=Object.getOwnPropertyNames(t);o&&(a=a.concat(Object.getOwnPropertySymbols(t)));for(var u=0;u<a.length;++u)if(!(n[a[u]]||r[a[u]]||i&&i[a[u]]))try{e[a[u]]=t[a[u]]}catch(s){}}return e}},function(e,t,n){function r(e){this.__data__=new o(e)}var o=n(95),i=n(533),a=n(534),u=n(535),s=n(536),c=n(537);r.prototype.clear=i,r.prototype["delete"]=a,r.prototype.get=u,r.prototype.has=s,r.prototype.set=c,e.exports=r},function(e,t,n){var r=n(46),o=r.Symbol;e.exports=o},function(e,t){function n(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=n},function(e,t,n){function r(e,t){return e&&o(e,t,i)}var o=n(481),i=n(148);e.exports=r},function(e,t,n){function r(e,t){t=i(t,e)?[t]:o(t);for(var n=0,r=t.length;null!=e&&n<r;)e=e[a(t[n++])];return n&&n==r?e:void 0}var o=n(214),i=n(98),a=n(75);e.exports=r},function(e,t,n){function r(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?u(e)?i(e[0],e[1]):o(e):s(e)}var o=n(489),i=n(490),a=n(540),u=n(47),s=n(546);e.exports=r},function(e,t,n){function r(e){return o(e)?e:i(e)}var o=n(47),i=n(220);e.exports=r},function(e,t,n){function r(e,t,n,r,s,c){var l=s&u,p=e.length,f=t.length;if(p!=f&&!(l&&f>p))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var h=-1,v=!0,m=s&a?new o:void 0;for(c.set(e,t),c.set(t,e);++h<p;){var y=e[h],g=t[h];if(r)var b=l?r(g,y,h,t,e,c):r(y,g,h,e,t,c);if(void 0!==b){if(b)continue;v=!1;break}if(m){if(!i(t,function(e,t){if(!m.has(t)&&(y===e||n(y,e,r,s,c)))return m.add(t)})){v=!1;break}}else if(y!==g&&!n(y,g,r,s,c)){v=!1;break}}return c["delete"](e),c["delete"](t),v}var o=n(475),i=n(210),a=1,u=2;e.exports=r},function(e,t){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,function(){return this}())},function(e,t,n){function r(e){return e===e&&!o(e)}var o=n(76);e.exports=r},function(e,t){function n(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}e.exports=n},function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},function(e,t,n){var r=n(544),o=n(548),i=/^\./,a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,s=r(function(e){e=o(e);var t=[];return i.test(e)&&t.push(""),e.replace(a,function(e,n,r,o){t.push(r?o.replace(u,"$1"):n||e)}),t});e.exports=s},function(e,t){function n(e){if(null!=e){try{return o.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var r=Function.prototype,o=r.toString;e.exports=n},function(e,t,n){function r(e){return o(e)&&u.call(e,"callee")&&(!c.call(e,"callee")||s.call(e)==i)}var o=n(541),i="[object Arguments]",a=Object.prototype,u=a.hasOwnProperty,s=a.toString,c=a.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){var t=o(e)?s.call(e):"";return t==i||t==a}var o=n(76),i="[object Function]",a="[object GeneratorFunction]",u=Object.prototype,s=u.toString;e.exports=r},function(e,t,n){function r(e,t){var n={};return t=i(t,3),o(e,function(e,r,o){n[r]=t(e,r,o)}),n}var o=n(211),i=n(213);e.exports=r},function(e,t,n){"use strict";t.__esModule=!0;var r=n(14);t["default"]=r.PropTypes.shape({subscribe:r.PropTypes.func.isRequired,dispatch:r.PropTypes.func.isRequired,getState:r.PropTypes.func.isRequired})},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t["default"]=n},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var i={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};e.exports=a},function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=n(4),i=n(10),a=n(48);n(2);i(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?o("24"):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n<e.length;n++)e[n].call(t[n]);e.length=0,t.length=0}},checkpoint:function(){return this._callbacks?this._callbacks.length:0},rollback:function(e){this._callbacks&&(this._callbacks.length=e,this._contexts.length=e)},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),a.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e){return!!c.hasOwnProperty(e)||!s.hasOwnProperty(e)&&(u.test(e)?(c[e]=!0,!0):(s[e]=!0,!1))}function o(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&t<1||e.hasOverloadedBooleanValue&&t===!1}var i=n(68),a=(n(13),n(30),n(622)),u=(n(6),new RegExp("^["+i.ATTRIBUTE_NAME_START_CHAR+"]["+i.ATTRIBUTE_NAME_CHAR+"]*$")),s={},c={},l={createMarkupForID:function(e){return i.ID_ATTRIBUTE_NAME+"="+a(e)},setAttributeForID:function(e,t){e.setAttribute(i.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return i.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(i.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+a(t)}return i.isCustomAttribute(e)?null==t?"":e+"="+a(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+a(t):""},setValueForProperty:function(e,t,n){var r=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else{if(o(r,n))return void this.deleteValueForProperty(e,t);if(r.mustUseProperty)e[r.propertyName]=n;else{var u=r.attributeName,s=r.attributeNamespace;s?e.setAttributeNS(s,u,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(u,""):e.setAttribute(u,""+n)}}}else if(i.isCustomAttribute(t))return void l.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){if(r(t)){null==n?e.removeAttribute(t):e.setAttribute(t,""+n)}},deleteValueForAttribute:function(e,t){e.removeAttribute(t)},deleteValueForProperty:function(e,t){var n=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseProperty){var o=n.propertyName;n.hasBooleanValue?e[o]=!1:e[o]=""}else e.removeAttribute(n.attributeName)}else i.isCustomAttribute(t)&&e.removeAttribute(t)}};e.exports=l},function(e,t,n){"use strict";function r(e){return(""+e).replace(_,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);y(e,i,r),o.release(r)}function u(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function s(e,t,n){var o=e.result,i=e.keyPrefix,a=e.func,u=e.context,s=a.call(u,t,e.count++);Array.isArray(s)?c(s,o,n,m.thatReturnsArgument):null!=s&&(v.isValidElement(s)&&(s=v.cloneAndReplaceKey(s,i+(!s.key||t&&t.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function c(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=u.getPooled(t,a,o,i);y(e,s,c),u.release(c)}function l(e,t,n){if(null==e)return e;var r=[];return c(e,r,null,t,n),r}function p(e,t,n){return null}function f(e,t){return y(e,p,null)}function d(e){var t=[];return c(e,t,null,m.thatReturnsArgument),t}var h=n(48),v=n(34),m=n(29),y=n(170),g=h.twoArgumentPooler,b=h.fourArgumentPooler,_=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,g),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(u,b);var E={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:f,toArray:d};e.exports=E},function(e,t,n){"use strict";function r(e,t){var n=x.hasOwnProperty(t)?x[t]:null;w.hasOwnProperty(t)&&(n!==_.OVERRIDE_BASE?p("73",t):void 0),e&&(n!==_.DEFINE_MANY&&n!==_.DEFINE_MANY_MERGED?p("74",t):void 0)}function o(e,t){if(t){"function"==typeof t?p("75"):void 0,h.isValidElement(t)?p("76"):void 0;var n=e.prototype,o=n.__reactAutoBindPairs;t.hasOwnProperty(b)&&C.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==b){var a=t[i],c=n.hasOwnProperty(i);if(r(c,i),C.hasOwnProperty(i))C[i](e,a);else{var l=x.hasOwnProperty(i),f="function"==typeof a,d=f&&!l&&!c&&t.autobind!==!1;if(d)o.push(i,a),n[i]=a;else if(c){var v=x[i];!l||v!==_.DEFINE_MANY_MERGED&&v!==_.DEFINE_MANY?p("77",v,i):void 0,v===_.DEFINE_MANY_MERGED?n[i]=u(n[i],a):v===_.DEFINE_MANY&&(n[i]=s(n[i],a))}else n[i]=a}}}else;}function i(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in C;o?p("78",n):void 0;var i=n in e;i?p("79",n):void 0,e[n]=r}}}function a(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:p("80");for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?p("81",n):void 0,e[n]=t[n]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return a(o,n),a(o,r),o}}function s(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function c(e,t){var n=t.bind(e);return n}function l(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=c(e,o)}}var p=n(4),f=n(10),d=n(155),h=n(34),v=(n(161),n(160),n(159)),m=n(73),y=(n(2),n(94)),g=n(45),b=(n(6),g({mixins:null})),_=y({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),E=[],x={mixins:_.DEFINE_MANY,statics:_.DEFINE_MANY,propTypes:_.DEFINE_MANY,contextTypes:_.DEFINE_MANY,childContextTypes:_.DEFINE_MANY,getDefaultProps:_.DEFINE_MANY_MERGED,getInitialState:_.DEFINE_MANY_MERGED,getChildContext:_.DEFINE_MANY_MERGED,render:_.DEFINE_ONCE,componentWillMount:_.DEFINE_MANY,componentDidMount:_.DEFINE_MANY,componentWillReceiveProps:_.DEFINE_MANY,shouldComponentUpdate:_.DEFINE_ONCE,componentWillUpdate:_.DEFINE_MANY,componentDidUpdate:_.DEFINE_MANY,componentWillUnmount:_.DEFINE_MANY,updateComponent:_.OVERRIDE_BASE},C={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)o(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=f({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=f({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=f({},e.propTypes,t)},statics:function(e,t){i(e,t)},autobind:function(){}},w={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},P=function(){};f(P.prototype,d.prototype,w);var S={createClass:function(e){var t=function(e,n,r){this.__reactAutoBindPairs.length&&l(this),this.props=e,this.context=n,this.refs=m,this.updater=r||v,this.state=null;var o=this.getInitialState?this.getInitialState():null;"object"!=typeof o||Array.isArray(o)?p("82",t.displayName||"ReactCompositeComponent"):void 0,this.state=o};t.prototype=new P,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],E.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:p("83");for(var n in x)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){E.push(e)}}};e.exports=S},function(e,t){"use strict";var n={hasCachedChildNodes:1};e.exports=n},function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=s.getValue(e);null!=t&&o(this,Boolean(e.multiple),t)}}function o(e,t,n){var r,o,i=c.getNodeFromInstance(e).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<i.length;o++){var a=r.hasOwnProperty(i[o].value);i[o].selected!==a&&(i[o].selected=a)}}else{for(r=""+n,o=0;o<i.length;o++)if(i[o].value===r)return void(i[o].selected=!0);i.length&&(i[0].selected=!0)}}function i(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),l.asap(r,this),n}var a=n(10),u=n(104),s=n(154),c=n(13),l=n(35),p=(n(6),!1),f={getHostProps:function(e,t){return a({},u.getHostProps(e,t),{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=s.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,listeners:null,onChange:i.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||p||(p=!0)},getSelectValueContext:function(e){return e._wrapperState.initialValue},postUpdateWrapper:function(e){var t=e._currentElement.props;e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var r=s.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,o(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?o(e,Boolean(t.multiple),t.defaultValue):o(e,Boolean(t.multiple),t.multiple?[]:""))}};e.exports=f},function(e,t){"use strict";var n,r={injectEmptyComponentFactory:function(e){n=e}},o={create:function(e){return n(e)}};o.injection=r,e.exports=o},function(e,t){"use strict";var n={logTopLevelRenders:!1};e.exports=n},function(e,t,n){"use strict";function r(e){return s?void 0:a("111",e.type),new s(e)}function o(e){return new l(e)}function i(e){return e instanceof l}var a=n(4),u=n(10),s=(n(2),null),c={},l=null,p={injectGenericComponentClass:function(e){s=e},injectTextComponentClass:function(e){l=e},injectComponentClasses:function(e){u(c,e)}},f={createInternalComponent:r,createInstanceForText:o,isTextComponent:i,injection:p};e.exports=f},function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var o=n(583),i=n(456),a=n(205),u=n(206),s={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=u();return{focusedElem:e,selectionRange:s.hasSelectionCapabilities(e)?s.getSelection(e):null}},restoreSelection:function(e){var t=u(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(s.hasSelectionCapabilities(n)&&s.setSelection(n,o),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if(void 0===r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};e.exports=s},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===I?e.documentElement:e.firstChild:null}function i(e){return e.getAttribute&&e.getAttribute(k)||""}function a(e,t,n,r,o){var i;if(E.logTopLevelRenders){var a=e._currentElement.props,u=a.type;i="React mount: "+("string"==typeof u?u:u.displayName||u.name),console.time(i)}var s=w.mountComponent(e,n,null,g(e,t),o,0);i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,U._mountImageIntoNode(s,t,e,r,n)}function u(e,t,n,r){var o=S.ReactReconcileTransaction.getPooled(!n&&b.useCreateElement);o.perform(a,null,e,t,o,n,r),S.ReactReconcileTransaction.release(o)}function s(e,t,n){for(w.unmountComponent(e,n),t.nodeType===I&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function c(e){var t=o(e);if(t){var n=y.getInstanceFromNode(t);return!(!n||!n._hostParent)}}function l(e){return!(!e||e.nodeType!==N&&e.nodeType!==I&&e.nodeType!==j)}function p(e){var t=o(e),n=t&&y.getInstanceFromNode(t);return n&&!n._hostParent?n:null}function f(e){var t=p(e);return t?t._hostContainerInfo._topLevelWrapper:null}var d=n(4),h=n(67),v=n(68),m=n(105),y=(n(49),n(13)),g=n(576),b=n(579),_=n(34),E=n(235),x=n(80),C=(n(30),n(592)),w=n(69),P=n(163),S=n(35),O=n(73),T=n(250),R=(n(2),n(108)),A=n(169),k=(n(6),v.ID_ATTRIBUTE_NAME),M=v.ROOT_ATTRIBUTE_NAME,N=1,I=9,j=11,F={},D=1,L=function(){this.rootID=D++};L.prototype.isReactComponent={},L.prototype.render=function(){return this.props};var U={TopLevelWrapper:L,_instancesByReactRootID:F,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r,o){return U.scrollMonitor(r,function(){P.enqueueElementInternal(e,t,n),o&&P.enqueueCallbackInternal(e,o)}),e},_renderNewRootComponent:function(e,t,n,r){l(t)?void 0:d("37"),m.ensureScrollValueMonitoring();var o=T(e,!1);S.batchedUpdates(u,o,t,n,r);var i=o._instance.rootID;return F[i]=o,o},renderSubtreeIntoContainer:function(e,t,n,r){return null!=e&&x.has(e)?void 0:d("38"),U._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){P.validateCallback(r,"ReactDOM.render"),_.isValidElement(t)?void 0:d("39","string"==typeof t?" Instead of passing a string like 'div', pass React.createElement('div') or <div />.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or <Foo />.":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":""); var a,u=_(L,null,null,null,null,null,t);if(e){var s=x.get(e);a=s._processChildContext(s._context)}else a=O;var l=f(n);if(l){var p=l._currentElement,h=p.props;if(A(h,t)){var v=l._renderedComponent.getPublicInstance(),m=r&&function(){r.call(v)};return U._updateRootComponent(l,u,a,n,m),v}U.unmountComponentAtNode(n)}var y=o(n),g=y&&!!i(y),b=c(n),E=g&&!l&&!b,C=U._renderNewRootComponent(u,n,E,a)._renderedComponent.getPublicInstance();return r&&r.call(C),C},render:function(e,t,n){return U._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){l(e)?void 0:d("40");var t=f(e);if(!t){c(e),1===e.nodeType&&e.hasAttribute(M);return!1}return delete F[t._instance.rootID],S.batchedUpdates(s,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,i,a){if(l(t)?void 0:d("41"),i){var u=o(t);if(C.canReuseMarkup(e,u))return void y.precacheNode(n,u);var s=u.getAttribute(C.CHECKSUM_ATTR_NAME);u.removeAttribute(C.CHECKSUM_ATTR_NAME);var c=u.outerHTML;u.setAttribute(C.CHECKSUM_ATTR_NAME,s);var p=e,f=r(p,c),v=" (client) "+p.substring(f-20,f+20)+"\n (server) "+c.substring(f-20,f+20);t.nodeType===I?d("42",v):void 0}if(t.nodeType===I?d("43"):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);h.insertTreeBefore(t,e,null)}else R(t,e),y.precacheNode(n,t.firstChild)}};e.exports=U},function(e,t,n){"use strict";var r=n(94),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";var r=n(4),o=n(34),i=(n(2),{HOST:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?i.EMPTY:o.isValidElement(e)?"function"==typeof e.type?i.COMPOSITE:i.HOST:void r("26",e)}});e.exports=i},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e){this.message=e,this.stack=""}function i(e){function t(t,n,r,i,a,u,s){i=i||S,u=u||r;if(null==n[r]){var c=x[a];return t?new o("Required "+c+" `"+u+"` was not specified in "+("`"+i+"`.")):null}return e(n,r,i,a,u)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function a(e){function t(t,n,r,i,a,u){var s=t[n],c=g(s);if(c!==e){var l=x[i],p=b(s);return new o("Invalid "+l+" `"+a+"` of type "+("`"+p+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return i(t)}function u(){return i(w.thatReturns(null))}function s(e){function t(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=t[n];if(!Array.isArray(u)){var s=x[i],c=g(u);return new o("Invalid "+s+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected an array."))}for(var l=0;l<u.length;l++){var p=e(u,l,r,i,a+"["+l+"]",C);if(p instanceof Error)return p}return null}return i(t)}function c(){function e(e,t,n,r,i){var a=e[t];if(!E.isValidElement(a)){var u=x[r],s=g(a);return new o("Invalid "+u+" `"+i+"` of type "+("`"+s+"` supplied to `"+n+"`, expected a single ReactElement."))}return null}return i(e)}function l(e){function t(t,n,r,i,a){if(!(t[n]instanceof e)){var u=x[i],s=e.name||S,c=_(t[n]);return new o("Invalid "+u+" `"+a+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("instance of `"+s+"`."))}return null}return i(t)}function p(e){function t(t,n,i,a,u){for(var s=t[n],c=0;c<e.length;c++)if(r(s,e[c]))return null;var l=x[a],p=JSON.stringify(e);return new o("Invalid "+l+" `"+u+"` of value `"+s+"` "+("supplied to `"+i+"`, expected one of "+p+"."))}return Array.isArray(e)?i(t):w.thatReturnsNull}function f(e){function t(t,n,r,i,a){if("function"!=typeof e)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=t[n],s=g(u);if("object"!==s){var c=x[i];return new o("Invalid "+c+" `"+a+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an object."))}for(var l in u)if(u.hasOwnProperty(l)){var p=e(u,l,r,i,a+"."+l,C);if(p instanceof Error)return p}return null}return i(t)}function d(e){function t(t,n,r,i,a){for(var u=0;u<e.length;u++){var s=e[u];if(null==s(t,n,r,i,a,C))return null}var c=x[i];return new o("Invalid "+c+" `"+a+"` supplied to "+("`"+r+"`."))}return Array.isArray(e)?i(t):w.thatReturnsNull}function h(){function e(e,t,n,r,i){if(!m(e[t])){var a=x[r];return new o("Invalid "+a+" `"+i+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return i(e)}function v(e){function t(t,n,r,i,a){var u=t[n],s=g(u);if("object"!==s){var c=x[i];return new o("Invalid "+c+" `"+a+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."))}for(var l in e){var p=e[l];if(p){var f=p(u,l,r,i,a+"."+l,C);if(f)return f}}return null}return i(t)}function m(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(m);if(null===e||E.isValidElement(e))return!0;var t=P(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!m(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!m(o[1]))return!1}return!0;default:return!1}}function y(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function g(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":y(t,e)?"symbol":t}function b(e){var t=g(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function _(e){return e.constructor&&e.constructor.name?e.constructor.name:S}var E=n(34),x=n(160),C=n(162),w=n(29),P=n(248),S=(n(6),"<<anonymous>>"),O={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:u(),arrayOf:s,element:c(),instanceOf:l,node:h(),objectOf:f,oneOf:p,oneOfType:d,shape:v};o.prototype=Error.prototype,e.exports=O},function(e,t){"use strict";e.exports="15.3.1"},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function r(e,t){return null==t?o("30"):void 0,null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}var o=n(4);n(2);e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t){"use strict";function n(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}e.exports=n},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.HOST?e._renderedComponent:t===o.EMPTY?null:void 0}var o=n(240);e.exports=r},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);if("function"==typeof t)return t}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(18),i=null;e.exports=r},function(e,t,n){"use strict";function r(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}function o(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function i(e,t){var n;if(null===e||e===!1)n=c.create(i);else if("object"==typeof e){var u=e;!u||"function"!=typeof u.type&&"string"!=typeof u.type?a("130",null==u.type?u.type:typeof u.type,r(u._owner)):void 0,"string"==typeof u.type?n=l.createInternalComponent(u):o(u.type)?(n=new u.type(u),n.getHostNode||(n.getHostNode=n.getNativeNode)):n=new p(u)}else"string"==typeof e||"number"==typeof e?n=l.createInstanceForText(e):a("131",typeof e);return n._mountIndex=0,n._mountImage=null,n}var a=n(4),u=n(10),s=n(572),c=n(234),l=n(236),p=(n(2),n(6),function(e){this.construct(e)});u(p.prototype,s.Mixin,{_instantiateReactComponent:i});e.exports=i},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!r[e.type]:"textarea"===t}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){"use strict";var r=n(18),o=n(107),i=n(108),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),e.exports=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(656),s=r(u),c=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"Submit Validation Failed"));return n.errors=e,n}return a(t,e),t}(s["default"]);t["default"]=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateSyncErrors=t.untouch=t.unregisterField=t.touch=t.setSubmitSucceeded=t.setSubmitFailed=t.stopSubmit=t.stopAsyncValidation=t.startSubmit=t.startAsyncValidation=t.reset=t.registerField=t.initialize=t.focus=t.destroy=t.change=t.blur=t.autofill=t.arrayUnshift=t.arraySwap=t.arraySplice=t.arrayShift=t.arrayRemoveAll=t.arrayRemove=t.arrayPush=t.arrayPop=t.arrayMove=t.arrayInsert=void 0;var r=n(172);t.arrayInsert=function(e,t,n,o){return{type:r.ARRAY_INSERT,meta:{form:e,field:t,index:n},payload:o}},t.arrayMove=function(e,t,n,o){return{type:r.ARRAY_MOVE,meta:{form:e,field:t,from:n,to:o}}},t.arrayPop=function(e,t){return{type:r.ARRAY_POP,meta:{form:e,field:t}}},t.arrayPush=function(e,t,n){return{type:r.ARRAY_PUSH,meta:{form:e,field:t},payload:n}},t.arrayRemove=function(e,t,n){return{type:r.ARRAY_REMOVE,meta:{form:e,field:t,index:n}}},t.arrayRemoveAll=function(e,t){return{type:r.ARRAY_REMOVE_ALL,meta:{form:e,field:t}}},t.arrayShift=function(e,t){return{type:r.ARRAY_SHIFT,meta:{form:e,field:t}}},t.arraySplice=function(e,t,n,o,i){var a={type:r.ARRAY_SPLICE,meta:{form:e,field:t,index:n,removeNum:o}};return void 0!==i&&(a.payload=i),a},t.arraySwap=function(e,t,n,o){if(n===o)throw new Error("Swap indices cannot be equal");if(n<0||o<0)throw new Error("Swap indices cannot be negative");return{type:r.ARRAY_SWAP,meta:{form:e,field:t,indexA:n,indexB:o}}},t.arrayUnshift=function(e,t,n){return{type:r.ARRAY_UNSHIFT,meta:{form:e,field:t},payload:n}},t.autofill=function(e,t,n){return{type:r.AUTOFILL,meta:{form:e,field:t},payload:n}},t.blur=function(e,t,n,o){return{type:r.BLUR,meta:{form:e,field:t,touch:o},payload:n}},t.change=function(e,t,n,o,i){return{type:r.CHANGE,meta:{form:e,field:t,touch:o,persistentSubmitErrors:i},payload:n}},t.destroy=function(e){return{type:r.DESTROY,meta:{form:e}}},t.focus=function(e,t){return{type:r.FOCUS,meta:{form:e,field:t}}},t.initialize=function(e,t,n){return{type:r.INITIALIZE,meta:{form:e,keepDirty:n},payload:t}},t.registerField=function(e,t,n){return{type:r.REGISTER_FIELD,meta:{form:e},payload:{name:t,type:n}}},t.reset=function(e){return{type:r.RESET,meta:{form:e}}},t.startAsyncValidation=function(e,t){return{type:r.START_ASYNC_VALIDATION,meta:{form:e,field:t}}},t.startSubmit=function(e){return{type:r.START_SUBMIT,meta:{form:e}}},t.stopAsyncValidation=function(e,t){var n={type:r.STOP_ASYNC_VALIDATION,meta:{form:e},payload:t};return t&&Object.keys(t).length&&(n.error=!0),n},t.stopSubmit=function(e,t){var n={type:r.STOP_SUBMIT,meta:{form:e},payload:t};return t&&Object.keys(t).length&&(n.error=!0),n},t.setSubmitFailed=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return{type:r.SET_SUBMIT_FAILED,meta:{form:e,fields:n},error:!0}},t.setSubmitSucceeded=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return{type:r.SET_SUBMIT_SUCCEEDED,meta:{form:e,fields:n},error:!1}},t.touch=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return{type:r.TOUCH,meta:{form:e,fields:n}}},t.unregisterField=function(e,t){return{type:r.UNREGISTER_FIELD,meta:{form:e},payload:{name:t}}},t.untouch=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return{type:r.UNTOUCH,meta:{form:e,fields:n}}},t.updateSyncErrors=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments[2];return{type:r.UPDATE_SYNC_ERRORS,meta:{form:e},payload:{syncErrors:t,error:n}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=n(545),a=r(i),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(636),c=r(s),l=n(637),p=r(l),f=n(256),d=r(f),h=n(638),v=r(h),m=n(639),y=r(m),g=function(e,t,n){var r=t.value;return"checkbox"===e?u({},t,{checked:!!r}):"radio"===e?u({},t,{checked:r===n,value:n}):"select-multiple"===e?u({},t,{value:r||[]}):"file"===e?u({},t,{value:void 0}):t},b=function(e,t,n){var r=n.asyncError,i=n.asyncValidating,s=n.blur,l=n.change,f=n.dirty,h=n.dispatch,m=n.focus,b=n.format,_=n.normalize,E=n.parse,x=n.pristine,C=n.props,w=n.state,P=n.submitError,S=n.submitting,O=n.value,T=n._value,R=n.syncError,A=o(n,["asyncError","asyncValidating","blur","change","dirty","dispatch","focus","format","normalize","parse","pristine","props","state","submitError","submitting","value","_value","syncError"]),k=arguments.length<=3||void 0===arguments[3]?a["default"]:arguments[3],M=R||r||P,N=_&&function(e){return _(t,e)},I=function(e){return h(l(t,e))},j=(0,p["default"])(I,{normalize:N,parse:E}),F=null==O?"":O;return{input:g(A.type,{name:t,onBlur:(0,c["default"])(function(e){return h(s(t,e))},{normalize:N,parse:E,after:k.bind(null,t)}),onChange:j,onDragStart:(0,d["default"])(t,F),onDrop:(0,v["default"])(t,I),onFocus:(0,y["default"])(t,function(){return h(m(t))}),value:b?b(F):F},T),meta:u({},w,{active:!(!w||!e(w,"active")),asyncValidating:i,autofilled:!(!w||!e(w,"autofilled")),dirty:f,dispatch:h,error:M,invalid:!!M,pristine:x,submitting:!!S,touched:!(!w||!e(w,"touched")),valid:!M,visited:!(!w||!e(w,"visited"))}),custom:u({},A,C)}};t["default"]=b},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=t.dataKey="text",r=function(e,t){return function(e){e.dataTransfer.setData(n,t)}};t["default"]=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(258),i=r(o),a=function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];r.selected&&t.push(r.value)}return t},u=function(e,t){if((0,i["default"])(e)){if(!t&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(t&&void 0!==e.nativeEvent)return e.nativeEvent.text;var n=e.target,r=n.type,o=n.value,u=n.checked,s=n.files,c=e.dataTransfer;return"checkbox"===r?u:"file"===r?s||c&&c.files:"select-multiple"===r?a(e.target.options):""===o||"number"!==r&&"range"!==r?o:parseFloat(o)}return e};t["default"]=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return!!(e&&e.stopPropagation&&e.preventDefault)};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(258),i=r(o),a=function(e){var t=(0,i["default"])(e);return t&&e.preventDefault(),t};t["default"]=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;t["default"]=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn;return function(e){var o=arguments.length<=1||void 0===arguments[1]?function(e){return r(e,"form")}:arguments[1];return function(i){var a=o(i),u=r(a,e+".initial")||n,s=r(a,e+".values")||u;return t(u,s)}}};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(102),i=r(o),a=function(e,t){if(!e)return e;var n=(0,i["default"])(t),r=n.length;if(r){for(var o=e,a=0;a<r&&o;++a)o=o[n[a]];return o}};t["default"]=a},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return function(e){return e};var r=function(){var e=t[t.length-1],n=t.slice(0,-1);return{v:function(){return n.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}}();return"object"==typeof r?r.v:void 0}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){function r(){y===m&&(y=m.slice())}function i(){return v}function u(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return r(),y.push(e),function(){if(t){t=!1,r();var n=y.indexOf(e);y.splice(n,1)}}}function l(e){if(!(0,a["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(g)throw new Error("Reducers may not dispatch actions.");try{g=!0,v=h(v,e)}finally{g=!1}for(var t=m=y,n=0;n<t.length;n++)t[n]();return e}function p(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");h=e,l({type:c.INIT})}function f(){var e,t=u;return e={subscribe:function(e){function n(){e.next&&e.next(i())}if("object"!=typeof e)throw new TypeError("Expected the observer to be an object.");n();var r=t(n);return{unsubscribe:r}}},e[s["default"]]=function(){return this},e}var d;if("function"==typeof t&&"undefined"==typeof n&&(n=t,t=void 0),"undefined"!=typeof n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(o)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var h=e,v=t,m=[],y=m,g=!1;return l({type:c.INIT}),d={dispatch:l,subscribe:u,getState:i,replaceReducer:p},d[s["default"]]=f,d}t.__esModule=!0,t.ActionTypes=void 0,t["default"]=o;var i=n(147),a=r(i),u=n(662),s=r(u),c=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t["default"]=n},function(e,t){e.exports=function(){Array.prototype.findIndex||(Array.prototype.findIndex=function(e){if(null===this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var t,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;i<r;i++)if(t=n[i],e.call(o,t,i,n))return i;return-1})}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(14),c=r(s),l=n(268),p=r(l),f=n(269),d=r(f),h=n(270),v=r(h),m=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.nextPage=n.nextPage.bind(n),n.previousPage=n.previousPage.bind(n),n.state={page:1},n}return a(t,e),u(t,[{key:"nextPage",value:function(){this.setState({page:this.state.page+1})}},{key:"previousPage",value:function(){this.setState({page:this.state.page-1})}},{key:"render",value:function(){var e=this.props.onSubmit,t=this.state.page;return c["default"].createElement("div",null,1===t&&c["default"].createElement(p["default"],{onSubmit:this.nextPage}),2===t&&c["default"].createElement(d["default"],{previousPage:this.previousPage,onSubmit:this.nextPage}),3===t&&c["default"].createElement(v["default"],{previousPage:this.previousPage,onSubmit:e}))}}]),t}(s.Component);m.propTypes={onSubmit:s.PropTypes.func.isRequired},t["default"]=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),i=r(o),a=n(109),u=n(111),s=r(u),c=n(175),l=r(c),p=function(e){var t=e.handleSubmit;return i["default"].createElement("form",{onSubmit:t},i["default"].createElement(a.Field,{name:"firstName",type:"text",component:l["default"],label:"First Name"}),i["default"].createElement(a.Field,{name:"lastName",type:"text",component:l["default"],label:"Last Name"}),i["default"].createElement("div",null,i["default"].createElement("button",{type:"submit",className:"next"},"Next")))};t["default"]=(0,a.reduxForm)({form:"wizard",destroyOnUnmount:!1,validate:s["default"]})(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),i=r(o),a=n(109),u=n(111),s=r(u),c=n(175),l=r(c),p=function(e){var t=e.meta,n=t.touched,r=t.error;return!(!n||!r)&&i["default"].createElement("span",null,r)},f=function(e){var t=e.handleSubmit,n=e.previousPage;return i["default"].createElement("form",{onSubmit:t},i["default"].createElement(a.Field,{name:"email",type:"email",component:l["default"],label:"Email"}),i["default"].createElement("div",null,i["default"].createElement("label",null,"Sex"),i["default"].createElement("div",null,i["default"].createElement("label",null,i["default"].createElement(a.Field,{name:"sex",component:"input",type:"radio",value:"male"})," Male"),i["default"].createElement("label",null,i["default"].createElement(a.Field,{name:"sex",component:"input",type:"radio",value:"female"})," Female"),i["default"].createElement(a.Field,{name:"sex",component:p}))),i["default"].createElement("div",null,i["default"].createElement("button",{type:"button",className:"previous",onClick:n},"Previous"),i["default"].createElement("button",{type:"submit",className:"next"},"Next")))};t["default"]=(0,a.reduxForm)({form:"wizard",destroyOnUnmount:!1,validate:s["default"]})(f)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(14),i=r(o),a=n(109),u=n(111),s=r(u),c=["Red","Orange","Yellow","Green","Blue","Indigo","Violet"],l=function(e){var t=e.input,n=e.meta,r=n.touched,o=n.error;return i["default"].createElement("div",null,i["default"].createElement("select",t,i["default"].createElement("option",{value:""},"Select a color..."),c.map(function(e){return i["default"].createElement("option",{value:e,key:e},e)})),r&&o&&i["default"].createElement("span",null,o))},p=function(e){var t=e.handleSubmit,n=e.pristine,r=e.previousPage,o=e.submitting;return i["default"].createElement("form",{onSubmit:t},i["default"].createElement("div",null,i["default"].createElement("label",null,"Favorite Color"),i["default"].createElement(a.Field,{name:"favoriteColor",component:l})),i["default"].createElement("div",null,i["default"].createElement("label",{htmlFor:"employed"},"Employed"),i["default"].createElement("div",null,i["default"].createElement(a.Field,{name:"employed",id:"employed",component:"input",type:"checkbox"}))),i["default"].createElement("div",null,i["default"].createElement("label",null,"Notes"),i["default"].createElement("div",null,i["default"].createElement(a.Field,{name:"notes",component:"textarea",placeholder:"Notes"}))),i["default"].createElement("div",null,i["default"].createElement("button",{type:"button",className:"previous",onClick:r},"Previous"),i["default"].createElement("button",{type:"submit",disabled:n||o},"Submit")))};t["default"]=(0,a.reduxForm)({form:"wizard",destroyOnUnmount:!1,validate:s["default"]})(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(14),i=r(o),a=n(555),u=r(a),s=n(66),c=n(110),l=n(109),p=n(624),f=document.getElementById("content"),d=(0,c.combineReducers)({form:l.reducer}),h=(window.devToolsExtension?window.devToolsExtension()(c.createStore):c.createStore)(d),v=function(e){return new Promise(function(t){setTimeout(function(){window.alert("You submitted:\n\n"+JSON.stringify(e,null,2)),t()},500)})},m=function(){var e=n(267)["default"],t=n(466),r=n(549),o=n(554),a=n(553),c=n(550),l=n(551),d=n(552);u["default"].render(i["default"].createElement(s.Provider,{store:h},i["default"].createElement(p.App,{version:"6.0.5",path:"/examples/wizard",breadcrumbs:(0,p.generateExampleBreadcrumbs)("wizard","Wizard Form Example","6.0.5")},i["default"].createElement(p.Markdown,{content:t}),i["default"].createElement("h2",null,"Form"),i["default"].createElement(e,{onSubmit:v}),i["default"].createElement(p.Values,{form:"wizard"}),i["default"].createElement("h2",null,"Code"),i["default"].createElement("h4",null,"renderField.js"),i["default"].createElement(p.Code,{source:a}),i["default"].createElement("h4",null,"WizardForm.js"),i["default"].createElement(p.Code,{source:r}),i["default"].createElement("h4",null,"validate.js"),i["default"].createElement(p.Code,{source:o}),i["default"].createElement("h4",null,"WizardFormFirstPage.js"),i["default"].createElement(p.Code,{source:c}),i["default"].createElement("h4",null,"WizardFormSecondPage.js"),i["default"].createElement(p.Code,{source:l}),i["default"].createElement("h4",null,"WizardFormThirdPage.js"),i["default"].createElement(p.Code,{source:d}))),f)};m()},function(e,t,n){(function(e){"use strict";function t(e,t,n){e[t]||Object[r](e,t,{writable:!0,configurable:!0,value:n})}if(n(453),n(660),n(273),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;var r="defineProperty";t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(e){[][e]&&t(Array,e,Function.call.bind([][e]))})}).call(t,function(){return this}())},function(e,t,n){n(282),e.exports=n(36).RegExp.escape},function(e,t,n){var r=n(8),o=n(120),i=n(9)("species");e.exports=function(e){var t;return o(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&(t=t[i],null===t&&(t=void 0))),void 0===t?Array:t}},function(e,t,n){var r=n(274);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){"use strict";var r=n(3),o=n(33),i="number";e.exports=function(e){if("string"!==e&&e!==i&&"default"!==e)throw TypeError("Incorrect hint");return o(r(this),e!=i)}},function(e,t,n){var r=n(54),o=n(91),i=n(72);e.exports=function(e){var t=r(e),n=o.f;if(n)for(var a,u=n(e),s=i.f,c=0;u.length>c;)s.call(e,a=u[c++])&&t.push(a);return t}},function(e,t,n){var r=n(54),o=n(23);e.exports=function(e,t){for(var n,i=o(e),a=r(i),u=a.length,s=0;u>s;)if(i[n=a[s++]]===t)return n}},function(e,t,n){"use strict";var r=n(280),o=n(87),i=n(19);e.exports=function(){for(var e=i(this),t=arguments.length,n=Array(t),a=0,u=r._,s=!1;t>a;)(n[a]=arguments[a++])===u&&(s=!0);return function(){var r,i=this,a=arguments.length,c=0,l=0;if(!s&&!a)return o(e,n,i);if(r=n.slice(),s)for(;t>c;c++)r[c]===u&&(r[c]=arguments[l++]);for(;a>l;)r.push(arguments[l++]);return o(e,r,i)}}},function(e,t,n){e.exports=n(5)},function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},function(e,t,n){var r=n(1),o=n(281)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(e){return o(e)}})},function(e,t,n){var r=n(1);r(r.P,"Array",{copyWithin:n(177)}),n(60)("copyWithin")},function(e,t,n){"use strict";var r=n(1),o=n(31)(4);r(r.P+r.F*!n(28)([].every,!0),"Array",{every:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var r=n(1);r(r.P,"Array",{fill:n(112)}),n(60)("fill")},function(e,t,n){"use strict";var r=n(1),o=n(31)(2);r(r.P+r.F*!n(28)([].filter,!0),"Array",{filter:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),o=n(31)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(60)(i)},function(e,t,n){"use strict";var r=n(1),o=n(31)(5),i="find",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(60)(i)},function(e,t,n){"use strict";var r=n(1),o=n(31)(0),i=n(28)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(37),o=n(1),i=n(16),a=n(186),u=n(119),s=n(15),c=n(113),l=n(136);o(o.S+o.F*!n(89)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,o,p,f=i(e),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,m=void 0!==v,y=0,g=l(f);if(m&&(v=r(v,h>2?arguments[2]:void 0,2)),void 0==g||d==Array&&u(g))for(t=s(f.length),n=new d(t);t>y;y++)c(n,y,m?v(f[y],y):f[y]);else for(p=g.call(f),n=new d;!(o=p.next()).done;y++)c(n,y,m?a(p,v,[o.value,y],!0):o.value);return n.length=y,n}})},function(e,t,n){"use strict";var r=n(1),o=n(83)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(28)(i)),"Array",{indexOf:function(e){return a?i.apply(this,arguments)||0:o(this,e,arguments[1])}})},function(e,t,n){var r=n(1);r(r.S,"Array",{isArray:n(120)})},function(e,t,n){"use strict";var r=n(1),o=n(23),i=[].join;r(r.P+r.F*(n(71)!=Object||!n(28)(i)),"Array",{join:function(e){return i.call(o(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(1),o=n(23),i=n(44),a=n(15),u=[].lastIndexOf,s=!!u&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(s||!n(28)(u)),"Array",{lastIndexOf:function(e){if(s)return u.apply(this,arguments)||0;var t=o(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){"use strict";var r=n(1),o=n(31)(1);r(r.P+r.F*!n(28)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),o=n(113);r(r.S+r.F*n(7)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)o(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(1),o=n(179);r(r.P+r.F*!n(28)([].reduceRight,!0),"Array",{reduceRight:function(e){return o(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(1),o=n(179);r(r.P+r.F*!n(28)([].reduce,!0),"Array",{reduce:function(e){return o(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){"use strict";var r=n(1),o=n(117),i=n(26),a=n(57),u=n(15),s=[].slice; r(r.P+r.F*n(7)(function(){o&&s.call(o)}),"Array",{slice:function(e,t){var n=u(this.length),r=i(this);if(t=void 0===t?n:t,"Array"==r)return s.call(this,e,t);for(var o=a(e,n),c=a(t,n),l=u(c-o),p=Array(l),f=0;f<l;f++)p[f]="String"==r?this.charAt(o+f):this[o+f];return p}})},function(e,t,n){"use strict";var r=n(1),o=n(31)(3);r(r.P+r.F*!n(28)([].some,!0),"Array",{some:function(e){return o(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),o=n(19),i=n(16),a=n(7),u=[].sort,s=[1,2,3];r(r.P+r.F*(a(function(){s.sort(void 0)})||!a(function(){s.sort(null)})||!n(28)(u)),"Array",{sort:function(e){return void 0===e?u.call(i(this)):u.call(i(this),o(e))}})},function(e,t,n){n(56)("Array")},function(e,t,n){var r=n(1);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(1),o=n(7),i=Date.prototype.getTime,a=function(e){return e>9?e:"0"+e};r(r.P+r.F*(o(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!o(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}})},function(e,t,n){"use strict";var r=n(1),o=n(16),i=n(33);r(r.P+r.F*n(7)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=o(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(9)("toPrimitive"),o=Date.prototype;r in o||n(20)(o,r,n(276))},function(e,t,n){var r=Date.prototype,o="Invalid Date",i="toString",a=r[i],u=r.getTime;new Date(NaN)+""!=o&&n(21)(r,i,function(){var e=u.call(this);return e===e?a.call(this):o})},function(e,t,n){var r=n(1);r(r.P,"Function",{bind:n(180)})},function(e,t,n){"use strict";var r=n(8),o=n(25),i=n(9)("hasInstance"),a=Function.prototype;i in a||n(12).f(a,i,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=o(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(12).f,o=n(43),i=n(17),a=Function.prototype,u=/^\s*function ([^ (]*)/,s="name",c=Object.isExtensible||function(){return!0};s in a||n(11)&&r(a,s,{configurable:!0,get:function(){try{var e=this,t=(""+e).match(u)[1];return i(e,s)||!c(e)||r(e,s,o(5,t)),t}catch(n){return""}}})},function(e,t,n){var r=n(1),o=n(188),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:o(e-1+i(e-1)*i(e+1))}})},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var o=n(1),i=Math.asinh;o(o.S+o.F*!(i&&1/i(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(1),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(1),o=n(124);r(r.S,"Math",{cbrt:function(e){return o(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(1),o=Math.exp;r(r.S,"Math",{cosh:function(e){return(o(e=+e)+o(-e))/2}})},function(e,t,n){var r=n(1),o=n(123);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},function(e,t,n){var r=n(1),o=n(124),i=Math.pow,a=i(2,-52),u=i(2,-23),s=i(2,127)*(2-u),c=i(2,-126),l=function(e){return e+1/a-1/a};r(r.S,"Math",{fround:function(e){var t,n,r=Math.abs(e),i=o(e);return r<c?i*l(r/c/u)*c*u:(t=(1+u/a)*r,n=t-(t-r),n>s||n!=n?i*(1/0):i*n)}})},function(e,t,n){var r=n(1),o=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,i=0,a=0,u=arguments.length,s=0;a<u;)n=o(arguments[a++]),s<n?(r=s/n,i=i*r*r+1,s=n):n>0?(r=n/s,i+=r*r):i+=n;return s===1/0?1/0:s*Math.sqrt(i)}})},function(e,t,n){var r=n(1),o=Math.imul;r(r.S+r.F*n(7)(function(){return o(4294967295,5)!=-5||2!=o.length}),"Math",{imul:function(e,t){var n=65535,r=+e,o=+t,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log1p:n(188)})},function(e,t,n){var r=n(1);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(1);r(r.S,"Math",{sign:n(124)})},function(e,t,n){var r=n(1),o=n(123),i=Math.exp;r(r.S+r.F*n(7)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(o(e)-o(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(1),o=n(123),i=Math.exp;r(r.S,"Math",{tanh:function(e){var t=o(e=+e),n=o(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var r=n(1);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){"use strict";var r=n(5),o=n(17),i=n(26),a=n(118),u=n(33),s=n(7),c=n(53).f,l=n(24).f,p=n(12).f,f=n(64).trim,d="Number",h=r[d],v=h,m=h.prototype,y=i(n(52)(m))==d,g="trim"in String.prototype,b=function(e){var t=u(e,!1);if("string"==typeof t&&t.length>2){t=g?t.trim():f(t,3);var n,r,o,i=t.charCodeAt(0);if(43===i||45===i){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+t}for(var a,s=t.slice(2),c=0,l=s.length;c<l;c++)if(a=s.charCodeAt(c),a<48||a>o)return NaN;return parseInt(s,r)}}return+t};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof h&&(y?s(function(){m.valueOf.call(n)}):i(n)!=d)?a(new v(b(t)),n,h):b(t)};for(var _,E=n(11)?c(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;E.length>x;x++)o(v,_=E[x])&&!o(h,_)&&p(h,_,l(v,_));h.prototype=m,m.constructor=h,n(21)(r,d,h)}},function(e,t,n){var r=n(1);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(1),o=n(5).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&o(e)}})},function(e,t,n){var r=n(1);r(r.S,"Number",{isInteger:n(185)})},function(e,t,n){var r=n(1);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(1),o=n(185),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return o(e)&&i(e)<=9007199254740991}})},function(e,t,n){var r=n(1);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(1);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(1),o=n(195);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},function(e,t,n){var r=n(1),o=n(196);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},function(e,t,n){"use strict";var r=n(1),o=n(44),i=n(176),a=n(131),u=1..toFixed,s=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",p="0",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*c[n],c[n]=r%1e7,r=s(r/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=s(n/e),n=n%e*1e7},h=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+a.call(p,7-n.length)+n}return t},v=function(e,t,n){return 0===t?n:t%2===1?v(e,t-1,n*e):v(e*e,t/2,n)},m=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t};r(r.P+r.F*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(7)(function(){u.call({})})),"Number",{toFixed:function(e){var t,n,r,u,s=i(this,l),c=o(e),y="",g=p;if(c<0||c>20)throw RangeError(l);if(s!=s)return"NaN";if(s<=-1e21||s>=1e21)return String(s);if(s<0&&(y="-",s=-s),s>1e-21)if(t=m(s*v(2,69,1))-69,n=t<0?s*v(2,-t,1):s/v(2,t,1),n*=4503599627370496,t=52-t,t>0){for(f(0,n),r=c;r>=7;)f(1e7,0),r-=7;for(f(v(10,r,1),0),r=t-1;r>=23;)d(1<<23),r-=23;d(1<<r),f(1,1),d(2),g=h()}else f(0,n),f(1<<-t,0),g=h()+a.call(p,c);return c>0?(u=g.length,g=y+(u<=c?"0."+a.call(p,c-u)+g:g.slice(0,u-c)+"."+g.slice(u-c))):g=y+g,g}})},function(e,t,n){"use strict";var r=n(1),o=n(7),i=n(176),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(189)})},function(e,t,n){var r=n(1);r(r.S,"Object",{create:n(52)})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(11),"Object",{defineProperties:n(190)})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(11),"Object",{defineProperty:n(12).f})},function(e,t,n){var r=n(8),o=n(42).onFreeze;n(32)("freeze",function(e){return function(t){return e&&r(t)?e(o(t)):t}})},function(e,t,n){var r=n(23),o=n(24).f;n(32)("getOwnPropertyDescriptor",function(){return function(e,t){return o(r(e),t)}})},function(e,t,n){n(32)("getOwnPropertyNames",function(){return n(191).f})},function(e,t,n){var r=n(16),o=n(25);n(32)("getPrototypeOf",function(){return function(e){return o(r(e))}})},function(e,t,n){var r=n(8);n(32)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},function(e,t,n){var r=n(8);n(32)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(8);n(32)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(1);r(r.S,"Object",{is:n(197)})},function(e,t,n){var r=n(16),o=n(54);n(32)("keys",function(){return function(e){return o(r(e))}})},function(e,t,n){var r=n(8),o=n(42).onFreeze;n(32)("preventExtensions",function(e){return function(t){return e&&r(t)?e(o(t)):t}})},function(e,t,n){var r=n(8),o=n(42).onFreeze;n(32)("seal",function(e){return function(t){return e&&r(t)?e(o(t)):t}})},function(e,t,n){var r=n(1);r(r.S,"Object",{setPrototypeOf:n(126).set})},function(e,t,n){"use strict";var r=n(70),o={};o[n(9)("toStringTag")]="z",o+""!="[object z]"&&n(21)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(e,t,n){var r=n(1),o=n(195);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},function(e,t,n){var r=n(1),o=n(196);r(r.G+r.F*(parseInt!=o),{parseInt:o})},function(e,t,n){"use strict";var r,o,i,a=n(51),u=n(5),s=n(37),c=n(70),l=n(1),p=n(8),f=n(19),d=n(50),h=n(61),v=n(128),m=n(133).set,y=n(125)(),g="Promise",b=u.TypeError,_=u.process,E=u[g],_=u.process,x="process"==c(_),C=function(){},w=!!function(){try{var e=E.resolve(1),t=(e.constructor={})[n(9)("species")]=function(e){e(C,C)};return(x||"function"==typeof PromiseRejectionEvent)&&e.then(C)instanceof t}catch(r){}}(),P=function(e,t){return e===t||e===E&&t===i},S=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},O=function(e){return P(E,e)?new T(e):new o(e)},T=o=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw b("Bad Promise constructor");t=e,n=r}),this.resolve=f(t),this.reject=f(n)},R=function(e){try{e()}catch(t){return{error:t}}},A=function(e,t){if(!e._n){e._n=!0;var n=e._c;y(function(){for(var r=e._v,o=1==e._s,i=0,a=function(t){var n,i,a=o?t.ok:t.fail,u=t.resolve,s=t.reject,c=t.domain;try{a?(o||(2==e._h&&N(e),e._h=1),a===!0?n=r:(c&&c.enter(),n=a(r),c&&c.exit()),n===t.promise?s(b("Promise-chain cycle")):(i=S(n))?i.call(n,u,s):u(n)):s(r)}catch(l){s(l)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&k(e)})}},k=function(e){m.call(u,function(){var t,n,r,o=e._v;if(M(e)&&(t=R(function(){x?_.emit("unhandledRejection",o,e):(n=u.onunhandledrejection)?n({promise:e,reason:o}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",o)}),e._h=x||M(e)?2:1),e._a=void 0,t)throw t.error})},M=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if(t=n[r++],t.fail||!M(t.promise))return!1;return!0},N=function(e){m.call(u,function(){var t;x?_.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})})},I=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),A(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw b("Promise can't be resolved itself");(t=S(e))?y(function(){var r={_w:n,_d:!1};try{t.call(e,s(j,r,1),s(I,r,1))}catch(o){I.call(r,o)}}):(n._v=e,n._s=1,A(n,!1))}catch(r){I.call({_w:n,_d:!1},r)}}};w||(E=function(e){d(this,E,g,"_h"),f(e),r.call(this);try{e(s(j,this,1),s(I,this,1))}catch(t){I.call(this,t)}},r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(55)(E.prototype,{then:function(e,t){var n=O(v(this,E));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=x?_.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&A(this,!1),n.promise},"catch":function(e){return this.then(void 0,e)}}),T=function(){var e=new r;this.promise=e,this.resolve=s(j,e,1),this.reject=s(I,e,1)}),l(l.G+l.W+l.F*!w,{Promise:E}),n(63)(E,g),n(56)(g),i=n(36)[g],l(l.S+l.F*!w,g,{reject:function(e){var t=O(this),n=t.reject;return n(e),t.promise}}),l(l.S+l.F*(a||!w),g,{resolve:function(e){if(e instanceof E&&P(e.constructor,this))return e;var t=O(this),n=t.resolve;return n(e),t.promise}}),l(l.S+l.F*!(w&&n(89)(function(e){E.all(e)["catch"](C)})),g,{all:function(e){var t=this,n=O(t),r=n.resolve,o=n.reject,i=R(function(){var n=[],i=0,a=1;h(e,!1,function(e){var u=i++,s=!1;n.push(void 0),a++,t.resolve(e).then(function(e){s||(s=!0,n[u]=e,--a||r(n))},o)}),--a||r(n)});return i&&o(i.error),n.promise},race:function(e){var t=this,n=O(t),r=n.reject,o=R(function(){h(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return o&&r(o.error),n.promise}})},function(e,t,n){var r=n(1),o=n(19),i=n(3),a=(n(5).Reflect||{}).apply,u=Function.apply;r(r.S+r.F*!n(7)(function(){a(function(){})}),"Reflect",{apply:function(e,t,n){var r=o(e),s=i(n);return a?a(r,t,s):u.call(r,t,s)}})},function(e,t,n){var r=n(1),o=n(52),i=n(19),a=n(3),u=n(8),s=n(7),c=n(180),l=(n(5).Reflect||{}).construct,p=s(function(){function e(){}return!(l(function(){},[],e)instanceof e)}),f=!s(function(){l(function(){})});r(r.S+r.F*(p||f),"Reflect",{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(f&&!p)return l(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(c.apply(e,r))}var s=n.prototype,d=o(u(s)?s:Object.prototype),h=Function.apply.call(e,d,t);return u(h)?h:d}})},function(e,t,n){var r=n(12),o=n(1),i=n(3),a=n(33);o(o.S+o.F*n(7)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,n){i(e),t=a(t,!0),i(n);try{return r.f(e,t,n),!0}catch(o){return!1}}})},function(e,t,n){var r=n(1),o=n(24).f,i=n(3);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=o(i(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var r=n(1),o=n(3),i=function(e){this._t=o(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(121)(i,"Object",function(){var e,t=this,n=t._k;do if(t._i>=n.length)return{value:void 0,done:!0};while(!((e=n[t._i++])in t._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var r=n(24),o=n(1),i=n(3);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(i(e),t)}})},function(e,t,n){var r=n(1),o=n(25),i=n(3);r(r.S,"Reflect",{getPrototypeOf:function(e){return o(i(e))}})},function(e,t,n){function r(e,t){var n,u,l=arguments.length<3?e:arguments[2];return c(e)===l?e[t]:(n=o.f(e,t))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:s(u=i(e))?r(u,t,l):void 0}var o=n(24),i=n(25),a=n(17),u=n(1),s=n(8),c=n(3);u(u.S,"Reflect",{get:r})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(1),o=n(3),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return o(e),!i||i(e)}})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{ownKeys:n(194)})},function(e,t,n){var r=n(1),o=n(3),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){o(e);try{return i&&i(e),!0}catch(t){return!1}}})},function(e,t,n){var r=n(1),o=n(126);o&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){o.check(e,t);try{return o.set(e,t),!0}catch(n){return!1}}})},function(e,t,n){function r(e,t,n){var s,f,d=arguments.length<4?e:arguments[3],h=i.f(l(e),t);if(!h){if(p(f=a(e)))return r(f,t,n,d);h=c(0)}return u(h,"value")?!(h.writable===!1||!p(d))&&(s=i.f(d,t)||c(0),s.value=n,o.f(d,t,s),!0):void 0!==h.set&&(h.set.call(d,n),!0)}var o=n(12),i=n(24),a=n(25),u=n(17),s=n(1),c=n(43),l=n(3),p=n(8);s(s.S,"Reflect",{set:r})},function(e,t,n){var r=n(5),o=n(118),i=n(12).f,a=n(53).f,u=n(88),s=n(86),c=r.RegExp,l=c,p=c.prototype,f=/a/g,d=/a/g,h=new c(f)!==f;if(n(11)&&(!h||n(7)(function(){return d[n(9)("match")]=!1,c(f)!=f||c(d)==d||"/a/i"!=c(f,"i")}))){c=function(e,t){var n=this instanceof c,r=u(e),i=void 0===t;return!n&&r&&e.constructor===c&&i?e:o(h?new l(r&&!i?e.source:e,t):l((r=e instanceof c)?e.source:e,r&&i?s.call(e):t),n?this:p,c)};for(var v=(function(e){e in c||i(c,e,{configurable:!0,get:function(){return l[e]},set:function(t){l[e]=t}})}),m=a(l),y=0;m.length>y;)v(m[y++]);p.constructor=c,c.prototype=p,n(21)(r,"RegExp",c)}n(56)("RegExp")},function(e,t,n){n(85)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(85)("replace",2,function(e,t,n){return[function(r,o){"use strict";var i=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},n]})},function(e,t,n){n(85)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),o=void 0==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(85)("split",2,function(e,t,r){"use strict";var o=n(88),i=r,a=[].push,u="split",s="length",c="lastIndex";if("c"=="abbc"[u](/(b)*/)[1]||4!="test"[u](/(?:)/,-1)[s]||2!="ab"[u](/(?:ab)*/)[s]||4!="."[u](/(.?)(.?)/)[s]||"."[u](/()()/)[s]>1||""[u](/.?/)[s]){var l=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!o(e))return i.call(n,e,t);var r,u,p,f,d,h=[],v=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),m=0,y=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,v+"g");for(l||(r=new RegExp("^"+g.source+"$(?!\\s)",v));(u=g.exec(n))&&(p=u.index+u[0][s],!(p>m&&(h.push(n.slice(m,u.index)),!l&&u[s]>1&&u[0].replace(r,function(){for(d=1;d<arguments[s]-2;d++)void 0===arguments[d]&&(u[d]=void 0)}),u[s]>1&&u.index<n[s]&&a.apply(h,u.slice(1)),f=u[0][s],m=p,h[s]>=y)));)g[c]===u.index&&g[c]++;return m===n[s]?!f&&g.test("")||h.push(""):h.push(n.slice(m)),h[s]>y?h.slice(0,y):h}}else"0"[u](void 0,0)[s]&&(r=function(e,t){return void 0===e&&0===t?[]:i.call(this,e,t)});return[function(n,o){var i=e(this),a=void 0==n?void 0:n[t];return void 0!==a?a.call(n,i,o):r.call(String(i),n,o)},r]})},function(e,t,n){"use strict";n(201);var r=n(3),o=n(86),i=n(11),a="toString",u=/./[a],s=function(e){n(21)(RegExp.prototype,a,e,!0)};n(7)(function(){return"/a/b"!=u.call({source:"a",flags:"b"})})?s(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?o.call(e):void 0)}):u.name!=a&&s(function(){return u.call(this)})},function(e,t,n){"use strict";n(22)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){"use strict";n(22)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(22)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(22)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(129)(!1);r(r.P,"String",{codePointAt:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r=n(1),o=n(15),i=n(130),a="endsWith",u=""[a];r(r.P+r.F*n(116)(a),"String",{endsWith:function(e){var t=i(this,e,a),n=arguments.length>1?arguments[1]:void 0,r=o(t.length),s=void 0===n?r:Math.min(o(n),r),c=String(e);return u?u.call(t,c,s):t.slice(s-c.length,s)===c}})},function(e,t,n){"use strict";n(22)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(22)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(22)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){var r=n(1),o=n(57),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],o(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(1),o=n(130),i="includes";r(r.P+r.F*n(116)(i),"String",{includes:function(e){return!!~o(this,e,i).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";n(22)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";var r=n(129)(!0);n(122)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";n(22)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){var r=n(1),o=n(23),i=n(15);r(r.S,"String",{raw:function(e){for(var t=o(e.raw),n=i(t.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(t[u++])),u<r&&a.push(String(arguments[u]));return a.join("")}})},function(e,t,n){var r=n(1);r(r.P,"String",{repeat:n(131)})},function(e,t,n){"use strict";n(22)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";var r=n(1),o=n(15),i=n(130),a="startsWith",u=""[a];r(r.P+r.F*n(116)(a),"String",{startsWith:function(e){var t=i(this,e,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return u?u.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(22)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(22)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(22)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){"use strict";n(64)("trim",function(e){return function(){return e(this,3)}})},function(e,t,n){"use strict";var r=n(5),o=n(17),i=n(11),a=n(1),u=n(21),s=n(42).KEY,c=n(7),l=n(92),p=n(63),f=n(58),d=n(9),h=n(199),v=n(135),m=n(278),y=n(277),g=n(120),b=n(3),_=n(23),E=n(33),x=n(43),C=n(52),w=n(191),P=n(24),S=n(12),O=n(54),T=P.f,R=S.f,A=w.f,k=r.Symbol,M=r.JSON,N=M&&M.stringify,I="prototype",j=d("_hidden"),F=d("toPrimitive"),D={}.propertyIsEnumerable,L=l("symbol-registry"),U=l("symbols"),V=l("op-symbols"),B=Object[I],W="function"==typeof k,q=r.QObject,H=!q||!q[I]||!q[I].findChild,z=i&&c(function(){return 7!=C(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=T(B,t);r&&delete B[t],R(e,t,n),r&&e!==B&&R(B,t,r)}:R,Y=function(e){var t=U[e]=C(k[I]);return t._k=e,t},K=W&&"symbol"==typeof k.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof k},G=function(e,t,n){return e===B&&G(V,t,n),b(e),t=E(t,!0),b(n),o(U,t)?(n.enumerable?(o(e,j)&&e[j][t]&&(e[j][t]=!1),n=C(n,{enumerable:x(0,!1)})):(o(e,j)||R(e,j,x(1,{})),e[j][t]=!0),z(e,t,n)):R(e,t,n)},$=function(e,t){b(e);for(var n,r=y(t=_(t)),o=0,i=r.length;i>o;)G(e,n=r[o++],t[n]);return e},X=function(e,t){return void 0===t?C(e):$(C(e),t)},Q=function(e){var t=D.call(this,e=E(e,!0));return!(this===B&&o(U,e)&&!o(V,e))&&(!(t||!o(this,e)||!o(U,e)||o(this,j)&&this[j][e])||t)},Z=function(e,t){if(e=_(e),t=E(t,!0),e!==B||!o(U,t)||o(V,t)){var n=T(e,t);return!n||!o(U,t)||o(e,j)&&e[j][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=A(_(e)),r=[],i=0;n.length>i;)o(U,t=n[i++])||t==j||t==s||r.push(t);return r},ee=function(e){for(var t,n=e===B,r=A(n?V:_(e)),i=[],a=0;r.length>a;)!o(U,t=r[a++])||n&&!o(B,t)||i.push(U[t]);return i};W||(k=function(){if(this instanceof k)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(n){this===B&&t.call(V,n),o(this,j)&&o(this[j],e)&&(this[j][e]=!1),z(this,e,x(1,n))};return i&&H&&z(B,e,{configurable:!0,set:t}),Y(e)},u(k[I],"toString",function(){return this._k}),P.f=Z,S.f=G,n(53).f=w.f=J,n(72).f=Q,n(91).f=ee,i&&!n(51)&&u(B,"propertyIsEnumerable",Q,!0),h.f=function(e){return Y(d(e))}),a(a.G+a.W+a.F*!W,{Symbol:k});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)d(te[ne++]);for(var te=O(d.store),ne=0;te.length>ne;)v(te[ne++]);a(a.S+a.F*!W,"Symbol",{"for":function(e){return o(L,e+="")?L[e]:L[e]=k(e)},keyFor:function(e){if(K(e))return m(L,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){H=!0},useSimple:function(){H=!1}}),a(a.S+a.F*!W,"Object",{create:X,defineProperty:G,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:ee}),M&&a(a.S+a.F*(!W||c(function(){var e=k();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!K(e)){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);return t=r[1],"function"==typeof t&&(n=t),!n&&g(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!K(t))return t}),r[1]=t,N.apply(M,r)}}}),k[I][F]||n(20)(k[I],F,k[I].valueOf),p(k,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t,n){"use strict";var r=n(1),o=n(93),i=n(134),a=n(3),u=n(57),s=n(15),c=n(8),l=n(5).ArrayBuffer,p=n(128),f=i.ArrayBuffer,d=i.DataView,h=o.ABV&&l.isView,v=f.prototype.slice,m=o.VIEW,y="ArrayBuffer";r(r.G+r.W+r.F*(l!==f),{ArrayBuffer:f}),r(r.S+r.F*!o.CONSTR,y,{isView:function(e){return h&&h(e)||c(e)&&m in e}}),r(r.P+r.U+r.F*n(7)(function(){return!new f(2).slice(1,void 0).byteLength}),y,{slice:function(e,t){if(void 0!==v&&void 0===t)return v.call(a(this),e);for(var n=a(this).byteLength,r=u(e,n),o=u(void 0===t?n:t,n),i=new(p(this,f))(s(o-r)),c=new d(this),l=new d(i),h=0;r<o;)l.setUint8(h++,c.getUint8(r++));return i}}),n(56)(y)},function(e,t,n){var r=n(1);r(r.G+r.W+r.F*!n(93).ABV,{DataView:n(134).DataView})},function(e,t,n){n(39)("Float32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(39)("Float64",8,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(39)("Int16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(39)("Int32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(39)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(39)("Uint16",2,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(39)("Uint32",4,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(39)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){n(39)("Uint8",1,function(e){return function(t,n,r){return e(this,t,n,r)}},!0)},function(e,t,n){"use strict";var r=n(183);n(84)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(1),o=n(83)(!0);r(r.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(60)("includes")},function(e,t,n){var r=n(1),o=n(125)(),i=n(5).process,a="process"==n(26)(i);r(r.G,{asap:function(e){var t=a&&i.domain;o(t?t.bind(e):e)}})},function(e,t,n){var r=n(1),o=n(26);r(r.S,"Error",{isError:function(e){return"Error"===o(e)}})},function(e,t,n){var r=n(1);r(r.P+r.R,"Map",{toJSON:n(182)("Map")})},function(e,t,n){var r=n(1);r(r.S,"Math",{iaddh:function(e,t,n,r){var o=e>>>0,i=t>>>0,a=n>>>0;return i+(r>>>0)+((o&a|(o|a)&~(o+a>>>0))>>>31)|0}})},function(e,t,n){var r=n(1);r(r.S,"Math",{imulh:function(e,t){var n=65535,r=+e,o=+t,i=r&n,a=o&n,u=r>>16,s=o>>16,c=(u*a>>>0)+(i*a>>>16);return u*s+(c>>16)+((i*s>>>0)+(c&n)>>16)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{isubh:function(e,t,n,r){var o=e>>>0,i=t>>>0,a=n>>>0;return i-(r>>>0)-((~o&a|~(o^a)&o-a>>>0)>>>31)|0}})},function(e,t,n){var r=n(1);r(r.S,"Math",{umulh:function(e,t){var n=65535,r=+e,o=+t,i=r&n,a=o&n,u=r>>>16,s=o>>>16,c=(u*a>>>0)+(i*a>>>16);return u*s+(c>>>16)+((i*s>>>0)+(c&n)>>>16)}})},function(e,t,n){"use strict";var r=n(1),o=n(16),i=n(19),a=n(12);n(11)&&r(r.P+n(90),"Object",{__defineGetter__:function(e,t){a.f(o(this),e,{get:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(1),o=n(16),i=n(19),a=n(12);n(11)&&r(r.P+n(90),"Object",{__defineSetter__:function(e,t){a.f(o(this),e,{set:i(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(1),o=n(193)(!0);r(r.S,"Object",{entries:function(e){return o(e)}})},function(e,t,n){var r=n(1),o=n(194),i=n(23),a=n(24),u=n(113);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n=i(e),r=a.f,s=o(n),c={},l=0;s.length>l;)u(c,t=s[l++],r(n,t));return c}})},function(e,t,n){"use strict";var r=n(1),o=n(16),i=n(33),a=n(25),u=n(24).f;n(11)&&r(r.P+n(90),"Object",{__lookupGetter__:function(e){var t,n=o(this),r=i(e,!0);do if(t=u(n,r))return t.get;while(n=a(n))}})},function(e,t,n){"use strict";var r=n(1),o=n(16),i=n(33),a=n(25),u=n(24).f;n(11)&&r(r.P+n(90),"Object",{__lookupSetter__:function(e){var t,n=o(this),r=i(e,!0);do if(t=u(n,r))return t.set;while(n=a(n))}})},function(e,t,n){var r=n(1),o=n(193)(!1);r(r.S,"Object",{values:function(e){return o(e)}})},function(e,t,n){"use strict";var r=n(1),o=n(5),i=n(36),a=n(125)(),u=n(9)("observable"),s=n(19),c=n(3),l=n(50),p=n(55),f=n(20),d=n(61),h=d.RETURN,v=function(e){return null==e?void 0:s(e)},m=function(e){var t=e._c;t&&(e._c=void 0,t())},y=function(e){return void 0===e._o},g=function(e){y(e)||(e._o=void 0,m(e))},b=function(e,t){c(e),this._c=void 0,this._o=e,e=new _(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:s(n),this._c=n)}catch(o){return void e.error(o)}y(this)&&m(this)};b.prototype=p({},{unsubscribe:function(){g(this)}});var _=function(e){this._s=e};_.prototype=p({},{next:function(e){var t=this._s;if(!y(t)){var n=t._o;try{var r=v(n.next);if(r)return r.call(n,e)}catch(o){try{g(t)}finally{throw o}}}},error:function(e){var t=this._s;if(y(t))throw e;var n=t._o;t._o=void 0;try{var r=v(n.error);if(!r)throw e;e=r.call(n,e)}catch(o){try{m(t)}finally{throw o}}return m(t),e},complete:function(e){var t=this._s;if(!y(t)){var n=t._o;t._o=void 0;try{var r=v(n.complete);e=r?r.call(n,e):void 0}catch(o){try{m(t)}finally{throw o}}return m(t),e}}});var E=function(e){l(this,E,"Observable","_f")._f=s(e)};p(E.prototype,{subscribe:function(e){return new b(e,this._f)},forEach:function(e){var t=this;return new(i.Promise||o.Promise)(function(n,r){s(e);var o=t.subscribe({next:function(t){try{return e(t)}catch(n){r(n),o.unsubscribe()}},error:r,complete:n})})}}),p(E,{from:function(e){var t="function"==typeof this?this:E,n=v(c(e)[u]);if(n){var r=c(n.call(e));return r.constructor===t?r:new t(function(e){return r.subscribe(e)})}return new t(function(t){var n=!1;return a(function(){if(!n){try{if(d(e,!1,function(e){if(t.next(e),n)return h})===h)return}catch(r){if(n)throw r;return void t.error(r)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);e<t;)n[e]=arguments[e++];return new("function"==typeof this?this:E)(function(e){var t=!1;return a(function(){if(!t){for(var r=0;r<n.length;++r)if(e.next(n[r]),t)return;e.complete()}}),function(){t=!0}})}}),f(E.prototype,u,function(){return this}),r(r.G,{Observable:E}),n(56)("Observable"); },function(e,t,n){var r=n(38),o=n(3),i=r.key,a=r.set;r.exp({defineMetadata:function(e,t,n,r){a(e,t,o(n),i(r))}})},function(e,t,n){var r=n(38),o=n(3),i=r.key,a=r.map,u=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:i(arguments[2]),r=a(o(t),n,!1);if(void 0===r||!r["delete"](e))return!1;if(r.size)return!0;var s=u.get(t);return s["delete"](n),!!s.size||u["delete"](t)}})},function(e,t,n){var r=n(202),o=n(178),i=n(38),a=n(3),u=n(25),s=i.keys,c=i.key,l=function(e,t){var n=s(e,t),i=u(e);if(null===i)return n;var a=l(i,t);return a.length?n.length?o(new r(n.concat(a))):a:n};i.exp({getMetadataKeys:function(e){return l(a(e),arguments.length<2?void 0:c(arguments[1]))}})},function(e,t,n){var r=n(38),o=n(3),i=n(25),a=r.has,u=r.get,s=r.key,c=function(e,t,n){var r=a(e,t,n);if(r)return u(e,t,n);var o=i(t);return null!==o?c(e,o,n):void 0};r.exp({getMetadata:function(e,t){return c(e,o(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(38),o=n(3),i=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(e){return i(o(e),arguments.length<2?void 0:a(arguments[1]))}})},function(e,t,n){var r=n(38),o=n(3),i=r.get,a=r.key;r.exp({getOwnMetadata:function(e,t){return i(e,o(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(38),o=n(3),i=n(25),a=r.has,u=r.key,s=function(e,t,n){var r=a(e,t,n);if(r)return!0;var o=i(t);return null!==o&&s(e,o,n)};r.exp({hasMetadata:function(e,t){return s(e,o(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(38),o=n(3),i=r.has,a=r.key;r.exp({hasOwnMetadata:function(e,t){return i(e,o(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(38),o=n(3),i=n(19),a=r.key,u=r.set;r.exp({metadata:function(e,t){return function(n,r){u(e,t,(void 0!==r?o:i)(n),a(r))}}})},function(e,t,n){var r=n(1);r(r.P+r.R,"Set",{toJSON:n(182)("Set")})},function(e,t,n){"use strict";var r=n(1),o=n(129)(!0);r(r.P,"String",{at:function(e){return o(this,e)}})},function(e,t,n){"use strict";var r=n(1),o=n(27),i=n(15),a=n(88),u=n(86),s=RegExp.prototype,c=function(e,t){this._r=e,this._s=t};n(121)(c,"RegExp String",function(){var e=this._r.exec(this._s);return{value:e,done:null===e}}),r(r.P,"String",{matchAll:function(e){if(o(this),!a(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in s?String(e.flags):u.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=i(e.lastIndex),new c(r,t)}})},function(e,t,n){"use strict";var r=n(1),o=n(198);r(r.P,"String",{padEnd:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";var r=n(1),o=n(198);r(r.P,"String",{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){"use strict";n(64)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){"use strict";n(64)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){n(135)("asyncIterator")},function(e,t,n){n(135)("observable")},function(e,t,n){var r=n(1);r(r.S,"System",{global:n(5)})},function(e,t,n){for(var r=n(137),o=n(21),i=n(5),a=n(20),u=n(62),s=n(9),c=s("iterator"),l=s("toStringTag"),p=u.Array,f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],d=0;d<5;d++){var h,v=f[d],m=i[v],y=m&&m.prototype;if(y){y[c]||a(y,c,p),y[l]||a(y,l,v),u[v]=p;for(h in r)y[h]||o(y,h,r[h],!0)}}},function(e,t,n){var r=n(1),o=n(133);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},function(e,t,n){var r=n(5),o=n(1),i=n(87),a=n(279),u=r.navigator,s=!!u&&/MSIE .\./.test(u.userAgent),c=function(e){return s?function(t,n){return e(i(a,[].slice.call(arguments,2),"function"==typeof t?t:Function(t)),n)}:e};o(o.G+o.B+o.F*s,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(e,t,n){n(402),n(341),n(343),n(342),n(345),n(347),n(352),n(346),n(344),n(354),n(353),n(349),n(350),n(348),n(340),n(351),n(355),n(356),n(308),n(310),n(309),n(358),n(357),n(328),n(338),n(339),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),n(326),n(327),n(389),n(394),n(401),n(392),n(384),n(385),n(390),n(395),n(397),n(380),n(381),n(382),n(383),n(386),n(387),n(388),n(391),n(393),n(396),n(398),n(399),n(400),n(303),n(305),n(304),n(307),n(306),n(292),n(290),n(296),n(293),n(299),n(301),n(289),n(295),n(286),n(300),n(284),n(298),n(297),n(291),n(294),n(283),n(285),n(288),n(287),n(302),n(137),n(374),n(379),n(201),n(375),n(376),n(377),n(378),n(359),n(200),n(202),n(203),n(414),n(403),n(404),n(409),n(412),n(413),n(407),n(410),n(408),n(411),n(405),n(406),n(360),n(361),n(362),n(363),n(364),n(367),n(365),n(366),n(368),n(369),n(370),n(371),n(373),n(372),n(415),n(441),n(444),n(443),n(445),n(446),n(442),n(447),n(448),n(426),n(429),n(425),n(423),n(424),n(427),n(428),n(418),n(440),n(449),n(417),n(419),n(421),n(420),n(422),n(431),n(432),n(434),n(433),n(436),n(435),n(437),n(438),n(439),n(416),n(430),n(452),n(451),n(450),e.exports=n(36)},function(e,t){"use strict";function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=n(454),i=/^-ms-/;e.exports=r},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=n(464);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),o=0;o<t;o++)r[o]=e[o];return r}function o(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function i(e){return o(e)?Array.isArray(e)?e.slice():r(e):[e]}var a=n(2);e.exports=i},function(e,t,n){"use strict";function r(e){var t=e.match(l);return t&&t[1].toLowerCase()}function o(e,t){var n=c;c?void 0:s(!1);var o=r(e),i=o&&u(o);if(i){n.innerHTML=i[1]+e+i[2];for(var l=i[0];l--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:s(!1),a(p).forEach(t));for(var f=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var i=n(18),a=n(457),u=n(459),s=n(2),c=i.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;e.exports=o},function(e,t,n){"use strict";function r(e){return a?void 0:i(!1),f.hasOwnProperty(e)||(e="*"),u.hasOwnProperty(e)||("*"===e?a.innerHTML="<link />":a.innerHTML="<"+e+"></"+e+">",u[e]=!a.firstChild),u[e]?f[e]:null}var o=n(18),i=n(2),a=o.canUseDOM?document.createElement("div"):null,u={},s=[1,'<select multiple="true">',"</select>"],c=[1,"<table>","</table>"],l=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],f={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:s,option:s,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(e){f[e]=p,u[e]=!0}),e.exports=r},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=n(461),i=/^ms-/;e.exports=r},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(463);e.exports=r},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t){e.exports="<h1 id=wizard-form>Wizard Form</h1> <p>One common UI design pattern is to separate a single form out into sepearate pages of inputs, commonly known as a Wizard. There are several ways that this could be accomplished using <code>redux-form</code>, but the simplest and recommended way is to follow these instructions:</p> <ul> <li>Connect each page with <code>reduxForm()</code> to the same form name.</li> <li>Specify the <code>destroyOnUnmount: false</code> flag to preserve form data across form component unmounts.</li> <li>You may specify sync validation for the entire form</li> <li>Use <code>onSubmit</code> to transition forward to the next page; this forces validation to run.</li> </ul> <p>Things that are up to you to implement:</p> <ul> <li>Call <code>destroyForm()</code> manually after a successful submit.</li> </ul> <h2 id=running-this-example-locally>Running this example locally</h2> <p>To run this example locally on your machine clone the <code>redux-form</code> repository, then <code>cd redux-form</code> to change to the repo directory, and run <code>npm install</code>.</p> <p>Then run <code>npm run example:wizard</code> or manually run the following commands:</p> <pre><code>cd ./examples/wizard\nnpm install\nnpm start\n</code></pre>"},function(e,t){function n(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return a(n)?n:void 0}function o(e){return i(e)&&f.call(e)==u}function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){return null!=e&&(o(e)?d.test(l.call(e)):n(e)&&s.test(e))}var u="[object Function]",s=/^\[object .+?Constructor\]$/,c=Object.prototype,l=Function.prototype.toString,p=c.hasOwnProperty,f=c.toString,d=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t){function n(e){return o(e)&&h.call(e,"callee")&&(!m.call(e,"callee")||v.call(e)==l)}function r(e){return null!=e&&a(e.length)&&!i(e)}function o(e){return s(e)&&r(e)}function i(e){var t=u(e)?v.call(e):"";return t==p||t==f}function a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return!!e&&"object"==typeof e}var c=9007199254740991,l="[object Arguments]",p="[object Function]",f="[object GeneratorFunction]",d=Object.prototype,h=d.hasOwnProperty,v=d.toString,m=d.propertyIsEnumerable;e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return u(n)?n:void 0}function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=y}function i(e){return a(e)&&h.call(e)==c}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function u(e){return null!=e&&(i(e)?v.test(f.call(e)):n(e)&&l.test(e))}var s="[object Array]",c="[object Function]",l=/^\[object .+?Constructor\]$/,p=Object.prototype,f=Function.prototype.toString,d=p.hasOwnProperty,h=p.toString,v=RegExp("^"+f.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=r(Array,"isArray"),y=9007199254740991,g=m||function(e){return n(e)&&o(e.length)&&h.call(e)==s};e.exports=g},function(e,t,n){function r(e){return function(t){return null==t?void 0:t[e]}}function o(e){return null!=e&&a(g(e))}function i(e,t){return e="number"==typeof e||d.test(e)?+e:-1,t=null==t?y:t,e>-1&&e%1==0&&e<t}function a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=y}function u(e){for(var t=c(e),n=t.length,r=n&&e.length,o=!!r&&a(r)&&(f(e)||p(e)),u=-1,s=[];++u<n;){var l=t[u];(o&&i(l,r)||v.call(e,l))&&s.push(l)}return s}function s(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function c(e){if(null==e)return[];s(e)||(e=Object(e));var t=e.length;t=t&&a(t)&&(f(e)||p(e))&&t||0;for(var n=e.constructor,r=-1,o="function"==typeof n&&n.prototype===e,u=Array(t),c=t>0;++r<t;)u[r]=r+"";for(var l in e)c&&i(l,t)||"constructor"==l&&(o||!v.call(e,l))||u.push(l);return u}var l=n(467),p=n(468),f=n(469),d=/^\d+$/,h=Object.prototype,v=h.hasOwnProperty,m=l(Object,"keys"),y=9007199254740991,g=r("length"),b=m?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&o(e)?u(e):s(e)?m(e):[]}:u;e.exports=b},function(e,t,n){var r=n(65),o=n(46),i=r(o,"DataView");e.exports=i},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(508),i=n(509),a=n(510),u=n(511),s=n(512);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(65),o=n(46),i=r(o,"Promise");e.exports=i},function(e,t,n){var r=n(65),o=n(46),i=r(o,"Set");e.exports=i},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.__data__=new o;++t<n;)this.add(e[t])}var o=n(141),i=n(530),a=n(531);r.prototype.add=r.prototype.push=i,r.prototype.has=a,e.exports=r},function(e,t,n){var r=n(46),o=r.Uint8Array;e.exports=o},function(e,t,n){var r=n(65),o=n(46),i=r(o,"WeakMap");e.exports=i},function(e,t,n){function r(e,t){var n=a(e)||i(e)?o(e.length,String):[],r=n.length,s=!!r;for(var l in e)!t&&!c.call(e,l)||s&&("length"==l||u(l,r))||n.push(l);return n}var o=n(494),i=n(222),a=n(47),u=n(144),s=Object.prototype,c=s.hasOwnProperty;e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}e.exports=n},function(e,t,n){var r=n(211),o=n(499),i=o(r);e.exports=i},function(e,t,n){var r=n(500),o=r();e.exports=o},function(e,t){function n(e){return o.call(e)}var r=Object.prototype,o=r.toString;e.exports=n},function(e,t){function n(e,t){return null!=e&&t in Object(e)}e.exports=n},function(e,t,n){function r(e,t,n,r,m,g){var b=c(e),_=c(t),E=h,x=h;b||(E=s(e),E=E==d?v:E),_||(x=s(t),x=x==d?v:x);var C=E==v&&!l(e),w=x==v&&!l(t),P=E==x;if(P&&!C)return g||(g=new o),b||p(e)?i(e,t,n,r,m,g):a(e,t,E,n,r,m,g);if(!(m&f)){var S=C&&y.call(e,"__wrapped__"),O=w&&y.call(t,"__wrapped__");if(S||O){var T=S?e.value():e,R=O?t.value():t;return g||(g=new o),n(T,R,r,m,g)}}return!!P&&(g||(g=new o),u(e,t,n,r,m,g))}var o=n(208),i=n(215),a=n(501),u=n(502),s=n(505),c=n(47),l=n(143),p=n(543),f=2,d="[object Arguments]",h="[object Array]",v="[object Object]",m=Object.prototype,y=m.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,r){var s=n.length,c=s,l=!r;if(null==e)return!c;for(e=Object(e);s--;){var p=n[s];if(l&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++s<c;){p=n[s];var f=p[0],d=e[f],h=p[1];if(l&&p[2]){if(void 0===d&&!(f in e))return!1}else{var v=new o;if(r)var m=r(d,h,f,e,t,v);if(!(void 0===m?i(h,d,r,a|u,v):m))return!1}}return!0}var o=n(208),i=n(142),a=1,u=2;e.exports=r},function(e,t,n){function r(e){if(!u(e)||a(e))return!1;var t=o(e)||i(e)?v:l;return t.test(s(e))}var o=n(223),i=n(143),a=n(515),u=n(76),s=n(221),c=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,p=Function.prototype,f=Object.prototype,d=p.toString,h=f.hasOwnProperty,v=RegExp("^"+d.call(h).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t,n){function r(e){return i(e)&&o(e.length)&&!!A[M.call(e)]}var o=n(146),i=n(77),a="[object Arguments]",u="[object Array]",s="[object Boolean]",c="[object Date]",l="[object Error]",p="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",v="[object RegExp]",m="[object Set]",y="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",_="[object DataView]",E="[object Float32Array]",x="[object Float64Array]",C="[object Int8Array]",w="[object Int16Array]",P="[object Int32Array]",S="[object Uint8Array]",O="[object Uint8ClampedArray]",T="[object Uint16Array]",R="[object Uint32Array]",A={};A[E]=A[x]=A[C]=A[w]=A[P]=A[S]=A[O]=A[T]=A[R]=!0,A[a]=A[u]=A[b]=A[s]=A[_]=A[c]=A[l]=A[p]=A[f]=A[d]=A[h]=A[v]=A[m]=A[y]=A[g]=!1;var k=Object.prototype,M=k.toString;e.exports=r},function(e,t,n){function r(e){if(!o(e))return i(e);var t=[];for(var n in Object(e))u.call(e,n)&&"constructor"!=n&&t.push(n);return t}var o=n(516),i=n(528),a=Object.prototype,u=a.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||o(n,e,t)}}var o=n(485),i=n(503),a=n(218);e.exports=r},function(e,t,n){function r(e,t){return u(e)&&s(t)?c(l(e),t):function(n){var r=i(n,e);return void 0===r&&r===t?a(n,e):o(t,r,void 0,p|f)}}var o=n(142),i=n(538),a=n(539),u=n(98),s=n(217),c=n(218),l=n(75),p=1,f=2;e.exports=r},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}e.exports=n},function(e,t,n){function r(e){return function(t){return o(t,e)}}var o=n(212);e.exports=r},function(e,t,n){function r(e,t){var n;return o(e,function(e,r,o){return n=t(e,r,o),!n}),!!n}var o=n(480);e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}e.exports=n},function(e,t,n){function r(e){if("string"==typeof e)return e;if(i(e))return s?s.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}var o=n(209),i=n(101),a=1/0,u=o?o.prototype:void 0,s=u?u.toString:void 0;e.exports=r},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},function(e,t){function n(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}e.exports=n},function(e,t,n){var r=n(46),o=r["__core-js_shared__"];e.exports=o},function(e,t,n){function r(e,t){return function(n,r){if(null==n)return n;if(!o(n))return e(n,r);for(var i=n.length,a=t?i:-1,u=Object(n);(t?a--:++a<i)&&r(u[a],a,u)!==!1;);return n}}var o=n(100);e.exports=r},function(e,t){function n(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){var s=a[e?u:++o];if(n(i[s],s,i)===!1)break}return t}}e.exports=n},function(e,t,n){function r(e,t,n,r,o,C,P){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!r(new i(e),new i(t)));case f:case d:case m:return a(+e,+t);case h:return e.name==t.name&&e.message==t.message;case y:case b:return e==t+"";case v:var S=s;case g:var O=C&p;if(S||(S=c),e.size!=t.size&&!O)return!1;var T=P.get(e);if(T)return T==t;C|=l,P.set(e,t);var R=u(S(e),S(t),r,o,C,P);return P["delete"](e),R;case _:if(w)return w.call(e)==w.call(t)}return!1}var o=n(209),i=n(476),a=n(145),u=n(215),s=n(527),c=n(532),l=1,p=2,f="[object Boolean]",d="[object Date]",h="[object Error]",v="[object Map]",m="[object Number]",y="[object RegExp]",g="[object Set]",b="[object String]",_="[object Symbol]",E="[object ArrayBuffer]",x="[object DataView]",C=o?o.prototype:void 0,w=C?C.valueOf:void 0;e.exports=r},function(e,t,n){function r(e,t,n,r,a,s){var c=a&i,l=o(e),p=l.length,f=o(t),d=f.length;if(p!=d&&!c)return!1;for(var h=p;h--;){var v=l[h];if(!(c?v in t:u.call(t,v)))return!1}var m=s.get(e);if(m&&s.get(t))return m==t;var y=!0;s.set(e,t),s.set(t,e);for(var g=c;++h<p;){v=l[h];var b=e[v],_=t[v];if(r)var E=c?r(_,b,v,t,e,s):r(b,_,v,e,t,s);if(!(void 0===E?b===_||n(b,_,r,a,s):E)){y=!1;break}g||(g="constructor"==v)}if(y&&!g){var x=e.constructor,C=t.constructor;x!=C&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof C&&C instanceof C)&&(y=!1)}return s["delete"](e),s["delete"](t),y}var o=n(148),i=2,a=Object.prototype,u=a.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){for(var t=i(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,o(a)]}return t}var o=n(217),i=n(148);e.exports=r},function(e,t,n){var r=n(219),o=r(Object.getPrototypeOf,Object);e.exports=o},function(e,t,n){var r=n(471),o=n(140),i=n(473),a=n(474),u=n(477),s=n(482),c=n(221),l="[object Map]",p="[object Object]",f="[object Promise]",d="[object Set]",h="[object WeakMap]",v="[object DataView]",m=Object.prototype,y=m.toString,g=c(r),b=c(o),_=c(i),E=c(a),x=c(u),C=s;(r&&C(new r(new ArrayBuffer(1)))!=v||o&&C(new o)!=l||i&&C(i.resolve())!=f||a&&C(new a)!=d||u&&C(new u)!=h)&&(C=function(e){var t=y.call(e),n=t==p?e.constructor:void 0,r=n?c(n):void 0;if(r)switch(r){case g:return v;case b:return l;case _:return f;case E:return d;case x:return h}return t}),e.exports=C},function(e,t){function n(e,t){return null==e?void 0:e[t]}e.exports=n},function(e,t,n){function r(e,t,n){t=s(t,e)?[t]:o(t);for(var r,p=-1,f=t.length;++p<f;){var d=l(t[p]);if(!(r=null!=e&&n(e,d)))break;e=e[d]}if(r)return r;var f=e?e.length:0;return!!f&&c(f)&&u(d,f)&&(a(e)||i(e))}var o=n(214),i=n(222),a=n(47),u=n(144),s=n(98),c=n(146),l=n(75);e.exports=r},function(e,t,n){function r(){this.__data__=o?o(null):{}}var o=n(99);e.exports=r},function(e,t){function n(e){return this.has(e)&&delete this.__data__[e]}e.exports=n},function(e,t,n){function r(e){var t=this.__data__;if(o){var n=t[e];return n===i?void 0:n}return u.call(t,e)?t[e]:void 0}var o=n(99),i="__lodash_hash_undefined__",a=Object.prototype,u=a.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){var t=this.__data__;return o?void 0!==t[e]:a.call(t,e)}var o=n(99),i=Object.prototype,a=i.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__;return n[e]=o&&void 0===t?i:t,this}var o=n(99),i="__lodash_hash_undefined__";e.exports=r},function(e,t,n){function r(e,t,n){if(!u(n))return!1;var r=typeof t;return!!("number"==r?i(n)&&a(t,n.length):"string"==r&&t in n)&&o(n[t],e)}var o=n(145),i=n(100),a=n(144),u=n(76);e.exports=r},function(e,t){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=n},function(e,t,n){function r(e){return!!i&&i in e}var o=n(498),i=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=r},function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},function(e,t){function n(){this.__data__=[]}e.exports=n},function(e,t,n){function r(e){var t=this.__data__,n=o(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():a.call(t,n,1),!0}var o=n(96),i=Array.prototype,a=i.splice;e.exports=r},function(e,t,n){function r(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]}var o=n(96);e.exports=r},function(e,t,n){function r(e){return o(this.__data__,e)>-1}var o=n(96);e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__,r=o(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}var o=n(96);e.exports=r},function(e,t,n){function r(){this.__data__={hash:new o,map:new(a||i),string:new o}}var o=n(472),i=n(95),a=n(140);e.exports=r},function(e,t,n){function r(e){return o(this,e)["delete"](e)}var o=n(97);e.exports=r},function(e,t,n){function r(e){return o(this,e).get(e)}var o=n(97);e.exports=r},function(e,t,n){function r(e){return o(this,e).has(e)}var o=n(97);e.exports=r},function(e,t,n){function r(e,t){return o(this,e).set(e,t),this}var o=n(97);e.exports=r},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}e.exports=n},function(e,t,n){var r=n(219),o=r(Object.keys,Object);e.exports=o},function(e,t,n){(function(e){var r=n(216),o="object"==typeof t&&t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o,u=a&&r.process,s=function(){try{return u&&u.binding("util")}catch(e){}}();e.exports=s}).call(t,n(664)(e))},function(e,t){function n(e){return this.__data__.set(e,r),this}var r="__lodash_hash_undefined__";e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t,n){function r(){this.__data__=new o}var o=n(95);e.exports=r},function(e,t){function n(e){return this.__data__["delete"](e)}e.exports=n},function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t,n){function r(e,t){var n=this.__data__;if(n instanceof o){var r=n.__data__;if(!i||r.length<u-1)return r.push([e,t]),this;n=this.__data__=new a(r)}return n.set(e,t),this}var o=n(95),i=n(140),a=n(141),u=200;e.exports=r},function(e,t,n){function r(e,t,n){var r=null==e?void 0:o(e,t);return void 0===r?n:r}var o=n(212);e.exports=r},function(e,t,n){function r(e,t){return null!=e&&i(e,t,o)}var o=n(483),i=n(507);e.exports=r},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){function r(e){return i(e)&&o(e)}var o=n(100),i=n(77);e.exports=r},function(e,t,n){function r(e,t,n){n="function"==typeof n?n:void 0;var r=n?n(e,t):void 0;return void 0===r?o(e,t,n):!!r}var o=n(142);e.exports=r},function(e,t,n){var r=n(487),o=n(496),i=n(529),a=i&&i.isTypedArray,u=a?o(a):r;e.exports=u},function(e,t,n){function r(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new(r.Cache||o),n}var o=n(141),i="Expected a function";r.Cache=o,e.exports=r},function(e,t){function n(){}e.exports=n},function(e,t,n){function r(e){return a(e)?o(u(e)):i(e)}var o=n(491),i=n(492),a=n(98),u=n(75);e.exports=r},function(e,t,n){function r(e,t,n){var r=u(e)?o:a;return n&&s(e,t,n)&&(t=void 0),r(e,i(t,3))}var o=n(210),i=n(213),a=n(493),u=n(47),s=n(513);e.exports=r},function(e,t,n){function r(e){return null==e?"":o(e)}var o=n(495);e.exports=r},function(e,t){e.exports="import React, { Component, PropTypes } from 'react'\nimport WizardFormFirstPage from './WizardFormFirstPage'\nimport WizardFormSecondPage from './WizardFormSecondPage'\nimport WizardFormThirdPage from './WizardFormThirdPage'\n\nclass WizardForm extends Component {\n constructor(props) {\n super(props)\n this.nextPage = this.nextPage.bind(this)\n this.previousPage = this.previousPage.bind(this)\n this.state = {\n page: 1\n }\n }\n nextPage() {\n this.setState({ page: this.state.page + 1 })\n }\n\n previousPage() {\n this.setState({ page: this.state.page - 1 })\n }\n\n render() {\n const { onSubmit } = this.props\n const { page } = this.state\n return (<div>\n {page === 1 && <WizardFormFirstPage onSubmit={this.nextPage}/>}\n {page === 2 && <WizardFormSecondPage previousPage={this.previousPage} onSubmit={this.nextPage}/>}\n {page === 3 && <WizardFormThirdPage previousPage={this.previousPage} onSubmit={onSubmit}/>}\n </div>\n )\n }\n}\n\nWizardForm.propTypes = {\n onSubmit: PropTypes.func.isRequired\n}\n\nexport default WizardForm\n"},function(e,t){e.exports='import React from \'react\'\nimport { Field, reduxForm } from \'redux-form\'\nimport validate from \'./validate\'\nimport renderField from \'./renderField\'\n\nconst WizardFormFirstPage = (props) => {\n const { handleSubmit } = props\n return (\n <form onSubmit={handleSubmit}>\n <Field name="firstName" type="text" component={renderField} label="First Name"/>\n <Field name="lastName" type="text" component={renderField} label="Last Name"/>\n <div>\n <button type="submit" className="next">Next</button>\n </div>\n </form>\n ) \n}\n\nexport default reduxForm({\n form: \'wizard\', // <------ same form name\n destroyOnUnmount: false, // <------ preserve form data\n validate\n})(WizardFormFirstPage)\n'},function(e,t){e.exports='import React from \'react\'\nimport { Field, reduxForm } from \'redux-form\'\nimport validate from \'./validate\'\nimport renderField from \'./renderField\'\n\nconst renderError = ({ meta: { touched, error } }) => touched && error ?\n <span>{error}</span> : false\n\nconst WizardFormSecondPage = (props) => {\n const { handleSubmit, previousPage } = props\n return (\n <form onSubmit={handleSubmit}>\n <Field name="email" type="email" component={renderField} label="Email"/>\n <div>\n <label>Sex</label>\n <div>\n <label><Field name="sex" component="input" type="radio" value="male"/> Male</label>\n <label><Field name="sex" component="input" type="radio" value="female"/> Female</label>\n <Field name="sex" component={renderError}/>\n </div>\n </div>\n <div>\n <button type="button" className="previous" onClick={previousPage}>Previous</button>\n <button type="submit" className="next">Next</button>\n </div>\n </form>\n )\n}\n\nexport default reduxForm({\n form: \'wizard\', //Form name is same\n destroyOnUnmount: false,\n validate\n})(WizardFormSecondPage)\n'},function(e,t){e.exports='import React from \'react\'\nimport { Field, reduxForm } from \'redux-form\'\nimport validate from \'./validate\'\nconst colors = [ \'Red\', \'Orange\', \'Yellow\', \'Green\', \'Blue\', \'Indigo\', \'Violet\' ]\n\nconst renderColorSelector = ({ input, meta: { touched, error } }) => (\n <div>\n <select {...input}>\n <option value="">Select a color...</option>\n {colors.map(val => <option value={val} key={val}>{val}</option>)}\n </select>\n {touched && error && <span>{error}</span>}\n </div>\n)\n\nconst WizardFormThirdPage = (props) => {\n const { handleSubmit, pristine, previousPage, submitting } = props\n return (\n <form onSubmit={handleSubmit}>\n <div>\n <label>Favorite Color</label>\n <Field name="favoriteColor" component={renderColorSelector}/>\n </div>\n <div>\n <label htmlFor="employed">Employed</label>\n <div>\n <Field name="employed" id="employed" component="input" type="checkbox"/>\n </div>\n </div>\n <div>\n <label>Notes</label>\n <div>\n <Field name="notes" component="textarea" placeholder="Notes"/>\n </div>\n </div>\n <div>\n <button type="button" className="previous" onClick={previousPage}>Previous</button>\n <button type="submit" disabled={pristine || submitting}>Submit</button>\n </div>\n </form>\n )\n}\nexport default reduxForm({\n form: \'wizard\', //Form name is same\n destroyOnUnmount: false,\n validate\n})(WizardFormThirdPage)\n'},function(e,t){e.exports="import React from 'react'\n\nconst renderField = ({ input, label, type, meta: { touched, error } }) => (\n <div>\n <label>{label}</label>\n <div>\n <input {...input} placeholder={label} type={type}/>\n {touched && error && <span>{error}</span>}\n </div>\n </div>\n)\n\nexport default renderField\n"},function(e,t){e.exports="const validate = values => {\n const errors = {}\n if (!values.firstName) {\n errors.firstName = 'Required'\n }\n if (!values.lastName) {\n errors.lastName = 'Required'\n }\n if (!values.email) {\n errors.email = 'Required'\n } else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i.test(values.email)) {\n errors.email = 'Invalid email address'\n }\n if (!values.sex) {\n errors.sex = 'Required'\n }\n if (!values.favoriteColor) {\n errors.favoriteColor = 'Required'\n }\n return errors\n}\n\nexport default validate\n"},function(e,t,n){"use strict";e.exports=n(573)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{ constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t["default"]=void 0;var u=n(14),s=n(225),c=r(s),l=n(226),p=(r(l),function(e){function t(n,r){o(this,t);var a=i(this,e.call(this,n,r));return a.store=n.store,a}return a(t,e),t.prototype.getChildContext=function(){return{store:this.store}},t.prototype.render=function(){var e=this.props.children;return u.Children.only(e)},t}(u.Component));t["default"]=p,p.propTypes={store:c["default"].isRequired,children:u.PropTypes.element.isRequired},p.childContextTypes={store:c["default"].isRequired}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.displayName||e.name||"Component"}function s(e,t){try{return e.apply(t)}catch(n){return O.value=n,O}}function c(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],c=Boolean(e),f=e||w,h=void 0;h="function"==typeof t?t:t?(0,y["default"])(t):P;var m=n||S,g=r.pure,b=void 0===g||g,_=r.withRef,x=void 0!==_&&_,R=b&&m!==S,A=T++;return function(e){function t(e,t,n){var r=m(e,t,n);return r}var n="Connect("+u(e)+")",r=function(r){function u(e,t){o(this,u);var a=i(this,r.call(this,e,t));a.version=A,a.store=e.store||t.store,(0,C["default"])(a.store,'Could not find "store" in either the context or '+('props of "'+n+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+n+'".'));var s=a.store.getState();return a.state={storeState:s},a.clearCache(),a}return a(u,r),u.prototype.shouldComponentUpdate=function(){return!b||this.haveOwnPropsChanged||this.hasStoreStateChanged},u.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),r=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return r},u.prototype.configureFinalMapState=function(e,t){var n=f(e.getState(),t),r="function"==typeof n;return this.finalMapStateToProps=r?n:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):n},u.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,r=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return r},u.prototype.configureFinalMapDispatch=function(e,t){var n=h(e.dispatch,t),r="function"==typeof n;return this.finalMapDispatchToProps=r?n:h,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):n},u.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,v["default"])(e,this.stateProps))&&(this.stateProps=e,!0)},u.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,v["default"])(e,this.dispatchProps))&&(this.dispatchProps=e,!0)},u.prototype.updateMergedPropsIfNeeded=function(){var e=t(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&R&&(0,v["default"])(e,this.mergedProps))&&(this.mergedProps=e,!0)},u.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},u.prototype.trySubscribe=function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},u.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},u.prototype.componentDidMount=function(){this.trySubscribe()},u.prototype.componentWillReceiveProps=function(e){b&&(0,v["default"])(e,this.props)||(this.haveOwnPropsChanged=!0)},u.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},u.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},u.prototype.handleChange=function(){if(this.unsubscribe){var e=this.store.getState(),t=this.state.storeState;if(!b||t!==e){if(b&&!this.doStatePropsDependOnOwnProps){var n=s(this.updateStatePropsIfNeeded,this);if(!n)return;n===O&&(this.statePropsPrecalculationError=O.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:e})}}},u.prototype.getWrappedInstance=function(){return(0,C["default"])(x,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},u.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,r=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,i=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var a=!0,u=!0;b&&i&&(a=n||t&&this.doStatePropsDependOnOwnProps,u=t&&this.doDispatchPropsDependOnOwnProps);var s=!1,c=!1;r?s=!0:a&&(s=this.updateStatePropsIfNeeded()),u&&(c=this.updateDispatchPropsIfNeeded());var f=!0;return f=!!(s||c||t)&&this.updateMergedPropsIfNeeded(),!f&&i?i:(x?this.renderedElement=(0,p.createElement)(e,l({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,p.createElement)(e,this.mergedProps),this.renderedElement)},u}(p.Component);return r.displayName=n,r.WrappedComponent=e,r.contextTypes={store:d["default"]},r.propTypes={store:d["default"]},(0,E["default"])(r,e)}}var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.__esModule=!0,t["default"]=c;var p=n(14),f=n(225),d=r(f),h=n(558),v=r(h),m=n(559),y=r(m),g=n(226),b=(r(g),n(147)),_=(r(b),n(207)),E=r(_),x=n(74),C=r(x),w=function(e){return{}},P=function(e){return{dispatch:e}},S=function(e,t,n){return l({},n,e,t)},O={value:null},T=0},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,i=0;i<n.length;i++)if(!o.call(t,n[i])||e[n[i]]!==t[n[i]])return!1;return!0}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return function(t){return(0,o.bindActionCreators)(e,t)}}t.__esModule=!0,t["default"]=r;var o=n(110)},function(e,t,n){"use strict";var r=n(13),o=n(205),i={focusDOMComponent:function(){o(r.getNodeFromInstance(this))}};e.exports=i},function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function i(e){switch(e){case T.topCompositionStart:return R.compositionStart;case T.topCompositionEnd:return R.compositionEnd;case T.topCompositionUpdate:return R.compositionUpdate}}function a(e,t){return e===T.topKeyDown&&t.keyCode===E}function u(e,t){switch(e){case T.topKeyUp:return _.indexOf(t.keyCode)!==-1;case T.topKeyDown:return t.keyCode!==E;case T.topKeyPress:case T.topMouseDown:case T.topBlur:return!0;default:return!1}}function s(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function c(e,t,n,r){var o,c;if(x?o=i(e):k?u(e,n)&&(o=R.compositionEnd):a(e,n)&&(o=R.compositionStart),!o)return null;P&&(k||o!==R.compositionStart?o===R.compositionEnd&&k&&(c=k.getData()):k=m.getPooled(r));var l=y.getPooled(o,t,n,r);if(c)l.data=c;else{var p=s(n);null!==p&&(l.data=p)}return h.accumulateTwoPhaseDispatches(l),l}function l(e,t){switch(e){case T.topCompositionEnd:return s(t);case T.topKeyPress:var n=t.which;return n!==S?null:(A=!0,O);case T.topTextInput:var r=t.data;return r===O&&A?null:r;default:return null}}function p(e,t){if(k){if(e===T.topCompositionEnd||u(e,t)){var n=k.getData();return m.release(k),k=null,n}return null}switch(e){case T.topPaste:return null;case T.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case T.topCompositionEnd:return P?null:t.data;default:return null}}function f(e,t,n,r){var o;if(o=w?l(e,n):p(e,n),!o)return null;var i=g.getPooled(R.beforeInput,t,n,r);return i.data=o,h.accumulateTwoPhaseDispatches(i),i}var d=n(40),h=n(79),v=n(18),m=n(567),y=n(605),g=n(608),b=n(45),_=[9,13,27,32],E=229,x=v.canUseDOM&&"CompositionEvent"in window,C=null;v.canUseDOM&&"documentMode"in document&&(C=document.documentMode);var w=v.canUseDOM&&"TextEvent"in window&&!C&&!r(),P=v.canUseDOM&&(!x||C&&C>8&&C<=11),S=32,O=String.fromCharCode(S),T=d.topLevelTypes,R={beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[T.topCompositionEnd,T.topKeyPress,T.topTextInput,T.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[T.topBlur,T.topCompositionEnd,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[T.topBlur,T.topCompositionStart,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[T.topBlur,T.topCompositionUpdate,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]}},A=!1,k=null,M={eventTypes:R,extractEvents:function(e,t,n,r){return[c(e,t,n,r),f(e,t,n,r)]}};e.exports=M},function(e,t,n){"use strict";var r=n(227),o=n(18),i=(n(30),n(455),n(615)),a=n(462),u=n(465),s=(n(6),u(function(e){return a(e)})),c=!1,l="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(f){c=!0}void 0===document.documentElement.style.cssFloat&&(l="styleFloat")}var d={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=s(r)+":",n+=i(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var a in t)if(t.hasOwnProperty(a)){var u=i(a,t[a],n);if("float"!==a&&"cssFloat"!==a||(a=l),u)o[a]=u;else{var s=c&&r.shorthandPropertyExpansions[a];if(s)for(var p in s)o[p]="";else o[a]=""}}}};e.exports=d},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function o(e){var t=w.getPooled(A.change,M,e,P(e));_.accumulateTwoPhaseDispatches(t),C.batchedUpdates(i,t)}function i(e){b.enqueueEvents(e),b.processEventQueue(!1)}function a(e,t){k=e,M=t,k.attachEvent("onchange",o)}function u(){k&&(k.detachEvent("onchange",o),k=null,M=null)}function s(e,t){if(e===R.topChange)return t}function c(e,t,n){e===R.topFocus?(u(),a(t,n)):e===R.topBlur&&u()}function l(e,t){k=e,M=t,N=e.value,I=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(k,"value",D),k.attachEvent?k.attachEvent("onpropertychange",f):k.addEventListener("propertychange",f,!1)}function p(){k&&(delete k.value,k.detachEvent?k.detachEvent("onpropertychange",f):k.removeEventListener("propertychange",f,!1),k=null,M=null,N=null,I=null)}function f(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==N&&(N=t,o(e))}}function d(e,t){if(e===R.topInput)return t}function h(e,t,n){e===R.topFocus?(p(),l(t,n)):e===R.topBlur&&p()}function v(e,t){if((e===R.topSelectionChange||e===R.topKeyUp||e===R.topKeyDown)&&k&&k.value!==N)return N=k.value,M}function m(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function y(e,t){if(e===R.topClick)return t}var g=n(40),b=n(78),_=n(79),E=n(18),x=n(13),C=n(35),w=n(41),P=n(167),S=n(168),O=n(251),T=n(45),R=g.topLevelTypes,A={change:{phasedRegistrationNames:{bubbled:T({onChange:null}),captured:T({onChangeCapture:null})},dependencies:[R.topBlur,R.topChange,R.topClick,R.topFocus,R.topInput,R.topKeyDown,R.topKeyUp,R.topSelectionChange]}},k=null,M=null,N=null,I=null,j=!1;E.canUseDOM&&(j=S("change")&&(!("documentMode"in document)||document.documentMode>8));var F=!1;E.canUseDOM&&(F=S("input")&&(!("documentMode"in document)||document.documentMode>11));var D={get:function(){return I.get.call(this)},set:function(e){N=""+e,I.set.call(this,e)}},L={eventTypes:A,extractEvents:function(e,t,n,o){var i,a,u=t?x.getNodeFromInstance(t):window;if(r(u)?j?i=s:a=c:O(u)?F?i=d:(i=v,a=h):m(u)&&(i=y),i){var l=i(e,t);if(l){var p=w.getPooled(A.change,l,n,o);return p.type="change",_.accumulateTwoPhaseDispatches(p),p}}a&&a(e,u,t)}};e.exports=L},function(e,t,n){"use strict";var r=n(4),o=n(67),i=n(18),a=n(458),u=n(29),s=(n(2),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM?void 0:r("56"),t?void 0:r("57"),"HTML"===e.nodeName?r("58"):void 0,"string"==typeof t){var n=a(t,u)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}});e.exports=s},function(e,t,n){"use strict";var r=n(45),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];e.exports=o},function(e,t,n){"use strict";var r=n(40),o=n(79),i=n(13),a=n(106),u=n(45),s=r.topLevelTypes,c={mouseEnter:{registrationName:u({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:u({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},l={eventTypes:c,extractEvents:function(e,t,n,r){if(e===s.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var u;if(r.window===r)u=r;else{var l=r.ownerDocument;u=l?l.defaultView||l.parentWindow:window}var p,f;if(e===s.topMouseOut){p=t;var d=n.relatedTarget||n.toElement;f=d?i.getClosestInstanceFromNode(d):null}else p=null,f=t;if(p===f)return null;var h=null==p?u:i.getNodeFromInstance(p),v=null==f?u:i.getNodeFromInstance(f),m=a.getPooled(c.mouseLeave,p,n,r);m.type="mouseleave",m.target=h,m.relatedTarget=v;var y=a.getPooled(c.mouseEnter,f,n,r);return y.type="mouseenter",y.target=v,y.relatedTarget=h,o.accumulateEnterLeaveDispatches(m,y,p,f),[m,y]}};e.exports=l},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(10),i=n(48),a=n(249);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);var u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(68),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_NUMERIC_VALUE,u=r.injection.HAS_POSITIVE_NUMERIC_VALUE,s=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,c={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:u,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,"default":i,defer:i,dir:0,disabled:i,download:s,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,referrerPolicy:0,rel:0,required:i,reversed:i,role:0,rows:u,rowSpan:a,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:u,sizes:0,span:u,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:a,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,"typeof":0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=c},function(e,t,n){"use strict";var r=n(10),o=n(230),i=n(155),a=n(595),u=n(231),s=n(578),c=n(34),l=n(241),p=n(242),f=n(621),d=(n(6),c.createElement),h=c.createFactory,v=c.cloneElement,m=r,y={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:f},Component:i,PureComponent:a,createElement:d,cloneElement:v,isValidElement:c.isValidElement,PropTypes:l,createClass:u.createClass,createFactory:h,createMixin:function(e){return e},DOM:s,version:p,__spread:m};e.exports=y},function(e,t,n){(function(t){"use strict";function r(e,t,n,r){var o=void 0===e[n];null!=t&&o&&(e[n]=i(t,!0))}var o=n(69),i=n(250),a=(n(153),n(169)),u=n(170),s=(n(6),{instantiateChildren:function(e,t,n,o){if(null==e)return null;var i={};return u(e,r,i),i},updateChildren:function(e,t,n,r,u,s,c,l,p){if(t||e){var f,d;for(f in t)if(t.hasOwnProperty(f)){d=e&&e[f];var h=d&&d._currentElement,v=t[f];if(null!=d&&a(h,v))o.receiveComponent(d,v,u,l),t[f]=d;else{d&&(r[f]=o.getHostNode(d),o.unmountComponent(d,!1));var m=i(v,!0);t[f]=m;var y=o.mountComponent(m,u,s,c,l,p);n.push(y)}}for(f in e)!e.hasOwnProperty(f)||t&&t.hasOwnProperty(f)||(d=e[f],r[f]=o.getHostNode(d),o.unmountComponent(d,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];o.unmountComponent(r,t)}}});e.exports=s}).call(t,n(103))},function(e,t,n){"use strict";var r=n(149),o=n(580),i={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup};e.exports=i},function(e,t,n){"use strict";function r(e){}function o(e,t){}function i(e){return!(!e.prototype||!e.prototype.isReactComponent)}function a(e){return!(!e.prototype||!e.prototype.isPureReactComponent)}var u=n(4),s=n(10),c=n(156),l=n(49),p=n(34),f=n(158),d=n(80),h=(n(30),n(240)),v=(n(161),n(69)),m=n(614),y=n(73),g=(n(2),n(138)),b=n(169),_=(n(6),{ImpureClass:0,PureClass:1,StatelessFunctional:2});r.prototype.render=function(){var e=d.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return o(e,t),t};var E=1,x={construct:function(e){this._currentElement=e,this._rootNodeID=0,this._compositeType=null,this._instance=null,this._hostParent=null,this._hostContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,s){this._context=s,this._mountOrder=E++,this._hostParent=t,this._hostContainerInfo=n;var c,l=this._currentElement.props,f=this._processContext(s),h=this._currentElement.type,v=e.getUpdateQueue(),m=i(h),g=this._constructComponent(m,l,f,v);m||null!=g&&null!=g.render?a(h)?this._compositeType=_.PureClass:this._compositeType=_.ImpureClass:(c=g,o(h,c),null===g||g===!1||p.isValidElement(g)?void 0:u("105",h.displayName||h.name||"Component"),g=new r(h),this._compositeType=_.StatelessFunctional);g.props=l,g.context=f,g.refs=y,g.updater=v,this._instance=g,d.set(g,this);var b=g.state;void 0===b&&(g.state=b=null),"object"!=typeof b||Array.isArray(b)?u("106",this.getName()||"ReactCompositeComponent"):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var x;return x=g.unstable_handleError?this.performInitialMountWithErrorHandling(c,t,n,e,s):this.performInitialMount(c,t,n,e,s),g.componentDidMount&&e.getReactMountReady().enqueue(g.componentDidMount,g),x},_constructComponent:function(e,t,n,r){return this._constructComponentWithoutOwner(e,t,n,r)},_constructComponentWithoutOwner:function(e,t,n,r){var o,i=this._currentElement.type;return o=e?new i(t,n,r):i(t,n,r)},performInitialMountWithErrorHandling:function(e,t,n,r,o){var i,a=r.checkpoint();try{i=this.performInitialMount(e,t,n,r,o)}catch(u){r.rollback(a),this._instance.unstable_handleError(u),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),i=this.performInitialMount(e,t,n,r,o)}return i},performInitialMount:function(e,t,n,r,o){var i=this._instance;i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),void 0===e&&(e=this._renderValidatedComponent());var a=h.getType(e);this._renderedNodeType=a;var u=this._instantiateReactComponent(e,a!==h.EMPTY);this._renderedComponent=u;var s=0,c=v.mountComponent(u,r,t,n,this._processChildContext(o),s);return c},getHostNode:function(){return v.getHostNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";f.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(v.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=0,this._topLevelWrapper=null,d.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return y;var r={};for(var o in n)r[o]=e[o];return r},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?u("107",this.getName()||"ReactCompositeComponent"):void 0;for(var o in r)o in t.childContextTypes?void 0:u("108",this.getName()||"ReactCompositeComponent",o);return s({},e,r)}return e},_checkContextTypes:function(e,t,n){m(e,t,n,this.getName(),null,this._debugID)},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?v.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(e,t,n,r,o){var i=this._instance;null==i?u("136",this.getName()||"ReactCompositeComponent"):void 0;var a,s=!1;this._context===o?a=i.context:(a=this._processContext(o),s=!0);var c=t.props,l=n.props;t!==n&&(s=!0),s&&i.componentWillReceiveProps&&i.componentWillReceiveProps(l,a);var p=this._processPendingState(l,a),f=!0;this._pendingForceUpdate||(i.shouldComponentUpdate?f=i.shouldComponentUpdate(l,p,a):this._compositeType===_.PureClass&&(f=!g(c,l)||!g(i.state,p))),this._updateBatchNumber=null,f?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,l,p,a,e,o)):(this._currentElement=n,this._context=o,i.props=l,i.state=p,i.context=a)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var i=s({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var u=r[a];s(i,"function"==typeof u?u.call(n,i,e,t):u)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var a,u,s,c=this._instance,l=Boolean(c.componentDidUpdate);l&&(a=c.props,u=c.state,s=c.context),c.componentWillUpdate&&c.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,c.props=t,c.state=n,c.context=r,this._updateRenderedComponent(o,i),l&&o.getReactMountReady().enqueue(c.componentDidUpdate.bind(c,a,u,s),c)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(b(r,o))v.receiveComponent(n,o,e,this._processChildContext(t));else{var i=v.getHostNode(n);v.unmountComponent(n,!1);var a=h.getType(o);this._renderedNodeType=a;var u=this._instantiateReactComponent(o,a!==h.EMPTY);this._renderedComponent=u;var s=0,c=v.mountComponent(u,e,this._hostParent,this._hostContainerInfo,this._processChildContext(t),s);this._replaceNodeWithMarkup(i,c,n)}},_replaceNodeWithMarkup:function(e,t,n){c.replaceNodeWithMarkup(e,t,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e;if(this._compositeType!==_.StatelessFunctional){l.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{l.current=null}}else e=this._renderValidatedComponentWithoutOwnerOrContext();return null===e||e===!1||p.isValidElement(e)?void 0:u("109",this.getName()||"ReactCompositeComponent"),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?u("110"):void 0;var r=t.getPublicInstance(),o=n.refs===y?n.refs={}:n.refs;o[e]=r},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return this._compositeType===_.StatelessFunctional?null:e},_instantiateReactComponent:null},C={Mixin:x};e.exports=C},function(e,t,n){"use strict";var r=n(13),o=n(588),i=n(238),a=n(69),u=n(35),s=n(242),c=n(616),l=n(247),p=n(623);n(6);o.inject();var f={findDOMNode:c,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:s,unstable_batchedUpdates:u.batchedUpdates,unstable_renderSubtreeIntoContainer:p};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=l(e)),e?r.getNodeFromInstance(e):null}},Mount:i,Reconciler:a});e.exports=f},function(e,t,n){"use strict";var r=n(104),o={getHostProps:r.getHostProps};e.exports=o},function(e,t,n){"use strict";function r(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function o(e,t){t&&(Q[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?v("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?v("60"):void 0,"object"==typeof t.dangerouslySetInnerHTML&&z in t.dangerouslySetInnerHTML?void 0:v("61")),null!=t.style&&"object"!=typeof t.style?v("62",r(e)):void 0)}function i(e,t,n,r){if(!(r instanceof j)){var o=e._hostContainerInfo,i=o._node&&o._node.nodeType===K,u=i?o._node:o._ownerDocument;B(t,u),r.getReactMountReady().enqueue(a,{inst:e,registrationName:t,listener:n})}}function a(){var e=this;w.putListener(e.inst,e.registrationName,e.listener)}function u(){var e=this;A.postMountWrapper(e)}function s(){var e=this;N.postMountWrapper(e)}function c(){var e=this;k.postMountWrapper(e)}function l(){var e=this;e._rootNodeID?void 0:v("63");var t=V(e);switch(t?void 0:v("64"),e._tag){case"iframe":case"object":e._wrapperState.listeners=[S.trapBubbledEvent(C.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in G)G.hasOwnProperty(n)&&e._wrapperState.listeners.push(S.trapBubbledEvent(C.topLevelTypes[n],G[n],t));break;case"source":e._wrapperState.listeners=[S.trapBubbledEvent(C.topLevelTypes.topError,"error",t)];break;case"img":e._wrapperState.listeners=[S.trapBubbledEvent(C.topLevelTypes.topError,"error",t),S.trapBubbledEvent(C.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[S.trapBubbledEvent(C.topLevelTypes.topReset,"reset",t),S.trapBubbledEvent(C.topLevelTypes.topSubmit,"submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[S.trapBubbledEvent(C.topLevelTypes.topInvalid,"invalid",t)]}}function p(){M.postUpdateWrapper(this)}function f(e){ee.call(J,e)||(Z.test(e)?void 0:v("65",e),J[e]=!0)}function d(e,t){return e.indexOf("-")>=0||null!=t.is}function h(e){var t=e.type;f(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var v=n(4),m=n(10),y=n(560),g=n(562),b=n(67),_=n(150),E=n(68),x=n(229),C=n(40),w=n(78),P=n(151),S=n(105),O=n(574),T=n(232),R=n(13),A=n(581),k=n(582),M=n(233),N=n(585),I=(n(30),n(593)),j=n(598),F=(n(29),n(107)),D=(n(2),n(168),n(45)),L=(n(138),n(171),n(6),T),U=w.deleteListener,V=R.getNodeFromInstance,B=S.listenTo,W=P.registrationNameModules,q={string:!0,number:!0},H=D({style:null}),z=D({__html:null}),Y={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},K=11,G={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},$={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},X={listing:!0,pre:!0,textarea:!0},Q=m({menuitem:!0},$),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,J={},ee={}.hasOwnProperty,te=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=te++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(l,this);break;case"button":i=O.getHostProps(this,i,t);break;case"input":A.mountWrapper(this,i,t),i=A.getHostProps(this,i),e.getReactMountReady().enqueue(l,this);break;case"option":k.mountWrapper(this,i,t),i=k.getHostProps(this,i);break;case"select":M.mountWrapper(this,i,t), i=M.getHostProps(this,i),e.getReactMountReady().enqueue(l,this);break;case"textarea":N.mountWrapper(this,i,t),i=N.getHostProps(this,i),e.getReactMountReady().enqueue(l,this)}o(this,i);var a,p;null!=t?(a=t._namespaceURI,p=t._tag):n._tag&&(a=n._namespaceURI,p=n._tag),(null==a||a===_.svg&&"foreignobject"===p)&&(a=_.html),a===_.html&&("svg"===this._tag?a=_.svg:"math"===this._tag&&(a=_.mathml)),this._namespaceURI=a;var f;if(e.useCreateElement){var d,h=n._ownerDocument;if(a===_.html)if("script"===this._tag){var v=h.createElement("div"),m=this._currentElement.type;v.innerHTML="<"+m+"></"+m+">",d=v.removeChild(v.firstChild)}else d=i.is?h.createElement(this._currentElement.type,i.is):h.createElement(this._currentElement.type);else d=h.createElementNS(a,this._currentElement.type);R.precacheNode(this,d),this._flags|=L.hasCachedChildNodes,this._hostParent||x.setAttributeForRoot(d),this._updateDOMProperties(null,i,e);var g=b(d);this._createInitialChildren(e,i,r,g),f=g}else{var E=this._createOpenTagMarkupAndPutListeners(e,i),C=this._createContentMarkup(e,i,r);f=!C&&$[this._tag]?E+"/>":E+">"+C+"</"+this._currentElement.type+">"}switch(this._tag){case"input":e.getReactMountReady().enqueue(u,this),i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(s,this),i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"select":i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"button":i.autoFocus&&e.getReactMountReady().enqueue(y.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(c,this)}return f},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(W.hasOwnProperty(r))o&&i(this,r,o,e);else{r===H&&(o&&(o=this._previousStyleCopy=m({},t.style)),o=g.createMarkupForStyles(o,this));var a=null;null!=this._tag&&d(this._tag,t)?Y.hasOwnProperty(r)||(a=x.createMarkupForCustomAttribute(r,o)):a=x.createMarkupForProperty(r,o),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+x.createMarkupForRoot()),n+=" "+x.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=q[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=F(i);else if(null!=a){var u=this.mountChildren(a,e,n);r=u.join("")}}return X[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&b.queueHTML(r,o.__html);else{var i=q[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)b.queueText(r,i);else if(null!=a)for(var u=this.mountChildren(a,e,n),s=0;s<u.length;s++)b.queueChild(r,u[s])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,r){var i=t.props,a=this._currentElement.props;switch(this._tag){case"button":i=O.getHostProps(this,i),a=O.getHostProps(this,a);break;case"input":i=A.getHostProps(this,i),a=A.getHostProps(this,a);break;case"option":i=k.getHostProps(this,i),a=k.getHostProps(this,a);break;case"select":i=M.getHostProps(this,i),a=M.getHostProps(this,a);break;case"textarea":i=N.getHostProps(this,i),a=N.getHostProps(this,a)}switch(o(this,a),this._updateDOMProperties(i,a,e),this._updateDOMChildren(i,a,e,r),this._tag){case"input":A.updateWrapper(this);break;case"textarea":N.updateWrapper(this);break;case"select":e.getReactMountReady().enqueue(p,this)}},_updateDOMProperties:function(e,t,n){var r,o,a;for(r in e)if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&null!=e[r])if(r===H){var u=this._previousStyleCopy;for(o in u)u.hasOwnProperty(o)&&(a=a||{},a[o]="");this._previousStyleCopy=null}else W.hasOwnProperty(r)?e[r]&&U(this,r):d(this._tag,e)?Y.hasOwnProperty(r)||x.deleteValueForAttribute(V(this),r):(E.properties[r]||E.isCustomAttribute(r))&&x.deleteValueForProperty(V(this),r);for(r in t){var s=t[r],c=r===H?this._previousStyleCopy:null!=e?e[r]:void 0;if(t.hasOwnProperty(r)&&s!==c&&(null!=s||null!=c))if(r===H)if(s?s=this._previousStyleCopy=m({},s):this._previousStyleCopy=null,c){for(o in c)!c.hasOwnProperty(o)||s&&s.hasOwnProperty(o)||(a=a||{},a[o]="");for(o in s)s.hasOwnProperty(o)&&c[o]!==s[o]&&(a=a||{},a[o]=s[o])}else a=s;else if(W.hasOwnProperty(r))s?i(this,r,s,n):c&&U(this,r);else if(d(this._tag,t))Y.hasOwnProperty(r)||x.setValueForAttribute(V(this),r,s);else if(E.properties[r]||E.isCustomAttribute(r)){var l=V(this);null!=s?x.setValueForProperty(l,r,s):x.deleteValueForProperty(l,r)}}a&&g.setValueForStyles(V(this),a,this)},_updateDOMChildren:function(e,t,n,r){var o=q[typeof e.children]?e.children:null,i=q[typeof t.children]?t.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,c=null!=i?null:t.children,l=null!=o||null!=a,p=null!=i||null!=u;null!=s&&null==c?this.updateChildren(null,n,r):l&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=u?a!==u&&this.updateMarkup(""+u):null!=c&&this.updateChildren(c,n,r)},getHostNode:function(){return V(this)},unmountComponent:function(e){switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":var t=this._wrapperState.listeners;if(t)for(var n=0;n<t.length;n++)t[n].remove();break;case"html":case"head":case"body":v("66",this._tag)}this.unmountChildren(e),R.uncacheNode(this),w.deleteAllListeners(this),this._rootNodeID=0,this._domID=0,this._wrapperState=null},getPublicInstance:function(){return V(this)}},m(h.prototype,h.Mixin,I.Mixin),e.exports=h},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===o?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var o=(n(171),9);e.exports=r},function(e,t,n){"use strict";var r=n(10),o=n(67),i=n(13),a=function(e){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};r(a.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++;this._domID=a,this._hostParent=t,this._hostContainerInfo=n;var u=" react-empty: "+this._domID+" ";if(e.useCreateElement){var s=n._ownerDocument,c=s.createComment(u);return i.precacheNode(this,c),o(c)}return e.renderToStaticMarkup?"":"<!--"+u+"-->"},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";var r=n(34),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),"var":o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};e.exports=i},function(e,t){"use strict";var n={useCreateElement:!0};e.exports=n},function(e,t,n){"use strict";var r=n(149),o=n(13),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=i},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=c.executeOnChange(t,e);p.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var a=l.getNodeFromInstance(this),u=a;u.parentNode;)u=u.parentNode;for(var s=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),f=0;f<s.length;f++){var d=s[f];if(d!==a&&d.form===a.form){var h=l.getInstanceFromNode(d);h?void 0:i("90"),p.asap(r,h)}}}return n}var i=n(4),a=n(10),u=n(104),s=n(229),c=n(154),l=n(13),p=n(35),f=(n(2),n(6),{getHostProps:function(e,t){var n=c.getValue(t),r=c.getChecked(t),o=a({type:void 0,step:void 0,min:void 0,max:void 0},u.getHostProps(e,t),{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return o},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&s.setValueForProperty(l.getNodeFromInstance(e),"checked",n||!1);var r=l.getNodeFromInstance(e),o=c.getValue(t);if(null!=o){var i=""+o;i!==r.value&&(r.value=i)}else null==t.value&&null!=t.defaultValue&&(r.defaultValue=""+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(r.defaultChecked=!!t.defaultChecked)},postMountWrapper:function(e){var t=e._currentElement.props,n=l.getNodeFromInstance(e);switch(t.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":n.value="",n.value=n.defaultValue;break;default:n.value=n.value}var r=n.name;""!==r&&(n.name=""),n.defaultChecked=!n.defaultChecked,n.defaultChecked=!n.defaultChecked,""!==r&&(n.name=r)}});e.exports=f},function(e,t,n){"use strict";function r(e){var t="";return i.forEach(e,function(e){null!=e&&("string"==typeof e||"number"==typeof e?t+=e:s||(s=!0))}),t}var o=n(10),i=n(230),a=n(13),u=n(233),s=(n(6),!1),c={mountWrapper:function(e,t,n){var o=null;if(null!=n){var i=n;"optgroup"===i._tag&&(i=i._hostParent),null!=i&&"select"===i._tag&&(o=u.getSelectValueContext(i))}var a=null;if(null!=o){var s;if(s=null!=t.value?t.value+"":r(t.children),a=!1,Array.isArray(o)){for(var c=0;c<o.length;c++)if(""+o[c]===s){a=!0;break}}else a=""+o===s}e._wrapperState={selected:a}},postMountWrapper:function(e){var t=e._currentElement.props;if(null!=t.value){var n=a.getNodeFromInstance(e);n.setAttribute("value",t.value)}},getHostProps:function(e,t){var n=o({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);var i=r(t.children);return i&&(n.children=i),n}};e.exports=c},function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function i(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,u=t.getRangeAt(0);try{u.startContainer.nodeType,u.endContainer.nodeType}catch(s){return null}var c=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),l=c?0:u.toString().length,p=u.cloneRange();p.selectNodeContents(e),p.setEnd(u.startContainer,u.startOffset);var f=r(p.startContainer,p.startOffset,p.endContainer,p.endOffset),d=f?0:p.toString().length,h=d+l,v=document.createRange();v.setStart(n,o),v.setEnd(i,a);var m=v.collapsed;return{start:m?h:d,end:m?d:h}}function a(e,t){var n,r,o=document.selection.createRange().duplicate();void 0===t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function u(e,t){if(window.getSelection){var n=window.getSelection(),r=e[l()].length,o=Math.min(t.start,r),i=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var u=c(e,o),s=c(e,i);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=n(18),c=n(619),l=n(249),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:p?o:i,setOffsets:p?a:u};e.exports=f},function(e,t,n){"use strict";var r=n(4),o=n(10),i=n(149),a=n(67),u=n(13),s=n(107),c=(n(2),n(171),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(c.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,i=" react-text: "+o+" ",c=" /react-text ";if(this._domID=o,this._hostParent=t,e.useCreateElement){var l=n._ownerDocument,p=l.createComment(i),f=l.createComment(c),d=a(l.createDocumentFragment());return a.queueChild(d,a(p)),this._stringText&&a.queueChild(d,a(l.createTextNode(this._stringText))),a.queueChild(d,a(f)),u.precacheNode(this,p),this._closingComment=f,d}var h=s(this._stringText);return e.renderToStaticMarkup?h:"<!--"+i+"-->"+h+"<!--"+c+"-->"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();i.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=u.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,u.uncacheNode(this)}}),e.exports=c},function(e,t,n){"use strict";function r(){this._rootNodeID&&p.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return l.asap(r,this),n}var i=n(4),a=n(10),u=n(104),s=n(154),c=n(13),l=n(35),p=(n(2),n(6),{getHostProps:function(e,t){null!=t.dangerouslySetInnerHTML?i("91"):void 0;var n=a({},u.getHostProps(e,t),{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=s.getValue(t),r=n;if(null==n){var a=t.defaultValue,u=t.children;null!=u&&(null!=a?i("92"):void 0,Array.isArray(u)&&(u.length<=1?void 0:i("93"),u=u[0]),a=""+u),null==a&&(a=""),r=a}e._wrapperState={initialValue:""+r,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=c.getNodeFromInstance(e),r=s.getValue(t);if(null!=r){var o=""+r;o!==n.value&&(n.value=o),null==t.defaultValue&&(n.defaultValue=o)}null!=t.defaultValue&&(n.defaultValue=t.defaultValue)},postMountWrapper:function(e){var t=c.getNodeFromInstance(e);t.value=t.textContent}});e.exports=p},function(e,t,n){"use strict";function r(e,t){"_hostNode"in e?void 0:s("33"),"_hostNode"in t?void 0:s("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var o=0,i=t;i;i=i._hostParent)o++;for(;n-o>0;)e=e._hostParent,n--;for(;o-n>0;)t=t._hostParent,o--;for(var a=n;a--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function o(e,t){"_hostNode"in e?void 0:s("35"),"_hostNode"in t?void 0:s("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function i(e){return"_hostNode"in e?void 0:s("36"),e._hostParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var o;for(o=r.length;o-- >0;)t(r[o],!1,n);for(o=0;o<r.length;o++)t(r[o],!0,n)}function u(e,t,n,o,i){for(var a=e&&t?r(e,t):null,u=[];e&&e!==a;)u.push(e),e=e._hostParent;for(var s=[];t&&t!==a;)s.push(t),t=t._hostParent;var c;for(c=0;c<u.length;c++)n(u[c],!0,o);for(c=s.length;c-- >0;)n(s[c],!1,i)}var s=n(4);n(2);e.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:u}},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(10),i=n(35),a=n(82),u=n(29),s={initialize:u,close:function(){f.isBatchingUpdates=!1}},c={initialize:u,close:i.flushBatchedUpdates.bind(i)},l=[c,s];o(r.prototype,a.Mixin,{getTransactionWrappers:function(){return l}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=f.isBatchingUpdates;f.isBatchingUpdates=!0,a?e(t,n,r,o,i):p.perform(e,null,t,n,r,o,i)}};e.exports=f},function(e,t,n){"use strict";function r(){x||(x=!0,y.EventEmitter.injectReactEventListener(m),y.EventPluginHub.injectEventPluginOrder(a),y.EventPluginUtils.injectComponentTree(p),y.EventPluginUtils.injectTreeTraversal(d),y.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:E,EnterLeaveEventPlugin:u,ChangeEventPlugin:i,SelectEventPlugin:_,BeforeInputEventPlugin:o}),y.HostComponent.injectGenericComponentClass(l),y.HostComponent.injectTextComponentClass(h),y.DOMProperty.injectDOMPropertyConfig(s),y.DOMProperty.injectDOMPropertyConfig(b),y.EmptyComponent.injectEmptyComponentFactory(function(e){return new f(e)}),y.Updates.injectReconcileTransaction(g),y.Updates.injectBatchingStrategy(v),y.Component.injectEnvironment(c))}var o=n(561),i=n(563),a=n(565),u=n(566),s=n(568),c=n(571),l=n(575),p=n(13),f=n(577),d=n(586),h=n(584),v=n(587),m=n(590),y=n(591),g=n(596),b=n(600),_=n(601),E=n(602),x=!1;e.exports={inject:r}},function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=n(78),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};e.exports=i},function(e,t,n){"use strict";function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){var t=d(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o=n;do e.ancestors.push(o),o=o&&r(o);while(o);for(var i=0;i<e.ancestors.length;i++)n=e.ancestors[i],v._handleTopLevel(e.topLevelType,n,e.nativeEvent,d(e.nativeEvent))}function a(e){var t=h(window);e(t)}var u=n(10),s=n(204),c=n(18),l=n(48),p=n(13),f=n(35),d=n(167),h=n(460);u(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),l.addPoolingTo(o,l.twoArgumentPooler);var v={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:c.canUseDOM?window:null,setHandleTopLevel:function(e){v._handleTopLevel=e},setEnabled:function(e){v._enabled=!!e},isEnabled:function(){return v._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?s.listen(r,t,v.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?s.capture(r,t,v.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=a.bind(null,e);s.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(v._enabled){var n=o.getPooled(e,t);try{f.batchedUpdates(i,n)}finally{o.release(n)}}}};e.exports=v},function(e,t,n){"use strict";var r=n(68),o=n(78),i=n(152),a=n(156),u=n(231),s=n(234),c=n(105),l=n(236),p=n(35),f={Component:a.injection,Class:u.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:o.injection,EventPluginUtils:i.injection,EventEmitter:c.injection,HostComponent:l.injection,Updates:p.injection};e.exports=f},function(e,t,n){"use strict";var r=n(613),o=/\/?>/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e:e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};e.exports=a},function(e,t,n){"use strict";function r(e,t,n){return{type:f.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:f.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:d.getHostNode(e),toIndex:n,afterNode:t}}function i(e,t){return{type:f.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:f.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e){return{type:f.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e,t){return t&&(e=e||[],e.push(t)),e}function c(e,t){p.processChildrenUpdates(e,t)}var l=n(4),p=n(156),f=(n(80),n(30),n(239)),d=(n(49),n(69)),h=n(570),v=(n(29),n(617)),m=(n(2),{Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return h.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o,i){var a,u=0;return a=v(t,u),h.updateChildren(e,a,n,r,o,this,this._hostContainerInfo,i,u),a},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var u=r[a],s=0,c=d.mountComponent(u,t,this,this._hostContainerInfo,n,s);u._mountIndex=i++,o.push(c)}return o},updateTextContent:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&l("118");var r=[u(e)];c(this,r)},updateMarkup:function(e){var t=this._renderedChildren;h.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&l("118");var r=[a(e)];c(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},i=[],a=this._reconcilerUpdateChildren(r,e,i,o,t,n);if(a||r){var u,l=null,p=0,f=0,h=0,v=null;for(u in a)if(a.hasOwnProperty(u)){var m=r&&r[u],y=a[u];m===y?(l=s(l,this.moveChild(m,v,p,f)),f=Math.max(m._mountIndex,f),m._mountIndex=p):(m&&(f=Math.max(m._mountIndex,f)),l=s(l,this._mountChildAtIndex(y,i[h],v,p,t,n)),h++),p++,v=d.getHostNode(y)}for(u in o)o.hasOwnProperty(u)&&(l=s(l,this._unmountChild(r[u],o[u])));l&&c(this,l),this._renderedChildren=a}},unmountChildren:function(e){var t=this._renderedChildren;h.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex<r)return o(e,t,n)},createChild:function(e,t,n){return r(n,t,e._mountIndex)},removeChild:function(e,t){return i(e,t)},_mountChildAtIndex:function(e,t,n,r,o,i){return e._mountIndex=r,this.createChild(e,n,t)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}});e.exports=m},function(e,t,n){"use strict";var r=n(4),o=(n(2),{isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){o.isValidOwner(n)?void 0:r("119"),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){o.isValidOwner(n)?void 0:r("120");var i=n.getPublicInstance();i&&i.refs[t]===e.getPublicInstance()&&n.detachRef(t)}});e.exports=o},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=s,this.updater=n||u}function o(){}var i=n(10),a=n(155),u=n(159),s=n(73);o.prototype=a.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,e.exports=r},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=e}var o=n(10),i=n(228),a=n(48),u=n(105),s=n(237),c=(n(30),n(82)),l=n(163),p={initialize:s.getSelectionInformation,close:s.restoreSelection},f={initialize:function(){var e=u.isEnabled();return u.setEnabled(!1),e},close:function(e){u.setEnabled(e)}},d={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h=[p,f,d],v={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},getUpdateQueue:function(){return l},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,c.Mixin,v),a.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=n(594),a={};a.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},a.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t.ref!==e.ref||"string"==typeof t.ref&&t._owner!==e._owner},a.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},e.exports=a},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1,this.updateQueue=new u(this)}var o=n(10),i=n(48),a=n(82),u=(n(30),n(599)),s=[],c={enqueue:function(){}},l={getTransactionWrappers:function(){return s},getReactMountReady:function(){return c},getUpdateQueue:function(){return this.updateQueue},destructor:function(){},checkpoint:function(){},rollback:function(){}};o(r.prototype,a.Mixin,l),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){}var i=n(163),a=(n(82),n(6),function(){function e(t){r(this,e),this.transaction=t}return e.prototype.isMounted=function(e){return!1},e.prototype.enqueueCallback=function(e,t,n){this.transaction.isInTransaction()&&i.enqueueCallback(e,t,n)},e.prototype.enqueueForceUpdate=function(e){this.transaction.isInTransaction()?i.enqueueForceUpdate(e):o(e,"forceUpdate")},e.prototype.enqueueReplaceState=function(e,t){this.transaction.isInTransaction()?i.enqueueReplaceState(e,t):o(e,"replaceState")},e.prototype.enqueueSetState=function(e,t){this.transaction.isInTransaction()?i.enqueueSetState(e,t):o(e,"setState")},e}());e.exports=a},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},r={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering","in":0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector", z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(r).forEach(function(e){o.Properties[e]=0,r[e]&&(o.DOMAttributeNames[e]=r[e])}),e.exports=o},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&c.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e,t){if(E||null==g||g!==p())return null;var n=r(g);if(!_||!h(_,n)){_=n;var o=l.getPooled(y.select,b,e,t);return o.type="select",o.target=g,a.accumulateTwoPhaseDispatches(o),o}return null}var i=n(40),a=n(79),u=n(18),s=n(13),c=n(237),l=n(41),p=n(206),f=n(251),d=n(45),h=n(138),v=i.topLevelTypes,m=u.canUseDOM&&"documentMode"in document&&document.documentMode<=11,y={select:{phasedRegistrationNames:{bubbled:d({onSelect:null}),captured:d({onSelectCapture:null})},dependencies:[v.topBlur,v.topContextMenu,v.topFocus,v.topKeyDown,v.topMouseDown,v.topMouseUp,v.topSelectionChange]}},g=null,b=null,_=null,E=!1,x=!1,C=d({onSelect:null}),w={eventTypes:y,extractEvents:function(e,t,n,r){if(!x)return null;var i=t?s.getNodeFromInstance(t):window;switch(e){case v.topFocus:(f(i)||"true"===i.contentEditable)&&(g=i,b=t,_=null);break;case v.topBlur:g=null,b=null,_=null;break;case v.topMouseDown:E=!0;break;case v.topContextMenu:case v.topMouseUp:return E=!1,o(n,r);case v.topSelectionChange:if(m)break;case v.topKeyDown:case v.topKeyUp:return o(n,r)}return null},didPutListener:function(e,t,n){t===C&&(x=!0)}};e.exports=w},function(e,t,n){"use strict";function r(e){return"."+e._rootNodeID}var o=n(4),i=n(40),a=n(204),u=n(79),s=n(13),c=n(603),l=n(604),p=n(41),f=n(607),d=n(609),h=n(106),v=n(606),m=n(610),y=n(611),g=n(81),b=n(612),_=n(29),E=n(165),x=(n(2),n(45)),C=i.topLevelTypes,w={abort:{phasedRegistrationNames:{bubbled:x({onAbort:!0}),captured:x({onAbortCapture:!0})}},animationEnd:{phasedRegistrationNames:{bubbled:x({onAnimationEnd:!0}),captured:x({onAnimationEndCapture:!0})}},animationIteration:{phasedRegistrationNames:{bubbled:x({onAnimationIteration:!0}),captured:x({onAnimationIterationCapture:!0})}},animationStart:{phasedRegistrationNames:{bubbled:x({onAnimationStart:!0}),captured:x({onAnimationStartCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:x({onBlur:!0}),captured:x({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:x({onCanPlay:!0}),captured:x({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:x({onCanPlayThrough:!0}),captured:x({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:x({onClick:!0}),captured:x({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:x({onContextMenu:!0}),captured:x({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:x({onCopy:!0}),captured:x({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:x({onCut:!0}),captured:x({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:x({onDoubleClick:!0}),captured:x({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:x({onDrag:!0}),captured:x({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:x({onDragEnd:!0}),captured:x({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:x({onDragEnter:!0}),captured:x({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:x({onDragExit:!0}),captured:x({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:x({onDragLeave:!0}),captured:x({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:x({onDragOver:!0}),captured:x({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:x({onDragStart:!0}),captured:x({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:x({onDrop:!0}),captured:x({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:x({onDurationChange:!0}),captured:x({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:x({onEmptied:!0}),captured:x({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:x({onEncrypted:!0}),captured:x({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:x({onEnded:!0}),captured:x({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:x({onError:!0}),captured:x({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:x({onFocus:!0}),captured:x({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:x({onInput:!0}),captured:x({onInputCapture:!0})}},invalid:{phasedRegistrationNames:{bubbled:x({onInvalid:!0}),captured:x({onInvalidCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:x({onKeyDown:!0}),captured:x({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:x({onKeyPress:!0}),captured:x({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:x({onKeyUp:!0}),captured:x({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:x({onLoad:!0}),captured:x({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:x({onLoadedData:!0}),captured:x({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:x({onLoadedMetadata:!0}),captured:x({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:x({onLoadStart:!0}),captured:x({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:x({onMouseDown:!0}),captured:x({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:x({onMouseMove:!0}),captured:x({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:x({onMouseOut:!0}),captured:x({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:x({onMouseOver:!0}),captured:x({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:x({onMouseUp:!0}),captured:x({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:x({onPaste:!0}),captured:x({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:x({onPause:!0}),captured:x({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:x({onPlay:!0}),captured:x({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:x({onPlaying:!0}),captured:x({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:x({onProgress:!0}),captured:x({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:x({onRateChange:!0}),captured:x({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:x({onReset:!0}),captured:x({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:x({onScroll:!0}),captured:x({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:x({onSeeked:!0}),captured:x({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:x({onSeeking:!0}),captured:x({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:x({onStalled:!0}),captured:x({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:x({onSubmit:!0}),captured:x({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:x({onSuspend:!0}),captured:x({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:x({onTimeUpdate:!0}),captured:x({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:x({onTouchCancel:!0}),captured:x({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:x({onTouchEnd:!0}),captured:x({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:x({onTouchMove:!0}),captured:x({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:x({onTouchStart:!0}),captured:x({onTouchStartCapture:!0})}},transitionEnd:{phasedRegistrationNames:{bubbled:x({onTransitionEnd:!0}),captured:x({onTransitionEndCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:x({onVolumeChange:!0}),captured:x({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:x({onWaiting:!0}),captured:x({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:x({onWheel:!0}),captured:x({onWheelCapture:!0})}}},P={topAbort:w.abort,topAnimationEnd:w.animationEnd,topAnimationIteration:w.animationIteration,topAnimationStart:w.animationStart,topBlur:w.blur,topCanPlay:w.canPlay,topCanPlayThrough:w.canPlayThrough,topClick:w.click,topContextMenu:w.contextMenu,topCopy:w.copy,topCut:w.cut,topDoubleClick:w.doubleClick,topDrag:w.drag,topDragEnd:w.dragEnd,topDragEnter:w.dragEnter,topDragExit:w.dragExit,topDragLeave:w.dragLeave,topDragOver:w.dragOver,topDragStart:w.dragStart,topDrop:w.drop,topDurationChange:w.durationChange,topEmptied:w.emptied,topEncrypted:w.encrypted,topEnded:w.ended,topError:w.error,topFocus:w.focus,topInput:w.input,topInvalid:w.invalid,topKeyDown:w.keyDown,topKeyPress:w.keyPress,topKeyUp:w.keyUp,topLoad:w.load,topLoadedData:w.loadedData,topLoadedMetadata:w.loadedMetadata,topLoadStart:w.loadStart,topMouseDown:w.mouseDown,topMouseMove:w.mouseMove,topMouseOut:w.mouseOut,topMouseOver:w.mouseOver,topMouseUp:w.mouseUp,topPaste:w.paste,topPause:w.pause,topPlay:w.play,topPlaying:w.playing,topProgress:w.progress,topRateChange:w.rateChange,topReset:w.reset,topScroll:w.scroll,topSeeked:w.seeked,topSeeking:w.seeking,topStalled:w.stalled,topSubmit:w.submit,topSuspend:w.suspend,topTimeUpdate:w.timeUpdate,topTouchCancel:w.touchCancel,topTouchEnd:w.touchEnd,topTouchMove:w.touchMove,topTouchStart:w.touchStart,topTransitionEnd:w.transitionEnd,topVolumeChange:w.volumeChange,topWaiting:w.waiting,topWheel:w.wheel};for(var S in P)P[S].dependencies=[S];var O=x({onClick:null}),T={},R={eventTypes:w,extractEvents:function(e,t,n,r){var i=P[e];if(!i)return null;var a;switch(e){case C.topAbort:case C.topCanPlay:case C.topCanPlayThrough:case C.topDurationChange:case C.topEmptied:case C.topEncrypted:case C.topEnded:case C.topError:case C.topInput:case C.topInvalid:case C.topLoad:case C.topLoadedData:case C.topLoadedMetadata:case C.topLoadStart:case C.topPause:case C.topPlay:case C.topPlaying:case C.topProgress:case C.topRateChange:case C.topReset:case C.topSeeked:case C.topSeeking:case C.topStalled:case C.topSubmit:case C.topSuspend:case C.topTimeUpdate:case C.topVolumeChange:case C.topWaiting:a=p;break;case C.topKeyPress:if(0===E(n))return null;case C.topKeyDown:case C.topKeyUp:a=d;break;case C.topBlur:case C.topFocus:a=f;break;case C.topClick:if(2===n.button)return null;case C.topContextMenu:case C.topDoubleClick:case C.topMouseDown:case C.topMouseMove:case C.topMouseOut:case C.topMouseOver:case C.topMouseUp:a=h;break;case C.topDrag:case C.topDragEnd:case C.topDragEnter:case C.topDragExit:case C.topDragLeave:case C.topDragOver:case C.topDragStart:case C.topDrop:a=v;break;case C.topTouchCancel:case C.topTouchEnd:case C.topTouchMove:case C.topTouchStart:a=m;break;case C.topAnimationEnd:case C.topAnimationIteration:case C.topAnimationStart:a=c;break;case C.topTransitionEnd:a=y;break;case C.topScroll:a=g;break;case C.topWheel:a=b;break;case C.topCopy:case C.topCut:case C.topPaste:a=l}a?void 0:o("86",e);var s=a.getPooled(i,t,n,r);return u.accumulateTwoPhaseDispatches(s),s},didPutListener:function(e,t,n){if(t===O){var o=r(e),i=s.getNodeFromInstance(e);T[o]||(T[o]=a.listen(i,"click",_))}},willDeleteListener:function(e,t){if(t===O){var n=r(e);T[n].remove(),delete T[n]}}};e.exports=R},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(41),i={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(41),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(41),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(106),i={dataTransfer:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(81),i={relatedTarget:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(41),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(81),i=n(165),a=n(618),u=n(166),s={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:u,charCode:function(e){return"keypress"===e.type?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,s),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(81),i=n(166),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(41),i={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(106),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),e.exports=r},function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0,i=e.length,a=i&-4;o<a;){for(var u=Math.min(o+4096,a);o<u;o+=4)n+=(t+=e.charCodeAt(o))+(t+=e.charCodeAt(o+1))+(t+=e.charCodeAt(o+2))+(t+=e.charCodeAt(o+3));t%=r,n%=r}for(;o<i;o++)n+=t+=e.charCodeAt(o);return t%=r,n%=r,t|n<<16}var r=65521;e.exports=n},function(e,t,n){(function(t){"use strict";function r(e,t,n,r,s,c){for(var l in e)if(e.hasOwnProperty(l)){var p;try{"function"!=typeof e[l]?o("84",r||"React class",i[n],l):void 0,p=e[l](t,l,r,n,null,a)}catch(f){p=f}if(p instanceof Error&&!(p.message in u)){u[p.message]=!0}}}var o=n(4),i=n(160),a=n(162),u=(n(2),n(6),{});e.exports=r}).call(t,n(103))},function(e,t,n){"use strict";function r(e,t,n){var r=null==t||"boolean"==typeof t||""===t;if(r)return"";var o=isNaN(t);if(o||0===t||i.hasOwnProperty(e)&&i[e])return""+t;if("string"==typeof t){t=t.trim()}return t+"px"}var o=n(227),i=(n(6),o.isUnitlessNumber);e.exports=r},function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=a.get(e);return t?(t=u(t),t?i.getNodeFromInstance(t):null):void("function"==typeof e.render?o("44"):o("45",Object.keys(e)))}var o=n(4),i=(n(49),n(13)),a=n(80),u=n(247);n(2),n(6);e.exports=r},function(e,t,n){(function(t){"use strict";function r(e,t,n,r){if(e&&"object"==typeof e){var o=e,i=void 0===o[n];i&&null!=t&&(o[n]=t)}}function o(e,t){if(null==e)return e;var n={};return i(e,r,n),n}var i=(n(153),n(170));n(6);e.exports=o}).call(t,n(103))},function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=n(165),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3===o.nodeType){if(a=i+o.textContent.length,i<=t&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}e.exports=o},function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(u[e])return u[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in s)return u[e]=t[n];return""}var i=n(18),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},u={},s={};i.canUseDOM&&(s=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),e.exports=o},function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:o("143"),e}var o=n(4),i=n(34);n(2);e.exports=r},function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=n(107);e.exports=r},function(e,t,n){"use strict";var r=n(238);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){!function(t,r){e.exports=r(n(14))}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){n(177),e.exports=n(185)},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,u],l=0;s=new Error(t.replace(/%s/g,function(){return c[l++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}e.exports=r},function(e,t,n){"use strict";var r=n(9),o=r;e.exports=o},function(e,t){"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(i){return!1}}var o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,a,u=n(e),s=1;s<arguments.length;s++){r=Object(arguments[s]);for(var c in r)o.call(r,c)&&(u[c]=r[c]);if(Object.getOwnPropertySymbols){a=Object.getOwnPropertySymbols(r);for(var l=0;l<a.length;l++)i.call(r,a[l])&&(u[a[l]]=r[a[l]])}}return u}},function(e,t,n){"use strict";function r(e){for(var t;t=e._renderedComponent;)e=t;return e}function o(e,t){var n=r(e);n._nativeNode=t,t[v]=n}function i(e){var t=e._nativeNode;t&&(delete t[v],e._nativeNode=null)}function a(e,t){if(!(e._flags&h.hasCachedChildNodes)){var n=e._renderedChildren,i=t.firstChild;e:for(var a in n)if(n.hasOwnProperty(a)){var u=n[a],s=r(u)._domID;if(null!=s){for(;null!==i;i=i.nextSibling)if(1===i.nodeType&&i.getAttribute(d)===String(s)||8===i.nodeType&&i.nodeValue===" react-text: "+s+" "||8===i.nodeType&&i.nodeValue===" react-empty: "+s+" "){o(u,i);continue e}f(!1)}}e._flags|=h.hasCachedChildNodes}}function u(e){if(e[v])return e[v];for(var t=[];!e[v];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}for(var n,r;e&&(r=e[v]);e=t.pop())n=r,t.length&&a(r,e);return n}function s(e){var t=u(e);return null!=t&&t._nativeNode===e?t:null}function c(e){if(void 0===e._nativeNode?f(!1):void 0,e._nativeNode)return e._nativeNode;for(var t=[];!e._nativeNode;)t.push(e),e._nativeParent?void 0:f(!1),e=e._nativeParent;for(;t.length;e=t.pop())a(e,e._nativeNode);return e._nativeNode}var l=n(19),p=n(139),f=n(1),d=l.ID_ATTRIBUTE_NAME,h=p,v="__reactInternalInstance$"+Math.random().toString(36).slice(2),m={getClosestInstanceFromNode:u,getInstanceFromNode:s,getNodeFromInstance:c,precacheChildNodes:a,precacheNode:o,uncacheNode:i};e.exports=m},function(t,n){t.exports=e},function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};e.exports=r},function(e,t,n){"use strict";var r=n(326);e.exports={debugTool:r}},function(e,t,n){(function(t){var r=n(226),o=r("object"==typeof t&&t),i=r("object"==typeof self&&self),a=r("object"==typeof this&&this),u=o||i||a||Function("return this")();e.exports=u}).call(t,function(){return this}())},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";function r(){O.ReactReconcileTransaction&&E?void 0:m(!1)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=p.getPooled(),this.reconcileTransaction=O.ReactReconcileTransaction.getPooled(!0)}function i(e,t,n,o,i,a){r(),E.batchedUpdates(e,t,n,o,i,a)}function a(e,t){return e._mountOrder-t._mountOrder}function u(e){var t=e.dirtyComponentsLength;t!==y.length?m(!1):void 0,y.sort(a),g++;for(var n=0;n<t;n++){var r=y[n],o=r._pendingCallbacks;r._pendingCallbacks=null;var i;if(d.logTopLevelRenders){var u=r;r._currentElement.props===r._renderedComponent._currentElement&&(u=r._renderedComponent),i="React update: "+u.getName(),console.time(i)}if(h.performUpdateIfNecessary(r,e.reconcileTransaction,g),i&&console.timeEnd(i),o)for(var s=0;s<o.length;s++)e.callbackQueue.enqueue(o[s],r.getPublicInstance())}}function s(e){return r(),E.isBatchingUpdates?(y.push(e),void(null==e._updateBatchNumber&&(e._updateBatchNumber=g+1))):void E.batchedUpdates(s,e)}function c(e,t){E.isBatchingUpdates?void 0:m(!1),b.enqueue(e,t),_=!0}var l=n(3),p=n(136),f=n(16),d=n(145),h=(n(7),n(21)),v=n(51),m=n(1),y=[],g=0,b=p.getPooled(),_=!1,E=null,x={initialize:function(){this.dirtyComponentsLength=y.length},close:function(){this.dirtyComponentsLength!==y.length?(y.splice(0,this.dirtyComponentsLength),P()):y.length=0}},C={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},w=[x,C];l(o.prototype,v.Mixin,{getTransactionWrappers:function(){return w},destructor:function(){this.dirtyComponentsLength=null,p.release(this.callbackQueue),this.callbackQueue=null,O.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return v.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),f.addPoolingTo(o);var P=function(){for(;y.length||_;){if(y.length){var e=o.getPooled();e.perform(u,null,e),o.release(e)}if(_){_=!1;var t=b;b=p.getPooled(),t.notifyAll(),p.release(t)}}},S={injectReconcileTransaction:function(e){e?void 0:m(!1),O.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){e?void 0:m(!1),"function"!=typeof e.batchedUpdates?m(!1):void 0,"boolean"!=typeof e.isBatchingUpdates?m(!1):void 0,E=e}},O={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:s,flushBatchedUpdates:P,injection:S,asap:c};e.exports=O},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";var r=n(32),o=r({bubbled:null,captured:null}),i=r({topAbort:null,topAnimationEnd:null,topAnimationIteration:null,topAnimationStart:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topInvalid:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topTransitionEnd:null,topVolumeChange:null,topWaiting:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:o};e.exports=a},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var o=this.constructor.Interface;for(var i in o)if(o.hasOwnProperty(i)){var u=o[i];u?this[i]=u(n):"target"===i?this.target=r:this[i]=n[i]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return s?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var o=n(3),i=n(16),a=n(9),u=(n(2),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),s={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n<u.length;n++)this[u[n]]=null}}),r.Interface=s,r.augmentClass=function(e,t){var n=this,r=function(){};r.prototype=n.prototype;var a=new r;o(a,e.prototype),e.prototype=a,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,i.addPoolingTo(e,i.fourArgumentPooler)},i.addPoolingTo(r,i.fourArgumentPooler),e.exports=r},function(e,t){"use strict";var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};e.exports=n},function(e,t){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){"use strict";var r=n(1),o=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},u=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},s=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},c=function(e){var t=this;e instanceof t?void 0:r(!1),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},l=10,p=o,f=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||p,n.poolSize||(n.poolSize=l),n.release=c,n},d={addPoolingTo:f,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:u,fiveArgumentPooler:s};e.exports=d},function(e,t,n){"use strict";var r=n(3),o=n(20),i=(n(2),n(158),"function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103),a={key:!0,ref:!0,__self:!0,__source:!0},u=function(e,t,n,r,o,a,u){var s={$$typeof:i,type:e,key:t,ref:n,props:u,_owner:a};return s};u.createElement=function(e,t,n){var r,i={},s=null,c=null,l=null,p=null;if(null!=t){c=void 0===t.ref?null:t.ref,s=void 0===t.key?null:""+t.key,l=void 0===t.__self?null:t.__self,p=void 0===t.__source?null:t.__source;for(r in t)t.hasOwnProperty(r)&&!a.hasOwnProperty(r)&&(i[r]=t[r])}var f=arguments.length-2;if(1===f)i.children=n;else if(f>1){for(var d=Array(f),h=0;h<f;h++)d[h]=arguments[h+2];i.children=d}if(e&&e.defaultProps){var v=e.defaultProps;for(r in v)void 0===i[r]&&(i[r]=v[r])}return u(e,s,c,l,p,o.current,i)},u.createFactory=function(e){var t=u.createElement.bind(null,e);return t.type=e,t},u.cloneAndReplaceKey=function(e,t){var n=u(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},u.cloneElement=function(e,t,n){var i,s=r({},e.props),c=e.key,l=e.ref,p=e._self,f=e._source,d=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,d=o.current),void 0!==t.key&&(c=""+t.key);var h;e.type&&e.type.defaultProps&&(h=e.type.defaultProps);for(i in t)t.hasOwnProperty(i)&&!a.hasOwnProperty(i)&&(void 0===t[i]&&void 0!==h?s[i]=h[i]:s[i]=t[i])}var v=arguments.length-2;if(1===v)s.children=n;else if(v>1){for(var m=Array(v),y=0;y<v;y++)m[y]=arguments[y+2];s.children=m}return u(e.type,c,l,p,f,d,s)},u.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},e.exports=u},function(e,t){function n(e){return!!e&&"object"==typeof e}e.exports=n},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=n(1),i={MUST_USE_PROPERTY:1,HAS_SIDE_EFFECTS:2,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32,injectDOMPropertyConfig:function(e){var t=i,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},s=e.DOMAttributeNames||{},c=e.DOMPropertyNames||{},l=e.DOMMutationMethods||{};e.isCustomAttribute&&u._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){u.properties.hasOwnProperty(p)?o(!1):void 0;var f=p.toLowerCase(),d=n[p],h={attributeName:f,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseProperty:r(d,t.MUST_USE_PROPERTY),hasSideEffects:r(d,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(d,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(d,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(d,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(d,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(!h.mustUseProperty&&h.hasSideEffects?o(!1):void 0,h.hasBooleanValue+h.hasNumericValue+h.hasOverloadedBooleanValue<=1?void 0:o(!1),s.hasOwnProperty(p)){var v=s[p];h.attributeName=v}a.hasOwnProperty(p)&&(h.attributeNamespace=a[p]),c.hasOwnProperty(p)&&(h.propertyName=c[p]),l.hasOwnProperty(p)&&(h.mutationMethod=l[p]),u.properties[p]=h}}},a=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",u={ID_ATTRIBUTE_NAME:"data-reactid",ROOT_ATTRIBUTE_NAME:"data-reactroot",ATTRIBUTE_NAME_START_CHAR:a,ATTRIBUTE_NAME_CHAR:a+"\\-.0-9\\uB7\\u0300-\\u036F\\u203F-\\u2040",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<u._isCustomAttributeFunctions.length;t++){var n=u._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},injection:i};e.exports=u},function(e,t){"use strict";var n={current:null};e.exports=n},function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(334),i=(n(7), n(1)),a={mountComponent:function(e,t,n,o,i){var a=e.mountComponent(t,n,o,i);return e._currentElement&&null!=e._currentElement.ref&&t.getReactMountReady().enqueue(r,e),a},getNativeNode:function(e){return e.getNativeNode()},unmountComponent:function(e,t){o.detachRefs(e,e._currentElement),e.unmountComponent(t)},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||i!==e._context){var u=o.shouldUpdateRefs(a,t);u&&o.detachRefs(e,a),e.receiveComponent(t,n,i),u&&e._currentElement&&null!=e._currentElement.ref&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t,n){return e._updateBatchNumber!==n?void(null!=e._updateBatchNumber&&e._updateBatchNumber!==n+1?i(!1):void 0):void e.performUpdateIfNecessary(t)}};e.exports=a},function(e,t,n){function r(e,t){var n=i(e,t);return o(n)?n:void 0}var o=n(218),i=n(240);e.exports=r},function(e,t,n){"use strict";function r(e){if(v){var t=e.node,n=e.children;if(n.length)for(var r=0;r<n.length;r++)m(t,n[r],null);else null!=e.html?t.innerHTML=e.html:null!=e.text&&f(t,e.text)}}function o(e,t){e.parentNode.replaceChild(t.node,e),r(t)}function i(e,t){v?e.children.push(t):e.node.appendChild(t.node)}function a(e,t){v?e.html=t:e.node.innerHTML=t}function u(e,t){v?e.text=t:f(e.node,t)}function s(){return this.node.nodeName}function c(e){return{node:e,children:[],html:null,text:null,toString:s}}var l=n(137),p=n(80),f=n(164),d=1,h=11,v="undefined"!=typeof document&&"number"==typeof document.documentMode||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&/\bEdge\/\d/.test(navigator.userAgent),m=p(function(e,t,n){t.node.nodeType===h||t.node.nodeType===d&&"object"===t.node.nodeName.toLowerCase()&&(null==t.node.namespaceURI||t.node.namespaceURI===l.html)?(r(t),e.insertBefore(t.node,n)):(e.insertBefore(t.node,n),r(t))});c.insertTreeBefore=m,c.replaceChildWithTree=o,c.queueChild=i,c.queueHTML=a,c.queueText=u,e.exports=c},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t){function n(e,t){for(var n=-1,o=e.length,i=0,a=[];++n<o;){var u=e[n];u!==t&&u!==r||(e[n]=r,a[i++]=n)}return a}var r="__lodash_placeholder__";e.exports=n},function(e,t,n){function r(e){if("string"==typeof e||o(e))return e;var t=e+"";return"0"==t&&1/e==-i?"-0":t}var o=n(27),i=1/0;e.exports=r},function(e,t,n){function r(e){return"symbol"==typeof e||o(e)&&u.call(e)==i}var o=n(18),i="[object Symbol]",a=Object.prototype,u=a.toString;e.exports=r},function(e,t,n){"use strict";var r=n(48),o=n(72),i=n(76),a=n(157),u=n(159),s=n(1),c={},l=null,p=function(e,t){e&&(o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},f=function(e){return p(e,!0)},d=function(e){return p(e,!1)},h={injection:{injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?s(!1):void 0;var o=c[t]||(c[t]={});o[e._rootNodeID]=n;var i=r.registrationNameModules[t];i&&i.didPutListener&&i.didPutListener(e,t,n)},getListener:function(e,t){var n=c[t];return n&&n[e._rootNodeID]},deleteListener:function(e,t){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var o=c[t];o&&delete o[e._rootNodeID]},deleteAllListeners:function(e){for(var t in c)if(c[t][e._rootNodeID]){var n=r.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t),delete c[t][e._rootNodeID]}},extractEvents:function(e,t,n,o){for(var i,u=r.plugins,s=0;s<u.length;s++){var c=u[s];if(c){var l=c.extractEvents(e,t,n,o);l&&(i=a(i,l))}}return i},enqueueEvents:function(e){e&&(l=a(l,e))},processEventQueue:function(e){var t=l;l=null,e?u(t,f):u(t,d),l?s(!1):void 0,i.rethrowCaughtError()},__purge:function(){c={}},__getListenerBank:function(){return c}};e.exports=h},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return b(e,r)}function o(e,t,n){var o=t?g.bubbled:g.captured,i=r(e,n,o);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchInstances=m(n._dispatchInstances,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&v.traverseTwoPhase(e._targetInst,o,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?v.getParentInstance(t):null;v.traverseTwoPhase(n,o,e)}}function u(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=b(e,r);o&&(n._dispatchListeners=m(n._dispatchListeners,o),n._dispatchInstances=m(n._dispatchInstances,e))}}function s(e){e&&e.dispatchConfig.registrationName&&u(e._targetInst,null,e)}function c(e){y(e,i)}function l(e){y(e,a)}function p(e,t,n,r){v.traverseEnterLeave(n,r,u,e,t)}function f(e){y(e,s)}var d=n(12),h=n(28),v=n(72),m=n(157),y=n(159),g=(n(2),d.PropagationPhases),b=h.getListener,_={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:p};e.exports=_},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i=n(83),a={view:function(e){if(e.view)return e.view;var t=i(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(285),i=r(o),a=n(386),u=r(a),s=n(172),c=r(s),l=n(385),p=r(l),f=n(383),d=r(f),h=n(384),v=r(h),m={empty:{},getIn:c["default"],setIn:p["default"],deepEqual:d["default"],deleteIn:v["default"],fromJS:function(e){return e},size:function(e){return e?e.length:0},some:i["default"],splice:u["default"]};t["default"]=m},function(e,t,n){"use strict";var r=n(1),o=function(e){var t,n={};e instanceof Object&&!Array.isArray(e)?void 0:r(!1);for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=o},function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,u],l=0;s=new Error(t.replace(/%s/g,function(){return c[l++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};e.exports=r},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(253),i=n(254),a=n(255),u=n(256),s=n(257);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t,n){function r(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}var o=n(126);e.exports=r},function(e,t,n){function r(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=o(e.prototype),r=e.apply(n,t);return i(r)?r:n}}var o=n(59),i=n(15);e.exports=r},function(e,t){function n(e){var t=e;return t.placeholder}e.exports=n},function(e,t,n){function r(e,t){var n=e.__data__;return o(t)?n["string"==typeof t?"string":"hash"]:n.map}var o=n(249);e.exports=r},function(e,t){function n(e,t){return t=null==t?r:t,!!t&&("number"==typeof e||o.test(e))&&e>-1&&e%1==0&&e<t}var r=9007199254740991,o=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t,n){function r(e,t){if(o(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||u.test(e)||!a.test(e)||null!=t&&e in Object(t)}var o=n(11),i=n(27),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;e.exports=r},function(e,t,n){var r=n(22),o=r(Object,"create");e.exports=o},function(e,t,n){function r(e){return null!=e&&a(o(e))&&!i(e)}var o=n(237),i=n(64),a=n(43);e.exports=r},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t,n){var r=n(116),o=n(37),i=n(25),a=n(131),u=32,s=a(function(e,t){var n=i(t,o(s));return r(e,u,void 0,t,n)});s.placeholder={},e.exports=s},function(e,t,n){function r(e){return a(e)?o(e,c):u(e)?[e]:i(s(e))}var o=n(212),i=n(62),a=n(11),u=n(27),s=n(124),c=n(26);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.connect=t.Provider=void 0;var o=n(292),i=r(o),a=n(293),u=r(a);t.Provider=i["default"],t.connect=u["default"]},function(e,t){"use strict";var n={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0},r={getNativeProps:function(e,t){if(!t.disabled)return t;var r={};for(var o in t)!n[o]&&t.hasOwnProperty(o)&&(r[o]=t[o]);return r}};e.exports=r},function(e,t,n){"use strict";function r(){if(u)for(var e in s){var t=s[e],n=u.indexOf(e);if(n>-1?void 0:a(!1),!c.plugins[n]){t.extractEvents?void 0:a(!1),c.plugins[n]=t;var r=t.eventTypes;for(var i in r)o(r[i],t,i)?void 0:a(!1)}}}function o(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?a(!1):void 0,c.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var u=r[o];i(u,t,n)}return!0}return!!e.registrationName&&(i(e.registrationName,t,n),!0)}function i(e,t,n){c.registrationNameModules[e]?a(!1):void 0,c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(1),u=null,s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){u?a(!1):void 0,u=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?a(!1):void 0,s[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=c.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){u=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=c},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=h++,f[e[m]]={}),f[e[m]]}var o,i=n(3),a=n(12),u=n(48),s=n(327),c=n(156),l=n(356),p=n(85),f={},d=!1,h=0,v={topAbort:"abort",topAnimationEnd:l("animationend")||"animationend",topAnimationIteration:l("animationiteration")||"animationiteration",topAnimationStart:l("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:l("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),y=i({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(y.handleTopLevel),y.ReactEventListener=e}},setEnabled:function(e){y.ReactEventListener&&y.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!y.ReactEventListener||!y.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),i=u.registrationNameDependencies[e],s=a.topLevelTypes,c=0;c<i.length;c++){var l=i[c];o.hasOwnProperty(l)&&o[l]||(l===s.topWheel?p("wheel")?y.ReactEventListener.trapBubbledEvent(s.topWheel,"wheel",n):p("mousewheel")?y.ReactEventListener.trapBubbledEvent(s.topWheel,"mousewheel",n):y.ReactEventListener.trapBubbledEvent(s.topWheel,"DOMMouseScroll",n):l===s.topScroll?p("scroll",!0)?y.ReactEventListener.trapCapturedEvent(s.topScroll,"scroll",n):y.ReactEventListener.trapBubbledEvent(s.topScroll,"scroll",y.ReactEventListener.WINDOW_HANDLE):l===s.topFocus||l===s.topBlur?(p("focus",!0)?(y.ReactEventListener.trapCapturedEvent(s.topFocus,"focus",n),y.ReactEventListener.trapCapturedEvent(s.topBlur,"blur",n)):p("focusin")&&(y.ReactEventListener.trapBubbledEvent(s.topFocus,"focusin",n),y.ReactEventListener.trapBubbledEvent(s.topBlur,"focusout",n)),o[s.topBlur]=!0,o[s.topFocus]=!0):v.hasOwnProperty(l)&&y.ReactEventListener.trapBubbledEvent(l,v[l],n),o[l]=!0)}},trapBubbledEvent:function(e,t,n){return y.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return y.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(void 0===o&&(o=document.createEvent&&"pageX"in document.createEvent("MouseEvent")),!o&&!d){var e=c.refreshScrollValues;y.ReactEventListener.monitorScrollValue(e),d=!0}}});e.exports=y},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(30),i=n(156),a=n(82),u={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,u),e.exports=r},function(e,t,n){"use strict";var r=n(1),o={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,o,i,a,u,s){this.isInTransaction()?r(!1):void 0;var c,l;try{this._isInTransaction=!0,c=!0,this.initializeAll(0),l=e.call(t,n,o,i,a,u,s),c=!1}finally{try{if(c)try{this.closeAll(0)}catch(p){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return l},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=i.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===i.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(o){}}}},closeAll:function(e){this.isInTransaction()?void 0:r(!1);for(var t=this.transactionWrappers,n=e;n<t.length;n++){var o,a=t[n],u=this.wrapperInitData[n];try{o=!0,u!==i.OBSERVED_ERROR&&a.close&&a.close.call(this,u),o=!1}finally{if(o)try{this.closeAll(n+1)}catch(s){}}}this.wrapperInitData.length=0}},i={Mixin:o,OBSERVED_ERROR:{}};e.exports=i},function(e,t){"use strict";function n(e){return o[e]}function r(e){return(""+e).replace(i,n)}var o={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},i=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),a=r(i),u=n(189),s=r(u),c=n(180),l=r(c),p=n(181),f=r(p),d=n(178),h=r(d),v=n(182),m=r(v),y=n(93),g=r(y),b=function(e){var t=e.children,n=e.path,r=e.version,i=e.breadcrumbs,u="/"===n,c="https://redux-form.com/"+r;return a["default"].createElement("div",{className:(0,g["default"])(s["default"].app,o({},s["default"].hasNav,!u))},!u&&a["default"].createElement(f["default"],{path:n,url:c}),a["default"].createElement("div",{className:s["default"].contentAndFooter},a["default"].createElement("div",{className:s["default"].topNav},a["default"].createElement("a",{href:"https://redux-form.com",className:s["default"].brand}),a["default"].createElement("a",{className:s["default"].github,href:"https://github.com/erikras/redux-form",title:"Github",target:"_blank"},a["default"].createElement("i",{className:"fa fa-fw fa-github"}))),a["default"].createElement("div",{className:(0,g["default"])(s["default"].content,o({},s["default"].home,u))},u?a["default"].createElement(l["default"],{version:r}):a["default"].createElement("div",null,a["default"].createElement(h["default"],{items:i}),t)),a["default"].createElement("div",{className:s["default"].footer},a["default"].createElement("div",null,"Created by Erik Rasmussen"),a["default"].createElement("div",null,"Got questions? Ask for help:",a["default"].createElement("a",{className:s["default"].help,href:"https://stackoverflow.com/questions/ask?tags=redux-form",title:"Stack Overflow",target:"_blank"},a["default"].createElement("i",{className:"fa fa-fw fa-stack-overflow"})),a["default"].createElement("a",{className:s["default"].help,href:"https://github.com/erikras/redux-form/issues/new",title:"Github",target:"_blank"},a["default"].createElement("i",{className:"fa fa-fw fa-github"}))),a["default"].createElement("div",null,a["default"].createElement(m["default"],{username:"erikras",showUsername:!0,large:!0}),a["default"].createElement(m["default"],{username:"ReduxForm",showUsername:!0,large:!0})))))};t["default"]=b},function(e,t){"use strict";function n(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function r(e,t){if(n(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var a=0;a<r.length;a++)if(!o.call(t,r[a])||!n(e[r[a]],t[r[a]]))return!1;return!0}var o=Object.prototype.hasOwnProperty;e.exports=r},function(e,t){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}e.exports=n},function(e,t,n){function r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=a,this.__views__=[]}var o=n(59),i=n(61),a=4294967295;r.prototype=o(i.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(258),i=n(259),a=n(260),u=n(261),s=n(262);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t){function n(e,t,n){var r=n.length;switch(r){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}e.exports=n},function(e,t,n){function r(e){return o(e)?i(e):{}}var o=n(15),i=Object.create;e.exports=r},function(e,t,n){function r(e,t,n,u,s){return e===t||(null==e||null==t||!i(e)&&!a(t)?e!==e&&t!==t:o(e,t,r,n,u,s))}var o=n(216),i=n(15),a=n(18);e.exports=r},function(e,t){function n(){}e.exports=n},function(e,t){function n(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}e.exports=n},function(e,t){function n(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}e.exports=n},function(e,t,n){function r(e){var t=o(e)?s.call(e):"";return t==i||t==a}var o=n(15),i="[object Function]",a="[object GeneratorFunction]",u=Object.prototype,s=u.toString;e.exports=r},function(e,t,n){function r(e){if(!a(e)||f.call(e)!=u||i(e))return!1;var t=o(e);if(null===t)return!0;var n=l.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==p}var o=n(119),i=n(63),a=n(18),u="[object Object]",s=Object.prototype,c=Function.prototype.toString,l=s.hasOwnProperty,p=c.call(Object),f=s.toString;e.exports=r},function(e,t,n){function r(e){var t=c(e);if(!t&&!u(e))return i(e);var n=a(e),r=!!n,l=n||[],p=l.length;for(var f in e)!o(e,f)||r&&("length"==f||s(f,p))||t&&"constructor"==f||l.push(f);return l}var o=n(107),i=n(219),a=n(247),u=n(42),s=n(39),c=n(252);e.exports=r},function(e,t,n){function r(e,t){var n={};return t=i(t,3),o(e,function(e,r,o){n[r]=t(e,r,o)}),n}var o=n(105),i=n(108);e.exports=r},function(e,t,n){(function(t){(function(){function t(e){this.tokens=[],this.tokens.links={},this.options=e||l.defaults,this.rules=p.normal,this.options.gfm&&(this.options.tables?this.rules=p.tables:this.rules=p.gfm)}function n(e,t){if(this.options=t||l.defaults,this.links=e,this.rules=f.normal,this.renderer=this.options.renderer||new r,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=f.breaks:this.rules=f.gfm:this.options.pedantic&&(this.rules=f.pedantic)}function r(e){this.options=e||{}}function o(e){this.tokens=[],this.token=null,this.options=e||l.defaults,this.options.renderer=this.options.renderer||new r,this.renderer=this.options.renderer,this.renderer.options=this.options}function i(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function a(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function u(e,t){return e=e.source,t=t||"",function n(r,o){return r?(o=o.source||o,o=o.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,o),n):new RegExp(e,t)}}function s(){}function c(e){for(var t,n,r=1;r<arguments.length;r++){t=arguments[r];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function l(e,n,r){if(r||"function"==typeof n){r||(r=n,n=null),n=c({},l.defaults,n||{});var a,u,s=n.highlight,p=0;try{a=t.lex(e,n)}catch(f){return r(f)}u=a.length;var d=function(e){if(e)return n.highlight=s,r(e);var t;try{t=o.parse(a,n)}catch(i){e=i}return n.highlight=s,e?r(e):r(null,t)};if(!s||s.length<3)return d();if(delete n.highlight,!u)return d();for(;p<a.length;p++)!function(e){return"code"!==e.type?--u||d():s(e.text,e.lang,function(t,n){return t?d(t):null==n||n===e.text?--u||d():(e.text=n,e.escaped=!0,void(--u||d()))})}(a[p])}else try{return n&&(n=c({},l.defaults,n)),o.parse(t.lex(e,n),n)}catch(f){if(f.message+="\nPlease report this to https://github.com/chjj/marked.",(n||l.defaults).silent)return"<p>An error occured:</p><pre>"+i(f.message+"",!0)+"</pre>";throw f}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:s,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:s,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:s,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=u(p.item,"gm")(/bull/g,p.bullet)(),p.list=u(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=u(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=u(p.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,p._tag)(),p.paragraph=u(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=c({},p),p.gfm=c({},p.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),p.gfm.paragraph=u(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=c({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=p,t.lex=function(e,n){var r=new t(n);return r.lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,o,i,a,u,s,c,l,f,e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]||""});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))){for(e=e.substring(i[0].length),s={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},l=0;l<s.align.length;l++)/^ *-+: *$/.test(s.align[l])?s.align[l]="right":/^ *:-+: *$/.test(s.align[l])?s.align[l]="center":/^ *:-+ *$/.test(s.align[l])?s.align[l]="left":s.align[l]=null;for(l=0;l<s.cells.length;l++)s.cells[l]=s.cells[l].split(/ *\| */);this.tokens.push(s)}else if(i=this.rules.lheading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:"="===i[2]?1:2,text:i[1]});else if(i=this.rules.hr.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"hr"});else if(i=this.rules.blockquote.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"blockquote_start"}),i=i[0].replace(/^ *> ?/gm,""),this.token(i,t,!0),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),a=i[2],this.tokens.push({type:"list_start",ordered:a.length>1}),i=i[0].match(this.rules.item),r=!1,f=i.length,l=0;l<f;l++)s=i[l],c=s.length,s=s.replace(/^ *([*+-]|\d+\.) +/,""),~s.indexOf("\n ")&&(c-=s.length,s=this.options.pedantic?s.replace(/^ {1,4}/gm,""):s.replace(new RegExp("^ {1,"+c+"}","gm"),"")),this.options.smartLists&&l!==f-1&&(u=p.bullet.exec(i[l+1])[0],a===u||a.length>1&&u.length>1||(e=i.slice(l+1).join("\n")+e,l=f-1)),o=r||/\n\n(?!\s*$)/.test(s),l!==f-1&&(r="\n"===s.charAt(s.length-1),o||(o=r)),this.tokens.push({type:o?"loose_item_start":"list_item_start"}),this.token(s,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===i[1]||"script"===i[1]||"style"===i[1]),text:i[0]});else if(!n&&t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),this.tokens.links[i[1].toLowerCase()]={href:i[2],title:i[3]};else if(t&&(i=this.rules.table.exec(e))){for(e=e.substring(i[0].length),s={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},l=0;l<s.align.length;l++)/^ *-+: *$/.test(s.align[l])?s.align[l]="right":/^ *:-+: *$/.test(s.align[l])?s.align[l]="center":/^ *:-+ *$/.test(s.align[l])?s.align[l]="left":s.align[l]=null;for(l=0;l<s.cells.length;l++)s.cells[l]=s.cells[l].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(s)}else if(t&&(i=this.rules.paragraph.exec(e)))e=e.substring(i[0].length),this.tokens.push({type:"paragraph",text:"\n"===i[1].charAt(i[1].length-1)?i[1].slice(0,-1):i[1]});else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"text",text:i[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var f={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:s,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:s,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};f._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,f._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,f.link=u(f.link)("inside",f._inside)("href",f._href)(),f.reflink=u(f.reflink)("inside",f._inside)(),f.normal=c({},f),f.pedantic=c({},f.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),f.gfm=c({},f.normal,{escape:u(f.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:u(f.text)("]|","~]|")("|","|https?://|")()}),f.breaks=c({},f.gfm,{br:u(f.br)("{2,}","*")(),text:u(f.gfm.text)("{2,}","*")()}),n.rules=f,n.output=function(e,t,r){var o=new n(t,r);return o.output(e)},n.prototype.output=function(e){for(var t,n,r,o,a="";e;)if(o=this.rules.escape.exec(e))e=e.substring(o[0].length),a+=o[1];else if(o=this.rules.autolink.exec(e))e=e.substring(o[0].length),"@"===o[2]?(n=":"===o[1].charAt(6)?this.mangle(o[1].substring(7)):this.mangle(o[1]),r=this.mangle("mailto:")+n):(n=i(o[1]),r=n),a+=this.renderer.link(r,null,n);else if(this.inLink||!(o=this.rules.url.exec(e))){if(o=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(o[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(o[0])&&(this.inLink=!1),e=e.substring(o[0].length),a+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):i(o[0]):o[0];else if(o=this.rules.link.exec(e))e=e.substring(o[0].length),this.inLink=!0,a+=this.outputLink(o,{href:o[2],title:o[3]}),this.inLink=!1;else if((o=this.rules.reflink.exec(e))||(o=this.rules.nolink.exec(e))){if(e=e.substring(o[0].length),t=(o[2]||o[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){a+=o[0].charAt(0),e=o[0].substring(1)+e;continue}this.inLink=!0,a+=this.outputLink(o,t),this.inLink=!1}else if(o=this.rules.strong.exec(e))e=e.substring(o[0].length),a+=this.renderer.strong(this.output(o[2]||o[1]));else if(o=this.rules.em.exec(e))e=e.substring(o[0].length),a+=this.renderer.em(this.output(o[2]||o[1]));else if(o=this.rules.code.exec(e))e=e.substring(o[0].length),a+=this.renderer.codespan(i(o[2],!0));else if(o=this.rules.br.exec(e))e=e.substring(o[0].length),a+=this.renderer.br();else if(o=this.rules.del.exec(e))e=e.substring(o[0].length),a+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),a+=this.renderer.text(i(this.smartypants(o[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(o[0].length),n=i(o[1]),r=n,a+=this.renderer.link(r,null,n);return a},n.prototype.outputLink=function(e,t){var n=i(t.href),r=t.title?i(t.title):null; return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,i(e[1]))},n.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},n.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,o=0;o<r;o++)t=e.charCodeAt(o),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},r.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'<pre><code class="'+this.options.langPrefix+i(t,!0)+'">'+(n?e:i(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:i(e,!0))+"\n</code></pre>"},r.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},r.prototype.html=function(e){return e},r.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},r.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},r.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},r.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},r.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},r.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},r.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},r.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"</"+n+">\n"},r.prototype.strong=function(e){return"<strong>"+e+"</strong>"},r.prototype.em=function(e){return"<em>"+e+"</em>"},r.prototype.codespan=function(e){return"<code>"+e+"</code>"},r.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},r.prototype.del=function(e){return"<del>"+e+"</del>"},r.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(a(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(o){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var i='<a href="'+e+'"';return t&&(i+=' title="'+t+'"'),i+=">"+n+"</a>"},r.prototype.image=function(e,t,n){var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},r.prototype.text=function(e){return e},o.parse=function(e,t,n){var r=new o(t,n);return r.parse(e)},o.prototype.parse=function(e){this.inline=new n(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},o.prototype.next=function(){return this.token=this.tokens.pop()},o.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},o.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},o.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,o,i="",a="";for(n="",e=0;e<this.token.header.length;e++)r={header:!0,align:this.token.align[e]},n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(i+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",o=0;o<t.length;o++)n+=this.renderer.tablecell(this.inline.output(t[o]),{header:!1,align:this.token.align[o]});a+=this.renderer.tablerow(n)}return this.renderer.table(i,a);case"blockquote_start":for(var a="";"blockquote_end"!==this.next().type;)a+=this.tok();return this.renderer.blockquote(a);case"list_start":for(var a="",u=this.token.ordered;"list_end"!==this.next().type;)a+=this.tok();return this.renderer.list(a,u);case"list_item_start":for(var a="";"list_item_end"!==this.next().type;)a+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(a);case"loose_item_start":for(var a="";"list_item_end"!==this.next().type;)a+=this.tok();return this.renderer.listitem(a);case"html":var s=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(s);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},s.exec=s,l.options=l.setOptions=function(e){return c(l.defaults,e),l},l.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new r,xhtml:!1},l.Parser=o,l.parser=o.parse,l.Renderer=r,l.Lexer=t,l.lexer=t.lex,l.InlineLexer=n,l.inlineLexer=n.output,l.parse=l,e.exports=l}).call(function(){return this||("undefined"!=typeof window?window:t)}())}).call(t,function(){return this}())},function(e,t,n){e.exports=n(359)},function(e,t,n){"use strict";function r(e,t){return Array.isArray(t)&&(t=t[1]),t?t.nextSibling:e.firstChild}function o(e,t,n){l.insertTreeBefore(e,t,n)}function i(e,t,n){Array.isArray(t)?u(e,t[0],t[1],n):m(e,t,n)}function a(e,t){if(Array.isArray(t)){var n=t[1];t=t[0],s(e,t,n),e.removeChild(n)}e.removeChild(t)}function u(e,t,n,r){for(var o=t;;){var i=o.nextSibling;if(m(e,o,r),o===n)break;o=i}}function s(e,t,n){for(;;){var r=t.nextSibling;if(r===n)break;e.removeChild(r)}}function c(e,t,n){var r=e.parentNode,o=e.nextSibling;o===t?n&&m(r,document.createTextNode(n),o):n?(v(o,n),s(r,o,t)):s(r,e,t)}var l=n(23),p=n(300),f=n(149),d=(n(4),n(7),n(80)),h=n(86),v=n(164),m=d(function(e,t,n){e.insertBefore(t,n)}),y=p.dangerouslyReplaceNodeWithMarkup,g={dangerouslyReplaceNodeWithMarkup:y,replaceDelimitedText:c,processUpdates:function(e,t){for(var n=0;n<t.length;n++){var u=t[n];switch(u.type){case f.INSERT_MARKUP:o(e,u.content,r(e,u.afterNode));break;case f.MOVE_EXISTING:i(e,u.fromNode,r(e,u.afterNode));break;case f.SET_MARKUP:h(e,u.content);break;case f.TEXT_CONTENT:v(e,u.content);break;case f.REMOVE_NODE:a(e,u.fromNode)}}}};e.exports=g},function(e,t,n){"use strict";function r(e){return!!c.hasOwnProperty(e)||!s.hasOwnProperty(e)&&(u.test(e)?(c[e]=!0,!0):(s[e]=!0,!1))}function o(e,t){return null==t||e.hasBooleanValue&&!t||e.hasNumericValue&&isNaN(t)||e.hasPositiveNumericValue&&t<1||e.hasOverloadedBooleanValue&&t===!1}var i=n(19),a=(n(4),n(318),n(7),n(357)),u=(n(2),new RegExp("^["+i.ATTRIBUTE_NAME_START_CHAR+"]["+i.ATTRIBUTE_NAME_CHAR+"]*$")),s={},c={},l={createMarkupForID:function(e){return i.ID_ATTRIBUTE_NAME+"="+a(e)},setAttributeForID:function(e,t){e.setAttribute(i.ID_ATTRIBUTE_NAME,t)},createMarkupForRoot:function(){return i.ROOT_ATTRIBUTE_NAME+'=""'},setAttributeForRoot:function(e){e.setAttribute(i.ROOT_ATTRIBUTE_NAME,"")},createMarkupForProperty:function(e,t){var n=i.properties.hasOwnProperty(e)?i.properties[e]:null;if(n){if(o(n,t))return"";var r=n.attributeName;return n.hasBooleanValue||n.hasOverloadedBooleanValue&&t===!0?r+'=""':r+"="+a(t)}return i.isCustomAttribute(e)?null==t?"":e+"="+a(t):null},createMarkupForCustomAttribute:function(e,t){return r(e)&&null!=t?e+"="+a(t):""},setValueForProperty:function(e,t,n){var r=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(r){var a=r.mutationMethod;if(a)a(e,n);else{if(o(r,n))return void this.deleteValueForProperty(e,t);if(r.mustUseProperty){var u=r.propertyName;r.hasSideEffects&&""+e[u]==""+n||(e[u]=n)}else{var s=r.attributeName,c=r.attributeNamespace;c?e.setAttributeNS(c,s,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&n===!0?e.setAttribute(s,""):e.setAttribute(s,""+n)}}}else if(i.isCustomAttribute(t))return void l.setValueForAttribute(e,t,n)},setValueForAttribute:function(e,t,n){r(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){var n=i.properties.hasOwnProperty(t)?i.properties[t]:null;if(n){var r=n.mutationMethod;if(r)r(e,void 0);else if(n.mustUseProperty){var o=n.propertyName;n.hasBooleanValue?e[o]=!1:n.hasSideEffects&&""+e[o]==""||(e[o]="")}else e.removeAttribute(n.attributeName)}else i.isCustomAttribute(t)&&e.removeAttribute(t)}};e.exports=l},function(e,t,n){"use strict";function r(e){return e===g.topMouseUp||e===g.topTouchEnd||e===g.topTouchCancel}function o(e){return e===g.topMouseMove||e===g.topTouchMove}function i(e){return e===g.topMouseDown||e===g.topTouchStart}function a(e,t,n,r){var o=e.type||"unknown-event";e.currentTarget=b.getNodeFromInstance(r),t?v.invokeGuardedCallbackWithCatch(o,n,e):v.invokeGuardedCallback(o,n,e),e.currentTarget=null}function u(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)a(e,t,n[o],r[o]);else n&&a(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null}function s(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function c(e){var t=s(e);return e._dispatchInstances=null,e._dispatchListeners=null,t}function l(e){var t=e._dispatchListeners,n=e._dispatchInstances;Array.isArray(t)?m(!1):void 0,e.currentTarget=t?b.getNodeFromInstance(n):null;var r=t?t(e):null;return e.currentTarget=null,e._dispatchListeners=null,e._dispatchInstances=null,r}function p(e){return!!e._dispatchListeners}var f,d,h=n(12),v=n(76),m=n(1),y=(n(2),{injectComponentTree:function(e){f=e},injectTreeTraversal:function(e){d=e}}),g=h.topLevelTypes,b={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:l,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:c,hasDispatches:p,getInstanceFromNode:function(e){return f.getInstanceFromNode(e)},getNodeFromInstance:function(e){return f.getNodeFromInstance(e)},isAncestor:function(e,t){return d.isAncestor(e,t)},getLowestCommonAncestor:function(e,t){return d.getLowestCommonAncestor(e,t)},getParentInstance:function(e){return d.getParentInstance(e)},traverseTwoPhase:function(e,t,n){return d.traverseTwoPhase(e,t,n)},traverseEnterLeave:function(e,t,n,r,o){return d.traverseEnterLeave(e,t,n,r,o)},injection:y};e.exports=b},function(e,t){"use strict";function n(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function r(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var o={escape:n,unescape:r};e.exports=o},function(e,t,n){"use strict";function r(e){null!=e.checkedLink&&null!=e.valueLink?c(!1):void 0}function o(e){r(e),null!=e.value||null!=e.onChange?c(!1):void 0}function i(e){r(e),null!=e.checked||null!=e.onChange?c(!1):void 0}function a(e){if(e){var t=e.getName();if(t)return" Check the render method of `"+t+"`."}return""}var u=n(332),s=n(79),c=n(1),l=(n(2),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),p={value:function(e,t,n){return!e[t]||l[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func},f={},d={checkPropTypes:function(e,t,n){for(var r in p){if(p.hasOwnProperty(r))var o=p[r](t,r,e,s.prop);o instanceof Error&&!(o.message in f)&&(f[o.message]=!0,a(n))}},getValue:function(e){return e.valueLink?(o(e),e.valueLink.value):e.value},getChecked:function(e){return e.checkedLink?(i(e),e.checkedLink.value):e.checked},executeOnChange:function(e,t){return e.valueLink?(o(e),e.valueLink.requestChange(t.target.value)):e.checkedLink?(i(e),e.checkedLink.requestChange(t.target.checked)):e.onChange?e.onChange.call(void 0,t):void 0}};e.exports=d},function(e,t,n){"use strict";var r=n(1),o=!1,i={unmountIDFromEnvironment:null,replaceNodeWithMarkup:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){o?r(!1):void 0,i.unmountIDFromEnvironment=e.unmountIDFromEnvironment,i.replaceNodeWithMarkup=e.replaceNodeWithMarkup,i.processChildrenUpdates=e.processChildrenUpdates,o=!0}}};e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r){try{return t(n,r)}catch(i){return void(null===o&&(o=i))}}var o=null,i={invokeGuardedCallback:r,invokeGuardedCallbackWithCatch:r,rethrowCaughtError:function(){if(o){var e=o;throw o=null,e}}};e.exports=i},function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=n},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(32),o=r({prop:null,context:null,childContext:null});e.exports=o},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e};e.exports=n},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return!!r&&!!n[r]}function r(e){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return t.correspondingUseElement&&(t=t.correspondingUseElement),3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t,n){"use strict";function r(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function o(e){var t,n=null===e||e===!1;if(n)t=u.create(o);else if("object"==typeof e){var i=e;!i||"function"!=typeof i.type&&"string"!=typeof i.type?c(!1):void 0,t="string"==typeof i.type?s.createInternalComponent(i):r(i.type)?new i.type(i):new l(i)}else"string"==typeof e||"number"==typeof e?t=s.createInstanceForText(e):c(!1);return t._mountIndex=0,t._mountImage=null,t}var i=n(3),a=n(309),u=n(144),s=n(150),c=(n(7),n(1)),l=(n(2),function(e){this.construct(e)});i(l.prototype,a.Mixin,{_instantiateReactComponent:o}),e.exports=o},function(e,t,n){"use strict";/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */ function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(6);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";var r=n(6),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=n(80),u=a(function(e,t){e.innerHTML=t});if(r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(u=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),s=null}e.exports=u},function(e,t){"use strict";function n(e,t){var n=null===e||e===!1,r=null===t||t===!1;if(n||r)return n===r;var o=typeof e,i=typeof t;return"string"===o||"number"===o?"string"===i||"number"===i:"object"===i&&e.type===t.type&&e.key===t.key}e.exports=n},function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?c.escape(e.key):t.toString(36)}function o(e,t,n,i){var f=typeof e;if("undefined"!==f&&"boolean"!==f||(e=null),null===e||"string"===f||"number"===f||a.isValidElement(e))return n(i,e,""===t?l+r(e,0):t),1;var d,h,v=0,m=""===t?l:t+p;if(Array.isArray(e))for(var y=0;y<e.length;y++)d=e[y],h=m+r(d,y),v+=o(d,h,n,i);else{var g=u(e);if(g){var b,_=g.call(e);if(g!==e.entries)for(var E=0;!(b=_.next()).done;)d=b.value,h=m+r(d,E++),v+=o(d,h,n,i);else for(;!(b=_.next()).done;){var x=b.value;x&&(d=x[1],h=m+c.escape(x[0])+p+r(d,0),v+=o(d,h,n,i))}}else"object"===f&&(String(e),s(!1))}return v}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=(n(20),n(17)),u=n(160),s=n(1),c=n(73),l=(n(2),"."),p=":";e.exports=i},function(e,t,n){"use strict";var r=(n(3),n(9)),o=(n(2),r);e.exports=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ARRAY_INSERT="redux-form/ARRAY_INSERT",t.ARRAY_POP="redux-form/ARRAY_POP",t.ARRAY_PUSH="redux-form/ARRAY_PUSH",t.ARRAY_REMOVE="redux-form/ARRAY_REMOVE",t.ARRAY_SHIFT="redux-form/ARRAY_SHIFT",t.ARRAY_SPLICE="redux-form/ARRAY_SPLICE",t.ARRAY_UNSHIFT="redux-form/ARRAY_UNSHIFT",t.ARRAY_SWAP="redux-form/ARRAY_SWAP",t.BLUR="redux-form/BLUR",t.CHANGE="redux-form/CHANGE",t.DESTROY="redux-form/DESTROY",t.FOCUS="redux-form/FOCUS",t.INITIALIZE="redux-form/INITIALIZE",t.REGISTER_FIELD="redux-form/REGISTER_FIELD",t.RESET="redux-form/RESET",t.SET_SUBMIT_FAILED="redux-form/SET_SUBMIT_FAILED",t.START_ASYNC_VALIDATION="redux-form/START_ASYNC_VALIDATION",t.START_SUBMIT="redux-form/START_SUBMIT",t.STOP_ASYNC_VALIDATION="redux-form/STOP_ASYNC_VALIDATION",t.STOP_SUBMIT="redux-form/STOP_SUBMIT",t.TOUCH="redux-form/TOUCH",t.UNREGISTER_FIELD="redux-form/UNREGISTER_FIELD",t.UNTOUCH="redux-form/UNTOUCH"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=r(o),a=n(92),u=r(a),s=function(e){var t=e.source,n=e.language;return i["default"].createElement(u["default"],{content:"```"+n+t+"```"})};s.defaultProps={language:"js"},t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=r(o),a=n(68),u=r(a),s=n(187),c=r(s),l=function(e){return e.replace(/```(?:javascript|js)([\s\S]+?)```/g,function(e,t){return'<pre class="language-jsx"><code class="language-jsx">'+c["default"].highlight(t,c["default"].languages.jsx)+"</code></pre>"})},p=function(e){var t=e.content;return i["default"].createElement("div",{dangerouslySetInnerHTML:{__html:(0,u["default"])(l(t))}})};t["default"]=p},function(e,t,n){var r,o;/*! Copyright (c) 2016 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var a in r)i.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=n:(r=[],o=function(){return n}.apply(t,r),!(void 0!==o&&(e.exports=o)))}()},function(e,t,n){"use strict";var r=n(9),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function r(e){return a?void 0:i(!1),f.hasOwnProperty(e)||(e="*"),u.hasOwnProperty(e)||("*"===e?a.innerHTML="<link />":a.innerHTML="<"+e+"></"+e+">",u[e]=!a.firstChild),u[e]?f[e]:null}var o=n(6),i=n(1),a=o.canUseDOM?document.createElement("div"):null,u={},s=[1,'<select multiple="true">',"</select>"],c=[1,"<table>","</table>"],l=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,'<svg xmlns="http://www.w3.org/2000/svg">',"</svg>"],f={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:s,option:s,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(e){f[e]=p,u[e]=!0}),e.exports=r},function(e,t){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0},o="function"==typeof Object.getOwnPropertySymbols;e.exports=function(e,t,i){if("string"!=typeof t){var a=Object.getOwnPropertyNames(t);o&&(a=a.concat(Object.getOwnPropertySymbols(t)));for(var u=0;u<a.length;++u)if(!(n[a[u]]||r[a[u]]||i&&i[a[u]]))try{e[a[u]]=t[a[u]]}catch(s){}}return e}},function(e,t,n){function r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}var o=n(59),i=n(61);r.prototype=o(i.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){var r=n(22),o=n(8),i=r(o,"Map");e.exports=i},function(e,t,n){function r(e){this.__data__=new o(e)}var o=n(34),i=n(270),a=n(271),u=n(272),s=n(273),c=n(274);r.prototype.clear=i,r.prototype["delete"]=a,r.prototype.get=u,r.prototype.has=s,r.prototype.set=c,e.exports=r},function(e,t,n){var r=n(8),o=r.Symbol;e.exports=o},function(e,t,n){var r=n(22),o=n(8),i=r(o,"WeakMap");e.exports=i},function(e,t){function n(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=n},function(e,t,n){function r(e,t){return e&&o(e,t,i)}var o=n(214),i=n(66);e.exports=r},function(e,t,n){function r(e,t){t=i(t,e)?[t]:o(t);for(var n=0,r=t.length;null!=e&&n<r;)e=e[a(t[n++])];return n&&n==r?e:void 0}var o=n(111),i=n(40),a=n(26);e.exports=r},function(e,t,n){function r(e,t){return null!=e&&(a.call(e,t)||"object"==typeof e&&t in e&&null===o(e))}var o=n(119),i=Object.prototype,a=i.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?u(e)?i(e[0],e[1]):o(e):s(e)}var o=n(220),i=n(221),a=n(127),u=n(11),s=n(284);e.exports=r},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}e.exports=n},function(e,t,n){var r=n(127),o=n(122),i=o?function(e,t){return o.set(e,t),e}:r;e.exports=i},function(e,t,n){function r(e){return o(e)?e:i(e)}var o=n(11),i=n(124);e.exports=r},function(e,t){function n(e,t,n,o){for(var i=-1,a=e.length,u=n.length,s=-1,c=t.length,l=r(a-u,0),p=Array(c+l),f=!o;++s<c;)p[s]=t[s];for(;++i<u;)(f||i<a)&&(p[n[i]]=e[i]);for(;l--;)p[s++]=e[i++];return p}var r=Math.max;e.exports=n},function(e,t){function n(e,t,n,o){for(var i=-1,a=e.length,u=-1,s=n.length,c=-1,l=t.length,p=r(a-s,0),f=Array(p+l),d=!o;++i<p;)f[i]=e[i];for(var h=i;++c<l;)f[h+c]=t[c];for(;++u<s;)(d||i<a)&&(f[h+n[u]]=e[i++]);return f}var r=Math.max;e.exports=n},function(e,t,n){function r(e,t,n,b,_,E,x,C,w,P){function S(){for(var d=arguments.length,h=Array(d),v=d;v--;)h[v]=arguments[v];if(A)var m=c(S),y=a(h,m);if(b&&(h=o(h,b,_,A)),E&&(h=i(h,E,x,A)),d-=y,A&&d<P){var g=p(h,m);return s(e,t,r,S.placeholder,n,h,g,C,w,P-d)}var N=T?n:this,I=R?N[e]:e;return d=h.length,C?h=l(h,C):k&&d>1&&h.reverse(),O&&w<d&&(h.length=w),this&&this!==f&&this instanceof S&&(I=M||u(I)),I.apply(N,h)}var O=t&y,T=t&d,R=t&h,A=t&(v|m),k=t&g,M=R?void 0:u(e);return S}var o=n(112),i=n(113),a=n(228),u=n(36),s=n(115),c=n(37),l=n(266),p=n(25),f=n(8),d=1,h=2,v=8,m=16,y=128,g=512;e.exports=r},function(e,t,n){function r(e,t,n,r,f,d,h,v,m,y){var g=t&c,b=g?h:void 0,_=g?void 0:h,E=g?d:void 0,x=g?void 0:d;t|=g?l:p,t&=~(g?p:l),t&s||(t&=~(a|u));var C=[e,t,f,E,b,x,_,v,m,y],w=n.apply(void 0,C);return o(e)&&i(w,C),w.placeholder=r,w}var o=n(250),i=n(123),a=1,u=2,s=4,c=8,l=32,p=64;e.exports=r},function(e,t,n){function r(e,t,n,r,E,x,C,w){var P=t&v;if(!P&&"function"!=typeof e)throw new TypeError(d);var S=r?r.length:0;if(S||(t&=~(g|b),r=E=void 0),C=void 0===C?C:_(f(C),0),w=void 0===w?w:f(w),S-=E?E.length:0,t&b){var O=r,T=E;r=E=void 0}var R=P?void 0:c(e),A=[e,t,n,r,E,O,T,x,C,w];if(R&&l(A,R),e=A[0],t=A[1],n=A[2],r=A[3],E=A[4],w=A[9]=null==A[9]?P?0:e.length:_(A[9]-S,0),!w&&t&(m|y)&&(t&=~(m|y)),t&&t!=h)k=t==m||t==y?a(e,t,w):t!=g&&t!=(h|g)||E.length?u.apply(void 0,A):s(e,t,n,r);else var k=i(e,t,n);var M=R?o:p;return M(k,A)}var o=n(110),i=n(231),a=n(232),u=n(114),s=n(233),c=n(118),l=n(264),p=n(123),f=n(132),d="Expected a function",h=1,v=2,m=8,y=16,g=32,b=64,_=Math.max;e.exports=r},function(e,t,n){function r(e,t,n,r,s,c){var l=s&u,p=e.length,f=t.length;if(p!=f&&!(l&&f>p))return!1;var d=c.get(e);if(d)return d==t;var h=-1,v=!0,m=s&a?new o:void 0;for(c.set(e,t);++h<p;){var y=e[h],g=t[h];if(r)var b=l?r(g,y,h,t,e,c):r(y,g,h,e,t,c);if(void 0!==b){if(b)continue;v=!1;break}if(m){if(!i(t,function(e,t){if(!m.has(t)&&(y===e||n(y,e,r,s,c)))return m.add(t)})){v=!1;break}}else if(y!==g&&!n(y,g,r,s,c)){v=!1;break}}return c["delete"](e),v}var o=n(210),i=n(104),a=1,u=2;e.exports=r},function(e,t,n){var r=n(122),o=n(130),i=r?function(e){return r.get(e)}:o;e.exports=i},function(e,t){function n(e){return r(Object(e))}var r=Object.getPrototypeOf;e.exports=n},function(e,t,n){function r(e){return e===e&&!o(e)}var o=n(15);e.exports=r},function(e,t){function n(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}e.exports=n},function(e,t,n){var r=n(103),o=r&&new r;e.exports=o},function(e,t,n){var r=n(110),o=n(282),i=150,a=16,u=function(){var e=0,t=0;return function(n,u){var s=o(),c=a-(s-t);if(t=s,c>0){if(++e>=i)return n}else e=0;return r(n,u)}}();e.exports=u},function(e,t,n){var r=n(281),o=n(288),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,a=/\\(\\)?/g,u=r(function(e){var t=[];return o(e).replace(i,function(e,n,r,o){t.push(r?o.replace(a,"$1"):n||e)}),t});e.exports=u},function(e,t){function n(e){if(null!=e){try{return r.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var r=Function.prototype.toString;e.exports=n},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){function r(e){return o(e)&&u.call(e,"callee")&&(!c.call(e,"callee")||s.call(e)==i)}var o=n(278),i="[object Arguments]",a=Object.prototype,u=a.hasOwnProperty,s=a.toString,c=a.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){return"string"==typeof e||!o(e)&&i(e)&&s.call(e)==a}var o=n(11),i=n(18),a="[object String]",u=Object.prototype,s=u.toString;e.exports=r},function(e,t){function n(){}e.exports=n},function(e,t,n){function r(e,t){if("function"!=typeof e)throw new TypeError(a);return t=u(void 0===t?e.length-1:i(t),0),function(){for(var n=arguments,r=-1,i=u(n.length-t,0),a=Array(i);++r<i;)a[r]=n[t+r];switch(t){case 0:return e.call(this,a);case 1:return e.call(this,n[0],a);case 2:return e.call(this,n[0],n[1],a)}var s=Array(t+1);for(r=-1;++r<t;)s[r]=n[r];return s[t]=a,o(e,this,s)}}var o=n(58),i=n(132),a="Expected a function",u=Math.max;e.exports=r},function(e,t,n){function r(e){var t=o(e),n=t%1;return t===t?n?t-n:t:0}var o=n(286);e.exports=r},function(e,t,n){"use strict";t.__esModule=!0;var r=n(5);t["default"]=r.PropTypes.shape({subscribe:r.PropTypes.func.isRequired,dispatch:r.PropTypes.func.isRequired,getState:r.PropTypes.func.isRequired})},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t["default"]=n},function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var i={background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,outlineStyle:!0,outlineColor:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};e.exports=a},function(e,t,n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=n(3),i=n(16),a=n(1);o(r.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){e.length!==t.length?a(!1):void 0,this._callbacks=null,this._contexts=null;for(var n=0;n<e.length;n++)e[n].call(t[n]);e.length=0,t.length=0}},checkpoint:function(){return this._callbacks?this._callbacks.length:0},rollback:function(e){this._callbacks&&(this._callbacks.length=e,this._contexts.length=e)},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),i.addPoolingTo(r),e.exports=r},function(e,t){"use strict";var n={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};e.exports=n},function(e,t,n){"use strict";var r=n(70),o=n(316),i={processChildrenUpdates:o.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,unmountIDFromEnvironment:function(e){}};e.exports=i},function(e,t){"use strict";var n={hasCachedChildNodes:1};e.exports=n},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===o?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var o=(n(89),9);e.exports=r},function(e,t,n){"use strict";function r(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var e=this._currentElement.props,t=s.getValue(e);null!=t&&o(this,Boolean(e.multiple),t)}}function o(e,t,n){var r,o,i=c.getNodeFromInstance(e).options;if(t){for(r={},o=0;o<n.length;o++)r[""+n[o]]=!0;for(o=0;o<i.length;o++){var a=r.hasOwnProperty(i[o].value);i[o].selected!==a&&(i[o].selected=a)}}else{for(r=""+n,o=0;o<i.length;o++)if(i[o].value===r)return void(i[o].selected=!0);i.length&&(i[0].selected=!0)}}function i(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return this._rootNodeID&&(this._wrapperState.pendingUpdate=!0),l.asap(r,this),n}var a=n(3),u=n(47),s=n(74),c=n(4),l=n(10),p=(n(2),!1),f={getNativeProps:function(e,t){return a({},u.getNativeProps(e,t),{onChange:e._wrapperState.onChange,value:void 0})},mountWrapper:function(e,t){var n=s.getValue(t);e._wrapperState={pendingUpdate:!1,initialValue:null!=n?n:t.defaultValue,listeners:null,onChange:i.bind(e),wasMultiple:Boolean(t.multiple)},void 0===t.value||void 0===t.defaultValue||p||(p=!0)},getSelectValueContext:function(e){return e._wrapperState.initialValue},postUpdateWrapper:function(e){var t=e._currentElement.props;e._wrapperState.initialValue=void 0;var n=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=Boolean(t.multiple);var r=s.getValue(t);null!=r?(e._wrapperState.pendingUpdate=!1,o(e,Boolean(t.multiple),r)):n!==Boolean(t.multiple)&&(null!=t.defaultValue?o(e,Boolean(t.multiple),t.defaultValue):o(e,Boolean(t.multiple),t.multiple?[]:""))}};e.exports=f},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(3),i=n(10),a=n(51),u=n(9),s={initialize:u,close:function(){f.isBatchingUpdates=!1}},c={initialize:u,close:i.flushBatchedUpdates.bind(i)},l=[c,s];o(r.prototype,a.Mixin,{getTransactionWrappers:function(){return l}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o,i){var a=f.isBatchingUpdates;f.isBatchingUpdates=!0,a?e(t,n,r,o,i):p.perform(e,null,t,n,r,o,i)}};e.exports=f},function(e,t,n){"use strict";function r(){x||(x=!0,y.EventEmitter.injectReactEventListener(m),y.EventPluginHub.injectEventPluginOrder(a),y.EventPluginUtils.injectComponentTree(p),y.EventPluginUtils.injectTreeTraversal(d),y.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:E,EnterLeaveEventPlugin:u,ChangeEventPlugin:i,SelectEventPlugin:_,BeforeInputEventPlugin:o}),y.NativeComponent.injectGenericComponentClass(l),y.NativeComponent.injectTextComponentClass(h),y.DOMProperty.injectDOMPropertyConfig(s),y.DOMProperty.injectDOMPropertyConfig(b),y.EmptyComponent.injectEmptyComponentFactory(function(e){return new f(e)}),y.Updates.injectReconcileTransaction(g),y.Updates.injectBatchingStrategy(v),y.Component.injectEnvironment(c))}var o=n(297),i=n(299),a=n(301),u=n(302),s=n(304),c=n(138),l=n(312),p=n(4),f=n(314),d=n(324),h=n(322),v=n(142),m=n(328),y=n(329),g=n(333),b=n(337),_=n(338),E=n(339),x=!1;e.exports={inject:r}},function(e,t){"use strict";var n,r={injectEmptyComponentFactory:function(e){n=e}},o={create:function(e){return n(e)}};o.injection=r,e.exports=o},function(e,t){"use strict";var n={logTopLevelRenders:!1};e.exports=n},function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var o=n(320),i=n(195),a=n(95),u=n(96),s={hasSelectionCapabilities:function(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)},getSelectionInformation:function(){var e=u();return{focusedElem:e,selectionRange:s.hasSelectionCapabilities(e)?s.getSelection(e):null}},restoreSelection:function(e){var t=u(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(s.hasSelectionCapabilities(n)&&s.setSelection(n,o),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if(void 0===r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&e.nodeName&&"input"===e.nodeName.toLowerCase()){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};e.exports=s},function(e,t,n){"use strict";var r=n(350),o=/\/?>/,i=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return i.test(e)?e:e.replace(o," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};e.exports=a},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){return e?e.nodeType===M?e.documentElement:e.firstChild:null}function i(e){return e.getAttribute&&e.getAttribute(R)||""}function a(e,t,n,r,o){var i;if(b.logTopLevelRenders){var a=e._currentElement.props,u=a.type;i="React mount: "+("string"==typeof u?u:u.displayName||u.name),console.time(i)}var s=E.mountComponent(e,n,null,m(e,t),o);i&&console.timeEnd(i),e._renderedComponent._topLevelWrapper=e,D._mountImageIntoNode(s,t,e,r,n)}function u(e,t,n,r){var o=C.ReactReconcileTransaction.getPooled(!n&&y.useCreateElement);o.perform(a,null,e,t,o,n,r),C.ReactReconcileTransaction.release(o)}function s(e,t,n){for(E.unmountComponent(e,n),t.nodeType===M&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}function c(e){var t=o(e);if(t){var n=v.getInstanceFromNode(t);return!(!n||!n._nativeParent)}}function l(e){var t=o(e),n=t&&v.getInstanceFromNode(t);return n&&!n._nativeParent?n:null}function p(e){var t=l(e);return t?t._nativeContainerInfo._topLevelWrapper:null}var f=n(23),d=n(19),h=n(49),v=(n(20),n(4)),m=n(140),y=n(315),g=n(17),b=n(145),_=(n(7),n(147)),E=n(21),x=n(154),C=n(10),w=n(24),P=n(84),S=n(1),O=n(86),T=n(87),R=(n(2),d.ID_ATTRIBUTE_NAME),A=d.ROOT_ATTRIBUTE_NAME,k=1,M=9,N=11,I={},j=1,F=function(){this.rootID=j++};F.prototype.isReactComponent={},F.prototype.render=function(){return this.props};var D={TopLevelWrapper:F,_instancesByReactRootID:I,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return D.scrollMonitor(n,function(){x.enqueueElementInternal(e,t),r&&x.enqueueCallbackInternal(e,r)}),e},_renderNewRootComponent:function(e,t,n,r){!t||t.nodeType!==k&&t.nodeType!==M&&t.nodeType!==N?S(!1):void 0,h.ensureScrollValueMonitoring();var o=P(e);C.batchedUpdates(u,o,t,n,r);var i=o._instance.rootID;return I[i]=o,o},renderSubtreeIntoContainer:function(e,t,n,r){return null==e||null==e._reactInternalInstance?S(!1):void 0,D._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){x.validateCallback(r,"ReactDOM.render"),g.isValidElement(t)?void 0:S(!1);var a=g(F,null,null,null,null,null,t),u=p(n);if(u){var s=u._currentElement,l=s.props;if(T(l,t)){var f=u._renderedComponent.getPublicInstance(),d=r&&function(){r.call(f)};return D._updateRootComponent(u,a,n,d),f}D.unmountComponentAtNode(n)}var h=o(n),v=h&&!!i(h),m=c(n),y=v&&!u&&!m,b=D._renderNewRootComponent(a,n,y,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):w)._renderedComponent.getPublicInstance();return r&&r.call(b),b},render:function(e,t,n){return D._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){!e||e.nodeType!==k&&e.nodeType!==M&&e.nodeType!==N?S(!1):void 0;var t=p(e);return t?(delete I[t._instance.rootID],C.batchedUpdates(s,t,e,!1),!0):(c(e),1===e.nodeType&&e.hasAttribute(A),!1)},_mountImageIntoNode:function(e,t,n,i,a){if(!t||t.nodeType!==k&&t.nodeType!==M&&t.nodeType!==N?S(!1):void 0,i){var u=o(t);if(_.canReuseMarkup(e,u))return void v.precacheNode(n,u);var s=u.getAttribute(_.CHECKSUM_ATTR_NAME);u.removeAttribute(_.CHECKSUM_ATTR_NAME);var c=u.outerHTML;u.setAttribute(_.CHECKSUM_ATTR_NAME,s);var l=e,p=r(l,c);" (client) "+l.substring(p-20,p+20)+"\n (server) "+c.substring(p-20,p+20),t.nodeType===M?S(!1):void 0}if(t.nodeType===M?S(!1):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);f.insertTreeBefore(t,e,null)}else O(t,e),v.precacheNode(n,t.firstChild)}};e.exports=D},function(e,t,n){"use strict";var r=n(32),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";function r(e){if("function"==typeof e.type)return e.type;var t=e.type,n=p[t];return null==n&&(p[t]=n=c(t)),n}function o(e){return l?void 0:s(!1),new l(e)}function i(e){return new f(e)}function a(e){return e instanceof f}var u=n(3),s=n(1),c=null,l=null,p={},f=null,d={injectGenericComponentClass:function(e){l=e},injectTextComponentClass:function(e){f=e},injectComponentClasses:function(e){u(p,e)}},h={getComponentClassForElement:r,createInternalComponent:o,createInstanceForText:i,isTextComponent:a,injection:d};e.exports=h},function(e,t,n){"use strict";var r=n(17),o=n(1),i={NATIVE:0,COMPOSITE:1,EMPTY:2,getType:function(e){return null===e||e===!1?i.EMPTY:r.isValidElement(e)?"function"==typeof e.type?i.COMPOSITE:i.NATIVE:void o(!1)}};e.exports=i},function(e,t,n){"use strict";function r(e,t){}var o=(n(2),{isMounted:function(e){return!1},enqueueCallback:function(e,t){},enqueueForceUpdate:function(e){r(e,"forceUpdate")},enqueueReplaceState:function(e,t){r(e,"replaceState")},enqueueSetState:function(e,t){r(e,"setState")}});e.exports=o},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.useCreateElement=!1}var o=n(3),i=n(16),a=n(51),u=[],s={enqueue:function(){}},c={getTransactionWrappers:function(){return u},getReactMountReady:function(){return s},destructor:function(){},checkpoint:function(){},rollback:function(){}};o(r.prototype,a.Mixin,c),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e){a.enqueueUpdate(e)}function o(e,t){var n=i.get(e);return n?n:null}var i=(n(20),n(77)),a=n(10),u=n(1),s=(n(2),{isMounted:function(e){var t=i.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){s.validateCallback(t,n);var i=o(e);return i?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void r(i)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?u(!1):void 0}});e.exports=s},function(e,t){"use strict";e.exports="15.1.0"},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";function r(e,t){if(null==t?o(!1):void 0,null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var o=n(1);e.exports=r},function(e,t,n){"use strict";var r=!1;e.exports=r},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);if("function"==typeof t)return t}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(e){for(var t;(t=e._renderedNodeType)===o.COMPOSITE;)e=e._renderedComponent;return t===o.NATIVE?e._renderedComponent:t===o.EMPTY?null:void 0}var o=n(151);e.exports=r},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(6),i=null;e.exports=r},function(e,t){"use strict";function n(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&r[e.type]||"textarea"===t)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t,n){"use strict";var r=n(6),o=n(52),i=n(86),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),e.exports=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=n(188),s=r(u),c=function(e){function t(e){o(this,t);var n=i(this,Object.getPrototypeOf(t).call(this,"Submit Validation Failed"));return n.errors=e,n}return a(t,e),t}(s["default"]);t["default"]=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.untouch=t.unregisterField=t.touch=t.setSubmitFailed=t.stopSubmit=t.stopAsyncValidation=t.startSubmit=t.startAsyncValidation=t.reset=t.registerField=t.initialize=t.focus=t.destroy=t.change=t.blur=t.arrayUnshift=t.arraySwap=t.arraySplice=t.arrayShift=t.arrayRemove=t.arrayPush=t.arrayPop=t.arrayInsert=void 0;var r=n(90);t.arrayInsert=function(e,t,n,o){return{type:r.ARRAY_INSERT,meta:{form:e,field:t,index:n},payload:o}},t.arrayPop=function(e,t){return{type:r.ARRAY_POP,meta:{form:e,field:t}}},t.arrayPush=function(e,t,n){return{type:r.ARRAY_PUSH,meta:{form:e,field:t},payload:n}},t.arrayRemove=function(e,t,n){return{type:r.ARRAY_REMOVE,meta:{form:e,field:t,index:n}}},t.arrayShift=function(e,t){return{type:r.ARRAY_SHIFT,meta:{form:e,field:t}}},t.arraySplice=function(e,t,n,o,i){var a={type:r.ARRAY_SPLICE,meta:{form:e,field:t,index:n,removeNum:o}};return void 0!==i&&(a.payload=i),a},t.arraySwap=function(e,t,n,o){if(n===o)throw new Error("Swap indices cannot be equal");if(n<0||o<0)throw new Error("Swap indices cannot be negative");return{type:r.ARRAY_SWAP,meta:{form:e,field:t,indexA:n,indexB:o}}},t.arrayUnshift=function(e,t,n){return{type:r.ARRAY_UNSHIFT,meta:{form:e,field:t},payload:n}},t.blur=function(e,t,n,o){return{type:r.BLUR,meta:{form:e,field:t,touch:o},payload:n}},t.change=function(e,t,n,o){return{type:r.CHANGE,meta:{form:e,field:t,touch:o},payload:n}},t.destroy=function(e){return{type:r.DESTROY,meta:{form:e}}},t.focus=function(e,t){return{type:r.FOCUS,meta:{form:e,field:t}}},t.initialize=function(e,t){return{type:r.INITIALIZE,meta:{form:e},payload:t}},t.registerField=function(e,t,n){return{type:r.REGISTER_FIELD,meta:{form:e},payload:{name:t,type:n}}},t.reset=function(e){return{type:r.RESET,meta:{form:e}}},t.startAsyncValidation=function(e,t){return{type:r.START_ASYNC_VALIDATION,meta:{form:e,field:t}}},t.startSubmit=function(e){return{type:r.START_SUBMIT,meta:{form:e}}},t.stopAsyncValidation=function(e,t){var n={type:r.STOP_ASYNC_VALIDATION,meta:{form:e},payload:t};return t&&Object.keys(t).length&&(n.error=!0),n},t.stopSubmit=function(e,t){var n={type:r.STOP_SUBMIT,meta:{form:e},payload:t};return t&&Object.keys(t).length&&(n.error=!0),n},t.setSubmitFailed=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return{type:r.SET_SUBMIT_FAILED,meta:{form:e,fields:n},error:!0}},t.touch=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return{type:r.TOUCH,meta:{form:e,fields:n}}},t.unregisterField=function(e,t){return{type:r.UNREGISTER_FIELD,meta:{form:e},payload:{name:t}}},t.untouch=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return{type:r.UNTOUCH,meta:{form:e,fields:n}}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=t.dataKey="value",r=function(e,t){return function(e){e.dataTransfer.setData(n,t)}};t["default"]=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(169),i=r(o),a=function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];r.selected&&t.push(r.value)}return t},u=function(e,t){if((0,i["default"])(e)){if(!t&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(t&&void 0!==e.nativeEvent)return e.nativeEvent.text;var n=e.target,r=n.type,o=n.value,u=n.checked,s=n.files,c=e.dataTransfer;return"checkbox"===r?u:"file"===r?s||c&&c.files:"select-multiple"===r?a(e.target.options):o}return e&&void 0!==e.value?e.value:e};t["default"]=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return!!(e&&e.stopPropagation&&e.preventDefault)};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(169),i=r(o),a=function(e){var t=(0,i["default"])(e);return t&&e.preventDefault(),t};t["default"]=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(45),a=r(i),u=function c(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if(!e)return e;var i=e[t];return r.length?c.apply(void 0,[i].concat(r)):i},s=function(e,t){return u.apply(void 0,[e].concat(o((0,a["default"])(t))))};t["default"]=s},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return function(e){return e};var r=function(){var e=t[t.length-1],n=t.slice(0,-1);return{v:function(){return n.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}}();return"object"==typeof r?r.v:void 0}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){function r(){y===m&&(y=m.slice())}function i(){return v}function u(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return r(),y.push(e),function(){if(t){t=!1,r();var n=y.indexOf(e);y.splice(n,1)}}}function l(e){if(!(0,a["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(g)throw new Error("Reducers may not dispatch actions.");try{g=!0,v=h(v,e)}finally{g=!1}for(var t=m=y,n=0;n<t.length;n++)t[n]();return e}function p(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");h=e,l({type:c.INIT})}function f(){var e,t=u;return e={subscribe:function(e){function n(){e.next&&e.next(i())}if("object"!=typeof e)throw new TypeError("Expected the observer to be an object."); n();var r=t(n);return{unsubscribe:r}}},e[s["default"]]=function(){return this},e}var d;if("function"==typeof t&&"undefined"==typeof n&&(n=t,t=void 0),"undefined"!=typeof n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(o)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var h=e,v=t,m=[],y=m,g=!1;return l({type:c.INIT}),d={dispatch:l,subscribe:u,getState:i,replaceReducer:p},d[s["default"]]=f,d}t.__esModule=!0,t.ActionTypes=void 0,t["default"]=o;var i=n(65),a=r(i),u=n(392),s=r(u),c=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var o=n(174),i=r(o),a=n(391),u=r(a),s=n(390),c=r(s),l=n(389),p=r(l),f=n(173),d=r(f),h=n(176);r(h),t.createStore=i["default"],t.combineReducers=u["default"],t.bindActionCreators=c["default"],t.applyMiddleware=p["default"],t.compose=d["default"]},function(e,t){"use strict";function n(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var o=n(5),i=r(o),a=n(290),u=r(a),s=n(53),c=r(s);"undefined"!=typeof window&&(window.initReact=function(e){return u["default"].render(i["default"].createElement(c["default"],e),document.getElementById("content"))})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=r(o),a=n(68),u=r(a),s=n(190),c=r(s),l=function(e){return/<p>(.+)<\/p>/.exec((0,u["default"])(e))[1]},p=function(e){var t=e.items;return!(!t||!t.length)&&i["default"].createElement("ol",{className:c["default"].breadcrumbs},t.map(function(e,n){var r=e.path,o=e.title;return n===t.length-1?i["default"].createElement("li",{key:n,dangerouslySetInnerHTML:{__html:l(o)}}):i["default"].createElement("li",{key:n},i["default"].createElement("a",{href:r,dangerouslySetInnerHTML:{__html:l(o)}}))}))};t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=r(o),a=function(e){var t=e.user,n=e.repo,r=e.type,o=e.width,a=e.height,u=e.count,s=e.large,c="https://ghbtns.com/github-btn.html?user="+t+"&repo="+n+"&type="+r;return u&&(c+="&count=true"),s&&(c+="&size=large"),i["default"].createElement("iframe",{src:c,frameBorder:"0",allowTransparency:"true",scrolling:"0",width:o,height:a,style:{border:"none",width:o,height:a}})};a.propTypes={user:o.PropTypes.string.isRequired,repo:o.PropTypes.string.isRequired,type:o.PropTypes.oneOf(["star","watch","fork","follow"]).isRequired,width:o.PropTypes.number.isRequired,height:o.PropTypes.number.isRequired,count:o.PropTypes.bool,large:o.PropTypes.bool},t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=r(o),a=n(179),u=r(a),s=function(e){var t=e.version,r=n(191);return i["default"].createElement("div",{className:r.home},i["default"].createElement("div",{className:r.masthead},i["default"].createElement("div",{className:r.logo}),i["default"].createElement("h1",null,"Redux Form"),i["default"].createElement("div",{className:r.version},"v",t),i["default"].createElement("h2",null,"The best way to manage your form state in Redux."),i["default"].createElement(u["default"],{user:"erikras",repo:"redux-form",type:"star",width:160,height:30,count:!0,large:!0}),i["default"].createElement(u["default"],{user:"erikras",repo:"redux-form",type:"fork",width:160,height:30,count:!0,large:!0})),i["default"].createElement("div",{className:r.options},i["default"].createElement("a",{href:"docs/GettingStarted.md"},i["default"].createElement("i",{className:r.start}),"Start Here"),i["default"].createElement("a",{href:"docs/api"},i["default"].createElement("i",{className:r.api}),"API"),i["default"].createElement("a",{href:"examples"},i["default"].createElement("i",{className:r.examples}),"Examples"),i["default"].createElement("a",{href:"docs/faq"},i["default"].createElement("i",{className:r.faq}),"FAQ")))};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(5),l=r(c),p=n(93),f=r(p),d=n(68),h=r(d),v=n(192),m=r(v),y=function(e){return/<p>(.+)<\/p>/.exec((0,h["default"])(e))[1]},g=function(e){function t(e){i(this,t);var n=a(this,Object.getPrototypeOf(t).call(this,e));return n.open=n.open.bind(n),n.close=n.close.bind(n),n.state={open:!1},n}return u(t,e),s(t,[{key:"renderItem",value:function(e,t){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],r=this.props,i=r.path,a=r.url;return l["default"].createElement("a",{href:""+(a||"")+e,className:(0,f["default"])(m["default"]["indent"+n],o({},m["default"].active,e===i)),dangerouslySetInnerHTML:{__html:y(t)}})}},{key:"open",value:function(){this.setState({open:!0})}},{key:"close",value:function(){this.setState({open:!1})}},{key:"render",value:function(){var e=this.state.open,t=this.props.url;return l["default"].createElement("div",{className:(0,f["default"])(m["default"].nav,o({},m["default"].open,e))},l["default"].createElement("button",{type:"button",onClick:this.open}),l["default"].createElement("div",{className:m["default"].overlay,onClick:this.close},l["default"].createElement("i",{className:"fa fa-times"})," Close"),l["default"].createElement("div",{className:m["default"].placeholder}),l["default"].createElement("nav",{className:m["default"].menu},l["default"].createElement("a",{href:t,className:m["default"].brand},"Redux Form"),this.renderItem("/docs/GettingStarted.md","Getting Started"),this.renderItem("/docs/MigrationGuide.md","`v6` Migration Guide"),this.renderItem("/docs/ValueLifecycle.md","Value Lifecycle"),this.renderItem("/docs/api","API"),this.renderItem("/docs/api/ReduxForm.md","`reduxForm()`",1),this.renderItem("/docs/api/Props.md","`props`",1),this.renderItem("/docs/api/Field.md","`Field`",1),this.renderItem("/docs/api/Fields.md","`Fields`",1),this.renderItem("/docs/api/FieldArray.md","`FieldArray`",1),this.renderItem("/docs/api/FormValueSelector.md","`formValueSelector()`",1),this.renderItem("/docs/api/Reducer.md","`reducer`",1),this.renderItem("/docs/api/ReducerPlugin.md","`reducer.plugin()`",2),this.renderItem("/docs/api/SubmissionError.md","`SubmissionError`",1),this.renderItem("/docs/api/ActionCreators.md","Action Creators",1),this.renderItem("/docs/api/Selectors.md","Selectors",1),this.renderItem("/docs/faq","FAQ"),this.renderItem("/examples","Examples"),this.renderItem("/examples/simple","Simple Form",1),this.renderItem("/examples/syncValidation","Sync Validation",1),this.renderItem("/examples/submitValidation","Submit Validation",1),this.renderItem("/examples/asyncValidation","Async Validation",1),this.renderItem("/examples/initializeFromState","Initializing from State",1),this.renderItem("/examples/selectingFormValues","Selecting Form Values",1),this.renderItem("/examples/fieldArrays","Field Arrays",1),this.renderItem("/examples/normalizing","Normalizing",1),this.renderItem("/examples/immutable","Immutable JS",1),this.renderItem("/examples/wizard","Wizard Form",1),this.renderItem("/examples/material-ui","Material UI",1),this.renderItem("/examples/react-widgets","React Widgets",1),this.renderItem("/docs/DocumentationVersions.md","Older Versions")))}}]),t}(c.Component);g.propTypes={path:c.PropTypes.string.isRequired,url:c.PropTypes.string.isRequired},t["default"]=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(5),a=r(i),u=function(e){var t=e.username,n=e.showUsername,r=e.showCount,i=e.large,u={};return n||(u["data-show-screen-name"]="false"),r||(u["data-show-count"]="false"),i&&(u["data-size"]="large"),a["default"].createElement("a",o({href:"https://twitter.com/"+t,className:"twitter-follow-button"},u),"Follow @",t)};u.propTypes={username:i.PropTypes.string.isRequired,showUserName:i.PropTypes.bool,showCount:i.PropTypes.bool,large:i.PropTypes.bool},t["default"]=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=r(o),a=n(379),u=n(91),s=r(u),c=function(e){var t=e.form,n=e.format,r=void 0===n?function(e){return JSON.stringify(e,null,2)}:n,o=(0,a.values)({form:t}),u=function(e){var t=e.values;return i["default"].createElement("div",null,i["default"].createElement("h2",null,"Values"),i["default"].createElement(s["default"],{source:r(t)}))},c=o(u);return i["default"].createElement(c,null)};t["default"]=c},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,n){return[{path:"https://redux-form.com/"+n+"/",title:"Redux Form"},{path:"https://redux-form.com/"+n+"/examples",title:"Examples"},{path:"https://redux-form.com/"+n+"/examples/"+e,title:t}]};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Values=t.Markdown=t.Code=t.App=t.generateExampleBreadcrumbs=t.render=void 0;var o=n(186),i=r(o),a=n(184),u=r(a),s=n(53),c=r(s),l=n(91),p=r(l),f=n(92),d=r(f),h=n(183),v=r(h);t.render=i["default"],t.generateExampleBreadcrumbs=u["default"],t.App=c["default"],t.Code=p["default"],t.Markdown=d["default"],t.Values=v["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(5),i=r(o),a=n(291),u=n(53),s=r(u),c=function(e){var t=e.component,n=e.title,r=e.path,o=e.version,u=e.breadcrumbs;return'<!DOCTYPE html>\n <html lang="en">\n <head>\n <meta charSet="utf-8"/>\n <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>\n <title>Redux Form'+(n&&" - "+n)+'</title>\n <link href="https://redux-form.com/'+o+'/bundle.css"\n media="screen, projection" rel="stylesheet" type="text/css"/>\n <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css"\n media="screen, projection" rel="stylesheet" type="text/css"/>\n <meta itemprop="name" content="Redux Form"/>\n <meta property="og:type" content="website"/>\n <meta property="og:title" content="Redux Form"/>\n <meta property="og:site_name" content="Redux Form"/>\n <meta property="og:description" content="The best way to manage your form state in Redux."/>\n <meta property="og:image" content="logo.png"/>\n <meta property="twitter:site" content="@erikras"/>\n <meta property="twitter:creator" content="@erikras"/>\n <style type="text/css">\n body {\n margin: 0;\n }\n </style>\n </head>\n <body>\n <div id="content">\n '+(0,a.renderToString)(i["default"].createElement(s["default"],{version:o,path:r,breadcrumbs:u},t))+'\n </div>\n <script src="https://redux-form.com/'+o+'/bundle.js"></script>\n <script>initReact('+JSON.stringify({version:o,path:r,breadcrumbs:u})+")</script>\n <script>\n (function(i,s,o,g,r,a,m){i[ 'GoogleAnalyticsObject' ] = r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n ga('create', 'UA-69298417-1', 'auto');\n ga('send', 'pageview');\n </script>\n <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>\n </body>\n </html>"};t["default"]=c},function(e,t){(function(t){"use strict";var n="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},r=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,r=n.Prism={util:{encode:function(e){return e instanceof o?new o(e.type,r.util.encode(e.content),e.alias):"Array"===r.util.type(e)?e.map(r.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e){var t=r.util.type(e);switch(t){case"Object":var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=r.util.clone(e[o]));return n;case"Array":return e.map&&e.map(function(e){return r.util.clone(e)})}return e}},languages:{extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var o in t)n[o]=t[o];return n},insertBefore:function(e,t,n,o){o=o||r.languages;var i=o[e];if(2==arguments.length){n=arguments[1];for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a]);return i}var u={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u[s]=i[s]}return r.languages.DFS(r.languages,function(t,n){n===o[e]&&t!=e&&(this[t]=u)}),o[e]=u},DFS:function(e,t,n,o){o=o||{};for(var i in e)e.hasOwnProperty(i)&&(t.call(e,i,e[i],n||i),"Object"!==r.util.type(e[i])||o[r.util.objId(e[i])]?"Array"!==r.util.type(e[i])||o[r.util.objId(e[i])]||(o[r.util.objId(e[i])]=!0,r.languages.DFS(e[i],t,i,o)):(o[r.util.objId(e[i])]=!0,r.languages.DFS(e[i],t,null,o)))}},plugins:{},highlightAll:function(e,t){var n={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",n);for(var o,i=n.elements||document.querySelectorAll(n.selector),a=0;o=i[a++];)r.highlightElement(o,e===!0,n.callback)},highlightElement:function(t,o,i){for(var a,u,s=t;s&&!e.test(s.className);)s=s.parentNode;s&&(a=(s.className.match(e)||[,""])[1],u=r.languages[a]),t.className=t.className.replace(e,"").replace(/\s+/g," ")+" language-"+a,s=t.parentNode,/pre/i.test(s.nodeName)&&(s.className=s.className.replace(e,"").replace(/\s+/g," ")+" language-"+a);var c=t.textContent,l={element:t,language:a,grammar:u,code:c};if(!c||!u)return void r.hooks.run("complete",l);if(r.hooks.run("before-highlight",l),o&&n.Worker){var p=new Worker(r.filename);p.onmessage=function(e){l.highlightedCode=e.data,r.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,i&&i.call(l.element),r.hooks.run("after-highlight",l),r.hooks.run("complete",l)},p.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else l.highlightedCode=r.highlight(l.code,l.grammar,l.language),r.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,i&&i.call(t),r.hooks.run("after-highlight",l),r.hooks.run("complete",l)},highlight:function(e,t,n){var i=r.tokenize(e,t);return o.stringify(r.util.encode(i),n)},tokenize:function(e,t){var n=r.Token,o=[e],i=t.rest;if(i){for(var a in i)t[a]=i[a];delete t.rest}e:for(var a in t)if(t.hasOwnProperty(a)&&t[a]){var u=t[a];u="Array"===r.util.type(u)?u:[u];for(var s=0;s<u.length;++s){var c=u[s],l=c.inside,p=!!c.lookbehind,f=!!c.greedy,d=0,h=c.alias;c=c.pattern||c;for(var v=0;v<o.length;v++){var m=o[v];if(o.length>e.length)break e;if(!(m instanceof n)){c.lastIndex=0;var y=c.exec(m),g=1;if(!y&&f&&v!=o.length-1){var b=o[v+1].matchedStr||o[v+1],_=m+b;if(v<o.length-2&&(_+=o[v+2].matchedStr||o[v+2]),c.lastIndex=0,y=c.exec(_),!y)continue;var E=y.index+(p?y[1].length:0);if(E>=m.length)continue;var x=y.index+y[0].length,C=m.length+b.length;g=3,C>=x&&(g=2,_=_.slice(0,C)),m=_}if(y){p&&(d=y[1].length);var E=y.index+d,y=y[0].slice(d),x=E+y.length,w=m.slice(0,E),P=m.slice(x),S=[v,g];w&&S.push(w);var O=new n(a,l?r.tokenize(y,l):y,h,y);S.push(O),P&&S.push(P),Array.prototype.splice.apply(o,S)}}}}}return o},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var o,i=0;o=n[i++];)o(t)}}},o=r.Token=function(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.matchedStr=r||null};if(o.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===r.util.type(e))return e.map(function(n){return o.stringify(n,t,e)}).join("");var i={type:e.type,content:o.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if("comment"==i.type&&(i.attributes.spellcheck="true"),e.alias){var a="Array"===r.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,a)}r.hooks.run("wrap",i);var u="";for(var s in i.attributes)u+=(u?" ":"")+s+'="'+(i.attributes[s]||"")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'" '+u+">"+i.content+"</"+i.tag+">"},!n.document)return n.addEventListener?(n.addEventListener("message",function(e){var t=JSON.parse(e.data),o=t.language,i=t.code,a=t.immediateClose;n.postMessage(r.highlight(i,r.languages[o],o)),a&&n.close()},!1),n.Prism):n.Prism;var i=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return i&&(r.filename=i.src,document.addEventListener&&!i.hasAttribute("data-manual")&&document.addEventListener("DOMContentLoaded",r.highlightAll)),n.Prism}();"undefined"!=typeof e&&e.exports&&(e.exports=r),"undefined"!=typeof t&&(t.Prism=r),r.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=.$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},r.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),r.languages.xml=r.languages.markup,r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},r.languages.css.atrule.inside.rest=r.util.clone(r.languages.css),r.languages.markup&&(r.languages.insertBefore("markup","tag",{style:{pattern:/(<style[\w\W]*?>)[\w\W]*?(?=<\/style>)/i,lookbehind:!0,inside:r.languages.css,alias:"language-css"}}),r.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:r.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:r.languages.css}},alias:"language-css"}},r.languages.markup.tag)),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),r.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}}),r.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\\\|\\?[^\\])*?`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}}}),r.languages.markup&&r.languages.insertBefore("markup","tag",{script:{pattern:/(<script[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,lookbehind:!0,inside:r.languages.javascript,alias:"language-javascript"}}),r.languages.js=r.languages.javascript,r.languages.json={property:/".*?"(?=\s*:)/gi,string:/"(?!:)(\\?[^"])*?"(?!:)/g,number:/\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?)\b/g,punctuation:/[{}[\]);,]/g,operator:/:/g,"boolean":/\b(true|false)\b/gi,"null":/\bnull\b/gi},r.languages.jsonp=r.languages.json,!function(e){var t=e.util.clone(e.languages.javascript);e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=/<\/?[\w\.:-]+\s*(?:\s+[\w\.:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+|(\{[\w\W]*?\})))?\s*)*\/?>/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=[^\{](?:('|")[\w\W]*?(\1)|[^\s>]+)/i;var n=e.util.clone(e.languages.jsx);delete n.punctuation,n=e.languages.insertBefore("jsx","operator",{punctuation:/=(?={)|[{}[\];(),.:]/},{jsx:n}),e.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{[^}]*\}|[^}])+\})/i,inside:n,alias:"language-javascript"}},e.languages.jsx.tag)}(r)}).call(t,function(){return this}())},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(e,t,n){for(var r=!0;r;){var o=e,i=t,a=n;r=!1,null===o&&(o=Function.prototype);var u=Object.getOwnPropertyDescriptor(o,i);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var c=Object.getPrototypeOf(o);if(null===c)return;e=c,t=i,n=a,r=!0,u=c=void 0}},i=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0];return n(this,t),o(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e),Object.defineProperty(this,"message",{enumerable:!1,value:e,writable:!0}),Object.defineProperty(this,"name",{enumerable:!1,value:this.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?void Error.captureStackTrace(this,this.constructor):void Object.defineProperty(this,"stack",{enumerable:!1,value:new Error(e).stack,writable:!0})}return r(t,e),t}(Error);t["default"]=i,e.exports=t["default"]},function(e,t){e.exports={app:"app___3P8ep",topNav:"topNav___sBW8S",brand:"brand___YAZl-",github:"github___3-vRv",contentAndFooter:"contentAndFooter___kE2nt",content:"content___3TVHp",home:"home___2XyPG",hasNav:"hasNav___1KF_W",footer:"footer___1oh0h",help:"help___3OayI"}},function(e,t){e.exports={breadcrumbs:"breadcrumbs___1BHo6"}},function(e,t){e.exports={home:"home___381a9",masthead:"masthead___MGNF0",logo:"logo___hP7wi",content:"content___2vYdp",version:"version___2mbZo",github:"github___mrRv3",options:"options___2Tyc4",start:"start___1WlUb",api:"api___1hCrr",examples:"examples___2H_mp",faq:"faq___2mIT0"}},function(e,t){e.exports={nav:"nav___11xa5",placeholder:"placeholder___TzF1K",overlay:"overlay___1GMox",menu:"menu___12xDU",active:"active___2eU59",brand:"brand___1qRUu",indent1:"indent1___4iVnL",indent2:"indent2___2PiOO",open:"open___3Bk_k"}},function(e,t){"use strict";function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e.replace(i,"ms-"))}var o=n(193),i=/^-ms-/;e.exports=r},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!o(e)&&(o(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var o=n(202);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var r=Array(t),o=0;o<t;o++)r[o]=e[o];return r}function o(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function i(e){return o(e)?Array.isArray(e)?e.slice():r(e):[e]}var a=n(1);e.exports=i},function(e,t,n){"use strict";function r(e){var t=e.match(l);return t&&t[1].toLowerCase()}function o(e,t){var n=c;c?void 0:s(!1);var o=r(e),i=o&&u(o);if(i){n.innerHTML=i[1]+e+i[2];for(var l=i[0];l--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:s(!1),a(p).forEach(t));for(var f=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var i=n(6),a=n(196),u=n(97),s=n(1),c=i.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;e.exports=o},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t){"use strict";function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;e.exports=n},function(e,t,n){"use strict";function r(e){return o(e).replace(i,"-ms-")}var o=n(199),i=/^ms-/;e.exports=r},function(e,t){"use strict";function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t,n){"use strict";function r(e){return o(e)&&3==e.nodeType}var o=n(201);e.exports=r},function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}e.exports=n},function(e,t,n){"use strict";var r,o=n(6);o.canUseDOM&&(r=window.performance||window.msPerformance||window.webkitPerformance),e.exports=r||{}},function(e,t,n){"use strict";var r,o=n(204);r=o.now?function(){return o.now()}:function(){return Date.now()},e.exports=r},function(e,t,n){var r=n(22),o=n(8),i=r(o,"DataView");e.exports=i},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var o=n(242),i=n(243),a=n(244),u=n(245),s=n(246);r.prototype.clear=o,r.prototype["delete"]=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,e.exports=r},function(e,t,n){var r=n(22),o=n(8),i=r(o,"Promise");e.exports=i},function(e,t,n){var r=n(22),o=n(8),i=r(o,"Set");e.exports=i},function(e,t,n){function r(e){var t=-1,n=e?e.length:0;for(this.__data__=new o;++t<n;)this.add(e[t])}var o=n(57),i=n(267),a=n(268);r.prototype.add=r.prototype.push=i,r.prototype.has=a,e.exports=r},function(e,t,n){var r=n(8),o=r.Uint8Array;e.exports=o},function(e,t){function n(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}e.exports=n},function(e,t,n){var r=n(105),o=n(229),i=o(r);e.exports=i},function(e,t,n){var r=n(230),o=r();e.exports=o},function(e,t){function n(e,t){return null!=e&&t in Object(e)}e.exports=n},function(e,t,n){function r(e,t,n,r,m,g){var b=c(e),_=c(t),E=h,x=h;b||(E=s(e),E=E==d?v:E),_||(x=s(t),x=x==d?v:x);var C=E==v&&!l(e),w=x==v&&!l(t),P=E==x;if(P&&!C)return g||(g=new o),b||p(e)?i(e,t,n,r,m,g):a(e,t,E,n,r,m,g);if(!(m&f)){var S=C&&y.call(e,"__wrapped__"),O=w&&y.call(t,"__wrapped__");if(S||O){var T=S?e.value():e,R=O?t.value():t;return g||(g=new o),n(T,R,r,m,g)}}return!!P&&(g||(g=new o),u(e,t,n,r,m,g))}var o=n(101),i=n(117),a=n(234),u=n(235),s=n(239),c=n(11),l=n(63),p=n(280),f=2,d="[object Arguments]",h="[object Array]",v="[object Object]",m=Object.prototype,y=m.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,r){var s=n.length,c=s,l=!r;if(null==e)return!c;for(e=Object(e);s--;){var p=n[s];if(l&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++s<c;){p=n[s];var f=p[0],d=e[f],h=p[1];if(l&&p[2]){if(void 0===d&&!(f in e))return!1}else{var v=new o;if(r)var m=r(d,h,f,e,t,v);if(!(void 0===m?i(h,d,r,a|u,v):m))return!1}}return!0}var o=n(101),i=n(60),a=1,u=2;e.exports=r},function(e,t,n){function r(e){if(!u(e)||a(e))return!1;var t=o(e)||i(e)?h:l;return t.test(s(e))}var o=n(64),i=n(63),a=n(251),u=n(15),s=n(125),c=/[\\^$.*+?()[\]{}|]/g,l=/^\[object .+?Constructor\]$/,p=Object.prototype,f=Function.prototype.toString,d=p.hasOwnProperty,h=RegExp("^"+f.call(d).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t){function n(e){return r(Object(e))}var r=Object.keys;e.exports=n},function(e,t,n){function r(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||o(n,e,t)}}var o=n(217),i=n(238),a=n(121);e.exports=r},function(e,t,n){function r(e,t){return u(e)&&s(t)?c(l(e),t):function(n){var r=i(n,e);return void 0===r&&r===t?a(n,e):o(t,r,void 0,p|f)}}var o=n(60),i=n(276),a=n(277),u=n(40),s=n(120),c=n(121),l=n(26),p=1,f=2;e.exports=r},function(e,t,n){function r(e){return function(t){return o(t,e)}}var o=n(106);e.exports=r},function(e,t,n){function r(e,t){var n;return o(e,function(e,r,o){return n=t(e,r,o),!n}),!!n}var o=n(213);e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}e.exports=n},function(e,t,n){function r(e){if("string"==typeof e)return e;if(i(e))return s?s.call(e):"";var t=e+"";return"0"==t&&1/e==-a?"-0":t}var o=n(102),i=n(27),a=1/0,u=o?o.prototype:void 0,s=u?u.toString:void 0;e.exports=r},function(e,t){function n(e){return e&&e.Object===Object?e:null}e.exports=n},function(e,t,n){var r=n(8),o=r["__core-js_shared__"];e.exports=o},function(e,t){function n(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&r++;return r}e.exports=n},function(e,t,n){function r(e,t){return function(n,r){if(null==n)return n;if(!o(n))return e(n,r);for(var i=n.length,a=t?i:-1,u=Object(n);(t?a--:++a<i)&&r(u[a],a,u)!==!1;);return n}}var o=n(42);e.exports=r},function(e,t){function n(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),u=a.length;u--;){ var s=a[e?u:++o];if(n(i[s],s,i)===!1)break}return t}}e.exports=n},function(e,t,n){function r(e,t,n){function r(){var t=this&&this!==i&&this instanceof r?s:e;return t.apply(u?n:this,arguments)}var u=t&a,s=o(e);return r}var o=n(36),i=n(8),a=1;e.exports=r},function(e,t,n){function r(e,t,n){function r(){for(var i=arguments.length,f=Array(i),d=i,h=s(r);d--;)f[d]=arguments[d];var v=i<3&&f[0]!==h&&f[i-1]!==h?[]:c(f,h);if(i-=v.length,i<n)return u(e,t,a,r.placeholder,void 0,f,v,void 0,void 0,n-i);var m=this&&this!==l&&this instanceof r?p:e;return o(m,this,f)}var p=i(e);return r}var o=n(58),i=n(36),a=n(114),u=n(115),s=n(37),c=n(25),l=n(8);e.exports=r},function(e,t,n){function r(e,t,n,r){function s(){for(var t=-1,i=arguments.length,u=-1,p=r.length,f=Array(p+i),d=this&&this!==a&&this instanceof s?l:e;++u<p;)f[u]=r[u];for(;i--;)f[u++]=arguments[++t];return o(d,c?n:this,f)}var c=t&u,l=i(e);return s}var o=n(58),i=n(36),a=n(8),u=1;e.exports=r},function(e,t,n){function r(e,t,n,r,o,x,w){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case _:return!(e.byteLength!=t.byteLength||!r(new i(e),new i(t)));case p:case f:return+e==+t;case d:return e.name==t.name&&e.message==t.message;case v:return e!=+e?t!=+t:e==+t;case m:case g:return e==t+"";case h:var P=u;case y:var S=x&l;if(P||(P=s),e.size!=t.size&&!S)return!1;var O=w.get(e);return O?O==t:(x|=c,w.set(e,t),a(P(e),P(t),r,o,x,w));case b:if(C)return C.call(e)==C.call(t)}return!1}var o=n(102),i=n(211),a=n(117),u=n(263),s=n(269),c=1,l=2,p="[object Boolean]",f="[object Date]",d="[object Error]",h="[object Map]",v="[object Number]",m="[object RegExp]",y="[object Set]",g="[object String]",b="[object Symbol]",_="[object ArrayBuffer]",E="[object DataView]",x=o?o.prototype:void 0,C=x?x.valueOf:void 0;e.exports=r},function(e,t,n){function r(e,t,n,r,u,s){var c=u&a,l=i(e),p=l.length,f=i(t),d=f.length;if(p!=d&&!c)return!1;for(var h=p;h--;){var v=l[h];if(!(c?v in t:o(t,v)))return!1}var m=s.get(e);if(m)return m==t;var y=!0;s.set(e,t);for(var g=c;++h<p;){v=l[h];var b=e[v],_=t[v];if(r)var E=c?r(_,b,v,t,e,s):r(b,_,v,e,t,s);if(!(void 0===E?b===_||n(b,_,r,u,s):E)){y=!1;break}g||(g="constructor"==v)}if(y&&!g){var x=e.constructor,C=t.constructor;x!=C&&"constructor"in e&&"constructor"in t&&!("function"==typeof x&&x instanceof x&&"function"==typeof C&&C instanceof C)&&(y=!1)}return s["delete"](e),y}var o=n(107),i=n(66),a=2;e.exports=r},function(e,t,n){function r(e){for(var t=e.name+"",n=o[t],r=a.call(o,t)?n.length:0;r--;){var i=n[r],u=i.func;if(null==u||u==e)return i.name}return t}var o=n(265),i=Object.prototype,a=i.hasOwnProperty;e.exports=r},function(e,t,n){var r=n(109),o=r("length");e.exports=o},function(e,t,n){function r(e){for(var t=i(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,o(a)]}return t}var o=n(120),i=n(66);e.exports=r},function(e,t,n){function r(e){return y.call(e)}var o=n(206),i=n(100),a=n(208),u=n(209),s=n(103),c=n(125),l="[object Map]",p="[object Object]",f="[object Promise]",d="[object Set]",h="[object WeakMap]",v="[object DataView]",m=Object.prototype,y=m.toString,g=c(o),b=c(i),_=c(a),E=c(u),x=c(s);(o&&r(new o(new ArrayBuffer(1)))!=v||i&&r(new i)!=l||a&&r(a.resolve())!=f||u&&r(new u)!=d||s&&r(new s)!=h)&&(r=function(e){var t=y.call(e),n=t==p?e.constructor:void 0,r=n?c(n):void 0;if(r)switch(r){case g:return v;case b:return l;case _:return f;case E:return d;case x:return h}return t}),e.exports=r},function(e,t){function n(e,t){return null==e?void 0:e[t]}e.exports=n},function(e,t,n){function r(e,t,n){t=s(t,e)?[t]:o(t);for(var r,f=-1,d=t.length;++f<d;){var h=p(t[f]);if(!(r=null!=e&&n(e,h)))break;e=e[h]}if(r)return r;var d=e?e.length:0;return!!d&&c(d)&&u(h,d)&&(a(e)||l(e)||i(e))}var o=n(111),i=n(128),a=n(11),u=n(39),s=n(40),c=n(43),l=n(129),p=n(26);e.exports=r},function(e,t,n){function r(){this.__data__=o?o(null):{}}var o=n(41);e.exports=r},function(e,t){function n(e){return this.has(e)&&delete this.__data__[e]}e.exports=n},function(e,t,n){function r(e){var t=this.__data__;if(o){var n=t[e];return n===i?void 0:n}return u.call(t,e)?t[e]:void 0}var o=n(41),i="__lodash_hash_undefined__",a=Object.prototype,u=a.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){var t=this.__data__;return o?void 0!==t[e]:a.call(t,e)}var o=n(41),i=Object.prototype,a=i.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__;return n[e]=o&&void 0===t?i:t,this}var o=n(41),i="__lodash_hash_undefined__";e.exports=r},function(e,t,n){function r(e){var t=e?e.length:void 0;return u(t)&&(a(e)||s(e)||i(e))?o(t,String):null}var o=n(224),i=n(128),a=n(11),u=n(43),s=n(129);e.exports=r},function(e,t,n){function r(e,t,n){if(!u(n))return!1;var r=typeof t;return!!("number"==r?i(n)&&a(t,n.length):"string"==r&&t in n)&&o(n[t],e)}var o=n(126),i=n(42),a=n(39),u=n(15);e.exports=r},function(e,t){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=n},function(e,t,n){function r(e){var t=a(e),n=u[t];if("function"!=typeof n||!(t in o.prototype))return!1;if(e===n)return!0;var r=i(n);return!!r&&e===r[0]}var o=n(56),i=n(118),a=n(236),u=n(289);e.exports=r},function(e,t,n){function r(e){return!!i&&i in e}var o=n(227),i=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=r},function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},function(e,t){function n(){this.__data__=[]}e.exports=n},function(e,t,n){function r(e){var t=this.__data__,n=o(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():a.call(t,n,1),!0}var o=n(35),i=Array.prototype,a=i.splice;e.exports=r},function(e,t,n){function r(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]}var o=n(35);e.exports=r},function(e,t,n){function r(e){return o(this.__data__,e)>-1}var o=n(35);e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__,r=o(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}var o=n(35);e.exports=r},function(e,t,n){function r(){this.__data__={hash:new o,map:new(a||i),string:new o}}var o=n(207),i=n(34),a=n(100);e.exports=r},function(e,t,n){function r(e){return o(this,e)["delete"](e)}var o=n(38);e.exports=r},function(e,t,n){function r(e){return o(this,e).get(e)}var o=n(38);e.exports=r},function(e,t,n){function r(e){return o(this,e).has(e)}var o=n(38);e.exports=r},function(e,t,n){function r(e,t){return o(this,e).set(e,t),this}var o=n(38);e.exports=r},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}e.exports=n},function(e,t,n){function r(e,t){var n=e[1],r=t[1],v=n|r,m=v<(s|c|f),y=r==f&&n==p||r==f&&n==d&&e[7].length<=t[8]||r==(f|d)&&t[7].length<=t[8]&&n==p;if(!m&&!y)return e;r&s&&(e[2]=t[2],v|=n&s?0:l);var g=t[3];if(g){var b=e[3];e[3]=b?o(b,g,t[4]):g,e[4]=b?a(e[3],u):t[4]}return g=t[5],g&&(b=e[5],e[5]=b?i(b,g,t[6]):g,e[6]=b?a(e[5],u):t[6]),g=t[7],g&&(e[7]=g),r&f&&(e[8]=null==e[8]?t[8]:h(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=v,e}var o=n(112),i=n(113),a=n(25),u="__lodash_placeholder__",s=1,c=2,l=4,p=8,f=128,d=256,h=Math.min;e.exports=r},function(e,t){var n={};e.exports=n},function(e,t,n){function r(e,t){for(var n=e.length,r=a(t.length,n),u=o(e);r--;){var s=t[r];e[r]=i(s,n)?u[s]:void 0}return e}var o=n(62),i=n(39),a=Math.min;e.exports=r},function(e,t){function n(e){return this.__data__.set(e,r),this}var r="__lodash_hash_undefined__";e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t,n){function r(){this.__data__=new o}var o=n(34);e.exports=r},function(e,t){function n(e){return this.__data__["delete"](e)}e.exports=n},function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t,n){function r(e,t){var n=this.__data__;return n instanceof o&&n.__data__.length==a&&(n=this.__data__=new i(n.__data__)),n.set(e,t),this}var o=n(34),i=n(57),a=200;e.exports=r},function(e,t,n){function r(e){if(e instanceof o)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=a(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var o=n(56),i=n(99),a=n(62);e.exports=r},function(e,t,n){function r(e,t,n){var r=null==e?void 0:o(e,t);return void 0===r?n:r}var o=n(106);e.exports=r},function(e,t,n){function r(e,t){return null!=e&&i(e,t,o)}var o=n(215),i=n(241);e.exports=r},function(e,t,n){function r(e){return i(e)&&o(e)}var o=n(42),i=n(18);e.exports=r},function(e,t,n){function r(e,t,n){n="function"==typeof n?n:void 0;var r=n?n(e,t):void 0;return void 0===r?o(e,t,n):!!r}var o=n(60);e.exports=r},function(e,t,n){function r(e){return i(e)&&o(e.length)&&!!A[M.call(e)]}var o=n(43),i=n(18),a="[object Arguments]",u="[object Array]",s="[object Boolean]",c="[object Date]",l="[object Error]",p="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",v="[object RegExp]",m="[object Set]",y="[object String]",g="[object WeakMap]",b="[object ArrayBuffer]",_="[object DataView]",E="[object Float32Array]",x="[object Float64Array]",C="[object Int8Array]",w="[object Int16Array]",P="[object Int32Array]",S="[object Uint8Array]",O="[object Uint8ClampedArray]",T="[object Uint16Array]",R="[object Uint32Array]",A={};A[E]=A[x]=A[C]=A[w]=A[P]=A[S]=A[O]=A[T]=A[R]=!0,A[a]=A[u]=A[b]=A[s]=A[_]=A[c]=A[l]=A[p]=A[f]=A[d]=A[h]=A[v]=A[m]=A[y]=A[g]=!1;var k=Object.prototype,M=k.toString;e.exports=r},function(e,t,n){function r(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new(r.Cache||o),n}var o=n(57),i="Expected a function";r.Cache=o,e.exports=r},function(e,t){function n(){return Date.now()}e.exports=n},function(e,t,n){var r=n(116),o=n(37),i=n(25),a=n(131),u=64,s=a(function(e,t){var n=i(t,o(s));return r(e,u,void 0,t,n)});s.placeholder={},e.exports=s},function(e,t,n){function r(e){return a(e)?o(u(e)):i(e)}var o=n(109),i=n(222),a=n(40),u=n(26);e.exports=r},function(e,t,n){function r(e,t,n){var r=u(e)?o:a;return n&&s(e,t,n)&&(t=void 0),r(e,i(t,3))}var o=n(104),i=n(108),a=n(223),u=n(11),s=n(248);e.exports=r},function(e,t,n){function r(e){if(!e)return 0===e?e:0;if(e=o(e),e===i||e===-i){var t=e<0?-1:1;return t*a}return e===e?e:0}var o=n(287),i=1/0,a=1.7976931348623157e308;e.exports=r},function(e,t,n){function r(e){if("number"==typeof e)return e;if(a(e))return u;if(i(e)){var t=o(e.valueOf)?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=l.test(e);return n||p.test(e)?f(e.slice(2),n?2:8):c.test(e)?u:+e}var o=n(64),i=n(15),a=n(27),u=NaN,s=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,p=/^0o[0-7]+$/i,f=parseInt;e.exports=r},function(e,t,n){function r(e){return null==e?"":o(e)}var o=n(225);e.exports=r},function(e,t,n){function r(e){if(s(e)&&!u(e)&&!(e instanceof o)){if(e instanceof i)return e;if(p.call(e,"__wrapped__"))return c(e)}return new i(e)}var o=n(56),i=n(99),a=n(61),u=n(11),s=n(18),c=n(275),l=Object.prototype,p=l.hasOwnProperty;r.prototype=a.prototype,r.prototype.constructor=r,e.exports=r},function(e,t,n){"use strict";e.exports=n(310)},function(e,t,n){"use strict";e.exports=n(321)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0,t["default"]=void 0;var u=n(5),s=n(133),c=r(s),l=n(134),p=(r(l),function(e){function t(n,r){o(this,t);var a=i(this,e.call(this,n,r));return a.store=n.store,a}return a(t,e),t.prototype.getChildContext=function(){return{store:this.store}},t.prototype.render=function(){var e=this.props.children;return u.Children.only(e)},t}(u.Component));t["default"]=p,p.propTypes={store:c["default"].isRequired,children:u.PropTypes.element.isRequired},p.childContextTypes={store:c["default"].isRequired}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){return e.displayName||e.name||"Component"}function s(e,t){try{return e.apply(t)}catch(n){return O.value=n,O}}function c(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],c=Boolean(e),f=e||w,h=void 0;h="function"==typeof t?t:t?(0,y["default"])(t):P;var m=n||S,g=r.pure,b=void 0===g||g,_=r.withRef,x=void 0!==_&&_,R=b&&m!==S,A=T++;return function(e){function t(e,t,n){var r=m(e,t,n);return r}var n="Connect("+u(e)+")",r=function(r){function u(e,t){o(this,u);var a=i(this,r.call(this,e,t));a.version=A,a.store=e.store||t.store,(0,C["default"])(a.store,'Could not find "store" in either the context or '+('props of "'+n+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+n+'".'));var s=a.store.getState();return a.state={storeState:s},a.clearCache(),a}return a(u,r),u.prototype.shouldComponentUpdate=function(){return!b||this.haveOwnPropsChanged||this.hasStoreStateChanged},u.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),r=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n);return r},u.prototype.configureFinalMapState=function(e,t){var n=f(e.getState(),t),r="function"==typeof n;return this.finalMapStateToProps=r?n:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):n},u.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,r=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return r},u.prototype.configureFinalMapDispatch=function(e,t){var n=h(e.dispatch,t),r="function"==typeof n;return this.finalMapDispatchToProps=r?n:h,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):n},u.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return!(this.stateProps&&(0,v["default"])(e,this.stateProps)||(this.stateProps=e,0))},u.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return!(this.dispatchProps&&(0,v["default"])(e,this.dispatchProps)||(this.dispatchProps=e,0))},u.prototype.updateMergedPropsIfNeeded=function(){var e=t(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&R&&(0,v["default"])(e,this.mergedProps)||(this.mergedProps=e,0))},u.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},u.prototype.trySubscribe=function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},u.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},u.prototype.componentDidMount=function(){this.trySubscribe()},u.prototype.componentWillReceiveProps=function(e){b&&(0,v["default"])(e,this.props)||(this.haveOwnPropsChanged=!0)},u.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},u.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},u.prototype.handleChange=function(){if(this.unsubscribe){var e=this.store.getState(),t=this.state.storeState;if(!b||t!==e){if(b&&!this.doStatePropsDependOnOwnProps){var n=s(this.updateStatePropsIfNeeded,this);if(!n)return;n===O&&(this.statePropsPrecalculationError=O.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:e})}}},u.prototype.getWrappedInstance=function(){return(0,C["default"])(x,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},u.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,r=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,i=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var a=!0,u=!0;b&&i&&(a=n||t&&this.doStatePropsDependOnOwnProps,u=t&&this.doDispatchPropsDependOnOwnProps);var s=!1,c=!1;r?s=!0:a&&(s=this.updateStatePropsIfNeeded()),u&&(c=this.updateDispatchPropsIfNeeded());var f=!0;return f=!!(s||c||t)&&this.updateMergedPropsIfNeeded(),!f&&i?i:(x?this.renderedElement=(0,p.createElement)(e,l({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,p.createElement)(e,this.mergedProps),this.renderedElement)},u}(p.Component);return r.displayName=n,r.WrappedComponent=e,r.contextTypes={store:d["default"]},r.propTypes={store:d["default"]},(0,E["default"])(r,e)}}var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.__esModule=!0,t["default"]=c;var p=n(5),f=n(133),d=r(f),h=n(294),v=r(h),m=n(295),y=r(m),g=n(134),b=(r(g),n(65)),_=(r(b),n(98)),E=r(_),x=n(33),C=r(x),w=function(e){return{}},P=function(e){return{dispatch:e}},S=function(e,t,n){return l({},n,e,t)},O={value:null},T=0},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,i=0;i<n.length;i++)if(!o.call(t,n[i])||e[n[i]]!==t[n[i]])return!1;return!0}t.__esModule=!0,t["default"]=n},function(e,t,n){"use strict";function r(e){return function(t){return(0,o.bindActionCreators)(e,t)}}t.__esModule=!0,t["default"]=r;var o=n(175)},function(e,t,n){"use strict";var r=n(4),o=n(95),i={focusDOMComponent:function(){o(r.getNodeFromInstance(this))}};e.exports=i},function(e,t,n){"use strict";function r(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function o(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function i(e){switch(e){case T.topCompositionStart:return R.compositionStart;case T.topCompositionEnd:return R.compositionEnd;case T.topCompositionUpdate:return R.compositionUpdate}}function a(e,t){return e===T.topKeyDown&&t.keyCode===E}function u(e,t){switch(e){case T.topKeyUp:return _.indexOf(t.keyCode)!==-1;case T.topKeyDown:return t.keyCode!==E;case T.topKeyPress:case T.topMouseDown:case T.topBlur:return!0;default:return!1}}function s(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function c(e,t,n,r){var o,c;if(x?o=i(e):k?u(e,n)&&(o=R.compositionEnd):a(e,n)&&(o=R.compositionStart),!o)return null;P&&(k||o!==R.compositionStart?o===R.compositionEnd&&k&&(c=k.getData()):k=m.getPooled(r));var l=y.getPooled(o,t,n,r);if(c)l.data=c;else{var p=s(n);null!==p&&(l.data=p)}return h.accumulateTwoPhaseDispatches(l),l}function l(e,t){switch(e){case T.topCompositionEnd:return s(t);case T.topKeyPress:var n=t.which;return n!==S?null:(A=!0,O);case T.topTextInput:var r=t.data;return r===O&&A?null:r;default:return null}}function p(e,t){if(k){if(e===T.topCompositionEnd||u(e,t)){var n=k.getData();return m.release(k),k=null,n}return null}switch(e){case T.topPaste:return null;case T.topKeyPress:return t.which&&!o(t)?String.fromCharCode(t.which):null;case T.topCompositionEnd:return P?null:t.data;default:return null}}function f(e,t,n,r){var o;if(o=w?l(e,n):p(e,n),!o)return null;var i=g.getPooled(R.beforeInput,t,n,r);return i.data=o,h.accumulateTwoPhaseDispatches(i),i}var d=n(12),h=n(29),v=n(6),m=n(303),y=n(342),g=n(345),b=n(14),_=[9,13,27,32],E=229,x=v.canUseDOM&&"CompositionEvent"in window,C=null;v.canUseDOM&&"documentMode"in document&&(C=document.documentMode);var w=v.canUseDOM&&"TextEvent"in window&&!C&&!r(),P=v.canUseDOM&&(!x||C&&C>8&&C<=11),S=32,O=String.fromCharCode(S),T=d.topLevelTypes,R={beforeInput:{phasedRegistrationNames:{bubbled:b({onBeforeInput:null}),captured:b({onBeforeInputCapture:null})},dependencies:[T.topCompositionEnd,T.topKeyPress,T.topTextInput,T.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:b({onCompositionEnd:null}),captured:b({onCompositionEndCapture:null})},dependencies:[T.topBlur,T.topCompositionEnd,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:b({onCompositionStart:null}),captured:b({onCompositionStartCapture:null})},dependencies:[T.topBlur,T.topCompositionStart,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:b({onCompositionUpdate:null}),captured:b({onCompositionUpdateCapture:null})},dependencies:[T.topBlur,T.topCompositionUpdate,T.topKeyDown,T.topKeyPress,T.topKeyUp,T.topMouseDown]}},A=!1,k=null,M={eventTypes:R,extractEvents:function(e,t,n,r){return[c(e,t,n,r),f(e,t,n,r)]}};e.exports=M},function(e,t,n){"use strict";var r=n(135),o=n(6),i=(n(7),n(194),n(351)),a=n(200),u=n(203),s=(n(2),u(function(e){return a(e)})),c=!1,l="cssFloat";if(o.canUseDOM){var p=document.createElement("div").style;try{p.font=""}catch(f){c=!0}void 0===document.documentElement.style.cssFloat&&(l="styleFloat")}var d={createMarkupForStyles:function(e,t){var n="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];null!=o&&(n+=s(r)+":",n+=i(r,o,t)+";")}return n||null},setValueForStyles:function(e,t,n){var o=e.style;for(var a in t)if(t.hasOwnProperty(a)){var u=i(a,t[a],n);if("float"!==a&&"cssFloat"!==a||(a=l),u)o[a]=u;else{var s=c&&r.shorthandPropertyExpansions[a];if(s)for(var p in s)o[p]="";else o[a]=""}}}};e.exports=d},function(e,t,n){"use strict";function r(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"===t||"input"===t&&"file"===e.type}function o(e){var t=w.getPooled(A.change,M,e,P(e));_.accumulateTwoPhaseDispatches(t),C.batchedUpdates(i,t)}function i(e){b.enqueueEvents(e),b.processEventQueue(!1)}function a(e,t){k=e,M=t,k.attachEvent("onchange",o)}function u(){k&&(k.detachEvent("onchange",o),k=null,M=null)}function s(e,t){if(e===R.topChange)return t}function c(e,t,n){e===R.topFocus?(u(),a(t,n)):e===R.topBlur&&u()}function l(e,t){k=e,M=t,N=e.value,I=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(k,"value",D),k.attachEvent?k.attachEvent("onpropertychange",f):k.addEventListener("propertychange",f,!1)}function p(){k&&(delete k.value,k.detachEvent?k.detachEvent("onpropertychange",f):k.removeEventListener("propertychange",f,!1),k=null,M=null,N=null,I=null)}function f(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==N&&(N=t,o(e))}}function d(e,t){if(e===R.topInput)return t}function h(e,t,n){e===R.topFocus?(p(),l(t,n)):e===R.topBlur&&p()}function v(e,t){if((e===R.topSelectionChange||e===R.topKeyUp||e===R.topKeyDown)&&k&&k.value!==N)return N=k.value,M}function m(e){return e.nodeName&&"input"===e.nodeName.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)}function y(e,t){if(e===R.topClick)return t}var g=n(12),b=n(28),_=n(29),E=n(6),x=n(4),C=n(10),w=n(13),P=n(83),S=n(85),O=n(163),T=n(14),R=g.topLevelTypes,A={change:{phasedRegistrationNames:{bubbled:T({onChange:null}),captured:T({onChangeCapture:null})},dependencies:[R.topBlur,R.topChange,R.topClick,R.topFocus,R.topInput,R.topKeyDown,R.topKeyUp,R.topSelectionChange]}},k=null,M=null,N=null,I=null,j=!1;E.canUseDOM&&(j=S("change")&&(!("documentMode"in document)||document.documentMode>8));var F=!1;E.canUseDOM&&(F=S("input")&&(!("documentMode"in document)||document.documentMode>11));var D={get:function(){return I.get.call(this)},set:function(e){N=""+e,I.set.call(this,e)}},L={eventTypes:A,extractEvents:function(e,t,n,o){var i,a,u=t?x.getNodeFromInstance(t):window;if(r(u)?j?i=s:a=c:O(u)?F?i=d:(i=v,a=h):m(u)&&(i=y),i){var l=i(e,t);if(l){var p=w.getPooled(A.change,l,n,o);return p.type="change",_.accumulateTwoPhaseDispatches(p),p}}a&&a(e,u,t)}};e.exports=L},function(e,t,n){"use strict";function r(e){return e.substring(1,e.indexOf(" "))}var o=n(23),i=n(6),a=n(197),u=n(9),s=n(97),c=n(1),l=/^(<[^ \/>]+)/,p="data-danger-index",f={dangerouslyRenderMarkup:function(e){i.canUseDOM?void 0:c(!1);for(var t,n={},o=0;o<e.length;o++)e[o]?void 0:c(!1),t=r(e[o]),t=s(t)?t:"*",n[t]=n[t]||[],n[t][o]=e[o];var f=[],d=0;for(t in n)if(n.hasOwnProperty(t)){var h,v=n[t];for(h in v)if(v.hasOwnProperty(h)){var m=v[h];v[h]=m.replace(l,"$1 "+p+'="'+h+'" ')}for(var y=a(v.join(""),u),g=0;g<y.length;++g){var b=y[g];b.hasAttribute&&b.hasAttribute(p)&&(h=+b.getAttribute(p),b.removeAttribute(p),f.hasOwnProperty(h)?c(!1):void 0,f[h]=b,d+=1)}}return d!==f.length?c(!1):void 0,f.length!==e.length?c(!1):void 0,f},dangerouslyReplaceNodeWithMarkup:function(e,t){if(i.canUseDOM?void 0:c(!1),t?void 0:c(!1),"HTML"===e.nodeName?c(!1):void 0,"string"==typeof t){var n=a(t,u)[0];e.parentNode.replaceChild(n,e)}else o.replaceChildWithTree(e,t)}};e.exports=f},function(e,t,n){"use strict";var r=n(14),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null})];e.exports=o},function(e,t,n){"use strict";var r=n(12),o=n(29),i=n(4),a=n(50),u=n(14),s=r.topLevelTypes,c={mouseEnter:{registrationName:u({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:u({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},l={eventTypes:c,extractEvents:function(e,t,n,r){if(e===s.topMouseOver&&(n.relatedTarget||n.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var u;if(r.window===r)u=r;else{var l=r.ownerDocument;u=l?l.defaultView||l.parentWindow:window}var p,f;if(e===s.topMouseOut){p=t;var d=n.relatedTarget||n.toElement;f=d?i.getClosestInstanceFromNode(d):null}else p=null,f=t;if(p===f)return null;var h=null==p?u:i.getNodeFromInstance(p),v=null==f?u:i.getNodeFromInstance(f),m=a.getPooled(c.mouseLeave,p,n,r);m.type="mouseleave",m.target=h,m.relatedTarget=v;var y=a.getPooled(c.mouseEnter,f,n,r);return y.type="mouseenter",y.target=v,y.relatedTarget=h,o.accumulateEnterLeaveDispatches(m,y,p,f),[m,y]}};e.exports=l},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(3),i=n(16),a=n(162);o(r.prototype,{destructor:function(){this._root=null,this._startText=null,this._fallbackText=null},getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);var u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";var r=n(19),o=r.injection.MUST_USE_PROPERTY,i=r.injection.HAS_BOOLEAN_VALUE,a=r.injection.HAS_SIDE_EFFECTS,u=r.injection.HAS_NUMERIC_VALUE,s=r.injection.HAS_POSITIVE_NUMERIC_VALUE,c=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE,l={isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+r.ATTRIBUTE_NAME_CHAR+"]*$")),Properties:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:i,allowTransparency:0,alt:0,async:i,autoComplete:0,autoPlay:i,capture:i,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:o|i,cite:0,classID:0,className:0,cols:s,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:i,coords:0,crossOrigin:0,data:0,dateTime:0,"default":i,defer:i,dir:0,disabled:i,download:c,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:i,formTarget:0,frameBorder:0,headers:0,height:0,hidden:i,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:i,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:o|i,muted:o|i,name:0,nonce:0,noValidate:i,open:i,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,radioGroup:0,readOnly:i,rel:0,required:i,reversed:i,role:0,rows:s,rowSpan:u,sandbox:0,scope:0,scoped:i,scrolling:0,seamless:i,selected:o|i,shape:0,size:s,sizes:0,span:s,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:u,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:o|a,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,"typeof":0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:i,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{}};e.exports=l},function(e,t,n){"use strict";function r(e,t,n){var r=void 0===e[n];null!=t&&r&&(e[n]=i(t))}var o=n(21),i=n(84),a=(n(73),n(87)),u=n(88),s=(n(2),{instantiateChildren:function(e,t,n){if(null==e)return null;var o={};return u(e,r,o),o},updateChildren:function(e,t,n,r,u){if(t||e){var s,c;for(s in t)if(t.hasOwnProperty(s)){c=e&&e[s];var l=c&&c._currentElement,p=t[s];if(null!=c&&a(l,p))o.receiveComponent(c,p,r,u),t[s]=c;else{c&&(n[s]=o.getNativeNode(c),o.unmountComponent(c,!1));var f=i(p);t[s]=f}}for(s in e)!e.hasOwnProperty(s)||t&&t.hasOwnProperty(s)||(c=e[s],n[s]=o.getNativeNode(c),o.unmountComponent(c,!1))}},unmountChildren:function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];o.unmountComponent(r,t)}}});e.exports=s},function(e,t,n){"use strict";function r(e){return(""+e).replace(_,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);y(e,i,r),o.release(r)}function u(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function s(e,t,n){var o=e.result,i=e.keyPrefix,a=e.func,u=e.context,s=a.call(u,t,e.count++);Array.isArray(s)?c(s,o,n,m.thatReturnsArgument):null!=s&&(v.isValidElement(s)&&(s=v.cloneAndReplaceKey(s,i+(!s.key||t&&t.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function c(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=u.getPooled(t,a,o,i);y(e,s,c),u.release(c)}function l(e,t,n){if(null==e)return e;var r=[];return c(e,r,null,t,n),r}function p(e,t,n){return null}function f(e,t){return y(e,p,null)}function d(e){var t=[];return c(e,t,null,m.thatReturnsArgument),t}var h=n(16),v=n(17),m=n(9),y=n(88),g=h.twoArgumentPooler,b=h.fourArgumentPooler,_=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,g),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null, this.context=null,this.count=0},h.addPoolingTo(u,b);var E={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:f,toArray:d};e.exports=E},function(e,t,n){"use strict";function r(e,t){var n=x.hasOwnProperty(t)?x[t]:null;w.hasOwnProperty(t)&&(n!==_.OVERRIDE_BASE?m(!1):void 0),e&&(n!==_.DEFINE_MANY&&n!==_.DEFINE_MANY_MERGED?m(!1):void 0)}function o(e,t){if(t){"function"==typeof t?m(!1):void 0,d.isValidElement(t)?m(!1):void 0;var n=e.prototype,o=n.__reactAutoBindPairs;t.hasOwnProperty(b)&&C.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==b){var a=t[i],c=n.hasOwnProperty(i);if(r(c,i),C.hasOwnProperty(i))C[i](e,a);else{var l=x.hasOwnProperty(i),p="function"==typeof a,f=p&&!l&&!c&&t.autobind!==!1;if(f)o.push(i,a),n[i]=a;else if(c){var h=x[i];!l||h!==_.DEFINE_MANY_MERGED&&h!==_.DEFINE_MANY?m(!1):void 0,h===_.DEFINE_MANY_MERGED?n[i]=u(n[i],a):h===_.DEFINE_MANY&&(n[i]=s(n[i],a))}else n[i]=a}}}}function i(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in C;o?m(!1):void 0;var i=n in e;i?m(!1):void 0,e[n]=r}}}function a(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:m(!1);for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?m(!1):void 0,e[n]=t[n]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return a(o,n),a(o,r),o}}function s(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function c(e,t){var n=t.bind(e);return n}function l(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=c(e,o)}}var p=n(3),f=n(308),d=n(17),h=(n(79),n(78),n(152)),v=n(24),m=n(1),y=n(32),g=n(14),b=(n(2),g({mixins:null})),_=y({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),E=[],x={mixins:_.DEFINE_MANY,statics:_.DEFINE_MANY,propTypes:_.DEFINE_MANY,contextTypes:_.DEFINE_MANY,childContextTypes:_.DEFINE_MANY,getDefaultProps:_.DEFINE_MANY_MERGED,getInitialState:_.DEFINE_MANY_MERGED,getChildContext:_.DEFINE_MANY_MERGED,render:_.DEFINE_ONCE,componentWillMount:_.DEFINE_MANY,componentDidMount:_.DEFINE_MANY,componentWillReceiveProps:_.DEFINE_MANY,shouldComponentUpdate:_.DEFINE_ONCE,componentWillUpdate:_.DEFINE_MANY,componentDidUpdate:_.DEFINE_MANY,componentWillUnmount:_.DEFINE_MANY,updateComponent:_.OVERRIDE_BASE},C={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)o(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=p({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=p({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=p({},e.propTypes,t)},statics:function(e,t){i(e,t)},autobind:function(){}},w={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e),t&&this.updater.enqueueCallback(this,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},P=function(){};p(P.prototype,f.prototype,w);var S={createClass:function(e){var t=function(e,t,n){this.__reactAutoBindPairs.length&&l(this),this.props=e,this.context=t,this.refs=v,this.updater=n||h,this.state=null;var r=this.getInitialState?this.getInitialState():null;"object"!=typeof r||Array.isArray(r)?m(!1):void 0,this.state=r};t.prototype=new P,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],E.forEach(o.bind(null,t)),o(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:m(!1);for(var n in x)t.prototype[n]||(t.prototype[n]=null);return t},injection:{injectMixin:function(e){E.push(e)}}};e.exports=S},function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=i,this.updater=n||o}var o=n(152),i=(n(7),n(158),n(24)),a=n(1);n(2),r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?a(!1):void 0,this.updater.enqueueSetState(this,e),t&&this.updater.enqueueCallback(this,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this),e&&this.updater.enqueueCallback(this,e,"forceUpdate")},e.exports=r},function(e,t,n){"use strict";function r(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}function o(e){}function i(e,t){}function a(e){return e.prototype&&e.prototype.isReactComponent}var u=n(3),s=n(75),c=n(20),l=n(17),p=n(76),f=n(77),d=(n(7),n(151)),h=n(79),v=(n(78),n(21)),m=n(154),y=n(24),g=n(1),b=n(87);n(2),o.prototype.render=function(){var e=f.get(this)._currentElement.type,t=e(this.props,this.context,this.updater);return i(e,t),t};var _=1,E={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._nativeParent=null,this._nativeContainerInfo=null,this._updateBatchNumber=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedNodeType=null,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._topLevelWrapper=null,this._pendingCallbacks=null,this._calledComponentWillUnmount=!1},mountComponent:function(e,t,n,r){this._context=r,this._mountOrder=_++,this._nativeParent=t,this._nativeContainerInfo=n;var u,s=this._processProps(this._currentElement.props),c=this._processContext(r),p=this._currentElement.type,d=this._constructComponent(s,c);a(p)||null!=d&&null!=d.render||(u=d,i(p,u),null===d||d===!1||l.isValidElement(d)?void 0:g(!1),d=new o(p)),d.props=s,d.context=c,d.refs=y,d.updater=m,this._instance=d,f.set(d,this);var h=d.state;void 0===h&&(d.state=h=null),"object"!=typeof h||Array.isArray(h)?g(!1):void 0,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var v;return v=d.unstable_handleError?this.performInitialMountWithErrorHandling(u,t,n,e,r):this.performInitialMount(u,t,n,e,r),d.componentDidMount&&e.getReactMountReady().enqueue(d.componentDidMount,d),v},_constructComponent:function(e,t){return this._constructComponentWithoutOwner(e,t)},_constructComponentWithoutOwner:function(e,t){var n,r=this._currentElement.type;return n=a(r)?new r(e,t,m):r(e,t,m)},performInitialMountWithErrorHandling:function(e,t,n,r,o){var i,a=r.checkpoint();try{i=this.performInitialMount(e,t,n,r,o)}catch(u){r.rollback(a),this._instance.unstable_handleError(u),this._pendingStateQueue&&(this._instance.state=this._processPendingState(this._instance.props,this._instance.context)),a=r.checkpoint(),this._renderedComponent.unmountComponent(!0),r.rollback(a),i=this.performInitialMount(e,t,n,r,o)}return i},performInitialMount:function(e,t,n,r,o){var i=this._instance;i.componentWillMount&&(i.componentWillMount(),this._pendingStateQueue&&(i.state=this._processPendingState(i.props,i.context))),void 0===e&&(e=this._renderValidatedComponent()),this._renderedNodeType=d.getType(e),this._renderedComponent=this._instantiateReactComponent(e);var a=v.mountComponent(this._renderedComponent,r,t,n,this._processChildContext(o));return a},getNativeNode:function(){return v.getNativeNode(this._renderedComponent)},unmountComponent:function(e){if(this._renderedComponent){var t=this._instance;if(t.componentWillUnmount&&!t._calledComponentWillUnmount)if(t._calledComponentWillUnmount=!0,e){var n=this.getName()+".componentWillUnmount()";p.invokeGuardedCallback(n,t.componentWillUnmount.bind(t))}else t.componentWillUnmount();this._renderedComponent&&(v.unmountComponent(this._renderedComponent,e),this._renderedNodeType=null,this._renderedComponent=null,this._instance=null),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,this._topLevelWrapper=null,f.remove(t)}},_maskContext:function(e){var t=this._currentElement.type,n=t.contextTypes;if(!n)return y;var r={};for(var o in n)r[o]=e[o];return r},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._currentElement.type,n=this._instance,r=n.getChildContext&&n.getChildContext();if(r){"object"!=typeof t.childContextTypes?g(!1):void 0;for(var o in r)o in t.childContextTypes?void 0:g(!1);return u({},e,r)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,n){var o=this.getName();for(var i in e)if(e.hasOwnProperty(i)){var a;try{"function"!=typeof e[i]?g(!1):void 0,a=e[i](t,i,o,n)}catch(u){a=u}a instanceof Error&&(r(this),n===h.prop)}},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement?v.receiveComponent(this,this._pendingElement,e,this._context):null!==this._pendingStateQueue||this._pendingForceUpdate?this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context):this._updateBatchNumber=null},updateComponent:function(e,t,n,r,o){var i,a,u=this._instance,s=!1;this._context===o?i=u.context:(i=this._processContext(o),s=!0),t===n?a=n.props:(a=this._processProps(n.props),s=!0),s&&u.componentWillReceiveProps&&u.componentWillReceiveProps(a,i);var c=this._processPendingState(a,i),l=!0;!this._pendingForceUpdate&&u.shouldComponentUpdate&&(l=u.shouldComponentUpdate(a,c,i)),this._updateBatchNumber=null,l?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,a,c,i,e,o)):(this._currentElement=n,this._context=o,u.props=a,u.state=c,u.context=i)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var i=u({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var s=r[a];u(i,"function"==typeof s?s.call(n,i,e,t):s)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var a,u,s,c=this._instance,l=Boolean(c.componentDidUpdate);l&&(a=c.props,u=c.state,s=c.context),c.componentWillUpdate&&c.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,c.props=t,c.state=n,c.context=r,this._updateRenderedComponent(o,i),l&&o.getReactMountReady().enqueue(c.componentDidUpdate.bind(c,a,u,s),c)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(b(r,o))v.receiveComponent(n,o,e,this._processChildContext(t));else{var i=v.getNativeNode(n);v.unmountComponent(n,!1),this._renderedNodeType=d.getType(o),this._renderedComponent=this._instantiateReactComponent(o);var a=v.mountComponent(this._renderedComponent,e,this._nativeParent,this._nativeContainerInfo,this._processChildContext(t));this._replaceNodeWithMarkup(i,a,n)}},_replaceNodeWithMarkup:function(e,t,n){s.replaceNodeWithMarkup(e,t,n)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e;c.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{c.current=null}return null===e||e===!1||l.isValidElement(e)?void 0:g(!1),e},attachRef:function(e,t){var n=this.getPublicInstance();null==n?g(!1):void 0;var r=t.getPublicInstance(),o=n.refs===y?n.refs={}:n.refs;o[e]=r},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){var e=this._instance;return e instanceof o?null:e},_instantiateReactComponent:null},x={Mixin:E};e.exports=x},function(e,t,n){"use strict";var r=n(4),o=n(143),i=n(148),a=n(21),u=n(10),s=n(155),c=n(352),l=n(161),p=n(358);n(2),o.inject();var f={findDOMNode:c,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:s,unstable_batchedUpdates:u.batchedUpdates,unstable_renderSubtreeIntoContainer:p};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(e){return e._renderedComponent&&(e=l(e)),e?r.getNodeFromInstance(e):null}},Mount:i,Reconciler:a}),e.exports=f},function(e,t,n){"use strict";var r=n(47),o={getNativeProps:r.getNativeProps};e.exports=o},function(e,t,n){"use strict";function r(e,t){t&&($[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?I(!1):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?I(!1):void 0,"object"==typeof t.dangerouslySetInnerHTML&&q in t.dangerouslySetInnerHTML?void 0:I(!1)),null!=t.style&&"object"!=typeof t.style?I(!1):void 0)}function o(e,t,n,r){if(!(r instanceof M)){var o=e._nativeContainerInfo,a=o._node&&o._node.nodeType===z,u=a?o._node:o._ownerDocument;U(t,u),r.getReactMountReady().enqueue(i,{inst:e,registrationName:t,listener:n})}}function i(){var e=this;_.putListener(e.inst,e.registrationName,e.listener)}function a(){var e=this;T.postMountWrapper(e)}function u(){var e=this;e._rootNodeID?void 0:I(!1);var t=L(e);switch(t?void 0:I(!1),e._tag){case"iframe":case"object":e._wrapperState.listeners=[x.trapBubbledEvent(b.topLevelTypes.topLoad,"load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in Y)Y.hasOwnProperty(n)&&e._wrapperState.listeners.push(x.trapBubbledEvent(b.topLevelTypes[n],Y[n],t));break;case"img":e._wrapperState.listeners=[x.trapBubbledEvent(b.topLevelTypes.topError,"error",t),x.trapBubbledEvent(b.topLevelTypes.topLoad,"load",t)];break;case"form":e._wrapperState.listeners=[x.trapBubbledEvent(b.topLevelTypes.topReset,"reset",t),x.trapBubbledEvent(b.topLevelTypes.topSubmit,"submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[x.trapBubbledEvent(b.topLevelTypes.topInvalid,"invalid",t)]}}function s(){R.postUpdateWrapper(this)}function c(e){Z.call(Q,e)||(X.test(e)?void 0:I(!1),Q[e]=!0)}function l(e,t){return e.indexOf("-")>=0||null!=t.is}function p(e){var t=e.type;c(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._nativeNode=null,this._nativeParent=null,this._rootNodeID=null,this._domID=null,this._nativeContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var f=n(3),d=n(296),h=n(298),v=n(23),m=n(137),y=n(19),g=n(71),b=n(12),_=n(28),E=n(48),x=n(49),C=n(138),w=n(311),P=n(139),S=n(4),O=n(317),T=n(319),R=n(141),A=n(323),k=(n(7),n(330)),M=n(153),N=(n(9),n(52)),I=n(1),j=(n(85),n(14)),F=(n(54),n(89),n(2),P),D=_.deleteListener,L=S.getNodeFromInstance,U=x.listenTo,V=E.registrationNameModules,B={string:!0,number:!0},W=j({style:null}),q=j({__html:null}),H={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},z=11,Y={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},K={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},G={listing:!0,pre:!0,textarea:!0},$=f({menuitem:!0},K),X=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Q={},Z={}.hasOwnProperty,J=1;p.displayName="ReactDOMComponent",p.Mixin={mountComponent:function(e,t,n,o){this._rootNodeID=J++,this._domID=n._idCounter++,this._nativeParent=t,this._nativeContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(u,this);break;case"button":i=w.getNativeProps(this,i,t);break;case"input":O.mountWrapper(this,i,t),i=O.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this);break;case"option":T.mountWrapper(this,i,t),i=T.getNativeProps(this,i);break;case"select":R.mountWrapper(this,i,t),i=R.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this);break;case"textarea":A.mountWrapper(this,i,t),i=A.getNativeProps(this,i),e.getReactMountReady().enqueue(u,this)}r(this,i);var s,c;null!=t?(s=t._namespaceURI,c=t._tag):n._tag&&(s=n._namespaceURI,c=n._tag),(null==s||s===m.svg&&"foreignobject"===c)&&(s=m.html),s===m.html&&("svg"===this._tag?s=m.svg:"math"===this._tag&&(s=m.mathml)),this._namespaceURI=s;var l;if(e.useCreateElement){var p,f=n._ownerDocument;if(s===m.html)if("script"===this._tag){var h=f.createElement("div"),y=this._currentElement.type;h.innerHTML="<"+y+"></"+y+">",p=h.removeChild(h.firstChild)}else p=f.createElement(this._currentElement.type,i.is||null);else p=f.createElementNS(s,this._currentElement.type);S.precacheNode(this,p),this._flags|=F.hasCachedChildNodes,this._nativeParent||g.setAttributeForRoot(p),this._updateDOMProperties(null,i,e);var b=v(p);this._createInitialChildren(e,i,o,b),l=b}else{var _=this._createOpenTagMarkupAndPutListeners(e,i),E=this._createContentMarkup(e,i,o);l=!E&&K[this._tag]?_+"/>":_+">"+E+"</"+this._currentElement.type+">"}switch(this._tag){case"button":case"input":case"select":case"textarea":i.autoFocus&&e.getReactMountReady().enqueue(d.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(a,this)}return l},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(V.hasOwnProperty(r))i&&o(this,r,i,e);else{r===W&&(i&&(i=this._previousStyleCopy=f({},t.style)),i=h.createMarkupForStyles(i,this));var a=null;null!=this._tag&&l(this._tag,t)?H.hasOwnProperty(r)||(a=g.createMarkupForCustomAttribute(r,i)):a=g.createMarkupForProperty(r,i),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._nativeParent||(n+=" "+g.createMarkupForRoot()),n+=" "+g.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=B[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)r=N(i);else if(null!=a){var u=this.mountChildren(a,e,n);r=u.join("")}}return G[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var o=t.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&v.queueHTML(r,o.__html);else{var i=B[typeof t.children]?t.children:null,a=null!=i?null:t.children;if(null!=i)v.queueText(r,i);else if(null!=a)for(var u=this.mountChildren(a,e,n),s=0;s<u.length;s++)v.queueChild(r,u[s])}},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,o){var i=t.props,a=this._currentElement.props;switch(this._tag){case"button":i=w.getNativeProps(this,i),a=w.getNativeProps(this,a);break;case"input":O.updateWrapper(this),i=O.getNativeProps(this,i),a=O.getNativeProps(this,a);break;case"option":i=T.getNativeProps(this,i),a=T.getNativeProps(this,a);break;case"select":i=R.getNativeProps(this,i),a=R.getNativeProps(this,a);break;case"textarea":A.updateWrapper(this),i=A.getNativeProps(this,i),a=A.getNativeProps(this,a)}r(this,a),this._updateDOMProperties(i,a,e),this._updateDOMChildren(i,a,e,o),"select"===this._tag&&e.getReactMountReady().enqueue(s,this)},_updateDOMProperties:function(e,t,n){var r,i,a;for(r in e)if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&null!=e[r])if(r===W){var u=this._previousStyleCopy;for(i in u)u.hasOwnProperty(i)&&(a=a||{},a[i]="");this._previousStyleCopy=null}else V.hasOwnProperty(r)?e[r]&&D(this,r):(y.properties[r]||y.isCustomAttribute(r))&&g.deleteValueForProperty(L(this),r);for(r in t){var s=t[r],c=r===W?this._previousStyleCopy:null!=e?e[r]:void 0;if(t.hasOwnProperty(r)&&s!==c&&(null!=s||null!=c))if(r===W)if(s?s=this._previousStyleCopy=f({},s):this._previousStyleCopy=null,c){for(i in c)!c.hasOwnProperty(i)||s&&s.hasOwnProperty(i)||(a=a||{},a[i]="");for(i in s)s.hasOwnProperty(i)&&c[i]!==s[i]&&(a=a||{},a[i]=s[i])}else a=s;else if(V.hasOwnProperty(r))s?o(this,r,s,n):c&&D(this,r);else if(l(this._tag,t))H.hasOwnProperty(r)||g.setValueForAttribute(L(this),r,s);else if(y.properties[r]||y.isCustomAttribute(r)){var p=L(this);null!=s?g.setValueForProperty(p,r,s):g.deleteValueForProperty(p,r)}}a&&h.setValueForStyles(L(this),a,this)},_updateDOMChildren:function(e,t,n,r){var o=B[typeof e.children]?e.children:null,i=B[typeof t.children]?t.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,c=null!=i?null:t.children,l=null!=o||null!=a,p=null!=i||null!=u;null!=s&&null==c?this.updateChildren(null,n,r):l&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=u?a!==u&&this.updateMarkup(""+u):null!=c&&this.updateChildren(c,n,r)},getNativeNode:function(){return L(this)},unmountComponent:function(e){switch(this._tag){case"iframe":case"object":case"img":case"form":case"video":case"audio":var t=this._wrapperState.listeners;if(t)for(var n=0;n<t.length;n++)t[n].remove();break;case"html":case"head":case"body":I(!1)}this.unmountChildren(e),S.uncacheNode(this),_.deleteAllListeners(this),C.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._domID=null,this._wrapperState=null},getPublicInstance:function(){return L(this)}},f(p.prototype,p.Mixin,k.Mixin),e.exports=p},function(e,t,n){"use strict";function r(e,t,n,r,o,i){}var o=n(325),i=(n(2),[]),a={addDevtool:function(e){i.push(e)},removeDevtool:function(e){for(var t=0;t<i.length;t++)i[t]===e&&(i.splice(t,1),t--)},onCreateMarkupForProperty:function(e,t){r("onCreateMarkupForProperty",e,t)},onSetValueForProperty:function(e,t,n){r("onSetValueForProperty",e,t,n)},onDeleteValueForProperty:function(e,t){r("onDeleteValueForProperty",e,t)}};a.addDevtool(o),e.exports=a},function(e,t,n){"use strict";var r=n(3),o=n(23),i=n(4),a=function(e){this._currentElement=null,this._nativeNode=null,this._nativeParent=null,this._nativeContainerInfo=null,this._domID=null};r(a.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++;this._domID=a,this._nativeParent=t,this._nativeContainerInfo=n;var u=" react-empty: "+this._domID+" ";if(e.useCreateElement){var s=n._ownerDocument,c=s.createComment(u);return i.precacheNode(this,c),o(c)}return e.renderToStaticMarkup?"":"<!--"+u+"-->"},receiveComponent:function(){},getNativeNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),e.exports=a},function(e,t){"use strict";var n={useCreateElement:!0};e.exports=n},function(e,t,n){"use strict";var r=n(70),o=n(4),i={dangerouslyProcessChildrenUpdates:function(e,t){var n=o.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=i},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);l.asap(r,this);var o=t.name;if("radio"===t.type&&null!=o){for(var i=c.getNodeFromInstance(this),a=i;a.parentNode;)a=a.parentNode;for(var u=a.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),f=0;f<u.length;f++){var d=u[f];if(d!==i&&d.form===i.form){var h=c.getInstanceFromNode(d);h?void 0:p(!1),l.asap(r,h)}}}return n}var i=n(3),a=n(47),u=n(71),s=n(74),c=n(4),l=n(10),p=n(1),f=(n(2),{getNativeProps:function(e,t){var n=s.getValue(t),r=s.getChecked(t),o=i({type:void 0},a.getNativeProps(e,t),{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked,onChange:e._wrapperState.onChange});return o},mountWrapper:function(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:t.defaultChecked||!1,initialValue:null!=n?n:null,listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=t.checked;null!=n&&u.setValueForProperty(c.getNodeFromInstance(e),"checked",n||!1);var r=s.getValue(t);null!=r&&u.setValueForProperty(c.getNodeFromInstance(e),"value",""+r)}});e.exports=f},function(e,t,n){"use strict";var r=n(313);e.exports={debugTool:r}},function(e,t,n){"use strict";var r=n(3),o=n(306),i=n(4),a=n(141),u=(n(2),{mountWrapper:function(e,t,n){var r=null;if(null!=n){var o=n;"optgroup"===o._tag&&(o=o._nativeParent),null!=o&&"select"===o._tag&&(r=a.getSelectValueContext(o))}var i=null;if(null!=r)if(i=!1,Array.isArray(r)){for(var u=0;u<r.length;u++)if(""+r[u]==""+t.value){i=!0;break}}else i=""+r==""+t.value;e._wrapperState={selected:i}},postMountWrapper:function(e){var t=e._currentElement.props;if(null!=t.value){var n=i.getNodeFromInstance(e);n.setAttribute("value",t.value)}},getNativeProps:function(e,t){var n=r({selected:void 0,children:void 0},t);null!=e._wrapperState.selected&&(n.selected=e._wrapperState.selected);var i="";return o.forEach(t.children,function(e){null!=e&&("string"!=typeof e&&"number"!=typeof e||(i+=e))}),i&&(n.children=i),n}});e.exports=u},function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function i(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,u=t.getRangeAt(0);try{u.startContainer.nodeType,u.endContainer.nodeType}catch(s){return null}var c=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),l=c?0:u.toString().length,p=u.cloneRange();p.selectNodeContents(e),p.setEnd(u.startContainer,u.startOffset);var f=r(p.startContainer,p.startOffset,p.endContainer,p.endOffset),d=f?0:p.toString().length,h=d+l,v=document.createRange();v.setStart(n,o),v.setEnd(i,a);var m=v.collapsed;return{start:m?h:d,end:m?d:h}}function a(e,t){var n,r,o=document.selection.createRange().duplicate();void 0===t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function u(e,t){if(window.getSelection){var n=window.getSelection(),r=e[l()].length,o=Math.min(t.start,r),i=void 0===t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var u=c(e,o),s=c(e,i);if(u&&s){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(s.node,s.offset)):(p.setEnd(s.node,s.offset),n.addRange(p))}}}var s=n(6),c=n(355),l=n(162),p=s.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:p?o:i,setOffsets:p?a:u};e.exports=f},function(e,t,n){"use strict";var r=n(143),o=n(336),i=n(155);r.inject();var a={renderToString:o.renderToString,renderToStaticMarkup:o.renderToStaticMarkup,version:i};e.exports=a},function(e,t,n){"use strict";var r=n(3),o=n(70),i=n(23),a=n(4),u=(n(7),n(52)),s=n(1),c=(n(89),function(e){this._currentElement=e,this._stringText=""+e,this._nativeNode=null,this._nativeParent=null,this._domID=null,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});r(c.prototype,{mountComponent:function(e,t,n,r){var o=n._idCounter++,s=" react-text: "+o+" ",c=" /react-text ";if(this._domID=o,this._nativeParent=t,e.useCreateElement){var l=n._ownerDocument,p=l.createComment(s),f=l.createComment(c),d=i(l.createDocumentFragment());return i.queueChild(d,i(p)),this._stringText&&i.queueChild(d,i(l.createTextNode(this._stringText))),i.queueChild(d,i(f)),a.precacheNode(this,p),this._closingComment=f,d}var h=u(this._stringText);return e.renderToStaticMarkup?h:"<!--"+s+"-->"+h+"<!--"+c+"-->"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getNativeNode();o.replaceDelimitedText(r[0],r[1],n)}}},getNativeNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=a.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?s(!1):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._nativeNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),e.exports=c},function(e,t,n){"use strict";function r(){this._rootNodeID&&f.updateWrapper(this)}function o(e){var t=this._currentElement.props,n=s.executeOnChange(t,e);return l.asap(r,this),n}var i=n(3),a=n(47),u=n(71),s=n(74),c=n(4),l=n(10),p=n(1),f=(n(2),{getNativeProps:function(e,t){null!=t.dangerouslySetInnerHTML?p(!1):void 0;var n=i({},a.getNativeProps(e,t),{defaultValue:void 0,value:void 0,children:e._wrapperState.initialValue,onChange:e._wrapperState.onChange});return n},mountWrapper:function(e,t){var n=t.defaultValue,r=t.children;null!=r&&(null!=n?p(!1):void 0,Array.isArray(r)&&(r.length<=1?void 0:p(!1),r=r[0]),n=""+r),null==n&&(n="");var i=s.getValue(t);e._wrapperState={initialValue:""+(null!=i?i:n),listeners:null,onChange:o.bind(e)}},updateWrapper:function(e){var t=e._currentElement.props,n=s.getValue(t);null!=n&&u.setValueForProperty(c.getNodeFromInstance(e),"value",""+n)}});e.exports=f},function(e,t,n){"use strict";function r(e,t){"_nativeNode"in e?void 0:s(!1),"_nativeNode"in t?void 0:s(!1);for(var n=0,r=e;r;r=r._nativeParent)n++;for(var o=0,i=t;i;i=i._nativeParent)o++;for(;n-o>0;)e=e._nativeParent,n--;for(;o-n>0;)t=t._nativeParent,o--;for(var a=n;a--;){if(e===t)return e;e=e._nativeParent,t=t._nativeParent}return null}function o(e,t){"_nativeNode"in e?void 0:s(!1),"_nativeNode"in t?void 0:s(!1);for(;t;){if(t===e)return!0;t=t._nativeParent}return!1}function i(e){return"_nativeNode"in e?void 0:s(!1),e._nativeParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._nativeParent;var o;for(o=r.length;o-- >0;)t(r[o],!1,n);for(o=0;o<r.length;o++)t(r[o],!0,n)}function u(e,t,n,o,i){for(var a=e&&t?r(e,t):null,u=[];e&&e!==a;)u.push(e),e=e._nativeParent;for(var s=[];t&&t!==a;)s.push(t),t=t._nativeParent;var c;for(c=0;c<u.length;c++)n(u[c],!0,o);for(c=s.length;c-- >0;)n(s[c],!1,i)}var s=n(1);e.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:a,traverseEnterLeave:u}},function(e,t,n){"use strict";var r,o=(n(19),n(48),n(2),{onCreateMarkupForProperty:function(e,t){r(e)},onSetValueForProperty:function(e,t,n){r(t)},onDeleteValueForProperty:function(e,t){r(t)}});e.exports=o},function(e,t,n){"use strict";function r(e,t,n,r,o,i){}function o(e){}var i=(n(6),n(205),n(2),[]),a={addDevtool:function(e){i.push(e)},removeDevtool:function(e){for(var t=0;t<i.length;t++)i[t]===e&&(i.splice(t,1),t--)},beginProfiling:function(){},endProfiling:function(){},getFlushHistory:function(){},onBeginFlush:function(){r("onBeginFlush")},onEndFlush:function(){r("onEndFlush")},onBeginLifeCycleTimer:function(e,t){o(e),r("onBeginLifeCycleTimer",e,t)},onEndLifeCycleTimer:function(e,t){o(e),r("onEndLifeCycleTimer",e,t)},onBeginReconcilerTimer:function(e,t){o(e),r("onBeginReconcilerTimer",e,t)},onEndReconcilerTimer:function(e,t){o(e),r("onEndReconcilerTimer",e,t)},onBeginProcessingChildContext:function(){r("onBeginProcessingChildContext")},onEndProcessingChildContext:function(){r("onEndProcessingChildContext")},onNativeOperation:function(e,t,n){o(e),r("onNativeOperation",e,t,n)},onSetState:function(){r("onSetState")},onSetDisplayName:function(e,t){o(e),r("onSetDisplayName",e,t)},onSetChildren:function(e,t){o(e),r("onSetChildren",e,t)},onSetOwner:function(e,t){o(e),r("onSetOwner",e,t)},onSetText:function(e,t){o(e),r("onSetText",e,t)},onMountRootComponent:function(e){o(e),r("onMountRootComponent",e)},onMountComponent:function(e){o(e),r("onMountComponent",e)},onUpdateComponent:function(e){o(e),r("onUpdateComponent",e)},onUnmountComponent:function(e){o(e),r("onUnmountComponent",e)}};e.exports=a},function(e,t,n){ "use strict";function r(e){o.enqueueEvents(e),o.processEventQueue(!1)}var o=n(28),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};e.exports=i},function(e,t,n){"use strict";function r(e){for(;e._nativeParent;)e=e._nativeParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){var t=d(e.nativeEvent),n=p.getClosestInstanceFromNode(t),o=n;do e.ancestors.push(o),o=o&&r(o);while(o);for(var i=0;i<e.ancestors.length;i++)n=e.ancestors[i],v._handleTopLevel(e.topLevelType,n,e.nativeEvent,d(e.nativeEvent))}function a(e){var t=h(window);e(t)}var u=n(3),s=n(94),c=n(6),l=n(16),p=n(4),f=n(10),d=n(83),h=n(198);u(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),l.addPoolingTo(o,l.twoArgumentPooler);var v={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:c.canUseDOM?window:null,setHandleTopLevel:function(e){v._handleTopLevel=e},setEnabled:function(e){v._enabled=!!e},isEnabled:function(){return v._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?s.listen(r,t,v.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?s.capture(r,t,v.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=a.bind(null,e);s.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(v._enabled){var n=o.getPooled(e,t);try{f.batchedUpdates(i,n)}finally{o.release(n)}}}};e.exports=v},function(e,t,n){"use strict";var r=n(19),o=n(28),i=n(72),a=n(75),u=n(307),s=n(144),c=n(49),l=n(150),p=n(10),f={Component:a.injection,Class:u.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:o.injection,EventPluginUtils:i.injection,EventEmitter:c.injection,NativeComponent:l.injection,Updates:p.injection};e.exports=f},function(e,t,n){"use strict";function r(e,t,n){return{type:p.INSERT_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:n,afterNode:t}}function o(e,t,n){return{type:p.MOVE_EXISTING,content:null,fromIndex:e._mountIndex,fromNode:f.getNativeNode(e),toIndex:n,afterNode:t}}function i(e,t){return{type:p.REMOVE_NODE,content:null,fromIndex:e._mountIndex,fromNode:t,toIndex:null,afterNode:null}}function a(e){return{type:p.SET_MARKUP,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function u(e){return{type:p.TEXT_CONTENT,content:e,fromIndex:null,fromNode:null,toIndex:null,afterNode:null}}function s(e,t){return t&&(e=e||[],e.push(t)),e}function c(e,t){l.processChildrenUpdates(e,t)}var l=n(75),p=(n(7),n(149)),f=(n(20),n(21)),d=n(305),h=(n(9),n(353)),v=n(1),m={Mixin:{_reconcilerInstantiateChildren:function(e,t,n){return d.instantiateChildren(e,t,n)},_reconcilerUpdateChildren:function(e,t,n,r,o){var i;return i=h(t),d.updateChildren(e,i,n,r,o),i},mountChildren:function(e,t,n){var r=this._reconcilerInstantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var u=r[a],s=f.mountComponent(u,t,this,this._nativeContainerInfo,n);u._mountIndex=i++,o.push(s)}return o},updateTextContent:function(e){var t=this._renderedChildren;d.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&v(!1);var r=[u(e)];c(this,r)},updateMarkup:function(e){var t=this._renderedChildren;d.unmountChildren(t,!1);for(var n in t)t.hasOwnProperty(n)&&v(!1);var r=[a(e)];c(this,r)},updateChildren:function(e,t,n){this._updateChildren(e,t,n)},_updateChildren:function(e,t,n){var r=this._renderedChildren,o={},i=this._reconcilerUpdateChildren(r,e,o,t,n);if(i||r){var a,u=null,l=0,p=0,d=null;for(a in i)if(i.hasOwnProperty(a)){var h=r&&r[a],v=i[a];h===v?(u=s(u,this.moveChild(h,d,p,l)),l=Math.max(h._mountIndex,l),h._mountIndex=p):(h&&(l=Math.max(h._mountIndex,l)),u=s(u,this._mountChildAtIndex(v,d,p,t,n))),p++,d=f.getNativeNode(v)}for(a in o)o.hasOwnProperty(a)&&(u=s(u,this._unmountChild(r[a],o[a])));u&&c(this,u),this._renderedChildren=i}},unmountChildren:function(e){var t=this._renderedChildren;d.unmountChildren(t,e),this._renderedChildren=null},moveChild:function(e,t,n,r){if(e._mountIndex<r)return o(e,t,n)},createChild:function(e,t,n){return r(n,t,e._mountIndex)},removeChild:function(e,t){return i(e,t)},_mountChildAtIndex:function(e,t,n,r,o){var i=f.mountComponent(e,r,this,this._nativeContainerInfo,o);return e._mountIndex=n,this.createChild(e,t,i)},_unmountChild:function(e,t){var n=this.removeChild(e,t);return e._mountIndex=null,n}}};e.exports=m},function(e,t,n){"use strict";var r=n(1),o={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){o.isValidOwner(n)?void 0:r(!1),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){o.isValidOwner(n)?void 0:r(!1);var i=n.getPublicInstance();i&&i.refs[t]===e.getPublicInstance()&&n.detachRef(t)}};e.exports=o},function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function o(e){function t(t,n,r,o,i,a){if(o=o||C,a=a||r,null==n[r]){var u=_[i];return t?new Error("Required "+u+" `"+a+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i,a)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function i(e){function t(t,n,r,o,i){var a=t[n],u=m(a);if(u!==e){var s=_[o],c=y(a);return new Error("Invalid "+s+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return o(t)}function a(){return o(E.thatReturns(null))}function u(e){function t(t,n,r,o,i){if("function"!=typeof e)return new Error("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var u=_[o],s=m(a);return new Error("Invalid "+u+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<a.length;c++){var l=e(a,c,r,o,i+"["+c+"]");if(l instanceof Error)return l}return null}return o(t)}function s(){function e(e,t,n,r,o){if(!b.isValidElement(e[t])){var i=_[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a single ReactElement."))}return null}return o(e)}function c(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=_[o],u=e.name||C,s=g(t[n]);return new Error("Invalid "+a+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return o(t)}function l(e){function t(t,n,o,i,a){for(var u=t[n],s=0;s<e.length;s++)if(r(u,e[s]))return null;var c=_[i],l=JSON.stringify(e);return new Error("Invalid "+c+" `"+a+"` of value `"+u+"` "+("supplied to `"+o+"`, expected one of "+l+"."))}return o(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOf, expected an instance of array.")})}function p(e){function t(t,n,r,o,i){if("function"!=typeof e)return new Error("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],u=m(a);if("object"!==u){var s=_[o];return new Error("Invalid "+s+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an object."))}for(var c in a)if(a.hasOwnProperty(c)){var l=e(a,c,r,o,i+"."+c);if(l instanceof Error)return l}return null}return o(t)}function f(e){function t(t,n,r,o,i){for(var a=0;a<e.length;a++){var u=e[a];if(null==u(t,n,r,o,i))return null}var s=_[o];return new Error("Invalid "+s+" `"+i+"` supplied to "+("`"+r+"`."))}return o(Array.isArray(e)?t:function(){return new Error("Invalid argument supplied to oneOfType, expected an instance of array.")})}function d(){function e(e,t,n,r,o){if(!v(e[t])){var i=_[r];return new Error("Invalid "+i+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return o(e)}function h(e){function t(t,n,r,o,i){var a=t[n],u=m(a);if("object"!==u){var s=_[o];return new Error("Invalid "+s+" `"+i+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `object`."))}for(var c in e){var l=e[c];if(l){var p=l(a,c,r,o,i+"."+c);if(p)return p}}return null}return o(t)}function v(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(v);if(null===e||b.isValidElement(e))return!0;var t=x(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!v(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!v(o[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function y(e){var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){return e.constructor&&e.constructor.name?e.constructor.name:C}var b=n(17),_=n(78),E=n(9),x=n(160),C="<<anonymous>>",w={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:a(),arrayOf:u,element:s(),instanceOf:c,node:d(),objectOf:p,oneOf:l,oneOfType:f,shape:h};e.exports=w},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=i.getPooled(null),this.useCreateElement=e}var o=n(3),i=n(136),a=n(16),u=n(49),s=n(146),c=n(51),l={initialize:s.getSelectionInformation,close:s.restoreSelection},p={initialize:function(){var e=u.isEnabled();return u.setEnabled(!1),e},close:function(e){u.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},d=[l,p,f],h={getTransactionWrappers:function(){return d},getReactMountReady:function(){return this.reactMountReady},checkpoint:function(){return this.reactMountReady.checkpoint()},rollback:function(e){this.reactMountReady.rollback(e)},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null}};o(r.prototype,c.Mixin,h),a.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=n(331),a={};a.attachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&r(n,e,t._owner)}},a.shouldUpdateRefs=function(e,t){var n=null===e||e===!1,r=null===t||t===!1;return n||r||t._owner!==e._owner||t.ref!==e.ref},a.detachRefs=function(e,t){if(null!==t&&t!==!1){var n=t.ref;null!=n&&o(n,e,t._owner)}},e.exports=a},function(e,t){"use strict";var n={isBatchingUpdates:!1,batchedUpdates:function(e){}};e.exports=n},function(e,t,n){"use strict";function r(e,t){var n;try{return d.injection.injectBatchingStrategy(p),n=f.getPooled(t),n.perform(function(){var r=v(e),o=l.mountComponent(r,n,null,a(),h);return t||(o=c.addChecksumToMarkup(o)),o},null)}finally{f.release(n),d.injection.injectBatchingStrategy(u)}}function o(e){return s.isValidElement(e)?void 0:m(!1),r(e,!1)}function i(e){return s.isValidElement(e)?void 0:m(!1),r(e,!0)}var a=n(140),u=n(142),s=n(17),c=(n(7),n(147)),l=n(21),p=n(335),f=n(153),d=n(10),h=n(24),v=n(84),m=n(1);e.exports={renderToString:o,renderToStaticMarkup:i}},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},r={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering","in":0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(r).forEach(function(e){o.Properties[e]=0,r[e]&&(o.DOMAttributeNames[e]=r[e])}),e.exports=o},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&c.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(e,t){if(E||null==g||g!==p())return null;var n=r(g);if(!_||!h(_,n)){_=n;var o=l.getPooled(y.select,b,e,t);return o.type="select",o.target=g,a.accumulateTwoPhaseDispatches(o),o}return null}var i=n(12),a=n(29),u=n(6),s=n(4),c=n(146),l=n(13),p=n(96),f=n(163),d=n(14),h=n(54),v=i.topLevelTypes,m=u.canUseDOM&&"documentMode"in document&&document.documentMode<=11,y={select:{phasedRegistrationNames:{bubbled:d({onSelect:null}),captured:d({onSelectCapture:null})},dependencies:[v.topBlur,v.topContextMenu,v.topFocus,v.topKeyDown,v.topMouseDown,v.topMouseUp,v.topSelectionChange]}},g=null,b=null,_=null,E=!1,x=!1,C=d({onSelect:null}),w={eventTypes:y,extractEvents:function(e,t,n,r){if(!x)return null;var i=t?s.getNodeFromInstance(t):window;switch(e){case v.topFocus:(f(i)||"true"===i.contentEditable)&&(g=i,b=t,_=null);break;case v.topBlur:g=null,b=null,_=null;break;case v.topMouseDown:E=!0;break;case v.topContextMenu:case v.topMouseUp:return E=!1,o(n,r);case v.topSelectionChange:if(m)break;case v.topKeyDown:case v.topKeyUp:return o(n,r)}return null},didPutListener:function(e,t,n){t===C&&(x=!0)}};e.exports=w},function(e,t,n){"use strict";var r=n(12),o=n(94),i=n(29),a=n(4),u=n(340),s=n(341),c=n(13),l=n(344),p=n(346),f=n(50),d=n(343),h=n(347),v=n(348),m=n(30),y=n(349),g=n(9),b=n(81),_=n(1),E=n(14),x=r.topLevelTypes,C={abort:{phasedRegistrationNames:{bubbled:E({onAbort:!0}),captured:E({onAbortCapture:!0})}},animationEnd:{phasedRegistrationNames:{bubbled:E({onAnimationEnd:!0}),captured:E({onAnimationEndCapture:!0})}},animationIteration:{phasedRegistrationNames:{bubbled:E({onAnimationIteration:!0}),captured:E({onAnimationIterationCapture:!0})}},animationStart:{phasedRegistrationNames:{bubbled:E({onAnimationStart:!0}),captured:E({onAnimationStartCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:E({onBlur:!0}),captured:E({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:E({onCanPlay:!0}),captured:E({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:E({onCanPlayThrough:!0}),captured:E({onCanPlayThroughCapture:!0})}},click:{phasedRegistrationNames:{bubbled:E({onClick:!0}),captured:E({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:E({onContextMenu:!0}),captured:E({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:E({onCopy:!0}),captured:E({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:E({onCut:!0}),captured:E({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:E({onDoubleClick:!0}),captured:E({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:E({onDrag:!0}),captured:E({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:E({onDragEnd:!0}),captured:E({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:E({onDragEnter:!0}),captured:E({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:E({onDragExit:!0}),captured:E({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:E({onDragLeave:!0}),captured:E({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:E({onDragOver:!0}),captured:E({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:E({onDragStart:!0}),captured:E({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:E({onDrop:!0}),captured:E({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:E({onDurationChange:!0}),captured:E({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:E({onEmptied:!0}),captured:E({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:E({onEncrypted:!0}),captured:E({onEncryptedCapture:!0})}},ended:{phasedRegistrationNames:{bubbled:E({onEnded:!0}),captured:E({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:E({onError:!0}),captured:E({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:E({onFocus:!0}),captured:E({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:E({onInput:!0}),captured:E({onInputCapture:!0})}},invalid:{phasedRegistrationNames:{bubbled:E({onInvalid:!0}),captured:E({onInvalidCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:E({onKeyDown:!0}),captured:E({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:E({onKeyPress:!0}),captured:E({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:E({onKeyUp:!0}),captured:E({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:E({onLoad:!0}),captured:E({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:E({onLoadedData:!0}),captured:E({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:E({onLoadedMetadata:!0}),captured:E({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:E({onLoadStart:!0}),captured:E({onLoadStartCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:E({onMouseDown:!0}),captured:E({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:E({onMouseMove:!0}),captured:E({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:E({onMouseOut:!0}),captured:E({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:E({onMouseOver:!0}),captured:E({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:E({onMouseUp:!0}),captured:E({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:E({onPaste:!0}),captured:E({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:E({onPause:!0}),captured:E({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:E({onPlay:!0}),captured:E({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:E({onPlaying:!0}),captured:E({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:E({onProgress:!0}),captured:E({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:E({onRateChange:!0}),captured:E({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:E({onReset:!0}),captured:E({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:E({onScroll:!0}),captured:E({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:E({onSeeked:!0}),captured:E({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:E({onSeeking:!0}),captured:E({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:E({onStalled:!0}),captured:E({onStalledCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:E({onSubmit:!0}),captured:E({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:E({onSuspend:!0}),captured:E({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:E({onTimeUpdate:!0}),captured:E({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:E({onTouchCancel:!0}),captured:E({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:E({onTouchEnd:!0}),captured:E({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:E({onTouchMove:!0}),captured:E({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:E({onTouchStart:!0}),captured:E({onTouchStartCapture:!0})}},transitionEnd:{phasedRegistrationNames:{bubbled:E({onTransitionEnd:!0}),captured:E({onTransitionEndCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:E({onVolumeChange:!0}),captured:E({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:E({onWaiting:!0}),captured:E({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:E({onWheel:!0}),captured:E({onWheelCapture:!0})}}},w={topAbort:C.abort,topAnimationEnd:C.animationEnd,topAnimationIteration:C.animationIteration,topAnimationStart:C.animationStart,topBlur:C.blur,topCanPlay:C.canPlay,topCanPlayThrough:C.canPlayThrough,topClick:C.click,topContextMenu:C.contextMenu,topCopy:C.copy,topCut:C.cut,topDoubleClick:C.doubleClick,topDrag:C.drag,topDragEnd:C.dragEnd,topDragEnter:C.dragEnter,topDragExit:C.dragExit,topDragLeave:C.dragLeave,topDragOver:C.dragOver,topDragStart:C.dragStart,topDrop:C.drop,topDurationChange:C.durationChange,topEmptied:C.emptied,topEncrypted:C.encrypted,topEnded:C.ended,topError:C.error,topFocus:C.focus,topInput:C.input,topInvalid:C.invalid,topKeyDown:C.keyDown,topKeyPress:C.keyPress,topKeyUp:C.keyUp,topLoad:C.load,topLoadedData:C.loadedData,topLoadedMetadata:C.loadedMetadata,topLoadStart:C.loadStart,topMouseDown:C.mouseDown,topMouseMove:C.mouseMove,topMouseOut:C.mouseOut,topMouseOver:C.mouseOver,topMouseUp:C.mouseUp,topPaste:C.paste,topPause:C.pause,topPlay:C.play,topPlaying:C.playing,topProgress:C.progress,topRateChange:C.rateChange,topReset:C.reset,topScroll:C.scroll,topSeeked:C.seeked,topSeeking:C.seeking,topStalled:C.stalled,topSubmit:C.submit,topSuspend:C.suspend,topTimeUpdate:C.timeUpdate,topTouchCancel:C.touchCancel,topTouchEnd:C.touchEnd,topTouchMove:C.touchMove,topTouchStart:C.touchStart,topTransitionEnd:C.transitionEnd,topVolumeChange:C.volumeChange,topWaiting:C.waiting,topWheel:C.wheel};for(var P in w)w[P].dependencies=[P];var S=E({onClick:null}),O={},T={eventTypes:C,extractEvents:function(e,t,n,r){var o=w[e];if(!o)return null;var a;switch(e){case x.topAbort:case x.topCanPlay:case x.topCanPlayThrough:case x.topDurationChange:case x.topEmptied:case x.topEncrypted:case x.topEnded:case x.topError:case x.topInput:case x.topInvalid:case x.topLoad:case x.topLoadedData:case x.topLoadedMetadata:case x.topLoadStart:case x.topPause:case x.topPlay:case x.topPlaying:case x.topProgress:case x.topRateChange:case x.topReset:case x.topSeeked:case x.topSeeking:case x.topStalled:case x.topSubmit:case x.topSuspend:case x.topTimeUpdate:case x.topVolumeChange:case x.topWaiting:a=c;break;case x.topKeyPress:if(0===b(n))return null;case x.topKeyDown:case x.topKeyUp:a=p;break;case x.topBlur:case x.topFocus:a=l;break;case x.topClick:if(2===n.button)return null;case x.topContextMenu:case x.topDoubleClick:case x.topMouseDown:case x.topMouseMove:case x.topMouseOut:case x.topMouseOver:case x.topMouseUp:a=f;break;case x.topDrag:case x.topDragEnd:case x.topDragEnter:case x.topDragExit:case x.topDragLeave:case x.topDragOver:case x.topDragStart:case x.topDrop:a=d;break;case x.topTouchCancel:case x.topTouchEnd:case x.topTouchMove:case x.topTouchStart:a=h;break;case x.topAnimationEnd:case x.topAnimationIteration:case x.topAnimationStart:a=u;break;case x.topTransitionEnd:a=v;break;case x.topScroll:a=m;break;case x.topWheel:a=y;break;case x.topCopy:case x.topCut:case x.topPaste:a=s}a?void 0:_(!1);var g=a.getPooled(o,t,n,r);return i.accumulateTwoPhaseDispatches(g),g},didPutListener:function(e,t,n){if(t===S){var r=e._rootNodeID,i=a.getNodeFromInstance(e);O[r]||(O[r]=o.listen(i,"click",g))}},willDeleteListener:function(e,t){if(t===S){var n=e._rootNodeID;O[n].remove(),delete O[n]}}};e.exports=T},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(50),i={dataTransfer:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(30),i={relatedTarget:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(30),i=n(81),a=n(354),u=n(82),s={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:u,charCode:function(e){return"keypress"===e.type?i(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?i(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};o.augmentClass(r,s),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(30),i=n(82),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(13),i={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return o.call(this,e,t,n,r)}var o=n(50),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),e.exports=r},function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0,i=e.length,a=i&-4;o<a;){for(var u=Math.min(o+4096,a);o<u;o+=4)n+=(t+=e.charCodeAt(o))+(t+=e.charCodeAt(o+1))+(t+=e.charCodeAt(o+2))+(t+=e.charCodeAt(o+3));t%=r,n%=r}for(;o<i;o++)n+=t+=e.charCodeAt(o);return t%=r,n%=r,t|n<<16}var r=65521;e.exports=n},function(e,t,n){"use strict";function r(e,t,n){var r=null==t||"boolean"==typeof t||""===t;if(r)return"";var o=isNaN(t);return o||0===t||i.hasOwnProperty(e)&&i[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var o=n(135),i=(n(2),o.isUnitlessNumber);e.exports=r},function(e,t,n){"use strict";function r(e){if(null==e)return null;if(1===e.nodeType)return e;var t=i.get(e);return t?(t=a(t),t?o.getNodeFromInstance(t):null):void u(("function"==typeof e.render,!1))}var o=(n(20),n(4)),i=n(77),a=n(161),u=n(1);n(2),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=e,o=void 0===r[n];o&&null!=t&&(r[n]=t)}function o(e){if(null==e)return e;var t={};return i(e,r,t),t}var i=(n(73),n(88));n(2),e.exports=o},function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=n(81),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3===o.nodeType){if(a=i+o.textContent.length,i<=t&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}e.exports=o},function(e,t,n){"use strict"; function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(u[e])return u[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in s)return u[e]=t[n];return""}var i=n(6),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},u={},s={};i.canUseDOM&&(s=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),e.exports=o},function(e,t,n){"use strict";function r(e){return'"'+o(e)+'"'}var o=n(52);e.exports=r},function(e,t,n){"use strict";var r=n(148);e.exports=r.renderSubtreeIntoContainer},function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=n(54);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(67),c=r(s),l=n(44),p=r(l),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(5),h=n(46),v=n(367),m=r(v),y=n(31),g=r(y),b=function(e,t,n){var r=e.asyncValidate,s=e.blur,l=e.change,v=e.focus,y=e.getFormState,b=e.initialValues,_=t.deepEqual,E=t.getIn,x=b&&E(b,n),C=function(e){function t(){return i(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return u(t,e),f(t,[{key:"shouldComponentUpdate",value:function(e){return!_(this.props,e)}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this.props,t=e.component,i=e.defaultValue,a=e.withRef,u=o(e,["component","defaultValue","withRef"]),s=this.context._reduxForm.adapter,c=(0,m["default"])(E,n,u,this.syncError,i,r);a&&(c.ref="renderedComponent");var l=void 0;return s&&(l=s(t,c)),l||(l=(0,d.createElement)(t,c)),l}},{key:"syncError",get:function(){var e=this.context._reduxForm.getSyncErrors,t=g["default"].getIn(e(),n);return t&&t._error?t._error:t}},{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"value",get:function(){return this.props.value}}]),t}(d.Component);C.propTypes={component:d.PropTypes.oneOfType([d.PropTypes.func,d.PropTypes.string]).isRequired,defaultValue:d.PropTypes.any},C.contextTypes={_reduxForm:d.PropTypes.object};var w=(0,c["default"])({blur:s,change:l,focus:v},function(e){return(0,p["default"])(e,n)}),P=(0,h.connect)(function(e,t){var r=E(y(e),"initial."+n)||x,o=E(y(e),"values."+n),i=o===r;return{asyncError:E(y(e),"asyncErrors."+n),asyncValidating:E(y(e),"asyncValidating")===n,dirty:!i,pristine:i,state:E(y(e),"fields."+n),submitError:E(y(e),"submitErrors."+n),value:o,_value:t.value}},w,void 0,{withRef:!0});return P(C)};t["default"]=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(67),c=r(s),l=n(44),p=r(l),f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(5),h=n(46),v=n(366),m=r(v),y=n(31),g=r(y),b=n(69),_=r(b),E=function(e,t,n){var r=e.arrayInsert,s=e.arrayPop,l=e.arrayPush,v=e.arrayRemove,y=e.arrayShift,b=e.arraySplice,E=e.arraySwap,x=e.arrayUnshift,C=(e.asyncValidate,e.blur,e.change,e.focus,e.getFormState),w=e.initialValues,P=t.deepEqual,S=t.getIn,O=t.size,T=w&&S(w,n),R=function(e){function t(){return i(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return u(t,e),f(t,[{key:"shouldComponentUpdate",value:function(e){return(0,_["default"])(this,e)}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this.props,t=e.component,r=e.withRef,i=o(e,["component","withRef"]),a=(0,m["default"])(S,O,n,i,this.syncError);return r&&(a.ref="renderedComponent"),(0,d.createElement)(t,a)}},{key:"syncError",get:function(){var e=this.context._reduxForm.getSyncErrors;return g["default"].getIn(e(),n+"._error")}},{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"value",get:function(){return this.props.value}}]),t}(d.Component);R.propTypes={component:d.PropTypes.oneOfType([d.PropTypes.func,d.PropTypes.string]).isRequired,defaultValue:d.PropTypes.any},R.contextTypes={_reduxForm:d.PropTypes.object};var A=(0,c["default"])({arrayInsert:r,arrayPop:s,arrayPush:l,arrayRemove:v,arrayShift:y,arraySplice:b,arraySwap:E,arrayUnshift:x},function(e){return(0,p["default"])(e,n)}),k=(0,h.connect)(function(e){var t=S(C(e),"initial."+n)||T,r=S(C(e),"values."+n),o=P(r,t);return{asyncError:S(C(e),"asyncErrors."+n+"._error"),dirty:!o,pristine:o,submitError:S(C(e),"submitErrors."+n+"._error"),value:r}},A,void 0,{withRef:!0});return k(R)};t["default"]=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(5),l=n(33),p=r(l),f=n(360),d=r(f),h=n(69),v=r(h),m=function(e){var t=e.deepEqual,n=e.getIn,r=function(e){function r(e,a){o(this,r);var u=i(this,Object.getPrototypeOf(r).call(this,e,a));if(!a._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return u.ConnectedField=(0,d["default"])(a._reduxForm,{deepEqual:t,getIn:n},e.name),u}return a(r,e),s(r,[{key:"shouldComponentUpdate",value:function(e){return(0,v["default"])(this,e)}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.name,"Field")}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.ConnectedField=(0,d["default"])(this.context._reduxForm,{deepEqual:t,getIn:n},e.name))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return(0,p["default"])(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to Field"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){return(0,c.createElement)(this.ConnectedField,u({},this.props,{ref:"connected"}))}},{key:"name",get:function(){return this.props.name}},{key:"dirty",get:function(){return this.refs.connected.getWrappedInstance().dirty}},{key:"pristine",get:function(){return this.refs.connected.getWrappedInstance().pristine}},{key:"value",get:function(){return this.refs.connected.getWrappedInstance().value}}]),r}(c.Component);return r.propTypes={name:c.PropTypes.string.isRequired,component:c.PropTypes.oneOfType([c.PropTypes.func,c.PropTypes.string]).isRequired,defaultValue:c.PropTypes.any},r.contextTypes={_reduxForm:c.PropTypes.object},r};t["default"]=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(5),l=n(33),p=r(l),f=n(361),d=r(f),h=n(69),v=r(h),m=function(e){var t=e.deepEqual,n=e.getIn,r=e.size,l=function(e){function l(e,a){o(this,l);var u=i(this,Object.getPrototypeOf(l).call(this,e,a));if(!a._reduxForm)throw new Error("FieldArray must be inside a component decorated with reduxForm()");return u.ConnectedFieldArray=(0,d["default"])(a._reduxForm,{deepEqual:t,getIn:n,size:r},e.name),u}return a(l,e),s(l,[{key:"shouldComponentUpdate",value:function(e){return(0,v["default"])(this,e)}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.name,"FieldArray")}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.ConnectedFieldArray=(0,d["default"])(this.context._reduxForm,{deepEqual:t,getIn:n,size:r},e.name))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return(0,p["default"])(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to FieldArray"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){return(0,c.createElement)(this.ConnectedFieldArray,u({},this.props,{ref:"connected"}))}},{key:"name",get:function(){return this.props.name}},{key:"dirty",get:function(){return this.refs.connected.getWrappedInstance().dirty}},{key:"pristine",get:function(){return this.refs.connected.getWrappedInstance().pristine}},{key:"value",get:function(){return this.refs.connected.getWrappedInstance().value}}]),l}(c.Component);return l.propTypes={name:c.PropTypes.string.isRequired,component:c.PropTypes.func.isRequired},l.contextTypes={_reduxForm:c.PropTypes.object},l};t["default"]=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(55),i=r(o),a=function(e,t,n,r){t(r);var o=e();if(!(0,i["default"])(o))throw new Error("asyncValidate function passed to reduxForm must return a promise");var a=function(e){return function(t){if(t&&Object.keys(t).length)return n(t),Promise.reject();if(e)throw n(),new Error("Asynchronous validation promise was rejected without errors.");return n(),Promise.resolve()}};return o.then(a(!1),a(!0))};t["default"]=a},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(381),u=o(a),s=n(382),c=o(s),l=n(362),p=o(l),f=n(363),d=o(f),h=n(375),v=o(h),m=n(388),y=o(m),g=n(165),b=o(g),_=n(380),E=o(_),x=n(166),C=r(x),w=n(90),P=r(w),S=function(e){return i({actionTypes:P},C,{Field:(0,p["default"])(e),FieldArray:(0,d["default"])(e),formValueSelector:(0,v["default"])(e),propTypes:E["default"],reduxForm:(0,c["default"])(e),reducer:(0,u["default"])(e),SubmissionError:b["default"],values:(0,y["default"])(e)})};t["default"]=S},function(e,t){"use strict";function n(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t,o,i,a){var u=i.arrayInsert,s=i.arrayPop,c=i.arrayPush,l=i.arrayRemove,p=i.arrayShift,f=(i.arraySplice,i.arraySwap),d=i.arrayUnshift,h=i.asyncError,v=i.dirty,m=i.pristine,y=(i.state,i.submitError),g=(i.submitFailed,i.value),b=n(i,["arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncError","dirty","pristine","state","submitError","submitFailed","value"]),_=a||h||y,E=t(g);return r({dirty:v,error:_,forEach:function(e){return(g||[]).forEach(function(t,n){return e(o+"["+n+"]",n)})},insert:u,invalid:!!_,length:E,map:function(e){return(g||[]).map(function(t,n){return e(o+"["+n+"]",n)})},pop:function(){return s(),e(g,E-1)},pristine:m,push:c,remove:l,shift:function(){return p(),e(g,0)},swap:f,unshift:d,valid:!_},b)};t["default"]=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var i=n(130),a=r(i),u=n(44),s=r(u),c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(370),p=r(l),f=n(371),d=r(f),h=n(167),v=r(h),m=n(372),y=r(m),g=n(373),b=r(g),_=function(e,t){var n=e.type,r=e.value,i=o(e,["type","value"]);return"checkbox"===n?c({},i,{checked:!!r,type:n}):"radio"===n?c({},i,{checked:r===t,type:n,value:t}):"select-multiple"===n?c({},i,{type:n,value:r||[]}):e},E=function(e,t,n,r){var i=n.asyncError,u=n.blur,l=n.change,f=n.dirty,h=n.focus,m=n.pristine,g=n.state,E=n.submitError,x=n.value,C=n._value,w=o(n,["asyncError","blur","change","dirty","focus","pristine","state","submitError","value","_value"]),P=arguments.length<=4||void 0===arguments[4]?"":arguments[4],S=arguments.length<=5||void 0===arguments[5]?a["default"]:arguments[5],O=r||i||E,T=(0,d["default"])(l);return _(c({active:g&&!!e(g,"active"),dirty:f,error:O,invalid:!!O,name:t,onBlur:(0,p["default"])(u,(0,s["default"])(S,t)),onChange:T,onDragStart:(0,v["default"])(t,x),onDrop:(0,y["default"])(t,l),onFocus:(0,b["default"])(t,h),onUpdate:T,pristine:m,touched:!(!g||!e(g,"touched")),valid:!O,value:null==x?P:x,visited:g&&!!e(g,"visited")},w),C)};t["default"]=E},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t=e.initialized,n=e.trigger,r=e.pristine,o=e.syncValidationPasses;if(!o)return!1;switch(n){case"blur":return!0;case"submit":return!r||!t;default:return!1}};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(45),i=r(o),a=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn,o=e.deleteIn,a=e.setIn,u=function s(e,u){if("]"===u[u.length-1]){var c=(0,i["default"])(u);c.pop();var l=r(e,c.join("."));return l?a(e,u,void 0):e}var p=o(e,u),f=u.lastIndexOf(".");if(f>0){var d=u.substring(0,f);if("]"!==d[d.length-1]){var h=r(p,d);if(t(h,n))return s(p,d)}}return p};return u};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(168),i=r(o),a=n(171),u=r(a),s=function(e,t){return function(n){var r=(0,i["default"])(n,u["default"]);e(r),t&&t(r)}};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(168),i=r(o),a=n(171),u=r(a),s=function(e){return function(t){return e((0,i["default"])(t,u["default"]))}};t["default"]=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(167),o=function(e,t){return function(n){t(e,n.dataTransfer.getData(r.dataKey))}};t["default"]=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return function(){return t(e)}};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(170),i=r(o),a=function(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(0,i["default"])(t)?e.apply(void 0,r):e.apply(void 0,[t].concat(r))}};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(33),i=r(o),a=n(31),u=r(a),s=function(e){var t=e.getIn;return function(e){var n=arguments.length<=1||void 0===arguments[1]?function(e){return t(e,"form")}:arguments[1];return(0,i["default"])(e,"Form value must be specified"),function(r){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return(0,i["default"])(a.length,"No fields specified"),1===a.length?t(n(r),e+".values."+a[0]):a.reduce(function(o,i){var a=t(n(r),e+".values."+i);return void 0===a?o:u["default"].setIn(o,i,a)},{})}}};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(55),a=r(i),u=n(165),s=r(u),c=function(e,t,n,r,i){var u=t.dispatch,c=t.startSubmit,l=t.stopSubmit,p=t.setSubmitFailed,f=t.syncErrors,d=t.returnRejectedSubmitPromise,h=t.values;if(n){var v=function(){var t=e(h,u);return(0,a["default"])(t)?(c(),t.then(function(e){return l(),e})["catch"](function(e){if(l(e instanceof s["default"]?e.errors:void 0),d)return Promise.reject(e)})):t},m=r&&r();return m?m.then(v,function(e){if(p.apply(void 0,o(i)),d)return Promise.reject(e)}):v()}if(p.apply(void 0,o(i)),d)return Promise.reject(f)};t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(172),i=r(o),a=function(e,t){switch(t){case"Field":return e;case"FieldArray":return e+"._error"}},u=function(e){var t=e.getIn,n=function(e,n,r,o){var u=t(e,"name"),s=t(e,"type");if(!n&&!r&&!o)return!1;var c=a(u,s),l=(0,i["default"])(n,c);if(l&&"string"==typeof l)return!0;var p=t(r,c);if(p&&"string"==typeof p)return!0;var f=t(o,c);return!(!f||"string"!=typeof f)};return n};t["default"]=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t=e.getIn,n=function(e){if(!e)return!1;var n=t(e,"_error");return!!n||"string"==typeof e&&!!e};return n};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.values=t.untouch=t.touch=t.SubmissionError=t.stopSubmit=t.stopAsyncValidation=t.startSubmit=t.startAsyncValidation=t.setSubmitFailed=t.reset=t.propTypes=t.initialize=t.reduxForm=t.reducer=t.formValueSelector=t.focus=t.FieldArray=t.Field=t.destroy=t.change=t.blur=t.arrayUnshift=t.arraySwap=t.arraySplice=t.arrayShift=t.arrayRemove=t.arrayPush=t.arrayPop=t.arrayInsert=t.actionTypes=void 0;var o=n(365),i=r(o),a=n(31),u=r(a),s=(0,i["default"])(u["default"]),c=s.actionTypes,l=s.arrayInsert,p=s.arrayPop,f=s.arrayPush,d=s.arrayRemove,h=s.arrayShift,v=s.arraySplice,m=s.arraySwap,y=s.arrayUnshift,g=s.blur,b=s.change,_=s.destroy,E=s.Field,x=s.FieldArray,C=s.focus,w=s.formValueSelector,P=s.reducer,S=s.reduxForm,O=s.initialize,T=s.propTypes,R=s.reset,A=s.setSubmitFailed,k=s.startAsyncValidation,M=s.startSubmit,N=s.stopAsyncValidation,I=s.stopSubmit,j=s.SubmissionError,F=s.touch,D=s.untouch,L=s.values;t.actionTypes=c,t.arrayInsert=l,t.arrayPop=p,t.arrayPush=f,t.arrayRemove=d,t.arrayShift=h,t.arraySplice=v,t.arraySwap=m,t.arrayUnshift=y,t.blur=g,t.change=b,t.destroy=_,t.Field=E,t.FieldArray=x,t.focus=C,t.formValueSelector=w,t.reducer=P,t.reduxForm=S,t.initialize=O,t.propTypes=T,t.reset=R,t.setSubmitFailed=A,t.startAsyncValidation=k,t.startSubmit=M,t.stopAsyncValidation=N,t.stopSubmit=I,t.SubmissionError=j,t.touch=F,t.untouch=D,t.values=L},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.propTypes=void 0;var r=n(5),o=r.PropTypes.any,i=r.PropTypes.bool,a=r.PropTypes.func;t.propTypes={asyncValidating:i.isRequired,autofilled:i,dirty:i.isRequired,error:o,invalid:i.isRequired,pristine:i.isRequired,submitting:i.isRequired,submitFailed:i.isRequired,valid:i.isRequired,asyncValidate:a.isRequired,destroy:a.isRequired,handleSubmit:a.isRequired,initialize:a.isRequired,reset:a.isRequired,touch:a.isRequired,untouch:a.isRequired}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=n(90),u=n(369),s=r(u),c=function(e){function t(e){return e}var n,r=e.splice,u=e.empty,c=e.getIn,l=e.setIn,p=e.deleteIn,f=e.fromJS,d=e.size,h=e.some,v=(0,s["default"])(e),m=function(e,t,n,o,i,a,u){var s=c(e,t+"."+n);return s||u?l(e,t+"."+n,r(s,o,i,a)):e},y=["values","fields","submitErrors","asyncErrors"],g=function(e,t,n,r,o){var i=e;return i=m(i,"values",t,n,r,o,!0),i=m(i,"fields",t,n,r,u),i=m(i,"submitErrors",t,n,r,u),i=m(i,"asyncErrors",t,n,r,u)},b=(n={},o(n,a.ARRAY_INSERT,function(e,t){var n=t.meta,r=n.field,o=n.index,i=t.payload;return g(e,r,o,0,i)}),o(n,a.ARRAY_POP,function(e,t){var n=t.meta.field,r=c(e,"values."+n),o=r?d(r):0;return o?g(e,n,o-1,1):e}),o(n,a.ARRAY_PUSH,function(e,t){var n=t.meta.field,r=t.payload,o=c(e,"values."+n),i=o?d(o):0;return g(e,n,i,0,r)}),o(n,a.ARRAY_REMOVE,function(e,t){var n=t.meta,r=n.field,o=n.index;return g(e,r,o,1)}),o(n,a.ARRAY_SHIFT,function(e,t){var n=t.meta.field;return g(e,n,0,1)}),o(n,a.ARRAY_SPLICE,function(e,t){var n=t.meta,r=n.field,o=n.index,i=n.removeNum,a=t.payload;return g(e,r,o,i,a)}),o(n,a.ARRAY_SWAP,function(e,t){var n=t.meta,r=n.field,o=n.indexA,i=n.indexB,a=e;return y.forEach(function(e){var t=c(a,e+"."+r+"["+o+"]"),n=c(a,e+"."+r+"["+i+"]");void 0===t&&void 0===n||(a=l(a,e+"."+r+"["+o+"]",n),a=l(a,e+"."+r+"["+i+"]",t))}),a}),o(n,a.ARRAY_UNSHIFT,function(e,t){var n=t.meta.field,r=t.payload;return g(e,n,0,0,r)}),o(n,a.BLUR,function(e,t){var n=t.meta,r=n.field,o=n.touch,i=t.payload,a=e,u=c(a,"initial."+r);return void 0===u&&""===i?a=v(a,"values."+r):void 0!==i&&(a=l(a,"values."+r,i)),r===c(a,"active")&&(a=p(a,"active")),a=p(a,"fields."+r+".active"),o&&(a=l(a,"fields."+r+".touched",!0),a=l(a,"anyTouched",!0)),a}),o(n,a.CHANGE,function(e,t){var n=t.meta,r=n.field,o=n.touch,i=t.payload,a=e,u=c(a,"initial."+r);return void 0===u&&""===i?a=v(a,"values."+r):void 0!==i&&(a=l(a,"values."+r,i)),a=v(a,"asyncErrors."+r),a=v(a,"submitErrors."+r),o&&(a=l(a,"fields."+r+".touched",!0),a=l(a,"anyTouched",!0)),a}),o(n,a.FOCUS,function(e,t){var n=t.meta.field,r=e,o=c(e,"active");return r=p(r,"fields."+o+".active"),r=l(r,"fields."+n+".visited",!0),r=l(r,"fields."+n+".active",!0),r=l(r,"active",n)}),o(n,a.INITIALIZE,function(e,t){var n=t.payload,r=f(n),o=u;return o=l(o,"values",r),o=l(o,"initial",r)}),o(n,a.REGISTER_FIELD,function(e,t){var n=t.payload,o=n.name,i=n.type,a=e,u=c(a,"registeredFields");if(h(u,function(e){return c(e,"name")===o}))return e;var s=f({name:o,type:i});return a=l(e,"registeredFields",r(u,d(u),0,s))}),o(n,a.RESET,function(e){var t=c(e,"initial"),n=u;return t?(n=l(n,"values",t),n=l(n,"initial",t)):n=v(n,"values"),n}),o(n,a.START_ASYNC_VALIDATION,function(e,t){var n=t.meta.field;return l(e,"asyncValidating",n||!0)}),o(n,a.START_SUBMIT,function(e){return l(e,"submitting",!0)}),o(n,a.STOP_ASYNC_VALIDATION,function(e,t){var n=t.payload,r=e;if(r=p(r,"asyncValidating"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);o&&(r=l(r,"error",o)),r=Object.keys(a).length?l(r,"asyncErrors",f(a)):p(r,"asyncErrors")}else r=p(r,"error"),r=p(r,"asyncErrors");return r}),o(n,a.STOP_SUBMIT,function(e,t){var n=t.payload,r=e;if(r=p(r,"submitting"),r=p(r,"submitFailed"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);o&&(r=l(r,"error",o)),r=Object.keys(a).length?l(r,"submitErrors",f(a)):p(r,"submitErrors"),r=l(r,"submitFailed",!0)}else r=p(r,"error"),r=p(r,"submitErrors");return r}),o(n,a.SET_SUBMIT_FAILED,function(e,t){var n=t.meta.fields,r=e;return r=l(r,"submitFailed",!0),r=p(r,"submitting"),n.forEach(function(e){return r=l(r,"fields."+e+".touched",!0)}),n.length&&(r=l(r,"anyTouched",!0)),r}),o(n,a.TOUCH,function(e,t){var n=t.meta.fields,r=e;return n.forEach(function(e){return r=l(r,"fields."+e+".touched",!0)}),r=l(r,"anyTouched",!0)}),o(n,a.UNREGISTER_FIELD,function(e,t){var n=t.payload.name,o=c(e,"registeredFields");if(!o)return e;var i=o.findIndex(function(e){return c(e,"name")===n});return d(o)<=1&&i>=0?v(e,"registeredFields"):l(e,"registeredFields",r(o,i,1))}),o(n,a.UNTOUCH,function(e,t){var n=t.meta.fields,r=e;return n.forEach(function(e){return r=p(r,"fields."+e+".touched")}),r}),n),_=function(){var e=arguments.length<=0||void 0===arguments[0]?u:arguments[0],t=arguments[1],n=b[t.type];return n?n(e,t):e},E=function(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?u:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=n&&n.meta&&n.meta.form;if(!r)return t;if(n.type===a.DESTROY)return v(t,n.meta.form);var o=c(t,r),i=e(o,n);return i===o?t:l(t,r,i)}};return t(E(_))};t["default"]=c},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function c(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var l=n(283),p=o(l),f=n(44),d=o(f),h=n(67),v=o(h),m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b=n(5),_=n(98),E=o(_),x=n(46),C=n(175),w=n(55),P=o(w),S=n(387),O=o(S),T=n(166),R=r(T),A=n(376),k=o(A),M=n(170),N=o(M),I=n(374),j=o(I),F=n(364),D=o(F),L=n(378),U=o(L),V=n(377),B=o(V),W=n(368),q=o(W),H=n(31),z=o(H),Y=R.arrayInsert,K=R.arrayPop,G=R.arrayPush,$=R.arrayRemove,X=R.arrayShift,Q=R.arraySplice,Z=R.arraySwap,J=R.arrayUnshift,ee=R.blur,te=R.change,ne=R.focus,re=c(R,["arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","blur","change","focus"]),oe={arrayInsert:Y,arrayPop:K,arrayPush:G,arrayRemove:$,arrayShift:X,arraySplice:Q,arraySwap:Z,arrayUnshift:J},ie=[].concat(s(Object.keys(R)),["array","asyncErrors","initialized","initialValues","syncErrors","values","registeredFields"]),ae=function(e){if(!e||"function"!=typeof e)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return e},ue=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn,o=e.setIn,s=e.fromJS,l=e.some,f=(0,U["default"])(e),h=(0,B["default"])(e),_=(0,U["default"])(z["default"]);return function(e){var w=g({touchOnBlur:!0,touchOnChange:!1,destroyOnUnmount:!0,shouldAsyncValidate:q["default"],getFormState:function(e){return r(e,"form")}},e);return function(e){var S=function(n){function s(e){i(this,s);var t=a(this,Object.getPrototypeOf(s).call(this,e));return t.submit=t.submit.bind(t),t.reset=t.reset.bind(t),t.asyncValidate=t.asyncValidate.bind(t),t.getSyncErrors=t.getSyncErrors.bind(t),t.register=t.register.bind(t),t.unregister=t.unregister.bind(t),t.submitCompleted=t.submitCompleted.bind(t),t}return u(s,n),y(s,[{key:"getChildContext",value:function(){var e=this;return{_reduxForm:g({},this.props,{getFormState:function(t){return r(e.props.getFormState(t),e.props.form)},asyncValidate:this.asyncValidate,getSyncErrors:this.getSyncErrors,register:this.register,unregister:this.unregister})}}},{key:"initIfNeeded",value:function(e){var t=e.initialize,n=e.initialized,r=e.initialValues;r&&!n&&t(r)}},{key:"componentWillMount",value:function(){this.initIfNeeded(this.props)}},{key:"componentWillReceiveProps",value:function(e){this.initIfNeeded(e)}},{key:"shouldComponentUpdate",value:function(e){var n=this;return Object.keys(e).some(function(r){return!~ie.indexOf(r)&&!t(n.props[r],e[r])})}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.destroyOnUnmount,n=e.destroy;t&&(this.destroyed=!0,n())}},{key:"getSyncErrors",value:function(){return this.props.syncErrors}},{key:"register",value:function(e,t){this.props.registerField(e,t)}},{key:"unregister",value:function(e){ this.destroyed||this.props.unregisterField(e)}},{key:"asyncValidate",value:function l(e,t){var n=this,i=this.props,a=i.asyncBlurFields,u=i.asyncErrors,l=i.asyncValidate,s=i.dispatch,c=i.initialized,p=i.pristine,f=i.shouldAsyncValidate,d=i.startAsyncValidation,h=i.stopAsyncValidation,v=i.syncErrors,y=i.values,g=!e;if(l){var b=function(){var i=g?y:o(y,e,t),m=g||!r(v,e),b=!g&&(!a||~a.indexOf(e.replace(/\[[0-9]+\]/g,"[]")));if((b||g)&&f({asyncErrors:u,initialized:c,trigger:g?"submit":"blur",blurredField:e,pristine:p,syncValidationPasses:m}))return{v:(0,D["default"])(function(){return l(i,s,n.props)},d,h,e)}}();if("object"===("undefined"==typeof b?"undefined":m(b)))return b.v}}},{key:"submitCompleted",value:function(e){return delete this.submitPromise,e}},{key:"listenToSubmit",value:function(e){return(0,P["default"])(e)?(this.submitPromise=e,e.then(this.submitCompleted,this.submitCompleted)):e}},{key:"submit",value:function(e){var t=this,n=this.props.onSubmit;return e&&!(0,N["default"])(e)?(0,j["default"])(function(){return!t.submitPromise&&t.listenToSubmit((0,k["default"])(ae(e),t.props,t.valid,t.asyncValidate,t.fieldList))}):this.submitPromise?void 0:this.listenToSubmit((0,k["default"])(ae(n),this.props,this.valid,this.asyncValidate,this.fieldList))}},{key:"reset",value:function(){this.props.reset()}},{key:"render",value:function(){var t=this.props,n=(t.arrayInsert,t.arrayPop,t.arrayPush,t.arrayRemove,t.arrayShift,t.arraySplice,t.arraySwap,t.arrayUnshift,t.asyncErrors,t.reduxMountPoint,t.destroyOnUnmount,t.getFormState,t.touchOnBlur,t.touchOnChange,t.syncErrors,t.values,t.registerField,t.unregisterField,c(t,["arrayInsert","arrayPop","arrayPush","arrayRemove","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncErrors","reduxMountPoint","destroyOnUnmount","getFormState","touchOnBlur","touchOnChange","syncErrors","values","registerField","unregisterField"]));return(0,b.createElement)(e,g({},n,{handleSubmit:this.submit}))}},{key:"values",get:function(){return this.props.values}},{key:"valid",get:function(){return this.props.valid}},{key:"invalid",get:function(){return!this.valid}},{key:"fieldList",get:function(){return this.props.registeredFields.map(function(e){return r(e,"name")})}}]),s}(b.Component);S.displayName="Form("+(0,O["default"])(e)+")",S.WrappedComponent=e,S.childContextTypes={_reduxForm:b.PropTypes.object.isRequired},S.propTypes={adapter:b.PropTypes.func,destroyOnUnmount:b.PropTypes.bool,form:b.PropTypes.string.isRequired,initialValues:b.PropTypes.object,getFormState:b.PropTypes.func,validate:b.PropTypes.func,touchOnBlur:b.PropTypes.bool,touchOnChange:b.PropTypes.bool,registeredFields:b.PropTypes.any};var T=(0,x.connect)(function(e,o){var i=o.form,a=o.getFormState,u=o.initialValues,s=o.validate,c=r(a(e)||n,i)||n,p=r(c,"initial"),d=u||p||n,v=r(c,"values")||d,m=t(d,v),y=r(c,"asyncErrors"),g=r(c,"submitErrors"),b=s&&s(v,o)||{},E=_(b),x=f(y),C=f(g),w=!(E||x||C||l(r(c,"registeredFields"),function(e){return h(e,b,y,g)})),P=!!r(c,"anyTouched"),S=!!r(c,"submitting"),O=!!r(c,"submitFailed"),T=r(c,"error");return{anyTouched:P,asyncErrors:y,asyncValidating:r(c,"asyncValidating"),dirty:!m,error:T,initialized:!!p,invalid:!w,pristine:m,submitting:S,submitFailed:O,syncErrors:b,values:v,valid:w,registeredFields:r(c,"registeredFields")}},function(e,t){var n=function(e){return(0,d["default"])(e,t.form)},r=(0,v["default"])(re,n),o=(0,v["default"])(oe,n),i=(0,p["default"])(n(ee),!!t.touchOnBlur),a=(0,p["default"])(n(te),!!t.touchOnChange),u=n(ne),s=(0,C.bindActionCreators)(r,e),c={insert:(0,C.bindActionCreators)(o.arrayInsert,e),pop:(0,C.bindActionCreators)(o.arrayPop,e),push:(0,C.bindActionCreators)(o.arrayPush,e),remove:(0,C.bindActionCreators)(o.arrayRemove,e),shift:(0,C.bindActionCreators)(o.arrayShift,e),splice:(0,C.bindActionCreators)(o.arraySplice,e),swap:(0,C.bindActionCreators)(o.arraySwap,e),unshift:(0,C.bindActionCreators)(o.arrayUnshift,e)},l=g({},s,o,{blur:i,change:a,array:c,focus:u,dispatch:e});return function(){return l}},void 0,{withRef:!0}),R=(0,E["default"])(T(S),e);return R.defaultProps=w,function(e){function t(){return i(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return u(t,e),y(t,[{key:"submit",value:function(){return this.refs.wrapped.getWrappedInstance().submit()}},{key:"reset",value:function(){return this.refs.wrapped.getWrappedInstance().reset()}},{key:"render",value:function(){var e=this.props,t=e.initialValues,n=c(e,["initialValues"]);return(0,b.createElement)(R,g({},n,{ref:"wrapped",initialValues:s(t)}))}},{key:"valid",get:function(){return this.refs.wrapped.getWrappedInstance().valid}},{key:"invalid",get:function(){return this.refs.wrapped.getWrappedInstance().invalid}},{key:"values",get:function(){return this.refs.wrapped.getWrappedInstance().values}},{key:"fieldList",get:function(){return this.refs.wrapped.getWrappedInstance().fieldList}}]),t}(b.Component)}}};t["default"]=ue},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(279),i=r(o),a=function(e,t){return e==t||null==e&&""===t||""===e&&null==t||void 0},u=function(e,t){return(0,i["default"])(e,t,a)};t["default"]=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(45),u=r(a),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function p(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];if(void 0===e||void 0===t)return e;if(r.length){if(Array.isArray(e)){if(t<e.length){var u=p.apply(void 0,[e&&e[t]].concat(r));if(u!==e[t]){var c=[].concat(i(e));return c[t]=u,c}}return e}if(t in e){var l=p.apply(void 0,[e&&e[t]].concat(r));return e[t]===l?e:s({},e,o({},t,l))}return e}if(Array.isArray(e)){if(isNaN(t))throw new Error("Cannot delete non-numerical index from an array");if(t<e.length){var f=[].concat(i(e));return f.splice(t,1),f}return e}if(t in e){var d=s({},e);return delete d[t],d}return e},l=function(e,t){return c.apply(void 0,[e].concat(i((0,u["default"])(t))))};t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(45),u=r(a),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function p(e,t,n){for(var r=arguments.length,a=Array(r>3?r-3:0),u=3;u<r;u++)a[u-3]=arguments[u];if(void 0===n)return t;var c=p.apply(void 0,[e&&e[n],t].concat(a));if(!e){var l=isNaN(n)?{}:[];return l[n]=c,l}if(Array.isArray(e)){var f=[].concat(i(e));return f[n]=c,f}return s({},e,o({},n,c))},l=function(e,t,n){return c.apply(void 0,[e,n].concat(i((0,u["default"])(t))))};t["default"]=l},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=arguments[1],r=arguments[2],o=arguments[3],i=[].concat(n(e));return r?i.splice(t,r):i.splice(t,0,o),i};t["default"]=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e.displayName||e.name||"Component"};t["default"]=n},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(46),a=function(e){var t=e.getIn;return function(e){var n=o({prop:"values",getFormState:function(e){return t(e,"form")}},e),a=n.form,u=n.prop,s=n.getFormState;return(0,i.connect)(function(e){return r({},u,t(s(e),a+".values"))},function(){return{}})}};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(n,r,o){var a=e(n,r,o),s=a.dispatch,c=[],l={getState:a.getState,dispatch:function(e){return s(e)}};return c=t.map(function(e){return e(l)}),s=u["default"].apply(void 0,c)(a.dispatch),i({},a,{dispatch:s})}}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t["default"]=o;var a=n(173),u=r(a)},function(e,t){"use strict";function n(e,t){return function(){return t(e.apply(void 0,arguments))}}function r(e,t){if("function"==typeof e)return n(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var r=Object.keys(e),o={},i=0;i<r.length;i++){var a=r[i],u=e[a];"function"==typeof u&&(o[a]=n(u,t))}return o}t.__esModule=!0,t["default"]=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=t&&t.type,r=n&&'"'+n.toString()+'"'||"an action";return"Given action "+r+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function i(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:u.ActionTypes.INIT});if("undefined"==typeof r)throw new Error('Reducer "'+t+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:o}))throw new Error('Reducer "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle "+u.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function a(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var a=t[r];"function"==typeof e[a]&&(n[a]=e[a])}var u,s=Object.keys(n);try{i(n)}catch(c){u=c}return function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];if(u)throw u;for(var r=!1,i={},a=0;a<s.length;a++){var c=s[a],l=n[c],p=e[c],f=l(p,t);if("undefined"==typeof f){var d=o(c,t);throw new Error(d)}i[c]=f,r=r||f!==p}return r?i:e}}t.__esModule=!0,t["default"]=a;var u=n(174),s=n(65),c=(r(s),n(176));r(c)},function(e,t,n){(function(t){"use strict";e.exports=n(393)(t||window||this)}).call(t,function(){return this}())},function(e,t){"use strict";e.exports=function(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}}])})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(14),p=n(66),f=n(255),d=r(f),h=n(59),v=r(h),m=["_reduxForm"],y=function(e){var t=e.deepEqual,n=e.getIn,r=function(e,t){var n=v["default"].getIn(e,t);return n&&n._error?n._error:n},f=function(e){function r(){return i(this,r),a(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return u(r,e),c(r,[{key:"shouldComponentUpdate",value:function(e){var n=this,r=Object.keys(e),o=Object.keys(this.props);return r.length!==o.length||r.some(function(r){return!~m.indexOf(r)&&!t(n.props[r],e[r])})}},{key:"isPristine",value:function(){return this.props.pristine}},{key:"getValue",value:function(){return this.props.value}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this.props,t=e.component,r=e.withRef,i=e.name,a=e._reduxForm,u=o(e,["component","withRef","name","_reduxForm"]),c=a.asyncValidate,p=a.blur,f=a.change,h=a.focus,v=(0,d["default"])(n,i,s({},u,{name:i,blur:p,change:f,focus:h}),c),m=v.custom,y=o(v,["custom"]);if(r&&(y.ref="renderedComponent"),"string"==typeof t){var g=y.input;y.meta;return(0,l.createElement)(t,s({},g,m))}return(0,l.createElement)(t,s({},y,m))}}]),r}(l.Component);f.propTypes={component:l.PropTypes.oneOfType([l.PropTypes.func,l.PropTypes.string]).isRequired,props:l.PropTypes.object};var h=(0,p.connect)(function(e,t){var o=t.name,i=t._reduxForm,a=i.initialValues,u=i.getFormState,s=u(e),c=n(s,"initial."+o),l=void 0!==c?c:a&&n(a,o),p=n(s,"values."+o),f=n(s,"submitting"),d=r(n(s,"syncErrors"),o),h=p===l;return{asyncError:n(s,"asyncErrors."+o),asyncValidating:n(s,"asyncValidating")===o,dirty:!h,pristine:h,state:n(s,"fields."+o),submitError:n(s,"submitErrors."+o),submitting:f,syncError:d,value:p,_value:t.value}},void 0,void 0,{withRef:!0});return h(f)};t["default"]=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=n(224),c=r(s),l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(14),f=n(66),d=n(110),h=n(633),v=r(h),m=n(59),y=r(m),g=["_reduxForm","value"],b=function(e){var t=e.deepEqual,n=e.getIn,r=e.size,s=function(e,t){return y["default"].getIn(e,t+"._error")},h=function(e){function r(){return i(this,r),a(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return u(r,e),l(r,[{key:"shouldComponentUpdate",value:function(e){var n=this,r=Object.keys(e),o=Object.keys(this.props);return r.length!==o.length||r.some(function(r){return!~g.indexOf(r)&&!t(n.props[r],e[r])})}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this.props,t=e.component,r=e.withRef,i=e.name,a=(e._reduxForm,o(e,["component","withRef","name","_reduxForm"])),u=(0,v["default"])(n,i,a);return r&&(u.ref="renderedComponent"),(0,p.createElement)(t,u)}},{key:"dirty",get:function(){return this.props.dirty}},{key:"pristine",get:function(){return this.props.pristine}},{key:"value",get:function(){return this.props.value}}]),r}(p.Component);h.propTypes={component:p.PropTypes.oneOfType([p.PropTypes.func,p.PropTypes.string]).isRequired,props:p.PropTypes.object},h.contextTypes={_reduxForm:p.PropTypes.object};var m=(0,f.connect)(function(e,o){var i=o.name,a=o._reduxForm,u=a.initialValues,c=a.getFormState,l=c(e),p=n(l,"initial."+i)||u&&n(u,i),f=n(l,"values."+i),d=n(l,"submitting"),h=s(n(l,"syncErrors"),i),v=t(f,p);return{asyncError:n(l,"asyncErrors."+i+"._error"),dirty:!v,pristine:v,state:n(l,"fields."+i),submitError:n(l,"submitErrors."+i+"._error"),submitting:d,syncError:h,value:f,length:r(f)}},function(e,t){var n=t.name,r=t._reduxForm,o=r.arrayInsert,i=r.arrayMove,a=r.arrayPop,u=r.arrayPush,s=r.arrayRemove,l=r.arrayRemoveAll,p=r.arrayShift,f=r.arraySplice,h=r.arraySwap,v=r.arrayUnshift;return(0,c["default"])({arrayInsert:o,arrayMove:i,arrayPop:a,arrayPush:u,arrayRemove:s,arrayRemoveAll:l,arrayShift:p,arraySplice:f,arraySwap:h,arrayUnshift:v},function(t){return(0,d.bindActionCreators)(t.bind(null,n),e)})},void 0,{withRef:!0});return m(h)};t["default"]=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(14),p=n(66),f=n(255),d=r(f),h=n(59),v=r(h),m=["_reduxForm"],y=function(e){var t=e.deepEqual,n=e.getIn,r=function(e,t){var n=v["default"].getIn(e,t);return n&&n._error?n._error:n},f=function(e){function r(){return i(this,r),a(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return u(r,e),c(r,[{key:"shouldComponentUpdate",value:function(e){var n=this,r=Object.keys(e),o=Object.keys(this.props);return r.length!==o.length||r.some(function(r){return!~m.indexOf(r)&&!t(n.props[r],e[r])})}},{key:"isDirty",value:function(){var e=this.props._fields;return Object.keys(e).some(function(t){return e[t].dirty})}},{key:"getValues",value:function(){var e=this.props._fields;return Object.keys(e).reduce(function(t,n){return v["default"].setIn(t,n,e[n].value)},{})}},{key:"getRenderedComponent",value:function(){return this.refs.renderedComponent}},{key:"render",value:function(){var e=this.props,t=e.component,r=e.withRef,i=e._fields,a=e._reduxForm,u=o(e,["component","withRef","_fields","_reduxForm"]),c=a.asyncValidate,p=a.blur,f=a.change,h=a.focus,m=Object.keys(i).reduce(function(e,t){var r=i[t],a=(0,d["default"])(n,t,s({},r,u,{blur:p,change:f,focus:h}),c),l=a.custom,m=o(a,["custom"]);return e.custom=l,v["default"].setIn(e,t,m)},{}),y=m.custom,g=o(m,["custom"]);return r&&(g.ref="renderedComponent"),(0,l.createElement)(t,s({},g,y))}}]),r}(l.Component);f.propTypes={component:l.PropTypes.oneOfType([l.PropTypes.func,l.PropTypes.string]).isRequired,_fields:l.PropTypes.object.isRequired,props:l.PropTypes.object};var h=(0,p.connect)(function(e,t){var o=t.names,i=t._reduxForm,a=i.initialValues,u=i.getFormState,s=u(e);return{_fields:o.reduce(function(e,o){var i=n(s,"initial."+o),u=void 0!==i?i:a&&n(a,o),c=n(s,"values."+o),l=r(n(s,"syncErrors"),o),p=n(s,"submitting"),f=c===u;return e[o]={asyncError:n(s,"asyncErrors."+o),asyncValidating:n(s,"asyncValidating")===o,dirty:!f,pristine:f,state:n(s,"fields."+o),submitError:n(s,"submitErrors."+o),submitting:p,syncError:l,value:c,_value:t.value},e},{})}},void 0,void 0,{withRef:!0});return h(f)};t["default"]=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(14),l=n(74),p=r(l),f=n(625),d=r(f),h=n(174),v=r(h),m=function(e){var t=e.deepEqual,n=e.getIn,r=e.setIn,l=(0,d["default"])({deepEqual:t,getIn:n}),f=function(e){function t(e,n){o(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(!n._reduxForm)throw new Error("Field must be inside a component decorated with reduxForm()");return r.normalize=r.normalize.bind(r),r}return a(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v["default"])(this,e,t)}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.name,"Field")}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.context._reduxForm.unregister(this.props.name),this.context._reduxForm.register(e.name,"Field"))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return(0,p["default"])(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to Field"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"normalize",value:function n(e,t){var n=this.props.normalize;if(!n)return t;var o=this.context._reduxForm.getValues(),i=this.value,a=r(o,e,t);return n(t,i,a,o)}},{key:"render",value:function(){return(0,c.createElement)(l,u({},this.props,{normalize:this.normalize,_reduxForm:this.context._reduxForm,ref:"connected"}))}},{key:"name",get:function(){return this.props.name}},{key:"dirty",get:function(){return!this.pristine}},{key:"pristine",get:function(){return this.refs.connected.getWrappedInstance().isPristine()}},{key:"value",get:function(){return this.refs.connected&&this.refs.connected.getWrappedInstance().getValue()}}]),t}(c.Component);return f.propTypes={name:c.PropTypes.string.isRequired,component:c.PropTypes.oneOfType([c.PropTypes.func,c.PropTypes.string]).isRequired,format:c.PropTypes.func,normalize:c.PropTypes.func,parse:c.PropTypes.func,props:c.PropTypes.object},f.contextTypes={_reduxForm:c.PropTypes.object},f};t["default"]=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(14),l=n(74),p=r(l),f=n(626),d=r(f),h=n(174),v=r(h),m=function(e){var t=e.deepEqual,n=e.getIn,r=e.size,l=(0,d["default"])({deepEqual:t,getIn:n,size:r}),f=function(e){function t(e,n){o(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(!n._reduxForm)throw new Error("FieldArray must be inside a component decorated with reduxForm()");return r}return a(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v["default"])(this,e,t)}},{key:"componentWillMount",value:function(){this.context._reduxForm.register(this.name,"FieldArray")}},{key:"componentWillReceiveProps",value:function(e){this.props.name!==e.name&&(this.context._reduxForm.unregister(this.props.name),this.context._reduxForm.register(e.name,"FieldArray"))}},{key:"componentWillUnmount",value:function(){this.context._reduxForm.unregister(this.name)}},{key:"getRenderedComponent",value:function(){return(0,p["default"])(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to FieldArray"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){return(0,c.createElement)(l,u({},this.props,{syncError:this.syncError,_reduxForm:this.context._reduxForm,ref:"connected"}))}},{key:"name",get:function(){return this.props.name}},{key:"dirty",get:function(){return this.refs.connected.getWrappedInstance().dirty}},{key:"pristine",get:function(){return this.refs.connected.getWrappedInstance().pristine}},{key:"value",get:function(){return this.refs.connected.getWrappedInstance().value}}]),t}(c.Component);return f.propTypes={name:c.PropTypes.string.isRequired,component:c.PropTypes.func.isRequired,props:c.PropTypes.object},f.contextTypes={_reduxForm:c.PropTypes.object},f};t["default"]=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(14),l=n(74),p=r(l),f=n(627),d=r(f),h=n(174),v=r(h),m=n(59),y=r(m),g=function(e){return e?Array.isArray(e)||e._isFieldArray?void 0:new Error('Invalid prop "names" supplied to <Fields/>. Must be either an array of strings or the fields array generated by FieldArray.'):new Error('No "names" prop was specified <Fields/>')},b=function(e){var t=e.deepEqual,n=e.getIn,r=(0,d["default"])({deepEqual:t,getIn:n}),l=function(e){function t(e,n){o(this,t);var r=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));if(!n._reduxForm)throw new Error("Fields must be inside a component decorated with reduxForm()");return r}return a(t,e),s(t,[{key:"shouldComponentUpdate",value:function(e,t){return(0,v["default"])(this,e,t)}},{key:"componentWillMount",value:function(){var e=g(this.props.names);if(e)throw e;var t=this.context._reduxForm.register;this.names.forEach(function(e){return t(e,"Field")})}},{key:"componentWillReceiveProps",value:function(e){var t=this;y["default"].deepEqual(this.props.names,e.names)||!function(){var n=t.context._reduxForm,r=n.register,o=n.unregister;t.props.names.forEach(o),e.names.forEach(function(e){return r(e,"Field")})}()}},{key:"componentWillUnmount",value:function(){this.names.forEach(this.context._reduxForm.unregister)}},{key:"getRenderedComponent",value:function(){return(0,p["default"])(this.props.withRef,"If you want to access getRenderedComponent(), you must specify a withRef prop to Fields"),this.refs.connected.getWrappedInstance().getRenderedComponent()}},{key:"render",value:function(){return(0,c.createElement)(r,u({},this.props,{_reduxForm:this.context._reduxForm,ref:"connected"}))}},{key:"names",get:function(){return this.props.names}},{key:"dirty",get:function(){return this.refs.connected.getWrappedInstance().isDirty()}},{key:"pristine",get:function(){return!this.dirty}},{key:"values",get:function(){return this.refs.connected&&this.refs.connected.getWrappedInstance().getValues()}}]),t}(c.Component);return l.propTypes={names:function(e,t){return g(e[t])},component:c.PropTypes.oneOfType([c.PropTypes.func,c.PropTypes.string]).isRequired,format:c.PropTypes.func,parse:c.PropTypes.func,props:c.PropTypes.object},l.contextTypes={_reduxForm:c.PropTypes.object},l};t["default"]=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(139),i=r(o),a=function(e,t,n,r){t(r);var o=e();if(!(0,i["default"])(o))throw new Error("asyncValidate function passed to reduxForm must return a promise");var a=function(e){return function(t){if(t&&Object.keys(t).length)return n(t),Promise.reject(t);if(e)throw n(),new Error("Asynchronous validation promise was rejected without errors.");return n(),Promise.resolve()}};return o.then(a(!1),a(!0))};t["default"]=a},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a=n(645),u=o(a),s=n(646),c=o(s),l=n(628),p=o(l),f=n(630),d=o(f),h=n(629),v=o(h),m=n(641),y=o(m),g=n(655),b=o(g),_=n(647),E=o(_),x=n(648),C=o(x),w=n(649),P=o(w),S=n(261),O=o(S),T=n(173),R=o(T),A=n(253),k=o(A),M=n(644),N=o(M),I=n(254),j=r(I),F=n(172),D=r(F),L=function(e){return i({actionTypes:D},j,{Field:(0,p["default"])(e),Fields:(0,d["default"])(e),FieldArray:(0, v["default"])(e),formValueSelector:(0,y["default"])(e),getFormValues:(0,E["default"])(e),isDirty:(0,C["default"])(e),isInvalid:(0,P["default"])(e),isPristine:(0,O["default"])(e),isValid:(0,R["default"])(e),propTypes:N["default"],reduxForm:(0,c["default"])(e),reducer:(0,u["default"])(e),SubmissionError:k["default"],values:(0,b["default"])(e)})};t["default"]=L},function(e,t){"use strict";function n(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t,o){var i=o.arrayInsert,a=o.arrayMove,u=o.arrayPop,s=o.arrayPush,c=o.arrayRemove,l=o.arrayRemoveAll,p=o.arrayShift,f=(o.arraySplice,o.arraySwap),d=o.arrayUnshift,h=o.asyncError,v=o.dirty,m=o.length,y=o.pristine,g=o.submitError,b=o.state,_=(o.submitFailed,o.submitting),E=o.syncError,x=o.value,C=o.props,w=n(o,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncError","dirty","length","pristine","submitError","state","submitFailed","submitting","syncError","value","props"]),P=E||h||g;return r({fields:{_isFieldArray:!0,forEach:function(e){return(x||[]).forEach(function(n,r){return e(t+"["+r+"]",r)})},insert:i,length:m,map:function(e){return(x||[]).map(function(n,r){return e(t+"["+r+"]",r)})},move:a,pop:function(){return u(),e(x,m-1)},push:s,reduce:function(e,n){return(x||[]).reduce(function(n,r,o){return e(n,t+"["+o+"]",o)},n)},remove:c,removeAll:l,shift:function(){return p(),e(x,0)},swap:f,unshift:d},meta:{dirty:v,error:P,invalid:!!P,pristine:y,submitting:_,touched:!(!b||!e(b,"touched")),valid:!P}},C,w)};t["default"]=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t=e.initialized,n=e.trigger,r=e.pristine,o=e.syncValidationPasses;if(!o)return!1;switch(n){case"blur":return!0;case"submit":return!r||!t;default:return!1}};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(102),i=r(o),a=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn,o=e.deleteIn,a=e.setIn,u=function s(e,u){if("]"===u[u.length-1]){var c=(0,i["default"])(u);c.pop();var l=r(e,c.join("."));return l?a(e,u,void 0):e}var p=o(e,u),f=u.lastIndexOf(".");if(f>0){var d=u.substring(0,f);if("]"!==d[d.length-1]){var h=r(p,d);if(t(h,n))return s(p,d)}}return p};return u};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(257),i=r(o),a=n(260),u=r(a),s=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.after,r=t.normalize,o=t.parse;return function(t){var a=(0,i["default"])(t,u["default"]);o&&(a=o(a)),r&&(a=r(a)),e(a),n&&n(a)}};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(257),i=r(o),a=n(260),u=r(a),s=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=t.parse,r=t.normalize;return function(t){var o=(0,i["default"])(t,u["default"]);n&&(o=n(o)),r&&(o=r(o)),e(o)}};t["default"]=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(256),o=function(e,t){return function(e){t(e.dataTransfer.getData(r.dataKey)),e.preventDefault()}};t["default"]=o},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return function(){return t(e)}};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(259),i=r(o),a=function(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(0,i["default"])(t)?e.apply(void 0,r):e.apply(void 0,[t].concat(r))}};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(74),i=r(o),a=n(59),u=r(a),s=function(e){var t=e.getIn;return function(e){var n=arguments.length<=1||void 0===arguments[1]?function(e){return t(e,"form")}:arguments[1];return(0,i["default"])(e,"Form value must be specified"),function(r){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return(0,i["default"])(a.length,"No fields specified"),1===a.length?t(n(r),e+".values."+a[0]):a.reduce(function(o,i){var a=t(n(r),e+".values."+i);return void 0===a?o:u["default"].setIn(o,i,a)},{})}}};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=n(139),a=r(i),u=n(253),s=r(u),c=function(e,t,n,r,i){var u=t.dispatch,c=t.onSubmitFail,l=t.onSubmitSuccess,p=t.startSubmit,f=t.stopSubmit,d=t.setSubmitFailed,h=t.setSubmitSucceeded,v=t.syncErrors,m=t.touch,y=t.values,g=t.persistentSubmitErrors;if(m.apply(void 0,o(i)),n||g){var b=function(){var n=void 0;try{n=e(y,u,t)}catch(r){var v=r instanceof s["default"]?r.errors:void 0;return d.apply(void 0,o(i)),c&&c(v,u),v}return(0,a["default"])(n)?(p(),n.then(function(e){return f(),h(),l&&l(e,u),e},function(e){var t=e instanceof s["default"]?e.errors:void 0;return f(t),d.apply(void 0,o(i)),c&&c(t,u),t})):(h(),l&&l(n,u),n)},_=r&&r();return _?_.then(b,function(e){return d.apply(void 0,o(i)),c&&c(e,u),Promise.reject(e)}):b()}return d.apply(void 0,o(i)),c&&c(v,u),v};t["default"]=c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(262),i=r(o),a=function(e,t){switch(t){case"Field":return[e,e+"._error"];case"FieldArray":return[e+"._error"]}},u=function(e){var t=e.getIn,n=function(e,n,r,o){if(!n&&!r&&!o)return!1;var u=t(e,"name"),s=t(e,"type");return a(u,s).some(function(e){return(0,i["default"])(n,e)||t(r,e)||t(o,e)})};return n};t["default"]=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(14),o=r.PropTypes.any,i=r.PropTypes.bool,a=r.PropTypes.func,u=r.PropTypes.shape,s={asyncValidating:i.isRequired,dirty:i.isRequired,error:o,invalid:i.isRequired,initialized:i.isRequired,pristine:i.isRequired,submitting:i.isRequired,submitFailed:i.isRequired,submitSucceeded:i.isRequired,valid:i.isRequired,array:u({insert:a.isRequired,move:a.isRequired,pop:a.isRequired,push:a.isRequired,remove:a.isRequired,removeAll:a.isRequired,shift:a.isRequired,splice:a.isRequired,swap:a.isRequired,unshift:a.isRequired}),asyncValidate:a.isRequired,blur:a.isRequired,change:a.isRequired,destroy:a.isRequired,dispatch:a.isRequired,handleSubmit:a.isRequired,initialize:a.isRequired,reset:a.isRequired,touch:a.isRequired,untouch:a.isRequired};t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var a=n(172);n(266);var u=n(635),s=r(u),c=function(e){function t(e){return e.plugin=function(e){var n=this;return t(function(){var t=arguments.length<=0||void 0===arguments[0]?u:arguments[0],r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return Object.keys(e).reduce(function(t,n){var o=c(t,n),i=e[n](o,r);return i===o?t:l(t,n,i)},n(t,r))})},e}var n,r=e.deepEqual,u=e.empty,c=e.getIn,l=e.setIn,p=e.deleteIn,f=e.fromJS,d=e.size,h=e.some,v=e.splice,m=(0,s["default"])(e),y=function(e,t,n,r,o,i,a){var u=c(e,t+"."+n);return u||a?l(e,t+"."+n,v(u,r,o,i)):e},g=["values","fields","submitErrors","asyncErrors"],b=function(e,t,n,r,o){var i=e,a=null!=o?u:void 0;return i=y(i,"values",t,n,r,o,!0),i=y(i,"fields",t,n,r,a),i=y(i,"submitErrors",t,n,r,a),i=y(i,"asyncErrors",t,n,r,a)},_=(n={},o(n,a.ARRAY_INSERT,function(e,t){var n=t.meta,r=n.field,o=n.index,i=t.payload;return b(e,r,o,0,i)}),o(n,a.ARRAY_MOVE,function(e,t){var n=t.meta,r=n.field,o=n.from,i=n.to,a=c(e,"values."+r),u=a?d(a):0,s=e;return u&&g.forEach(function(e){var t=e+"."+r;if(c(s,t)){var n=c(s,t+"["+o+"]");s=l(s,t,v(c(s,t),o,1)),s=l(s,t,v(c(s,t),i,0,n))}}),s}),o(n,a.ARRAY_POP,function(e,t){var n=t.meta.field,r=c(e,"values."+n),o=r?d(r):0;return o?b(e,n,o-1,1):e}),o(n,a.ARRAY_PUSH,function(e,t){var n=t.meta.field,r=t.payload,o=c(e,"values."+n),i=o?d(o):0;return b(e,n,i,0,r)}),o(n,a.ARRAY_REMOVE,function(e,t){var n=t.meta,r=n.field,o=n.index;return b(e,r,o,1)}),o(n,a.ARRAY_REMOVE_ALL,function(e,t){var n=t.meta.field,r=c(e,"values."+n),o=r?d(r):0;return o?b(e,n,0,o):e}),o(n,a.ARRAY_SHIFT,function(e,t){var n=t.meta.field;return b(e,n,0,1)}),o(n,a.ARRAY_SPLICE,function(e,t){var n=t.meta,r=n.field,o=n.index,i=n.removeNum,a=t.payload;return b(e,r,o,i,a)}),o(n,a.ARRAY_SWAP,function(e,t){var n=t.meta,r=n.field,o=n.indexA,i=n.indexB,a=e;return g.forEach(function(e){var t=c(a,e+"."+r+"["+o+"]"),n=c(a,e+"."+r+"["+i+"]");void 0===t&&void 0===n||(a=l(a,e+"."+r+"["+o+"]",n),a=l(a,e+"."+r+"["+i+"]",t))}),a}),o(n,a.ARRAY_UNSHIFT,function(e,t){var n=t.meta.field,r=t.payload;return b(e,n,0,0,r)}),o(n,a.AUTOFILL,function(e,t){var n=t.meta.field,r=t.payload,o=e;return o=m(o,"asyncErrors."+n),o=m(o,"submitErrors."+n),o=l(o,"fields."+n+".autofilled",!0),o=l(o,"values."+n,r)}),o(n,a.BLUR,function(e,t){var n=t.meta,r=n.field,o=n.touch,i=t.payload,a=e,u=c(a,"initial."+r);return void 0!==u||""!==i&&i!==!1?void 0!==i&&(a=l(a,"values."+r,i)):a=m(a,"values."+r),r===c(a,"active")&&(a=p(a,"active")),a=p(a,"fields."+r+".active"),o&&(a=l(a,"fields."+r+".touched",!0),a=l(a,"anyTouched",!0)),a}),o(n,a.CHANGE,function(e,t){var n=t.meta,r=n.field,o=n.touch,i=n.persistentSubmitErrors,a=t.payload,u=e,s=c(u,"initial."+r);return void 0!==s||""!==a&&a!==!1?void 0!==a&&(u=l(u,"values."+r,a)):u=m(u,"values."+r),u=m(u,"asyncErrors."+r),i||(u=m(u,"submitErrors."+r)),u=m(u,"fields."+r+".autofilled"),i||(u=m(u,"error")),o&&(u=l(u,"fields."+r+".touched",!0),u=l(u,"anyTouched",!0)),u}),o(n,a.FOCUS,function(e,t){var n=t.meta.field,r=e,o=c(e,"active");return r=p(r,"fields."+o+".active"),r=l(r,"fields."+n+".visited",!0),r=l(r,"fields."+n+".active",!0),r=l(r,"active",n)}),o(n,a.INITIALIZE,function(e,t){var n=t.payload,o=t.meta.keepDirty,i=f(n),a=u,s=c(e,"registeredFields");s&&(a=l(a,"registeredFields",s));var p=i;return o&&s&&!function(){var t=c(e,"values"),n=c(e,"initial");s.forEach(function(e){var o=e.name,i=c(n,o),a=c(t,o);r(a,i)||(p=l(p,o,a))})}(),a=l(a,"values",p),a=l(a,"initial",i)}),o(n,a.REGISTER_FIELD,function(e,t){var n=t.payload,r=n.name,o=n.type,i=e,a=c(i,"registeredFields");if(h(a,function(e){return c(e,"name")===r}))return e;var u=f({name:r,type:o});return i=l(e,"registeredFields",v(a,d(a),0,u))}),o(n,a.RESET,function(e){var t=u,n=c(e,"registeredFields");n&&(t=l(t,"registeredFields",n));var r=c(e,"initial");return r&&(t=l(t,"values",r),t=l(t,"initial",r)),t}),o(n,a.START_ASYNC_VALIDATION,function(e,t){var n=t.meta.field;return l(e,"asyncValidating",n||!0)}),o(n,a.START_SUBMIT,function(e){return l(e,"submitting",!0)}),o(n,a.STOP_ASYNC_VALIDATION,function(e,t){var n=t.payload,r=e;if(r=p(r,"asyncValidating"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);o&&(r=l(r,"error",o)),r=Object.keys(a).length?l(r,"asyncErrors",f(a)):p(r,"asyncErrors")}else r=p(r,"error"),r=p(r,"asyncErrors");return r}),o(n,a.STOP_SUBMIT,function(e,t){var n=t.payload,r=e;if(r=p(r,"submitting"),r=p(r,"submitFailed"),r=p(r,"submitSucceeded"),n&&Object.keys(n).length){var o=n._error,a=i(n,["_error"]);r=o?l(r,"error",o):p(r,"error"),r=Object.keys(a).length?l(r,"submitErrors",f(a)):p(r,"submitErrors"),r=l(r,"submitFailed",!0)}else r=l(r,"submitSucceeded",!0),r=p(r,"error"),r=p(r,"submitErrors");return r}),o(n,a.SET_SUBMIT_FAILED,function(e,t){var n=t.meta.fields,r=e;return r=l(r,"submitFailed",!0),r=p(r,"submitSucceeded"),r=p(r,"submitting"),n.forEach(function(e){return r=l(r,"fields."+e+".touched",!0)}),n.length&&(r=l(r,"anyTouched",!0)),r}),o(n,a.SET_SUBMIT_SUCCEEDED,function(e){var t=e;return t=p(t,"submitFailed"),t=l(t,"submitSucceeded",!0)}),o(n,a.TOUCH,function(e,t){var n=t.meta.fields,r=e;return n.forEach(function(e){return r=l(r,"fields."+e+".touched",!0)}),r=l(r,"anyTouched",!0)}),o(n,a.UNREGISTER_FIELD,function(e,t){var n=t.payload.name,r=c(e,"registeredFields");if(!r)return e;var o=r.findIndex(function(e){return c(e,"name")===n});return d(r)<=1&&o>=0?m(e,"registeredFields"):o<0?e:l(e,"registeredFields",v(r,o,1))}),o(n,a.UNTOUCH,function(e,t){var n=t.meta.fields,r=e;return n.forEach(function(e){return r=p(r,"fields."+e+".touched")}),r}),o(n,a.UPDATE_SYNC_ERRORS,function(e,t){var n=t.payload,r=n.syncErrors,o=n.error,i=e;return i=o?l(i,"error",o):p(i,"error"),i=Object.keys(r).length?l(i,"syncErrors",r):p(i,"syncErrors")}),n),E=function(){var e=arguments.length<=0||void 0===arguments[0]?u:arguments[0],t=arguments[1],n=_[t.type];return n?n(e,t):e},x=function(e){return function(){var t=arguments.length<=0||void 0===arguments[0]?u:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=n&&n.meta&&n.meta.form;if(!r)return t;if(n.type===a.DESTROY)return m(t,n.meta.form);var o=c(t,r),i=e(o,n);return i===o?t:l(t,r,i)}};return t(x(E))};t["default"]=c},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function l(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var p=n(224),f=o(p),d=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},m=n(14),y=n(207),g=o(y),b=n(66),_=n(110),E=n(139),x=o(E),C=n(654),w=o(C),P=n(254),S=r(P),O=n(642),T=o(O),R=n(259),A=o(R),k=n(640),M=o(k),N=n(631),I=o(N),j=n(634),F=o(j),D=n(59),L=o(D),U=n(173),V=o(U),B=function(e){return Boolean(e&&e.prototype&&"object"===v(e.prototype.isReactComponent))},W=S.arrayInsert,q=S.arrayMove,H=S.arrayPop,z=S.arrayPush,Y=S.arrayRemove,K=S.arrayRemoveAll,G=S.arrayShift,$=S.arraySplice,X=S.arraySwap,Q=S.arrayUnshift,Z=S.blur,J=S.change,ee=S.focus,te=l(S,["arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","blur","change","focus"]),ne={arrayInsert:W,arrayMove:q,arrayPop:H,arrayPush:z,arrayRemove:Y,arrayRemoveAll:K,arrayShift:G,arraySplice:$,arraySwap:X,arrayUnshift:Q},re=[].concat(c(Object.keys(S)),["array","asyncErrors","initialized","initialValues","syncErrors","values","registeredFields"]),oe=function(e){if(!e||"function"!=typeof e)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return e},ie=function(e){var t=e.deepEqual,n=e.empty,r=e.getIn,o=e.setIn,c=e.fromJS,p=(0,V["default"])(e);return function(e){var y=h({touchOnBlur:!0,touchOnChange:!1,persistentSubmitErrors:!1,destroyOnUnmount:!0,shouldAsyncValidate:F["default"],enableReinitialize:!1,keepDirtyOnReinitialize:!1,getFormState:function(e){return r(e,"form")},pure:!0},e);return function(e){var E=function(n){function c(e){a(this,c);var t=u(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,e));return t.submit=t.submit.bind(t),t.reset=t.reset.bind(t),t.asyncValidate=t.asyncValidate.bind(t),t.getValues=t.getValues.bind(t),t.register=t.register.bind(t),t.unregister=t.unregister.bind(t),t.submitCompleted=t.submitCompleted.bind(t),t}return s(c,n),d(c,[{key:"getChildContext",value:function(){var e=this;return{_reduxForm:h({},this.props,{getFormState:function(t){return r(e.props.getFormState(t),e.props.form)},asyncValidate:this.asyncValidate,getValues:this.getValues,register:this.register,unregister:this.unregister})}}},{key:"initIfNeeded",value:function(e){var n=this.props.enableReinitialize;if(e){if((n||!e.initialized)&&!t(this.props.initialValues,e.initialValues)){var r=e.initialized&&this.props.keepDirtyOnReinitialize;this.props.initialize(e.initialValues,r)}}else!this.props.initialValues||this.props.initialized&&!n||this.props.initialize(this.props.initialValues)}},{key:"updateSyncErrorsIfNeeded",value:function(e,t){var n=this.props,r=n.error,o=n.syncErrors,i=n.updateSyncErrors,a=!(o&&Object.keys(o).length||r),u=!(e&&Object.keys(e).length||t);a&&u||L["default"].deepEqual(o,e)&&L["default"].deepEqual(r,t)||i(e,t)}},{key:"validateIfNeeded",value:function(e){var n=this.props,r=n.validate,o=n.values;if(r)if(e){if(!t(o,e.values)){var i=r(e.values,e),a=i._error,u=l(i,["_error"]);this.updateSyncErrorsIfNeeded(u,a)}}else{var s=r(o,this.props),c=s._error,p=l(s,["_error"]);this.updateSyncErrorsIfNeeded(p,c)}}},{key:"componentWillMount",value:function(){this.initIfNeeded(),this.validateIfNeeded()}},{key:"componentWillReceiveProps",value:function(e){this.initIfNeeded(e),this.validateIfNeeded(e)}},{key:"shouldComponentUpdate",value:function(e){var n=this;return!y.pure||Object.keys(e).some(function(r){return!~re.indexOf(r)&&!t(n.props[r],e[r])})}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.destroyOnUnmount,n=e.destroy;t&&(this.destroyed=!0,n())}},{key:"getValues",value:function(){return this.props.values}},{key:"isValid",value:function(){return this.props.valid}},{key:"isPristine",value:function(){return this.props.pristine}},{key:"register",value:function(e,t){this.props.registerField(e,t)}},{key:"unregister",value:function(e){this.destroyed||this.props.unregisterField(e)}},{key:"getFieldList",value:function(){return this.props.registeredFields.map(function(e){return r(e,"name")})}},{key:"asyncValidate",value:function p(e,t){var n=this,i=this.props,a=i.asyncBlurFields,u=i.asyncErrors,p=i.asyncValidate,s=i.dispatch,c=i.initialized,l=i.pristine,f=i.shouldAsyncValidate,d=i.startAsyncValidation,h=i.stopAsyncValidation,m=i.syncErrors,y=i.values,g=!e;if(p){var b=function(){var i=g?y:o(y,e,t),v=g||!r(m,e),b=!g&&(!a||~a.indexOf(e.replace(/\[[0-9]+\]/g,"[]")));if((b||g)&&f({asyncErrors:u,initialized:c,trigger:g?"submit":"blur",blurredField:e,pristine:l,syncValidationPasses:v}))return{v:(0,I["default"])(function(){return p(i,s,n.props,e)},d,h,e)}}();if("object"===("undefined"==typeof b?"undefined":v(b)))return b.v}}},{key:"submitCompleted",value:function(e){return delete this.submitPromise,e}},{key:"listenToSubmit",value:function(e){var t=this;return(0,x["default"])(e)?(this.submitPromise=e,e.then(this.submitCompleted,function(){t.submitCompleted()})):e}},{key:"submit",value:function(e){var t=this,n=this.props.onSubmit;return e&&!(0,A["default"])(e)?(0,M["default"])(function(){return!t.submitPromise&&t.listenToSubmit((0,T["default"])(oe(e),t.props,t.isValid(),t.asyncValidate,t.getFieldList()))}):this.submitPromise?void 0:this.listenToSubmit((0,T["default"])(oe(n),this.props,this.isValid(),this.asyncValidate,this.getFieldList()))}},{key:"reset",value:function(){this.props.reset()}},{key:"render",value:function(){var t=this.props,n=t.anyTouched,r=(t.arrayInsert,t.arrayMove,t.arrayPop,t.arrayPush,t.arrayRemove,t.arrayRemoveAll,t.arrayShift,t.arraySplice,t.arraySwap,t.arrayUnshift,t.asyncErrors,t.asyncValidate,t.asyncValidating),o=t.blur,a=t.change,u=t.destroy,s=(t.destroyOnUnmount,t.dirty),c=t.dispatch,p=(t.enableReinitialize,t.error),f=(t.focus,t.form),d=(t.getFormState,t.initialize),v=t.initialized,y=t.initialValues,g=t.invalid,b=(t.keepDirtyOnReinitialize,t.pristine),E=t.propNamespace,x=(t.registeredFields,t.registerField,t.reset),C=(t.setSubmitFailed,t.setSubmitSucceeded,t.shouldAsyncValidate,t.startAsyncValidation,t.startSubmit,t.stopAsyncValidation,t.stopSubmit,t.submitting),w=t.submitFailed,P=t.submitSucceeded,S=t.touch,O=(t.touchOnBlur,t.touchOnChange,t.persistentSubmitErrors,t.syncErrors,t.unregisterField,t.untouch),T=(t.updateSyncErrors,t.valid),R=(t.values,l(t,["anyTouched","arrayInsert","arrayMove","arrayPop","arrayPush","arrayRemove","arrayRemoveAll","arrayShift","arraySplice","arraySwap","arrayUnshift","asyncErrors","asyncValidate","asyncValidating","blur","change","destroy","destroyOnUnmount","dirty","dispatch","enableReinitialize","error","focus","form","getFormState","initialize","initialized","initialValues","invalid","keepDirtyOnReinitialize","pristine","propNamespace","registeredFields","registerField","reset","setSubmitFailed","setSubmitSucceeded","shouldAsyncValidate","startAsyncValidation","startSubmit","stopAsyncValidation","stopSubmit","submitting","submitFailed","submitSucceeded","touch","touchOnBlur","touchOnChange","persistentSubmitErrors","syncErrors","unregisterField","untouch","updateSyncErrors","valid","values"])),A=h({anyTouched:n,asyncValidate:this.asyncValidate,asyncValidating:r},(0,_.bindActionCreators)({blur:o,change:a},c),{destroy:u,dirty:s,dispatch:c,error:p,form:f,handleSubmit:this.submit,initialize:d,initialized:v,initialValues:y,invalid:g,pristine:b,reset:x,submitting:C,submitFailed:w,submitSucceeded:P,touch:S,untouch:O,valid:T}),k=h({},E?i({},E,A):A,R);return B(e)&&(k.ref="wrapped"),(0,m.createElement)(e,k)}}]),c}(m.Component);E.displayName="Form("+(0,w["default"])(e)+")",E.WrappedComponent=e,E.childContextTypes={_reduxForm:m.PropTypes.object.isRequired},E.propTypes={destroyOnUnmount:m.PropTypes.bool,form:m.PropTypes.string.isRequired,initialValues:m.PropTypes.object,getFormState:m.PropTypes.func,onSubmitFail:m.PropTypes.func,onSubmitSuccess:m.PropTypes.func,propNameSpace:m.PropTypes.string,validate:m.PropTypes.func,touchOnBlur:m.PropTypes.bool,touchOnChange:m.PropTypes.bool,persistentSubmitErrors:m.PropTypes.bool,registeredFields:m.PropTypes.any};var C=(0,b.connect)(function(e,o){var i=o.form,a=o.getFormState,u=o.initialValues,s=r(a(e)||n,i)||n,c=r(s,"initial"),l=u||c||n,f=r(s,"values")||l,d=t(l,f),h=r(s,"asyncErrors"),v=r(s,"syncErrors")||{},m=r(s,"registeredFields")||[],y=p(i,a)(e),g=!!r(s,"anyTouched"),b=!!r(s,"submitting"),_=!!r(s,"submitFailed"),E=!!r(s,"submitSucceeded"),x=r(s,"error");return{anyTouched:g,asyncErrors:h,asyncValidating:r(s,"asyncValidating")||!1,dirty:!d,error:x,initialized:!!c,invalid:!y,pristine:d,registeredFields:m,submitting:b,submitFailed:_,submitSucceeded:E,syncErrors:v,values:f,valid:y}},function(e,t){var n=function(e){return e.bind(null,t.form)},r=(0,f["default"])(te,n),o=(0,f["default"])(ne,n),i=function(e,n){return Z(t.form,e,n,!!t.touchOnBlur)},a=function(e,n){return J(t.form,e,n,!!t.touchOnChange,!!t.persistentSubmitErrors)},u=n(ee),s=(0,_.bindActionCreators)(r,e),c={insert:(0,_.bindActionCreators)(o.arrayInsert,e),move:(0,_.bindActionCreators)(o.arrayMove,e),pop:(0,_.bindActionCreators)(o.arrayPop,e),push:(0,_.bindActionCreators)(o.arrayPush,e),remove:(0,_.bindActionCreators)(o.arrayRemove,e),removeAll:(0,_.bindActionCreators)(o.arrayRemoveAll,e),shift:(0,_.bindActionCreators)(o.arrayShift,e),splice:(0,_.bindActionCreators)(o.arraySplice,e),swap:(0,_.bindActionCreators)(o.arraySwap,e),unshift:(0,_.bindActionCreators)(o.arrayUnshift,e)},l=h({},s,o,{blur:i,change:a,array:c,focus:u,dispatch:e});return function(){return l}},void 0,{withRef:!0}),P=(0,g["default"])(C(E),e);return P.defaultProps=y,function(e){function t(){return a(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),d(t,[{key:"submit",value:function(){return this.refs.wrapped.getWrappedInstance().submit()}},{key:"reset",value:function(){return this.refs.wrapped.getWrappedInstance().reset()}},{key:"render",value:function(){var e=this.props,t=e.initialValues,n=l(e,["initialValues"]);return(0,m.createElement)(P,h({},n,{ref:"wrapped",initialValues:c(t)}))}},{key:"valid",get:function(){return this.refs.wrapped.getWrappedInstance().isValid()}},{key:"invalid",get:function(){return!this.valid}},{key:"pristine",get:function(){return this.refs.wrapped.getWrappedInstance().isPristine()}},{key:"dirty",get:function(){return!this.pristine}},{key:"values",get:function(){return this.refs.wrapped.getWrappedInstance().getValues()}},{key:"fieldList",get:function(){return this.refs.wrapped.getWrappedInstance().getFieldList()}},{key:"wrappedInstance",get:function(){return this.refs.wrapped.getWrappedInstance().refs.wrapped}}]),t}(m.Component)}}};t["default"]=ie},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){var t=e.getIn;return function(e){var n=arguments.length<=1||void 0===arguments[1]?function(e){return t(e,"form")}:arguments[1];return function(r){return t(n(r),e+".values")}}};t["default"]=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(261),i=r(o),a=function(e){return function(t,n){var r=(0,i["default"])(e)(t,n);return function(e){return!r(e)}}};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(173),i=r(o),a=function(e){return function(t,n){var r=(0,i["default"])(e)(t,n);return function(e){return!r(e)}}};t["default"]=a},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(542),i=r(o),a=function(e,t){return e==t||(!(null!=e&&""!==e&&e!==!1||null!=t&&""!==t&&t!==!1)||(!e||!t||e._error===t._error)&&void 0)},u=function(e,t){return(0,i["default"])(e,t,a)};t["default"]=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(102),u=r(a),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function p(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];if(void 0===e||void 0===t)return e;if(r.length){if(Array.isArray(e)){if(t<e.length){var u=p.apply(void 0,[e&&e[t]].concat(r));if(u!==e[t]){var c=[].concat(i(e));return c[t]=u,c}}return e}if(t in e){var l=p.apply(void 0,[e&&e[t]].concat(r));return e[t]===l?e:s({},e,o({},t,l))}return e}if(Array.isArray(e)){if(isNaN(t))throw new Error("Cannot delete non-numerical index from an array");if(t<e.length){var f=[].concat(i(e));return f.splice(t,1),f}return e}if(t in e){var d=s({},e);return delete d[t],d}return e},l=function(e,t){return c.apply(void 0,[e].concat(i((0,u["default"])(t))))};t["default"]=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=n(102),u=r(a),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function p(e,t,n){for(var r=arguments.length,a=Array(r>3?r-3:0),u=3;u<r;u++)a[u-3]=arguments[u];if(void 0===n)return t;var c=p.apply(void 0,[e&&e[n],t].concat(a));if(!e){var l=isNaN(n)?{}:[];return l[n]=c,l}if(Array.isArray(e)){var f=[].concat(i(e));return f[n]=c,f}return s({},e,o({},n,c))},l=function(e,t,n){return c.apply(void 0,[e,n].concat(i((0,u["default"])(t))))};t["default"]=l},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=arguments[1],r=arguments[2],o=arguments[3];if(t<e.length){if(void 0===o&&!r){var i=[].concat(n(e));return i.splice(t,0,null),i[t]=void 0,i}if(null!=o){var a=[].concat(n(e));return a.splice(t,r,o),a}var u=[].concat(n(e));return u.splice(t,r),u}if(r)return e;var s=[].concat(n(e));return s[t]=o,s};t["default"]=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e.displayName||e.name||"Component"};t["default"]=n},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(66),a=function(e){var t=e.getIn;return function(e){var n=o({prop:"values",getFormState:function(e){return t(e,"form")}},e),a=n.form,u=n.prop,s=n.getFormState;return(0,i.connect)(function(e){return r({},u,t(s(e),a+".values"))},function(){return{}})}};t["default"]=a},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0];n(this,t);var o=r(this,Object.getPrototypeOf(t).call(this,e));return Object.defineProperty(o,"message",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(o,"name",{configurable:!0,enumerable:!1,value:o.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(o,o.constructor),r(o)):(Object.defineProperty(o,"stack",{configurable:!0, enumerable:!1,value:new Error(e).stack,writable:!0}),o)}return o(t,e),t}(i(Error));t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(n,r,o){var a=e(n,r,o),s=a.dispatch,c=[],l={getState:a.getState,dispatch:function(e){return s(e)}};return c=t.map(function(e){return e(l)}),s=u["default"].apply(void 0,c)(a.dispatch),i({},a,{dispatch:s})}}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t["default"]=o;var a=n(263),u=r(a)},function(e,t){"use strict";function n(e,t){return function(){return t(e.apply(void 0,arguments))}}function r(e,t){if("function"==typeof e)return n(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var r=Object.keys(e),o={},i=0;i<r.length;i++){var a=r[i],u=e[a];"function"==typeof u&&(o[a]=n(u,t))}return o}t.__esModule=!0,t["default"]=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=t&&t.type,r=n&&'"'+n.toString()+'"'||"an action";return"Given action "+r+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function i(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:u.ActionTypes.INIT});if("undefined"==typeof r)throw new Error('Reducer "'+t+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:o}))throw new Error('Reducer "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle "+u.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function a(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var a=t[r];"function"==typeof e[a]&&(n[a]=e[a])}var u,s=Object.keys(n);try{i(n)}catch(c){u=c}return function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];if(u)throw u;for(var r=!1,i={},a=0;a<s.length;a++){var c=s[a],l=n[c],p=e[c],f=l(p,t);if("undefined"==typeof f){var d=o(c,t);throw new Error(d)}i[c]=f,r=r||f!==p}return r?i:e}}t.__esModule=!0,t["default"]=a;var u=n(264),s=n(147),c=(r(s),n(265));r(c)},function(e,t,n){(function(t,n){!function(t){"use strict";function r(e,t,n,r){var o=Object.create((t||i).prototype),a=new h(r||[]);return o._invoke=p(e,n,a),o}function o(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function i(){}function a(){}function u(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function c(e){this.arg=e}function l(e){function t(n,r,i,a){var u=o(e[n],e,r);if("throw"!==u.type){var s=u.arg,l=s.value;return l instanceof c?Promise.resolve(l.arg).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(l).then(function(e){s.value=e,i(s)},a)}a(u.arg)}function r(e,n){function r(){return new Promise(function(r,o){t(e,n,r,o)})}return i=i?i.then(r,r):r()}"object"==typeof n&&n.domain&&(t=n.domain.bind(t));var i;this._invoke=r}function p(e,t,n){var r=w;return function(i,a){if(r===S)throw new Error("Generator is already running");if(r===O){if("throw"===i)throw a;return m()}for(;;){var u=n.delegate;if(u){if("return"===i||"throw"===i&&u.iterator[i]===y){n.delegate=null;var s=u.iterator["return"];if(s){var c=o(s,u.iterator,a);if("throw"===c.type){i="throw",a=c.arg;continue}}if("return"===i)continue}var c=o(u.iterator[i],u.iterator,a);if("throw"===c.type){n.delegate=null,i="throw",a=c.arg;continue}i="next",a=y;var l=c.arg;if(!l.done)return r=P,l;n[u.resultName]=l.value,n.next=u.nextLoc,n.delegate=null}if("next"===i)n.sent=n._sent=a;else if("throw"===i){if(r===w)throw r=O,a;n.dispatchException(a)&&(i="next",a=y)}else"return"===i&&n.abrupt("return",a);r=S;var c=o(e,t,n);if("normal"===c.type){r=n.done?O:P;var l={value:c.arg,done:n.done};if(c.arg!==T)return l;n.delegate&&"next"===i&&(a=y)}else"throw"===c.type&&(r=O,i="throw",a=c.arg)}}}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function d(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function v(e){if(e){var t=e[_];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function o(){for(;++n<e.length;)if(g.call(e,n))return o.value=e[n],o.done=!1,o;return o.value=y,o.done=!0,o};return r.next=r}}return{next:m}}function m(){return{value:y,done:!0}}var y,g=Object.prototype.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},_=b.iterator||"@@iterator",E=b.toStringTag||"@@toStringTag",x="object"==typeof e,C=t.regeneratorRuntime;if(C)return void(x&&(e.exports=C));C=t.regeneratorRuntime=x?e.exports:{},C.wrap=r;var w="suspendedStart",P="suspendedYield",S="executing",O="completed",T={},R=u.prototype=i.prototype;a.prototype=R.constructor=u,u.constructor=a,u[E]=a.displayName="GeneratorFunction",C.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},C.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,E in e||(e[E]="GeneratorFunction")),e.prototype=Object.create(R),e},C.awrap=function(e){return new c(e)},s(l.prototype),C.async=function(e,t,n,o){var i=new l(r(e,t,n,o));return C.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},s(R),R[_]=function(){return this},R[E]="Generator",R.toString=function(){return"[object Generator]"},C.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},C.values=v,h.prototype={constructor:h,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=y,this.done=!1,this.delegate=null,this.tryEntries.forEach(d),!e)for(var t in this)"t"===t.charAt(0)&&g.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=y)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,r){return i.type="throw",i.arg=e,n.next=t,!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=g.call(o,"catchLoc"),u=g.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return t(o.catchLoc,!0);if(this.prev<o.finallyLoc)return t(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return t(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return t(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?this.next=o.finallyLoc:this.complete(i),T},complete:function(e,t){if("throw"===e.type)throw e.arg;"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=e.arg,this.next="end"):"normal"===e.type&&t&&(this.next=t)},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),d(n),T}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;d(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:v(e),resultName:t,nextLoc:n},T}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}(),n(103))},function(e,t,n){"use strict";var r=n(470);e.exports=function(e,t,n,o){var i=n?n.call(o,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var a=r(e),u=r(t),s=a.length;if(s!==u.length)return!1;o=o||null;for(var c=Object.prototype.hasOwnProperty.bind(t),l=0;l<s;l++){var p=a[l];if(!c(p))return!1;var f=e[p],d=t[p],h=n?n.call(o,f,d,p):void 0;if(h===!1||void 0===h&&f!==d)return!1}return!0}},function(e,t,n){(function(t){"use strict";e.exports=n(663)(t||window||this)}).call(t,function(){return this}())},function(e,t){"use strict";e.exports=function(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}}]); //# sourceMappingURL=bundle.js.map
fields/types/name/NameColumn.js
matthewstyers/keystone
import React from 'react'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; import displayName from 'display-name'; var NameColumn = React.createClass({ displayName: 'NameColumn', propTypes: { col: React.PropTypes.object, data: React.PropTypes.object, linkTo: React.PropTypes.string, }, renderValue () { var value = this.props.data.fields[this.props.col.path]; if (!value || (!value.first && !value.last)) return '(no name)'; return displayName(value.first, value.last); }, render () { return ( <ItemsTableCell> <ItemsTableValue to={this.props.linkTo} padded interior field={this.props.col.type}> {this.renderValue()} </ItemsTableValue> </ItemsTableCell> ); }, }); module.exports = NameColumn;
node_modules/bower/node_modules/insight/node_modules/inquirer/node_modules/rx/src/core/linq/observable/never.js
A-deLuna/Iterative-Improvement-presentation
/** * Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins). * @returns {Observable} An observable sequence whose observers will never get called. */ var observableNever = Observable.never = function () { return new AnonymousObservable(function () { return disposableEmpty; }); };