This repository has been archived by the owner on Sep 18, 2018. It is now read-only.
forked from winjs/react-winjs
-
Notifications
You must be signed in to change notification settings - Fork 3
/
react-winjs.min.js
1 lines (1 loc) · 46.5 KB
/
react-winjs.min.js
1
"use strict";Object.defineProperty(exports,"__esModule",{value:true});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 _react=require("react");var _react2=_interopRequireDefault(_react);var _reactDom=require("react-dom");var _reactDom2=_interopRequireDefault(_reactDom);var _propTypes=require("prop-types");var _propTypes2=_interopRequireDefault(_propTypes);var _server=require("react-dom/server");var _server2=_interopRequireDefault(_server);var _winjs=require("winjs");var _winjs2=_interopRequireDefault(_winjs);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(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}function _inherits(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 RawControlApis={AppBar:{closedDisplayMode:{type:"enum",values:["compact","full","minimal","none"]},data:{name:"WinJS.Binding.List",type:"reference",typeArguments:[{name:"WinJS.UI.ICommand",type:"reference",typeArguments:[]}]},element:{name:"HTMLElement",type:"reference",typeArguments:[]},onAfterClose:{name:"Function",type:"reference",typeArguments:[]},onAfterOpen:{name:"Function",type:"reference",typeArguments:[]},onBeforeClose:{name:"Function",type:"reference",typeArguments:[]},onBeforeOpen:{name:"Function",type:"reference",typeArguments:[]},opened:{type:"boolean"},placement:{type:"enum",values:["bottom","top"]}},AppBarCommand:{disabled:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},extraClass:{type:"string"},firstElementFocus:{name:"HTMLElement",type:"reference",typeArguments:[]},flyout:{name:"WinJS.UI.Flyout",type:"reference",typeArguments:[]},hidden:{type:"boolean"},icon:{type:"string"},id:{type:"string"},label:{type:"string"},lastElementFocus:{name:"HTMLElement",type:"reference",typeArguments:[]},onClick:{name:"Function",type:"reference",typeArguments:[]},priority:{type:"number"},section:{type:"string"},selected:{type:"boolean"},tooltip:{type:"string"},type:{type:"string"}},AutoSuggestBox:{chooseSuggestionOnEnter:{type:"boolean"},disabled:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},onQueryChanged:{name:"Function",type:"reference",typeArguments:[]},onQuerySubmitted:{name:"Function",type:"reference",typeArguments:[]},onResultSuggestionChosen:{name:"Function",type:"reference",typeArguments:[]},onSuggestionsRequested:{name:"Function",type:"reference",typeArguments:[]},placeholderText:{type:"string"},queryText:{type:"string"},searchHistoryContext:{type:"string"},searchHistoryDisabled:{type:"boolean"}},BackButton:{element:{name:"HTMLElement",type:"reference",typeArguments:[]}},CellSpanningLayout:{groupHeaderPosition:{type:"enum",values:["left","top"]},groupInfo:{name:"Function",type:"reference",typeArguments:[]},itemInfo:{name:"Function",type:"reference",typeArguments:[]},maximumRowsOrColumns:{type:"number"},numberOfItemsPerItemsBlock:{type:"any"},orientation:{type:"enum",values:["horizontal","vertical"]}},Command:{disabled:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},extraClass:{type:"string"},firstElementFocus:{name:"HTMLElement",type:"reference",typeArguments:[]},flyout:{name:"WinJS.UI.Flyout",type:"reference",typeArguments:[]},hidden:{type:"boolean"},icon:{type:"string"},id:{type:"string"},label:{type:"string"},lastElementFocus:{name:"HTMLElement",type:"reference",typeArguments:[]},onClick:{name:"Function",type:"reference",typeArguments:[]},priority:{type:"number"},section:{type:"string"},selected:{type:"boolean"},tooltip:{type:"string"},type:{type:"string"}},ContentDialog:{element:{name:"HTMLElement",type:"reference",typeArguments:[]},hidden:{type:"boolean"},onAfterHide:{name:"Function",type:"reference",typeArguments:[]},onAfterShow:{name:"Function",type:"reference",typeArguments:[]},onBeforeHide:{name:"Function",type:"reference",typeArguments:[]},onBeforeShow:{name:"Function",type:"reference",typeArguments:[]},primaryCommandDisabled:{type:"boolean"},primaryCommandText:{type:"string"},secondaryCommandDisabled:{type:"boolean"},secondaryCommandText:{type:"string"},title:{type:"string"}},DatePicker:{calendar:{type:"string"},current:{name:"Date",type:"reference",typeArguments:[]},datePattern:{type:"string"},disabled:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},maxYear:{type:"number"},minYear:{type:"number"},monthPattern:{type:"string"},onChange:{name:"Function",type:"reference",typeArguments:[]},yearPattern:{type:"string"}},FlipView:{currentPage:{type:"number"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},itemDataSource:{name:"WinJS.UI.IListDataSource",type:"reference",typeArguments:[{name:"T",type:"type-param"}]},itemSpacing:{type:"number"},itemTemplate:{type:"any"},onDataSourceCountChanged:{name:"Function",type:"reference",typeArguments:[]},onPageCompleted:{name:"Function",type:"reference",typeArguments:[]},onPageSelected:{name:"Function",type:"reference",typeArguments:[]},onPageVisibilityChanged:{name:"Function",type:"reference",typeArguments:[]},orientation:{type:"string"}},Flyout:{alignment:{type:"string"},anchor:{name:"HTMLElement",type:"reference",typeArguments:[]},disabled:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},hidden:{type:"boolean"},onAfterHide:{name:"Function",type:"reference",typeArguments:[]},onAfterShow:{name:"Function",type:"reference",typeArguments:[]},onBeforeHide:{name:"Function",type:"reference",typeArguments:[]},onBeforeShow:{name:"Function",type:"reference",typeArguments:[]},placement:{type:"string"}},GridLayout:{backdropColor:{type:"string"},disableBackdrop:{type:"boolean"},groupHeaderPosition:{type:"enum",values:["left","top"]},groupInfo:{name:"Function",type:"reference",typeArguments:[]},itemInfo:{name:"Function",type:"reference",typeArguments:[]},maxRows:{type:"number"},maximumRowsOrColumns:{type:"number"},numberOfItemsPerItemsBlock:{type:"any"},orientation:{type:"enum",values:["horizontal","vertical"]}},Hub:{element:{name:"HTMLElement",type:"reference",typeArguments:[]},headerTemplate:{type:"any"},indexOfFirstVisible:{type:"number"},indexOfLastVisible:{type:"number"},loadingState:{type:"enum",values:["complete","loading"]},onContentAnimating:{name:"Function",type:"reference",typeArguments:[]},onHeaderInvoked:{name:"Function",type:"reference",typeArguments:[]},onLoadingStateChanged:{name:"Function",type:"reference",typeArguments:[]},orientation:{type:"enum",values:["horizontal","vertical"]},scrollPosition:{type:"number"},sectionOnScreen:{type:"number"},sections:{name:"WinJS.Binding.List",type:"reference",typeArguments:[{name:"WinJS.UI.HubSection",type:"reference",typeArguments:[]}]},zoomableView:{name:"WinJS.UI.IZoomableView",type:"reference",typeArguments:[{type:"any"}]}},HubSection:{contentElement:{name:"HTMLElement",type:"reference",typeArguments:[]},element:{name:"HTMLElement",type:"reference",typeArguments:[]},header:{type:"string"},isHeaderStatic:{type:"boolean"}},ItemContainer:{draggable:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},onInvoked:{name:"Function",type:"reference",typeArguments:[]},onSelectionChanged:{name:"Function",type:"reference",typeArguments:[]},onSelectionChanging:{name:"Function",type:"reference",typeArguments:[]},selected:{type:"boolean"},selectionDisabled:{type:"boolean"},swipeBehavior:{type:"enum",values:["none","select"]},swipeOrientation:{type:"enum",values:["horizontal","vertical"]},tapBehavior:{type:"enum",values:["directSelect","invokeOnly","none","toggleSelect"]}},ListLayout:{backdropColor:{type:"string"},disableBackdrop:{type:"boolean"},groupHeaderPosition:{type:"enum",values:["left","top"]},numberOfItemsPerItemsBlock:{type:"any"},orientation:{type:"enum",values:["horizontal","vertical"]}},ListView:{automaticallyLoadPages:{type:"boolean"},currentItem:{name:"WinJS.UI.IListViewItem",type:"reference",typeArguments:[]},element:{name:"HTMLElement",type:"reference",typeArguments:[]},footer:{name:"HTMLElement",type:"reference",typeArguments:[]},groupDataSource:{name:"WinJS.UI.IListDataSource",type:"reference",typeArguments:[{name:"T",type:"type-param"}]},groupHeaderTapBehavior:{type:"enum",values:["invoke","none"]},groupHeaderTemplate:{type:"any"},header:{name:"HTMLElement",type:"reference",typeArguments:[]},indexOfFirstVisible:{type:"number"},indexOfLastVisible:{type:"number"},itemDataSource:{name:"WinJS.UI.IListDataSource",type:"reference",typeArguments:[{name:"T",type:"type-param"}]},itemTemplate:{type:"any"},itemsDraggable:{type:"boolean"},itemsReorderable:{type:"boolean"},layout:{name:"WinJS.UI.ILayout2",type:"reference",typeArguments:[]},loadingBehavior:{type:"string"},loadingState:{type:"string"},maxDeferredItemCleanup:{type:"number"},maxLeadingPages:{type:"number"},maxTrailingPages:{type:"number"},onAccessibilityAnnotationComplete:{name:"Function",type:"reference",typeArguments:[]},onContentAnimating:{name:"Function",type:"reference",typeArguments:[]},onFooterVisibilityChanged:{name:"Function",type:"reference",typeArguments:[]},onGroupHeaderInvoked:{name:"Function",type:"reference",typeArguments:[]},onHeaderVisibilityChanged:{name:"Function",type:"reference",typeArguments:[]},onItemDragBetween:{name:"Function",type:"reference",typeArguments:[]},onItemDragChanged:{name:"Function",type:"reference",typeArguments:[]},onItemDragDrop:{name:"Function",type:"reference",typeArguments:[]},onItemDragEnd:{name:"Function",type:"reference",typeArguments:[]},onItemDragEnter:{name:"Function",type:"reference",typeArguments:[]},onItemDragLeave:{name:"Function",type:"reference",typeArguments:[]},onItemDragStart:{name:"Function",type:"reference",typeArguments:[]},onItemInvoked:{name:"Function",type:"reference",typeArguments:[]},onKeyboardNavigating:{name:"Function",type:"reference",typeArguments:[]},onLoadingStateChanged:{name:"Function",type:"reference",typeArguments:[]},onSelectionChanged:{name:"Function",type:"reference",typeArguments:[]},onSelectionChanging:{name:"Function",type:"reference",typeArguments:[]},pagesToLoad:{type:"number"},pagesToLoadThreshold:{type:"number"},scrollPosition:{type:"number"},selection:{name:"WinJS.UI.ISelection",type:"reference",typeArguments:[{name:"T",type:"type-param"}]},selectionMode:{type:"enum",values:["multi","none","single"]},swipeBehavior:{type:"enum",values:["none","select"]},tapBehavior:{type:"enum",values:["directSelect","invokeOnly","none","toggleSelect"]},zoomableView:{name:"WinJS.UI.IZoomableView",type:"reference",typeArguments:[{name:"WinJS.UI.ListView",type:"reference",typeArguments:[{name:"T",type:"type-param"}]}]}},Menu:{alignment:{type:"string"},anchor:{name:"HTMLElement",type:"reference",typeArguments:[]},commands:{name:"Array",type:"reference",typeArguments:[{name:"WinJS.UI.MenuCommand",type:"reference",typeArguments:[]}]},disabled:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},hidden:{type:"boolean"},onAfterHide:{name:"Function",type:"reference",typeArguments:[]},onAfterShow:{name:"Function",type:"reference",typeArguments:[]},onBeforeHide:{name:"Function",type:"reference",typeArguments:[]},onBeforeShow:{name:"Function",type:"reference",typeArguments:[]},placement:{type:"string"}},MenuCommand:{disabled:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},extraClass:{type:"string"},flyout:{name:"WinJS.UI.Flyout",type:"reference",typeArguments:[]},hidden:{type:"boolean"},id:{type:"string"},label:{type:"string"},onClick:{name:"Function",type:"reference",typeArguments:[]},selected:{type:"boolean"},type:{type:"string"}},NavBar:{closedDisplayMode:{type:"string"},commands:{name:"WinJS.UI.AppBarCommand",type:"reference",typeArguments:[]},element:{name:"HTMLElement",type:"reference",typeArguments:[]},hidden:{type:"boolean"},onAfterClose:{name:"Function",type:"reference",typeArguments:[]},onAfterOpen:{name:"Function",type:"reference",typeArguments:[]},onBeforeClose:{name:"Function",type:"reference",typeArguments:[]},onBeforeOpen:{name:"Function",type:"reference",typeArguments:[]},onChildrenProcessed:{name:"Function",type:"reference",typeArguments:[]},opened:{type:"boolean"},placement:{type:"string"}},NavBarCommand:{element:{name:"HTMLElement",type:"reference",typeArguments:[]},icon:{type:"string"},label:{type:"string"},location:{type:"any"},onInvoked:{name:"Function",type:"reference",typeArguments:[]},splitButton:{type:"boolean"},splitOpened:{type:"boolean"},state:{type:"any"},tooltip:{type:"string"}},NavBarContainer:{currentIndex:{type:"number"},data:{name:"WinJS.Binding.List",type:"reference",typeArguments:[{name:"WinJS.UI.NavBarCommand",type:"reference",typeArguments:[]}]},element:{name:"HTMLElement",type:"reference",typeArguments:[]},fixedSize:{type:"boolean"},layout:{type:"enum",values:["horizontal","vertical"]},maxRows:{type:"number"},onInvoked:{name:"Function",type:"reference",typeArguments:[]},onSplitToggle:{name:"Function",type:"reference",typeArguments:[]},template:{name:"WinJS.Binding.Template",type:"reference",typeArguments:[]}},Pivot:{customLeftHeader:{name:"HTMLElement",type:"reference",typeArguments:[]},customRightHeader:{name:"HTMLElement",type:"reference",typeArguments:[]},element:{name:"HTMLElement",type:"reference",typeArguments:[]},items:{name:"WinJS.Binding.List",type:"reference",typeArguments:[{name:"WinJS.UI.PivotItem",type:"reference",typeArguments:[]}]},locked:{type:"boolean"},onItemAnimationEnd:{name:"Function",type:"reference",typeArguments:[]},onItemAnimationStart:{name:"Function",type:"reference",typeArguments:[]},onSelectionChanged:{name:"Function",type:"reference",typeArguments:[]},selectedIndex:{type:"number"},selectedItem:{name:"WinJS.UI.PivotItem",type:"reference",typeArguments:[]},title:{type:"string"}},PivotItem:{contentElement:{name:"HTMLElement",type:"reference",typeArguments:[]},element:{name:"HTMLElement",type:"reference",typeArguments:[]},header:{type:"string"}},Rating:{averageRating:{type:"number"},disabled:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},enableClear:{type:"boolean"},maxRating:{type:"number"},onCancel:{name:"Function",type:"reference",typeArguments:[]},onChange:{name:"Function",type:"reference",typeArguments:[]},onPreviewChange:{name:"Function",type:"reference",typeArguments:[]},tooltipStrings:{name:"Array",type:"reference",typeArguments:[{type:"string"}]},userRating:{type:"number"}},SearchBox:{chooseSuggestionOnEnter:{type:"boolean"},disabled:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},focusOnKeyboardInput:{type:"boolean"},onQueryChanged:{name:"Function",type:"reference",typeArguments:[]},onQuerySubmitted:{name:"Function",type:"reference",typeArguments:[]},onResultSuggestionChosen:{name:"Function",type:"reference",typeArguments:[]},onSuggestionsRequested:{name:"Function",type:"reference",typeArguments:[]},placeholderText:{type:"string"},queryText:{type:"string"},searchHistoryContext:{type:"string"},searchHistoryDisabled:{type:"boolean"}},SemanticZoom:{element:{name:"HTMLElement",type:"reference",typeArguments:[]},enableButton:{type:"boolean"},locked:{type:"boolean"},onZoomChanged:{name:"Function",type:"reference",typeArguments:[]},zoomFactor:{type:"number"},zoomedOut:{type:"boolean"}},SplitView:{closedDisplayMode:{type:"enum",values:["inline","none"]},contentElement:{name:"HTMLElement",type:"reference",typeArguments:[]},element:{name:"HTMLElement",type:"reference",typeArguments:[]},onAfterClose:{name:"Function",type:"reference",typeArguments:[]},onAfterOpen:{name:"Function",type:"reference",typeArguments:[]},onBeforeClose:{name:"Function",type:"reference",typeArguments:[]},onBeforeOpen:{name:"Function",type:"reference",typeArguments:[]},openedDisplayMode:{type:"enum",values:["inline","overlay"]},paneElement:{name:"HTMLElement",type:"reference",typeArguments:[]},paneOpened:{type:"boolean"},panePlacement:{type:"enum",values:["bottom","left","right","top"]}},SplitViewCommand:{element:{name:"HTMLElement",type:"reference",typeArguments:[]},icon:{type:"string"},label:{type:"string"},onInvoked:{name:"Function",type:"reference",typeArguments:[]},tooltip:{type:"string"}},SplitViewPaneToggle:{element:{name:"HTMLButtonElement",type:"reference",typeArguments:[]},onInvoked:{name:"Function",type:"reference",typeArguments:[]},splitView:{name:"HTMLElement",type:"reference",typeArguments:[]}},TimePicker:{clock:{type:"string"},current:{name:"Date",type:"reference",typeArguments:[]},disabled:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},hourPattern:{type:"string"},minuteIncrement:{type:"number"},minutePattern:{type:"string"},onChange:{name:"Function",type:"reference",typeArguments:[]},periodPattern:{type:"string"}},ToggleSwitch:{checked:{type:"boolean"},disabled:{type:"boolean"},element:{name:"HTMLElement",type:"reference",typeArguments:[]},labelOff:{type:"string"},labelOn:{type:"string"},onChange:{name:"Function",type:"reference",typeArguments:[]},title:{type:"string"}},ToolBar:{closedDisplayMode:{type:"enum",values:["compact","full"]},data:{name:"WinJS.Binding.List",type:"reference",typeArguments:[{name:"WinJS.UI.ICommand",type:"reference",typeArguments:[]}]},element:{name:"HTMLElement",type:"reference",typeArguments:[]},onAfterClose:{name:"Function",type:"reference",typeArguments:[]},onAfterOpen:{name:"Function",type:"reference",typeArguments:[]},onBeforeClose:{name:"Function",type:"reference",typeArguments:[]},onBeforeOpen:{name:"Function",type:"reference",typeArguments:[]},opened:{type:"boolean"}},Tooltip:{contentElement:{name:"HTMLElement",type:"reference",typeArguments:[]},element:{name:"HTMLElement",type:"reference",typeArguments:[]},extraClass:{type:"string"},infotip:{type:"boolean"},innerHTML:{type:"string"},onBeforeClose:{name:"Function",type:"reference",typeArguments:[]},onBeforeOpen:{name:"Function",type:"reference",typeArguments:[]},onClosed:{name:"Function",type:"reference",typeArguments:[]},onOpened:{name:"Function",type:"reference",typeArguments:[]},placement:{type:"string"}}};var setImmediate=void 0;var clearImmediate=void 0;if(window.setImmediate&&window.clearImmediate){setImmediate=window.setImmediate;clearImmediate=window.clearImmediate}else{setImmediate=function setImmediate(callback){return setTimeout(callback,0)};clearImmediate=window.clearTimeout}function isEvent(propName){return propName[0]==="o"&&propName[1]==="n"}function mapObject(obj,callback){var result={};Object.keys(obj).forEach(function(key){var value=callback(key,obj[key]);if(value!==undefined){result[key]=value}});return result}function cloneObject(obj){var result={};for(var k in obj){result[k]=obj[k]}return result}function merge(){var result={};for(var i=0,len=arguments.length;i<len;i+=1){var obj=arguments[i];if(obj){for(var k in obj){result[k]=obj[k]}}}return result}function endsWith(s,suffix){return s.length>=suffix.length&&s.substr(-suffix.length)===suffix}function arraysShallowEqual(a,b){if(a===b){return true}else if(a.length!==b.length){return false}for(var i=0,len=a.length;i<len;i+=1){if(a[i]!==b[i]){return false}}return true}function nestedSet(obj,path,value){var parts=path.split(".");var allButLast=parts.slice(0,parts.length-1);var last=parts[parts.length-1];var finalObj=allButLast.reduce(function(current,key){return current[key]},obj);finalObj[last]=value}function deparent(element){var parent=element.parentNode;parent&&parent.removeChild(element)}function fireEvent(element,eventName){var eventObject=document.createEvent("CustomEvent");eventObject.initCustomEvent(eventName,true,false,null);element.dispatchEvent(eventObject)}function makeClassSet(className){var classSet={};className&&className.split(" ").forEach(function(aClass){if(aClass){classSet[aClass]=true}});return classSet}function getIn(object,path){var parts=path.split(".");return parts.reduce(function(current,name){return current&¤t[name]},object)}function typeToPropType(typeInfo){if(typeInfo.type==="string"){return _propTypes2.default.string}else if(typeInfo.type==="boolean"){return _propTypes2.default.bool}else if(typeInfo.type==="number"){return _propTypes2.default.number}else if(typeInfo.type==="enum"){return _propTypes2.default.oneOf(typeInfo.values)}else if(typeInfo.type==="any"){return _propTypes2.default.any}else if(typeInfo.type==="reference"){if(typeInfo.name==="Function"){return _propTypes2.default.func}else if(typeInfo.name==="Array"){var itemPropType=typeToPropType(typeInfo.typeArguments[0]);return itemPropType?_propTypes2.default.arrayOf(itemPropType):_propTypes2.default.array}else if(getIn(window,typeInfo.name)){var instance=getIn(window,typeInfo.name);return _propTypes2.default.instanceOf(instance)}}else{console.warn("react-winjs typeToPropType: unable to find propType for type: "+JSON.stringify(typeInfo,null,2))}}function buildIndex(array){var index={};array.forEach(function(item,i){index[item.key]=i});return index}function indexOfKey(array,key){for(var i=0;i<array.length;i++){if(array[i].key===key){return i}}return-1}function diffArraysByKey(old,latest){old=old.slice(0);var oldIndex=buildIndex(old);var latestIndex=buildIndex(latest);var edits=[];for(var i=old.length-1;i>=0;i--){var item=old[i];if(!latestIndex.hasOwnProperty(item.key)){edits.push({type:"delete",index:i});old.splice(i,1)}}for(var i=0;i<latest.length;i++){var item=latest[i];if(!oldIndex.hasOwnProperty(item.key)){edits.push({type:"insert",index:i,value:item});old.splice(i,0,item)}else if(old[i].key!==item.key){var fromIndex=indexOfKey(old,item.key);edits.push({type:"move",from:fromIndex,to:i});old.splice(fromIndex,1);old.splice(i,0,item)}}return edits}function applyEditsToBindingList(list,edits){edits.forEach(function(edit){if(edit.type==="delete"){list.splice(edit.index,1)}else if(edit.type==="insert"){list.splice(edit.index,0,edit.value.winControl)}else if(edit.type==="move"){list.move(edit.from,edit.to)}else{throw"Unsupported edit type: "+edit.type}},this)}function processChildren(componentDisplayName,children,childComponentsMap){var newChildComponents=[];var newChildComponentsMap={};_react2.default.Children.forEach(children,function(component){if(component){if(component.ref){console.warn("ref prop ("+component.ref+") will not work on "+component.type.displayName+" component because it is inside "+("of a "+componentDisplayName+" component"))}if(component.key===null){console.error(component.type.displayName+" component requires a key "+("when inside of a "+componentDisplayName+" component"))}else{var winjsChildComponent=childComponentsMap[component.key];if(winjsChildComponent){if(winjsChildComponent.type===component.type){winjsChildComponent.update(component)}else{winjsChildComponent.dispose();winjsChildComponent=new WinJSChildComponent(component)}}else{winjsChildComponent=new WinJSChildComponent(component)}newChildComponents.push(winjsChildComponent);newChildComponentsMap[component.key]=winjsChildComponent}}});Object.keys(childComponentsMap).forEach(function(key){if(!newChildComponentsMap.hasOwnProperty(key)){childComponentsMap[key].dispose()}});return{childComponents:newChildComponents,childComponentsMap:newChildComponentsMap}}function prefixedProperty(prefix,property){return prefix+property[0].toUpperCase()+property.substr(1)}var isUnitlessProperty={flex:true,flexGrow:true,flexPositive:true,flexShrink:true,flexNegative:true,fontWeight:true,lineClamp:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true};var vendorPrefixes=["Moz","ms","Webkit"];Object.keys(isUnitlessProperty).forEach(function(property){vendorPrefixes.forEach(function(prefix){isUnitlessProperty[prefixedProperty(prefix,property)]=true})});function resolveStyleValue(cssProperty,value){if(typeof value==="number"){return isUnitlessProperty[cssProperty]||value===0?""+value:value+"px"}return value?""+value:""}var PropHandlers={property:function property(propType){return{propType:propType,preCtorInit:function property_preCtorInit(element,options,data,displayName,propName,value){options[propName]=value},update:function property_update(winjsComponent,propName,oldValue,newValue){if(oldValue!==newValue){winjsComponent.winControl[propName]=newValue}}}},focusProperty:function focusProperty(propType){return{propType:propType,preCtorInit:function focusProperty_preCtorInit(element,options,data,displayName,propName,value){options[propName]=value},update:function focusProperty_update(winjsComponent,propName,oldValue,newValue){if(oldValue!==newValue){var asyncToken=winjsComponent.data[propName];asyncToken&&clearImmediate(asyncToken);asyncToken=setImmediate(function(){winjsComponent.data[propName]=null;winjsComponent.winControl[propName]=newValue})}},dispose:function focusProperty_dispose(winjsComponent,propName){var asyncToken=winjsComponent.data[propName];asyncToken&&clearImmediate(asyncToken)}}},domProperty:function domProperty(propType){return{propType:propType,preCtorInit:function domProperty_preCtorInit(element,options,data,displayName,propName,value){element[propName]=value},update:function domProperty_update(winjsComponent,propName,oldValue,newValue){if(oldValue!==newValue){winjsComponent.element[propName]=newValue}}}},domAttribute:function domAttribute(propType){return{propType:propType,update:function domAttribute_update(winjsComponent,propName,oldValue,newValue){if(oldValue!==newValue){if(newValue!==null&&newValue!==undefined){winjsComponent.element.setAttribute(propName,""+newValue)}else{winjsComponent.element.removeAttribute(propName)}}}}},event:{propType:_propTypes2.default.func,update:function event_update(winjsComponent,propName,oldValue,newValue){if(oldValue!==newValue){winjsComponent.winControl[propName.toLowerCase()]=newValue}}},domEvent:{propType:_propTypes2.default.func,preCtorInit:function domEvent_preCtorInit(element,options,data,displayName,propName,value){element[propName.toLowerCase()]=value},update:function domEvent_update(winjsComponent,propName,oldValue,newValue){if(oldValue!==newValue){winjsComponent.element[propName.toLowerCase()]=newValue}}},winControlClassName:{propType:_propTypes2.default.string,preCtorInit:function winControlClassName_preCtorInit(element,options,data,displayName,propName,value){if(value){element.className=value}data[propName]=makeClassSet(value)},update:function winControlClassName_update(winjsComponent,propName,oldValue,newValue){if(oldValue!==newValue){var oldClassSet=winjsComponent.data[propName]||{};var newClassSet=makeClassSet(newValue);var elementClassList=winjsComponent.winControl.element.classList;for(var className in oldClassSet){if(!newClassSet[className]){elementClassList.remove(className)}}for(var className in newClassSet){if(!oldClassSet[className]){elementClassList.add(className)}}winjsComponent.data[propName]=newClassSet}}},winControlStyle:{propType:_propTypes2.default.object,preCtorInit:function winControlStyle_preCtorInit(element,options,data,displayName,propName,value){var elementStyle=element.style;value=value||{};for(var cssProperty in value){elementStyle[cssProperty]=resolveStyleValue(cssProperty,value[cssProperty])}},update:function winControlStyle_update(winjsComponent,propName,oldValue,newValue){if(oldValue!==newValue){oldValue=oldValue||{};newValue=newValue||{};if(winjsComponent.winControl&&winjsComponent.winControl.element){var elementStyle=winjsComponent.winControl.element.style;for(var cssProperty in oldValue){if(!newValue.hasOwnProperty(cssProperty)){elementStyle[cssProperty]=""}}for(var cssProperty in newValue){if(oldValue[cssProperty]!==newValue[cssProperty]){elementStyle[cssProperty]=resolveStyleValue(cssProperty,newValue[cssProperty])}}}}}},warn:function PropHandlers_warn(warnMessage){return{update:function warn_update(winjsComponent,propName,oldValue,newValue){console.warn(winjsComponent.displayName+": "+warnMessage)}}},propertyWithMount:function PropHandlers_propertyWithMount(winControlProperty){return{propType:_propTypes2.default.element,preCtorInit:function propertyWithMount_preCtorInit(element,options,data,displayName,propName,value){if(value){data[propName]=document.createElement("div");_reactDom2.default.render(value,data[propName]);options[winControlProperty]=data[propName]}},update:function propertyWithMount_update(winjsComponent,propName,oldValue,newValue){var winControl=winjsComponent.winControl;var element=winjsComponent.data[propName];if(newValue){if(!element){element=document.createElement("div");winjsComponent.data[propName]=element}_reactDom2.default.render(newValue,element);if(winControl[winControlProperty]!==element){winControl[winControlProperty]=element}}else if(oldValue){element&&_reactDom2.default.unmountComponentAtNode(element);winControl[winControlProperty]=null}},dispose:function propertyWithMount_dispose(winjsComponent,propName){var element=winjsComponent.data[propName];element&&_reactDom2.default.unmountComponentAtNode(element)}}},mountTo:function PropHandlers_mountTo(getMountPoint){return{propType:_propTypes2.default.element,update:function mountTo_update(winjsComponent,propName,oldValue,newValue){var data=winjsComponent.data[propName]||{};var version=(data.version||0)+1;winjsComponent.data[propName]={version:version,element:data.element};var mountComponent=function mountComponent(){if(version===winjsComponent.data[propName].version){var oldElement=winjsComponent.data[propName].element;if(newValue){var newElement=getMountPoint(winjsComponent);if(oldElement&&oldElement!==newElement){_reactDom2.default.unmountComponentAtNode(oldElement)}_reactDom2.default.render(newValue,newElement);winjsComponent.data[propName].element=newElement}else if(oldValue){oldElement&&_reactDom2.default.unmountComponentAtNode(oldElement);winjsComponent.data[propName].element=null}}};var winControl=winjsComponent.winControl;var queueProcessing=winControl.constructor.isDeclarativeControlContainer;if(queueProcessing&&typeof queueProcessing==="function"){queueProcessing(winControl,mountComponent)}else{mountComponent()}},dispose:function mountTo_dispose(winjsComponent,propName){var data=winjsComponent.data[propName]||{};var element=data.element;element&&_reactDom2.default.unmountComponentAtNode(element)}}},syncChildrenWithBindingList:function PropHandlers_syncChildrenWithBindingList(bindingListName){return{preCtorInit:function syncChildrenWithBindingList_preCtorInit(element,options,data,displayName,propName,value){var latest=processChildren(displayName,value,{});data[propName]={winjsChildComponents:latest.childComponents,winjsChildComponentsMap:latest.childComponentsMap};options[bindingListName]=new _winjs2.default.Binding.List(latest.childComponents.map(function(winjsChildComponent){return winjsChildComponent.winControl}))},update:function syncChildrenWithBindingList_update(winjsComponent,propName,oldValue,newValue){var data=winjsComponent.data[propName]||{};var oldChildComponents=data.winjsChildComponents||[];var oldChildComponentsMap=data.winjsChildComponentsMap||{};var latest=processChildren(winjsComponent.displayName,newValue,oldChildComponentsMap);var bindingList=winjsComponent.winControl[bindingListName];if(bindingList){applyEditsToBindingList(bindingList,diffArraysByKey(oldChildComponents,latest.childComponents))}else{winjsComponent.winControl[bindingListName]=new _winjs2.default.Binding.List(latest.childComponents.map(function(winjsChildComponent){return winjsChildComponent.winControl}))}winjsComponent.data[propName]={winjsChildComponents:latest.childComponents,winjsChildComponentsMap:latest.childComponentsMap}},dispose:function syncChildrenWithBindingList_dispose(winjsComponent,propName){var data=winjsComponent.data[propName]||{};var childComponents=data.winjsChildComponents||[];childComponents.forEach(function(winjsChildComponent){winjsChildComponent.dispose()})}}}};function defineControl(options){var winjsControl=options.winjsControl;var winControlOptions=options.winControlOptions||{};var preCtorInit=options.preCtorInit||function(){};var propHandlers=options.propHandlers||{};var _render=options.render||function(component){return _react2.default.createElement("div")};var displayName=options.displayName;function initWinJSComponent(winjsComponent,element,props){winjsComponent.data={};winjsComponent.displayName=displayName;winjsComponent.element=element;var options=cloneObject(winControlOptions);preCtorInit(element,options,winjsComponent.data,displayName);Object.keys(props).forEach(function(propName){var handler=propHandlers[propName];if(handler&&handler.preCtorInit){handler.preCtorInit(element,options,winjsComponent.data,displayName,propName,props[propName])}});winjsComponent.winControl=new winjsControl(element,options);Object.keys(props).forEach(function(propName){var handler=propHandlers[propName];if(handler&&!handler.preCtorInit){handler.update(winjsComponent,propName,undefined,props[propName])}})}function updateWinJSComponent(winjsComponent,prevProps,nextProps){Object.keys(nextProps).forEach(function(propName){var handler=propHandlers[propName];if(handler){handler.update(winjsComponent,propName,prevProps[propName],nextProps[propName])}});Object.keys(prevProps).forEach(function(propName){if(!nextProps.hasOwnProperty(propName)){var handler=propHandlers[propName];if(handler){handler.update(winjsComponent,propName,prevProps[propName],undefined)}}})}function disposeWinJSComponent(winjsComponent){winjsComponent.winControl.dispose&&winjsComponent.winControl.dispose();Object.keys(propHandlers).forEach(function(propName){var handler=propHandlers[propName];handler.dispose&&handler.dispose(winjsComponent,propName)})}var TypeComponent=function(_Component){_inherits(TypeComponent,_Component);function TypeComponent(props){_classCallCheck(this,TypeComponent);return _possibleConstructorReturn(this,(TypeComponent.__proto__||Object.getPrototypeOf(TypeComponent)).call(this,props))}_createClass(TypeComponent,[{key:"shouldComponentUpdate",value:function shouldComponentUpdate(){return false}},{key:"componentDidMount",value:function componentDidMount(){initWinJSComponent(this,_reactDom2.default.findDOMNode(this),this.props)}},{key:"componentWillUnmount",value:function componentWillUnmount(){disposeWinJSComponent(this)}},{key:"componentWillReceiveProps",value:function componentWillReceiveProps(nextProps){updateWinJSComponent(this,this.props,nextProps)}},{key:"render",value:function render(){return _render(this)}}]);return TypeComponent}(_react.Component);TypeComponent.displayName=displayName;TypeComponent.initWinJSComponent=initWinJSComponent;TypeComponent.updateWinJSComponent=updateWinJSComponent;TypeComponent.disposeWinJSComponent=disposeWinJSComponent;TypeComponent.propTypes=mapObject(propHandlers,function(propName,propHandler){return propHandler.propType});return TypeComponent}var hostEl=document.createElement("div");function renderRootlessComponent(component){var html=_server2.default.renderToStaticMarkup(component);hostEl.innerHTML=html;var element=hostEl.firstElementChild;hostEl.removeChild(element);return element}function WinJSChildComponent(component){var clonedComponent=_react2.default.cloneElement(component,{ref:null});var element=renderRootlessComponent(clonedComponent);component.type.initWinJSComponent(this,element,component.props);this.key=component.key;this.type=component.type;this._props=component.props;this._disposeWinJSComponent=component.type.disposeWinJSComponent}WinJSChildComponent.prototype.update=function(component){component.type.updateWinJSComponent(this,this._props,component.props);this._props=component.props};WinJSChildComponent.prototype.dispose=function(){this._disposeWinJSComponent(this)};var defaultPropHandlers={className:PropHandlers.winControlClassName,style:PropHandlers.winControlStyle,id:PropHandlers.domProperty(_propTypes2.default.string),"aria-controls":PropHandlers.domAttribute(_propTypes2.default.any),"aria-expanded":PropHandlers.domAttribute(_propTypes2.default.any)};var DefaultControlPropHandlers=function processRawApis(){var keepProperty=function keepProperty(propertyName){return!endsWith(propertyName.toLowerCase(),"element")};return mapObject(RawControlApis,function(controlName,controlApis){var propHandlers={};Object.keys(controlApis).forEach(function(propName){if(isEvent(propName)){propHandlers[propName]=PropHandlers.event}else if(keepProperty(propName)){var typeInfo=controlApis[propName];var propType=typeToPropType(typeInfo);propHandlers[propName]=PropHandlers.property(propType)}});return propHandlers})}();function updateWithDefaults(controlApis){Object.keys(controlApis).forEach(function(controlName){var spec=controlApis[controlName];var winjsControlName=spec.underlyingControlName||controlName;spec.winjsControl=spec.winjsControl||_winjs2.default.UI[winjsControlName];spec.displayName=spec.displayName||winjsControlName;spec.propHandlers=merge(defaultPropHandlers,DefaultControlPropHandlers[winjsControlName],spec.propHandlers)});return controlApis}var typeWarnPropHandler=PropHandlers.warn("Invalid prop 'type'. Instead, the command type is"+" determined by the component: Button, Toggle, Separator, ContentCommand, FlyoutCommand.");var CommandSpecs={Button:{underlyingControlName:"AppBarCommand",winControlOptions:{type:"button"},render:function render(component){return _react2.default.createElement("button")},propHandlers:{type:typeWarnPropHandler}},Toggle:{underlyingControlName:"AppBarCommand",winControlOptions:{type:"toggle"},render:function render(component){return _react2.default.createElement("button")},propHandlers:{type:typeWarnPropHandler}},Separator:{underlyingControlName:"AppBarCommand",winControlOptions:{type:"separator"},render:function render(component){return _react2.default.createElement("hr")},propHandlers:{type:typeWarnPropHandler}},ContentCommand:{underlyingControlName:"AppBarCommand",winControlOptions:{type:"content"},propHandlers:{type:typeWarnPropHandler,children:PropHandlers.mountTo(function(winjsComponent){return winjsComponent.winControl.element})}},FlyoutCommand:{underlyingControlName:"AppBarCommand",winControlOptions:{type:"flyout"},render:function render(component){return _react2.default.createElement("button")},propHandlers:{type:typeWarnPropHandler,flyoutComponent:{propType:_propTypes2.default.element,update:function FlyoutCommand_flyoutComponent_update(winjsComponent,propName,oldValue,newValue){var data=winjsComponent.data[propName];if(!data){var flyoutHost=document.createElement("div");flyoutHost.className="win-react-flyout-host";document.body.appendChild(flyoutHost);winjsComponent.data[propName]=data={flyoutHost:flyoutHost,flyoutComponent:null}}var oldWinControl=data.flyoutComponent&&data.flyoutComponent.winControl;var instance=_reactDom2.default.render(newValue,data.flyoutHost);if(oldWinControl!==instance.winControl){winjsComponent.winControl.flyout=instance.winControl}winjsComponent.data[propName].flyoutComponent=instance},dispose:function FlyoutCommand_flyoutComponent_dispose(winjsComponent,propName){var data=winjsComponent.data[propName];if(data&&data.flyoutHost){_reactDom2.default.unmountComponentAtNode(data.flyoutHost);deparent(data.flyoutHost)}}}}}};var ControlApis=updateWithDefaults({AppBar:{propHandlers:{opened:PropHandlers.focusProperty(_propTypes2.default.bool),children:PropHandlers.syncChildrenWithBindingList("data")}},"AppBar.Button":CommandSpecs.Button,"AppBar.Toggle":CommandSpecs.Toggle,"AppBar.Separator":CommandSpecs.Separator,"AppBar.ContentCommand":CommandSpecs.ContentCommand,"AppBar.FlyoutCommand":CommandSpecs.FlyoutCommand,AutoSuggestBox:{},BackButton:{preCtorInit:function preCtorInit(element,options,data,displayName){element.addEventListener("click",function(eventObject){eventObject.stopPropagation()})},render:function render(component){return _react2.default.createElement("button")}},ContentDialog:{propHandlers:{hidden:PropHandlers.focusProperty(_propTypes2.default.bool),children:PropHandlers.mountTo(function(winjsComponent){return winjsComponent.winControl.element.querySelector(".win-contentdialog-content")})}},DatePicker:{},FlipView:{},Flyout:{render:function render(component){return _react2.default.createElement("div",null,_react2.default.createElement("div",{className:"win-react-flyout-mount-point"}))},propHandlers:{hidden:PropHandlers.focusProperty(_propTypes2.default.bool),children:PropHandlers.mountTo(function(winjsComponent){return winjsComponent.winControl.element.querySelector(".win-react-flyout-mount-point")})}},Hub:{propHandlers:{children:PropHandlers.syncChildrenWithBindingList("sections")}},"Hub.Section":{underlyingControlName:"HubSection",propHandlers:{children:PropHandlers.mountTo(function(winjsComponent){return winjsComponent.winControl.contentElement})}},ItemContainer:{propHandlers:{children:PropHandlers.mountTo(function(winjsComponent){return winjsComponent.winControl.element.querySelector(".win-item")})}},ListView:{propHandlers:{currentItem:PropHandlers.focusProperty(_propTypes2.default.any),headerComponent:PropHandlers.propertyWithMount("header"),footerComponent:PropHandlers.propertyWithMount("footer")}},Menu:{propHandlers:{hidden:PropHandlers.focusProperty(_propTypes2.default.bool),children:{update:function update(winjsComponent,propName,oldValue,newValue){_reactDom2.default.render(_react2.default.createElement("div",null,newValue),winjsComponent.winControl.element)}}}},"Menu.Button":merge(CommandSpecs.Button,{underlyingControlName:"MenuCommand"}),"Menu.Toggle":merge(CommandSpecs.Toggle,{underlyingControlName:"MenuCommand"}),"Menu.Separator":merge(CommandSpecs.Separator,{underlyingControlName:"MenuCommand"}),"Menu.FlyoutCommand":merge(CommandSpecs.FlyoutCommand,{underlyingControlName:"MenuCommand"}),Pivot:{propHandlers:{children:PropHandlers.syncChildrenWithBindingList("items"),customLeftHeaderComponent:PropHandlers.propertyWithMount("customLeftHeader"),customRightHeaderComponent:PropHandlers.propertyWithMount("customRightHeader")}},"Pivot.Item":{underlyingControlName:"PivotItem",propHandlers:{children:PropHandlers.mountTo(function(winjsComponent){return winjsComponent.winControl.contentElement})}},Rating:{},SemanticZoom:{propHandlers:{zoomedInComponent:{propType:_propTypes2.default.element,preCtorInit:function zoomedInComponent_preCtorInit(element,options,data,displayName,propName,value){var child=new WinJSChildComponent(value);element.insertBefore(child.winControl.element,element.firstElementChild);data[propName]=child},update:function zoomedInComponent_update(winjsComponent,propName,oldValue,newValue){var child=winjsComponent.data[propName];if(child.type===newValue.type){child.update(newValue)}else{console.warn("SemanticZoom: zoomedInComponent's component type can't change")}},dispose:function zoomedInComponent_dispose(winjsComponent,propName){var child=winjsComponent.data[propName];child&&child.dispose()}},zoomedOutComponent:{propType:_propTypes2.default.element,preCtorInit:function zoomedOutComponent_preCtorInit(element,options,data,displayName,propName,value){var child=new WinJSChildComponent(value);element.appendChild(child.winControl.element);data[propName]=child},update:function zoomedOutComponent_update(winjsComponent,propName,oldValue,newValue){var child=winjsComponent.data[propName];if(child.type===newValue.type){child.update(newValue)}else{console.warn("SemanticZoom: zoomedOutComponent's component type can't change")}},dispose:function zoomedOutComponent_dispose(winjsComponent,propName){var child=winjsComponent.data[propName];child&&child.dispose()}}}},SplitView:{propHandlers:{paneOpened:PropHandlers.focusProperty(_propTypes2.default.bool),paneComponent:PropHandlers.mountTo(function(winjsComponent){return winjsComponent.winControl.paneElement}),contentComponent:PropHandlers.mountTo(function(winjsComponent){return winjsComponent.winControl.contentElement})}},"SplitView.Command":{underlyingControlName:"SplitViewCommand"},SplitViewPaneToggle:{render:function render(component){return _react2.default.createElement("button")},propHandlers:{paneOpened:{propType:_propTypes2.default.bool,update:function paneOpened_update(winjsComponent,propName,oldValue,newValue){var data=winjsComponent.data[propName];if(!data){data={ariaExpandedMutationObserver:new _winjs2.default.Utilities._MutationObserver(function(){var element=winjsComponent.element;var ariaExpanded=element.getAttribute("aria-expanded")==="true";if(ariaExpanded!==winjsComponent.data[propName].value){fireEvent(element,"invoked")}}),observing:false,value:newValue};winjsComponent.data[propName]=data}if(oldValue!==newValue){if(newValue!==null&&newValue!==undefined){winjsComponent.element.setAttribute("aria-expanded",newValue?"true":"false");if(!data.observing){data.observing=true;data.ariaExpandedMutationObserver.observe(winjsComponent.element,{attributes:true,attributeFilter:["aria-expanded"]})}}else{winjsComponent.element.removeAttribute("aria-expanded");if(data.observing){data.observing=false;data.ariaExpandedMutationObserver.disconnect()}}}data.value=newValue},dispose:function paneOpened_dispose(winjsComponent,propName){var data=winjsComponent.data[propName];if(data&&data.observing){data.ariaExpandedMutationObserver.disconnect()}}}}},TimePicker:{},ToggleSwitch:{},ToolBar:{propHandlers:{opened:PropHandlers.focusProperty(_propTypes2.default.bool),children:PropHandlers.syncChildrenWithBindingList("data")}},"ToolBar.Button":CommandSpecs.Button,"ToolBar.Toggle":CommandSpecs.Toggle,"ToolBar.Separator":CommandSpecs.Separator,"ToolBar.ContentCommand":CommandSpecs.ContentCommand,"ToolBar.FlyoutCommand":CommandSpecs.FlyoutCommand,Tooltip:{propHandlers:{children:PropHandlers.mountTo(function(winjsComponent){return winjsComponent.winControl.element}),contentComponent:PropHandlers.propertyWithMount("contentElement")}}});var ReactWinJS={};Object.keys(ControlApis).sort().forEach(function(controlName){nestedSet(ReactWinJS,controlName,defineControl(ControlApis[controlName]))});ReactWinJS.reactRenderer=function reactRenderer(componentFunction){var componentFunctionBound=void 0;var renderItem=function renderItem(item){var element=document.createElement("div");element.className="win-react-renderer-host";_reactDom2.default.render(componentFunctionBound(item),element);_winjs2.default.Utilities.markDisposable(element,function(){_reactDom2.default.unmountComponentAtNode(element)});return element};return function itemRenderer(itemOrItemPromise){if(!componentFunctionBound){componentFunctionBound=componentFunction.bind(this)}return _winjs2.default.Promise.is(itemOrItemPromise)?itemOrItemPromise.then(renderItem):renderItem(itemOrItemPromise)}};ReactWinJS.defineControl=defineControl;ReactWinJS.PropHandlers=PropHandlers;ReactWinJS.defaultPropHandlers=defaultPropHandlers;exports.default=ReactWinJS;