/*
 * Isomorphic SmartClient
 * Version v14.0p_2026-06-21 (2026-06-21)
 * Copyright(c) 1998 and beyond Isomorphic Software, Inc. All rights reserved.
 * "SmartClient" is a trademark of Isomorphic Software, Inc.
 *
 * licensing@smartclient.com
 *
 * http://smartclient.com/license
 */

if(window.isc&&window.isc.module_Core&&!window.isc.module_Forms){isc.module_Forms=1;isc._moduleStart=isc._Forms_start=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc._moduleEnd&&(!isc.Log||(isc.Log&&isc.Log.logIsDebugEnabled('loadTime')))){isc._pTM={message:'Forms load/parse time: '+(isc._moduleStart-isc._moduleEnd)+'ms',category:'loadTime'};if(isc.Log&&isc.Log.logDebug)isc.Log.logDebug(isc._pTM.message,'loadTime');else if(isc._preLog)isc._preLog[isc._preLog.length]=isc._pTM;else isc._preLog=[isc._pTM]}isc.definingFramework=true;if(window.isc&&isc.version!="v14.0p_2026-06-21/LGPL Development Only"&&!isc.DevUtil){isc.logWarn("SmartClient module version mismatch detected: This application is loading the core module from SmartClient version '"+isc.version+"' and additional modules from 'v14.0p_2026-06-21/LGPL Development Only'. Mixing resources from different SmartClient packages is not supported and may lead to unpredictable behavior. If you are deploying resources from a single package you may need to clear your browser cache, or restart your browser."+(isc.Browser.isSGWT?" SmartGWT developers may also need to clear the gwt-unitCache and run a GWT Compile.":""))}
isc.A=isc.Canvas;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.applyTableResizePolicy=function isc_c_Canvas_applyTableResizePolicy(_1,_2,_3,_4,_5,_6,_7){var _8=this.logIsDebugEnabled("tablePolicy"),_9=this.logIsInfoEnabled("tablePolicy"),_10=this.logIsDebugEnabled("tablePlacement");var _11=_1.$8j;if(!this.$8k(_1)){_11=_1.$8j=[];var _12=0,_13=0;for(var _14=0;_14<_1.length;_14++){var _15=_1[_14];if(!_15.alwaysTakeSpace&&!_15.visible)continue;var _16=_15.getColSpan(),_17=_15.getRowSpan();if(_17==0||_16==0)continue;if(_16==null)_16=1;if(_17==null)_17=1;if(!isNaN(_16))_16=parseInt(_16);if(!isNaN(_17))_17=parseInt(_17);var _18=_16;if(_16=="*")_18=1;var _19=_15.getTitleOrientation();if(_15.showTitle&&(_19==isc.Canvas.LEFT||_19==isc.Canvas.RIGHT))
{_18+=(_15.getTitleColSpan()||1);if(_16!="*")_16+=(_15.getTitleColSpan()||1)}
var _20=(_15.isStartRow?_15.isStartRow():_15.startRow),_21=(_15.isEndRow?_15.isEndRow():_15.endRow);if(_10){this.logDebug("at: "+["row"+_12,"col"+_13]+", item: "+(_15.name||_15.Class)+(_16=="*"?", colSpan:'*'":"")+", required cols:"+_18+(_17>1?", rowSpan:"+_17:"")+(_20?", startRow:true":"")+(_21?", endRow:true":""),"tablePlacement")}
var _22=null,_23=null;if(_13>=_4||(_20&&_13!=0)){_12++;_13=0;_15.$8l=true}else{_15.$8l=false}
if(_12<_11.length){for(;_12<_11.length;_12++){var _24=_11[_12];if(_24==null)break;for(;_13<_4;_13++){if(_24[_13]!=null)continue;for(var j=_13;j<_4;j++){if(_24[j]!=null)break;if((j-_13)+1>=_18){_22=_12;_23=_13;break}}
if(_23!=null)break}
if(_23!=null)break;_13=0;_15.$8l=true}}
if(_23==null){_22=_12;_23=0;_15.$8l=true}
_13=_23;if(_16=="*")_16=_4-_13;if(!isc.isA.Number(_17))_17=1;for(var r=_12;r<_12+_17;r++){if(!_11[r])_11[r]=[];for(var c=_13;c<_13+_16;c++){_11[r][c]=_14}}
_15.$8m=[_23,_22,_23+_16,_22+_17];_13+=_16;if(_21)_13=_4;if(_10){this.logDebug("item: "+(_15.name||_15.Class)+" placed at: "+["row"+_22,"col"+_23]+(_15.$8l?", marked startRow ":"")+", rowTable: "+this.echoAll(_11),"tablePlacement")}}
var _28=[];for(var r=0;r<_11.length;r++){var _29=_11[r];if(_29==null)break;var _30=0,_31=null;for(var c=0;c<_29.length;c++){if(_29[c]==null){_30++;continue}
if(r>0&&_11[r-1]!=null&&_29[c]==_11[r-1][c])continue;var _14=_29[c],_15=_1[_14];if(_15==_31||_15==null)continue;_15.$8n=_28;_15.$8o=_30;if(_10&&(_30>0||_28.length>0)){this.logDebug("itemNum:"+_14+" ("+(_15.name||_15.Class)+") at: "+["row"+_22,"col"+_23]+" preceded by "+(_30>0?_30+" empty cells":"")+(_28.length>0?" "+_28.length+" empty rows":""),"tablePlacement")}
_30=0;_28=[];_31=_15}
if(_31==null){_28.add(_30+(_4-_29.length));_30=0}}
if(_28!=null&&_11.length>0){var _32=_28.length;var _29=_11[_11.length-1];for(var c=0;c<_29.length;c++){var _14=_29[c];_15=_1[_14];if(_15==null)continue;var _33=_15.$8m[3]-_15.$8m[1];_33-=_32;_15.$135a=_33}}}
if(!_5||!isc.isAn.Array(_5)){if(!isc.isAn.Array(_5)){this.logWarn(" 'colWidths' not an array - Ignoring.","tableResizePolicy")}
_5=[]}
_5=_5.duplicate();for(var c=0;c<_5.length;c++){var _34=_5[c];if(isc.isA.String(_34)){if(_34=="*")_5[c]=[0,10000,0,1];else if(_34.contains("*"))_5[c]=[0,10000,0,parseInt(_34)];else if(_34.contains("%"))_5[c]=[0,10000,parseInt(_34),0];else{var _35=parseInt(_34);if(_35==_34){_5[c]=_35}else{this.logWarn("Failed to understand specified colWidth:"+_34);_5[c]=[0,10000,0,1]}}}}
_1.colWidths=_5;_1.$8r=_5=isc.Canvas.stretchResizeList(_1.colWidths,_2);var _36;if(!_6){_6=[];for(var r=0;r<_11.length;r++){var _29=_11[r],_37=null,_38=100000,_39=0,_40=0;if(!_29)continue;for(var c=0;c<_29.length;c++){var _15=_1[_29[c]];if(!_15)continue;var _41=_15.getCellHeight(_7);var _17=(_15.$8m[3]-_15.$8m[1]);if(_8)this.logWarn("item at: "+[r,c]+" has height: "+_41+", item is: "+_15,"tablePlacement");_15.$8p=false;if(isc.isA.Number(_41)){_41=Math.floor(_41/_17);if(_8)this.logWarn("item: "+_15+" has pixel size: "+_41,"tablePlacement");if(_37==null||_41>_37){_37=_41}
if(_41>_38)_38=_41}else if(isc.isA.String(_41)){if(_41.contains("*")){_15.$8p=true;var _42=(_41=="*"?1:parseFloat(_41))/_17;if(_8)this.logWarn("item: "+_15+" has star size: "+_42,"tablePlacement");_40=Math.max(_40,_42)}else{_15.$8p=true;var _43=parseFloat(_41)/_17;if(_8)this.logWarn("item: "+_15+" has percent size: "+_43,"tablePlacement");if(_43>_39)_39=_43}
if(_36==null)_36=2*_15.form.cellPadding;var _44=_15.getMinHeight();if(_44!=null){_44+=_36;if(_44>_37){_37=_44}
if(_44>_38){_38=_44}}
var _45=_15.getMaxHeight();if(_45!=null){_45+=_36;if(_45<_38&&_37<_45)
{_38=_45}}}
if(_39>0||_40>0){if(_37==null)_37=0;_6[r]=[_37,_38,_39,_40]}else{if(_37==null){_37=_1.$8q||22}
_6[r]=_37}}}}
_1.rowHeights=_6;_1.$8s=_6=isc.Canvas.stretchResizeList(_1.rowHeights,_3);if(_9)this.logInfo("\ntotalWidth: "+_2+", totalHeight: "+_3+"\nspecified sizes:\ncols:"+this.echoAll(_1.colWidths)+", rows: "+this.echoAll(_1.rowHeights),"tablePolicy");if(_9)this.logInfo("\nderived sizes:\ncols:"+this.echoAll(_1.$8r)+", rows: "+this.echoAll(_1.$8s),"tablePolicy");for(_14=0;_14<_1.length;_14++){_15=_1[_14];if(!_15.visible)continue;var _46=isc.isA.Canvas(_15),_47=!_46&&isc.isA.CanvasItem(_15),_34=_47?(_15.canvas&&_15.canvas.$pn)||_15.width:_15.getWidth(),_48=_46?_15.getHeight():_15.getCellHeight(_7),_19=_15.getTitleOrientation(),_49=_15.$8m,_50=0;if(_49==null)continue;if(_15.form.linearMode){_34=_15.linearWidth!=null?_15.linearWidth:"*"}
if(_34=="*"||_34=="100%"){_34=0;var _51=_15.getTitleColSpan()||1,_52=(_15.showTitle&&_19==isc.Canvas.LEFT)?_51:0,_53=(_15.showTitle&&_19==isc.Canvas.RIGHT)?_51:0,_54=_49[0]+_52,_55=Math.min(_5.length,_49[2]-_53);for(var c=_54;c<_55;c++){_34+=_5[c]}}
if(_15.showTitle){if(_19==isc.Canvas.LEFT){_50=_5[_49[0]]}else if(_19==isc.Canvas.RIGHT){_50=_5[_49[2]]}else{_50=_15.titleWidth||_34}}
if(_15.$8p){_48=0;var _20=_49[1],_21=_49[3];for(var c=_20;c<_21;c++){_48+=_6[c]}}
_15.$8t=[_34,_48];_15.$8u=_50}},isc.A.$8k=function isc_c_Canvas__tableResizePolicyIsValid(_1){if(!_1.$8j)return false;return true},isc.A.invalidateTableResizePolicy=function isc_c_Canvas_invalidateTableResizePolicy(_1){delete _1.$8j;delete _1.$8s;delete _1.$8r},isc.A.stretchResizeList=function isc_c_Canvas_stretchResizeList(_1,_2){var _3=0,_4=0,_5=0,_6=_1.duplicate();for(var i=0;i<_1.length;i++){var _8=_6[i];if(isc.isA.Number(_8)){_8=Math.max(_8,1);_5+=_8;_6[i]=_8}else if(_8!=null){var _9=_8[2],_10=_8[3];if(_10==0){_3+=_9}
_4+=_10}}
if(_4){var _11=0;if(_3<100){_11=(100-_3)/_4}
for(var r=0;r<_1.length;r++){var _8=_6[r];if(isc.isA.Number(_8))continue;var _9=_8[2],_10=_8[3],_13=_10*_11;if(_9<_13){_8[2]=_13}
if(_10>0)_3+=_8[2]}}
if(_3<=0)return _6;var _14=Math.max(0,_2-_5);for(var r=0;r<_1.length;r++){var _15=Math.max(0,_14/_3),_8=_6[r];if(isc.isA.Number(_8))continue;var _16=_8[0];if(_16==0)continue;var _17=_8[2],_18=_15*_17;if(_18<_16){_6[r]=_16;_14-=_16;_3-=_17;r=0}}
for(var r=0;r<_1.length;r++){var _15=Math.max(0,_14/_3),_8=_6[r];if(isc.isA.Number(_8))continue;var _19=_8[1],_17=_8[2],_18=_15*_17;if(_18>_19){_6[r]=_19;_14-=_19;_3-=_17;r=0}}
_15=Math.max(0,_14/_3);for(var r=0;r<_1.length;r++){_8=_6[r];if(isc.isA.Number(_8))continue;var _17=_8[2];_6[r]=Math.floor(_17*_15);_14-=_6[r]}
if(_14>0){for(var r=_1.length-1;r>=0;r--){_8=_1[r];if(isc.isA.Number(_8))continue;var _19=_8[1];if(_6[r]+_14<=_19){_6[r]+=_14;break}}
if(r<0&&this.logIsInfoEnabled("tablePolicy")){this.logInfo("stretchResizeList(): unable to assign "+_14+"px of remaining space to a variable-sized item due to due to specified maximums","tablePolicy")}}
return _6});isc.B._maxIndex=isc.C+4;isc.ClassFactory.defineClass("ButtonTable",isc.Canvas);isc.A=isc.ButtonTable.getPrototype();isc.A.cellSpacing=0;isc.A.cellPadding=2;isc.A.cellBorder=0;isc.A.tableStyle="menuTable";isc.A.baseButtonStyle="button";isc.A.backgroundColor="CCCCCC";isc.A.useEventParts=true;isc.A=isc.ButtonTable.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.buttonTableClickMaskDefaults={_constructor:"Canvas",width:"100%",height:"100%",overflow:"hidden",click:function(){this.creator.hide()}};isc.B.push(isc.A.setItems=function isc_ButtonTable_setItems(_1){this.items=isc.shallowClone(_1);this.redraw()},isc.A.getInnerHTML=function isc_ButtonTable_getInnerHTML(){var _1=isc.SB.create();_1.append("<TABLE"," CLASS=",this.tableStyle," WIDTH=",this.getWidth()-(this.overflow==isc.Canvas.SCROLL||this.overflow==isc.Canvas.AUTO?this.getScrollbarSize():0)," HEIGHT=",this.getHeight()," CELLSPACING=",this.cellSpacing," CELLPADDING=",this.cellPadding," BORDER=",this.cellBorder,"><TR>");for(var r=0;r<this.items.length;r++){var _3=this.items[r];_1.append("<TR>");if(!isc.isAn.Array(_3))_3=[_3];for(var i=0;i<_3.length;i++){var _5=_3[i];if(_5.eventPart){_1.append(this.getCellButtonHTML(_5.contents,_5.style,_5.disabled,_5.selected,_5.align,_5.extraTagStuff,_5.eventPart,_5.eventId))}else{_1.append(this.getCellHTML(_5.contents,_5.style,_5.align,_5.extraTagStuff))}}
_1.append("</TR>")}
_1.append("</TABLE>");return _1.release(false)},isc.A.showModal=function isc_ButtonTable_showModal(){if(!this.buttonTableClickMask){this.buttonTableClickMask=this.createAutoChild("buttonTableClickMask")}
this.buttonTableClickMask.show();this.buttonTableClickMask.bringToFront();this.show();this.unmask();this.moveAbove(this.buttonTableClickMask)},isc.A.hide=function isc_ButtonTable_hide(){this.Super("hide",arguments);if(this.buttonTableClickMask)this.buttonTableClickMask.hide()},isc.A.destroy=function isc_ButtonTable_destroy(){if(this.buttonTableClickMask){this.buttonTableClickMask.destroy();this.buttonTableClickMask=null}
this.Super("destroy",arguments)},isc.A.getButtonBaseStyle=function isc_ButtonTable_getButtonBaseStyle(_1){var _2;if(_1)_2=_1.getAttribute("basestyle");if(!_2)_2=this.baseButtonStyle;return _2},isc.A.getMouseOutStyle=function isc_ButtonTable_getMouseOutStyle(_1){var _2=this.getButtonBaseStyle(_1);if(this.buttonIsSelected(_1)){_2+="Selected"}
if(this.buttonIsDisabled(_1)){_2+="Disabled"}
return _2},isc.A.buttonIsSelected=function isc_ButtonTable_buttonIsSelected(_1){return _1&&_1.getAttribute("buttonselected")},isc.A.buttonIsDisabled=function isc_ButtonTable_buttonIsDisabled(_1){return _1&&_1.getAttribute("buttondisabled")},isc.A.cellButtonOver=function isc_ButtonTable_cellButtonOver(_1){var _2=this.getButtonBaseStyle(_1);if(this.buttonIsSelected(_1))_2+="Selected";if(_1)_1.className=_2+"Over"},isc.A.cellButtonOut=function isc_ButtonTable_cellButtonOut(_1){if(!_1)return;_1.className=this.getMouseOutStyle(_1)},isc.A.cellButtonDown=function isc_ButtonTable_cellButtonDown(_1){if(_1){var _2=this.getButtonBaseStyle(_1);if(this.buttonIsSelected(_1))_2+="Selected";_2+="Down"
_1.className=_2}},isc.A.getCellHTML=function isc_ButtonTable_getCellHTML(_1,_2,_3,_4){return isc.StringBuffer.concat("<TD ALIGN=",(_3||isc.Canvas.CENTER)," CLASS=",(_2||this.baseButtonStyle+"Disabled"),(_4||_4),">",_1,"</TD>")},isc.A.handleMouseDown=function isc_ButtonTable_handleMouseDown(_1){_1.touchStartReturnValue=false;var _2=_1.nativeTarget;if(_2.tagName!="TD")_2=_2.parentNode;if(!_2.getAttribute||!_2.getAttribute(this.$pk))return;this.cellButtonDown(_2);this.Super("handleMouseDown",arguments)},isc.A.handleMouseUp=function isc_ButtonTable_handleMouseUp(_1){var _2=_1.nativeTarget;if(_2.tagName!="TD")_2=_2.parentNode;if(!_2.getAttribute||!_2.getAttribute(this.$pk))return;this.cellButtonOut(_2);this.Super("handleMouseUp",arguments)},isc.A.getCellButtonHTML=function isc_ButtonTable_getCellButtonHTML(_1,_2,_3,_4,_5,_6,_7,_8){if(_2==null)_2=this.baseButtonStyle;var _9=_2;if(_3)_9+="Selected";if(_4)_9+="Disabled";var _10=" "+this.$pk+"="+(_7?_7:"$95w");if(_8!=null)_10+=" id="+this.getID()+"_"+_7+"_"+_8;return isc.StringBuffer.concat("<TD ALIGN=",(_5||isc.Canvas.CENTER)," CLASS=",_9," ONMOUSEOVER='",this.getID(),".cellButtonOver(this);return false;' "," ONMOUSEOUT='",this.getID(),".cellButtonOut(this);return true;'"," basestyle='",_2,"'",(_3?" buttonselected='true'":null),(_4?" buttondisabled='true'":null),(_6?" "+_6:null),_10+">",_1,"</TD>")});isc.B._maxIndex=isc.C+16;if(isc.ListGrid==null){isc.Log.logInfo("Source for DateGrid included in this module, but required superclass (ListGrid) is not loaded. This can occur if the Forms module is loaded without the Grids module. DateGrid class will not be defined within this page.","moduleDependencies")}else{isc.ClassFactory.defineClass("DateGrid","ListGrid");isc.A=isc.DateGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.width=10;isc.A.height=10;isc.A.cellHeight=20;isc.A.minFieldWidth=20;isc.A.autoFitMaxRows=5;isc.A.useCellRollOvers=true;isc.A.canSelectCells=true;isc.A.leaveScrollbarGap=false;isc.A.canResizeFields=false;isc.A.headerButtonProperties={padding:0};isc.A.headerHeight=20;isc.A.canSort=false;isc.A.canEdit=false;isc.A.showSortArrow=isc.ListGrid.NONE;isc.A.showFiscalYear=false;isc.A.showFiscalWeek=false;isc.A.showCalendarWeek=false;isc.A.loadingDataMessage="";isc.A.alternateRecordStyles=false;isc.A.showHeaderMenuButton=false;isc.A.showHeaderContextMenu=false;isc.A.canSaveSearches=false;isc.A.cellPadding=0;isc.A.wrapCells=false;isc.A.locateRowsBy="targetCellValue";isc.A.fiscalYearFieldTitle="Year";isc.A.weekFieldTitle="Wk";isc.A.canReorderFields=false;isc.A.bodyProperties={_generated:true,canSelectOnRightMouse:false};isc.A.autoFitData="both";isc.A.recordRadius=null;isc.A.redrawOnResize=true;isc.A.fiscalYearColWidth=30;isc.A.alwaysShowFirstFiscalWeek=true;isc.B.push(isc.A.init=function isc_DateGrid_init(){var _1=this.getWeekendDays();this.shortDayNames=isc.DateUtil.getShortDayNames(3);this.shortDayTitles=isc.DateUtil.getShortDayNames(this.dayNameLength);this.shortMonthNames=isc.DateUtil.getShortMonthNames();var _2=this;this.fields=[{name:"fiscalYear",type:"number",title:this.fiscalYearFieldTitle,width:this.fiscalYearColWidth,align:"center",cellAlign:"center",showRollOver:false,showDown:false,baseStyle:this.baseFiscalYearStyle,headerBaseStyle:this.fiscalYearHeaderStyle||this.baseFiscalYearStyle,showIf:function(_13,_14){return _13.showFiscalYear==true}},{name:"fiscalWeek",type:"number",title:this.weekFieldTitle,width:25,align:"center",showRollOver:false,showDown:false,baseStyle:this.baseWeekStyle,headerBaseStyle:this.weekHeaderStyle||this.baseWeekStyle,showIf:function(_13,_14){return _13.showFiscalWeek==true}},{name:"calendarWeek",type:"number",title:this.weekFieldTitle,width:25,align:"center",showRollOver:false,showDown:false,baseStyle:this.baseWeekStyle,headerBaseStyle:this.weekHeaderStyle||this.baseWeekStyle,showIf:function(_13,_14){return _13.showCalendarWeek==true}}];for(var i=0;i<7;i++){var _4=i+this.firstDayOfWeek;if(_4>6)_4-=7;var _5=_1.contains(_4);var _6={name:this.shortDayNames[_4],weekStartOffset:i,isWeekend:_5,isDateField:true,align:"center",dayNum:_4,baseStyle:_5&&this.styleWeekends?this.baseWeekendStyle:this.baseWeekdayStyle,headerBaseStyle:_5&&this.styleWeekends?this.weekendHeaderStyle:this.headerBaseStyle,showIf:function(_13,_14){return _13.showWeekends||_14.isWeekend==false}};this.fields.add(_6)}
this.fields.setProperty("_generated",true);if(!this.chosenDate)this.chosenDate=isc.DateUtil.createLogicalDate();this.month=this.chosenDate.getMonth();this.year=this.chosenDate.getFullYear();this.day=this.chosenDate.getDate();var _7=isc.DateUtil.createLogicalDate(this.year,this.month,1);this.visibleStart=isc.DateUtil.getStartOf(_7,"w",null,this.firstDayOfWeek);this.data=[];var d=this.visibleStart.duplicate();var _9=this.getFiscalCalendar();for(var i=1;i<7;i++){var _10=d.getFiscalYear(_9);var _11=isc.DateUtil.getEndOf(d,"W",true,this.firstDayOfWeek)
var _6={name:"week"+i,weekStart:d.duplicate(),weekEnd:_11,fiscalYear:_10.fiscalYear,fiscalYearEnd:_11.getFiscalYear(_9).fiscalYear,fiscalWeek:d.getFiscalWeek(_9,this.firstDayOfWeek),fiscalWeekEnd:_11.getFiscalWeek(_9,this.firstDayOfWeek),calendarWeek:d.getWeek(this.firstDayOfWeek)};for(var j=0;j<7;j++){_6[this.shortDayNames[j]]=j}
this.data.add(_6);d.setDate(d.getDate()+7)}
return this.Super("init",arguments)},isc.A.initWidget=function isc_DateGrid_initWidget(){this.firstRun=true;this.Super("initWidget",arguments)},isc.A.draw=function isc_DateGrid_draw(){var _1=this.Super("draw",arguments);this.$244v="*";if(this.refreshOnDraw){delete this.refreshOnDraw;this.refreshUI(this.year,this.month,this.chosenDate)}},isc.A.getTitleField=function isc_DateGrid_getTitleField(){return null},isc.A.getCellAlign=function isc_DateGrid_getCellAlign(_1,_2,_3){return"center"},isc.A.getBaseStyle=function isc_DateGrid_getBaseStyle(_1,_2,_3){var _4=this.getField(_3);if(_4.isWeekend&&!this.styleWeekends)return this.baseWeekdayStyle;return this.Super("getBaseStyle",arguments)},isc.A.getCellStyle=function isc_DateGrid_getCellStyle(_1,_2,_3){var _4=this.getField(_3),_5=this.getRecordWeekNumber(_1),_6=_5==this.selectedWeek;if(_4.name=="fiscalYear"){return!_6?this.baseFiscalYearStyle:this.selectedWeekStyle}else if(_4.name=="fiscalWeek"||_4.name=="calendarWeek"){return!_6?this.baseWeekStyle:this.selectedWeekStyle}
var _7=this.getCellDate(_1,_2,_3),_8=_7&&_7.isToday(),_9=this.dateIsDisabled(_7),_10=_7.getMonth()!=this.month,_11=this.Super("getCellStyle",arguments);;if(!this.body||!this.body.isDrawn()||!this.body.isVisible()){return _11+(_8&&this.creator.todayStyle?" "+this.creator.todayStyle:"")}
if(this.body.$249i()){return _11+(_8&&this.creator.todayStyle?" "+this.creator.todayStyle:"")}
if(_4.isDateField){if((_9||_10||this.isDisabled())){_11=_4.isWeekend&&this.styleWeekends?this.disabledWeekendStyle:this.disabledWeekdayStyle;var _12=this.body.getEventRow(),_13=this.body.getEventColumn(),_14=(_12==_2&&_13==_3),_15=this.selectionManager&&this.selectionManager.lastSelectedCell,_16=_15?_15[0]==_2&&_15[1]==_3:this.cellSelection?this.cellSelection.isSelected(_2,_3):false,_17=_11.indexOf("Over"),_18=_11.indexOf("Selected");if(_17>=0)_11=_11.substring(0,_17);if(_18>=0)_11=_11.substring(0,_18);if(_16)_11+="Selected";if(_14)_11+="Over"}}
if(_8&&this.creator.todayStyle)_11+=" "+this.creator.todayStyle;return _11},isc.A.mouseOut=function isc_DateGrid_mouseOut(){this.clearLastHilite()},isc.A.cellMouseDown=function isc_DateGrid_cellMouseDown(_1,_2,_3){var _4=this.getCellDate(_1,_2,_3);if(!_4)return true;if(this.dateIsDisabled(_4))return false;return true},isc.A.cellClick=function isc_DateGrid_cellClick(_1,_2,_3){var _4=this.getCellDate(_1,_2,_3);if(!_4)return true;if(this.dateIsDisabled(_4)){return true}
this.year=_4.getFullYear();this.month=_4.getMonth();this.day=_4.getDate();this.chosenDate=isc.DateUtil.createLogicalDate(this.year,this.month,this.day);this.dateClick(this.year,this.month,this.day)},isc.A.dateClick=function isc_DateGrid_dateClick(_1,_2,_3){},isc.A.getRecordWeekNumber=function isc_DateGrid_getRecordWeekNumber(_1){if(_1==null)return-1;if(isc.isA.Number(_1))_1=this.data[_1];return this.showFiscalWeek?_1.fiscalWeek:_1.calendarWeek},isc.A.isSelectedWeek=function isc_DateGrid_isSelectedWeek(_1){return this.getRecordWeekNumber(_1)==this.selectedWeek},isc.A.cellSelectionChanged=function isc_DateGrid_cellSelectionChanged(_1){var _2=this.getCellSelection();for(var i=0;i<_1.length;i++){var _4=_1[i];if(_2.cellIsSelected(_4[0],_4[1])){var _5=this.getRecordWeekNumber(this.getRecord(_4[0]));if(this.selectedWeek!=_5){this.setSelectedWeek(_5)}
return}}
return},isc.A.getSelectedWeek=function isc_DateGrid_getSelectedWeek(){return this.selectedWeek||this.getRecordWeekNumber(0)},isc.A.setSelectedWeek=function isc_DateGrid_setSelectedWeek(_1){this.selectedWeek=_1;this.markForRedraw();this.selectedWeekChanged(this.selectedWeek)},isc.A.selectedWeekChanged=function isc_DateGrid_selectedWeekChanged(_1){},isc.A.getWorkingMonth=function isc_DateGrid_getWorkingMonth(){return this.month},isc.A.getSelectedDate=function isc_DateGrid_getSelectedDate(){return this.chosenDate},isc.A.disableMarkedDates=function isc_DateGrid_disableMarkedDates(){this.disabledDateStrings={};if(this.disabledDates&&this.disabledDates.length>0){for(var i=0;i<this.disabledDates.length;i++){this.disabledDateStrings[this.disabledDates[i].toShortDate()]=true}}},isc.A.dateInRange=function isc_DateGrid_dateInRange(_1){var _2=this.creator.startDate,_3=this.creator.endDate;if(_2&&isc.DateUtil.compareLogicalDates(_1,_2)>0)return false;if(_3&&isc.DateUtil.compareLogicalDates(_1,_3)<0)return false;return true},isc.A.dateIsDisabled=function isc_DateGrid_dateIsDisabled(_1){if(!_1)return;if(!this.dateInRange(_1))return true;if(this.disableWeekends&&this.dateIsWeekend(_1))return true;var _2=this.disabledDateStrings?this.disabledDateStrings[_1.toShortDate()]!=null:false;return _2},isc.A.getCellDate=function isc_DateGrid_getCellDate(_1,_2,_3){var _4=this.getField(_3);if(_4.weekStartOffset==null)return null;var _5=_1.weekStart.duplicate();_5.setDate(_5.getDate()+_4.weekStartOffset);return _5},isc.A.dateInView=function isc_DateGrid_dateInView(_1){if(isc.DateUtil.compareLogicalDates(_1,this.visibleStart)>0){return false}else{var _2=isc.DateUtil.createLogicalDate(this.visibleStart);_2=isc.DateUtil.adjustDate(_2,"+5W")
if(isc.DateUtil.compareLogicalDates(_1,_2)<0){return false}}
return true},isc.A.selectDateCell=function isc_DateGrid_selectDateCell(_1,_2){var _3=this.selectionManager;if(!this.dateInView(_1)){_3&&_3.deselectAll&&_3.deselectAll();delete _3.lastSelectedCell
this.body.markForRedraw();this.setSelectedWeek(_2!=null?_2:this.getRecordWeekNumber(0));return}
var _4=this.getDateCell(_1);if(!_4){if(_3&&_3.deselectAll)_3.deselectAll();return}
if(_4.colNum!=null)_3.selectSingleCell(_4.rowNum,_4.colNum);this.setSelectedWeek(_2!=null?_2:this.getRecordWeekNumber(_4.record))},isc.A.getDateCell=function isc_DateGrid_getDateCell(_1){var _2=this.getCellSelection(),_3=this.data;if(_1&&_3&&_3.length>0){var _4=this.showWeekends==false?5:7;var _5=this.getField(this.shortDayNames[_1.getDay()]);var _6=_5?this.getFieldNum(_5.name):null;for(var i=0;i<_3.length;i++){var _8=_3[i];var _9=_8.weekStart.duplicate();if(_9){_9.setDate(_9.getDate()+_5.weekStartOffset);if(isc.DateUtil.compareLogicalDates(_9,_1)==0){return{rowNum:i,colNum:_6,record:_8}}}}}},isc.A.shouldDisableDate=function isc_DateGrid_shouldDisableDate(_1){var _2=this.dateIsDisabled(_1);return _2},isc.A.getCellValue=function isc_DateGrid_getCellValue(_1,_2,_3,_4){var _5=this.getCellDate(_1,_2,_3);if(_5)return _5.getDate();return this.Super("getCellValue",arguments)},isc.A.getFieldTitle=function isc_DateGrid_getFieldTitle(_1){var f=this.getField(_1);if(f.weekStartOffset!=null){return this.shortDayTitles[f.dayNum]}
return this.Super("getFieldTitle",arguments)},isc.A.getRowHeight=function isc_DateGrid_getRowHeight(_1,_2){if(this.body&&this.$244v=="*"){var _3=this.getViewportHeight()-this.header.getVisibleHeight();var _4=this.getTotalRows(),_5=Math.floor(_3/_4),_6=Math.floor(_3-(_5*(_4-1)));if(_2==_4-1)return _6-1;return _5}
return this.Super("getRowHeight",arguments)},isc.A.refreshUI=function isc_DateGrid_refreshUI(_1,_2,_3,_4){if(!this.isDrawn()){this.year=_1;this.month=_2;this.chosenDate=_3;this.refreshOnDraw=true;return}
if(this.firstRun||_3&&isc.DateUtil.compareLogicalDates(_3,this.chosenDate)!=0){delete this.firstRun;this.setChosenDate(_3)}else{this.showMonth(_2,_1,_4)}},isc.A.setChosenDate=function isc_DateGrid_setChosenDate(_1){this.chosenDate=_1.duplicate();this.day=this.chosenDate.getDate();this.showMonth(this.chosenDate.getMonth(),this.chosenDate.getFullYear())},isc.A.showMonth=function isc_DateGrid_showMonth(_1,_2,_3){delete this.selectedWeek;this.month=_1;if(_2)this.year=_2;this.monthStart=isc.DateUtil.createLogicalDate(this.year,this.month,1)
this.visibleStart=isc.DateUtil.getStartOf(this.monthStart,"w",true,this.firstDayOfWeek);var d=this.visibleStart.duplicate()
var _5=this.getFiscalCalendar();for(var i=0;i<6;i++){var _7=d.getFiscalYear(_5);var _8=isc.DateUtil.getEndOf(d,"W",true,this.firstDayOfWeek);isc.addProperties(this.data[i],{weekStart:d.duplicate(),weekEnd:_8,fiscalYear:_7.fiscalYear,fiscalYearEnd:_8.getFiscalYear(_5).fiscalYear,fiscalWeek:d.getFiscalWeek(_5,this.firstDayOfWeek),fiscalWeekEnd:_8.getFiscalWeek(_5,this.firstDayOfWeek),calendarWeek:isc.DateUtil.adjustDate(d,"+4d").getWeek(this.firstDayOfWeek)});d.setDate(d.getDate()+7)}
this.disableMarkedDates();var _9=this.showFiscalYear||(this.showWeekends!=this.$234l)||(this.showFiscalWeek!=this.fieldIsVisible("fiscalWeek"))||(this.showCalendarWeek!=this.fieldIsVisible("calendarWeek"));if(_9){var _10=this.getWeekendDays();var _11=this.showFiscalYear?1:0;if(this.showFiscalWeek||this.showCalendarWeek)_11++;for(var i=0;i<7;i++){var _12=i+this.firstDayOfWeek;if(_12>6)_12-=7;var _13=_10.contains(_12);var _14={name:this.shortDayNames[_12],weekStartOffset:i,isWeekend:_13,isDateField:true,align:"center",dayNum:_12,baseStyle:_13&&this.styleWeekends?this.baseWeekendStyle:this.baseWeekdayStyle,headerBaseStyle:_13&&this.styleWeekends?this.weekendHeaderStyle:this.headerBaseStyle,showIf:function(_16,_15){return _16.showWeekends||_15.isWeekend==false}};var _15=this.fields[_11+i];if(_15)isc.addProperties(_15,_14)}
this.refreshFields()}
if(this.isDrawn())this.redraw();this.selectDateCell(this.getSelectedDate(),_3)
this.$234l=this.showWeekends},isc.A.getWeekendDays=function isc_DateGrid_getWeekendDays(){if(!this.weekendDays)this.weekendDays=isc.DateUtil.getWeekendDays();return this.weekendDays},isc.A.dateIsWeekend=function isc_DateGrid_dateIsWeekend(_1){if(!_1)return false;var _2=this.getWeekendDays();return _1.getDay()==_2[0]||_1.getDay()==_2[1]},isc.A.getFiscalCalendar=function isc_DateGrid_getFiscalCalendar(){return this.fiscalCalendar||isc.DateUtil.getFiscalCalendar()},isc.A.getWeekRecord=function isc_DateGrid_getWeekRecord(_1){var _2=this.getFiscalCalendar(),_3=_1.getFiscalYear(_2),_4=isc.DateUtil.dateAdd(_1,"d",6);if(_1.logicalDate)_4.logicalDate=true;var _5=isc.DateUtil.dateAdd(_1,"D",4);var _6={rowStartDate:_1,rowEndDate:_4.duplicate(),fiscalYear:_3.fiscalYear,fiscalYearEnd:_4.getFiscalYear(_2).fiscalYear,fiscalWeek:_1.getFiscalWeek(_2,this.firstDayOfWeek),fiscalWeekEnd:_4.getFiscalWeek(_2,this.firstDayOfWeek),calendarWeek:_5.getWeek(this.firstDayOfWeek),weekDate:_5};if(_6.fiscalWeek!=_6.fiscalWeekEnd){var _7=false,_8=false;if(_6.fiscalYear!=_6.fiscalYearEnd){if(!this.alwaysShowFirstFiscalWeek){var _9=Date.getFiscalStartDate(_4,_2).getDay(),_10=_9-this.firstDayOfWeek;if(_10<0)_10+=6;if(_10<3)_7=true}else _7=true}
if(!_7){var _11=Date.getFiscalStartDate(_1,_2).getDay(),_10=_11-this.firstDayOfWeek;if(_10<0)_10+=6;if(_10>0&&_10<3)_8=true}
if(_7){_6.fiscalYear=_6.fiscalYearEnd;_6.fiscalWeek=1}else if(_8){_6.fiscalWeek+=1}}
var _12=_1.getFullYear(),_13=_1.getMonth(),_14=this.getWeekendDays();for(var i=0;i<7;i++){var _16=isc.DateUtil.createLogicalDate(_12,_13,_1.getDate()+i,0);var _17=this.shortDayNames[_16.getDay()];_6[_17]=_16}
return _6});isc.B._maxIndex=isc.C+37}
isc.ClassFactory.defineClass("DateChooser","VLayout");isc.A=isc.DateChooser.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.height=1;isc.A.overflow="visible";isc.A.inherentWidth=true;isc.A.neverExpandWidth=true;isc.A.showNavigationLayout=true;isc.A.navigationLayoutConstructor="HLayout";isc.A.navigationLayoutDefaults={width:1,height:1,layoutAlign:"top",defaultLayoutAlign:"center",align:"center"};isc.A.showFiscalYearChooser=false;isc.A.fiscalYearChooserButtonDefaults={minWidth:30,backgroundColor:"transparent",autoFit:true,click:function(){if(this.isSelected()){this.creator.yearMenu.hide()}else{this.setSelected(true);this.creator.showFiscalYearMenu()}},autoParent:"navigationLayout",align:"center"};isc.A.showWeekChooser=false;isc.A.weekChooserButtonDefaults={minWidth:25,backgroundColor:"transparent",autoFit:true,click:function(){if(this.isSelected()){this.creator.weekMenu.hide()}else{this.setSelected(true);this.creator.showWeekMenu()}},autoParent:"navigationLayout",align:"center"};isc.A.previousYearButtonDefaults={width:20,backgroundColor:"transparent",click:function(){this.creator.showPrevYear()},autoParent:"navigationLayout",align:"center",noDoubleClicks:true};isc.A.previousYearButtonAriaLabel="Previous year";isc.A.previousMonthButtonDefaults={width:20,backgroundColor:"transparent",click:function(){this.creator.showPrevMonth()},autoParent:"navigationLayout",align:"center",noDoubleClicks:true};isc.A.previousMonthButtonAriaLabel="Previous month";isc.A.monthChooserButtonDefaults={backgroundColor:"transparent",click:function(){if(this.isSelected()){this.creator.monthMenu.hide()}else{this.setSelected(true);this.creator.showMonthMenu()}},autoParent:"navigationLayout",align:"center"};isc.A.yearChooserButtonDefaults={backgroundColor:"transparent",click:function(){if(this.isSelected()){this.creator.yearMenu.hide()}else{this.setSelected(true);this.creator.showYearMenu()}},autoParent:"navigationLayout",align:"center"};isc.A.nextMonthButtonDefaults={backgroundColor:"transparent",width:20,click:function(){this.creator.showNextMonth()},autoParent:"navigationLayout",align:"center",noDoubleClicks:true};isc.A.nextMonthButtonAriaLabel="Next month";isc.A.nextYearButtonDefaults={width:20,backgroundColor:"transparent",click:function(){this.creator.showNextYear()},autoParent:"navigationLayout",align:"center",noDoubleClicks:true};isc.A.nextYearButtonAriaLabel="Next year";isc.A.buttonLayoutConstructor="HLayout";isc.A.buttonLayoutDefaults={width:1,height:1,overflow:"visible",align:"center",defaultLayoutAlign:"center",extraSpace:2};isc.A.dateGridDefaults={_constructor:"DateGrid",layoutAlign:"top",dateClick:function(_1,_2,_3){this.creator.dateClick(_1,_2,_3)},getSelectedDate:function(){return this.creator.chosenDate},selectedWeekChanged:function(_1){this.creator.updateWeekChooser()}};isc.A.bottomButtonConstructor="IButton";isc.A.todayButtonDefaults={padding:2,autoFit:true,click:function(){this.creator.todayClick()}};isc.A.cancelButtonDefaults={padding:2,autoFit:true,click:function(){this.creator.cancelClick()}};isc.A.applyButtonDefaults={padding:2,autoFit:true,click:function(){this.creator.applyClick()}};isc.A.navigationLayoutHeight=20;isc.A.showYearButtons=true;isc.A.showYearChooser=true;isc.A.showMonthButtons=true;isc.A.showMonthChooser=true;isc.A.skinImgDir="images/common/";isc.A.prevYearIcon="[SKIN]doubleArrow_left.gif";isc.A.prevYearIconWidth=14;isc.A.prevYearIconHeight=7;isc.A.prevMonthIcon="[SKIN]arrow_left.gif";isc.A.prevMonthIconWidth=7;isc.A.prevMonthIconHeight=7;isc.A.nextYearIcon="[SKIN]doubleArrow_right.gif";isc.A.nextYearIconWidth=14;isc.A.nextYearIconHeight=7;isc.A.nextMonthIcon="[SKIN]arrow_right.gif";isc.A.nextMonthIconWidth=7;isc.A.nextMonthIconHeight=7;isc.A.showDoubleYearIcon=true;isc.A.yearMenuStyle="dateChooserYearMenu";isc.A.startYear=(new Date().getFullYear()-10);isc.A.endYear=(new Date().getFullYear()+5);isc.A.startDate=null;isc.A.endDate=null;isc.A.startYearRange=30;isc.A.endYearRange=10;isc.A.monthMenuStyle="dateChooserMonthMenu";isc.A.weekMenuStyle="dateChooserWeekMenu";isc.A.buttonLayoutControls=["todayButton","cancelButton","applyButton"];isc.A.showTodayButton=true;isc.A.showCancelButton=null;isc.A.todayButtonTitle="Today";isc.A.cancelButtonTitle="Cancel";isc.A.applyButtonTitle="Apply";isc.A.disableWeekends=false;isc.A.showWeekends=true;isc.A.styleWeekends=true;isc.A.firstDayOfWeek=0;isc.A.year=isc.DateUtil.getAsDisplayDate(new Date()).getFullYear();isc.A.month=isc.DateUtil.getAsDisplayDate(new Date()).getMonth();isc.A.chosenDate=isc.DateUtil.getAsDisplayDate(new Date());isc.A.baseButtonStyle="dateChooserButton";isc.A.menuItemStyle="dateChooserButton";isc.A.baseWeekdayStyle="dateChooserWeekday";isc.A.baseWeekendStyle="dateChooserWeekend";isc.A.baseFiscalYearStyle="dateChooserFiscalYearCell";isc.A.baseWeekStyle="dateChooserWeekCell";isc.A.disabledWeekdayStyle="dateChooserDisabledWeekday";isc.A.disabledWeekendStyle="dateChooserDisabledWeekend";isc.A.selectedWeekStyle="dateChooserSelectedWeek";isc.A.alternateStyleSuffix="Dark";isc.A.headerStyle="dateChooserButtonDisabled";isc.A.navButtonConstructor="IButton";isc.A.useBackMask=true;isc.A.canFocus=true;isc.A.useFirstDayOfFiscalWeek=true;isc.A.timeLayoutConstructor="HLayout";isc.A.timeLayoutDefaults={width:1,height:1,overflow:"visible",layoutAlign:"center",align:"center",extraSpace:1,autoDraw:false,visibility:"hidden"};isc.A.timeFormDefaults={_constructor:"DynamicForm",width:1,overflow:"visible"};isc.A.closeOnEscapeKeypress=false;isc.A.timeItemDefaults={name:"time",editorType:"TimeItem",useTextField:false,showTitle:false};isc.A.timeItemTitle="Time";isc.A.use24HourTime=true;isc.A.fiscalYearFieldTitle="Year";isc.A.weekFieldTitle="Wk";isc.B.push(isc.A.getWeekendDays=function isc_DateChooser_getWeekendDays(){return this.weekendDays||isc.DateUtil.getWeekendDays()});isc.B._maxIndex=isc.C+1;isc.A=isc.DateChooser.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.showControlPropertyMap={todayButton:"showTodayButton",cancelButton:"showCancelButton",applyButton:"showApplyButton"};isc.A.$880="body";isc.A.$881="header";isc.A.dayNameLength=2;isc.A.alwaysLimitMonths=false;isc.A.monthMenuFormat="MMM";isc.A.useButtonTable=false;isc.A.monthMenuConstructor="DateChooserMenuGrid";isc.A.monthMenuDefaults={cellClick:function(_1,_2,_3){if(!_1||_1.disabled)return;this.creator.showMonth(_1.eventId)},hide:function(){this.creator.monthChooserButton.setSelected(false);this.Super("hide",arguments)}};isc.A.weekMenuConstructor="DateChooserMenuGrid";isc.A.weekMenuDefaults={cellClick:function(_1,_2,_3){if(!_1)return;this.creator.showWeek(_1.eventId)},hide:function(){this.creator.weekChooserButton.setSelected(false);this.Super("hide",arguments)}};isc.A.yearMenuConstructor="DateChooserMenuGrid";isc.A.yearMenuDefaults={cellClick:function(_1,_2,_3){if(!_1||_1.disabled)return;if(this.fiscal){this.creator.showFiscalYear(_1.eventId)}else{this.creator.showYear(_1.eventId)}},hide:function(){if(this.creator.yearChooserButton)this.creator.yearChooserButton.setSelected(false);if(this.creator.fiscalYearChooserButton)this.creator.fiscalYearChooserButton.setSelected(false);this.Super("hide",arguments)}};isc.A.$2314={showTodayButton:true,showCancelButton:true,showApplyButton:true};isc.B.push(isc.A.init=function isc_DateChooser_init(){if(this.showFullScreen()){this.width="100%";this.height="100%";this.overflow="hidden"}
return this.Super("init",arguments)},isc.A.initWidget=function isc_DateChooser_initWidget(){this.monthNames=isc.DateUtil.getMonthNames();this.shortMonthNames=isc.DateUtil.getShortMonthNames();if(this.showFiscalYearChooser&&this.useFirstDayOfFiscalWeek){var _1=Date.getFiscalStartDate(isc.DateUtil.getAsDisplayDate(new Date()),this.getFiscalCalendar());this.firstDayOfWeek=_1.getDay()}
if(this.showCancelButton==null)this.showCancelButton=!!this.showTimeItem;if(this.showApplyButton==null)this.showApplyButton=!!this.showTimeItem;this.Super("initWidget",arguments);if(this.headerHeight!=null)this.navigationLayoutHeight=this.headerHeight;this.makeNavigationLayout();this.makeTimeLayout();this.makeButtonLayout();this.makeDateGrid();if(this.$244r>this.$244s){if(this.$244t>this.$244r){this.minBreadthMember=this.dateGrid}else{this.minBreadthMember=this.navigationLayout}}else{if(this.$244t>this.$244s){this.minBreadthMember=this.dateGrid}else{this.minBreadthMember=this.buttonLayout}}
this.addMember(this.navigationLayout);if(!this.showFullScreen())this.addMember(this.dateGrid);if(this.showTimeItem==true){this.addMember(this.timeLayout);this.timeLayout.setWidth("100%");this.timeLayout.show()}
if(!this.allButtonsHidden()){this.addMember(this.buttonLayout);this.buttonLayout.setWidth("100%");this.buttonLayout.show()}
if(this.chosenDate){if(this.showTimeItem){this.chosenTime=isc.DateUtil.getLogicalTimeOnly(this.chosenDate)}
this.chosenDate=isc.DateUtil.getLogicalDateOnly(this.chosenDate);this.year=this.chosenDate.getFullYear();this.month=this.chosenDate.getMonth();this.day=this.chosenDate.getDate()}},isc.A.makeTimeLayout=function isc_DateChooser_makeTimeLayout(){var _1=isc.addProperties({},{title:this.timeItemTitle,use24HourTime:this.use24HourTime,showSecondItem:!!this.showSecondItem},this.timeItemDefaults,this.timeItemProperties,{name:"time"});this.timeForm=this.createAutoChild("timeForm",{top:-1000,autoDraw:false,items:[_1]});this.timeLayout=this.createAutoChild("timeLayout",{top:-1000,autoDraw:false,members:[this.timeForm]});this.timeLayout.draw();this.timeLayout.show();this.$244u=this.timeForm.getVisibleWidth();this.timeLayout.minWidth=this.$244u;this.timeLayout.minHeight=this.timeForm.getVisibleHeight();this.timeLayout.clear();this.timeLayout.hide();this.timeLayout.setWidth("100%")},isc.A.makeDateGrid=function isc_DateChooser_makeDateGrid(){var _1={chosenDate:this.chosenDate,dayNameLength:this.dayNameLength,showFiscalYear:this.showFiscalYearChooser,fiscalYearFieldTitle:this.fiscalYearFieldTitle,showFiscalWeek:this.showFiscalYearChooser&&this.showWeekChooser,showCalendarWeek:!this.showFiscalYearChooser&&this.showWeekChooser,weekFieldTitle:this.weekFieldTitle,disabledDates:this.disabledDates,firstDayOfWeek:this.firstDayOfWeek,headerBaseStyle:this.headerStyle,weekendHeaderStyle:this.weekendHeaderStyle||this.headerStyle,baseFiscalYearStyle:this.baseFiscalYearStyle,fiscalYearHeaderStyle:this.fiscalYearHeaderStyle||this.baseFiscalYearStyle,baseWeekStyle:this.baseWeekStyle,weekHeaderStyle:this.weekHeaderStyle||this.baseWeekStyle,baseWeekdayStyle:this.baseWeekdayStyle||this.baseButtonStyle,baseWeekendStyle:this.baseWeekendStyle||this.baseWeekdayStyle||this.baseButtonStyle,alternateRecordStyles:this.alternateWeekStyles,disabledWeekdayStyle:this.disabledWeekdayStyle,disabledWeekendStyle:this.disabledWeekendStyle,selectedWeekStyle:this.selectedWeekStyle,fiscalCalendar:this.getFiscalCalendar(),showWeekends:this.showWeekends,styleWeekends:this.styleWeekends,disableWeekends:this.disableWeekends,weekendDays:this.getWeekendDays(),locatorParent:this,height:"*",startDate:this.getData(),top:-1000,autoDraw:false,align:"center"};this.dateGrid=this.createAutoChild("dateGrid",_1);this.dateGrid.draw();this.dateGrid.show();this.$244t=this.dateGrid.getVisibleWidth();this.dateGridHeight=this.dateGrid.getVisibleHeight();this.dateGrid.minWidth=this.$244t;this.dateGrid.minHeight=this.dateGridHeight;this.dateGrid.setOverflow("hidden");this.dateGrid.clear();this.dateGrid.setWidth("100%");this.dateGrid.setHeight("*")},isc.A.makeNavigationLayout=function isc_DateChooser_makeNavigationLayout(){if(this.showNavigationLayout!=false){this.navigationLayout=this.createAutoChild("navigationLayout",{top:-1000,autoDraw:false,width:1,height:this.navigationLayoutHeight!=null?this.navigationLayoutHeight:1,overflow:"visible"},this.navigationLayoutConstructor);var _1=[];var _2={};if(this.navigationButtonHeight!=null){_2.height=this.navigationButtonHeight}
if(this.showFiscalYearChooser){this.fiscalYearChooserButton=this.createAutoChild("fiscalYearChooserButton",isc.addProperties({baseStyle:(this.baseNavButtonStyle||this.baseButtonStyle),title:this.chosenDate.getFiscalYear(this.getFiscalCalendar()).fiscalYear},_2),this.navButtonConstructor);_1.add(this.fiscalYearChooserButton)}
if(this.showWeekChooser){this.weekChooserButton=this.createAutoChild("weekChooserButton",isc.addProperties({baseStyle:(this.baseNavButtonStyle||this.baseButtonStyle),title:this.showFiscalYearChooser?this.chosenDate.getFiscalWeek(this.getFiscalCalendar()):this.chosenDate.getWeek(this.firstDayOfWeek)},_2),this.navButtonConstructor);_1.add(this.weekChooserButton)}
if(this.showYearButtons){this.previousYearButton=this.createAutoChild("previousYearButton",isc.addProperties({baseStyle:(this.baseNavButtonStyle||this.baseButtonStyle),title:this.getPreviousYearIconHTML(),ariaLabel:this.previousYearButtonAriaLabel},_2),this.navButtonConstructor);_1.add(this.previousYearButton)}
if(this.showMonthButtons!=false){this.previousMonthButton=this.createAutoChild("previousMonthButton",isc.addProperties({baseStyle:(this.baseNavButtonStyle||this.baseButtonStyle),title:this.getPreviousMonthIconHTML(),ariaLabel:this.previousMonthButtonAriaLabel},_2),this.navButtonConstructor);_1.add(this.previousMonthButton)}
if(this.showMonthChooser!=false){var _3=this.monthChooserButtonDefaults.width,_4=this.monthChooserButtonDefaults.minWidth,_5=this.$180r();this.monthChooserButton=this.createAutoChild("monthChooserButton",isc.addProperties({},this.monthChooserButtonDefaults,{baseStyle:(this.baseNavButtonStyle||this.baseButtonStyle),title:this.chosenDate.getShortMonthName(),width:_3||_5,minWidth:_4||_3||_5},_2,this.monthChooserButtonProperties),this.navButtonConstructor);_1.add(this.monthChooserButton)}
if(this.showYearChooser!=false){var _3=this.yearChooserButtonDefaults.width,_4=this.yearChooserButtonDefaults.minWidth,_5=this.$180s();this.yearChooserButton=this.createAutoChild("yearChooserButton",isc.addProperties({},this.yearChooserButtonDefaults,{baseStyle:(this.baseNavButtonStyle||this.baseButtonStyle),title:this.chosenDate.getFullYear(),width:_3||_5,minWidth:_4||_3||_5},_2,this.yearChooserButtonProperties),this.navButtonConstructor);_1.add(this.yearChooserButton)}
if(this.showMonthButtons){this.nextMonthButton=this.createAutoChild("nextMonthButton",isc.addProperties({baseStyle:(this.baseNavButtonStyle||this.baseButtonStyle),title:this.getNextMonthIconHTML(),ariaLabel:this.nextMonthButtonAriaLabel},_2),this.navButtonConstructor);_1.add(this.nextMonthButton)}
if(this.showYearButtons){this.nextYearButton=this.createAutoChild("nextYearButton",isc.addProperties({baseStyle:(this.baseNavButtonStyle||this.baseButtonStyle),title:this.getNextYearIconHTML(),ariaLabel:this.nextYearButtonAriaLabel},_2),this.navButtonConstructor);_1.add(this.nextYearButton)}
this.navigationLayout.addMembers(_1);this.navigationLayout.draw();this.navigationLayout.show();this.$244r=this.navigationLayout.getVisibleWidth();this.navigationLayoutHeight=this.navigationLayout.getVisibleHeight();this.navigationLayout.minHeight=this.navigationLayoutHeight;this.navigationLayout.minWidth=this.$244r;this.navigationLayout.clear();this.navigationLayout.setWidth("100%")}},isc.A.allButtonsHidden=function isc_DateChooser_allButtonsHidden(){return!this.showTodayButton&&!this.showCancelButton&&!this.showApplyButton},isc.A.shouldShowButtonLayoutControl=function isc_DateChooser_shouldShowButtonLayoutControl(_1){var _2=this.showControlPropertyMap[_1];if(_2==null){this.showControlPropertyMap[_1]=_2="show"+_1.substring(0,1).toUpperCase+_1.substring(1)}
return this[_2]!=false},isc.A.makeButtonLayout=function isc_DateChooser_makeButtonLayout(_1){var _1={baseStyle:this.baseBottomButtonStyle||this.baseButtonStyle};if(this.todayButtonHeight!=null)_1.height=this.todayButtonHeight;this.todayButtonDefaults.title=this.todayButtonTitle;if(_1.height)this.todayButtonDefaults.height=_1.height;this.cancelButtonDefaults.title=this.cancelButtonTitle;if(_1.height)this.cancelButtonDefaults.height=_1.height;this.applyButtonDefaults.title=this.applyButtonTitle;if(_1.height)this.applyButtonDefaults.height=_1.height;var _2=[];var _3=[];for(var i=0;i<this.buttonLayoutControls.length;i++){var _5=this.buttonLayoutControls[i],_6=null;if(isc.isA.Canvas(_5)){_6=_5}else if(isc.isA.String(_5)){_3[_5];_6=this[_5]=this.createAutoChild(_5,isc.addProperties({},_1,{visibility:"visible"}),this.bottomButtonConstructor)}
if(_5!=null&&_6==null){_6=this.createCanvas(_5)}
_2.add(_6)}
this.buttonLayout=this.createAutoChild("buttonLayout",{top:-1000,autoDraw:false,members:_2},this.buttonLayoutConstructor);this.buttonLayout.draw();this.buttonLayout.show();this.$244s=this.buttonLayout.getVisibleWidth();this.buttonLayoutHeight=this.buttonLayout.getVisibleHeight();this.buttonLayout.minWidth=this.$244s;this.buttonLayout.minHeight=this.buttonLayoutHeight;this.buttonLayout.clear();this.buttonLayout.hide();for(var i=0;i<this.buttonLayoutControls.length;i++){var _5=this.buttonLayoutControls[i];if(!this.shouldShowButtonLayoutControl(_5))this[_5].setVisibility("hidden")}},isc.A.getUsedHeight=function isc_DateChooser_getUsedHeight(){var _1=10;if(this.navigationLayout&&this.navigationLayout.isVisible()){_1+=this.navigationLayout.getVisibleHeight()}
if(this.showTimeItem){_1+=this.$200f}
_1+=this.$200g;var _2=(this.border||"").indexOf("px");if(_2>=0){var _3=parseInt(this.border.substring(0,_2+1));_1+=(_3*2)}
return _1},isc.A.draw=function isc_DateChooser_draw(){this.Super("draw",arguments);if(this.dateGrid&&!this.hasMember(this.dateGrid)){this.dateGrid.clear();if(this.showFullScreen()){this.dateGrid.setOverflow("hidden");this.dateGrid.setHeight("*")}
this.addMember(this.dateGrid,1)}
this.updateUI()},isc.A.getTimeItem=function isc_DateChooser_getTimeItem(){if(this.showTimeItem)return this.timeForm.getItem(0)},isc.A.recreateTimeItem=function isc_DateChooser_recreateTimeItem(_1){var _2=isc.addProperties({},{title:this.timeItemTitle,use24HourTime:this.use24HourTime,showSecondItem:!!this.showSecondItem},this.timeItemDefaults,this.timeItemProperties,{value:_1});this.timeForm.setItems([_2])},isc.A.resized=function isc_DateChooser_resized(){this.placeNear(this.getPageLeft(),this.getPageTop())},isc.A.handleKeyPress=function isc_DateChooser_handleKeyPress(){var _1=this.Super("handleKeyPress",arguments);if(_1!=false){if((this.closeOnEscapeKeypress)&&("Escape"==isc.EH.getKey())){this.cancelClick()}}},isc.A.getPreviousYearIconHTML=function isc_DateChooser_getPreviousYearIconHTML(){var _1,_2=new Date(this.year,this.month,1),_3=_2.getFullYear()==9999;if(this.showDoubleYearIcon){var _4=this.getPreviousMonthIconHTML();_1=_3?"&nbsp;":"<NOBR>"+_4+_4+"<\/NOBR>"}else{var _5=this.isRTL()?this.prevYearIconRTL||this.nextYearIcon:this.prevYearIcon;_1=_3?"&nbsp;":this.imgHTML(_5,this.prevYearIconWidth,this.prevYearIconHeight)}
return _1},isc.A.getPreviousMonthIconHTML=function isc_DateChooser_getPreviousMonthIconHTML(){var _1=this.isRTL()?this.prevMonthIconRTL||this.nextMonthIcon:this.prevMonthIcon,_2=this.imgHTML(_1,this.prevMonthIconWidth,this.prevMonthIconHeight);return _2},isc.A.getNextMonthIconHTML=function isc_DateChooser_getNextMonthIconHTML(){var _1=this.isRTL()?this.nextMonthIconRTL||this.prevMonthIcon:this.nextMonthIcon,_2=this.imgHTML(_1,this.nextMonthIconWidth,this.nextMonthIconHeight);return _2},isc.A.getNextYearIconHTML=function isc_DateChooser_getNextYearIconHTML(){var _1,_2=new Date(this.year,this.month,1),_3=_2.getFullYear()==9999;if(this.showDoubleYearIcon){var _4=this.getNextMonthIconHTML();_1=_3?"&nbsp;":"<NOBR>"+_4+_4+"<\/NOBR>"}else{var _5=this.isRTL()?this.nextYearIconRTL||this.prevYearIcon:this.nextYearIcon;_1=_3?"&nbsp;":this.imgHTML(_5,this.nextYearIconWidth,this.nextYearIconHeight)}
return _1},isc.A.show=function isc_DateChooser_show(){var _1=this.Super("show",arguments);if(this.autoClose){this.showClickMask(this.getID()+".close();",true,this);this.bringToFront()}},isc.A.setData=function isc_DateChooser_setData(_1,_2){if(!isc.isA.Date(_1))_1=new Date();var _3="datetime";if(this.callingFormItem){_3=this.callingFormItem.getType()}
var _4=isc.DateUtil.getLogicalDateOnly(_1),_5=isc.DateUtil.getLogicalTimeOnly(_1);this.year=_4.getFullYear();this.month=_4.getMonth();this.day=_4.getDate();this.chosenDate=_4;this.chosenTime=_5;if(_2){if(_1.logicalDate||!isc.SimpleType.inheritsFrom(_3,"datetime"))this.showTimeItem=false;else this.showTimeItem=true}
var _6=this.getTimeItem();if(_6)_6.setValue(this.chosenTime);this.updateUI()},isc.A.updateGridData=function isc_DateChooser_updateGridData(_1){if(!this.dateGrid)return;var _2=isc.DateUtil.createLogicalDate(this.year,this.month,1);var _3=isc.DateUtil.$100e(_2),_4=_3.startDate;this.dateGrid.showWeekends=this.showWeekends;this.dateGrid.showFiscalYear=this.showFiscalYearChooser;this.dateGrid.showFiscalWeek=this.showFiscalYearChooser&&this.showWeekChooser;this.dateGrid.showCalendarWeek=!this.showFiscalYearChooser&&this.showWeekChooser;if(this.showFiscalYearChooser){if(this.useFirstDayOfFiscalWeek){var _5=isc.DateUtil.getFiscalYear(_3.fiscalYear);if(_5.year<_3.fiscalYear){_5=isc.DateUtil.getFiscalYear(_5.fiscalYear+1)}
this.dateGrid.firstDayOfWeek=this.firstDayOfWeek=_5.startDate.getDay()}}
this.dateGrid.refreshUI(this.year,this.month,this.chosenDate,_1)},isc.A.getData=function isc_DateChooser_getData(){var _1=this.chosenDate.duplicate();if(this.showTimeItem){_1=isc.DateUtil.combineLogicalDateAndTime(_1,this.chosenTime)}
return _1},isc.A.redraw=function isc_DateChooser_redraw(){this.Super("redraw",arguments);this.updateUI()},isc.A.getDayNames=function isc_DateChooser_getDayNames(){if(isc.DateChooser.$8w==null){isc.DateChooser.$8w=[isc.DateUtil.getShortDayNames(1),isc.DateUtil.getShortDayNames(2),isc.DateUtil.getShortDayNames(3)]}
return isc.DateChooser.$8w[this.dayNameLength-1]},isc.A.getDayCellButtonHTML=function isc_DateChooser_getDayCellButtonHTML(_1,_2,_3){if(_1==null)
return this.getCellButtonHTML("&nbsp;",null,_2,false,false,isc.Canvas.CENTER);var _4=this.chosenDate&&(isc.DateUtil.compareLogicalDates(_1,this.chosenDate)==0),_5=(_1.getMonth()!=this.month);var _6="dateFromId",_7=_1.getFullYear()+"_"+_1.getMonth()+"_"+_1.getDate();if(this.disableWeekends&&this.getWeekendDays().contains(_1.getDay())){_5=true;_6=null}
return this.getCellButtonHTML(_1.getDate(),_2,_4,_5,isc.Canvas.CENTER,null,_6,_7)},isc.A.dateIsSelected=function isc_DateChooser_dateIsSelected(_1){return null},isc.A.canShowMonth=function isc_DateChooser_canShowMonth(_1,_2){if(_2>11){_2-=12;_1++}else if(_2<0){_2+=12;_1--}
var _3=this.getStartYear(),_4=this.getEndYear(),_5=this.getStartMonth(),_6=this.getEndMonth();if(_3==null&&_4==null)return true;if(!this.alwaysLimitMonths){if(_3!=null&&_1==_3&&_3==_4){if(_2<_5)return false;if(_2>_6)return false}else if(_3!=null||_4!=null){var _7=_3!=null&&(_1<_3||(_1==_3&&_2<_5));var _8=_4!=null&&(_1>_4||(_1==_4&&_2>_6));if(_7||_8)return false}}else{if(this.monthInRange(_1,_2))return true;if((_3!=null&&_1<_3)||(_4!=null&&_1>_4))return false;if(_3!=null&&_1==_3&&_2<_5)return false;if(_4!=null&&_1==_4&&_2>_6)return false}
return true},isc.A.getStartMonth=function isc_DateChooser_getStartMonth(){return this.startDate?this.startDate.getMonth():0},isc.A.getEndMonth=function isc_DateChooser_getEndMonth(){return this.endDate?this.endDate.getMonth():11},isc.A.getStartYear=function isc_DateChooser_getStartYear(){return this.startDate?this.startDate.getFullYear():this.startYear},isc.A.getEndYear=function isc_DateChooser_getEndYear(){return this.endDate?this.endDate.getFullYear():this.endYear},isc.A.monthInRange=function isc_DateChooser_monthInRange(_1,_2){if(this.startDate||this.endDate){if(this.startDate){var _3=this.startDate.getFullYear();if(_3==_1){if(_2<this.startDate.getMonth())return false}else if(_3>_1)return false}
if(this.endDate){var _4=this.endDate.getFullYear();if(_4==_1){if(_2>this.endDate.getMonth())return false}else if(_4<_1)return false}}else{if(_1<this.startYear||_1>this.endYear)return false}
return true},isc.A.showPrevMonth=function isc_DateChooser_showPrevMonth(){if(!this.canShowMonth(this.year,this.month-1))return;if(--this.month==-1){this.month=11;this.year--}
this.updateUI()},isc.A.showNextMonth=function isc_DateChooser_showNextMonth(){if(!this.canShowMonth(this.year,this.month+1))return;if(++this.month==12){this.month=0;this.year++}
this.updateUI()},isc.A.updateHeader=function isc_DateChooser_updateHeader(_1,_2){if(!this.showNavigationLayout&&this.navigationLayout){this.navigationLayout.hide()}else if(this.showNavigationLayout){_2=_2||isc.DateUtil.createLogicalDate(this.year,this.month,this.day);if(!this.navigationLayout.isVisible())this.navigationLayout.show();var _3=this.navigationLayout.members;if(this.showWeekChooser){this.updateWeekChooser();if(!this.weekChooserButton.isVisible())this.weekChooserButton.show()}else if(this.weekChooserButton){if(this.weekChooserButton.isVisible())this.weekChooserButton.hide()}
if(this.showFiscalYearChooser){this.fiscalYearChooserButton.setTitle(""+_2.getFiscalYear(this.getFiscalCalendar()).fiscalYear);if(!this.fiscalYearChooserButton.isVisible())this.fiscalYearChooserButton.show()}else if(this.fiscalYearChooserButton){if(this.fiscalYearChooserButton.isVisible())this.fiscalYearChooserButton.hide()}
if(this.showFullMonthInHeader){this.monthChooserButton.setTitle(this.monthNames[this.month])}else{this.monthChooserButton.setTitle(this.shortMonthNames[this.month])}
this.yearChooserButton.setTitle(""+this.getHeaderYearTitle(this.year));this.yearChooserButton.redraw();this.previousYearButton.setDisabled(!this.canShowMonth(this.year-1,this.month));this.previousMonthButton.setDisabled(!this.canShowMonth(this.year,this.month-1));this.nextMonthButton.setDisabled(!this.canShowMonth(this.year,this.month+1));this.nextYearButton.setDisabled(!this.canShowMonth(this.year+1,this.month))}},isc.A.showFullScreen=function isc_DateChooser_showFullScreen(){return isc.Browser.isHandset},isc.A.updateUI=function isc_DateChooser_updateUI(_1){var _2=new Date(this.year,this.month,this.day);if(_2.getMonth()>this.month)_2=isc.DateUtil.getEndOf(new Date(this.year,this.month,1),"M",true);if(!this.showTimeItem){if(this.members.contains(this.timeLayout)){this.removeMember(this.timeLayout);this.timeLayout.clear()}}else if(this.showTimeItem){this.recreateTimeItem(this.chosenTime);this.addMember(this.timeLayout,this.members.length-1);this.timeLayout.show()}
this.updateButtonLayout();this.updateGridData(_1);this.updateHeader()},isc.A.updateButtonLayout=function isc_DateChooser_updateButtonLayout(){if(this.todayButton){if(this.showTodayButton){if(!this.todayButton.isVisible())this.todayButton.visibility="visible";this.todayButton.show()}else if(this.todayButton.isVisible()){this.todayButton.hide()}}
if(this.cancelButton){if(this.showCancelButton){if(!this.cancelButton.isVisible())this.cancelButton.visibility="visible";this.cancelButton.show()}else if(this.cancelButton.isVisible()){this.cancelButton.hide()}}
if(this.applyButton){if(this.showApplyButton){if(!this.applyButton.isVisible())this.applyButton.visibility="visible";this.applyButton.show()}else if(this.applyButton.isVisible()){this.applyButton.hide()}}
if(this.buttonLayout){if(this.allButtonsHidden())this.buttonLayout.hide();else{if(!this.buttonLayout.isVisible())this.buttonLayout.show();if(this.showTimeItem)this.buttonLayout.setBorder("0px");else this.buttonLayout.setBorder(null)}}},isc.A.updateWeekChooser=function isc_DateChooser_updateWeekChooser(){if(this.weekChooserButton){this.weekChooserButton.setTitle(""+(this.dateGrid&&this.dateGrid.getSelectedWeek()))}},isc.A.showMonth=function isc_DateChooser_showMonth(_1){this.month=_1;if(this.monthMenu)this.monthMenu.hide();this.bringToFront();this.updateUI()},isc.A.getFiscalCalendar=function isc_DateChooser_getFiscalCalendar(){return this.fiscalCalendar||isc.DateUtil.getFiscalCalendar()},isc.A.setFiscalCalendar=function isc_DateChooser_setFiscalCalendar(_1){this.fiscalCalendar=_1},isc.A.showWeek=function isc_DateChooser_showWeek(_1){var _2;if(this.showFiscalYearChooser){var _3=isc.DateUtil.createLogicalDate(this.year,this.month,this.chosenDate.getDate());var _4=this.getFiscalCalendar(),_5=Date.getFiscalStartDate(_3);_2=new Date(_5.getFullYear(),_4.defaultMonth,_4.defaultDate+(7*_1))}else{_2=new Date(this.year,0,1+(7*_1))}
this.year=_2.getFullYear();this.month=_2.getMonth();if(this.weekMenu)this.weekMenu.hide();this.bringToFront();this.updateUI(_1)},isc.A.getMonthText=function isc_DateChooser_getMonthText(_1){var _2=isc.DateUtil.format(_1,this.monthMenuFormat,false);return _2},isc.A.$180t=function isc_DateChooser__getMonthChooserTitles(){var _1=isc.Date.createLogicalDate(2001,0,1);var _2=[];for(var i=0;i<12;i++){_1.setMonth(i);_2.add(this.getMonthText(_1))}
return _2},isc.A.$180r=function isc_DateChooser__getMonthChooserButtonWidth(){var _1=this.$180t(),_2=(this.baseNavButtonStyle||this.baseButtonStyle)+"Over",_3=isc.Element.$yp(_2)*2,_4=isc.Canvas.measureContent("<span style='white-space:nowrap'>"+_1.join("<br>")+"</span>",_2)+_3;this.$180u=_4;return this.$180u},isc.A.$180s=function isc_DateChooser__getYearChooserButtonWidth(){var _1=[];var _2=this.startYear||(this.year-this.startYearRange),_3=this.endYear||(this.year+this.endYearRange)
for(var i=_2;i<=_3;i++){_1.add(""+this.getYearTitle(i))}
var _5=(this.baseNavButtonStyle||this.baseButtonStyle)+"Over",_6=isc.Element.$yp(_5)*2,_7=isc.Canvas.measureContent(_1.join("<br>"),_5)+_6;this.$180v=_7;return this.$180v},isc.A.shouldUseButtonTable=function isc_DateChooser_shouldUseButtonTable(){if(this.useButtonTable!=null)return this.useButtonTable;return!isc.screenReader},isc.A.showMonthMenu=function isc_DateChooser_showMonthMenu(){var _1=[],_2=isc.DateUtil.createLogicalDate(2001,0,1),_3=this.getStartYear()==this.getEndYear();for(var i=0;i<12;i++){var _5=!this.canShowMonth(this.year,i);if((i)%3==0)_1.add([]);_2.setMonth(i);_1[_1.length-1].add({contents:this.getMonthText(_2),eventPart:"showMonth",eventId:i,disabled:_5})}
if(!this.monthMenu){var _6={styleName:this.monthMenuStyle,left:this.monthChooserButton.getPageLeft()+5,top:this.getPageTop()+this.navigationLayoutHeight,width:Math.min(this.getVisibleWidth(),120),height:Math.min(this.getVisibleHeight()-this.navigationLayoutHeight,80),items:_1,visibility:isc.Canvas.HIDDEN,baseButtonStyle:this.menuItemStyle,normalBaseStyle:this.menuItemStyle,bodyBackgroundColor:"transparent",dateChooser:this};if(this.shouldUseButtonTable()){this.monthMenu=isc.MonthChooser.newInstance(_6)}else{this.monthMenu=this.createAutoChild("monthMenu",_6)}
var _7=this.monthChooserButton.getPageLeft()-
((this.monthMenu.getWidth()-this.monthChooserButton.getWidth())/2);this.monthMenu.placeNear(Math.max(_7,0))}else{var _8=this.getPageTop()+this.navigationLayoutHeight,_9=Math.min(this.getVisibleWidth(),120),_10=Math.min(this.getVisibleHeight()-this.navigationLayoutHeight,80),_11=this.monthChooserButton.getWidth(),_7=this.monthChooserButton.getPageLeft()-((_9-_11)/2);this.monthMenu.setItems(_1);this.monthMenu.resizeTo(_9,_10);this.monthMenu.placeNear(Math.max(_7,0),_8)}
this.monthMenu.showModal()},isc.A.showWeekMenu=function isc_DateChooser_showWeekMenu(){if(!this.weekMenu){var _1=[[]],_2=isc.DateUtil.createLogicalDate(2001,0,1);for(var i=1;i<53;i++){_1[_1.length-1].add({contents:""+i,eventPart:"showWeek",eventId:i});if((i)%7==0)_1.add([])}
var _4={styleName:this.weekMenuStyle,left:this.weekChooserButton.getPageLeft()+5,top:this.getPageTop()+this.navigationLayoutHeight,width:Math.min(this.getVisibleWidth(),120),height:Math.min(this.getVisibleHeight()-this.navigationLayoutHeight,80),items:_1,visibility:isc.Canvas.HIDDEN,baseButtonStyle:this.menuItemStyle,normalBaseStyle:this.menuItemStyle,bodyBackgroundColor:"transparent",dateChooser:this};if(this.shouldUseButtonTable()){this.weekMenu=isc.WeekChooser.newInstance(_4)}else{this.weekMenu=this.createAutoChild("weekMenu",_4)}
var _5=this.weekChooserButton.getPageLeft()-
((this.weekMenu.getWidth()-this.weekChooserButton.getWidth())/2);this.weekMenu.setPageLeft(Math.max(_5,0))}else{var _6=this.getPageTop()+this.navigationLayoutHeight,_7=Math.min(this.getVisibleWidth(),120),_8=Math.min(this.getVisibleHeight()-this.navigationLayoutHeight,80),_9=this.weekChooserButton.getWidth(),_5=this.weekChooserButton.getPageLeft()-((_7-_9)/2);this.weekMenu.setPageRect(Math.max(_5,0),_6,_7,_8)}
this.weekMenu.showModal()},isc.A.showPrevYear=function isc_DateChooser_showPrevYear(){if(!this.canShowMonth(this.year-1,this.month))return;this.year--;this.updateUI()},isc.A.showNextYear=function isc_DateChooser_showNextYear(){if(!this.canShowMonth(this.year+1,this.month))return;if(!this.endYear||this.year<this.endYear){this.year++;this.updateUI()}},isc.A.showYear=function isc_DateChooser_showYear(_1){if((this.startYear&&_1<this.startYear)||(this.endYear&&_1>this.endYear))return;this.year=_1;if(this.yearMenu)this.yearMenu.hide();this.updateUI()},isc.A.showFiscalYear=function isc_DateChooser_showFiscalYear(_1){var f=isc.DateUtil.getFiscalYear(_1,this.getFiscalCalendar());this.year=f.year;this.month=f.month;if(this.yearMenu)this.yearMenu.hide();this.updateUI()},isc.A.showFiscalYearMenu=function isc_DateChooser_showFiscalYearMenu(){this.showYearMenu(true)},isc.A.showYearMenu=function isc_DateChooser_showYearMenu(_1){var _2=!_1?this.yearChooserButton:this.fiscalYearChooserButton;var _3=this.startYear?this.startYear:(this.year-this.startYearRange),_4=this.endYear?this.endYear:(this.year+this.endYearRange),_5=this.getStartYear()||_3,_6=this.getEndYear()||_4;_3=Math.min(_3,_5);_4=Math.max(_4,_6);var _7=(_4-_3)||1;var _8=Math.round(Math.sqrt(_7));var _9=[];for(var i=0;i<=_7;i++){var _11=i+_3;var _12=false;if(_11<_5)_12=true;else if(_11>_6)_12=true;if(i%_8==0)_9.add([]);_9[_9.length-1].add({contents:this.getYearTitle(_11),eventPart:"showYear",eventId:_11,disabled:_12})}
if(!this.yearMenu){var _13={styleName:this.yearMenuStyle,top:this.getPageTop()+this.navigationLayoutHeight,width:Math.min(this.getVisibleWidth(),(40*_8)),height:Math.min(this.getVisibleHeight()-this.navigationLayoutHeight,80),items:_9,visibility:isc.Canvas.HIDDEN,baseButtonStyle:this.menuItemStyle,normalBaseStyle:this.menuItemStyle,bodyBackgroundColor:"transparent",dateChooser:this};if(this.shouldUseButtonTable()){this.yearMenu=isc.YearChooser.newInstance(_13)}else{this.yearMenu=this.createAutoChild("yearMenu",_13)}
var _14=_2.getPageLeft()-((this.yearMenu.getWidth()-_2.getWidth())/2);this.yearMenu.placeNear(Math.max(_14,0))}else{var _15=this.getPageTop()+this.navigationLayoutHeight,_16=Math.min(this.getVisibleWidth(),(40*_8)),_17=Math.min(this.getVisibleHeight()-this.navigationLayoutHeight,80),_18=_2.getWidth(),_14=_2.getPageLeft()-((_16-_18)/2);this.yearMenu.setItems(_9);this.yearMenu.resizeTo(_16,_17);this.yearMenu.placeNear(Math.max(_14,0),_15)}
this.yearMenu.fiscal=_1;this.yearMenu.markForRedraw("Redraw to pick up any changes in yearItems");this.yearMenu.showModal()});isc.evalBoundary;isc.B.push(isc.A.getYearTitle=function isc_DateChooser_getYearTitle(_1){return""+_1},isc.A.getHeaderYearTitle=function isc_DateChooser_getHeaderYearTitle(_1){return""+_1},isc.A.dateClick=function isc_DateChooser_dateClick(_1,_2,_3,_4,_5){var _6=this.chosenDate=isc.DateUtil.createLogicalDate(_1,_2,_3);var _7=this.year!=_1;if(_7)this.year=_1;if(_7||this.month!=_2)this.showMonth(_2);this.month=_2;this.year=_1;this.day=_3;if(_4)this.dateGrid.selectDateCell(_6);if(this.showTimeItem){this.chosenTime=this.getTimeItem().getValue();if(this.closeOnDateClick!=true&&_5!=true)return}
if(_5==false)return;this.dataChanged();if(window.dateClickCallback){if(isc.isA.String(window.dateClickCallback)){window.dateClickCallback=isc.$aq("date",window.dateClickCallback)}
window.dateClickCallback(_6)}
if(this.autoHide)this.hide();if(this.autoClose)this.close();return _6},isc.A.dataChanged=function isc_DateChooser_dataChanged(){},isc.A.cancelClick=function isc_DateChooser_cancelClick(){this.close()},isc.A.todayClick=function isc_DateChooser_todayClick(){var _1=isc.DateUtil.today();this.dateClick(_1.getFullYear(),_1.getMonth(),_1.getDate(),true)},isc.A.applyClick=function isc_DateChooser_applyClick(){var _1=this.chosenDate.duplicate();this.dateClick(_1.getFullYear(),_1.getMonth(),_1.getDate(),true,true)},isc.A.close=function isc_DateChooser_close(){this.hideClickMask();if(this.yearMenu&&this.yearMenu.isVisible())this.yearMenu.hide();if(this.monthMenu&&this.monthMenu.isVisible())this.monthMenu.hide();if(this.isDrawn())this.clear()},isc.A.dateFromIdClick=function isc_DateChooser_dateFromIdClick(_1,_2){var _3=_2.split("_");if(_3.length!=3)return null;var _4=parseInt(_3[0]),_5=parseInt(_3[1]),_6=parseInt(_3[2]);return this.dateClick(_4,_5,_6)},isc.A.propertyChanged=function isc_DateChooser_propertyChanged(_1,_2){this.invokeSuper(isc.DateChooser,"propertyChanged",_1,_2);if(this.$2314[_1])this.updateButtonLayout()});isc.B._maxIndex=isc.C+66;isc.A=isc.DateChooser;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getSharedDateChooser=function isc_c_DateChooser_getSharedDateChooser(_1,_2){if(_2==null){if(_1&&_1.showTimeItem!=null){_2=(_1.showTimeItem?"datetime":"date")}else _2="date"}
var _3="_"+_2+"GlobalChooser";if(!this[_3]){this[_3]=this.create(_1,{_generated:true,autoHide:true,closeOnEscapeKeypress:true})}else{isc.addProperties(this[_3],_1)}
return this[_3]});isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("WeekChooser","ButtonTable");isc.A=isc.WeekChooser.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.showWeekClick=function isc_WeekChooser_showWeekClick(_1,_2){this.dateChooser.showWeek(parseInt(_2))});isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("MonthChooser","ButtonTable");isc.A=isc.MonthChooser.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.showMonthClick=function isc_MonthChooser_showMonthClick(_1,_2){this.dateChooser.showMonth(parseInt(_2))});isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("YearChooser","ButtonTable");isc.A=isc.YearChooser.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.showYearClick=function isc_YearChooser_showYearClick(_1,_2){if(this.fiscal)this.dateChooser.showFiscalYear(parseInt(_2));else this.dateChooser.showYear(parseInt(_2))});isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("DateChooserMenuGrid",isc.ListGrid);isc.A=isc.DateChooserMenuGrid.getPrototype();isc.A.cellPadding=2;isc.A.tableStyle="menuTable";isc.A.backgroundColor="CCCCCC";isc.A.showHeader=false;isc.A.gridComponents=["body"];isc.A.canSaveSearches=false;isc.A.canSelectCells=true;isc.A.overflow="visible";isc.A.bodyOverflow="visible";isc.A.cellHeight=25;isc.A.fixedRecordHeights=false;isc.A.fixedFieldWidths=false;isc.A.alternateRecordStyles=false;isc.A.alternateFieldStyles=false;isc.A.showSelectedRollOverCanvas=false;isc.A.showRollOverCanvas=false;isc.A.showRollUnderCanvas=false;isc.A.arrowKeyAction="focus";isc.A=isc.DateChooserMenuGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.useCellRecords=true;isc.B.push(isc.A.initWidget=function isc_DateChooserMenuGrid_initWidget(){var _1=this.Super("initWidget",arguments);if(this.items)this.setItems(this.items);return _1},isc.A.setItems=function isc_DateChooserMenuGrid_setItems(_1,_2){this.items=isc.shallowClone(_1);var _3=[],_2=[];for(var i=0;i<this.items.length;i++){_3.add({});for(var _5=0;_5<this.items[i].length;_5++){var _6="field"+_5;_3[i][_6]=this.items[i];if(_2.length<=_5){_2.add({name:_6,cellAlign:"center",width:this.minFieldWidth})}}}
this.setFields(_2);this.setData(_3)},isc.A.getCellRecord=function isc_DateChooserMenuGrid_getCellRecord(_1,_2){if(_1==null||_2==null)return null;if(this.items&&this.items[_1]){return this.items[_1][_2]}},isc.A.getCellValue=function isc_DateChooserMenuGrid_getCellValue(_1,_2,_3){if(_1==null)_1=this.getCellRecord(_2,_3);return _1?_1.contents:this.Super("getCellValue",arguments)},isc.A.showModal=function isc_DateChooserMenuGrid_showModal(){this.showClickMask({target:this,methodName:"handleOutsideClick"},"soft",this);var _1=this;this.escapeKeyEvent=isc.Page.registerKey("Escape",function(){_1.handleEscape()});this.show();this.bringToFront();this.$237c=true;this.body.focus()},isc.A.handleOutsideClick=function isc_DateChooserMenuGrid_handleOutsideClick(){this.hide()},isc.A.handleEscape=function isc_DateChooserMenuGrid_handleEscape(){this.hide()},isc.A.hide=function isc_DateChooserMenuGrid_hide(){this.Super("hide",arguments);if(this.$237c){this.hideClickMask();isc.Page.unregisterKey(this.escapeKeyEvent);delete this.$237c}},isc.A.getBaseStyle=function isc_DateChooserMenuGrid_getBaseStyle(_1,_2,_3){if(this.baseButtonStyle){var _4=this.baseButtonStyle;if(_1&&_1.disabled)_4+="Disabled";return _4}
return this.Super("getBaseStyle",arguments)},isc.A.getCellStyle=function isc_DateChooserMenuGrid_getCellStyle(_1,_2,_3){if(_1&&_1.disabled)return this.baseButtonStyle+"Disabled";return this.Super("getCellStyle",arguments)});isc.B._maxIndex=isc.C+10;isc.ClassFactory.defineClass("Slider",isc.Canvas);isc.A=isc.Slider;isc.A.DOWN="down";isc.A.UP="";isc.A.EVENTNAME="sliderMove";isc.A=isc.Slider.getPrototype();isc.A.overflow="hidden";isc.A.title="Set Value";isc.A.length=200;isc.A.vertical=true;isc.A.thumbThickWidth=23;isc.A.thumbThinWidth=17;isc.A.trackWidth=7;isc.A.skinImgDir="images/Slider/";isc.A.thumbSrc="thumb.gif";isc.A.trackSrc="track.gif";isc.A.trackCapSize=6;isc.A.trackImageType=isc.Img.STRETCH;isc.A.showTitle=true;isc.A.showRange=true;isc.A.showValue=true;isc.A.labelWidth=50;isc.A.labelHeight=20;isc.A.labelSpacing=5;isc.A.titleSpacing=5;isc.A.titleStyle="sliderTitle";isc.A.rangeStyle="sliderRange";isc.A.valueStyle="sliderValue";isc.A.valueTextStyle="sliderValueText";isc.A.value=1;isc.A.minValue=1;isc.A.maxValue=100;isc.A.roundValues=true;isc.A.roundPrecision=1;isc.A.flipValues=false;isc.A.canFocus=true;isc.A.stepPercent=5;isc.A.animateThumbTime=250;isc.A.animateThumbAcceleration="slowStartandEnd";isc.A.valueChangedOnDrag=true;isc.A.valueChangedOnRelease=true;isc.A.valueChangedOnClick=true;isc.A=isc.Slider.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.rangeLabelConstructor="Label";isc.A.rangeLabelDefaults={overflow:"hidden",wrap:false};isc.A.hValueLabelWidth=5;isc.A.valueLabelConstructor="Label";isc.A.valueLabelDefaults={moveWithMaster:false,overflow:true,wrap:false,canFocus:false,mouseUp:function(){return false}};isc.A.trackConstructor="StretchImg";isc.A.trackDefaults={showDown:false,showDisabled:true};isc.A.showActiveTrack=false;isc.A.activeTrackStyle='sliderTrackActive';isc.A.activeTrackConstructor="StatefulCanvas";isc.A.activeTrackDefaults={contents:'',showDown:false};isc.A.extraThumbSpace=2;isc.A.touchExtraThumbSpace=8;isc.A.thumbDefaults={_constructor:"Img",overflow:"hidden",showDisabled:true,cursor:isc.Canvas.HAND,$jo:false,handleMouseDown:function(){this.setState(isc.Slider.DOWN)},handleMouseUp:function(){this.setState(isc.Slider.UP)},handleMouseOut:function(){var _1=this.ns.EH;if(!_1.dragging||this!==_1.dragTarget){this.setState(isc.Slider.UP)}},canDrag:true,dragAppearance:isc.EventHandler.NONE,dragStartDistance:0,handleDragStart:function(){var _1=this.ns.EH;_1.setDragOffset(-1*(this.getPageLeft()-_1.mouseDownEvent.x),-1*(this.getPageTop()-_1.mouseDownEvent.y));this.setState(isc.Slider.DOWN)},handleDragMove:function(){this.creator.$85()},handleDragStop:function(){this.setState(isc.Slider.UP);if(this.creator.valueChangedOnRelease){this.creator.handleValueChanged(this.creator.value)}},canFocus:true,tabIndex:-1,showTriggerArea:isc.Browser.isTouch?true:false,setLeft:function(_1){this.$194y(_1);var _2=this.Super("setLeft",arguments);return _2},$194y:function(_1){if(this.showTriggerArea){var _2=this.creator._track.getLeft(),_3=_2+this.creator.$8y,_4=this.getVisibleWidth();if(_1-_2<=this.triggerSpace){if(this.triggerAreaLeft==this.triggerSpace){this.setTriggerAreaLeft(0);this.logInfo("newLeft is "+_1+" - clearing triggerAreaLeft","slider")}}else if(this.triggerAreaLeft!=this.triggerSpace){this.setTriggerAreaLeft(this.triggerSpace);this.logInfo("newLeft is "+_1+" - restoring triggerAreaLeft","slider")}
if(_1+_4+this.triggerSpace>=_3){if(this.triggerAreaRight==this.triggerSpace){this.setTriggerAreaRight(0);this.logInfo("newLeft is "+_1+" - clearing triggerAreaRight","slider")}}else if(this.triggerAreaRight!=this.triggerSpace){this.setTriggerAreaRight(this.triggerSpace);this.logInfo("newLeft is "+_1+" - restoring triggerAreaRight","slider")}}}};isc.A.floatValueLabel=false;isc.A.valueChanged=isc.Class.NO_OP;isc.B.push(isc.A.resized=function isc_Slider_resized(){this.$81("resized")},isc.A.moved=function isc_Slider_moved(){if(this.floatValueLabel)this.$81("moved")},isc.A.parentResized=function isc_Slider_parentResized(){if(this.floatValueLabel)this.$81("parentResized")},isc.A.parentMoved=function isc_Slider_parentMoved(){if(this.floatValueLabel)this.$81("parentMoved")},isc.A.parentScrolled=function isc_Slider_parentScrolled(){if(this.floatValueLabel)this.$81("parentScrolled")},isc.A.parentVisibilityChanged=function isc_Slider_parentVisibilityChanged(_1){if(this.floatValueLabel)this.$81("parentVisibilityChanged")},isc.A.initWidget=function isc_Slider_initWidget(){this.Super("initWidget",arguments);if(!(this.minValue<=this.maxValue)){this.logWarn("Slider specified with minValue:"+this.minValue+", greater than maxValue:"+this.maxValue+" - reversing max and min value.");var _1=this.minValue;this.minValue=this.maxValue;this.maxValue=_1}
if(this.minValue!=null)this.minValue=this.$85d(this.minValue);if(this.maxValue!=null)this.maxValue=this.$85d(this.maxValue);this.$2035=this.length;this.$221t()},isc.A.$221t=function isc_Slider__createChildren(){this.setUpSize();this.$80();if(this.showTitle)this._titleLabel=this.addChild(this.$54());if(this.showRange){this.$50=this.addChild(this.$51("min"));this.$52=this.addChild(this.$51("max"))}
if(this.showValue){this.$53();var l=this.$193k||this.$185r;l.bringToFront();this.$194z=true}
this.setValue(this.value,!(this.animateThumbInit==true))},isc.A.$74i=function isc_Slider__refreshChildren(){this.$221u();this.$221t()},isc.A.$221u=function isc_Slider__destroyChildren(){this._titleLabel&&this._titleLabel.destroy();this._track&&this._track.destroy();this._thumb&&this._thumb.destroy();this._valueLabel&&this._valueLabel.destroy();this.$50&&this.$50.destroy();this.$52&&this.$52.destroy();this.$193k&&this.$193k.destroy();this.$185r&&this.$185r.destroy();this._titleLabel=this._track=this._thumb=this._valueLabel=this.valueLabel=null;this.$50=this.$52=null;this.$193k=this.$185r=null},isc.A.destroy=function isc_Slider_destroy(){this.$221u();this.Super("destroy",arguments)},isc.A.setUpSize=function isc_Slider_setUpSize(){var _1=this.$pn,_2=this.$po,_3=this.$1494(),_4=this.$1495();if(this.vertical){if(_1==null){var _5=Math.max(_3,this.trackWidth);if(this.showValue)_5+=this.labelWidth+this.labelSpacing;if(this.showRange)_5+=this.labelWidth+this.labelSpacing;_5+=this.getHPadding();this.logInfo("defaulting width to "+_5+"px");this.setWidth(_5);this.updateUserSize(_5,this.$o6)}
if(_2==null){var _6=this.length;if(this.showTitle)_6+=this.labelHeight+this.labelSpacing;if(this.showValue&&(this.labelHeight>_4)){_6+=(this.labelHeight-_4)}
_6+=this.getVPadding()+this.getVMarginSize();this.logInfo("no specified height on vertical Slider - defaulting to:"+_6+" based on slider.length of "+this.length);this.setHeight(_6);this.updateUserSize(_6,this.$o5)}else{this.length=this.getInnerContentHeight(false);if(this.showTitle)this.length-=(this.labelHeight+this.labelSpacing);if(this.showValue&&(this.labelHeight>_4)){this.length-=(this.labelHeight-_4)}
this.logInfo("setting slider track length to:"+this.length+", based on specified height")}}else{if(_2==null){var _6=Math.max(_3,this.trackWidth);if(this.showValue)_6+=this.labelHeight+this.labelSpacing;if(this.showRange)_6+=this.labelHeight+this.labelSpacing;_6+=this.getVPadding();this.logInfo("defaulting height to "+_6+"px");this.setHeight(_6);this.updateUserSize(_6,this.$o5)}
if(_1==null){var _5=this.length;if(this.showTitle){var _7=this.$82();_5+=_7[0]}
if(this.showValue&&(this.labelWidth>_4)){_5+=(this.labelWidth-_4)}
_5+=this.getHPadding()+this.getHMarginSize();this.logInfo("no specified width on horizontal Slider - defaulting to:"+_5+" based on slider.length of "+this.length);this.setWidth(_5);this.updateUserSize(_5,this.$o6)}else{this.length=this.getInnerContentWidth(false);if(this.showTitle){var _7=this.$82();this.length-=_7[0]}
if(this.showValue&&(this.hValueLabelWidth>_4)){this.length-=(this.hValueLabelWidth-_4)}
this.logInfo("setting slider track length to:"+this.length+", based on specified width")}}
this.$8y=this.length-_3;if(this.numValues){this.numStops=this.numValues-1;if(this.numStops==0)this.numStops=1;this.$8z=this.$8y/this.numStops}},isc.A.resizeBy=function isc_Slider_resizeBy(_1,_2){this.Super("resizeBy",arguments);if(!this._track)return;var _3=this.vertical;if((_3&&_2!=0)||(!_3&&_1!=0)){this.length+=_3?_2:_1;this.$8y=this.length-this.$1495();if(_3)this._track.resizeBy(0,_2);else this._track.resizeBy(_1,0);if(this.numStops){this.$8z=this.$8y/this.numStops}
this.setValue(this.value,true,true);if(this.showRange){if(this.vertical){var _4=this.flipValues?this.$52:this.$50;_4.moveBy(0,_2)}else{var _4=this.flipValues?this.$50:this.$52;_4.moveBy(_1,0)}}}},isc.A.$51=function isc_Slider__createRangeLabel(_1){var _2,_3,_4,_5,_6=(this.vertical?_1=="max":_1=="min");if(this.flipValues)_6=!_6;if(this.vertical){_2=Math.max(this.$1494(),this.trackWidth)+this.labelSpacing+(this.showValue?this.labelWidth+this.labelSpacing:0)+this.getLeftPadding();_4=isc.Canvas.LEFT;if(_6){_3=this._track.getTop();_5=isc.Canvas.TOP}else{var _7=this._track.getTop()+this._track.getHeight();_3=_7-this.labelHeight;_5=isc.Canvas.BOTTOM}}else{_3=Math.max(this.$1494(),this.trackWidth)+this.labelSpacing+(this.showValue?this.labelHeight+this.labelSpacing:0)+this.getTopPadding();_5=isc.Canvas.TOP;if(_6){_2=this._track.getLeft();_4=isc.Canvas.LEFT}else{var _8=this._track.getLeft()+this._track.getWidth();_2=_8-this.labelWidth;_4=isc.Canvas.RIGHT}}
var _9=this.createAutoChild("rangeLabel",{ID:this.getID()+"_"+_1+"Label",left:_2,top:_3,width:this.labelWidth,height:this.labelHeight,align:_4,valign:_5,styleName:this.rangeStyle});_9.setContents(_1=="min"?(this.minValueLabel?this.minValueLabel:this.formatValue(this.minValue,this.rangeFormat)):(this.maxValueLabel?this.maxValueLabel:this.formatValue(this.maxValue,this.rangeFormat)));return _9},isc.A.formatValue=function isc_Slider_formatValue(_1,_2){var _3=isc.shallowClone(_1);_2=_2||this.valueFormat;if(_2!=null&&isc.isA.Number(_1)){_3=isc.NumberUtil.format(_1,_2)}
return _3},isc.A.$54=function isc_Slider__createTitleLabel(){var _1=(this.vertical?isc.Canvas.CENTER:isc.Canvas.RIGHT);return isc.Label.create({ID:this.getID()+"_titleLabel",autoDraw:false,left:this.getLeftPadding(),top:this.getTopPadding(),width:(this.vertical?this.getInnerContentWidth(false):this.labelWidth),height:(this.vertical?this.labelHeight:this.getInnerContentHeight(false)),align:_1,className:this.titleStyle,contents:this.title})},isc.A.$53=function isc_Slider__createValueLabel(){var _1,_2,_3,_4,_5;var _6=this.hLabelSpacing==null?this.labelSpacing:this.hLabelSpacing;var _7=this.vLabelSpacing==null?this.labelSpacing:this.vLabelSpacing;if(this.vertical){_1=this._thumb.getLeft()-this.labelWidth-_6;_2=this._thumb.getPageTop()+parseInt(this._thumb.getHeight()/2-(this.labelHeight/2));_4=isc.Canvas.RIGHT;_5=isc.Canvas.CENTER;_3=this.labelWidth}else{_1=this._thumb.getLeft()+parseInt(this._thumb.getWidth()/2-this.labelWidth/2);_2=this._thumb.getPageTop()-this.labelHeight-_7;_4=isc.Canvas.CENTER;_5=isc.Canvas.BOTTOM;_3=this.labelWidth}
var _8=(this.vertical?this.vValueStyle:this.hValueStyle)||this.valueStyle;var _9=this.$185r=this.createAutoChild("valueLabelLayout",{_constructor:"StatefulCanvas",autoDraw:false,left:_1,top:_2,canFocus:false,showFocused:false,showDown:false,slider:this,width:1,height:this.labelHeight,align:_4,defaultLayoutAlign:"center",observes:[{source:this,message:"handleValueChanged",action:"this.$81('handleValueChanged');"}],baseStyle:_8});if(this.vertical){this.$193k=this.createAutoChild("valueLabelLayoutContainer",{_constructor:"HLayout",width:this.labelWidth,height:this.labelHeight,overflow:"visible",defaultLayoutAlign:"center",align:"right",layoutRightMargin:5,autoDraw:false});this.$193k.addMember(this.$185r)}
var _10=this.createAutoChild("valueLabel",{width:1,height:1,autoDraw:false,overflow:'visible',styleName:this.valueTextStyle,contents:this.value});this._valueLabel=_10;this.$185r.addChild(_10,null,false);if(!this.vertical){isc.addMethods(_9,{draw:function(){this.Super("draw",arguments);this.slider.$81()}})};if(!this.floatValueLabel)
this._thumb.addPeer(this.$193k||this.$185r)
return this.$193k||this.$185r},isc.A.draw=function isc_Slider_draw(){this.Super("draw",arguments);if(this.showActiveTrack)this.updateActiveTrack();if(this.$194z){delete this.$194z;this.delayCall("$81")}},isc.A.setValueStyle=function isc_Slider_setValueStyle(_1){this.valueStyle=_1;if(this._valueLabel!=null){this._valueLabel.setBaseStyle(_1);this.$81("setValueStyle")}},isc.A.setDisabled=function isc_Slider_setDisabled(_1){this.Super("setDisabled",arguments);var _2=this.creator;var _3=this.valueTextStyle;if(_2&&_2.pendingStatus)_3=_2.pendingValueStyle||_3;if(_1)_3+="Disabled";this.setValueStyle(_3);if(this.$185r){var _4=(this.vertical?this.vValueStyle:this.hValueStyle)||this.valueStyle;this.$185r.setBaseStyle(_4+(_1?"Disabled":""))}},isc.A.$80=function isc_Slider__createTrackLayout(){var _1=this.$82(),_2,_3,_4=(this.vertical?this.trackWidth:this.length),_5=(this.vertical?this.length:this.trackWidth),_6,_7,_8=this.$1494(),_9=this.$1495(),_10=(this.vertical?_8:_9),_11=(this.vertical?_9:_8);var _12=_8>this.trackWidth;if(_12){if(this.vertical){_6=_1[0];_2=_6+parseInt(_8/2-this.trackWidth/2);_3=_1[1];_7=_1[1]}else{_7=_1[1];_3=_7+parseInt(_8/2-this.trackWidth/2);_2=_1[0];_6=_1[0]}}else{if(this.vertical){_2=_1[0];_6=_2+parseInt(this.trackWidth/2-_9/2);_3=_1[1];_7=_1[1]}else{_3=_1[1];_7=_3+parseInt(this.trackWidth/2-_9/2);_2=_1[0];_6=_1[0]}}
this.logDebug("calculated coords for track:"+[_2,_3,_4,_5]);this.logDebug("calculated coords for thumb:"+[_6,_7,_10,_11]);this._track=this.addChild(this.$83(_3,_2,_4,_5));this._thumb=this._track.addPeer(this.$84(_7,_6,_10,_11));if(this.showTrack==false){this._track.hide();this._thumb.show()}},isc.A.setValueArrowOffset=function isc_Slider_setValueArrowOffset(_1){if(!this.$185r)return;var _2=this.$185r.getStyleHandle();if(!_2)return;if(_1==null||_1===''){_2.removeProperty('--isc-sliderValueArrowOffset');return}
var _3;if(isc.isA.Number(_1)&&Number.isFinite(_1)){_3=_1+'px'}else if(isc.isA.String(_1)){var s=_1.trim();if(/^-?\d+(\.\d+)?%$/.test(s)){_3=s}else{if(s.endsWith("px"))_3=parseInt(_1)+'px'}}else{isc.logInfo('Slider.setValueArrowOffset Pass a number or px value, or a percentage string like "40%".');return}
if(_3==null){_3="50%"}
_2.setProperty('--isc-sliderValueArrowOffset',_3);return _3},isc.A.$82=function isc_Slider__getTrackLayoutPos(){var _1=(this.vertical?this.vTitleSpacing:this.hTitleSpacing)||this.titleSpacing;var _2=this.vertical?(this.showValue?this.labelWidth+this.labelSpacing:0):(this.showTitle?this.labelWidth+_1:0),_3=this.vertical?(this.showTitle?this.labelHeight+_1:0):(this.showValue?this.labelHeight+this.labelSpacing:0);_2+=this.getLeftPadding();_3+=this.getTopPadding();if(isc.isA.ToggleSwitch(this)){if(!this.showTitle&&!this.showValue){if(!this.vertical){_3=Math.round((this.height-this.$1494())/2)-this.getTopBorderSize()}else{_2=Math.round((this.width-this.$1494())/2)-this.getLeftBorderSize()}}}
if(this.showValue){var _4=this.$1495()
if(this.vertical&&(this.labelHeight>_4)){_3+=Math.round((this.labelHeight-_4)/2)}
if(this.horizontal&&(this.labelWidth>_4)){_2+=Math.round((this.labelWidth-_4)/2)}}
return[_2,_3]},isc.A.$185t=function isc_Slider__createActiveTrack(_1){_1=_1||{};_1.styleName=this.activeTrackStyle;this.$185u=this.createAutoChild('activeTrack',_1);this.addChild(this.$185u)},isc.A.updateActiveTrack=function isc_Slider_updateActiveTrack(){if(!this.showActiveTrack||!this.isDrawn())return;var _1=this._track,_2=this._thumb,_3;if(!this.$185u){var _4;if(this.vertical){var _5=Math.round(_2.getTop()+(_2.getHeight()/2));var _6=Math.max(0,_1.getTop()+_1.getHeight()-_5);_4={top:_5,left:_1.getLeft(),width:_1.getWidth(),height:_6}}else{_4={top:_1.getTop(),left:_1.getLeft(),width:Math.round((_2.getLeft()+(_2.getWidth()/2))-_1.getLeft()),height:_1.getHeight()}}
this.$185t(_4);_3=this.$185u}else{_3=this.$185u;_3.moveTo(_1.getLeft(),_1.getTop());if(this.vertical){var _5=_2.getTop()+(_2.getHeight()/2);var _6=Math.max(0,_1.getTop()+_1.getHeight()-_5);_3.setTop(_5);_3.resizeTo(_1.getWidth(),_6)}else{_3.resizeTo(Math.round((_2.getLeft()+(_2.getWidth()/2))-_3.getLeft()),_1.getHeight())}}
if(!_3.isDrawn())_3.draw();else _3.redraw();_3.moveAbove(_1)},isc.A.$83=function isc_Slider__createTrack(_1,_2,_3,_4){return this.createAutoChild("track",{left:_2,top:_1,width:_3,height:_4,vertical:this.vertical,capSize:this.trackCapSize,src:"[SKIN]"+(this.vertical?"v":"h")+this.trackSrc,skinImgDir:this.skinImgDir,imageType:this.trackImageType,styleName:this[(this.vertical?"v":"h")+"TrackStyle"],overflow:"hidden",canFocus:true,tabIndex:-1,cacheImageSizes:false})},isc.A.$84=function isc_Slider__createThumb(_1,_2,_3,_4){var _5=(isc.Browser.isTouch?this.touchExtraThumbSpace:this.extraThumbSpace);var _6=this.createAutoChild("thumb",{left:_2,top:_1,width:_3,height:_4,src:"[SKIN]"+(this.vertical?"v":"h")+this.thumbSrc,skinImgDir:this.skinImgDir,styleName:this[(this.vertical?"v":"h")+"ThumbStyle"],triggerSpace:_5,triggerAreaTop:_5,triggerAreaRight:_5,triggerAreaBottom:_5,triggerAreaLeft:_5});return _6},isc.A.$1260=function isc_Slider__getValueFromCoords(_1,_2,_3){var _4,_5,_6=isc.EventHandler;if(this.vertical){var _7=this._track.getTop(),_8=this.$8y+_7;_4=_2[1]-_6.dragOffsetY-this.getPageTop();_4=Math.max(_7,Math.min(_8,_4));var _9=_4-_7;if(this.numStops){_9=Math.round(_9/this.$8z)*this.$8z;_4=Math.round(_9)+_7}
if(_4==this._thumb.getTop())return;this.logDebug("drag-moving thumb to:"+_4)
if(_1&&this.animateThumb){this.$87=this._thumb.animateMove(this._thumb.getLeft(),_4,null,this.animateThumbTime,this.animateThumbAcceleration)}else if(_3){this._thumb.setTop(_4)}
_5=(this.flipValues?_9/this.$8y:1-_9/this.$8y)}else{var _10=this._track.getLeft(),_8=this.$8y+_10,_11=this._thumb?this._thumb.getVisibleWidth():this.thumbThickWidth;_4=_2[0]-_6.dragOffsetX-this.getPageLeft();_4=Math.max(_10,Math.min(_8,_4));var _9=_4-_10;if(this.numStops){_9=Math.round(_9/this.$8z)*this.$8z;_4=Math.round(_9)+_10}
if(_4==this._thumb.getLeft())return;this.logDebug("drag-moving thumb to:"+_4)
if(_1&&this.animateThumb){this.$87=this._thumb.animateMove(_4,this._thumb.getTop(),null,this.animateThumbTime,this.animateThumbAcceleration)}else if(_3){this._thumb.setLeft(_4)}
_5=(this.flipValues?1-_9/this.$8y:_9/this.$8y)}
if(this.maxValue==this.minValue)return this.minValue;var _12=_5*(this.maxValue-this.minValue)+this.minValue;return this.$85d(_12)},isc.A.$85=function isc_Slider__thumbMove(_1){var _2=this.ns.EH;var _3=this.$1260(_1,[_2.getX(),_2.getY()],true);if(_3!=null)this.value=_3;this.logDebug("slider value from "+(_1?"click:":"drag-move:")+"\n"+this.getOffsetX()+"/"+this.getOffsetY()+"\n"+this.value);if(this.valueChangedOnDrag||!this.valueIsChanging()){this.handleValueChanged(this.value)}
if(this.sliderTarget)isc.EventHandler.handleEvent(this.sliderTarget,isc.Slider.EVENTNAME,this)},isc.A.$85d=function isc_Slider__getRoundedValue(_1){if(this.roundValues)_1=Math.round(_1);else if(this.roundPrecision!=null){var _2=Math.pow(10,this.roundPrecision);_1=(Math.round(_1*_2))/_2}
return _1},isc.A.hideValueLabel=function isc_Slider_hideValueLabel(){var _1=this.$193k||this.$185r;_1&&_1.hide()},isc.A.$81=function isc_Slider__updateValueLabel(_1){if(this.$194z)return;if(!this.isDrawn()||!this._thumb||!this._thumb.isDrawn())return;if(this.getPageTop()<-100)return;if(this.showActiveTrack)this.updateActiveTrack();var _2=this._valueLabel;if(_2==null)return;if(this.labelLayout)this.labelLayout.setWidth(1);if(this.$185r)this.$185r.setWidth(1);var _3=this.getValue();_2.setContents(this.formatValue(_3));var _4=this._thumb,_5=this.$193k,_6=this.$185r;if(this.floatValueLabel){if(_5)_5.deparent();else if(_6)_6.deparent()}
if((_5&&_5.isDrawn())||_6.isDrawn()){if(_2.isDrawn())_2.redraw("sizing layout");else _2.draw()}
_2.adjustForContent();var _7=_5||this.$193k||this.$185r;if(!_7){this.logInfo("No label container.","slider")}
if(!_7.isDrawn())_7.draw();else _7.redraw();var _8=_7.getVisibleWidth(),_9=_7.getVisibleHeight(),_10=_4.getPageLeft(),_11=_4.getPageTop(),_12=_4.getVisibleWidth(),_13=_4.getVisibleHeight(),_14=isc.Page.getScrollWidth(),_15=isc.Page.getScrollHeight(),_16=this.hLabelSpacing==null?this.labelSpacing:this.hLabelSpacing,_17=this.vLabelSpacing==null?this.labelSpacing:this.vLabelSpacing;if(this.vertical){if(this.floatValueLabel){var _18=parseInt(_11+(_13/2)-(_9/2));var _19=parseInt(_10-_8-_16);if(_18+_9>_15){_18=(_15-_9)-1}
_7.setPageRect(_19,_18,_8,_9);if(this.visibleAtPoint(_10,_18,true,[_7])){_7.show();_7.bringToFront()}else{_7.hide()}}else{_10=_4.getLeft();_11=_4.getTop();var _20=_18=parseInt(_11+(_13/2)-(_9/2));var _19=parseInt(_10-_8-_16);_7.setRect(_19,_18,_8,_9)}}else{if(this.floatValueLabel){var _19=parseInt(_10+(_12/2)-(_8/2));var _18=parseInt(_11-_9-_17);if(_19+_8>_14){_19=(_14-_8)-1}
_7.setPageRect(_19,_18,_8,_9);var _21=this.getPageTop()+(this.getTopMargin()||0);if(this.visibleAtPoint(_10,_21,true,[_7])){_7.show();_7.bringToFront()}else{_7.hide()}}else{_10=_4.getLeft();_11=_4.getTop();var _19=parseInt(_10+(_12/2)-(_8/2)),_18=parseInt(_11-_9-_17);var _22=this._track.getLeft(),_23=this._track.getVisibleWidth(),_24=0;if(_19<=_22){_24=_19-_22;_19=_22}else if(_19+_8>=_22+_23){_24=(_19+_8)-(_22+_23);_19=(_22+_23)-_8-1}
_7.setRect(_19,_18,_8,_9);if(_24!=0){var _25=Math.round((_8/2)+_24);if(_24<0)_25-=1;this.setValueArrowOffset(_25)}else{this.setValueArrowOffset(null)}}}},isc.A.handleMouseUp=function isc_Slider_handleMouseUp(){if(this.valueChangedOnClick)this.$85(true);this.$81()},isc.A.$1261=function isc_Slider__getThumbPositionFromValue(_1,_2){var _3,_4;if(!isc.isA.Number(_1))return;_1=Math.max(this.minValue,(Math.min(_1,this.maxValue)));_1=this.$85d(_1);if(_2)this.value=_1;if(this.minValue==this.maxValue)_3=1;else _3=(_1-this.minValue)/(this.maxValue-this.minValue);_4=_3*this.$8y;if(this.vertical){return this._track.getTop()+parseInt(this.flipValues?_4:this.$8y-_4)}else{return this._track.getLeft()+parseInt(this.flipValues?this.$8y-_4:_4)}},isc.A.setValue=function isc_Slider_setValue(_1,_2,_3){var _4=this.$1261(_1,true);if(_4==null)return;if(this.vertical){if(this.animateThumb&&!_2){this.$87=this._thumb.animateMove(this._thumb.getLeft(),_4,null,this.animateThumbTime,this.animateThumbAcceleration)}else{this._thumb.setTop(_4)}}else{if(this.animateThumb&&!_2){this.$87=this._thumb.animateMove(_4,this._thumb.getTop(),null,this.animateThumbTime,this.animateThumbAcceleration)}else{this._thumb.setLeft(_4)}}
if(!_3){this.handleValueChanged(this.value)}
if(this.sliderTarget)isc.EventHandler.handleEvent(this.sliderTarget,isc.Slider.EVENTNAME,this)},isc.A.getValue=function isc_Slider_getValue(){return this.value},isc.A.handleValueChanged=function isc_Slider_handleValueChanged(_1){this.valueChanged(_1);this.updateActiveTrack()},isc.A.valueIsChanging=function isc_Slider_valueIsChanging(){var _1=this.ns.EH;return(_1.dragging&&this._thumb===_1.dragTarget)},isc.A.handleKeyPress=function isc_Slider_handleKeyPress(_1,_2){var _3=_1.keyName;if(_3=="Home"){this.setValue(this.minValue,true);return false}
if(_3=="End"){this.setValue(this.maxValue,true);return false}
var _4=(this.maxValue-this.minValue)*this.stepPercent/100;if(this.roundValues&&_4<1)_4=1;if(this.vertical){if((this.flipValues&&_3=="Arrow_Up")||(!this.flipValues&&_3=="Arrow_Down"))
{this.setValue(this.getValue()-_4,true);return false}else if((this.flipValues&&_3=="Arrow_Down")||(!this.flipValues&&_3=="Arrow_Up"))
{this.setValue(this.getValue()+_4,true);return false}}else{if((this.flipValues&&_3=="Arrow_Left")||(!this.flipValues&&_3=="Arrow_Right"))
{this.setValue(this.getValue()+_4,true)
return false}else if((this.flipValues&&_3=="Arrow_Right")||(!this.flipValues&&_3=="Arrow_Left"))
{this.setValue(this.getValue()-_4,true)
return false}}
if(this.keyPress){this.convertToMethod("keyPress");return this.keyPress(_1,_2)}},isc.A.setCanFocus=function isc_Slider_setCanFocus(_1){this.Super("canFocus",arguments);if(this._thumb!=null)this._thumb.setCanFocus(_1);if(this._track!=null)this._track.setCanFocus(_1)},isc.A.setMinValue=function isc_Slider_setMinValue(_1){_1=this.$85d(_1);this.minValue=_1;if(this.$50)this.$50.setContents(_1);if(this.getValue()<this.minValue)this.setValue(this.minValue)},isc.A.setMaxValue=function isc_Slider_setMaxValue(_1){_1=this.$85d(_1);this.maxValue=_1;if(this.$52)this.$52.setContents(_1);if(this.getValue()>this.maxValue)this.setValue(this.maxValue)},isc.A.setNumValues=function isc_Slider_setNumValues(_1){this.numValues=_1;this.numStops=this.numValues-1;if(this.numStops==0)this.numStops=1;this.$8z=this.$8y/this.numStops;this.setValue(this.minValue)},isc.A.setTitle=function isc_Slider_setTitle(_1){this._titleLabel.setContents(_1)},isc.A.setLength=function isc_Slider_setLength(_1){this.length=_1;this.setUpSize()},isc.A.setVertical=function isc_Slider_setVertical(_1){this.vertical=_1;this.length=this.$2035;this.$pn=this.$po=null;this.$74i()},isc.A.$1494=function isc_Slider__getThumbThickWidth(){return(isc.Browser.isTouch&&this.touchThumbThickWidth!=null?this.touchThumbThickWidth:this.thumbThickWidth)},isc.A.setThumbThickWidth=function isc_Slider_setThumbThickWidth(_1){this.thumbThickWidth=_1;this.$74i()},isc.A.$1495=function isc_Slider__getThumbThinWidth(){return(isc.Browser.isTouch&&this.touchThumbThinWidth!=null?this.touchThumbThinWidth:this.thumbThinWidth)},isc.A.setThumbThinWidth=function isc_Slider_setThumbThinWidth(_1){this.thumbThinWidth=_1;this.$74i()},isc.A.setTrackWidth=function isc_Slider_setTrackWidth(_1){this.trackWidth=_1;this.$74i()},isc.A.setThumbSrc=function isc_Slider_setThumbSrc(_1){this.thumbSrc=_1;this.$74i()},isc.A.setTrackSrc=function isc_Slider_setTrackSrc(_1){this.trackSrc=_1;this.$74i()},isc.A.setTrackCapSize=function isc_Slider_setTrackCapSize(_1){this.trackCapSize=_1;this.$74i()},isc.A.setTrackImageType=function isc_Slider_setTrackImageType(_1){this.trackImageType=_1;this.$74i()},isc.A.setShowTitle=function isc_Slider_setShowTitle(_1){this.showTitle=_1;this.$74i()},isc.A.setShowRange=function isc_Slider_setShowRange(_1){this.showRange=_1;this.$74i()},isc.A.setShowValue=function isc_Slider_setShowValue(_1){this.showValue=_1;this.$74i()},isc.A.setLabelWidth=function isc_Slider_setLabelWidth(_1){this.labelWidth=_1;this.$74i()},isc.A.setLabelHeight=function isc_Slider_setLabelHeight(_1){this.labelHeight=_1;this.$74i()},isc.A.setLabelSpacing=function isc_Slider_setLabelSpacing(_1){this.labelSpacing=_1;this.$74i()},isc.A.setMaxValueLabel=function isc_Slider_setMaxValueLabel(_1){this.$52.setContents(_1)},isc.A.setRoundValues=function isc_Slider_setRoundValues(_1){this.roundValues=_1;this.$74i()},isc.A.setRoundPrecision=function isc_Slider_setRoundPrecision(_1){this.roundPrecision=_1;this.$74i()},isc.A.setFlipValues=function isc_Slider_setFlipValues(_1){this.flipValues=_1;this.$74i()},isc.A.setStepPercent=function isc_Slider_setStepPercent(_1){this.stepPercent=_1;this.$74i()});isc.B._maxIndex=isc.C+66;isc.Slider.registerStringMethods({valueChanged:"value"})
isc.defineClass("RangeSlider",isc.Canvas);isc.A=isc.RangeSlider;isc.A.$119c=1e-6;isc.A=isc.RangeSlider.getPrototype();isc.A.vertical=false;isc.A.minValue=0;isc.A.maxValue=0;isc.A.startValue=0;isc.A.endValue=0;isc.A.baseStyle="rangeSlider";isc.A.overflow="hidden";isc.A.thumbSize=7;isc.A.labelStartDefaults={_constructor:isc.Label,wrap:false,overflow:"hidden"};isc.A.startThumbDefaults={_constructor:isc.Snapbar,wrap:false,overflow:"hidden",canDrag:true,keepInParentRect:true,canCollapse:false,showGrip:true,showClosedGrip:false,$1056:true,dragStart:function(){this.creator.oldStartValue=this.creator.startValue;this.creator.dragpoint=this.creator.vertical?isc.Event.mouseDownEvent.y:isc.Event.mouseDownEvent.x;this.creator.isDragging=true;this.creator.fireChangedEvent()},dragMove:function(){var _1=this.creator.vertical?this.creator.getValuesForPixels(isc.Event.lastEvent.y-this.creator.dragpoint):this.creator.getValuesForPixels(isc.Event.lastEvent.x-this.creator.dragpoint);this.creator.setStartValue(this.creator.oldStartValue+_1);this.creator.fireChangedEvent();return true},dragStop:function(){this.creator.isDragging=false;this.creator.fireChangedEvent()}};isc.A.labelDragDefaults={_constructor:isc.Label,overflow:"hidden",canDrag:true,keepInParentRect:true,dragAppearance:"none",dragMove:function(){var _1=this.creator.vertical?this.creator.getValuesForPixels(isc.Event.lastEvent.y-this.creator.dragpoint):this.creator.getValuesForPixels(isc.Event.lastEvent.x-this.creator.dragpoint);this.creator.setValues(this.creator.oldStartValue+_1,this.creator.oldEndValue+_1);this.creator.fireChangedEvent();return true},dragStart:function(){this.creator.oldStartValue=this.creator.startValue;this.creator.oldEndValue=this.creator.endValue;this.creator.dragpoint=this.creator.vertical?isc.Event.mouseDownEvent.y:isc.Event.mouseDownEvent.x;this.creator.isDragging=true;this.creator.fireChangedEvent()},dragStop:function(){this.creator.isDragging=false;this.creator.fireChangedEvent()}};isc.A.labelEndDefaults={_constructor:isc.Label,overflow:"hidden"};isc.A.endThumbDefaults={_constructor:isc.Snapbar,canDrag:true,overflow:"hidden",keepInParentRect:true,canCollapse:false,showGrip:true,$1056:true,dragStart:function(){this.creator.oldEndValue=this.creator.endValue;this.creator.dragpoint=this.creator.vertical?isc.Event.mouseDownEvent.y:isc.Event.mouseDownEvent.x;this.creator.isDragging=true;this.creator.fireChangedEvent()},dragMove:function(){var _1=this.creator.vertical?this.creator.getValuesForPixels(isc.Event.lastEvent.y-this.creator.dragpoint):this.creator.getValuesForPixels(isc.Event.lastEvent.x-this.creator.dragpoint);this.creator.setEndValue(this.creator.oldEndValue+_1);if(this.creator.scrollbar){this.creator.scrollbar.moveThumb()}
this.creator.fireChangedEvent();return true},dragStop:function(){this.creator.isDragging=false;this.creator.fireChangedEvent()}};isc.A.scrollbarDefaults={thumbDragStop:function(){this.Super("thumbDragStop",arguments);this.creator.thumbdragging=false;this.creator.isDragging=false;this.creator.updatePositions();this.creator.fireChangedEvent()},thumbDragStart:function(){this.Super("thumbDragStart",arguments);this.creator.thumbdragging=true;this.creator.isDragging=true;this.creator.oldStartValue=this.creator.startValue;this.creator.oldEndValue=this.creator.endValue;this.creator.dragpoint=this.getEventCoord();this.creator.fireChangedEvent()}};isc.A=isc.RangeSlider;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_c_RangeSlider_init(_1,_2,_3){this.invokeSuper(isc.RangeSlider,"init",_1,_2,_3);if(this!=isc.RangeSlider||!isc.Snapbar)return;var _4=isc.RangeSlider.getPrototype(),_5=isc.Snapbar.getPrototype().gripBreadth;_4.thumbSize=Math.max(_4.thumbSize,_5)});isc.B._maxIndex=isc.C+1;isc.A=isc.RangeSlider.getPrototype();isc.A.scrollbarConstructor="Scrollbar";isc.A.nativeAutoHideScrollbars=false;isc.A=isc.RangeSlider.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_RangeSlider_initWidget(){this.Super("initWidget",arguments);if(this.maxValue<this.minValue){var x=this.minValue;this.minValue=this.maxValue;this.maxValue=x}
if(this.startValue<this.minValue){this.startValue=this.minValue}
if(this.endValue>this.maxValue){this.endValue=this.endValue}
if(!this.trackDefaults){isc.RangeSlider.setInstanceProperty("trackDefaults",this.getTrackDefaults())}
if(this.vertical){this.createControls(true)}
else{this.createControls()}},isc.A.getTrackDefaults=function isc_RangeSlider_getTrackDefaults(){return{overflow:"hidden",showDisabled:true,cacheImageSizes:false,_constructor:isc.Slider.getInstanceProperty("trackConstructor"),capSize:isc.Slider.getInstanceProperty("trackCapSize"),skinImgDir:isc.Slider.getInstanceProperty("skinImgDir"),imageType:isc.Slider.getInstanceProperty("trackImageType"),trackSrc:isc.Slider.getInstanceProperty("trackSrc")}},isc.A.resized=function isc_RangeSlider_resized(){this.Super("resized",arguments);if(this.showTrack){if(this.vertical){this.track.setWidth(isc.Slider.getInstanceProperty("trackWidth"));this.track.setHeight(this.height)}else{this.track.setHeight(isc.Slider.getInstanceProperty("trackWidth"));this.track.setWidth(this.width)}}
this.updatePositions()},isc.A.createControls=function isc_RangeSlider_createControls(_1){var _2=this;var _3;var _4=isc.Slider.getInstanceProperty("trackWidth");if(_1){this.scrollbar=this.addAutoChild("scrollbar",{vertical:true,height:"100%"});if(this.scrollbar){_3=this.getWidth()-this.scrollbar.getWidth();this.scrollbar.setLeft(_3);this.scrollbar.setTop(0)}else{_3=this.getWidth()}
this.labelStart=this.addAutoChild("labelStart",{width:_3,baseStyle:this.baseStyle+"Start"});this.labelDrag=this.addAutoChild("labelDrag",{width:_3,baseStyle:this.baseStyle+"Selected"});this.labelEnd=this.addAutoChild("labelEnd",{width:_3,baseStyle:_2.baseStyle+"End"});this.startThumb=this.addAutoChild("startThumb",{height:this.thumbSize,width:_3,target:this.labelStart,vertical:false});this.endThumb=this.addAutoChild("endThumb",{height:this.thumbSize,width:_3,target:this.labelEnd,vertical:false,makeLabel:function(){this.Super("makeLabel",arguments);this.label.addMethods({getCustomState:function(){if(isc.Snapbar.getInstanceProperty("showClosedGrip")){return"closed"}}})}});this.track=this.addAutoChild("track",{left:Math.round(_3/2-_4/2),width:_4,height:this.height,vertical:this.vertical,src:"[SKIN]"+(this.vertical?"v":"h")+isc.Slider.getInstanceProperty("trackSrc"),styleName:isc.Slider.getInstanceProperty((this.vertical?"v":"h")+"TrackStyle")})}else{this.scrollbar=this.addAutoChild("scrollbar",{vertical:false,width:"100%"});if(this.scrollbar){_3=this.getHeight()-this.scrollbar.getHeight();this.scrollbar.setLeft(0);this.scrollbar.setTop(_3)}else{_3=this.getHeight()}
this.labelStart=this.addAutoChild("labelStart",{height:_3,baseStyle:this.baseStyle+"Start"});this.labelDrag=this.addAutoChild("labelDrag",{height:_3,baseStyle:this.baseStyle+"Selected"});this.labelEnd=this.addAutoChild("labelEnd",{height:_3,baseStyle:this.baseStyle+"End"});this.startThumb=this.addAutoChild("startThumb",{width:this.thumbSize,height:_3,target:this.labelStart});this.endThumb=this.addAutoChild("endThumb",{width:this.thumbSize,height:_3,target:this.labelEnd,makeLabel:function(){this.Super("makeLabel",arguments);this.label.addMethods({getCustomState:function(){if(isc.Snapbar.getInstanceProperty("showClosedGrip")){return"closed"}}})}});this.track=this.addAutoChild("track",{top:Math.round(_3/2-_4/2),height:_4,width:this.width,vertical:this.vertical,src:"[SKIN]"+(this.vertical?"v":"h")+isc.Slider.getInstanceProperty("trackSrc"),styleName:isc.Slider.getInstanceProperty((this.vertical?"v":"h")+"TrackStyle")})};if(this.track){this.track.sendToBack()}
if(this.scrollbar){this.scrollbar.setScrollTarget(this)}
this.updatePositions()},isc.A.mouseUp=function isc_RangeSlider_mouseUp(){if(this.vertical){var _1=this.getOffsetY()-this.startThumb.getHeight()}else{var _1=this.getOffsetX()-this.startThumb.getWidth()}
this.slideSelectedRangeByPoints(_1);this.fireChangedEvent()},isc.A.slideSelectedRangeByPoints=function isc_RangeSlider_slideSelectedRangeByPoints(_1){var _2=this.getValuesForPixels(_1);var _3=(this.endValue-this.startValue)/2;this.isDragging=true;this.setValues(_2-_3+this.minValue,_2+_3+this.minValue);this.isDragging=false},isc.A.scrollToRatio=function isc_RangeSlider_scrollToRatio(_1,_2,_3){var _4=(this.scrollbar.getEventCoord()-this.dragpoint)/(this.scrollbar.trackSize());var _5=this.getValueForScrollRatio(_4);this.setValues(this.oldStartValue+_5,this.oldEndValue+_5);this.fireChangedEvent()},isc.A.scrollByDelta=function isc_RangeSlider_scrollByDelta(_1,_2,_3){var _4=this.endValue-this.startValue;if(this.vertical){var w=this.getHeight()-this.startThumb.getHeight()-this.endThumb.getHeight()}else{var w=this.getWidth()-this.startThumb.getWidth()-this.endThumb.getWidth()}
var _6=(this.maxValue-this.minValue)/w;var _7=20*_6*_2;var _8=this.startValue+_7;var _9=this.endValue+_7;if(_8<this.minValue){_8=this.minValue;_9=this.minValue+_4}
if(_9>this.maxValue){_9=this.maxValue;_8=this.maxValue-_4}
this.isDragging=true;this.setValues(_8,_9);this.isDragging=false;this.fireChangedEvent()},isc.A.scrollByPage=function isc_RangeSlider_scrollByPage(_1,_2,_3){var _4=Math.max((this.endValue-this.startValue),0)*_2;var _5=this.startValue+_4;var _6=this.endValue+_4;if(_5<this.minValue){_5=this.minValue;_6=this.minValue+Math.abs(_4)}
if(_6>this.maxValue){_6=this.maxValue;_5=this.maxValue-Math.abs(_4)}
this.isDragging=true;this.setValues(_5,_6);this.isDragging=false;this.fireChangedEvent()},isc.A.getViewportRatio=function isc_RangeSlider_getViewportRatio(_1){var _2=this.maxValue-this.minValue,_3=0;if(this.thumbdragging){_3=this.oldEndValue-this.oldStartValue}else{_3=this.endValue-this.startValue}
return(Math.abs(_2)<isc.RangeSlider.$119c?0:_3/_2)},isc.A.getScrollRatio=function isc_RangeSlider_getScrollRatio(_1){var _2=this.maxValue-this.minValue,_3=this.endValue-this.startValue;return(Math.abs(_2-_3)<isc.RangeSlider.$119c?0:(this.startValue-this.minValue)/(_2-_3))},isc.A.getValueForScrollRatio=function isc_RangeSlider_getValueForScrollRatio(_1){return _1*(this.maxValue-this.minValue)},isc.A.getValuesForPixels=function isc_RangeSlider_getValuesForPixels(_1){if(this.vertical){return _1*(this.maxValue-this.minValue)/(this.getHeight())}
else{return _1*(this.maxValue-this.minValue)/(this.getWidth())}},isc.A.updatePositions=function isc_RangeSlider_updatePositions(){if(this.vertical){var w=this.getHeight()-this.startThumb.getHeight()-this.endThumb.getHeight()}else{var w=this.getWidth()-this.startThumb.getWidth()-this.endThumb.getWidth()}
var _2=0;if(this.maxValue-this.minValue>0){_2=w/(this.maxValue-this.minValue)}
var _3=Math.round((this.startValue-this.minValue)*_2);var _4=Math.round((this.endValue-this.startValue)*_2);var _5=Math.round((this.maxValue-this.endValue)*_2);var _6=Math.round((this.startValue-this.minValue+this.endValue-this.startValue)*_2);if(this.vertical){if(_3==0){this.startThumb.target=this.labelDrag}else{this.labelStart.show();this.labelStart.setTop(0);this.labelStart.setHeight(_3)}
if(_4==0){this.labelDrag.hide()}else{this.labelDrag.show();this.labelDrag.setHeight(_4);this.labelDrag.setTop(_3+this.startThumb.getHeight())}
if(_5==0){this.labelEnd.hide()}else{this.labelEnd.show();this.labelEnd.setTop(_6+this.startThumb.getHeight()+this.endThumb.getHeight());this.labelEnd.setHeight(_5)}
this.startThumb.setTop(_3);this.endThumb.setTop(_6+this.startThumb.getHeight())}
else{if(_3==0){this.labelStart.hide()}
else{this.labelStart.show();this.labelStart.setLeft(0);this.labelStart.setWidth(_3)}
if(_4==0){this.labelDrag.hide()}
else{this.labelDrag.show();this.labelDrag.setWidth(_4);this.labelDrag.setLeft(_3+this.startThumb.getWidth())}
if(_5==0){this.labelEnd.hide()}else{this.labelEnd.show();this.labelEnd.setLeft(_6+this.startThumb.getWidth()+this.endThumb.getWidth());this.labelEnd.setWidth(_5)}
this.startThumb.setLeft(_3);this.endThumb.setLeft(_6+this.startThumb.getWidth())}
if(this.scrollbar){this.scrollbar.setThumb()}},isc.A.clampToMinMax=function isc_RangeSlider_clampToMinMax(_1){if(_1<=this.minValue){_1=this.minValue}
if(_1>=this.maxValue){_1=this.maxValue}
return _1},isc.A.isInMinMaxRange=function isc_RangeSlider_isInMinMaxRange(_1){if(_1<this.minValue){return false}
if(_1>this.maxValue){return false}
return true},isc.A.setValues=function isc_RangeSlider_setValues(_1,_2){if(this.isDragging){_1=this.clampToMinMax(_1);_2=this.clampToMinMax(_2);this.startValue=_1;this.endValue=_2;this.updatePositions()}else{if(this.isInMinMaxRange(_1)&&this.isInMinMaxRange(_2)&&_1<=_2){this.startValue=_1;this.endValue=_2;this.updatePositions()}}},isc.A.setStartValue=function isc_RangeSlider_setStartValue(_1){if(this.isDragging){_1=this.clampToMinMax(_1);if(_1>=this.endValue){_1=this.endValue}
this.startValue=_1;this.updatePositions()}else{if(this.isInMinMaxRange(_1)&&_1<=this.endValue){this.startValue=_1;this.updatePositions()}else{isc.logWarn("Ignoring setStartValue to "+_1+" (out of range).")}}},isc.A.setEndValue=function isc_RangeSlider_setEndValue(_1){if(this.isDragging){_1=this.clampToMinMax(_1);if(_1<=this.startValue){_1=this.startValue}
this.endValue=_1;this.updatePositions()}else{if(this.isInMinMaxRange(_1)&&_1>=this.startValue){this.endValue=_1;this.updatePositions()}else{isc.logWarn("Ignoring setEndValue to "+_1+" (out of range).")}}},isc.A.getStartValue=function isc_RangeSlider_getStartValue(){return this.startValue},isc.A.getEndValue=function isc_RangeSlider_getEndValue(){return this.endValue},isc.A.setMinValue=function isc_RangeSlider_setMinValue(_1){this.minValue=_1;this.updatePositions()},isc.A.setMaxValue=function isc_RangeSlider_setMaxValue(_1){this.maxValue=_1;this.updatePositions()},isc.A.getMinValue=function isc_RangeSlider_getMinValue(){return this.minValue},isc.A.getMaxValue=function isc_RangeSlider_getMaxValue(){return this.maxValue},isc.A.fireChangedEvent=function isc_RangeSlider_fireChangedEvent(){this.changed(this.startValue,this.endValue,this.isDragging)},isc.A.changed=function isc_RangeSlider_changed(_1,_2,_3){});isc.B._maxIndex=isc.C+27;(function(){var _1={};/*
The following code is the unchanged, original code of the tinycolor library by Brian Grinstead,modified only by whitespace stripping and automated obfuscation.  This code, up to the end
marker "=== END ===", is available under the MIT license, reproduced below.All surrounding code, and all other code that may be delivered together with tinycolor, is
governed by the copyright statements at the top of this file and other files.The tinycolor project can be found here:    https://github.com/bgrins/TinyColor/
Isomorphic thanks Brian Grinstead for his excellent work!
*/
/*
Copyright (c), Brian Grinstead, http://briangrinstead.com
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.*/
/*
// TinyColor v1.4.1
// https://github.com/bgrins/TinyColor
// Brian Grinstead, MIT License
*/
(function(_77){var _3=/^\s+/,_4=/\s+$/,_5=0,_6=_77.round,_7=_77.min,_8=_77.max,_9=_77.random;function tinycolor(_30,_78){_30=(_30)?_30:'';_78=_78||{};if(_30 instanceof tinycolor){return _30}
if(!(this instanceof tinycolor)){return new tinycolor(_30,_78)}
var _10=inputToRGB(_30);this.$2211=_30,this.$2212=_10.r,this.$162g=_10.g,this.$1270=_10.b,this.$162f=_10.a,this.$2213=_6(100*this.$162f)/100,this.$2214=_78.format||_10.format;this.$2215=_78.gradientType;if(this.$2212<1){this.$2212=_6(this.$2212)}
if(this.$162g<1){this.$162g=_6(this.$162g)}
if(this.$1270<1){this.$1270=_6(this.$1270)}
this.$2216=_10.ok;this.$2217=_5++}
tinycolor.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this.$2216},getOriginalInput:function(){return this.$2211},getFormat:function(){return this.$2214},getAlpha:function(){return this.$162f},getBrightness:function(){var _10=this.toRgb();return(_10.r*299+_10.g*587+_10.b*114)/1000},getLuminance:function(){var _10=this.toRgb();var _11,_12,_13,R,G,B;_11=_10.r/255;_12=_10.g/255;_13=_10.b/255;if(_11<=0.03928){R=_11/12.92}else{R=_77.pow(((_11+0.055)/1.055),2.4)}
if(_12<=0.03928){G=_12/12.92}else{G=_77.pow(((_12+0.055)/1.055),2.4)}
if(_13<=0.03928){B=_13/12.92}else{B=_77.pow(((_13+0.055)/1.055),2.4)}
return(0.2126*R)+(0.7152*G)+(0.0722*B)},setAlpha:function(_78){this.$162f=boundAlpha(_78);this.$2213=_6(100*this.$162f)/100;return this},toHsv:function(){var _17=rgbToHsv(this.$2212,this.$162g,this.$1270);return{h:_17.h*360,s:_17.s,v:_17.v,a:this.$162f}},toHsvString:function(){var _17=rgbToHsv(this.$2212,this.$162g,this.$1270);var h=_6(_17.h*360),s=_6(_17.s*100),v=_6(_17.v*100);return(this.$162f==1)?"hsv("+h+", "+s+"%, "+v+"%)":"hsva("+h+", "+s+"%, "+v+"%, "+this.$2213+")"},toHsl:function(){var _21=rgbToHsl(this.$2212,this.$162g,this.$1270);return{h:_21.h*360,s:_21.s,l:_21.l,a:this.$162f}},toHslString:function(){var _21=rgbToHsl(this.$2212,this.$162g,this.$1270);var h=_6(_21.h*360),s=_6(_21.s*100),l=_6(_21.l*100);return(this.$162f==1)?"hsl("+h+", "+s+"%, "+l+"%)":"hsla("+h+", "+s+"%, "+l+"%, "+this.$2213+")"},toHex:function(_78){return rgbToHex(this.$2212,this.$162g,this.$1270,_78)},toHexString:function(_78){return'#'+this.toHex(_78)},toHex8:function(_78){return rgbaToHex(this.$2212,this.$162g,this.$1270,this.$162f,_78)},toHex8String:function(_78){return'#'+this.toHex8(_78)},toRgb:function(){return{r:_6(this.$2212),g:_6(this.$162g),b:_6(this.$1270),a:this.$162f}},toRgbString:function(){return(this.$162f==1)?"rgb("+_6(this.$2212)+", "+_6(this.$162g)+", "+_6(this.$1270)+")":"rgba("+_6(this.$2212)+", "+_6(this.$162g)+", "+_6(this.$1270)+", "+this.$2213+")"},toPercentageRgb:function(){return{r:_6(bound01(this.$2212,255)*100)+"%",g:_6(bound01(this.$162g,255)*100)+"%",b:_6(bound01(this.$1270,255)*100)+"%",a:this.$162f}},toPercentageRgbString:function(){return(this.$162f==1)?"rgb("+_6(bound01(this.$2212,255)*100)+"%, "+_6(bound01(this.$162g,255)*100)+"%, "+_6(bound01(this.$1270,255)*100)+"%)":"rgba("+_6(bound01(this.$2212,255)*100)+"%, "+_6(bound01(this.$162g,255)*100)+"%, "+_6(bound01(this.$1270,255)*100)+"%, "+this.$2213+")"},toName:function(){if(this.$162f===0){return"transparent"}
if(this.$162f<1){return false}
return _66[rgbToHex(this.$2212,this.$162g,this.$1270,true)]||false},toFilter:function(_78){var _23='#'+rgbaToArgbHex(this.$2212,this.$162g,this.$1270,this.$162f);var _24=_23;var _25=this.$2215?"GradientType = 1, ":"";if(_78){var s=tinycolor(_78);_24='#'+rgbaToArgbHex(s.$2212,s.$162g,s.$1270,s.$162f)}
return"progid:DXImageTransform.Microsoft.gradient("+_25+"startColorstr="+_23+",endColorstr="+_24+")"},toString:function(_35){var _26=!!_35;_35=_35||this.$2214;var _27=false;var _28=this.$162f<1&&this.$162f>=0;var _29=!_26&&_28&&(_35==="hex"||_35==="hex6"||_35==="hex3"||_35==="hex4"||_35==="hex8"||_35==="name");if(_29){if(_35==="name"&&this.$162f===0){return this.toName()}
return this.toRgbString()}
if(_35==="rgb"){_27=this.toRgbString()}
if(_35==="prgb"){_27=this.toPercentageRgbString()}
if(_35==="hex"||_35==="hex6"){_27=this.toHexString()}
if(_35==="hex3"){_27=this.toHexString(true)}
if(_35==="hex4"){_27=this.toHex8String(true)}
if(_35==="hex8"){_27=this.toHex8String()}
if(_35==="name"){_27=this.toName()}
if(_35==="hsl"){_27=this.toHslString()}
if(_35==="hsv"){_27=this.toHsvString()}
return _27||this.toHexString()},clone:function(){return tinycolor(this.toString())},$2218:function(_78,_79){var _30=_78.apply(null,[this].concat([].slice.call(_79)));this.$2212=_30.$2212;this.$162g=_30.$162g;this.$1270=_30.$1270;this.setAlpha(_30.$162f);return this},lighten:function(){return this.$2218(lighten,arguments)},brighten:function(){return this.$2218(brighten,arguments)},darken:function(){return this.$2218(darken,arguments)},desaturate:function(){return this.$2218(desaturate,arguments)},saturate:function(){return this.$2218(saturate,arguments)},greyscale:function(){return this.$2218(greyscale,arguments)},spin:function(){return this.$2218(spin,arguments)},$2219:function(_78,_79){return _78.apply(null,[this].concat([].slice.call(_79)))},analogous:function(){return this.$2219(analogous,arguments)},complement:function(){return this.$2219(complement,arguments)},monochromatic:function(){return this.$2219(monochromatic,arguments)},splitcomplement:function(){return this.$2219(splitcomplement,arguments)},triad:function(){return this.$2219(triad,arguments)},tetrad:function(){return this.$2219(tetrad,arguments)}};tinycolor.fromRatio=function(_30,_78){if(typeof _30=="object"){var _31={};for(var i in _30){if(_30.hasOwnProperty(i)){if(i==="a"){_31[i]=_30[i]}
else{_31[i]=convertToPercentage(_30[i])}}}
_30=_31}
return tinycolor(_30,_78)};function inputToRGB(_30){var _10={r:0,g:0,b:0};var a=1;var s=null;var v=null;var l=null;var _34=false;var _35=false;if(typeof _30=="string"){_30=stringInputToObject(_30)}
if(typeof _30=="object"){if(isValidCSSUnit(_30.r)&&isValidCSSUnit(_30.g)&&isValidCSSUnit(_30.b)){_10=rgbToRgb(_30.r,_30.g,_30.b);_34=true;_35=String(_30.r).substr(-1)==="%"?"prgb":"rgb"}
else if(isValidCSSUnit(_30.h)&&isValidCSSUnit(_30.s)&&isValidCSSUnit(_30.v)){s=convertToPercentage(_30.s);v=convertToPercentage(_30.v);_10=hsvToRgb(_30.h,s,v);_34=true;_35="hsv"}
else if(isValidCSSUnit(_30.h)&&isValidCSSUnit(_30.s)&&isValidCSSUnit(_30.l)){s=convertToPercentage(_30.s);l=convertToPercentage(_30.l);_10=hslToRgb(_30.h,s,l);_34=true;_35="hsl"}
if(_30.hasOwnProperty("a")){a=_30.a}}
a=boundAlpha(a);return{ok:_34,format:_30.format||_35,r:_7(255,_8(_10.r,0)),g:_7(255,_8(_10.g,0)),b:_7(255,_8(_10.b,0)),a:a}}
function rgbToRgb(r,g,b){return{r:bound01(r,255)*255,g:bound01(g,255)*255,b:bound01(b,255)*255}}
function rgbToHsl(r,g,b){r=bound01(r,255);g=bound01(g,255);b=bound01(b,255);var _36=_8(r,g,b),_37=_7(r,g,b);var h,s,l=(_36+_37)/2;if(_36==_37){h=s=0}
else{var d=_36-_37;s=l>0.5?d/(2-_36-_37):d/(_36+_37);switch(_36){case r:h=(g-b)/d+(g<b?6:0);break;case g:h=(b-r)/d+2;break;case b:h=(r-g)/d+4;break}
h/=6}
return{h:h,s:s,l:l}}
function hslToRgb(h,s,l){var r,g,b;h=bound01(h,360);s=bound01(s,100);l=bound01(l,100);function hue2rgb(p,q,t){if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*(2/3-t)*6;return p}
if(s===0){r=g=b=l}
else{var q=l<0.5?l*(1+s):l+s-l*s;var p=2*l-q;r=hue2rgb(p,q,h+1/3);g=hue2rgb(p,q,h);b=hue2rgb(p,q,h-1/3)}
return{r:r*255,g:g*255,b:b*255}}
function rgbToHsv(r,g,b){r=bound01(r,255);g=bound01(g,255);b=bound01(b,255);var _36=_8(r,g,b),_37=_7(r,g,b);var h,s,v=_36;var d=_36-_37;s=_36===0?0:d/_36;if(_36==_37){h=0}
else{switch(_36){case r:h=(g-b)/d+(g<b?6:0);break;case g:h=(b-r)/d+2;break;case b:h=(r-g)/d+4;break}
h/=6}
return{h:h,s:s,v:v}}
function hsvToRgb(h,s,v){h=bound01(h,360)*6;s=bound01(s,100);v=bound01(v,100);var i=_77.floor(h),f=h-i,p=v*(1-s),q=v*(1-f*s),t=v*(1-(1-f)*s),_46=i%6,r=[v,q,p,p,t,v][_46],g=[t,v,v,q,p,p][_46],b=[p,p,t,v,v,q][_46];return{r:r*255,g:g*255,b:b*255}}
function rgbToHex(r,g,b,_78){var _47=[pad2(_6(r).toString(16)),pad2(_6(g).toString(16)),pad2(_6(b).toString(16))];if(_78&&_47[0].charAt(0)==_47[0].charAt(1)&&_47[1].charAt(0)==_47[1].charAt(1)&&_47[2].charAt(0)==_47[2].charAt(1)){return _47[0].charAt(0)+_47[1].charAt(0)+_47[2].charAt(0)}
return _47.join("")}
function rgbaToHex(r,g,b,a,_78){var _47=[pad2(_6(r).toString(16)),pad2(_6(g).toString(16)),pad2(_6(b).toString(16)),pad2(convertDecimalToHex(a))];if(_78&&_47[0].charAt(0)==_47[0].charAt(1)&&_47[1].charAt(0)==_47[1].charAt(1)&&_47[2].charAt(0)==_47[2].charAt(1)&&_47[3].charAt(0)==_47[3].charAt(1)){return _47[0].charAt(0)+_47[1].charAt(0)+_47[2].charAt(0)+_47[3].charAt(0)}
return _47.join("")}
function rgbaToArgbHex(r,g,b,a){var _47=[pad2(convertDecimalToHex(a)),pad2(_6(r).toString(16)),pad2(_6(g).toString(16)),pad2(_6(b).toString(16))];return _47.join("")}
tinycolor.equals=function(_78,_79){if(!_78||!_79){return false}
return tinycolor(_78).toRgbString()==tinycolor(_79).toRgbString()};tinycolor.random=function(){return tinycolor.fromRatio({r:_9(),g:_9(),b:_9()})};function desaturate(_30,_78){_78=(_78===0)?0:(_78||10);var _21=tinycolor(_30).toHsl();_21.s-=_78/100;_21.s=clamp01(_21.s);return tinycolor(_21)}
function saturate(_30,_78){_78=(_78===0)?0:(_78||10);var _21=tinycolor(_30).toHsl();_21.s+=_78/100;_21.s=clamp01(_21.s);return tinycolor(_21)}
function greyscale(_30){return tinycolor(_30).desaturate(100)}
function lighten(_30,_78){_78=(_78===0)?0:(_78||10);var _21=tinycolor(_30).toHsl();_21.l+=_78/100;_21.l=clamp01(_21.l);return tinycolor(_21)}
function brighten(_30,_78){_78=(_78===0)?0:(_78||10);var _10=tinycolor(_30).toRgb();_10.r=_8(0,_7(255,_10.r-_6(255*-(_78/100))));_10.g=_8(0,_7(255,_10.g-_6(255*-(_78/100))));_10.b=_8(0,_7(255,_10.b-_6(255*-(_78/100))));return tinycolor(_10)}
function darken(_30,_78){_78=(_78===0)?0:(_78||10);var _21=tinycolor(_30).toHsl();_21.l-=_78/100;_21.l=clamp01(_21.l);return tinycolor(_21)}
function spin(_30,_78){var _21=tinycolor(_30).toHsl();var _48=(_21.h+_78)%360;_21.h=_48<0?360+_48:_48;return tinycolor(_21)}
function complement(_30){var _21=tinycolor(_30).toHsl();_21.h=(_21.h+180)%360;return tinycolor(_21)}
function triad(_30){var _21=tinycolor(_30).toHsl();var h=_21.h;return[tinycolor(_30),tinycolor({h:(h+120)%360,s:_21.s,l:_21.l}),tinycolor({h:(h+240)%360,s:_21.s,l:_21.l})]}
function tetrad(_30){var _21=tinycolor(_30).toHsl();var h=_21.h;return[tinycolor(_30),tinycolor({h:(h+90)%360,s:_21.s,l:_21.l}),tinycolor({h:(h+180)%360,s:_21.s,l:_21.l}),tinycolor({h:(h+270)%360,s:_21.s,l:_21.l})]}
function splitcomplement(_30){var _21=tinycolor(_30).toHsl();var h=_21.h;return[tinycolor(_30),tinycolor({h:(h+72)%360,s:_21.s,l:_21.l}),tinycolor({h:(h+216)%360,s:_21.s,l:_21.l})]}
function analogous(_30,_78,_79){_78=_78||6;_79=_79||30;var _21=tinycolor(_30).toHsl();var _49=360/_79;var _50=[tinycolor(_30)];for(_21.h=((_21.h-(_49*_78>>1))+720)%360;--_78;){_21.h=(_21.h+_49)%360;_50.push(tinycolor(_21))}
return _50}
function monochromatic(_30,_78){_78=_78||6;var _17=tinycolor(_30).toHsv();var h=_17.h,s=_17.s,v=_17.v;var _50=[];var _51=1/_78;while(_78--){_50.push(tinycolor({h:h,s:s,v:v}));v=(v+_51)%1}
return _50}
tinycolor.mix=function(_78,_79,_80){_80=(_80===0)?0:(_80||50);var _52=tinycolor(_78).toRgb();var _53=tinycolor(_79).toRgb();var p=_80/100;var _54={r:((_53.r-_52.r)*p)+_52.r,g:((_53.g-_52.g)*p)+_52.g,b:((_53.b-_52.b)*p)+_52.b,a:((_53.a-_52.a)*p)+_52.a};return tinycolor(_54)};tinycolor.readability=function(_78,_79){var _55=tinycolor(_78);var _56=tinycolor(_79);return(_77.max(_55.getLuminance(),_56.getLuminance())+0.05)/(_77.min(_55.getLuminance(),_56.getLuminance())+0.05)};tinycolor.isReadable=function(_78,_79,_80){var _57=tinycolor.readability(_78,_79);var _58,_59;_59=false;_58=validateWCAG2Parms(_80);switch(_58.level+_58.size){case"AAsmall":case"AAAlarge":_59=_57>=4.5;break;case"AAlarge":_59=_57>=3;break;case"AAAsmall":_59=_57>=7;break}
return _59};tinycolor.mostReadable=function(_78,_79,_80){var _60=null;var _61=0;var _57;var _62,_63,_64;_80=_80||{};_62=_80.includeFallbackColors;_63=_80.level;_64=_80.size;for(var i=0;i<_79.length;i++){_57=tinycolor.readability(_78,_79[i]);if(_57>_61){_61=_57;_60=tinycolor(_79[i])}}
if(tinycolor.isReadable(_78,_60,{"level":_63,"size":_64})||!_62){return _60}
else{_80.includeFallbackColors=false;return tinycolor.mostReadable(_78,["#fff","#000"],_80)}};var _65=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var _66=tinycolor.hexNames=flip(_65);function flip(_78){var _67={};for(var i in _78){if(_78.hasOwnProperty(i)){_67[_78[i]]=i}}
return _67}
function boundAlpha(a){a=parseFloat(a);if(isNaN(a)||a<0||a>1){a=1}
return a}
function bound01(_78,_36){if(isOnePointZero(_78)){_78="100%"}
var _68=isPercentage(_78);_78=_7(_36,_8(0,parseFloat(_78)));if(_68){_78=parseInt(_78*_36,10)/100}
if((_77.abs(_78-_36)<0.000001)){return 1}
return(_78%_36)/parseFloat(_36)}
function clamp01(_78){return _7(1,_8(0,_78))}
function parseIntFromHex(_78){return parseInt(_78,16)}
function isOnePointZero(_78){return typeof _78=="string"&&_78.indexOf('.')!=-1&&parseFloat(_78)===1}
function isPercentage(_78){return typeof _78==="string"&&_78.indexOf('%')!=-1}
function pad2(_78){return _78.length==1?'0'+_78:''+_78}
function convertToPercentage(_78){if(_78<=1){_78=(_78*100)+"%"}
return _78}
function convertDecimalToHex(d){return _77.round(parseFloat(d)*255).toString(16)}
function convertHexToDecimal(h){return(parseIntFromHex(h)/255)}
var _69=(function(){var _70="[-\\+]?\\d+%?";var _71="[-\\+]?\\d*\\.\\d+%?";var _72="(?:"+_71+")|(?:"+_70+")";var _73="[\\s|\\(]+("+_72+")[,|\\s]+("+_72+")[,|\\s]+("+_72+")\\s*\\)?";var _74="[\\s|\\(]+("+_72+")[,|\\s]+("+_72+")[,|\\s]+("+_72+")[,|\\s]+("+_72+")\\s*\\)?";return{CSS_UNIT:new RegExp(_72),rgb:new RegExp("rgb"+_73),rgba:new RegExp("rgba"+_74),hsl:new RegExp("hsl"+_73),hsla:new RegExp("hsla"+_74),hsv:new RegExp("hsv"+_73),hsva:new RegExp("hsva"+_74),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function isValidCSSUnit(_30){return!!_69.CSS_UNIT.exec(_30)}
function stringInputToObject(_30){_30=_30.replace(_3,'').replace(_4,'').toLowerCase();var _75=false;if(_65[_30]){_30=_65[_30];_75=true}
else if(_30=='transparent'){return{r:0,g:0,b:0,a:0,format:"name"}}
var _76;if((_76=_69.rgb.exec(_30))){return{r:_76[1],g:_76[2],b:_76[3]}}
if((_76=_69.rgba.exec(_30))){return{r:_76[1],g:_76[2],b:_76[3],a:_76[4]}}
if((_76=_69.hsl.exec(_30))){return{h:_76[1],s:_76[2],l:_76[3]}}
if((_76=_69.hsla.exec(_30))){return{h:_76[1],s:_76[2],l:_76[3],a:_76[4]}}
if((_76=_69.hsv.exec(_30))){return{h:_76[1],s:_76[2],v:_76[3]}}
if((_76=_69.hsva.exec(_30))){return{h:_76[1],s:_76[2],v:_76[3],a:_76[4]}}
if((_76=_69.hex8.exec(_30))){return{r:parseIntFromHex(_76[1]),g:parseIntFromHex(_76[2]),b:parseIntFromHex(_76[3]),a:convertHexToDecimal(_76[4]),format:_75?"name":"hex8"}}
if((_76=_69.hex6.exec(_30))){return{r:parseIntFromHex(_76[1]),g:parseIntFromHex(_76[2]),b:parseIntFromHex(_76[3]),format:_75?"name":"hex"}}
if((_76=_69.hex4.exec(_30))){return{r:parseIntFromHex(_76[1]+''+_76[1]),g:parseIntFromHex(_76[2]+''+_76[2]),b:parseIntFromHex(_76[3]+''+_76[3]),a:convertHexToDecimal(_76[4]+''+_76[4]),format:_75?"name":"hex8"}}
if((_76=_69.hex3.exec(_30))){return{r:parseIntFromHex(_76[1]+''+_76[1]),g:parseIntFromHex(_76[2]+''+_76[2]),b:parseIntFromHex(_76[3]+''+_76[3]),format:_75?"name":"hex"}}
return false}
function validateWCAG2Parms(_78){var _63,_64;_78=_78||{"level":"AA","size":"small"};_63=(_78.level||"AA").toUpperCase();_64=(_78.size||"small").toLowerCase();if(_63!=="AA"&&_63!=="AAA"){_63="AA"}
if(_64!=="small"&&_64!=="large"){_64="small"}
return{"level":_63,"size":_64}}
_1.tinycolor=tinycolor;if(isc)isc.tinycolor=tinycolor;if(typeof module!=="undefined"&&module.exports){module.exports=tinycolor}
else if(typeof define==='function'&&define.amd){define(function(){return tinycolor})}
else{_1.tinycolor=tinycolor}})(Math);/* === END === */
if(!isc.tinycolor)isc.tinycolor=_1.tinycolor})();if(isc.ListGrid){isc.ClassFactory.defineClass("ScrollingMenu","ListGrid");isc.ScrollingMenu.scrollingPickerProperties={minHeight:1,useBackMask:true,canFocus:true,showHeader:false,showEdges:false,autoDraw:false,className:"scrollingMenu",bodyStyleName:"scrollingMenuBody",selectionType:"single",leaveScrollbarGap:false,generateClickOnSpace:false,generateDoubleClickOnEnter:false,generateClickOnEnter:true,showModal:true,arrowKeyAction:"select",filterOnKeypress:true};isc.ScrollingMenu.scrollingPickerMethods={show:function(){if(this.showModal){var _1=this.clickMaskMode||(this.formItem&&this.formItem.clickMaskMode);if(_1==null){_1="hard"}
this.showClickMask({target:this,methodName:"cancel"},_1,[this])}
this.Super("show",arguments);if(this.showModal)this.body.focus()},recordClick:function(_1,_2,_3,_4,_5,_6,_7){this.hide();if(_2!=null)this.itemClick(_2)},itemClick:function(_1){},rowOver:function(_1,_2,_3){if(this.enableSelectOnRowOver){this.selectionManager.selectSingle(_1,_2);this.fireSelectionUpdated()}
},createSelectionModel:function(_1,_2,_3,_4,_5){var _6=this.invokeSuper(isc.ScrollingMenu,"createSelectionModel",_1,_2,_3,_4,_5);this.selectionManager.addProperties({selectOnRowOver:function(_7){this.selectSingle(_7);this.selectionFromMouse=true},setSelected:function(_7,_8){this.selectionFromMouse=false;return this.Super("setSelected",arguments)}
});return _6},bodyKeyPress:function(_1,_2){var _3=_1.keyName;if(_3==this.$10j){var _4=this.selectionManager;if(_4&&_4.selectionFromMouse){this.cancel();return false}
}
if(_3=="Escape"){this.cancel();return false}
return this.Super("bodyKeyPress",arguments)},cancel:function(){this.hide()},hide:function(){this.hideClickMask();return this.Super("hide",arguments)},$859:true,$253v:function(){var _1=this.Super("$253v",arguments);if(!this.$859)return;if(this.data&&this.data.getLength()>0&&this.selectionManager&&!this.selectionManager.anySelected()&&(isc.isA.ResultSet==null||!isc.isA.ResultSet(this.data)||this.data.rowIsLoaded(0)))
{this.selectionManager.selectItem(0);this.fireSelectionUpdated()}
return _1}};isc.defer("isc.ScrollingMenu.addProperties({ enableSelectOnRowOver: !isc.Browser.isTouch });");isc.ScrollingMenu.addProperties(isc.ScrollingMenu.scrollingPickerProperties)
isc.ScrollingMenu.addProperties(isc.ScrollingMenu.scrollingPickerMethods)
isc.ScrollingMenu.changeDefaults("filterEditorDefaults",{backgroundColor:"white",editorKeyPress:function(_1,_2,_3){if(_2=="Arrow_Down"){this.sourceWidget.$318(1);return false}
if(_2=="Arrow_Up"){this.sourceWidget.$318(-1);return false}
if(_2=="Enter"){this.sourceWidget.$240();return}
return this.Super("editorKeyPress",arguments)}});isc.ScrollingMenu.changeDefaults("bodyDefaults",{$vl:function(){return this.creator.$vl.apply(this.creator,arguments)}})}
if(isc.TreeGrid){isc.ClassFactory.defineClass("ScrollingTreeMenu","TreeGrid");isc.defer("isc.ScrollingTreeMenu.addProperties({ enableSelectOnRowOver: !isc.Browser.isTouch });");isc.ScrollingTreeMenu.addProperties(isc.ScrollingMenu.scrollingPickerProperties)
isc.ScrollingTreeMenu.addProperties(isc.ScrollingMenu.scrollingPickerMethods)
isc.ScrollingTreeMenu.addProperties({})
isc.ScrollingTreeMenu.changeDefaults("filterEditorDefaults",{backgroundColor:"white",editorKeyPress:function(_1,_2,_3){if(_2=="Arrow_Down"){this.sourceWidget.$318(1);return false}
if(_2=="Arrow_Up"){this.sourceWidget.$318(-1);return false}
if(_2=="Enter"){this.sourceWidget.$240();return}
return this.Super("editorKeyPress",arguments)}});isc.ScrollingTreeMenu.changeDefaults("bodyDefaults",{$vl:function(){return this.creator.$vl.apply(this.creator,arguments)}})}
isc.ClassFactory.defineClass("DynamicForm","Canvas","DataBoundComponent");isc.addGlobal("FormLayout",isc.DynamicForm);isc.A=isc.DynamicForm;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.GET="GET";isc.A.POST="POST";isc.A.NORMAL="normal";isc.A.MULTIPART="multipart";isc.A.NORMAL_ENCODING="application/x-www-form-urlencoded";isc.A.MULTIPART_ENCODING="multipart/form-data";isc.A.$89="$89";isc.A.$9a="$9a";isc.A.$9b="$9b";isc.A.$9c="$9d";isc.A.$9e="$9f";isc.A.$1905="$1906";isc.A.$99r="inlineErrorHandle";isc.A.$9g="$9g";isc.A.updateHoverInPlace=true;isc.A.suppressSearchFormFieldMultiple=true;isc.B.push(isc.A.buildOperatorIndex=function isc_c_DynamicForm_buildOperatorIndex(){if(isc.DataSource==null)return;var _1=isc.getValues(isc.DataSource.getSearchOperators());_1=_1.sortByProperties(["symbol"],[false],[function(_4,_5,_6){var _2=_4[_5],_3=isc.isA.String(_2)?_2.length:0
;return _3}]
);this.$85l=_1.makeIndex("symbol",true)}
,isc.A.getOperatorIndex=function isc_c_DynamicForm_getOperatorIndex(){return this.$85l}
,isc.A.$1145=function isc_c_DynamicForm__defaultItemHoverHTMLImpl(_1){if(_1.canHover==false)return;if(_1.implementsPromptNatively)return null;var _2=(_1.renderAsDisabled()?_1.disabledHover:null)||(_1.isReadOnly()?_1.readOnlyHover:null)||_1.prompt;if(!_2&&_1.parentItem)_2=isc.DynamicForm.$1145(_1.parentItem);return _2
}
,isc.A.$1146=function isc_c_DynamicForm__defaultValueHoverHTMLImpl(_1){if(_1.canHover==false)return;var _2=_1.getDisplayValue();if(_1!=null&&_1.multiple&&_1.multipleValueSeparator){if(isc.isAn.Array(_2))_2=_2.join(_1.multipleValueSeparator)}
if(_2!=null){_2=""+_2;var _3;if(_2==_1.$54t&&((_3=_1.getValue())==null||_3==isc.emptyString))
{_2=""}else if(!_1.canEscapeHTML){_2=_2.asHTML()}
}
return _2}
,isc.A.classAllowedForParam=function isc_c_DynamicForm_classAllowedForParam(_1,_2,_3){if(_1=="editSelectedData"&&_2=="selectionComponent"){return!isc.isA.Menu(_3)}
return true}
);isc.B._maxIndex=isc.C+5;isc.A=isc.DynamicForm.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.flattenItems=false;isc.A.linearAutoSpanItems=true;isc.A.numCols=2;isc.A.linearHintWidth=100;isc.A.fixedColWidths=false;isc.A.fixedRowHeights=false;isc.A.colWidths=null;isc.A.minColWidth=20;isc.A.cellSpacing=0;isc.A.cellPadding=2;isc.A.cellBorder=0;isc.A.defaultRowHeight=22;isc.A.sectionVisibilityMode="multiple";isc.A.allowContentAndChildren=true;isc.A.separateContentInsertion=true;isc.A.$r9=true;isc.A.fieldIdProperty="name";isc.A.titleField="title";isc.A.showDetailFields=true;isc.A.longTextEditorThreshold=255;isc.A.longTextEditorType="textArea";isc.A.titlePrefix="";isc.A.rightTitlePrefix=":&nbsp;";isc.A.titleSuffix="&nbsp;:";isc.A.rightTitleSuffix="";isc.A.titleWidth=100;isc.A.clipItemTitles=false;isc.A.showInlineErrors=true;isc.A.showErrorIcons=true;isc.A.showErrorText=null;isc.A.showErrorStyle=true;isc.A.errorOrientation=null;isc.A.errorItemDefaults={type:"blurb",wrap:true,showIf:function(){return!this.form.showInlineErrors&&this.form.hasErrors()},defaultDynamicValue:function(_1,_2,_3){return _2.getErrorsHTML(_2.getErrors())}
};isc.A.errorItemCellStyle="formCellError";isc.A.errorsPreamble="The following errors were found";isc.A.hiliteRequiredFields=true;isc.A.requiredTitlePrefix="<b>";isc.A.requiredRightTitlePrefix="<b>:&nbsp;";isc.A.requiredTitleSuffix="&nbsp;:</b>";isc.A.requiredRightTitleSuffix="</b>";isc.A.readOnlyDisplay="readOnly";isc.A.readOnlyTextBoxStyle="staticTextItem";isc.A.showImageAsURL=false;isc.A.wrapHintText=true;isc.A.minHintWidth=80;isc.A.canHover=false;isc.A.itemHoverDelay=500;isc.A.itemHoverStyle="formHover";isc.A.originalValueMessage="Original value: $value";isc.A.overflow=isc.Canvas.VISIBLE;isc.A.defaultHeight=20;isc.A.validateOnChange=false;isc.A.implicitSaveDelay=2000;isc.A.synchronousValidation=false;isc.A.autoFocus=false;isc.A.autoFocusOnError=true;isc.A.selectOnFocus=false;isc.A.selectOnClick=false;isc.A.canFocus=true;isc.A._useNativeTabIndex=false;isc.A._useFocusProxy=false;isc.A.autoComplete="none";isc.A.uniqueMatch=true;isc.A.browserSpellCheck=true;isc.A.action="#";isc.A.method=isc.DynamicForm.POST;isc.A.encoding=isc.DynamicForm.NORMAL_ENCODING;isc.A.writeFormTag=true;isc.A.autoSendTargetFieldName="__target__";isc.A.useNativeSelectItems=false;isc.A.operator="and";isc.A.nestedEditorType="NestedEditorItem";isc.A.nestedListEditorType="NestedListEditorItem";isc.A.canDropItems=false;isc.A.canAddColumns=true;isc.A.showPending=null;isc.B.push(isc.A.setLinearMode=function isc_DynamicForm_setLinearMode(_1){if(this.linearMode==_1)return;this.linearMode=_1;this.$2255(_1);this.markForRedraw()}
,isc.A.$2255=function isc_DynamicForm__setLinearMode(_1){if(_1){this.$2256=this.numCols;this.setNumCols(this.linearNumCols!=null?this.linearNumCols:(this.getTitleOrientation()==isc.Canvas.TOP?1:2));if(this.colWidths&&this.colWidths.length!=this.numCols){this.$8r=this.colWidths,this.colWidths=null}
}else{if(this.$2256!=null){this.setNumCols(this.$2256);delete this.$2256}
if(this.$8r){this.setColWidths(this.$8r);delete this.$8r}
}
}
,isc.A.hasInherentHeight=function isc_DynamicForm_hasInherentHeight(){if(this.inherentHeight!=null)return this.inherentHeight;return(this.overflow==isc.Canvas.VISIBLE||this.overflow==isc.Canvas.CLIP_H)}
,isc.A.setValuesManager=function isc_DynamicForm_setValuesManager(_1){if(isc.isA.String(_1))_1=window[_1];if(isc.isA.ValuesManager(_1))_1.addMember(this);else this.valuesManager=_1}
,isc.A.$279k=function isc_DynamicForm__getValuesManager(){var _1=this.valuesManager;if(_1!=null&&isc.isA.ValuesManager(_1)&&_1.members&&_1.members.contains(this))return _1}
,isc.A.shouldShowErrorText=function isc_DynamicForm_shouldShowErrorText(){if(this.showErrorText!=null)return this.showErrorText;if(this.linearMode&&this.showInlineErrors)return true;return false}
,isc.A.getErrorOrientation=function isc_DynamicForm_getErrorOrientation(){if(this.errorOrientation!=null){return this.errorOrientation}
if(this.linearMode&&this.shouldShowErrorText())return"top";return"left"}
,isc.A.setHoverFocusKey=function isc_DynamicForm_setHoverFocusKey(_1){this.Super("setHoverFocusKey",arguments);if(!this.items)return;for(var i=0;i<this.items.length;i++){if(this.items[i].$243v){this.items[i].$243v(_1)}
}
}
,isc.A.setHoverPersist=function isc_DynamicForm_setHoverPersist(_1){this.hoverPersist=_1;if(!this.items)return;for(var i=0;i<this.items.length;i++){if(this.items[i].$243w)this.items[i].$243w(_1)}
}
);isc.B._maxIndex=isc.C+9;isc.A=isc.DynamicForm.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.multipleRelationFieldEditorType="MultiPickerItem";isc.A.largeValueMapFilterEditorThreshold=50;isc.A.largeValueMapFilterEditorType="SetFilterItem";isc.A.alwaysRecreateItems=false;isc.A.isEditComponent=true;isc.A.$9i="upload";isc.A.$94c="UploadItem";isc.A.$94d="TUploadItem";isc.A.$9j="mutex";isc.A.$9k=["name","editorType","readOnlyEditorType","type","valueMap","defaultValue","showTitle","left","top","width","height"];isc.A.canTabToIcons=true;isc.A.dataArity="single";isc.A.useMultiSelectForValueMaps=true;isc.A.storeAtomicValues=false;isc.A.$240t=true;isc.A.storeDisplayValues=true;isc.A.$70l="/";isc.A.$9l="form";isc.A.$9m="$9n";isc.A.$9o="$9p";isc.A.$172o={visibleWhen:{attribute:"visibility",exclusiveProperty:"showIf"},requiredWhen:{attribute:"setRequired",exclusiveProperty:"requiredId"},readOnlyWhen:{attribute:"readOnly",additionalProperties:{"fieldAppearance":"readOnlyDisplay"}},formula:{attribute:"formula"},textFormula:{attribute:"textFormula"}};isc.A.$9q="absolute";isc.A.$9r="showIf";isc.A.$9s="item,value,form,values";isc.A.$9t="</FORM>";isc.A.$9u="tablePolicy";isc.A.$9v="<COL WIDTH=";isc.A.$9w=((isc.Browser.isIE&&!isc.Browser.isIE9)?"<TR STYLE='position:absolute'>":"<TR>");isc.A.$9y=(isc.Browser.isSafari||isc.Browser.isMoz?"</div></TD>":"</TD>");isc.A.$5u="<TD>";isc.A.$5v="</TD>";isc.A.$5s="<TR>";isc.A.$5t="</TR>";isc.A.$9z="<br>";isc.A.$90="</TABLE></FORM>";isc.A.$127r="</TABLE>";isc.A.$91=["<INPUT TYPE=HIDDEN NAME='",,"' VALUE='",,"'>"];isc.A.measureItemTitles=true;isc.A.$243i={};isc.A.titleHeight=15;isc.A.$92="height:";isc.A.$93="width:";isc.A.$11j="max-width:";isc.A.$94="max-height:";isc.A.$92="height:";isc.A.$95="<NOBR>";isc.A.$96="</td></tr></TABLE>";isc.A.$97="</DIV>";isc.A.$98="</TD>";isc.A.$99=["<TD ",," CLASS='",,"' ALIGN='",,"' VALIGN='",,"'",,,">"];isc.A.emitOuterTextOverflow=false;isc.A.$o0="top";isc.A.$63z="$428";isc.A.$114x="$114y";isc.A.$114z=["<div style='"+((isc.Browser.isIE&&isc.Browser.version<11)?"float:right;":"order:2;")
+"'>",,,"</div><div id='",,"' style='overflow:hidden;",isc.Browser.$114w,":ellipsis",(isc.Browser.isIE&&!isc.Browser.isStrict?";width:100%":""),"'>",,,,"</div>"];isc.A.$10c=["<FORM ","ID","=",,," METHOD=",," ACTION='",,"' ENCTYPE=",,,,," ONSUBMIT='return ",,".$10d()' ONRESET='",,".resetValues(); return false;'"," STYLE='margin-bottom:0px'"," ACCEPT-CHARSET='UTF-8'",">"];isc.A.$10e=" STYLE='position:absolute;left:0px;top:0px;'";isc.A.$10f=" TARGET='";isc.A.writeWidthAttribute=false;isc.A.$10g=["<TABLE role='presentation' ID='",,"' WIDTH='",,"' CELLSPACING='",,"' CELLPADDING='",,"' BORDER='",,(isc.Browser.isMoz?"'><TBODY>":"'>")];isc.A.$119i="' WIDTH='";isc.A.$10h="table";isc.A.checkFileAccessOnSubmit=true;isc.A.formSubmitFailedWarning="Form was unable to be submitted. The most likely cause for this is an invalid value in an upload field.";isc.A.fileAccessFailedWarning="Unable to access the selected file for upload. Please re-select the file and try again.";isc.A.$10i="requiredIf";isc.A.$842="required";isc.A.$10j="Enter";isc.A.$51h="Backspace";isc.A.itemHoverHTML=isc.DynamicForm.$1145;isc.A.valueHoverHTML=isc.DynamicForm.$1146;isc.A.dragLineStyle="dragLine";isc.A.$248c=20;isc.A.$248a=0.25;isc.A.$248b=0.3;isc.A.savedSearchAbstractType="form";isc.B.push(isc.A.initWidget=function isc_DynamicForm_initWidget(){if(isc.$cv)arguments.$cw=this;if(!isc.DynamicForm.$85l)isc.DynamicForm.buildOperatorIndex();this.setColWidths(this.colWidths);if(this.linearMode==null&&this.linearOnMobile&&isc.Browser.isHandset){this.linearMode=true}
if(this.linearMode)this.$2255(true);this.Super("initWidget",arguments);if(this.showComplexFieldsRecursively)this.showComplexFields=true;if(this.fields&&this.items==null)this.items=this.fields;if(this.defaultItems!=null&&this.items==null){this.items=[];for(var i=0;i<this.defaultItems.length;i++){this.items[i]=isc.addProperties({},this.defaultItems[i])}
}
if(this.values==null)this.values={};if(this.action!=isc.DynamicForm.getPrototype().action&&this.action!=null&&!isc.isA.emptyString(this.action))
{this.setAction(this.action)}
if(this.valuesManager!=null){if(isc.isA.String(this.valuesManager)){if(window[this.valuesManager]){this.valuesManager=window[this.valuesManager]}else if(this.getByLocalId(this.valuesManager)){this.valuesManager=this.getByLocalId(this.valuesManager)}
}
if(isc.isA.ValuesManager(this.valuesManager)){if(this.dataSource==null&&this.valuesManager.dataSource!=null){this.dataSource=this.valuesManager.dataSource}
}
}
if(!this.dataSource){var _2=this.items||[];for(var i=0;i<_2.length;i++){if(_2[i]==null)continue;if(this.dataPath||_2[i].dataPath){this.$834=isc.shallowClone(_2);break}
}
}
if(this.dataSource)this.dataSource=this.getDataSource();this.$143m(this.items?this.items:null,true);if(this.isDisabled()){this.setDisabled(true)}
this.setErrors(this.errors?this.errors:{});this.setValues(this.values,true);if(this.selectionComponent!=null)this.setSelectionComponent(this.selectionComponent,true)}
,isc.A.$10k=function isc_DynamicForm__destroyItems(_1){if(!_1)return;if(!isc.isA.FormItem(_1[0]))return;_1.callMethod("destroy");this.destroyOrphanedItems("containing form destroyed")}
,isc.A.destroy=function isc_DynamicForm_destroy(){this.$1639();var _1=this.$279k();if(_1&&_1.removeMember){_1.removeMember(this)}
this.$10k(this.items);this.Super("destroy",arguments)}
,isc.A.setHandleDisabled=function isc_DynamicForm_setHandleDisabled(_1){if(this.isDrawn()){if(this.redrawOnDisable)this.markForRedraw("setDisabled");this.$1703=true;this.disableKeyboardEvents(_1);delete this.$1703}
var _2=this.getItems();for(var i=0;i<_2.length;i++){_2[i].updateDisabled(true)}}
,isc.A.disableKeyboardEvents=function isc_DynamicForm_disableKeyboardEvents(_1,_2,_3){var _3=this.$1703;var _4=this.$167w;this.Super("disableKeyboardEvents",arguments);if(!_3&&(_4!=_1)){this.$167w=_1;this.markForRedraw("Disable Keyboard events on items")}}
,isc.A.applyFieldDefaults=function isc_DynamicForm_applyFieldDefaults(_1){if(_1==null)return;for(var i=0;i<_1.length;i++){var _3=_1[i];if(_3==null)return}}
,isc.A.getEditorType=function isc_DynamicForm_getEditorType(_1,_2){return this.getClass().getEditorType(_1,this,_2)}
,isc.A.getFieldType=function isc_DynamicForm_getFieldType(_1,_2){if(_1.type!=null&&(_1.type!="any"||_1.fieldTypeProperty==null))
{return _1.type}
if(_1.criteriaField&&this.dataSource){var _3=isc.DataSource.get(this.dataSource);var _4=_3?_3.getField(_1.criteriaField):null;if(_4)return _4.type}
if(_1.optionDataSource&&_1.getValueFieldName){var _3=isc.DataSource.get(_1.optionDataSource);var _5=_3?_3.getField(_1.getValueFieldName()):null;if(_5)return _5.type}
if(_1.fieldTypeProperty!=null){if(_2==null)_2=this.values;if(_2&&_2[_1.fieldTypeProperty]!=null){return _2[_1.fieldTypeProperty]}
}
return null}
,isc.A.$167p=function isc_DynamicForm__itemChanged(_1,_2){if(!_1.suppressItemChanged){if(this.itemChanged!=null){this.itemChanged(_1,_2)}
var _3=this.$279k();if(_3&&_3.itemChanged){_3.itemChanged(_1,_2)}
}
if(this.$179d){this.fireRuleContextChanged(this)}}
,isc.A.$193e=function isc_DynamicForm__canonicalizeItems(_1){if(_1!=null){for(var i=0;i<_1.length;i++){var _3=false;if(_1[i]==null){this.logWarn("Encountered empty entry in items array - removing this entry.")
_3=true}
if(isc.isA.Canvas(_1[i])){this.logWarn("Encountered a Canvas instance:"+_1[i]+" in the items array - the DynamicForm items array should contain only FormItem definitions. Removing this entry.");_3=true}
if(_3){_1.removeAt(i);i-=1}
}
}}
,isc.A.setItems=function isc_DynamicForm_setItems(_1){this.$143m(_1)}
,isc.A.$143m=function isc_DynamicForm__setItems(_1,_2){this.$193e(_1);_1=this.bindToDataSource(_1);if(!_1)_1=[];else if(_1==this.items)_1=_1.duplicate();var _3=this.items?this.items.duplicate():null;if(!_2&&_1!=null&&this.items!=null){for(var i=0;i<_1.length;i++){var _5=_1[i];if((this.alwaysRecreateItems==false&&!_5.$240f)&&isc.isA.FormItem(_5)&&this.items.contains(_5))
{_3.remove(_5)}
}
}
if(!_2)this.$1639();if(_3!=null&&_3.length>0&&!_2){this.removeItems(_3)}
this.$10l(_1,null,true,_2);if(!_2){this.addToRuleContextSchema()}
if(this.ruleScope||this.isRuleScope||isc.disableRuleScope)this.$164b(this.getItems());var _6=this.getRulesEngine();if(!_2&&_6){_6.processContextChanged()}}
,isc.A.setFields=function isc_DynamicForm_setFields(_1){this.setItems(_1)}
,isc.A.getFields=function isc_DynamicForm_getFields(){return this.items}
,isc.A.getAllFields=function isc_DynamicForm_getAllFields(){return this.items}
,isc.A.getItems=function isc_DynamicForm_getItems(){return this.items}
,isc.A.visibleAtPoint=function isc_DynamicForm_visibleAtPoint(_1,_2,_3,_4){if(this.invokeSuper(isc.DynamicForm,"visibleAtPoint",_1,_2,_3,_4))
return true;var _5=this.items||[],_6={},_7=_5.indexOf(this.getFocusSubItem());for(var i=-1;i<_5.length;i++){var _9=i;if(i==-1){_9=_7}else if(_9==_7)continue;if(_9==-1)continue;var _10=_5[_9],_11=_10.containerWidget;if(_11==this||!_10.isDrawn()||!_10.isVisible())continue;var _12=_11.getID();if(_6[_12]==null){_6[_12]=_11.visibleAtPoint(_1,_2,_3,_4)}
if(!_6[_12])continue;var _13=_10.getPageLeft(),_14=_10.getPageTop();if(_13<=_1&&(_13+_10.getVisibleWidth())>=_1&&_14<=_2&&(_14+_10.getVisibleHeight())>=_2){return true}
}
return false}
,isc.A.addItems=function isc_DynamicForm_addItems(_1,_2){if(!isc.isAn.Array(_1))_1=[_1];var _3=isc.DS.get(this.dataSource);for(var i=0;i<_1.length;i++){var _5=_3?_3.getField(_1[i].name):null;this.$2585(_1[i],_5)}
if(this.dataSource){var _3=isc.DS.get(this.dataSource);for(var i=0;i<_1.length;i++){_1[i]=this.combineFieldData(_1[i]);var _6=_1[i].name||_1[i].autoName;if(_6&&this.getItem(_6)){this.removeItem(_6)}
}
}
this.addFieldValidators(_1);if(_2==null||_2>this.items.length)_2=this.items.length;this.$10l(_1,_2);this.addToRuleContextSchema();this.$164b(_1)}
,isc.A.$10l=function isc_DynamicForm__addItems(_1,_2,_3,_4){this.addingItems=true;var _5=this.isDrawn();this.applyFieldDefaults(_1);var _6=[];var _7=false,_8=false,_9=(this.sectionVisibilityMode==this.$9j)
;for(var _10=0;_10<_1.length;_10++){var _11=_1[_10];if(!_11){_1.removeItem(_10);_10--;continue}
var _12=true;if(isc.isA.FormItem(_11)){if(this.alwaysRecreateItems==false&&!_11.$240f&&_11.form==this){_12=false;this.logInfo("setItems() / addItems(): Passed existing item:"+_11+". This item will not be destroyed and recreated.")}else{if(_11.form==this){this.logInfo("setItems() / addItems(): Passed existing item:"+_11+". This item will be destroyed and recreated.")}else{this.logWarn("setItems() / addItems(): Passed live form item instance:"+_11+" currently applied to a different DynamicForm:"+_11.form+". This is unsupported and may lead to unpredictable results.")}
}
}
if(_12){var _13=this.getEditorType(_11,this.values);_11.$167r=_13;_1[_10]=_11=this.createItem(_11,_13)}
if(_13==this.$9i||_13==this.$94c||_13==this.$94d)
{_7=true}
if(isc.FileItem&&isc.isA.FileItem(_11)&&_8){this.logWarn("Attempting to creating a form with multiple FileItems. This is not currently supported - only the first file type field value will be committed on submission of this form.")}
if(isc.isA.SectionItem(_11)){_6.add(_11);if(_11.sectionExpanded&&_9)
this.$6l=_11}
}
if(_3)this.items=_1
else this.items.addListAt(_1,_2);if(!_4){this.setItemValues(this.getValues(),false,true,_1)}
if(_7)this.encoding=isc.DynamicForm.MULTIPART_ENCODING;for(var i=0;i<_6.length;i++){var _15=_6[i],_16=_15.sectionExpanded;if(_16&&(!_9||(this.$6l==_15))){_15.expandSection()}else{_15.collapseSection()}
}
this.$10m=true;this.assignItemsTabPosition();this.markForRedraw("Form items added");delete this.addingItems}
,isc.A.$209u=function isc_DynamicForm__hasUpload(){var _1=this.items;for(var i=0;i<_1.length;i++){if(isc.isAn.UploadItem(_1[i]))return true}
return false}
,isc.A.copyKnownProperties=function isc_DynamicForm_copyKnownProperties(_1,_2,_3){var _4;for(var i=0;i<_3.length;i++){var _6=_3[i],_7=_2[_6];if(_7!==_4){_1[_6]=_7;delete _2[_6]}
}}
,isc.A.createItem=function isc_DynamicForm_createItem(_1,_2){if(_1.form!=null&&!(_1.form==this.getID()||_1.form!=this)){this.logWarn("Unsupported 'form' property ["+_1.form+"] set on item:"+_1+".  Ignoring.")}
if(_1.destroyed&&isc.isA.FormItem(_1)){this.logWarn("destroyed FormItem passed to setItems()/addItem(): FormItems cannot be re-used with different DynamicForms")}
if(!this.$11e()&&isc.isA.String(_1.width)&&_1.width!="100%"&&_1.width!="*")
{this.logWarn("Found width:'"+_1.width+"' for item "+_1.name+".  Percent sizes other than '100%' (as a synonym for '*') aren't allowed unless using absolute item layout")}
if(_1.showIf==null&&_1.hidden){_1.showIf="return false"}
var _3=isc.FormItemFactory.getItemClassName(_1,_2,this),_4=isc.FormItemFactory.getItemClass(_3);var _5=!_4;if(_5){this.logWarn("Problem initializing item: "+isc.Log.echo(_1)+" - derived FormItem class is: "+_3+".  If this is  not a typo, please make sure the relevant module is loaded.  A SpacerItem will be created for this FormItem.");_4=isc.ClassFactory.getClass("SpacerItem",true);if(_1.showTitle==false)_5=false}
if(this.shouldUseMultiSelectForValueMaps()&&_1.multiple==null&&_4.isA(isc.SelectItem))
{if(_1.valueMap
||_1.optionDataSource||isc.DynamicForm.$281c(_1,this.dataSource)
)
{_1.multiple=true}
}
if(isc.SGWTFactory&&isc.isA.SGWTFactoryObject(_4)){var _6=_1;if(_6.editorType||_6[isc.gwtRef]){_6=isc.addProperties({},_1);delete _6.editorType;delete _6[isc.gwtRef];delete _6[isc.gwtModule]}
var _7=_4.create(_6);var _8=this.createItem(_7,_7.editorType);_4.setJsObj(_8[isc.gwtRef],_8);return _8}
var _9=_1;_1=_4.createRaw();_1.form=_1.containerWidget=_1.eventParent=this;var _10=null;if(_1["validators"]!=null&&_9["validators"]!=null){_10=_1.validators}
if(isc.Browser.isIE&&this.canAlterItems){this.copyKnownProperties(_1,_9,this.$9k)}
if(!_9.name&&_9.autoName)_9.name=_9.autoName;if(this.autoChildItems){if(_1.ID==null)_1.ID=null;this.$d3(_4.Class,_1,_9)}else{_1.completeCreation(_9);if(_10!=null){if(!_1.validators){_1.validators=_10}else{if(!isc.isAn.Array(_1.validators)){_1.validators=[_1.validators]}
if(_1.validators.$69){_1.validators=_1.validators.duplicate()}
_1.validators.addList(_10)}
}
}
_1.form=this;if(_1.destroyed)_1.destroyed=false;if(_1.shouldSaveValue&&!isc.isA.nonemptyString(_1.name)&&!isc.isA.nonemptyString(_1.dataPath)
)
{this.logWarn(_1.getClass()+" form item defined with no 'name' property - Value cannot be validated and will not be saved. To explicitly exclude a form item from the set of values to be saved, set 'shouldSaveValue' to false for this item.")
_1.shouldSaveValue=false}
_1.updateCanEdit();_1.updateReadOnlyDisplay();if(_5&&_1.titleOrientation!="top")_1.colSpan+=_1.titleColSpan;return _1}
,isc.A.removeItems=function isc_DynamicForm_removeItems(_1){if(_1==null)return;if(!isc.isAn.Array(_1))_1=[_1];if(_1==this.items)_1=this.items.duplicate();else{_1=this.map("getItem",_1);for(var i=0;i<_1.length;i++){if(this.items.indexOf(_1[i])==-1){_1[i]=null}
}
}
var _3=this.$163o();for(var i=0;i<_1.length;i++){var _4=_1[i];if(_4==null)continue;if(_3){var _5=_1[i].getCriterion();if(_5!=null){if(this.$76u==null){this.$76u={_constructor:"AdvancedCriteria",operator:"and",criteria:[]
}
}
this.$76u.criteria.add(_5)}
delete this.values[_1[i].name]}
}
this.items.removeList(_1);if(this.$89t==null){this.$89t=[]}
var _6=this.getRuleScopeComponent();for(var i=0;i<_1.length;i++){var _4=_1[i];if(_4==null)continue;if(_6&&_6.rulesEngine&&isc.isA.FormItem(_4)){if(_4.requiredWhen)this.$1637("setRequired",{formItem:_4.name});if(_4.visibleWhen)this.$1637("visibility",{formItem:_4.name});if(_4.readOnlyWhen)this.$1637("readOnly",{formItem:_4.name});if(_4.formula)this.$1637("formula",{formItem:_4.name});if(_4.textFormula)this.$1637("textFormula",{formItem:_4.name});if(_4.icons){var _7=_4.icons;for(var j=0;j<_7.length;j++){var _9=_7[j];if(_9.visibleWhen)this.$1637("visibility",{formItem:_4.name,formIconName:j});if(_9.enableWhen)this.$1637("enable",{formItem:_4.name,formIconName:j})}
}
}
if(_4.items!=null){_1.addList(_4.items,i+1)}
if(this.$10n==_4){delete this.$10n;delete this.$189e;if(this.hasStableLocalID())this.provideRuleContext(this.getLocalId()+".focusField",null,this)}
if(!this.items.contains(_4)&&isc.isA.FormItem(_4)){if(this.isDrawn()){if(_4.$112n)_4.$112n();this.$89t.add(_4)}else{_4.destroy()}
}
}
this.$10m=true;this.markForRedraw("Form items removed")}
,isc.A.addField=function isc_DynamicForm_addField(_1,_2){this.addItems(_1,_2)}
,isc.A.removeField=function isc_DynamicForm_removeField(_1){var _2=[_1];if(isc.isA.SectionItem(_1)){if(this.editProxy&&this.editingOn){for(var i=0;i<_1.itemIds.length;i++){var _4=_1.itemIds[i],_5=this.getItem(_4);if(_5!=null){_2.add(_5)}
}
}
}
this.removeItems(_2)}
,isc.A.addItem=function isc_DynamicForm_addItem(_1,_2){this.addItems(_1,_2)}
,isc.A.removeItem=function isc_DynamicForm_removeItem(_1){this.removeItems(_1)}
,isc.A.addFields=function isc_DynamicForm_addFields(_1,_2){return this.addItems(_1,_2)}
,isc.A.removeFields=function isc_DynamicForm_removeFields(_1){return this.removeItems(_1)}
,isc.A.itemAutoTabIndexUpdated=function isc_DynamicForm_itemAutoTabIndexUpdated(_1){if(!this.isDrawn())return;var _2=window[_1];if(this.logIsDebugEnabled("TabIndexManager")){this.logDebug("tab index update notification for item:"+_2,"TabIndexManager")}
if(_2==null||_2.destroyed||_2.form!=this){this.logWarn("auto tab index update notification for item with ID "+_1+", this may be a stale entry as we do not have an item with this ID.");return}
if(_2.$kk()&&_2.isDrawn()){_2.$173(_2.getGlobalTabIndex(),true)}
this.itemTabIndexUpdated(_2)}
,isc.A.itemTabIndexUpdated=function isc_DynamicForm_itemTabIndexUpdated(_1){}
,isc.A.$180m=function isc_DynamicForm__removeItemFromTabIndexManager(_1){isc.TabIndexManager.removeTarget(_1.ID)}
,isc.A.assignItemsTabPosition=function isc_DynamicForm_assignItemsTabPosition(){var _1=this.items;if(!_1||_1.length==0)return;var _2=this.sortItemsIntoTabOrder();for(var i=0,_4=0;i<_2.length;i++){var _5=_2[i];if(_5==null)continue;isc.TabIndexManager.moveTarget(_5.ID,this.ID,_4);_4++;if(_5.$kk()&&_5.globalTabIndex==null&&_5.tabIndex!=-1){_5.$173(_5.getGlobalTabIndex())}
}}
,isc.A.sortItemsIntoTabOrder=function isc_DynamicForm_sortItemsIntoTabOrder(){return isc.DynamicForm.sortItemsIntoTabOrder(this.items,this)}
,isc.A.getChildTabPosition=function isc_DynamicForm_getChildTabPosition(_1){if(_1.canvasItem!=null){this.logWarn("Unexpected call to 'getChildTabPosition' for a CanvasItem canvas")}
var _2=this.items?this.items.length:0;var _3=this.children,_4=0;for(var i=0;i<this.children.length;i++){if(!_3[i].updateTabPositionOnReparent)continue;if(_3[i]==_1)break;_4++}
return _2+_4}
,isc.A.$kk=function isc_DynamicForm__canFocus(_1,_2,_3,_4){if(this.canFocus==true)return true;var _5=this.getItems()||[];for(var i=0;i<_5.length;i++){if(!isc.isA.FormItem(_5[i]))continue;if(_5[i].$kk())return true}
return this.invokeSuper(isc.DynamicForm,"$kk",_1,_2,_3,_4)}
,isc.A.handleMoved=function isc_DynamicForm_handleMoved(_1,_2,_3,_4){this.invokeSuper(isc.DynamicForm,"handleMoved",_1,_2,_3,_4);this.itemsMoved()}
,isc.A.handleParentMoved=function isc_DynamicForm_handleParentMoved(_1,_2,_3,_4){this.invokeSuper(isc.DynamicForm,"handleParentMoved",_1,_2,_3,_4);this.itemsMoved()}
,isc.A.zIndexChanged=function isc_DynamicForm_zIndexChanged(_1,_2,_3,_4){this.invokeSuper(isc.DynamicForm,"zIndexChanged",_1,_2,_3,_4);this.itemsZIndexChanged()}
,isc.A.parentZIndexChanged=function isc_DynamicForm_parentZIndexChanged(_1,_2,_3,_4){this.invokeSuper(isc.DynamicForm,"parentZIndexChanged",_1,_2,_3,_4);this.itemsZIndexChanged()}
,isc.A.itemsMoved=function isc_DynamicForm_itemsMoved(_1){if(_1==null)_1=this.getItems();if(!_1)return;for(var i=0;i<_1.length;i++){if(_1[i].isVisible())_1[i].moved()}}
,isc.A.itemsVisibilityChanged=function isc_DynamicForm_itemsVisibilityChanged(){var _1=this.getItems();if(!_1)return;for(var i=0;i<_1.length;i++){if(_1[i].visibilityChanged)_1[i].visibilityChanged()}}
,isc.A.itemsZIndexChanged=function isc_DynamicForm_itemsZIndexChanged(){var _1=this.getItems();if(!_1)return;for(var i=0;i<_1.length;i++){_1[i].zIndexChanged()}}
,isc.A.scrollTo=function isc_DynamicForm_scrollTo(_1,_2,_3){var _4=this.getScrollLeft(),_5=this.getScrollTop();this.Super("scrollTo",arguments);if(_4!=this.getScrollLeft()||_5!=this.getScrollTop())this.itemsMoved()}
,isc.A.$1f=function isc_DynamicForm__canAnimateClip(){if(this.canAnimateClip!=null)return this.canAnimateClip;return true}
,isc.A.setTitleOrientation=function isc_DynamicForm_setTitleOrientation(_1){this.titleOrientation=_1;this.$10m=true;this.markForRedraw()}
,isc.A.setItemTitle=function isc_DynamicForm_setItemTitle(_1,_2){var _3=this.getItem(_1);if(_3)_3.setTitle(_2)}
,isc.A.setFieldTitle=function isc_DynamicForm_setFieldTitle(_1,_2){this.setItemTitle(_1,_2)}
,isc.A.setNumCols=function isc_DynamicForm_setNumCols(_1){this.numCols=_1;this.$10m=true;this.markForRedraw()}
,isc.A.setAutoComplete=function isc_DynamicForm_setAutoComplete(_1){this.autoComplete=_1;for(var i=0;i<this.items.length;i++){this.items[i].$10q()}}
,isc.A.setValues=function isc_DynamicForm_setValues(_1,_2,_3,_4){delete this.$76u;this.$2532=isc.EH.$253y;if(isc.isAn.Array(_1)){var _5=isc.isA.Object(_1[0]);this.logWarn("values specified as an array."+(_5?" Treating the first item in the array as intended values."
:" Ignoring specified values (resetting to defaults)."));if(_5)_1=_1[0];else _1=null}
if(_1==null){_1={}}else{var _6={};isc.DynamicForm.$91f(this,_1,_6);_1=_6}
this.$10r(_1);var _7=this.items;for(var i=0;i<_7.length;i++){if(_7[i].shouldSaveValue&&this.$425(_7[i])){_7[i].$426()}
}
this.$256u=true;this.$164c=true;this.setItemValues(_1,null,_2);if(!_2)delete this.$164c;delete this.$256u;if(!this.setValuesInRuleContext(_3,_4)){this.$2788=true}
if(!_3){this.rememberValues()}else{var _9=this.getRulesEngine();if(_9!=null){_9.processEditStart(this)}
}
if(_2)delete this.$164c;if(isc.isA.Function(this.valuesChanged))this.valuesChanged();this.markForRedraw("setValues")}
,isc.A.setValuesInRuleContext=function isc_DynamicForm_setValuesInRuleContext(_1,_2){_1=(_1==null?true:_1);if(this.ruleScope||this.isRuleScope){var _3=this.getDataSource(),_4=this.hasStableLocalID()||(this.editNode!=null),_5=this.getValues()
;if(_3&&isc.isA.DataSource(_3)&&this.$176k!=false){var _6=((_4&&(!_1||_2))||(this.$179d&&!_2&&(this.grid==null||!this.$164c)));var _7=this.$279k(),_8=_5;if(_7){_8=_7.getValues()}
this.provideRuleContext(_3.getID(),null,this,null,true);this.provideRuleContext(_3.getID(),isc.shallowClone(_8),this,null,_6)}
if(_4){this.provideRuleContext(this.getLocalId()+".values",null,this,null,true);this.provideRuleContext(this.getLocalId()+".values",isc.shallowClone(_5),this,null,true);this.provideRuleContext(this.getLocalId()+".hasChanges",false,this,null,!_1||_2)}else if(this.$179d&&!_2&&(this.grid==null||!this.$164c))
{this.fireRuleContextChanged(this)}
return true}
return false}
,isc.A.$425=function isc_DynamicForm__useDisplayFieldValue(_1){if(!_1||!_1.displayField)return false;if(_1.useLocalDisplayFieldValue!=null)return _1.useLocalDisplayFieldValue;if(_1.optionDataSource!=null)return false;if(_1.getValueFieldName()!=_1.getFieldName())return false;return true}
,isc.A.getDefaultOptionDataSource=function isc_DynamicForm_getDefaultOptionDataSource(_1){return this.dataSource}
,isc.A.setData=function isc_DynamicForm_setData(_1){this.setValues(_1)}
,isc.A.setDataSource=function isc_DynamicForm_setDataSource(_1,_2){if(_2!=null){var _3=this.getDataSource(),_4=isc.DataSource.get(_1);if(_4!=_3){for(var i=0;i<_2.length;i++){var _6=_2[i];if(isc.isA.FormItem(_6)){var _7=(_3&&_3.getField(_6.name)!=null),_8=(_4&&_4.getField(_6.name)!=null);if(_7||_8){this.logWarn("setDataSource(): fields argument contains already-created FormItem:"+_6+" which represents a dataSource field. This can lead to unexpected results if there are differences between the dsField attributes in the new dataSource vs the current dataSource.")}
}
}
}
}
this.Super("setDataSource",arguments);this.clearErrors()}
,isc.A.rememberValues=function isc_DynamicForm_rememberValues(){var _1=this.getValues();var _2={},_3=[];isc.DynamicForm.$91f(this,_1,_2,_3);this.$10s=_2;this.$10t=_3;this.updatePendingStyles();if(this.ruleScope||this.isRuleScope){var _4=this.getDataSource(),_5=this.hasStableLocalID()||(this.editNode!=null)
;if(_5){this.provideRuleContext(this.getLocalId()+".hasChanges",false,this,null,this.$164c)}
}
return this.$10s}
,isc.A.updatePendingStyles=function isc_DynamicForm_updatePendingStyles(){var _1=this.items;for(var i=0,_3=(_1==null?0:_1.length);i<_3;++i){var _4=_1[i];if(!isc.isA.FormItem(_4))continue;_4.updatePendingStatus(_4._value)}}
,isc.A.resetValues=function isc_DynamicForm_resetValues(){this.clearErrors();var _1={};isc.DynamicForm.$91f(this,this.$10s,_1);if(this.$91h!=null){for(var i=0;i<this.$91h.length;i++){isc.DynamicForm.$70m(this.$91h[i],_1,this)}
}
this.setValues(_1)}
,isc.A.clearValues=function isc_DynamicForm_clearValues(){var _1=false;if(this.ruleScope||this.isRuleScope){var _2=this.getDataSource(),_3=this.hasStableID()||(this.editNode!=null)
;_1=_3}
this.setValues(null,null,true,_1);var _4=this.getItems();for(var i=0;i<_4.length;i++){if(_4[i].shouldSaveValue==false)_4[i].setValue(null)}
this.clearErrors();this.rememberValues();this.markForRedraw("clearValues")}
,isc.A.valuesHaveChanged=function isc_DynamicForm_valuesHaveChanged(_1,_2,_3,_4){if(_2==null)_2=this.getValues();if(_3==null)_3=this.$10s||{};return isc.DynamicForm.valuesHaveChanged(this,_1,_2,_3,null,_4)}
,isc.A.valueHasChanged=function isc_DynamicForm_valueHasChanged(_1){var _2={},_3={},_4
;_2[_1]=this.getValue(_1)
_3[_1]=this.$10s?this.$10s[_1]:_4;return this.valuesHaveChanged(false,_2,_3)}
,isc.A.$2183=function isc_DynamicForm__getUpdatedFields(){var _1=[],_2=this.$2182;if(_2)for(var _3 in _2){var _4=_2[_3];if(_4)_1.add(_4)}
return _1}
,isc.A.$2184=function isc_DynamicForm__getUpdatedDSFields(){var _1=[],_2=this.$2182;if(!_2)return _1;var _3=this.getDataSource(),_4=_3.getFields(),_5=_3.dataPaths
;for(var _6 in _2){var _7=_2[_6];if(_7)continue;_7=_4[_6]||_5[_6];if(_7)_1.add(_7)}
return _1}
,isc.A.$2185=function isc_DynamicForm__filterWithUpdatedFields(_1){var _2={},_3=this.$2182;if(_3)for(var _4 in _3){var _5=_3[_4];if(!_5){var _6=_4.indexOf("/");if(_6>=0)_4=_4.substring(0,_6)}
if(_4 in _1)_2[_4]=_1[_4]}
return _2}
,isc.A.getOldValues=function isc_DynamicForm_getOldValues(){var _1={};isc.addProperties(_1,this.$10s);return _1}
,isc.A.getOldValue=function isc_DynamicForm_getOldValue(_1){return this.getOldValues()[_1]}
,isc.A.getChangedValues=function isc_DynamicForm_getChangedValues(_1){return this.valuesHaveChanged(true,null,null,_1)}
,isc.A.getValues=function isc_DynamicForm_getValues(_1){this.updateFocusItemValue(_1);return this.values}
,isc.A.updateFocusItemValue=function isc_DynamicForm_updateFocusItemValue(_1){if(!this.isDrawn()||this.$146y)return;if(_1!=null){if(this.$258e==_1){return}
}
this.$258e=_1;var _2=this.getFocusSubItem();if(!this.$10u){var _3=false;var _4=this.getItems(),_5=[];for(var i=0;i<_4.length;i++){if(isc.isA.PasswordItem(_4[i])){_3=true;break}else{if(_4[i]==_2&&_2.$10v()&&!_4[i].changeOnKeypress){_5[_5.length]=_4[i]}else if(_4[i].$17h()=="native"){_5[_5.length]=_4[i]}
}
}
if(_3)_5=_4;for(var i=0;i<_5.length;i++){var _7=_5[i];_7.updateValue()}
}}
,isc.A.getData=function isc_DynamicForm_getData(){return this.getValues()}
,isc.A.$163o=function isc_DynamicForm__hasAdvancedCriteria(_1){if(this.operator!="and"||this.allowExpressions)return true;if(!_1&&this.$76u!=null)return true;return this.getItems().callMethod("hasAdvancedCriteria").contains(true)}
,isc.A.getExtraAdvancedCriteria=function isc_DynamicForm_getExtraAdvancedCriteria(){return this.$76u?isc.clone(this.$76u):null}
,isc.A.getItemValuesAsCriteria=function isc_DynamicForm_getItemValuesAsCriteria(_1,_2,_3){if(_1==null){_1=this.$163o(true)}
var _4=this.$76v(_1,_2);if(_1){_4.removeEmpty()}else{if(_3)return _4;_4=isc.DataSource.filterCriteriaForFormValues(_4)}
return _4}
,isc.A.getValuesAsCriteria=function isc_DynamicForm_getValuesAsCriteria(_1,_2,_3){if(_1==null){_1=this.$163o()}
var _4=this.getItemValuesAsCriteria(_1,_2,_3)
if(!_1){return _4}
var _5={operator:this.operator,_constructor:"AdvancedCriteria",criteria:[]};var _6=this.getExtraAdvancedCriteria();if(_6&&_6.criteria){if(_6.operator==this.operator)_5=_6;else _5.criteria.add(_6)}
if(_4&&_4.length>0){_5.criteria.addList(_4)}
var _7=isc.DS.checkEmptyCriteria(_5);return _7}
,isc.A.$76v=function isc_DynamicForm__getMappedCriteriaValues(_1,_2){var _3=isc.addProperties({},this.getValues()),_4={},_5=[];var _6=this.getFields();for(var i=0;i<_6.length;i++){if(!_6[i].shouldSaveValue)continue;var _8=_6[i],_9=_6[i].getTrimmedDataPath()||_6[i].getFieldName(),_10=_6[i].getCriteriaFieldName();isc.Canvas.$70m(_9,_3);if(!_1){if(_10!=null){if(_3[_6[i].name])delete _3[_6[i].name];if(_6[i].displayField&&_6[i]._value==null&&_3[_6[i].displayField]==_6[i].emptyDisplayValue)
{delete _3[_6[i].displayField]}
var _11=_2==null||_2=="exact"||_2=="equals";_4[_10]=_6[i].getCriteriaValue(!_11)}
}else{var _12=_8.getCriterion(_2);if(_12!=null)_5.add(_12)}
}
if(!_1){return isc.addProperties(_3,_4)}else{for(var _13 in _3){if(_5.find("fieldName",_13))continue;if(_3[_13]==null)continue;_5.add({operator:isc.DataSource.getCriteriaOperator(_3[_13],_2),fieldName:_13,value:_3[_13]
})}
return _5}}
);isc.evalBoundary;isc.B.push(isc.A.removeFieldCriteria=function isc_DynamicForm_removeFieldCriteria(_1,_2,_3,_4){if(!_4||!_4.criteria)return false;var _5=_4.criteria;for(var i=_5.length-1;i>=0;i--){var _7=_5[i];if(_7.criteria){this.removeFieldCriteria(_1,_2,_3,_7);if(_7.criteria.length==0)_5.removeAt(i)}else{if(_7.fieldName==_1){if(_7.operator!=_2||_7.value!=_3){_5.removeAt(i)}
}
}
}}
,isc.A.removeExtraAdvancedCriteria=function isc_DynamicForm_removeExtraAdvancedCriteria(_1){var _2=isc.getKeys(_1),_3=this.items
;for(var i=0;i<_2.length;i++){var _5=_2[i],_6=_1[_5],_7=null,_8=null
;_3.map(function(_9){if(_5==_9.getCriteriaFieldName())_8=_9});if(_8){_7=_8.getOperator();this.removeFieldCriteria(_5,_7,_6,this.$76u)}
}}
,isc.A.removeExtraAdvancedCriteriaFields=function isc_DynamicForm_removeExtraAdvancedCriteriaFields(_1){for(var i=0;i<_1.length;i++){this.removeFieldCriteria(_1[i],null,null,this.$76u)}}
,isc.A.setValuesAsCriteria=function isc_DynamicForm_setValuesAsCriteria(_1,_2,_3,_4){var _5=this.getDataSource();this.$248x=true;if(!_2&&!isc.DataSource.isAdvancedCriteria(_1,_5)){this.$144w(_1,_3,_4);var _6=this.items||[];var _7=[];if(_3&&(!_4||_4.length==0)){delete this.$76u}else if(this.$76u){if(this.$125e){this.removeExtraAdvancedCriteria(_1);var _8=this.$76u;if(_3&&_4){this.removeExtraAdvancedCriteriaFields(_4)}
if(!_8||!_8.criteria||_8.criteria.length==0)_8=null}else{delete this.$76u}
}
for(var i=0;i<_6.length;i++){var _10=_6[i],_11=_10.getFieldName(),_12=false;if(isc.propertyDefined(_1,_11)&&_10.canEditSimpleCriterion(_11)){if(_1[_11]!=undefined){_10.setSimpleCriterion(_1[_11],_11);_12=true}
}else{for(var _13 in _1){if(_13!=_11&&_10.canEditSimpleCriterion(_13)){_10.setSimpleCriterion(_1[_13],_13);_12=true;break}
}
}
if(!_12){_7.add(_10)}
}
for(var i=0;i<_7.length;i++){if(!_7[i].shouldSaveValue){continue}
_7[i].clearValue()}
this.rememberValues()}else{var _14=this.values;this.$10r({});_1=isc.clone(_1);var _15=_1.operator;if(_15!=this.operator){this.logInfo("Dynamic Form editing advanced criteria object:"+isc.Comm.serialize(_1)+". Form level operator specified as '"+this.operator+"' - Criteria returned from this form will be nested in an outer "+this.operator+" clause.","AdvancedCriteria");delete _1._constructor;_1={_constructor:"AdvancedCriteria",operator:this.operator,criteria:[_1]
}
}
var _6=this.getItems(),_16=_1.criteria||[],_17={},_7={};for(var i=0;i<_6.length;i++){_7[_6[i].getID()]=true}
for(var i=0;i<_16.length;i++){for(var _18=0;_18<_6.length;_18++){if(!_6[_18].shouldSaveValue){_7[_6[_18].getID()]=false;continue}
var _10=_6[_18];if(this.shouldApplyCriterionToItem(_6[_18],_16[i])){var _19=_6[_18].getID();if(_17[_19]==null){_17[_19]=_16[i];_7[_19]=false}else{if(!_6[_18].canEditOpaqueValues){var _20=_17[_19];var _21=_5.combineCriteria(_20,_16[i],this.operator,null,true);_21=isc.DataSource.compressNestedCriteria(_21,null,true);if(!_10.canEditCriterion(_21)){this.logInfo("setValuesAsCriteria(): criteria include:"+this.echoFull(_20)+" and "+this.echoFull(_16[i])+". Both of these could be applied to item:"+_10+". However, the item is unable to edit a composite criterion resulting from combining these criteria. Therefore "+this.echoFull(_16[i])+" will not be applied to this item","AdvancedCriteria");continue}else{this.logDebug("setValuesAsCriteria(): Combined multiple criteria into composite criterion:"+this.echoFull(_21)+" and assigned to item:"+_10,"AdvancedCriteria");_17[_19]=_21;_7[_19]=false}
}else{continue}
}
_16[i]=null;break}
}
}
_16.removeEmpty();for(var _19 in _17){var _10=window[_19];var _22=_17[_19];if(_10.canEditOpaqueValues&&_22){isc.Canvas.$70n(null,_10,_22.value,_14,this,true,"criteria");_22.value=isc.Canvas.$70o(null,_10,_14,this,true,"edit")}
_10.setCriterion(_22)}
for(var _19 in _7){if(!_7[_19])continue;var _10=window[_19];if(_10)_10.clearValue()}
this.$76u=_1}
delete this.$248x}
,isc.A.$144w=function isc_DynamicForm__saveValuesAsCriteria(_1,_2,_3){if(_2){var _4;for(var _5 in this.values){if(_3&&!_3.contains(_5))continue;if(_1[_5]===_4&&this.values[_5]!==_4){this.clearValue(_5)}
}
}
for(var _5 in _1){var _6=this.getItem(_5);if(_6!=null){isc.Canvas.$70n(_5,_6,_1[_5],this.values,this,true,"criteria")}else{this.setValue(_5,_1[_5])}
}
this.$10r(this.values)}
,isc.A.shouldApplyCriterionToItem=function isc_DynamicForm_shouldApplyCriterionToItem(_1,_2){if(_1.canEditCriterion(_2))return true;if(_2.fieldName!=null&&_2.fieldName==_1.getCriteriaFieldName()){this.logInfo("Editing AdvancedCriteria in a dynamicForm. Criteria includes a value for field:"+_2.fieldName+". This form includes an item "+_1+" with the same fieldName but the specified operator '"+_2.operator+"' does not match the operator for this form item:"+_1.getOperator()+". Original criterion will be retained and combined with any criterion returned from this item.","AdvancedCriteria")}
return false}
,isc.A.getValuesAsAdvancedCriteria=function isc_DynamicForm_getValuesAsAdvancedCriteria(_1,_2){return this.getValuesAsCriteria(true,_1,_2)}
,isc.A.shouldUseMultiSelectForValueMaps=function isc_DynamicForm_shouldUseMultiSelectForValueMaps(){return(this.useMultiSelectForValueMaps&&this.isSearchForm)}
,isc.A.getItem=function isc_DynamicForm_getItem(_1,_2){if(_1==null)return null;if(isc.isA.FormItem(_1))return _1;var _3=isc.Class.getArrayItem(_1,this.items,"name");if(_3!=null)return _3;if(isc.isA.String(_1)){var _4=isc.DynamicForm.$840(_1,this);for(var i=0;i<this.items.length;i++){var _6=this.items[i].dataPath;_6=isc.DynamicForm.$840(_6,this);if(_6==_4)return this.items[i]}
}
if(!_2&&isc.isA.Number(_1-1)){return this.items[parseInt(_1)]}
return null}
,isc.A.getField=function isc_DynamicForm_getField(_1){return this.getItem(_1)}
,isc.A.getSubItem=function isc_DynamicForm_getSubItem(_1){return this.getItem(_1)}
,isc.A.getItemById=function isc_DynamicForm_getItemById(_1){var _2;if(isc.isA.String(_1)){_2=window[_1]}else _2=_1;if(isc.isA.FormItem(_2))return _2;return null}
,isc.A.getValue=function isc_DynamicForm_getValue(_1,_2){var _3=this.getItem(_1);if(_3){if(_3.shouldSaveValue==false){return _3.getValue()}
var _1=(_3.getTrimmedDataPath&&_3.getTrimmedDataPath())||_3.name}
return this.$70p(_1,_2)}
,isc.A.$70p=function isc_DynamicForm__getValue(_1,_2){return isc.DynamicForm.$70o(_1,null,this.values,this,true,_2)}
,isc.A.setValue=function isc_DynamicForm_setValue(_1,_2,_3){var _4=this.getItem(_1,_3);this.$2532=isc.EH.$253y;if(_4!=null){if(_4.destroyed)return;if(!this.storeAtomicValues&&!_4.canEditOpaqueValues){var _5=_4.type?isc.SimpleType.getType(_4.type):null;if(_5&&_5.getAtomicValue&&_5.updateAtomicValue){_1=_4.getTrimmedDataPath()||_4.name;this.$10w(_1,_2);_2=_5.getAtomicValue(_2)}
}
return _4.setValue(_2)}else if(this.values!=null){this.$10w(_1,_2);return _2}}
,isc.A.clearValue=function isc_DynamicForm_clearValue(_1){var _2=this.getItem(_1);if(_2!=null)_2.clearValue();else if(this.values)isc.DynamicForm.$70m(_1,this.values)}
,isc.A.showItem=function isc_DynamicForm_showItem(_1){var _2=this.getItem(_1);if(_2!=null)return _2.show()}
,isc.A.hideItem=function isc_DynamicForm_hideItem(_1){var _2=this.getItem(_1);if(_2!=null)return _2.hide()}
,isc.A.saveItemValue=function isc_DynamicForm_saveItemValue(_1,_2){if(_1.shouldSaveValue==false)return;var _3=_1.getDataPath()||_1.getFieldName();if(_3==null)return;if(_1.canEditOpaqueValues){var _4=isc.Canvas.$923(_1,this);this.$191q(_4,_2)}else{this.$924(_1,_2)}
this.itemDisplayValueModified(_1,_2);_1.$10x()}
,isc.A.itemDisplayValueModified=function isc_DynamicForm_itemDisplayValueModified(_1,_2){var _3=_1.getDataPath()||_1.getFieldName();if(!this.$425(_1)||(_1.displayField==_3))return;if(this.storeDisplayValues==false||_1.storeDisplayValues==false)return;var _4=_1.mapValueToDisplay(_2);var _5;if(_2===_5){_4=_5}
if(_4==_1.emptyDisplayValue)_4=null;var _6=this.$279k();if(_6){_6.setValue(_1.displayField,_4,true)}else{this.setValue(_1.displayField,_4,true)}}
,isc.A.$924=function isc_DynamicForm__saveAtomicValue(_1,_2){this.$10w(_1,_2,true)}
,isc.A.$191q=function isc_DynamicForm__saveOpaqueValue(_1,_2){this.$10w(_1,_2,false)}
,isc.A.$10w=function isc_DynamicForm__saveValue(_1,_2,_3){var _4,_5;_5=_4=_1;_1=this.getField(_4);var _6=_1;if(this.storeAtomicValues&&(!_1||!_1.canEditOpaqueValues)){if(isc.isAn.Object(_4)){_4=_1.getTrimmedDataPath()||_1.name;_1=null}
}else{if(!isc.isA.String(_4)){_4=null}else{if(_3){_1=this.getField(_4);if(_1==null){var _7=this.getDataSource();if(_7)_1=_7.getField(_4)||_7.getFieldForDataPath(_4)}
}else{_1=null}
}
}
isc.DynamicForm.$70n(_4,_1,_2,this.values,this,true,"updateValue");_1=_6;var _8=this.selectionComponent;if(!_8&&this.valuesManager!=null){if(isc.isA.ValuesManager(this.valuesManager)&&this.valuesManager.members&&this.valuesManager.members.contains(this))
{if(!isc.isA.String(_5)){_5=_5.dataPath||_5.name}
this.valuesManager.$10y(_5,_2,this)}
}
this.$253a(_1,_4,_2)}
,isc.A.clearItemValue=function isc_DynamicForm_clearItemValue(_1){var _2=isc.DynamicForm.$702(this.dataPath,_1.getDataPath()||_1.getFieldName());isc.DynamicForm.$70m(_2,this.values);this.$253a(_1,_2,null);if(!this.selectionComponent&&isc.isA.ValuesManager(this.valuesManager)&&this.valuesManager.members&&this.valuesManager.members.contains(this))
{this.valuesManager.$10z(_2,this)}}
,isc.A.$253a=function isc_DynamicForm__updateRuleScopeValues(_1,_2,_3,_4){if(this.$256u)return;if((this.grid==null||!this.$164c)&&(this.ruleScope||this.isRuleScope)&&(_2||(_1&&_1.name)))
{_2=_2||_1.name;var _5=this.getDataSource(),_6=this.hasStableLocalID()||this.grid||(this.editNode!=null)
;if(_5&&isc.isA.DataSource(_5)&&this.$176k!=false){this.provideRuleContext(_5.getID()+"."+_2,_3,this,null,_4||_6||this.$10u||(!_4&&this.$179d))}
if(_6){var _7=_1&&_1.$176l,_8=this.$172s||this.$164c||this.$10u||_7
;this.provideRuleContext(this.getLocalId()+".values."+_2,_3,this,null,true);if(!this.$164c){var _9=this.getLocalId()+".hasChanges";var _10=this.valuesHaveChanged(false,this.values);this.provideRuleContext(_9,_10,this,null,_4||_8)}
}else if(!_4&&this.$179d){this.fireRuleContextChanged(this)}
}}
,isc.A.$10r=function isc_DynamicForm__saveValues(_1){this.values=_1;if(!this.selectionComponent&&isc.isA.ValuesManager(this.valuesManager)&&this.valuesManager.members&&this.valuesManager.members.contains(this))
{var _2=isc.getKeys(this.values);for(var _3 in _1){this.valuesManager.$10y(_3,_1[_3],this);_2.remove(_3)}
for(var i=0;i<_2.length;i++){this.valuesManager.$10z(_2[i],this)}
}}
,isc.A.getSavedItemValue=function isc_DynamicForm_getSavedItemValue(_1){if(_1.shouldSaveValue==false)return null;var _2=isc.DynamicForm.$702(this.dataPath,_1.getDataPath()||_1.getFieldName());return this.$70p(_2)}
,isc.A.resetValue=function isc_DynamicForm_resetValue(_1){var _2=this.getItem(_1);return(_2?_2.resetValue():null)}
,isc.A.getValueMap=function isc_DynamicForm_getValueMap(_1){var _2=this.getItem(_1);return(_2?_2.getValueMap():null)}
,isc.A.setValueMap=function isc_DynamicForm_setValueMap(_1,_2){var _3=this.getItem(_1);return(_3?_3.setValueMap(_2):null)}
,isc.A.getOptions=function isc_DynamicForm_getOptions(_1){return this.getValueMap(_1)}
,isc.A.setOptions=function isc_DynamicForm_setOptions(_1,_2){return this.setValueMap(_1,_2)}
,isc.A.getForm=function isc_DynamicForm_getForm(_1){var _2=(_1==null?[this.getFormID()]:arguments);return this.Super("getForm",_2)}
,isc.A.getFormID=function isc_DynamicForm_getFormID(){return this.$qs(this.$9l)}
,isc.A.getSerializeableFields=function isc_DynamicForm_getSerializeableFields(_1,_2){_1=_1||[];_1.addList(["items"]);return this.Super("getSerializeableFields",[_1,_2],arguments)}
,isc.A.expandSection=function isc_DynamicForm_expandSection(_1){var _2=this.getItem(_1);if(isc.isA.SectionItem(_2))_2.expandSection()}
,isc.A.collapseSection=function isc_DynamicForm_collapseSection(_1){var _2=this.getItem(_1);if(isc.isA.SectionItem(_2))_2.collapseSection()}
,isc.A.$100=function isc_DynamicForm__sectionExpanding(_1){if(this.isDrawn()){this.$86o=this.notifyAncestorsOnReflow;this.notifyAncestorsOnReflow=true}
if(this.sectionVisibilityMode=="mutex"&&this.$6l&&this.$6l!=_1)
{this.$6l.collapseSection()}
this.$6l=_1}
,isc.A.$101=function isc_DynamicForm__sectionCollapsing(_1){if(this.isDrawn()){this.$86o=this.notifyAncestorsOnReflow;this.notifyAncestorsOnReflow=true}}
,isc.A.getErrors=function isc_DynamicForm_getErrors(){return this.errors}
,isc.A.getFieldErrors=function isc_DynamicForm_getFieldErrors(_1){if(!this.errors)return null;var _2;if(isc.isA.FormItem(_1)){var _3=_1;_1=_3.getFieldName();_2=this.buildFieldDataPath(this.getFullDataPath(),_3)
}
var _4=this.errors[_1];if(isc.isA.String(_4)||isc.isAn.Array(_4)){return _4}
if(_2!=null){if(isc.isA.String(_4)||isc.isAn.Array(_4))return _4}
return null}
,isc.A.getDataPathErrors=function isc_DynamicForm_getDataPathErrors(_1){var _2=_1.split("/");var _3=this.errors;for(var i=0;i<_2.length;i++){_3=_3[_2[i]];if(!_3)return null}
return _3}
,isc.A.setErrors=function isc_DynamicForm_setErrors(_1,_2){var _3=this.hasErrors();this.errors=isc.DynamicForm.formatValidationErrors(_1);var _4=false,_5={};this.$234h(_3);for(var _6 in this.errors){var _7=this.getItem(_6);if(!_7||!_7.visible){_5[_6]=this.errors[_6];_4=true}
if(_7&&_7.shouldShowErrorIconInline())_7.$79u=null}
if(_2)this.showErrors(this.errors,_5)}
,isc.A.setError=function isc_DynamicForm_setError(_1,_2){var _3=this.hasErrors(),_4=this.errors[_1];if(!_4){this.errors[_1]=_2}else{if(isc.isA.String(_4))this.errors[_1]=[_4,_2];else this.errors[_1].add(_2)}
this.$234h(_3)}
,isc.A.addFieldErrors=function isc_DynamicForm_addFieldErrors(_1,_2,_3){var _4=this.hasErrors();if(!this.errors)this.errors={};this.addValidationError(this.errors,_1,_2);this.$234h(_4);if(_3)this.showFieldErrors(_1)}
,isc.A.setFieldErrors=function isc_DynamicForm_setFieldErrors(_1,_2,_3){var _4=this.hasErrors();if(this.errors==null)this.errors={};if(isc.Canvas.compareValues(this.errors[_1],_2)){return false}
this.errors[_1]=_2;this.$234h(_4);if(_3)this.showFieldErrors(_1);return true}
,isc.A.clearFieldErrors=function isc_DynamicForm_clearFieldErrors(_1,_2,_3){if(this.errors==null)return;if(!this.errors[_1])return;delete this.errors[_1];this.$234h(true);if(_2){this.showFieldErrors(_1,_3)}}
,isc.A.clearFieldError=function isc_DynamicForm_clearFieldError(_1,_2,_3){if(this.errors==null||!this.errors[_1])return;var _4=this.errors[_1];if(!isc.isAn.Array(_4)){if(_4==_2){delete this.errors[_1]}
}else{if(_4.contains(_2)){_4.remove(_2)}
if(_4.length==0)delete this.errors[_1]}
this.$234h(true);if(_3)this.showFieldErrors(_1)}
,isc.A.clearErrors=function isc_DynamicForm_clearErrors(_1){this.setErrors({},_1)}
,isc.A.hasErrors=function isc_DynamicForm_hasErrors(){var _1=this.errors;if(!_1)return false;for(var _2 in _1){if(_1[_2]!=null)return true}
return false}
,isc.A.hasFieldErrors=function isc_DynamicForm_hasFieldErrors(_1){var _2=this.errors;return(_2&&_2[_1]!=null)}
,isc.A.draw=function isc_DynamicForm_draw(_1,_2,_3,_4){if(isc.$cv)arguments.$cw=this;if(!this.readyToDraw())return this;this.$174s();this.$256u=true;this.invokeSuper(isc.DynamicForm,this.$ny,_1,_2,_3,_4);this.$102();delete this.$256u;var _5=this.autoFocus,_6=(!_5?this.$9m:this.$9o);this.$10u=true;var _7=this.$256v;if(_7!=null){isc.Page.clearEvent(isc.EH.IDLE,_7)}
this.$256v=isc.Page.setEvent(isc.EH.IDLE,this,isc.Page.FIRE_ONCE,_6);if(this.position==isc.Canvas.RELATIVE){if(!isc.Page.isLoaded()){isc.Page.setEvent(isc.EH.LOAD,this,isc.Page.FIRE_ONCE,"$103")}else if(this.$2634)this.$103();delete this.$2634}
return this}
,isc.A.$164b=function isc_DynamicForm__createItemWhenRules(_1){var _2=[],_3=[],_4=this.getRuleScope()
;for(var i=0;i<_1.length;i++){if(_1[i].$164a){continue}
var _6=_1[i],_7=_2.length
;if(_4&&!_6.ruleScope)_6.ruleScope=_4;if((!_6.showIf&&_6.visibleWhen)||(!_6.requiredIf&&_6.requiredWhen)||_6.readOnlyWhen||(_6.formula&&!isc.isA.emptyObject(_6.formula))||(_6.textFormula&&!isc.isA.emptyObject(_6.textFormula)))
{var _8=(_6.name==null?[]:null);if(!_6.showIf&&_6.visibleWhen){if(_6.visibleWhen.fixedValue){_6.hide();continue}
if(isc.disableRuleScope){this.logWarn("Attempt to define FormItem visibleWhen criteria while RuleScope has been explicitly disabled (isc.disableRuleScope=true). Criteria will be ignored.")
continue}
if(_8){_8.add("visibleWhen")}else{var _9=this.$1636("visibility",_6.visibleWhen,{fieldName:_6.name},this);if(_9.applyWhen&&_9.applyWhen.fixedValue!=null){_9.negateShouldApply=true}
_2.add(_9)}
}
if(!_6.requiredIf&&_6.requiredWhen){if(_6.requiredWhen.fixedValue){_6.setRequired(_6.requiredWhen.fixedValue);continue}
if(isc.disableRuleScope){this.logWarn("Attempt to define FormItem requiredWhen criteria while RuleScope has been explicitly disabled (isc.disableRuleScope=true). Criteria will be ignored.")
continue}
if(_8){_8.add("requiredWhen")}else{_2.add(this.$1636("setRequired",_6.requiredWhen,{fieldName:_6.name},this))}
}
if(_6.readOnlyWhen){if(isc.disableRuleScope){this.logWarn("Attempt to define FormItem readOnlyWhen criteria while RuleScope has been explicitly disabled (isc.disableRuleScope=true). Criteria will be ignored.")
continue}
if(_8){_8.add("readOnlyWhen")}else{var _9=this.$1636("readOnly",_6.readOnlyWhen,{fieldName:_6.name},this);_9.fieldAppearance=_6.readOnlyDisplay||this.readOnlyDisplay;_2.add(_9)}
}
if(_6.formula||_6.textFormula){if(isc.disableRuleScope){this.logWarn("Attempt to define FormItem "+(_6.formula?"formula":"textFormula")+" while RuleScope has been explicitly disabled (isc.disableRuleScope=true). Formula will be ignored.")
continue}
if(_8){_8.add(_6.formula?"formula":"textFormula")}else{var _9=this.$176m(_6);_2.add(_9)}
}
if(_8){for(var j=0;j<_8.length;j++){this.logWarn("Form item with no name defined - '"+_8[j]+"' is ignored: "+this.echo(_6))}
}
}
if(_6.icons){var _11=_6.icons;for(var j=0;j<_11.length;j++){var _12=_11[j];if((!_12.showIf&&_12.visibleWhen)||_12.enableWhen){if(!_12.showIf&&_12.visibleWhen){if(_6.name==null){this.logWarn("Form item icon with no formItem.name defined - 'visibleWhen' is ignored: "+this.echo(_12))}else{_2.add(this.$1636("visibility",_12.visibleWhen,{fieldName:(_6.name||_6.ID),formIconName:j}))}
}
if(_12.enableWhen){if(_6.name==null){this.logWarn("Form item icon with no formItem.name defined - 'enableWhen' is ignored: "+this.echo(_12))}else{var _13={_constructor:"AdvancedCriteria",operator:"not",criteria:_12.enableWhen
};_2.add(this.$1636("enable",_13,{fieldName:(_6.name||_6.ID),formIconName:j}))}
}
}
}
}
if(_2.length!=_7){_3.add(_6)}
}
if(_2.length>0){var _14=this.getRulesEngine();if(!_14){return}
var _15=[];for(var i=_2.length-1;i>=0;i--){var _9=_2[i];if(_9.applyWhen&&_9.applyWhen.fixedValue!=null){delete _9.applyWhen;_15.add(_9);_2.removeAt(i)}
}
if(_15.length>0){_14.processRules(_15)}
for(var i=0;i<_2.length;i++){_14.addRule(_2[i])}
if(_2.length>0&&!_14.members.contains(this)){_14.addMember(this)}
_14.processContextRules(_2,this);for(var i=0;i<_3.length;i++){_3[i].$164a=true}
if(_2.length>0&&!this.hasStableLocalID()&&this.editNode==null){this.$179d=true}
}}
,isc.A.$1639=function isc_DynamicForm__removeItemWhenRules(){var _1=this.getRuleScopeComponent();if(_1&&this.items&&this.getRulesEngine()){var _2=this.items;for(var i=0;i<_2.length;i++){var _4=_2[i],_5=_4.getTrimmedDataPath()||_4.getFieldName()
;if(_4.requiredWhen)this.$1637("setRequired",{fieldName:_5});if(_4.visibleWhen)this.$1637("visibility",{fieldName:_5});if(_4.readOnlyWhen)this.$1637("readOnly",{fieldName:_5});if(_4.formula)this.$1637("formula",{fieldName:_5});if(_4.textFormula)this.$1637("textFormula",{fieldName:_5});if(_4.icons){var _6=_4.icons;for(var j=0;j<_6.length;j++){var _8=_6[j];if(_8.visibleWhen)this.$1637("visibility",{fieldName:_5,formIconName:j});if(_8.enableWhen)this.$1637("enable",{fieldName:_5,formIconName:j})}
}
delete _4.$164a}
delete this.$179d}}
,isc.A.$176m=function isc_DynamicForm__createFormulaRule(_1){var _2=_1.name,_3=(_1.formula?"formula":"textFormula"),_4=this.$1638(_3,{fieldName:_2}),_5={component:this,fieldName:_2},_6=_1.type||_1.defaultType,_7=(_3=="formula"
?(_6=='date'||_6=='time'?"populateExpression":"populate")
:"populateText"),_8=_1.formula||_1.textFormula
;var _9=isc.addProperties({name:_4,triggerEvent:"contextChanged",type:_7,internalRule:true,overwriteInvalidValue:true,autoPopulateClearedFlag:this.autoPopulateClearedFlag,formula:(isc.isA.String(_8)?_8:_8.text),targetRuleScope:this.getRuleScope(),allowEscapedKeys:true,logCategory:"formulaRules"
},_5);if(this.logIsDebugEnabled("formulaRules")){this.logDebug("Create formulaRule: "+_4+", formula '"+_8.text+"' to target "+this.echo(_5),"formulaRules")}
return _9}
,isc.A.$172p=function isc_DynamicForm__updateItemWhenRule(_1,_2){var _3=this.$172o[_2];if(!_3)return;var _4=this.getRulesEngine();if(!_4)return;var _5=_3.attribute;this.$1637(_5,{formItem:_1.name});if(_1[_2]&&(!_3.exclusiveProperty||!_1[_3.exclusiveProperty])){if(_2=="formula"||_2=="textFormula"){var _6=this.$176m(_1)}else{var _6=this.$1636(_5,_1[_2],{fieldName:_1.name},this)}
if(_3.additionalProperties){for(var _7 in _3.additionalProperties){_6[_7]=_1[_3.additionalProperties[_7]]}
}
_4.addRule(_6)}
_4.processContextChanged()}
,isc.A.$1633=function isc_DynamicForm__removeFromRuleScope(){if(this.ruleScope){var _1=this.getDataSource(),_2=this.hasStableLocalID()||this.grid||(this.editNode!=null)
;if(_1&&isc.isA.DataSource(_1)&&this.$176k!=false){this.provideRuleContext(_1.getID(),null,this,null,_2)}
if(_2)this.provideRuleContext(this.getLocalId(),null,this)}
this.Super("$1633",arguments)}
,isc.A.$us=function isc_DynamicForm__adjustOverflowForPageLoad(){if(isc.Browser.isSafari){var _1=this.getItems();if(this.isDrawn()&&_1){for(var i=0;i<_1.length;i++){_1[i].$104();if(this.isDirty())break}
}
}
return this.Super("$us",arguments)}
,isc.A.$9n=function isc_DynamicForm__delayedSetValues(){this.$164b(this.getItems());this.setItemValues(null,true);if(this.ruleScope||this.isRuleScope){if(this.$2788){this.setValuesInRuleContext();delete this.$2788}else{var _1=this.hasStableLocalID()||this.editNode!=null;if(_1){this.provideRuleContext(this.getLocalId()+".hasChanges",false,this)}
}
}
delete this.$10u;delete this.$256v;var _2=this.getRulesEngine();if(_2!=null)_2.processEditStart(this);if(this.$179d){this.fireRuleContextChanged(this)}}
,isc.A.$9p=function isc_DynamicForm__delayedSetValuesFocus(){this.$9n();this.delayCall("focus")}
,isc.A.redraw=function isc_DynamicForm_redraw(){var _1=this.$146y;this.$107();this.$146y=true;this.$256u=true;if(this.$11v!=null)delete this.$11v;this.Super("redraw",arguments);this.$108();delete this.$256u;if(!_1)this.$146y=false;this.setItemValues(null,true);var _2,_3,_4;if(isc.Browser.isMoz){_4=this.getClipHandle();if(_4){_2=_4.scrollLeft;_3=_4.scrollTop}
}
if(isc.Browser.isMoz){if(_2!=null&&_4.scrollLeft!=_2)
_4.scrollLeft=_2;if(_3!=null&&_4.scrollTop!=_3)
_4.scrollTop=_3}
this.itemsMoved();if(this.$86o!=null){this.notifyAncestorsOnReflow=this.$86o;this.$86o=null}}
,isc.A.$174s=function isc_DynamicForm__itemsDrawing(){var _1=this.items;for(var i=0;i<_1.length;i++){if(_1[i]){this.updateItemVisible(_1[i]);if(_1[i].visible)_1[i].drawing()}
}}
,isc.A.updateItemVisible=function isc_DynamicForm_updateItemVisible(_1){var _2=_1.visible;var _3=this.values;if(_1.showIf){isc.Func.replaceWithMethod(_1,this.$9r,this.$9s);var _4=_1.getValue();_2=(_1.showIf(_1,_4,this,_3)==true)}
if(_2&&this.isPrinting){if(_1.shouldPrint!=null){_2=_1.shouldPrint}else if(_2&&this.currentPrintProperties.omitControls){var _5=this.currentPrintProperties.omitControls;for(var i=0;i<_5.length;i++){var _7=_5[i];if(isc.isA[_7]&&isc.isA[_7](_1)){_2=false}
}
}
}
var _8=(_1.visible!=_2);if(_8){_1.visible=_2;_1.itemVisibilityChanged(_2)}}
,isc.A.$102=function isc_DynamicForm__itemsDrawn(){var _1=isc.RPCManager&&!isc.RPCManager.startQueue();this.$172s=true;var _2=this.items;for(var i=0;i<_2.length;i++){if(_2[i]){if(_2[i].visible)_2[i].drawn()}
}
delete this.$172s;if(_1)isc.RPCManager.sendQueue()}
,isc.A.$108=function isc_DynamicForm__itemsRedrawn(){var _1=this.items;for(var i=0;i<_1.length;i++){var _3=_1[i];if(!_3)continue;if(_3.visible){_3.isDrawn()?_3.redrawn():_3.drawn(true)}else if(_3.isDrawn()){_3.cleared(true)}
}
this.destroyOrphanedItems("Delayed destroy of removed items on form redraw")}
,isc.A.$11a=function isc_DynamicForm__itemsCleared(){var _1=this.items;if(_1){for(var i=0;i<_1.length;i++){if(_1[i].isDrawn&&_1[i].isDrawn())_1[i].cleared()}
}
this.destroyOrphanedItems("Delayed destroy of removed items on clear")}
,isc.A.destroyOrphanedItems=function isc_DynamicForm_destroyOrphanedItems(_1){if(this.$89t!=null){this.$89t.callMethod("destroy",[_1]);delete this.$89t}}
,isc.A.$107=function isc_DynamicForm__itemsRedrawing(){var _1=this.items;for(var i=0;i<_1.length;i++){var _3=_1[i];if(!_3)continue;var _4=_1[i].isDrawn();this.updateItemVisible(_1[i]);var _5=_3.visible;if(_5&&_4)_3.redrawing();else if(_5&&!_4)_3.drawing(true);else if(!_5&&_4)_3.clearing(true)}}
,isc.A.modifyContent=function isc_DynamicForm_modifyContent(){this.$103()}
,isc.A.$103=function isc_DynamicForm__placeCanvasItems(){return this.$11c("placeCanvas",true)}
,isc.A.$11c=function isc_DynamicForm__notifyCanvasItems(_1,_2){if(!isc.CanvasItem)return;for(var i=0;i<this.items.length;i++){var _4=this.items[i];if(_4&&isc.isA.CanvasItem(_4)&&(!_2||_4.isVisible(true))){_4[_1]()}
}}
,isc.A.redrawFormItem=function isc_DynamicForm_redrawFormItem(_1,_2){var _3=this.getItems();if(!_1)return;while(_1.parentItem)_1=_1.parentItem;if(!_3.contains(_1))return;this.$10m=true;this.markForRedraw(_1.ID+": "+(_2?_2:"redrawFormItem"))}
);isc.evalBoundary;isc.B.push(isc.A.getElementValues=function isc_DynamicForm_getElementValues(){var _1={};for(var i=0;i<this.items.length;i++){var _3=this.items[i],_4=_3.getDataElement()?_3.getDataElement().value:"[no element]";_1[_3.name]=_4}
return _1}
,isc.A.setItemValues=function isc_DynamicForm_setItemValues(_1,_2,_3,_4,_5){var _6=isc.RPCManager?!isc.RPCManager.startQueue():false;var _7=(_1==null);if(_7)_1=this.getValues();if(_1==null)_1={};var _8;if(_3){_8=this.$76u?this.$76u.criteria:null}
_4=_4||this.items;var _9,_10=this.getDataSource(),_11=_1!=null&&!isc.isAn.emptyObject(_1),_12={}
;var _13=this.$256u;this.$256u=true;for(var _14=0;_14<_4.length;_14++){var _15=_4[_14];if(!_15||_15.destroyed||_15.destroying){continue}
if(_15.$1949){if(!this.$146y)delete _15.$1949;continue}
var _16=_15.getFieldName(),_17=_15.getTrimmedDataPath(),_18=_15.isSetToDefaultValue(),_19=_9;if(_11){if(_17){_19=isc.DynamicForm.$70o(_17,(_15.canEditOpaqueValues||(this.storeAtomicValues&&!_15.canEditOpaqueValues)?null:_15),_1,this,true,"edit")}else if(_16){_19=isc.DynamicForm.$70o(_16,(_15.canEditOpaqueValues||(this.storeAtomicValues&&!_15.canEditOpaqueValues)?null:_15),_1,this,true,"edit")}
}
if(_2&&isc.CanvasItem&&isc.isA.CanvasItem(_15)&&!_15.$11d())
{continue}
var _9,_20=((!_16&&!_17)||_19===_9);var _21=null;if(_3&&_20&&_15.value!=null){_21=_15.value;if(_21!=_15._value)_18=false}
var _22=null;if(_20&&_8!=null){for(var i=0;i<_8.length;i++){if(_15.canEditCriterion(_8[i])){_20=false;if(_22==null){_22=_8[i]}else{var _24=_10.combineCriteria(_22,_8[i],this.operator,null,true);if(!_15.canEditCriterion(_24)){this.logInfo("setItemValues(): current values include multiple extra criteria that could be applied to form item:"+_15+". Criteria include:"+this.echoFull(_22)+" and "+this.echoFull(_8[i])+". However, the item is unable to edit a composite criterion resulting from combining these criteria. Therefore "+this.echoFull(_8[i])+" will not be applied to this item","AdvancedCriteria");continue}else{this.logInfo("setItemValues(): Combined multiple 'extra' criteria into composite criterion:"+this.echoFull(_24)+" and assigned to item:"+_15,"AdvancedCriteria");_22=_24}
}
_8.removeAt(i);if(_8.length==0){delete this.$76u}else{i--}
}
}
}
if(_15.shouldSaveValue==false){if(!_20){this.logInfo("DynamicForm.setValues() passed a value for '"+_15.name+"'. The corresponding form item was declared with 'shouldSaveValue' set to  false to exclude its value from the form's values object. Setting 'shouldSaveValue' to true for this item.\n[To avoid seeing this message in the future, set 'shouldSaveValue' to true for any form items whose values are to be managed via  form.setValues() / form.getValues().]")
_15.shouldSaveValue=true}else{var _25=(_18?null:_15._value);if(_21!=null)_25=_21;_15.setValue(_25,(_18?false:_2));if(_15.name)_12[_15.name]=_25;continue}
}
if(_21!=null){_20=false;_19=_21}
if((_20||(_22==null&&_7&&_18))&&!_5)
{var _9;if(!_3){if(!_15.valueHasChanged()||_15._value!=_19){_15.clearValue();if(_15.name&&!_18)_12[_15.name]=_9;else if(_15.name)_12[_15.name]=_15._value}else{_15.saveValue(_19,_18);if(_15.name)_12[_15.name]=_19}
}else if(_3&&_18&&_15._value!==_9){_15.saveValue(_15._value,true);if(_15.name)_12[_15.name]=_15._value}
}else{if(_22!=null){_15.setCriterion(_22)}else if(!_5||!_20){_15.setValue(_19,true);if(_15.name)_12[_15.name]=_19}
}
}
this.$256u=_13;if(!this.$256u&&!isc.isAn.emptyObject(_12)&&this.grid==null){for(var _16 in _12){var _26=this.getField(_16),_27=_12[_16]
;if(_26){this.$253a(_26,_16,_27,true)}
}
this.$2576()}
if(_6)isc.RPCManager.sendQueue()}
,isc.A.$11e=function isc_DynamicForm__absPos(){return this.itemLayout==this.$9q}
,isc.A.setColWidths=function isc_DynamicForm_setColWidths(_1){if(_1==null)return;if(isc.isA.String(_1)){var _2=_1.split(/[, ]+/);if(_2==null||_2.length==0){this.logWarn("ignoring invalid colWidths string: "+_1);if(_1==this.colWidths)this.colWidths=null;return}
_1=_2}else if(isc.isAn.Array(_1)&&_1.length==1&&isc.isA.String(_1[0]))
{var _2=_1[0].split(/[, ]+/);if(_2!=null||_2.length>1){_1=_2}
}
this.colWidths=_1;if(this.isDrawn())this.markForRedraw()}
,isc.A.getInnerHTML=function isc_DynamicForm_getInnerHTML(_1){if(this.autoDupMethods)this.duplicateMethod("getInnerHTML");var _2=this.values,_3=this.items
;var _4=false;for(var _5=0;_5<_3.length;_5++){var _6=_3[_5],_7=_6.isDrawn(),_8=_6.visible;if(_8!=_7){if(!_6.alwaysTakeSpace)_4=true}
}
if(_4||this.$10m)isc.Canvas.invalidateTableResizePolicy(_3);this.$10m=false;this.setRequiredIf();if(this.flattenItems){var _9=null;for(var _5=0;_5<_3.length;_5++){var _6=_3[_5];if(_6.visible||_6.alwaysTakeSpace)_9++;if(_6.showTitle&&_6.titleOrientation!="top")
_9++;_6.$58l=_6.colSpan||null;_6.colSpan=null}
if(_9){this.numCols=_9;this.$10m=true;this.markForRedraw()}
}
var _10=isc.StringBuffer.create();if(this.writeFormTag&&!this.isPrinting)_10.append(this.getFormTagStartHTML());if(this.$11e()){_10.append(this.getAbsPosHTML());_10.append(this.$9t);return _10.release(false)}
_10.append(this.getTableStartHTML());if(this.titleWidth==this.$pa&&!this.colWidths){this.colWidths=[];for(var i=0;i<this.numCols;i++)this.colWidths[i]=this.$pa}
var _12;if(this.colWidths){_12=this.colWidths;if(_12.length>this.numCols){if(!this.$76z){this.logWarn("colWidths Array longer than numCols, using only first "+this.numCols+" column widths")}
_12=_12.slice(0,this.numCols)}else if(_12.length<this.numCols){if(!this.$76z){this.logWarn("colWidths Array shorter than numCols, remaining columns get '*' size")}
_12=_12.duplicate();for(var i=_12.length;i<this.numCols;i++)_12[i]=isc.star}
}else{_12=[];var _13=this.getInnerContentWidth();_13-=(this.cellBorder!=null?this.cellBorder:0);var _14=Math.floor(this.numCols/2),_15=_13-(_14*this.titleWidth),_16;if(this.isPrinting){_16="*"}else{_16=Math.floor(_15/(this.numCols-_14));_16=Math.max(this.minColWidth,_16)}
for(var i=0;i<_14;i++){_12.add(this.titleWidth);_12.add(_16)}
if((this.numCols%2)!=0)_12.add(_16);if(this.logIsInfoEnabled(this.$9u)){this.logInfo("totalWidth: "+_13+", generated colWidths: "+_12,this.$9u)}
}
var _17=this.getInnerContentWidth(),_18=this.getInnerContentHeight();if(this.cellSpacing!=0){if(isc.Browser.isMoz)_18-=2*this.cellSpacing;else if(isc.Browser.isSafari)_18-=this.cellSpacing}
_3.$8q=this.defaultRowHeight;isc.Canvas.applyTableResizePolicy(_3,_17,_18,this.numCols,_12);var _19=false;if(isc.CanvasItem){for(var i=0;i<_3.length;i++){var _6=_3[i];if(_6.visible&&isc.isA.CanvasItem(_6)&&_6.checkCanvasOverflow()){if(!_19&&this.logIsInfoEnabled(this.$9u)){this.logInfo("CanvasItem: "+_6+" overflowed, rerunning policy",this.$9u)}
_19=true}
}
}
if(_19){isc.Canvas.applyTableResizePolicy(_3,_17,_18,this.numCols,_12,null,true)}
if(!this.isPrinting){_12=_3.$8r}
for(var _20=0;_20<_12.length;_20++){var _21=_12[_20];if(_21=="*"){_10.append("<COL>")}else{_10.append(this.$9v,_21,this.$oa)}
}
if(this.isPrinting){_10.append("<tr>")}else{_10.append(this.$9w)}
var _22=isc.DynamicForm.$817();for(var _20=0;_20<_12.length;_20++){if(!isc.isA.Number(_12[_20])){_10.append(_22.join(isc.emptyString),this.$9y)}else{var _17=_12[_20];_17-=(this.cellSpacing!=null?(2*this.cellSpacing):0);if(isc.Browser.isIE8Strict){_17-=this.cellPadding!=null?(2*this.cellPadding):0}
_22[3]=(isc.FormItem?isc.FormItem.getPrototype().baseStyle:null);var _23=isc.Browser.isIE?1:0,_24=_22.join(isc.emptyString);_10.append(_24,this.fixedColWidths?isc.Canvas.spacerHTML(_17,_23):null,this.$9y)}
}
_10.append(this.$5t);if(this.autoSendTarget&&this.target)_10.append(this.$11f());var _25=_3.length,_26=false;var _27=this;var _28=function completeInnerHTMLFun(_32){if(_32!=null){var _29=_10.getArray();_29.push.apply(_29,_32)}
if(_25>0)_10.append(_27.$5t);if(_27.writeFormTag&&!_27.isPrinting)_10.append(_27.$90);else _10.append(_27.$127r);var _30=_10.release(false);if(_26){_27.fireCallback(_1,"HTML",[_30]);return false}else{return _30}
};if(_25>0){var _31=[],_32=new Array(_25),_33=0;var _34=function itemCompletedFun(){if(++_33==_25){return _28(_32)}
};var _35;for(var _5=0;_5<_25;++_5){var _6=_3[_5],_36=isc.SB.create(),_8,_37,_38,_39,_40,_41;if(!_6){_35=_34();continue}
_8=_6.visible;_6.$10x();if(this.logIsDebugEnabled())this.logDebug("Drawing FormItem: "+_6);if(!_6.alwaysTakeSpace&&!_8){_35=_34();continue}
if((_6.rowSpan==0||_6.colSpan==0)&&_5<_25-1){_31.add(_6);_35=_34();continue}
_37=_6.getFieldName();_38=_6.getErrors();_39=_6.getValue();_40=this.getTitleOrientation(_6);if(isc.is.emptyString(_38))_38=null;if(_6.$8l||_5==0){if(_5!=0){_36.append(this.$5t)}
if(_6.$8n&&_6.$8n.length>0){for(var i=0;i<_6.$8n.length;i++){_36.append(this.$5s);var _42=this.numCols;for(var _43=0;_43<_6.$8n[i];_43++){_36.append(this.$5u,"&nbsp;",this.$5v)}
_36.append(this.$5t)}
}
_36.append(this.$5s);if(_6.$8o>0){for(var i=0;i<_6.$8o;i++)_36.append(this.$5u,this.$5v)}
}
if(_40==isc.Canvas.LEFT){_36.append(this.getTitleCellHTML(_6,_38))}
_36.append(this.getCellStartHTML(_6,_38));if(_8&&_40==isc.Canvas.TOP){if(this.shouldClipTitle(_6)){_36.append(this.getTitleCellInnerHTML(_6,_38,true))}else{_36.append(this.getTitleSpanHTML(_6,_38),this.$9z)}
}
_41=(_8&&_38&&this.showInlineErrors);if(_41&&_6.getErrorOrientation()==isc.Canvas.TOP){_36.append(this.getItemErrorHTML(_6,_38))}
var _44=(function(_5,_6,_36,_8,_37,_38,_39,_40,_41){var _45=function func(_30){_36.append(_30);if(_41&&_6.getErrorOrientation()==isc.Canvas.BOTTOM){_36.append(_27.getItemErrorHTML(_6,_38))}
_36.append(_27.getCellEndHTML(_6,_38));if(_40==isc.Canvas.RIGHT){_36.append(_27.getTitleCellHTML(_6,_38))}
_32[_5]=_36.release(false);return _34()};return function(_49){if(_49!=null){var _46=_36.getArray();_46.push.apply(_46,_49)}
if(_8){if(_27.isPrinting){var _47=_6.getPrintHTML(_27.currentPrintProperties,_45);if(_47==null){return false}else{return _45(_47)}
}else{return _45(_6.getInnerHTML(_39,true,_27.showInlineErrors))}
}else return _45(isc.Canvas.spacerHTML(_6.width,_6.height))}})(_5,_6,_36,_8,_37,_38,_39,_40,_41);var _48=_31.length;if(_48>0){var _49=new Array(_48);var _50=(function(_44,_48,_49){var _51=0;return function(){if(++_51==_48){return _44(_49)}
}})(_44,_48,_49);for(var m=0;m<_48;++m){var _53=_31[m];if(!_53.visible){_50();continue}
var _54=(function(_49,_50,m){return function(_30){_49[m]=_30;return _50()}})(_49,_50,m);if(this.isPrinting){var _47=_53.getPrintHTML(_27.currentPrintProperties,_54);if(_47==null){_26=true}else{_35=_54(_47)}
}else{_35=_54(_53.getInnerHTML(_53.getValue()))}
}
_31.length=0}else{_35=_44()}
if(_35===false)_26=true}
if(_26){return false}else{return _35}
}else{return _28()}}
,isc.A.getPrintChildren=function isc_DynamicForm_getPrintChildren(){return null}
,isc.A.getCanvasItemCanvii=function isc_DynamicForm_getCanvasItemCanvii(){var _1=this.items||[],_2=[];for(var i=0;i<_1.length;i++){if(_1[i].isA("CanvasItem")&&isc.isA.Canvas(_1[i].canvas)){_2.add(_1[i].canvas)}
}
return _2}
,isc.A.createErrorItem=function isc_DynamicForm_createErrorItem(){var _1=isc.addProperties({cellStyle:this.errorItemCellStyle},this.errorItemDefaults,this.errorItemProperties);if(isc.screenReader)_1.canFocus=true;this.addItems([_1],0);this.$52o=this.getItem(0)}
,isc.A.getErrorsHTML=function isc_DynamicForm_getErrorsHTML(_1){if(!_1||isc.isAn.emptyObject(_1))return isc.emptyString;var _2=isc.SB.create(),_3=" : ";_2.append(this.errorsPreamble,"<ul>");for(var _4 in _1){var _5=this.getItem(_4),_6;if(_5!=null){_6=_5.getErrorMessage(_1[_4]);_2.append("<li>",_5.getTitle(),_3,_6,"</li>")}else{_6=_1[_4];if(isc.isAn.Array(_6)){_6="<ul><li>"+_6.join("</li><li>")+"</li></ul>"}
_2.append("<li>",_4,_3,_6,"</li>")}
}
_2.append("</ul>");return _2.release()}
,isc.A.getItemErrorHTML=function isc_DynamicForm_getItemErrorHTML(_1,_2){return _1.getErrorHTML(_2)}
,isc.A.$11f=function isc_DynamicForm__getAutoSendTargetHTML(){this.$91[1]=this.autoSendTargetFieldName;this.$91[3]=this.target;return this.$91.join(isc.emptyString)}
,isc.A.getCellStartHTML=function isc_DynamicForm_getCellStartHTML(_1,_2){var _3=_1.getColSpan(),_4=_1.$135a!=null?_1.$135a:_1.getRowSpan();if(_3==0)_3=1;if(_4==0)_4=1;if(_3=="*"){var _5=(_1.$8m?_1.$8m[0]:0);_3=(this.numCols-_5)}
var _6=_1.getCellStyle();var _7=this.fixedRowHeights||_1.shouldFixRowHeight();var _8=_1.$8t?_1.$8t[1]:null;if(isc.isA.Number(_8)&&this.cellSpacing!=0)_8-=2*this.cellSpacing;if(isc.Browser.isStrict&&isc.isA.Number(_8)&&this.cellPadding!=0){_8-=2*this.cellPadding}
return this.$11g((_1.align?_1.align:((this.form?this.form.isRTL():this.isRTL())?isc.Canvas.RIGHT:isc.Canvas.LEFT)),_1.getVAlign(),_6,_4,_3,null,(_7?_8:null),null,_1.cssText,(this.form?this.form.getID():this.getID()),_1.getItemID(),_1.getFormCellID(),_1.$187i()
)}
,isc.A.$11g=function isc_DynamicForm__getCellStartHTML(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13){var _14=isc.StringBuffer.create(),_15=isc.$ad;_14.append("<TD ALIGN=",_1,(_2==null?_15:" VALIGN="+_2),(_3!=null?" CLASS='"+_3+"'":_15)," STYLE='",(_9!=null?_9:_15),"'",(_4>1?" ROWSPAN="+_4:_15),(_5>1?" COLSPAN="+_5:_15),(_6!=null?" WIDTH="+_6:_15),(_7!=null?" HEIGHT="+_7:_15),(_8!=null?_8:_15)
);if(_12){_14.append(" ID=",_12," ")}
if(_11&&_10){_14.append(isc.DynamicForm.$89,"='",_11,"'")}
_14.append(_13?"><NOBR>":">");return _14.release(false)}
,isc.A.getCellEndHTML=function isc_DynamicForm_getCellEndHTML(_1,_2){return this.$11h()}
,isc.A.$11h=function isc_DynamicForm__getCellEndHTML(_1){return _1?"</NOBR></TD>":"</TD>"}
,isc.A.getTitleOrientation=function isc_DynamicForm_getTitleOrientation(_1){if(_1&&!_1.shouldShowTitle())return null;if(this.linearMode)return this.titleOrientation||isc.Canvas.TOP;return(_1?_1.titleOrientation:null)||this.titleOrientation||isc.Canvas.LEFT}
,isc.A.getTitleAlign=function isc_DynamicForm_getTitleAlign(_1){var _2=this.form||this;return(_1.titleAlign?_1.titleAlign:this.titleAlign?this.titleAlign:this.getTitleOrientation(_1)=="top"?this.isRTL()?isc.Canvas.RIGHT:isc.Canvas.LEFT:this.isRTL()?isc.Canvas.LEFT:isc.Canvas.RIGHT)}
,isc.A.getTitleVAlign=function isc_DynamicForm_getTitleVAlign(_1){var _2=(_1.titleVAlign?_1.titleVAlign:this.titleVAlign?this.titleVAlign:isc.Canvas.CENTER);return(_2==isc.Canvas.CENTER?isc.Canvas.MIDDLE:_2)}
,isc.A.$243j=function isc_DynamicForm__measureWrappedTitleHeight(_1,_2,_3,_4){var _5=this.$243i[_2];if(_5==null)_5=this.$243i[_2]={};var _6=_5[_1];if(_6==null){_6=_5[_1]=[]}
var _7;if(_3==null)_7="null";else _7=_3+"";if(_6[_7]!=null)return _6[_7];var _8={};if(_3){_8["width"]=_3}
var _9=isc.Canvas.measureContent(_1,_2,true,true,_8);_6[_7]=_9;return _9}
,isc.A.getTitleHeight=function isc_DynamicForm_getTitleHeight(_1){var _2=this.form||this;var _3=(_1.titleHeight!=null?_1.titleHeight:this.titleHeight);var _4=_1.getTitleStyle();if(_4){var _5=_1.getTitle();var _6={};if(this.getTitleOrientation(_1)=="top"){_6.width=_1.getMaxTitleSpace()}
if(_1.wrapTitle==false||(_1.wrapTitle==null&&this.wrapItemTitles==false)){_5="M"}
var _7=isc.Canvas.measureContent(_5,_4,true,true,_6);_3=Math.max(_3,_7)}
return _3}
,isc.A.getTitleSpanHTML=function isc_DynamicForm_getTitleSpanHTML(_1,_2){var _3=isc.StringBuffer.create();_3.append("<SPAN ",this.$11i(_1)," style='display:inline-block;",_1.wrapTitle?"":(_1.wrapTitle==false||this.wrapItemTitles==false
?"white-space:nowrap;":""),"'"," CLASS='",_1.getTitleStyle(),"' ALIGN=",this.getTitleAlign(_1),">");_3.append(this.getTitleHTML(_1,_2));_3.append("</SPAN>");return _3.release(false)}
,isc.A.shouldClipTitle=function isc_DynamicForm_shouldClipTitle(_1){if(!_1||!_1.form==this)return false;return(_1.clipTitle!=null?_1.clipTitle:!!this.clipItemTitles)}
,isc.A.getTitleCellHTML=function isc_DynamicForm_getTitleCellHTML(_1,_2){var _3=isc.StringBuffer.create(),_4=_1.getTitleCellStyle(),_5=this.getTitleAlign(_1),_6=this.getTitleVAlign(_1);if(_1.showTitle==false)return"";var _7=this.$99;_7[1]=this.$11i(_1);_7[3]=_4;_7[5]=_5;_7[7]=_6;var _8=_1.$135a;if(_8==null)_8=_1.getRowSpan();if(_8>1)_7[9]=" ROWSPAN="+_8;else _7[9]=null;if(_1.getTitleColSpan()>1)_7[10]=" COLSPAN="+_1.getTitleColSpan();else _7[10]=null;_3.append(_7.join(isc.emptyString));_3.append(this.getTitleCellInnerHTML(_1,_2,true));_3.append(this.$98);return _3.release(false)}
,isc.A.getTitleCellInnerHTML=function isc_DynamicForm_getTitleCellInnerHTML(_1,_2,_3){var _4=isc.StringBuffer.create(),_5=_1.getTitleStyle(),_6=this.getTitleAlign(_1),_7=this.getTitleOrientation(_1),_8=_1.$8u||null,_9=_1.$8t?_1.$8t[1]:null,_10=this.shouldClipTitle(_1),_11=(_1.wrapTitle!=null?_1.wrapTitle:(this.wrapItemTitles!=null?this.wrapItemTitles:!_10));if(_9){if(this.cellSpacing)_9-=2*this.cellSpacing;var _12,_13;if(_5){_12=isc.Element.$tt(_5,true);_13=isc.Element.$tu(_5,true)}
if(_12==null)_12=this.cellPadding||0;if(_13==null)_13=this.cellPadding||0;_9-=(_12+_13)
if(_5)_9-=isc.Element.$ym(_5)}
if(_8){if(this.cellSpacing)_8-=2*this.cellSpacing;var _14,_15;if(_5){_14=isc.Element.$tr(_5,true);_15=isc.Element.$ts(_5,true)}
if(_14==null)_14=this.cellPadding||0;if(_15==null)_15=this.cellPadding||0;_8-=(_14+_15)
_8-=isc.Element.$yn(_5)}
var _16=isc.Browser.isMoz?this.$94:this.$92,_17=isc.Browser.isMoz?this.$11j:this.$93;if(_10){if(this.$10a==null){this.$10a=["<DIV style='overflow:hidden;display:flex;","white-space:nowrap;",,"' ",isc.DynamicForm.$9a,"='",isc.DynamicForm.$9g,"' ",isc.DynamicForm.$89,"='",,,(_3?"' class='"+_5:null)
,"'>"
];if(this.emitOuterTextOverflow){this.$10a[0]+=isc.Browser.$114w+":ellipsis;"}
}else{if(_3){this.$10a[11]="' class='"+_5}else{this.$10a[11]=null}
}
var _18=this.$10a;if(_8!=null)_18[2]=_17+_8+"px;";else _18[2]=null;_18[10]=_1.getID();_4.append(_18.join(isc.emptyString))}else if(!_11){_4.append(this.$95)}
_4.append(this.getTitleHTML(_1,_2,_10));if(_10){_4.append(this.$97)}
return _4.release(false)}
,isc.A.$11i=function isc_DynamicForm__containsItemTitleAttrHTML(_1){if(!isc.DynamicForm.$11k){isc.DynamicForm.$11l=[" ",isc.DynamicForm.$89,"='",null,"' ",isc.DynamicForm.$9a,"='",isc.DynamicForm.$9g,"' ","ID='",,"'"
]}
isc.DynamicForm.$11l[3]=_1.getItemID();isc.DynamicForm.$11l[10]=this.$427(_1);return isc.DynamicForm.$11l.join(isc.emptyString)}
,isc.A.$427=function isc_DynamicForm__getTitleCellID(_1){return this.$qs(_1.getID()+this.$63z)}
,isc.A.getTitleCell=function isc_DynamicForm_getTitleCell(_1){if(!this.isDrawn())return null;_1=this.getItem(_1);if(!_1)return null;return isc.Element.get(this.$427(_1))}
,isc.A.updateTitleCellState=function isc_DynamicForm_updateTitleCellState(_1){var _2=this.getTitleCell(_1);if(_2==null)return;_1=this.getItem(_1);_2.className=_1.getTitleCellStyle();_2.innerHTML=this.getTitleCellInnerHTML(_1,_1.getErrors())}
,isc.A.$1140=function isc_DynamicForm__getTitleClipperID(_1){return this.$qs(_1.getID()+this.$114x)}
,isc.A.$1141=function isc_DynamicForm__getTitleClipper(_1){if(!this.isDrawn())return null;_1=this.getItem(_1);if(!_1)return null;return isc.Element.get(this.$1140(_1))}
,isc.A.titleClipped=function isc_DynamicForm_titleClipped(_1){var _2=this.$1141(_1);return(_2!=null&&isc.Element.getClientWidth(_2)<_2.scrollWidth)}
,isc.A.getTitleHTML=function isc_DynamicForm_getTitleHTML(_1,_2,_3){var _4=isc.StringBuffer.create();var _5=_1.visible?_1.getTitleHTML():null;if(_5){var _6=this.isRequired(_1,true),_7=this.getTitleOrientation(_1),_8=(_7==isc.Canvas.LEFT||_7==isc.Canvas.TOP);if(_3){var _9=this.$114z;var _10,_11;if(_6&&this.hiliteRequiredFields){_10=_8?((_1.requiredTitlePrefix!=null)?_1.requiredTitlePrefix:this.requiredTitlePrefix)
:((_1.requiredRightTitlePrefix!=null)?_1.requiredRightTitlePrefix:this.requiredRightTitlePrefix);_11=_8?((_1.requiredTitleSuffix!=null)?_1.requiredTitleSuffix:this.requiredTitleSuffix)
:((_1.requiredRightTitleSuffix!=null)?_1.requiredRightTitleSuffix:this.requiredRightTitleSuffix)}else{_10=_8?((_1.titlePrefix!=null)?_1.titlePrefix:this.titlePrefix)
:((_1.rightTitlePrefix!=null)?_1.rightTitlePrefix:this.rightTitlePrefix);_11=_8?((_1.titleSuffix!=null)?_1.titleSuffix:this.titleSuffix)
:((_1.rightTitleSuffix!=null)?_1.rightTitleSuffix:this.rightTitleSuffix)}
var _12=this.$207z(_10,_11);_9[1]=_12[0];_9[2]=_11;_9[4]=this.$1140(_1);_9[10]=_10;_9[11]=_5;_9[12]=_12[1];_4.append.apply(_4,_9)}else{_4.append((_6&&this.hiliteRequiredFields?(_8?((_1.requiredTitlePrefix!=null)?_1.requiredTitlePrefix:this.requiredTitlePrefix)
:((_1.requiredRightTitlePrefix!=null)?_1.requiredRightTitlePrefix:this.requiredRightTitlePrefix)):(_8?((_1.titlePrefix!=null)?_1.titlePrefix:this.titlePrefix)
:((_1.rightTitlePrefix!=null)?_1.rightTitlePrefix:this.rightTitlePrefix)))
,_5
,(_6&&this.hiliteRequiredFields?(_8?((_1.requiredTitleSuffix!=null)?_1.requiredTitleSuffix:this.requiredTitleSuffix)
:((_1.requiredRightTitleSuffix!=null)?_1.requiredRightTitleSuffix:this.requiredRightTitleSuffix)):(_8?((_1.titleSuffix!=null)?_1.titleSuffix:this.titleSuffix)
:((_1.rightTitleSuffix!=null)?_1.rightTitleSuffix:this.rightTitleSuffix)))
)}
}else{_4.append("&nbsp;")}
return _4.release(false)}
,isc.A.$207z=function isc_DynamicForm__resolveUnequalHTMLTags(_1,_2){if(isc.DynamicForm.$2070!=null){var _3=isc.DynamicForm.$2070.find("prefix",_1);if(_3&&_3.suffix==_2){return _3.unequalTags}
}
var _4=new RegExp("<\\w.*?>","g"),_5=_2.match(_4),_6=new RegExp("</.*?>","g"),_7=_2.match(_6),_8={},_9=[];if(_7){for(var i=0;i<_7.length;i++){var _11=_7[i],_12=_11.match("\\w+")[0];var _13=false;if(_5){for(var _14=0;_14<_5.length;_14++){var _15=_5[_14];if(_15==null)continue;if(_15.substring(1,(_12.length+1)).toLowerCase()==_12.toLowerCase()){_13=true;_5[_14]=null}
}
}
if(!_13){_8[_12.toLowerCase()]=true;_9.add(_11)}
}
}
var _16=[];for(var _12 in _8){var _17=_1.toLowerCase().lastIndexOf("</"+_12),_18=_17>0?_1.substring(_17):_1;var _4=new RegExp("<"+_12+".*?>","gi");var _19=_18.match(_4);if(_19!=null){_16.addList(_19)}else{_9[i]=null}
}
_9.removeEmpty();var _20;if(_9.length==0||(_9.length!=_16.length))
{_20=[null,null]
}else{_20=[_16.join(""),_9.join("")]}
if(isc.DynamicForm.$2070==null){isc.DynamicForm.$2070=[]}
isc.DynamicForm.$2070.add({prefix:_1,suffix:_2,unequalTags:_20
});return _20}
,isc.A.getFormTagStartHTML=function isc_DynamicForm_getFormTagStartHTML(){var _1=this.$10c,_2=this.getFormID(),_3=this.getID();_1[3]=_2;if(this.$11e())_1[4]=this.$10e;else _1[4]=null;_1[6]=this.method;_1[8]=this.action;if(this.isMultipart())_1[10]=isc.DynamicForm.MULTIPART_ENCODING;else _1[10]=isc.DynamicForm.NORMAL_ENCODING;if(this.target!=null){_1[11]=this.$10f;_1[12]=this.target;_1[13]=this.$ob}else{_1[11]=null;_1[12]=null;_1[13]=null}
_1[15]=_3;_1[17]=_3;return _1.join(isc.emptyString)}
,isc.A.$174w=function isc_DynamicForm__writeWidthAttribute(){return this.writeWidthAttribute}
,isc.A.getTableStartHTML=function isc_DynamicForm_getTableStartHTML(){var _1=isc.isA.DynamicForm(this),_2=_1?this.$10g
:isc.DynamicForm.getPrototype().$10g;_2[1]=this.$11n();if(this.isPrinting){_2[2]=_1?this.$119i:isc.DynamicForm.getPrototype().$119i;_2[3]="100%"}else if(!!this.$174w()){_2[2]=_1?this.$119i:isc.DynamicForm.getPrototype().$119i;_2[3]=(this.getInnerContentWidth!=null
?this.getInnerContentWidth()
:this.getInnerWidth())}else{_2[3]=_2[2]=null}
_2[5]=this.cellSpacing;_2[7]=this.cellPadding;_2[9]=this.cellBorder;return _2.join(isc.emptyString)}
,isc.A.$11n=function isc_DynamicForm__getTableElementID(){return this.$qs(this.$10h)}
,isc.A.$11o=function isc_DynamicForm__getTableElement(){return isc.Element.get(this.$11n())}
,isc.A.layoutChildren=function isc_DynamicForm_layoutChildren(_1,_2,_3,_4){this.invokeSuper(isc.DynamicForm,"layoutChildren",_1,_2,_3,_4);var _5=this.getItems();if(!_5)return;for(var i=0;i<_5.length;i++){var _7=_5[i].width,_8=_5[i].height;if((isc.isA.String(_7)&&(_7.contains("%")||_7.contains("*")))||(isc.isA.String(_8)&&(_8.contains("%")||_8.contains("*"))))
{this.markForRedraw("size change with dynamic size children");break}
}}
,isc.A.getAbsPosHTML=function isc_DynamicForm_getAbsPosHTML(){var _1=isc.SB.create();for(var _2=0,_3=this.items.length;_2<_3;_2++){var _4=this.items[_2];if(!_4)continue;_4.$10x();if(!_4.visible)continue;var _5=!_4.$712(),_6=this.showInlineErrors
;_1.append(_4.getStandaloneItemHTML(_4.getValue(),_5,_6))}
return _1.release(false)}
,isc.A.getScrollWidth=function isc_DynamicForm_getScrollWidth(_1){if(this.$qz){this.$qz=null;this.adjustOverflow("widthCheckWhileDeferred")}
if(!_1&&this.$su!=null)return this.$su;var _2;if(!isc.Browser.isIE||!this.$11e()||!(this.isDrawn()||this.handleDrawn())||this.items==null)
{_2=isc.Canvas.$b4.getScrollWidth.call(this,_1)}else{_2=0;for(var i=0;i<this.items.length;i++){var _4=this.items[i];if(_4.visible==false||!_4.isDrawn())continue;var _5=_4.getAbsDiv();if(_5){var _6=_5.scrollWidth+_4.$11p(_4.left);if(_6>_2)_2=_6}
}
}
this.$su=_2;return _2}
,isc.A.getScrollHeight=function isc_DynamicForm_getScrollHeight(_1){if(this.$qz){this.$qz=null;this.adjustOverflow("heightCheckWhileDeferred")}
if(!_1&&this.$sz!=null)return this.$sz;var _2;if(!isc.Browser.isIE||!this.$11e()||!(this.isDrawn()||this.handleDrawn())||this.items==null)
{_2=isc.Canvas.$b4.getScrollHeight.call(this,_1)}else{_2=0;for(var i=0;i<this.items.length;i++){var _4=this.items[i];if(_4.visible==false||!_4.isDrawn())continue;var _5=_4.getAbsDiv();if(_5){var _6=_5.scrollHeight+_4.$11p(_4.top,true);if(_6>_2)_2=_6}
}
}
this.$sz=_2;return _2}
,isc.A.$11q=function isc_DynamicForm__formWillSubmit(){return this.canSubmit||this.isMultipart()||(this.action!=isc.DynamicForm.getPrototype().action)}
);isc.evalBoundary;isc.B.push(isc.A.submitForm=function isc_DynamicForm_submitForm(){if(!this.$11q()){this.logWarn("Attempt to perform direct submission on DynamicForm where this.canSubmit is false. Please set this property to true, or use the standard databinding interfaces to send data to the server.")}
if(this.getFileItemForm()!=null){this.logWarn("Performing a direct submission on a DynamicForm containing a FileItem. Note: This item's value will not be submitted to the server.  FileItems are intended for use with databound forms backed by the SmartClient server only.  If you are not using the SmartClient Databinding subsystem, use an UploadItem rather than a FileItem to submit a file as part of a raw HTTP request. Otherwise use saveData() rather than a direct call to submitForm() to save the full set of values for the form.")}
var _1=this.getItems()||[],_2=[];for(var i=0;i<_1.length;i++){if(isc.isA.UploadItem(_1[i])){_2.add(_1[i])}
}
if(this.checkFileAccessOnSubmit&&_2.length>0){this.$2449(_2)}else{this.submitNativeForm()}}
,isc.A.$2449=function isc_DynamicForm__verifyFileAccessAndSubmit(_1){this.$246i=true;var _2=_1.pop(),_3=this;_2.checkFileAccess(function verifyFileAccessCallback(_4){if(_3.$246j){delete _3.$246j;return}
if(_4===false){_3.handleFileAccessError(_2)}else{if(_1.length>0)_3.$2449(_1);else{delete _3.$246i;_3.submitNativeForm()}
}
}
)}
,isc.A.submitNativeForm=function isc_DynamicForm_submitNativeForm(){var _1=this.getForm();if(!_1){this.logWarn("Unable to access native form for submission. Verify that this form has been drawn and has not been cleared.");this.$245a();return}
if(_1.action!=this.action)_1.action=this.action;try{return _1.submit()}catch(e){this.logWarn("Form submission was unsuccessful. In some browsers this can occur when an upload item is present and has an invalid value.\n"+e.message);this.formSubmitFailed()}}
,isc.A.performImplicitSave=function isc_DynamicForm_performImplicitSave(_1,_2){this.implicitSaveInProgress=true;if(_1){if(_1.$887){_1.parentItem.updateValue()}
if(_1.$da!=null)isc.Timer.clear(_1.$da)}
if(this.awaitingImplicitSave)delete this.awaitingImplicitSave;this.logInfo("performImplicitSave called "+(!_2?"by editorExit()":"after implicitSaveDelay ("+this.implicitSaveDelay+"ms)")+" for item "+_1.name+".");var _3=this;if(this.valuesManager){this.valuesManager.saveData(function(_4,_5){_3.$888(_5)},{showPrompt:false})}else{this.saveData(function(_4,_5){_3.$888(_5)},{showPrompt:false})}}
,isc.A.$95x=function isc_DynamicForm__addItemToImplicitSaveUpdateArray(_1){var _2=this.valuesManager?this.valuesManager:this;if(!_2.itemsToUpdateState)_2.itemsToUpdateState=[];_1.awaitingImplicitSave=true;_2.itemsToUpdateState.add(_1);_1.updateState()}
,isc.A.$888=function isc_DynamicForm__implicitSaveCallback(_1){delete this.implicitSaveInProgress;var _2=this.valuesManager?this.valuesManager:this;if(_2.itemsToUpdateState){for(var i=0;i<_2.itemsToUpdateState.length;i++){var _4=_2.itemsToUpdateState[i];delete _4.awaitingImplicitSave;_4.wasAwaitingImplicitSave=true;_4.updateState()}
delete _2.itemsToUpdateState}
this.implicitSaveCallback(_1)}
,isc.A.implicitSaveCallback=function isc_DynamicForm_implicitSaveCallback(_1){}
,isc.A.handleFileAccessError=function isc_DynamicForm_handleFileAccessError(_1){if(_1!=null){_1.clearValue();isc.warn(this.fileAccessFailedWarning.evalDynamicString(this,{form:this,item:_1}))}
this.$245a()}
,isc.A.formSubmitFailed=function isc_DynamicForm_formSubmitFailed(){isc.warn(this.formSubmitFailedWarning);this.$245a()}
,isc.A.$245a=function isc_DynamicForm__cleanUpFailedRPCTransaction(){var _1=this.getValues()._transaction;if(_1!=null&&isc.RPCManager&&isc.XMLTools){var _2=isc.XMLTools.parseXML(this.getValues()._transaction),_3;if(_2)_3=isc.XMLTools.selectNumber(_2,"//transactionNum");if(_3!=null){isc.RPCManager.doClearPrompt(_3);isc.RPCManager.clearTransaction(_3)}
var _4=this.getItem("_transaction");if(_4&&isc.isA.HiddenItem(_4)){this.clearValue("_transaction")}
}}
,isc.A.setAction=function isc_DynamicForm_setAction(_1,_2){this.action=_1;var _3=this.getForm();if(_3)_3.action=_1;this.$66g=!_2}
,isc.A.setTarget=function isc_DynamicForm_setTarget(_1){this.target=_1;var _2=this.getForm();if(_2)_2.target=_1}
,isc.A.setMethod=function isc_DynamicForm_setMethod(_1){this.method=_1;var _2=this.getForm();if(_2)_2.method=_1}
,isc.A.getFileItemForm=function isc_DynamicForm_getFileItemForm(){if(!isc.FileItem)return null;var _1=this.getItems()||[];var _2=false,_3=null;for(var i=0;i<_1.length;i++){if(isc.isA.FileItem(_1[i])){if(_2){this.$1839=true;this.logWarn("This DynamicForm contains more than one item of type FileItem. This is not supported - a DynamicForm can only support a single FileItem.");continue}
var _5=_1[i].canvas;if(isc.isA.DynamicForm(_5)){_2=true;_3=_5;if(this.$1839)break}
}
}
return _3}
,isc.A.$114v=function isc_DynamicForm__propagateOperationsToFileItem(){var _1=this.getFileItemForm();if(_1!=null){_1.fetchOperation=this.fetchOperation;_1.updateOperation=this.updateOperation;_1.addOperation=this.addOperation;_1.removeOperation=this.removeOperation}}
,isc.A.$10d=function isc_DynamicForm__handleNativeSubmit(){return false}
,isc.A.validate=function isc_DynamicForm_validate(_1,_2,_3,_4,_5,_6,_7){if(this.disableValidation)return true;if(this.dataSource&&this.dataSource.useLocalValidators!=null&&this.useLocalValidators==false)return true;var _8=this.hasErrors(),_9=false,_10=this.getForm(),_11=false
;var _12={},_13={},_14=this.getValues(),_15=this.$181h(true,_14),_16=(_1&&!_2&&this.dataSource)
?isc.addProperties({},this.getDataSource().getFields())
:null
;var _17={unknownErrorMessage:this.unknownErrorMessage,serverValidationMode:"full"};if(_3)
_17.typeValidationsOnly=_3;if(_5)
_17.skipServerValidation=_5;else
_17.deferServerValidation=true;var _18=isc.rpc?isc.rpc.startQueue():false;var _19=[];for(var _20=0;_20<this.items.length;_20++){var _21=false,_22=this.items[_20],_23=_22.getFieldName(),_24=_22.getTrimmedDataPath()||_22.getFieldName(),_25=_22.getValue(),_26=!_22.visible||isc.isA.HiddenItem(_22)
;if(_26&&!_1)continue;if(!_23&&!_24){if(_22.validators!=null){this.logWarn("Item with index "+_20+" has no name or dataPath - can't validate.");continue}
}
if(_22.validators!=null){if(!isc.isAn.Array(_22.validators)){_22.validators=[_22.validators]}
var _27=this.validateField(_22,_22.validators,_25,_15,_17);if(_27!=null){if(_27.needsServerValidation){_19.add(_22)}
if(_27.errors!=null){_21=this.addValidationError(_12,_23||_24,_27.errors);if(_21)_9=true}
if(_27.resultingValue!=null&&this.compareValues(_25,_27.resultingValue,_22))
{_25=_27.resultingValue;if(_24){isc.DynamicForm.$70n(_24,_22,_25,_14,this,true,"validate")}else if(_23){_14[_23]=_25}
_11=true}
}
}
if(_26&&_21)_13[_23||_24]=_12[_23||_24];if(_16)delete _16[_23]}
var _28=this.getRulesEngine();if(_28!=null){var _29=_28.applyFieldValidators(_12,this);if(_29)_9=true}
var _30=false;if(_16){_17.dontValidateNullValue=true;delete _17.typeValidationsOnly;_17.validatingDsFields=true;for(var i in _16){var _32=_16[i],_33=i,_34=_32.validators
;if(_34!=null){var _25=_14[_33];var _27=this.validateField(_32,_34,_25,_14,_17);if(_27!=null&&_27.errors!=null){this.addValidationError(_12,_33,_27.errors)}
if(!_4&&_27&&_27.stopOnError){var _22=this.getItem(_33);if(_22){_22.setBlockingErrors(_27.errors!=null);_30=true}
}
}
if(_12[_33]!=null)_13[_33]=_12[_33]}
}
if(_19.length>0){this.validateFieldsOnServer(_19,_15,_17,_7)}
if(!_18&&isc.rpc)isc.rpc.sendQueue();if(_9)this.logInfo("Validation errors: "+isc.Log.echoAll(_12));if(_4)return(_9?_12:true);this.setErrors(_12);if(_11){this.setItemValues(_14,null,null,null,true);for(var _35 in _14){if(this.getItem(_35)==null)this.$10w(_35,_14[_35])}
}
if(!_6&&(_9||_8)){this.showErrors(_12,_13,_30)}
return!_9}
,isc.A.$181h=function isc_DynamicForm__getRecordForValidation(_1,_2){var _3=this.valuesManager;if(_3!=null){var _4=_1?_3.getValues():isc.addProperties({},_3.values);if(this.dataPath!=null){_4=isc.DynamicForm.$70o(this.dataPath,null,_4,this,true)}
return _4}
var _5;if(_2!==_5)return _2;return isc.addProperties({},_1?this.getValues():this.values)}
,isc.A.valuesAreValid=function isc_DynamicForm_valuesAreValid(_1,_2){var _3=this.validate(_1,null,null,true,true);if(_3===true){return(_2?null:true)}else{return(_2?_3:false)}}
,isc.A.checkForValidationErrors=function isc_DynamicForm_checkForValidationErrors(_1,_2,_3){var _4=this.validate(_2,null,null,true,true);if(_4===true)_4=null;var _5=this.getDataSource();if(_4||_3||!_5){if(_1!=null)this.fireCallback(_1,"errorMap",[_4]);return _4}
if(!_1){this.logWarn("checkForValidationErrors(): no callback has been provided, but not skipping server-side validation - this is invalid usage");return}
var _6=this.getValues(),_7=this.buildRequest(null,"validate");_7.editor=this;var _8=this;_5.validateData(_6,function(_9,_10){var _4=_9.status==isc.RPCResponse.STATUS_VALIDATION_ERROR&&_9.errors?_9.errors:null;if(_4&&!_8.reportRawServerErrors){_4=isc.DynamicForm.getSimpleErrors(_4)}
this.fireCallback(_1,"errorMap",[_4])},_7)}
,isc.A.getValidatedValues=function isc_DynamicForm_getValidatedValues(){if(!this.validate())return null;return this.getValues()}
,isc.A.showErrors=function isc_DynamicForm_showErrors(_1,_2,_3){var _4=(!_3&&!this.autoFocusOnError)||this.$116a;if(this.$116a)delete this.$116a;var _5=this.getFocusItem();if(_5&&_5.$2102&&_5.hasFocus)_4=true;var _6;if(_2===_6)_2=this.getHiddenErrors();if(_1===_6)_1=this.getErrors();if(_1&&!this.showInlineErrors&&(!this.$52o||this.$52o.destroyed||!this.items.contains(this.$52o)))
{this.createErrorItem()}
this.markForRedraw("Validation Errors Changed");if(_1&&!isc.isAn.emptyObject(_1)&&!_4){for(var _7 in _1){var _8=this.getItem(_7);if(_8&&_8.isVisible()&&_8.isDrawn()){this.$11b(_8);break}
}
}
if(!this.showInlineErrors){this.delayCall("scrollIntoView",[0,0],100)}
if(_2){this.$21z(_2)}}
,isc.A.getHiddenErrors=function isc_DynamicForm_getHiddenErrors(){if(!this.errors)return null;var _1=false,_2={};for(var _3 in this.errors){var _4=this.getItem(_3);if(!_4||!_4.visible){_1=true;_2[_3]=this.errors[_3]}
}
return(_1?_2:null)}
,isc.A.showFieldErrors=function isc_DynamicForm_showFieldErrors(_1,_2){var _3;if(_2)this.$116a=true;return this.showErrors()}
,isc.A.$21z=function isc_DynamicForm__handleHiddenValidationErrors(_1){if(_1==null||isc.isAn.emptyObject(_1))return;var _2;if(this.handleHiddenValidationErrors){_2=this.handleHiddenValidationErrors(_1)}
if(_2==false)return;var _3="Validation errors occurred for the following fields with no visible form items:";for(var _4 in _1){var _5=_1[_4];if(!isc.isAn.Array(_5))_5=[_5];if(_5.length==0)continue;_3+="\n"+_4+":";for(var i=0;i<_5.length;i++){_3+=(i==0?"- ":"\n - ")+_5[i]}
}
this.logWarn(_3,"validation")}
,isc.A.isRequired=function isc_DynamicForm_isRequired(_1,_2){return((_2?true:isc.DynamicForm.canEditField(_1,this))&&(_1.required||_1.$11m||this.isXMLRequired(_1))
)}
,isc.A.setRequiredIf=function isc_DynamicForm_setRequiredIf(){var _1=this.getValues();for(var _2=0;_2<this.items.length;_2++){var _3=this.items[_2],_4=_3.validators
;delete _3.$11m;if(!_3.visible||!_4||_4.length==0)continue;for(var v=0;v<_4.length;v++){var _6=_4[v];if(!_6)continue;var _7=isc.Validator.getValidatorType(_6);if(_7==this.$10i){var _8=_3.getValue();if(_6.expression!=null&&!isc.isA.Function(_6.expression)){isc.Func.replaceWithMethod(_6,"expression","item,validator,value,record")}
_3.$11m=_6.expression.apply(this,[_3,_6,_8,_1])}else if(_7==this.$842){_3.$11m=true}
}
}}
,isc.A.$170m=function isc_DynamicForm__restoreFocusForClickMaskHide(){this.setFocus(true,true)}
,isc.A.setFocusItem=function isc_DynamicForm_setFocusItem(_1,_2){_1=this.getItem(_1);this.$10n=_1;this.$189e=_2;if(this.hasStableLocalID()){var _3=this.getLocalId()+".focusField",_4=_1&&this.isFocused()?_1.name:null,_5=this.$1671(_3)
;if(_4!=_5)this.provideRuleContext(_3,_4,this)}}
,isc.A.isFocused=function isc_DynamicForm_isFocused(){if(this.Super("isFocused",arguments)==true)return true;var _1=this.getFocusItem();if(_1&&isc.isA.CanvasItem(_1)&&_1.isFocused()){return true}
return false}
,isc.A.getFocusItem=function isc_DynamicForm_getFocusItem(){var _1=this.getFocusSubItem();if(_1!=null){while(_1.parentItem!=null){_1=_1.parentItem}
}
return _1}
,isc.A.getFocusSubItem=function isc_DynamicForm_getFocusSubItem(){return this.$10n}
,isc.A.getFocusItemIcon=function isc_DynamicForm_getFocusItemIcon(){return this.$189e}
,isc.A.$vl=function isc_DynamicForm__readyToSetFocus(){return!this.isDisabled()&&!window.isc_suppressFocus}
,isc.A.focusOnMouseDown=function isc_DynamicForm_focusOnMouseDown(){return}
,isc.A.setFocus=function isc_DynamicForm_setFocus(_1,_2){if(!this.$vl())return;var _3=this.isVisible();if(_1){var _4=this.getFocusSubItem();if(_4==null){var _5=this.getItems();if(_5!=null){for(var i=0;i<_5.length;i++){var _7=_5[i];if(_7.$kk()&&_7.isDrawn()&&_7.isVisible()&&!_7.isDisabled())
{_4=_7;break}
}
}
}
var _8=(_2&&_4?this.getFocusItemIcon():null);var _9=isc.EH.lastEvent;if(_4!=null){return this.focusInItem(_4,_8)}
}
this.Super("setFocus",arguments);if(!_1){this.$11r(this.getFocusSubItem())}}
,isc.A.getFocusedTabIndexEntry=function isc_DynamicForm_getFocusedTabIndexEntry(){var _1=this.getFocusSubItem();if(_1==null){return this.Super("getFocusedTabIndexEntry",arguments)}else{return _1.$184c()}}
,isc.A.syntheticShiftFocus=function isc_DynamicForm_syntheticShiftFocus(_1){return false}
,isc.A.$11u=function isc_DynamicForm__canFocusInItem(_1,_2){if(isc.isA.String(_1))_1=this.getItem(_1);return _1&&_1.$kk()&&_1.isDrawn()&&_1.isVisible()&&!_1.isDisabled()
&&(!_2||_1.tabIndex!=-1)}
,isc.A.focusInItem=function isc_DynamicForm_focusInItem(_1,_2){if(_1!=null){var _3=this.getItem(_1)}else{var _3=this.getFocusSubItem()}
if(!_3){if(_1!=null)this.logWarn("couldn't find focus item: "+_1);return}
if(_3.$kk()){if(!_2)_3.focusInItem();if(_2&&_3.focusInIcon)_3.focusInIcon(_2);if(this.$10u){var _4=this;isc.Page.setEvent("idle",function(){if(!_4.destroyed)_4.focusInItem()},isc.Page.FIRE_ONCE)}
}else{this.logWarn("focusInItem: item cannot accept focus: "+_3)}}
,isc.A.clearFocusItem=function isc_DynamicForm_clearFocusItem(){delete this.$10n;delete this.$189e;if(this.hasStableLocalID())this.provideRuleContext(this.getLocalId()+".focusField",null,this)}
,isc.A.blurFocusItem=function isc_DynamicForm_blurFocusItem(_1){var _2=this.getFocusSubItem();if(_2!=null){this.$11r(_2);this.clearFocusItem();if(_1&&isc.FormItem.$92t==_2){isc.FormItem.$92t.checkForEditorExit(true,true)}
}}
,isc.A.$11r=function isc_DynamicForm__blurItem(_1){if(_1!=null&&_1.hasFocus)_1.blurItem()}
,isc.A.$106=function isc_DynamicForm__blurFocusItemWithoutHandler(){var _1=this.getFocusSubItem();if(_1!=null&&_1.hasFocus){this.$2142(_1);this.$11r(_1)}else{this.logDebug("blur w/o handler: no item to blur")}}
,isc.A.$11b=function isc_DynamicForm__focusInItemWithoutHandler(_1){if(!_1||!this.$11u(_1)){var _2;if(_1&&_1.parentItem){this.$11b(_1.parentItem);_2=true}
this.logInfo("$11b("+_1+"): not calling focus as item not focusable or item already has focus"+(_2?". Putting focus into containerItem instead.":""),"nativeFocus")
return}
var _3=_1.hasFocus;if(isc.Browser.isIE&&!isc.EH.synchronousFocusNotifications){var _4=isc.DynamicForm._getItemInfoFromElement(document.activeElement);_3=(_4&&_4.item==_1)}
if(_3)return;this.$65n(_1);this.focusInItem(_1)}
,isc.A.$65n=function isc_DynamicForm__suppressFocusHandlerForItem(_1){if(this.$11w==null)this.$11w=0;else this.$11w+=1;this.$11x=_1}
,isc.A.$2142=function isc_DynamicForm__suppressBlurHandlerForItem(_1){if(this.$11v==null)this.$11v=0;else this.$11v+=1}
,isc.A.setOpacity=function isc_DynamicForm_setOpacity(_1,_2,_3,_4,_5,_6){var _7=this.opacity;this.invokeSuper(isc.DynamicForm,"setOpacity",_1,_2,_3,_4,_5,_6);_1=this.opacity;if(isc.Browser.isMoz&&this.hasFocus&&(_1!=_7)&&(_1==null||_1==100||_7==null||_7==100))
{var _8=this.getFocusSubItem();if(_8&&_8.$429()){this.$106();this.$11b(_8)}
}}
,isc.A.clearingElement=function isc_DynamicForm_clearingElement(_1){if(this.$11w!=null&&this.$11x==_1){delete this.$11w;delete this.$11x}
if(this.$11v!=null&&(this.getFocusSubItem()==_1)){delete this.$11v}}
,isc.A.hide=function isc_DynamicForm_hide(){if(isc.Browser.isMoz)this.$11r(this.getFocusSubItem());this.Super("hide",arguments)}
,isc.A.setVisibility=function isc_DynamicForm_setVisibility(_1,_2,_3,_4){this.invokeSuper(isc.DynamicForm,"setVisibility",_1,_2,_3,_4);this.itemsVisibilityChanged();if(this.isVisible()&&this.isDrawn()&&this.autoFocus)this.focus()}
,isc.A.$ve=function isc_DynamicForm__updateHandleDisplay(_1,_2,_3){var _4=this.invokeSuper(isc.DynamicForm,"$ve",_1,_2,_3);if(_4)this.$103();return _4}
,isc.A.clear=function isc_DynamicForm_clear(){if(this.$246i){this.logWarn("clear(): This form was cleared during an asynchronous operation to upload file. Upload will be aborted. Synchronous file upload can be enabled by setting 'checkFileAccessOnSubmit' to false, but note that this disables logic to verify that  the uploaded file can be accessed by the browser.");this.$246j=true;this.$245a()}
if(!this.destroying){this.$1639()}
this.Super("clear",arguments);this.itemsVisibilityChanged()
this.$11a()}
,isc.A.$lf=function isc_DynamicForm__focusChanged(_1){this.Super("$lf",arguments);if(!this.hasFocus)this.$11r(this.getFocusSubItem());if(this.hasStableLocalID()&&!_1){if(this.destroying||this.destroyed){this.logInfo("Attempt to provide RuleContext from focus-change during destruction...");return}
this.provideRuleContext(this.getLocalId()+".focusField",null,this)}}
,isc.A.parentVisibilityChanged=function isc_DynamicForm_parentVisibilityChanged(_1){if(!this.isVisible()&&isc.Browser.isMoz)this.$11r(this.getFocusSubItem());this.Super("parentVisibilityChanged",arguments);this.itemsVisibilityChanged();if(this.isVisible()&&this.autoFocus)this.focus()}
,isc.A.$kr=function isc_DynamicForm__allowNativeTextSelection(_1){if(_1==null)_1=isc.EH.lastEvent;var _2=this.$ne(_1);if(_2.item){var _3=_2.item.$kr(_1,_2);if(_3!=null)return _3}
return this.Super("$kr",arguments)}
,isc.A.$188y=function isc_DynamicForm__allowNativeDrag(_1){if(_1==null)_1=isc.EH.lastEvent;var _2=this.$ne(_1);if(_2.item){var _3=_2.item.$188y(_1,_2);if(_3!=null)return _3}
return this.Super("$188y",arguments)}
,isc.A.prepareForDragging=function isc_DynamicForm_prepareForDragging(_1,_2,_3,_4){var _5=this.ns.EH;if(_5.dragTarget)return;var _6=_5.lastEvent,_7=this.$ne(_6);if(_7.item){if((_7.overElement||_7.overTextBox||_7.overControlTable)&&_7.item.$kr(_6,_7))return false}
return this.invokeSuper(isc.DynamicForm,"prepareForDragging",_1,_2,_3,_4)}
,isc.A.$ne=function isc_DynamicForm__getEventTargetItemInfo(_1){if(!_1)_1=isc.EH.lastEvent;var _2=isc.EH.isMouseEvent(_1.eventType)?_1.nativeTarget
:_1.nativeKeyTarget;var _3=isc.DynamicForm._getItemInfoFromElement(_2,this);_1.itemInfo=_3;_1.$172d=_1.DOMevent;return _3}
,isc.A.getEventItem=function isc_DynamicForm_getEventItem(){var _1=isc.EH.lastEvent.itemInfo;if(_1!=null&&!_1.inactiveContext&&!_1.overTitle)return _1.item;return null}
,isc.A.getEventItemInfo=function isc_DynamicForm_getEventItemInfo(){var _1=this.$ne();if(_1==null||_1.inactiveContext)return null;return{item:_1.item,overElement:_1.overElement,overtextBox:_1.overTextBox,overItem:(_1.overElement||_1.overTextBox||_1.overControlTable),overTitle:_1.overTitle,overInlineError:_1.overInlineError,icon:_1.overIcon
}}
,isc.A.handleMouseStillDown=function isc_DynamicForm_handleMouseStillDown(_1,_2){if(isc.$cv)arguments.$cw=this;var _3=this.$ne(_1),_4=((_3.overTitle||_3.inactiveContext)?null:_3.item);if(_4!=null){if(_4.form!=this)return;if(_4.mouseStillDown){if(_4.handleMouseStillDown(_1)==false)return false}
}}
,isc.A.handleMouseDown=function isc_DynamicForm_handleMouseDown(_1,_2){var _3=this.$ne(_1),_4=(_3.overTitle?null:_3.item);this.$921=_3;if(_4!=null){if(_4.form!=this)return;_4.handleMouseDown(_1);if(_3.overControlTable||_3.overPickerIconCell){return false}
if(isc.Browser.isSafari&&!_3.inactiveContext&&_3.overElement
&&isc.isA.CheckboxItem(_4))
{_4.focusInItem()}
}}
,isc.A.$11y=function isc_DynamicForm__itemMouseEvent(_1,_2){var _3=this.$11z,_4=this.$110,_5=this.$111,_6=_1.item,_7=_1.overTitle,_8=_1.overIcon
;if(_1.inactiveContext!=null){_6=null;_7=null;_8=null}
if(_3&&_3.destroyed){_3=null;this.$11z=null;this.$111=null;this.$110=null}
if(_6&&_6.destroyed){_6=null;_7=null;_8=null}
this.$11z=_6;this.$110=_7;this.$111=_8;if(_2==isc.EH.MOUSE_OVER){if(_6){if(_7)_6.handleTitleOver();else{if(_8)this.$111=null;_6.handleMouseOver()}
}
}else if(_2==isc.EH.MOUSE_OUT){if(_3){if(_4)_3.handleTitleOut();else{if(_5)_3.$114(_5);_3.handleMouseOut()}
}
}else{var _9=(_3!=_6||_4!=_7)
if(_9){if(_3){if(_4)_3.handleTitleOut();else{if(_5)_3.$114(_5);_3.handleMouseOut()}
}
if(_6){if(_7)_6.handleTitleOver();else{if(_8)_6.$113(_8);if(!_8||(_6.$17z==null&&_8!=_6.errorIconName)){_6.handleMouseOver()}
}
}
}else if(_6){if(_7)_6.handleTitleMove();else{if(_5!=_8){if(_5)_6.$114(_5);if(_8)_6.$113(_8)}else if(_6){if(_8)_6.$115(_8);_6.handleMouseMove()}
}
}
}}
,isc.A.handleMouseOver=function isc_DynamicForm_handleMouseOver(_1,_2){if(this.mouseOver&&this.mouseOver(_1,_2)==false)return false;this.$11y(this.$ne(_1),isc.EH.MOUSE_OVER)}
,isc.A.handleMouseMove=function isc_DynamicForm_handleMouseMove(_1,_2){if(this.mouseMove&&this.mouseMove(_1,_2)==false)return false;this.$11y(this.$ne(_1),isc.EH.MOUSE_MOVE)}
,isc.A.handleMouseOut=function isc_DynamicForm_handleMouseOut(_1,_2){var _3=_1.target;if(isc.isA.DynamicForm(_3)){_1.itemInfo=_3.$ne(isc.EH.lastEvent)}else{_1.itemInfo={}}
this.$11y({},isc.EH.MOUSE_OUT);if(this.mouseOut&&this.mouseOut(_1,_2)==false)return false}
,isc.A.handleMouseWheel=function isc_DynamicForm_handleMouseWheel(_1,_2){var _3=this.$ne(_1),_4=_3.item;if(_4&&_4.$178s(_1,_2))return isc.EH.STOP_BUBBLING;return this.Super("handleMouseWheel",arguments)}
,isc.A.bubbleItemHandler=function isc_DynamicForm_bubbleItemHandler(_1,_2,_3,_4,_5,_6){var _7=this.getItemById(_1),_8=null;for(;_7!=null;_7=_7.parentItem){if(_7.form!=this)continue;if(_7[_2]!=null&&!isc.isA.Function(_7[_2])){isc.Func.replaceWithMethod(_7,_2,"arg1,arg2,arg3,arg4")}
if(_7[_2]==null){this.logWarn("handler:"+_2+" is not present on itemID "+_1);return false}
_8=_7[_2](_3,_4,_5,_6);if(_8==false)return _8}
return _8}
,isc.A.bubbleInactiveEditorEvent=function isc_DynamicForm_bubbleInactiveEditorEvent(_1,_2,_3){return this.bubbleItemHandler(_1,"$680",_2,_3.inactiveContext,_3)}
,isc.A.elementChanged=function isc_DynamicForm_elementChanged(_1){var _2=this.bubbleItemHandler(_1,"elementChanged",_1);return(_2!=false)}
,isc.A.handleClick=function isc_DynamicForm_handleClick(_1,_2){var _3=this.$ne(_1);var _4;if(_3&&_3.item){var _5=_3.item;var _6=this.$921||{},_7=this.$921?this.$921.item:null;if(_7==_3.item){_4=this.handleItemClick(_3,_6);this.$1590=this.$921}
}
delete this.$921;if(_4==false||_4==isc.EH.STOP_BUBBLING)return _4;return this.Super("handleClick",arguments)}
,isc.A.handleItemClick=function isc_DynamicForm_handleItemClick(_1,_2){var _3;var _4=_1.item;if(_1.inactiveContext){this.logInfo("Bubbling inactive editor event for "+_4.ID,"EventHandler");_3=this.bubbleInactiveEditorEvent("click",_4,_1)}else{if(this.$921.overTitle&&_1.overTitle){this.logInfo("Bubbling handleTitleClick event for "+_4.ID,"EventHandler");_3=this.bubbleItemHandler(_4,"handleTitleClick",_4)}else{var _5=_4.isA("SpacerItem"),_6=_5||(_1.overElement||_1.overTextBox||_1.overControlTable),_7=_5||(_2.overElement||_2.overTextBox||_2.overControlTable)
if(_2.overIcon&&_1.overIcon&&(_4.form==this)){if(_4.$116(_1.overIcon)==false)
return false;var _8=_4.getIcon(_1.overIcon);if(_8&&_8.writeIntoItem){_6=true;_7=true}
}
if(_2.overValueIcon&&_1.overValueIcon&&(_4.form==this)){if(_4.valueIconClick!=null){if(_4.valueIconClick(this,_4,_4.getValue())===false){return false}
}
}
if(_6&&_7){this.logInfo("Bubbling handleClick event for "+_4.ID,"EventHandler");if(this.bubbleItemHandler(_4,"handleClick",_4)==false){_3=false}
}
if(_3!=false){this.logInfo("Bubbling handleCellClick event for "+_4.ID,"EventHandler");_3=this.bubbleItemHandler(_4,"handleCellClick",_4)}
}
}
return _3}
,isc.A.handleDoubleClick=function isc_DynamicForm_handleDoubleClick(_1,_2){var _3=this.$ne(_1),_4=this.$921,_5=this.$1590;var _6;if(_3&&_3.item&&_4&&(_4.item==_3.item))
{if(_5&&(_5.item==_3.item)){var _7=_3.item;if(_3.inactiveContext){_6=this.bubbleInactiveEditorEvent(_7,"doubleClick",_3)}else if(_3.overTitle&&_4.overTitle){_6=this.bubbleItemHandler(_7,"handleTitleDoubleClick",_7)}else{var _8=(_3.overElement||_3.overTextBox
||_3.overControlTable),_9=(_4.overElement||_4.overTextBox
||_4.overControlTable)
if(_3.overIcon&&_4.overIcon){if(_7.$116(_3.overIcon)==false)return false;var _10=_7.getIcon(_3.overIcon);if(_10&&_10.writeIntoItem){_8=true;_9=true}
}
if(_8&&_9){if(this.bubbleItemHandler(_7,"handleDoubleClick",_7)==false){_6=false}
}
if(_6!=false){_6=this.bubbleItemHandler(_7,"handleCellDoubleClick",_7)}
}
}else{_6=this.handleItemClick(_3,_4||{})}
}
delete this.$921;delete this.$1590;if(_6==false||_6==isc.EH.STOP_BUBBLING)return _6;return this.Super("handleDoubleClick",arguments)}
,isc.A.handleShowContextMenu=function isc_DynamicForm_handleShowContextMenu(_1,_2){var _3=this.$ne(_1);var _4;if(_3!=null&&_3.item!=null){if(_3.overIcon&&isc.Browser.isTouch)_4=false;else{var _5=_3.item;if(_5){if(_5.handleShowContextMenu){_4=_5.handleShowContextMenu()}
if(_4!=false&&this.showItemContextMenu){_4=this.showItemContextMenu(_5)}
}
}
}
if(_4==false||_4==isc.EH.STOP_BUBBLING)return _4;return this.Super("handleShowContextMenu",arguments)}
,isc.A.handleFocusIn=function isc_DynamicForm_handleFocusIn(_1,_2){var _3=false;if(isc.EH.synchronousFocusNotifications&&_1!=null){var _4=isc.DynamicForm._getItemInfoFromElement(_1,this);var _5=_4?_4.item:null;if(_5&&!_5.disabled){if(_1==_5.getFocusElement()){isc.FormItem.$763(_1);_3=true}else if(_4.overIcon!=null){_5.$121(_4.overIcon,_1)
_3=true}
}
}
if(!_3){this.logDebug("DynamicForm.handleFocusIn(): Received focusin notification for element:"+_1+". This doesn't appear to be a focus target for an item, so simply recording the event as a widget-level focus on the form itself.","nativeFocusIn");return this.Super("handleFocusIn",arguments)}}
,isc.A.handleFocusOut=function isc_DynamicForm_handleFocusOut(_1,_2){var _3=false;if(isc.EH.synchronousFocusNotifications&&_1!=null){var _4=isc.DynamicForm._getItemInfoFromElement(_1,this),_5=_4?_4.item:null;if(_5){if(_1==_5.getFocusElement()){isc.FormItem.$764(_1);_3=true}else if(_4.overIcon!=null){_5.$123(_4.overIcon,_1)
_3=true}
}
}
if(!_3){this.logDebug("DynamicForm.handleFocusOut(): Received focusout notification for element:"+_1+". This doesn't appear to be a focus target for an item, so simply recording the event as a widget-level blur on the form itself.","nativeFocusIn");return this.Super("handleFocusOut",arguments)}}
,isc.A.elementFocus=function isc_DynamicForm_elementFocus(_1,_2){var _3=this.getItemById(_2);if(!this.hasFocus){isc.EventHandler.focusInCanvas(this,null,_3)}
var _4=isc.DynamicForm._getItemInfoFromElement(_1,this);var _5=_4.overIcon;this.setFocusItem(_3,_5);var _6=true,_7=false;if(this.$11w!=null){if(this.$11x!=_3){delete this.$11w;delete this.$11x}else{_7=true;this.$11w-=1;if(this.$11w<0){delete this.$11w;delete this.$11x}
}
}
_6=this.bubbleItemHandler(_2,"elementFocus",_7);return(_6!=false)}
);isc.evalBoundary;isc.B.push(isc.A.elementBlur=function isc_DynamicForm_elementBlur(_1,_2){if(!isc.isA.FormItem(this.getItemById(_2)))return;var _3=true;if(this.$11v==null)_3=this.bubbleItemHandler(_2,"elementBlur");else{this.$11v-=1;if(this.$11v<0)delete this.$11v}
this.clearPrompt();return(_3!=false)}
,isc.A.$2169=function isc_DynamicForm__shouldSaveOnEnter(){return this.saveOnEnter||this.$268f}
,isc.A.$268g=function isc_DynamicForm__observeValuesChanged(_1){if(!this.valuesChanged){this.$268l=true;this.addMethods({valuesChanged:isc.Class.NO_OP})}
_1.observe(this,"valuesChanged","observer.searchFormChanged(observed, 'valuesChanged');")}
,isc.A.$268k=function isc_DynamicForm__ignoreValuesChanged(_1){if(this.$268l&&!this.getObserversOf("valuesChanged")){delete this.$268l;delete this.valuesChanged}
_1.ignore(this,"valuesChanged")}
,isc.A.handleKeyPress=function isc_DynamicForm_handleKeyPress(_1,_2){var _3=this.ns.EH,_4=_3.getKey(_1);if(_4===this.$10j){if(this.$2169()){var _5=this.getFocusSubItem();if(_5&&_5.shouldSaveOnEnter()){if(_5.$887&&_5.parentItem)_5.parentItem.updateValue();this.submit()}
}
}
var _6=this.revertValueKey,_7=this.getFocusSubItem();if(_7!=null&&_6!=null&&_3.$160v(_6,_1))
{var _5=_7;while(_5.parentItem!=null)_5=_5.parentItem;_5.storeValue(_5.$160w(),true);isc.Hover.clear()}
if(_4===this.$51h&&!isc.DynamicForm.canEditField(_7,this))
{return false}
return this.Super("handleKeyPress",arguments)}
,isc.A.handleItemKeyPress=function isc_DynamicForm_handleItemKeyPress(_1,_2,_3){if(this.itemKeyPress!=null){return this.itemKeyPress(_1,_2,_3)}}
,isc.A.titleHoverHTML=function isc_DynamicForm_titleHoverHTML(_1){if(_1.canHover==false)return;if(_1.prompt)return _1.prompt;if(_1.showClippedTitleOnHover&&this.shouldClipTitle(_1)&&this.titleClipped(_1))
{return _1.getTitle()}}
,isc.A.$119=function isc_DynamicForm__showItemHover(_1,_2){if(_2&&!isc.is.emptyString(_2)&&_1.showHover!=false){if(!_1.shouldUpdateHoverInPlace())_1.stopHover();var _3=this.$1845(_1);isc.Hover.showForTargetMouseOver(_2,_3,(_1.hoverRect||this.itemHoverRect))}else isc.Hover.clearForTargetMouseOut()}
,isc.A.$1845=function isc_DynamicForm__getItemHoverProperties(_1){if(!isc.isA.FormItem(_1))_1=this.getItem(_1);while(_1.parentItem!=null)_1=_1.parentItem;var _2=isc.EH.lastEvent;var _3=this.$ne(_2);var _4=_3.overIcon?_1.getIcon(_3.overIcon):null,_5=_3.overTitle;var _6=this.$wc();if(_1){_6=isc.addProperties(_6,{align:(_1.hoverAlign!=null?_1.hoverAlign:this.itemHoverAlign),hoverDelay:(_1.hoverDelay!=null?_1.hoverDelay:this.itemHoverDelay),height:(_1.hoverHeight!=null?_1.hoverHeight:this.itemHoverHeight),opacity:(_1.hoverOpacity!=null?_1.hoverOpacity:this.itemHoverOpacity),baseStyle:(_1.hoverStyle!=null?_1.hoverStyle:this.itemHoverStyle),showHover:(_1.showHover!=null?_1.showHover:this.showHover),valign:(_1.hoverVAlign!=null?_1.hoverVAlign:this.itemHoverVAlign),width:(_1.hoverWidth!=null?_1.hoverWidth:this.itemHoverWidth),wrap:(_1.hoverWrap!=null?_1.hoverWrap:this.itemHoverWrap),autoFitWidth:(_1.hoverAutoFitWidth!=null?_1.hoverAutoFitWidth:this.itemHoverAutoFitWidth!=null?this.itemHoverAutoFitWidth:this.hoverAutoFitWidth),autoFitMaxWidth:(_1.hoverAutoFitMaxWidth||this.itemHoverAutoFitMaxWidth||this.hoverAutoFitMaxWidth),focusKey:_1.hasOwnProperty("hoverFocusKey")?_1.hoverFocusKey:this.hoverFocusKey,persistent:_1.hasOwnProperty("hoverPersist")?_1.hoverPersist:this.hoverPersist
})}else{_6=isc.addProperties(_6,{align:this.hoverAlign,hoverDelay:this.hoverDelay,height:this.hoverHeight,opacity:this.hoverOpacity,baseStyle:this.hoverStyle,valign:this.hoverVAlign,width:this.hoverWidth,autoFitWidth:this.itemHoverAutoFitWidth!=null?this.itemHoverAutoFitWidth:this.hoverAutoFitWidth,autoFitMaxWidth:this.itemHoverAutoFitMaxWidth||this.hoverAutoFitMaxWidth,focusKey:this.hoverFocusKey,persistent:this.hoverPersist
})}
var _7;if(_1.hoverFocusKey!==_7){_6.focusKey=_1.hoverFocusKey}
if(_5){if(_1.titleHoverFocusKey!==_7)_6.focusKey=_1.titleHoverFocusKey;else if(this.titleHoverFocusKey!==_7)_6.focusKey=this.titleHoverFocusKey}
if(_4&&_1.iconHoverStyle)_6.baseStyle=_1.iconHoverStyle;_6.moveWithMouse=this.hoverMoveWithMouse;return _6}
,isc.A.showPrompt=function isc_DynamicForm_showPrompt(_1){window.status=_1}
,isc.A.clearPrompt=function isc_DynamicForm_clearPrompt(){window.status=""}
,isc.A.isMultipart=function isc_DynamicForm_isMultipart(){return!(this.encoding==isc.DynamicForm.NORMAL||this.encoding==isc.DynamicForm.NORMAL_ENCODING)}
,isc.A.itemIsLastInRow=function isc_DynamicForm_itemIsLastInRow(_1,_2){var _3=this.items.$8j,_4=this.getItems().indexOf(_1);if(_4<0)return false;if(_2==null){for(var i=0;i<_3.length;i++){if(_3[i].contains(_4)){_2=i;break}
}
}
var _6=_3[_2];if(!_6)return false;if(_6[this.numCols-1]==_4)return true;return false}
,isc.A.getColumnWidths=function isc_DynamicForm_getColumnWidths(){var _1=this.items.$8j,_2=[];_2.length=this.numCols;for(var j=0;j<_2.length;j++)_2[j]=0;for(var _4=0;_4<_1.length;_4++){var _5=_1[_4];for(var i=0;i<_5.length;i++){var _7=this.items.get(_5[i]);if(_7.colSpan&&_7.colSpan>1)continue;if(_7.showTitle&&(this.titleOrientation=="left"||!this.titleOrientation)){if(_7.getVisibleTitleWidth()>_2[i]){_2[i]=_7.getVisibleTitleWidth()}
i++}
if(_7.width>_2[i])_2[i]=_7.width;if(_7.showTitle&&_7.titleOrientation=="right"&&_7.getVisibleTitleWidth()>_2[i+1]){_2[++i]=_7.getVisibleTitleWidth()}
}
}
return _2}
,isc.A.getItemTableOffsets=function isc_DynamicForm_getItemTableOffsets(_1,_2){var _3=_2||this.items.$8j,_4=this.getItems().indexOf(_1),_5={};_5.itemIndex=_4
for(var _6=0;_6<_3.length;_6++){var _7=_3[_6],_8=_7.indexOf(_4),_9=_7.lastIndexOf(_4);if(_8>-1&&_9>-1){if(!_5.left||_8<_5.left)_5.left=_8;if(!_5.width||_5.width<_9-_8)_5.width=_9-_8+1;if(!_5.top||_6<_5.top)_5.top=_6;if(!_5.height||_5.height<_6-_5.top){_5.height=_6-_5.top+1}
}
}
return _5}
,isc.A.getItemDropIndex=function isc_DynamicForm_getItemDropIndex(_1,_2){if(!_1)return;if(!_2)_2="L";var _3=this.getItemTableOffsets(_1),_4=this.items.$8j;if(_2=="L")return _3.itemIndex;if(_2=="R"){if(this.itemIsLastInRow(_1)&&this.canAddColumns!=true){return _3.itemIndex+1}
return _3.itemIndex+1}
if(_2=="T"){return this.getItemIndexAtTableLocation(_3.top-(_3.top==0?0:1),_3.left
)}
if(_2=="B"){var _5=_3.top+_3.height-1;var _6=this.getItemIndexAtTableLocation(_5+1,_3.left);if(_6==null){_6=this.items.length}
return _6}}
,isc.A.getItemIndexAtTableLocation=function isc_DynamicForm_getItemIndexAtTableLocation(_1,_2){var _3=this.items.$8j;if(!_3[_1])return;return _3[_1][_2]}
,isc.A.getItemAtPageOffset=function isc_DynamicForm_getItemAtPageOffset(_1,_2){this.items.$69e=this.getColumnWidths();var _3=this.items.$8j,_4=this.items.$69e,_5=this.items.$8s;var _6=this.inWhichPosition(_4,_1-this.getPageLeft()),_7=this.inWhichPosition(_5,_2-this.getPageTop());_6=_6==-1?0:_6==-2?_4.length:_6;_7=_7==-1?0:_7==-2?_5.length:_7;if(!_3[_7])return null;var _8=_3[_7][_6],_9=this.getItem(_8);if(_9!=null){_9.$69f=_7;_9.$69g=_6;_9.$69d=_8}
return _9}
,isc.A.getNearestItem=function isc_DynamicForm_getNearestItem(_1,_2){var _3=9999999999,_4;this.logDebug("Computing nearest item to ("+_1+","+_2+")","formItemDragDrop");for(var i=0;i<this.items.length;i++){var _6=this.items[i];var _7=_6.getPageRect(true),_8=_7[0],_9=_7[1],_10=_7[2],_11=_7[3],_12=0,_13=0;if(_1>=_8&&_1<=_8+_10&&_2>=_9&&_2<=_9+_11)
{return _6}
if(_1>_8){if(_1>_8+_10){_12=_1-(_8+_10)}
}else{_12=_8-_1}
if(_2>_9){if(_2>_9+_11){_13=_2-(_9+_11)}
}else{_13=_9-_2}
var _14=Math.sqrt(_12*_12+_13*_13);this.logDebug("Item "+_6.name+": (l,t,w,h) = "+_7,"formItemDragDrop");this.logDebug("XDelta: "+_12+", yDelta: "+_13+", straight line distance: "+_14,"formItemDragDrop");if(_14<_3){this.logDebug("Item "+_6.name+": distance is shorter than "+_3+", it is now the nearest item","formItemDragDrop");_3=_14;_4=_6}
}
return _4}
,isc.A.showDragLineForItem=function isc_DynamicForm_showDragLineForItem(_1,_2,_3){this.makeDragLine();if(!_1){this._dragLine.hide();return}
var _4=this.getItemDropContext(_1),_5=_4.left,_6=_4.top,_7=_4.width,_8=_4.height,_9=this.getItemDropSide(_4,_2,_3);var _10=this.dragLineStyle;var _11,_12,_13,_14;if(_9=="R"||_9=="L"){_12=3;_11=_8;_13=_9=="L"?_5:_5+_7-1;_14=_6;_10=this.dragLineStyle+"Vertical"}else{_12=_7;_13=_5;_11=3;_14=_9=="T"?_6:_6+_8-1;_10=this.dragLineStyle}
_1.dropSide=_9;if(_4.disallowRightDrop&&_1.dropSide=="R"){this.hideDragLine();this.setNoDropIndicator();this.$69h=this.currentCursor;this.setCursor("not-allowed")}else{if(this.$uh){this.clearNoDropIndicator()
this.setCursor(this.$69h)}
var _15={left:_13,top:_14};this.adjustDragLinePosition(_15,_1,_9);_13=_15.left;_14=_15.top;this._dragLine.setStyleName(_10);this._dragLine.resizeTo(_12,_11);this._dragLine.setPageRect(_13,_14);this._dragLine.bringToFront();this._dragLine.show()}}
,isc.A.getItemDropSide=function isc_DynamicForm_getItemDropSide(_1,_2,_3){var _4=_1.left,_5=_1.top,_6=_1.width,_7=_1.height,_8;var _9;if(_2<=_4)_2=_4+1;else if(_2>=_4+_6){_2=_4+_6-1;_9=true}
var _10=_1.sideThreshold,_11=_1.tbSideThreshold;if(_3<=_5)_3=_5+1;else if(_3>=_5+_7)_3=_5+_7-1;var _12=_2-_4,_13=_3-_5,_14=(_4+_6)-_2,_15=(_5+_7)-_3;if(_9||(_12<_10)||(_14<_10)){if(_9&&!_1.invalidSides.contains("R")){_8="R"
}else if(_13<_11)_8="T";else if(_15<_11)_8="B";else{if(_12>_14){if(!_1.invalidSides.contains("R"))_8="R"}else if(_14>_12){if(!_1.invalidSides.contains("L"))_8="L"}
}
}
if(_8==null){_8=_13<_15?"T":"B"}
return _8}
,isc.A.getItemDropContext=function isc_DynamicForm_getItemDropContext(_1){var _2=_1.getPageRect();var _3={left:_2[0],top:_2[1],width:_2[2],height:_1.getVisibleHeight()
};if(_1.showTitle!=false){var _4=this.titleOrientation||"left"
if(_4=="left"||_4=="right")_3.width+=_1.getVisibleTitleWidth();if(_4=="left")_3.left-=_1.getVisibleTitleWidth()}
var _5=Math.round(_3.width*this.$248a);if(_5>this.$248c)_5=this.$248c;_3.sideThreshold=_5;_3.tbSideThreshold=Math.round(_3.height*this.$248b);_3.invalidSides=[];if(_1.endRow)_3.invalidSides.add("R");if(_1.startRow)_3.invalidSides.add("L");_3.disallowRightDrop=this.itemIsLastInRow(_1)&&!this.canAddColumns;return _3}
,isc.A.adjustDragLinePosition=function isc_DynamicForm_adjustDragLinePosition(_1,_2,_3){var _4=this.items.$8j,_5=this.items.indexOf(_2),_6,_7,_8;for(var i=0;i<_4.length;i++){if(_4[i].indexOf(_5)!=-1){_6=i;_7=_4[i].indexOf(_5);_8=_4[i].lastIndexOf(_5);break}
}
if(_6==null||_7==null||_8==null)return;if(_3=="T"){if(_6==0)return;if(_4[_6-1][_7]==_4[_6-1][_8]&&_4[_6-1][_7-1]!=_4[_6-1][_7]&&_4[_6-1][_8+1]!=_4[_6-1][_7])
{var _10=this.items[_4[_6-1][_7]].getPageRect(true);var _11=_10[1]+_10[3];_1.top-=Math.round((_1.top-_11)/2)}
}
if(_3=="B"){if(_6==_4.length-1)return;if(_4[_6+1][_7]==_4[_6+1][_8]&&_4[_6+1][_7-1]!=_4[_6+1][_7]&&_4[_6+1][_8+1]!=_4[_6+1][_7])
{var _10=this.items[_4[_6+1][_7]].getPageRect(true);var _11=_10[1];_1.top+=Math.round((_11-_1.top)/2)}
}
if(_3=="L"){if(_7==0)return;var _10=this.items[_4[_6][_7-1]].getPageRect(true);var _12=_10[0]+_10[2];_1.left-=Math.round((_1.left-_12)/2)}
if(_3=="R"){if(_8==_4[_6].length-1)return;var _10=this.items[_4[_6][_8+1]].getPageRect(true);var _12=_10[0];_1.left+=Math.round((_12-_1.left)/2)}}
,isc.A.showDragLineForForm=function isc_DynamicForm_showDragLineForForm(){this.makeDragLine();this._dragLine.setStyleName(this.dragLineStyle+"Vertical");this._dragLine.resizeTo(3,this.getHeight());this._dragLine.setPageRect(this.getPageLeft(),this.getPageTop());this._dragLine.bringToFront();this._dragLine.show()}
,isc.A.enableField=function isc_DynamicForm_enableField(_1){if(_1==null||isc.isAn.emptyString(_1))return;var _2=this.getItem(_1);if(_2)_2.enable()}
,isc.A.disableField=function isc_DynamicForm_disableField(_1){if(_1==null||isc.isAn.emptyString(_1))return;var _2=this.getItem(_1);if(_2)_2.disable()}
,isc.A.showField=function isc_DynamicForm_showField(_1){if(_1==null||isc.isAn.emptyString(_1))return;var _2=this.getItem(_1);if(_2)_2.show()}
,isc.A.hideField=function isc_DynamicForm_hideField(_1){if(_1==null||isc.isAn.emptyString(_1))return;var _2=this.getItem(_1);if(_2)_2.hide()}
,isc.A.getSelectionChain=function isc_DynamicForm_getSelectionChain(){if(!this.selectionComponent)return[];var _1=[];var _2=this;while(_2.selectionComponent){_1.add(_2.selectionComponent);_2=_2.selectionComponent}
var _3=[];for(var i=_1.length-1;i>=0;i--){_3.add(_1[i].getRecordIndex(_1[i].getSelectedRecord()))}
return _3}
,isc.A.setCanEdit=function isc_DynamicForm_setCanEdit(_1){this.canEdit=_1;var _2=this.isDrawn();var _3=this.getItems();if(_3!=null){for(var i=0,_5=_3.length;i<_5;++i){var _6=_3[i];_6.updateCanEdit(_2)}
}
if(_2)this.markForRedraw("setCanEdit")}
,isc.A.setFieldCanEdit=function isc_DynamicForm_setFieldCanEdit(_1,_2){if(_1==null||isc.isAn.emptyString(_1))return;var _3=this.getField(_1);if(_3){if(_3.setCanEdit){_3.setCanEdit(_2)}else{_3.canEdit=_2;this.redraw()}
}}
,isc.A.fieldIsEditable=function isc_DynamicForm_fieldIsEditable(_1){if(!isc.isAn.Object(_1))_1=this.getField(_1);return _1?isc.DynamicForm.canEditField(_1,this):false}
,isc.A.setReadOnlyDisplay=function isc_DynamicForm_setReadOnlyDisplay(_1){this.readOnlyDisplay=_1;var _2=(this.canEdit==false&&this.isDrawn());var _3=this.getItems();if(_3!=null){for(var i=0,_5=_3.length;i<_5;++i){var _6=_3[i];_6.updateReadOnlyDisplay(_2)}
}
if(_2)this.markForRedraw("setReadOnlyDisplay")}
);isc.B._maxIndex=isc.C+302;isc.A=isc.DynamicForm;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.defaultFieldType="text";isc.A.$12a="link";isc.A.$gx="text";isc.A.$12b="select";isc.A.$12c="checkbox";isc.A.$12d="staticText";isc.A.$g2="boolean";isc.A.$gz="integer";isc.A.$12e="binary";isc.A.$12f="blob";isc.A.$52w="multifile";isc.A.$12g="multiupload";isc.A.$9i="upload";isc.A.$52x="file";isc.A.$51x="base64Binary";isc.A.$12h="enum";isc.A.$12i="CycleItem";isc.A.$12j="selectOther";isc.A.$12k="relation";isc.A.$67f="NestedEditorItem";isc.A.$67g="NestedListEditorItem";isc.A.$677="imageFile";isc.A.$678="ViewFileItem";isc.A.$77j="section";isc.A.$77k="SectionItem";isc.A.$77l="button";isc.A.$77m="ButtonItem";isc.A.$178h="FormItem";isc.A.$68l="datetime";isc.A.$68b="DateTimeItem";isc.A.$450="id";isc.A.suppressBrowserClearIcons=false;isc.B.push(isc.A.sortItemsIntoTabOrder=function isc_c_DynamicForm_sortItemsIntoTabOrder(_1,_2){if(_2==null)_2=this;var _3=[],_4={};for(var i=0;i<_1.length;i++){var _6=_1[i],_7=_6.tabIndex;if(_7!=null&&_7!=-1){if(_3[_7]!=null){if(!_4[_7]){_2.logWarn("More than one item in this form have an explicitly specified tabIndex of '"
+_7+"'. Tab order cannot be guaranteed within this form.");_4[_7]=true}
_6.$180n=true}
_3[_7]=_6}
}
var _8=1,_9=[];for(var i=0;i<_1.length;i++){var _6=_1[i];if(!isc.isA.FormItem(_6)){if(_2.logIsInfoEnabled("TabIndexManager"))
_2.logInfo("dynamicForm.sortItemsIntoTabOrder() fired before all form items have been initialized"
+this.getStackTrace());continue}
if(_6.tabIndex!=null&&!_6.$180n){_9[_6.tabIndex]=_6;continue}
_8+=1;while(_3[_8]!=null){_8+=1}
_6.$10p=_8;_9[_8]=_6}
return _9}
,isc.A.getEditorType=function isc_c_DynamicForm_getEditorType(_1,_2,_3,_4){if(_1._constructor==isc.FormItem.Class)_1._constructor=null;var _5=_2.getDataSource();var _6=this.canEditField(_1,_2),_7=this.defaultFieldType,_8=_1.editorType
;if(isc.isA.Class(_8)){_8=_8.getClassName()}
if(_8==this.$178h)_8=null;var _9=!_1.editNode||isc[_1._constructor];var _10=(_6==false&&_1.readOnlyEditorType)||_8||_1.formItemType||(_9&&_1._constructor);if(_10==null){_10=_2&&_2.getFieldType?_2.getFieldType(_1,_3):_1.type}
if(_10==null)_10=_7;if((_6==false&&_1.readOnlyEditorType)||_8||_1.formItemType||_1._constructor)
{return _10}
var _11=_10;var _12=null;var _13=(_10==this.$12e||_10==this.$52x||_10==this.$677);while(_11){if(_10==this.$12a){if(this.canEditField(_1,_2)&&_1.canEdit)_12=this.$gx;else _12=this.$12a}else if(_10==this.$g2){var _14=_1.valueMap;if(!isc.isAn.Array(_14)&&isc.isAn.Object(_14))_12=this.$12b;else _12=this.$12c}else if(_10==this.$12e||_10==this.$12f||_10==this.$52x||_10==this.$677)
{if(_1.dataSource)_12=this.$52w
else _12=this.$52x}else if(_10==this.$12g){_12=this.$52w}else if(_10==this.$51x){_12=this.$51x}else if(_10==this.$12h){if(_1.showValueIconOnly)_12=this.$12i
else _12=this.$12b}else if(isc.DataSource&&isc.isA.DataSource(_5)&&_5.fieldIsComplexType(_1.name)){_12=_1.multiple?_2.nestedListEditorType:_2.nestedEditorType}else if(_10==this.$68l){_12=this.$68b}else{if(_11&&_11!=_7&&_11!=this.$gz&&(_11==this.$12j||(isc.FormItemFactory.getItemClass(_11)!=null)))
{_12=_11}else{_11=isc.SimpleType.getType(_11);if(_12){break}else if(_11==null||_11.inheritsFrom==null){if(_1.dataSource){_12=this.$12k}else if(_1.valueMap||_1.optionDataSource||this.$281c(_1,_5,false)){var _15=_4||_2;if(_15&&_15.isSearchForm&&_5)
{var _16;if(_1.optionDataSource||this.$281c(_1,_5)){_16=_15.largeValueMapFilterEditorType}else if(_1.valueMap){var _17=_1.valueMap;var _18=isc.isA.Array(_17)?_17:isc.getKeys(_17);if(_18&&_18.length>_15.largeValueMapFilterEditorThreshold){_16=_15.largeValueMapFilterEditorType}
}
if(_16&&this.$280o(_16,_1,_5)){_12=_16}
}
if(!_12)_12=(_1.showValueIconOnly?this.$12i:this.$12b)}else if(this.$281c(_1,_5,true)){var _15=_4||_2;if(_15&&_15.isSearchForm&&_5){var _16=_15.largeValueMapFilterEditorType;if(_16&&this.$280o(_16,_1,_5)){_12=_16}
}
if(_12==null)_12=_15.multipleRelationFieldEditorType}else if(_2&&(_1.length&&_1.length>_2.longTextEditorThreshold))
{_12=_2.longTextEditorType}else{_12=_7}
}else{_11=_11.inheritsFrom;_10=_11;_12=null;continue}
}
}
break}
return _12}
,isc.A.$281c=function isc_c_DynamicForm__showOptionsFromDataSource(_1,_2,_3){if(_2!=null&&_1.displayField!=null)return true;return this.$280e(_1,_2,_3)}
,isc.A.$280e=function isc_c_DynamicForm__isRelationField(_1,_2,_3){if(isc.DataSource==null)return false;_2=isc.DataSource.getDataSource(_2);return _2&&_2.isRelationField(_1,_3)}
,isc.A.$280o=function isc_c_DynamicForm__supportsFilterEditorType(_1,_2,_3){if(!_3)return false;var _4=isc[_1];if(!_4)return false;var _5=_4.editorOperators;if(_5!=null){var _6=isc.DataSource.getTypeOperators(_2.type,_3);for(var i=0;i<_5.length;i++){if(!_6.contains(_5[i]))return false}
}
return true}
,isc.A._getItemInfoFromElement=function isc_c_DynamicForm__getItemInfoFromElement(_1,_2){var _3=_2?_2.getClipHandle():document,_4={},_5,_6,_7=isc.DynamicForm.$89,_8=isc.DynamicForm.$9a,_9=isc.DynamicForm.$9b,_10=isc.DynamicForm.$9c,_11=isc.DynamicForm.$9e,_12=isc.DynamicForm.$99r,_13=isc.DynamicForm.$1905,_14=isc.DynamicForm.$9g,_15="eventpart",_16="valueicon";while(_1&&_1!=_3&&_1!=document){var _17=_1.getAttribute?_1.getAttribute(_7):null;if(_1.getAttribute&&(_1.getAttribute(_15)==_16))
{_4.overValueIcon=true}
if(_1.getAttribute&&(_1.getAttribute(_8)==_13))
{_6=_1;_5=true}
if(_17!=null&&!isc.isAn.emptyString(_17)){var _18=window[_17];if(_18!=null&&!_18.destroyed&&(_2==null||_18.form===_2)){_4.item=_18;var _19=_18.$681(_1);if(_19!=null){if(this.logIsDebugEnabled("inactiveEditorHTML")){this.logDebug("Event occurred over inactive HTML for item:"+_18+" inactiveContext:"+this.echo(_19),"inactiveEditorHTML")}
_4.inactiveContext=_19}
var _20=_1.getAttribute(_8);if(_20==_9)_4.overElement=true;else if(_20==_14)_4.overTitle=true;else if(_20==_10)_4.overTextBox=true;else if(_20==_11)_4.overControlTable=true;else if(_20==_12)_4.overInlineError=true;else if(_20&&!isc.isAn.emptyString(_20))
_4.overIcon=_20;break}
}
_1=_1.parentNode}
if(_5&&_4.overControlTable){_1=this.$1907(_6);if(_1!=null){var _17=_1.getAttribute?_1.getAttribute(_7):null;var _18=window[_17];if(_18!=null&&!_18.destroyed&&(_2==null||_18.form===_2)){var _20=_1.getAttribute(_8);_4.overIcon=_20;_4.item=_18;_4.overPickerIconCell=true;delete _4.overControlTable}
}
}
return _4}
,isc.A.$1907=function isc_c_DynamicForm__getEventTargetForItemPart(_1){var _2=_1.childNodes,_3=isc.DynamicForm.$9a,_4
;if(_2){for(var i=0;i<_2.length;i++){var _6=_2[i],_7=_6.getAttribute(_3);if(_7&&!isc.isAn.emptyString(_7)){_4=_6;break}
_4=this.$1907(_6,_7);if(_4!=null)break}
}
return _4}
,isc.A.$172c=function isc_c_DynamicForm__getEventTargetItem(_1){if(!_1)_1=isc.EH.lastEvent;var _2=_1.target,_3=_1.itemInfo;if(isc.isA.DynamicForm(_2)&&(!_3||_1.$172d!=_1.DOMevent)){_3=_2.$ne(_1)}
return _3&&_3.item&&_3.item.form==_2?_3.item:null}
,isc.A.getSimpleErrors=function isc_c_DynamicForm_getSimpleErrors(_1){var _2={};if(isc.isAn.Array(_1))_1=_1[0];for(var _3 in _1){var _4=_1[_3];if(_3=="recordPath"&&!isc.isAn.Object(_4))continue;if(isc.isAn.Array(_4)){_2[_3]=[];for(var i=0;i<_4.length;i++){var _6=_4[i];_2[_3][i]=isc.isAn.Object(_6)
?isc.shallowClone(_6)
:{errorMessage:_6}}
}else{_2[_3]=isc.isAn.Object(_4)
?isc.shallowClone(_4)
:{errorMessage:_4}}
}
return _2}
,isc.A.formatValidationErrors=function isc_c_DynamicForm_formatValidationErrors(_1){var _2={};if(isc.isAn.Array(_1))_1=_1[0];for(var _3 in _1){var _4=_1[_3];if(_3=="recordPath"&&!isc.isAn.Object(_4))continue;if(isc.isAn.Array(_4)){_2[_3]=[];for(var i=0;i<_4.length;i++){var _6=_4[i];if(isc.isAn.Object(_6))_6=_6.errorMessage;_2[_3][i]=_6}
}else{_2[_3]=isc.isAn.Object(_4)?_4.errorMessage
:_4}
}
return _2}
,isc.A.valuesHaveChanged=function isc_c_DynamicForm_valuesHaveChanged(_1,_2,_3,_4,_5,_6){var _7=false,_8={};var _9=_3,_10;for(var _11 in _4){if(!(_11 in _3)){if(_9===_3)_9=isc.addProperties({},_3);_9[_11]=_10}
}
_3=_9;var _12=_6?_1.$2183():_1.getFields().duplicate(),_13={};if(isc.DataSource&&isc.isA.DataSource(_1.getDataSource())){_13=_6?_1.$2184():_1.getDataSource().getFields()}
var _14={};for(var i=0;i<_12.length||this.$198u(_12,_13,_14);i++)
{var _16=_12[i].dataPath||_12[i].name;if(_16!=null){if(_14[_16])continue;_14[_16]=_12[i];var _17=isc.DataSource?isc.DataSource.getFieldValue(null,_4,_16,null,"compare"):_4[_16];var _18=isc.DataSource?isc.DataSource.getFieldValue(null,_3,_16,null,"compare"):_3[_16];var _19=_16.split('/');if(_19.length>1){var _20="";for(var j=0;j<_19.length;j++){if(j>0)_20+="/";_20+=_19[j];if(!_14[_20]){_14[_20]=_12[i]}
}
}
if(!_1.fieldValuesAreEqual(_12[i],_17,_18)){_7=true;if(!_2)break;_8[_12[i].name]=_18}
}
}
if(_7&&!_2){return _7}
if(_1.canChangeNonFieldValues===false){return(_2?_8:_7)}
if(_6){_3=_1.$2185(_3);_4=_1.$2185(_4)}
for(var _22 in _3){if(isc.isA.Function(_3[_22]))continue;if(_22==isc.gwtRef||_22==isc.gwtModule)continue;if(isc.isAn.Instance(_3[_22])||isc.isA.Class(_3[_22])
||(_3[_22]&&_3[_22]._constructor))
{continue}
var _23=_5==null?_22:_5+"/"+_22;if(_14[_23])continue;var _24=_1.getItem(_23);if(_24!=null){}else{var _25=_3[_22],_26=_4[_22];var _27,_28;if(isc.isA.Number(_25)||isc.isA.String(_25)||isc.isA.Boolean(_25)){_27=false}else{_27=isc.isAn.Object(_25)}
if(isc.isA.Number(_26)||isc.isA.String(_26)||isc.isA.Boolean(_26)){_27=false}else{_27=isc.isAn.Object(_26)}
if(_27&&!isc.isAn.Array(_25)&&!isc.isA.Date(_25)&&_28&&!isc.isAn.Array(_26)&&!isc.isA.Date(_26))
{var _29=isc.Canvas.valuesHaveChanged(_1,_2,_3[_22],_4[_22],_23);if(!_2&&_29){_7=true;break}else if(!isc.isAn.emptyObject(_29)){if(_8[_22]==null)_8[_22]={};isc.addProperties(_8[_22],_29)}
}else{_7=!isc.Canvas.compareValues(_25,_26);if(_7&&_2)_8[_22]=_25}
}
if(_7&&!_2){return true}
}
return(_2?_8:_7)}
,isc.A.$198u=function isc_c_DynamicForm__mergeDSFields(_1,_2,_3){if(isc.isAn.emptyObject(_2)||isc.isAn.emptyArray(_2))return false;var _4=_1.length;if(isc.isAn.Array(_2)){var _5=_2;_2={};for(var i=0;i<_5.length;i++){_2[_5.name]=_5[i]}
}
for(var _7 in _2){var _8=_2[_7];if(_8.dataPath){if(!_3[_8.dataPath])_1.add(_8)}else if(_8.name){if(!_3[_8.name])_1.add(_8)}
}
_2=isc.emptyObject;return _1.length>_4}
,isc.A.getFilterCriteria=function isc_c_DynamicForm_getFilterCriteria(){var _1={};for(var i=0;i<arguments.length;i++){var _3=arguments[i];if(_3==null)continue;if(_3.getValuesAsCriteria==null){this.logInfo("DynamicForm.getFilterCriteria() - unable to call 'getValuesAsCriteria()' on argument:"+this.echo(_3));continue}
isc.addProperties(_1,_3.getValuesAsCriteria())}
return _1}
,isc.A.$817=function isc_c_DynamicForm__getTopRowCellStart(){if(!this.$819){isc.Canvas.$816.add({target:this,methodName:"$82a"
});this.$819=true}
if(this.$9x==null){this.$9x=["<TD style='",isc.Canvas.$42a,"font-size:0px;height:0px;overflow:hidden;padding:0px;' class='",null,"'>",(isc.Browser.isSafari||isc.Browser.isMoz?"<div style='overflow:hidden;height:0px'>":"")
]
}
return this.$9x}
,isc.A.$818=function isc_c_DynamicForm__getTitleInnerTableTemplate(){if(!this.$819){isc.Canvas.$816.add({target:this,methodName:"$82a"
});this.$819=true}
if(this.$10b==null){this.$10b=["<TABLE height=",," border=0 cellspacing=0 cellpadding=0><tr><td class='",,"' style='"+isc.Canvas.$42a+"' ALIGN='",,"'>",null
]}
return this.$10b}
,isc.A.$82a=function isc_c_DynamicForm__doublingStringsChanged(){this.$9x=null;this.$10b=null}
);isc.B._maxIndex=isc.C+16;isc.defineClass("InlineFormItem","DynamicForm");isc.A=isc.InlineFormItem.getPrototype();isc.A.position="relative";isc.A.writeFormTag=false;isc.A.canSubmit=true;isc.A.numCols=1;isc.A.autoDraw=true;isc.A=isc.InlineFormItem;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.create=function isc_c_InlineFormItem_create(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13){var _14=isc.addProperties({showTitle:false,validate:function(){this.form.validate()},destroy:function(){this.form.destroy();this.Super("destroy",arguments)}
},_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13);var _15=this.createRaw().completeCreation({fields:[_14],valuesManager:_14.valuesManager
},_14.formProperties);return _15.getItem(0)}
);isc.B._maxIndex=isc.C+1;isc.A=isc.DynamicForm;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.makeInlineItem=function isc_c_DynamicForm_makeInlineItem(_1,_2,_3,_4){return isc.InlineFormItem.create({name:_1,type:_2,formProperties:_4
},_3)
}
,isc.A.getFormValues=function isc_c_DynamicForm_getFormValues(_1){return isc.Canvas.getFormValues(_1)}
);isc.B._maxIndex=isc.C+2;isc.DynamicForm.registerStringMethods({valuesChanged:"",itemChanged:"item,newValue",itemChange:"item,newValue,oldValue",itemKeyPress:"item,keyName,characterValue",showItemContextMenu:"item",submitValues:"values,form",handleHiddenValidationErrors:"errors",itemTabIndexUpdated:"item"});isc.ClassFactory.defineClass("HandPlacedForm","DynamicForm");isc.A=isc.HandPlacedForm.getPrototype();isc.A.itemLayout="absolute";isc.A.height=100;isc.A.snapVGap=8;isc.A.snapHGap=8;isc.A.snapHDirection=isc.Canvas.NEAREST;isc.A.snapVDirection=isc.Canvas.NEAREST;isc.ClassFactory.defineClass("AbsoluteForm","HandPlacedForm");isc.ClassFactory.defineClass("ScalarViewer","DynamicForm");isc.A=isc.ScalarViewer.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.numCols=1;isc.A.colWidths=["*"];isc.A.fieldName="value";isc.A.valueItemDefaults={editorType:"StaticTextItem",vAlign:"center",align:"center",titleAlign:"center",titleOrientation:"top",titleStyle:"headerItem",textBoxStyle:"headerItem"
};isc.B.push(isc.A.initWidget=function isc_ScalarViewer_initWidget(){var _1=this.getValueItemConfig();this.setItems([_1]);this.Super("initWidget",arguments);this.valueItem=this.getItem(0)}
,isc.A.getValueItemConfig=function isc_ScalarViewer_getValueItemConfig(){return isc.addProperties({},this.valueItemDefaults,this.valueItemProperties,{title:this.title,name:this.fieldName}
)}
,isc.A.setFieldName=function isc_ScalarViewer_setFieldName(_1){this.fieldName=_1
this.setItems([this.getValueItemConfig()]);this.valueItem=this.getItem(0)}
,isc.A.setTitle=function isc_ScalarViewer_setTitle(_1){this.valueItem.setTitle(_1)}
);isc.B._maxIndex=isc.C+4;isc.ClassFactory.defineClass("FormItem");
isc.A=isc.FormItem.getPrototype();
isc.B=isc._allFuncs;
isc.C=isc.B._maxIndex;
isc.D=isc._funcClasses;
isc.D[isc.C]=isc.A.Class;
isc.A.$68s=[null,"_inactiveContext",null];
isc.A.$557=isc.Canvas.getPrototype().$557;
isc.A.$63x=isc.Canvas.getPrototype().$63x;
isc.A.reuseDOMIDs=false
;
isc.B.push(isc.A.$qs=function isc_FormItem__getDOMID(_1,_2,_3,_4){
if(_4==null&&this.isInactiveHTML()){
_4=this.$68u}
if(_4!=null){
this.$68s[0]=_1;
this.$68s[2]=_4;
_1=this.$68s.join(isc.emptyString);
if(this.logIsDebugEnabled("inactiveEditorHTML")){
this.logDebug("$qs called for inactive HTML -- generated partName:"
+_1,"inactiveEditorHTML")}
_2=false}
return isc.Canvas.getPrototype().$qs.apply(this,[_1,_2,_3])}
);
isc.B._maxIndex=isc.C+1;
isc.A=isc.FormItem;
isc.B=isc._allFuncs;
isc.C=isc.B._maxIndex;
isc.D=isc._funcClasses;
isc.D[isc.C]=isc.A.Class;
isc.B.push(isc.A.create=function isc_c_FormItem_create(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13){
this.logWarn(
"Unsupported call to "+this.getClassName()+".create(). FormItems must be created by their containing form. To create form items, use the 'items' property of a DynamicForm instance. See documentation for more details."
);
return isc.addProperties({},_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13)}
,isc.A.getNewTagID=function isc_c_FormItem_getNewTagID(){
if(this.$12m==null)this.$12m=0;
this.$12m+=1;
return"isc_FormItemElement_ID_"+this.$12m}
,isc.A.setElementTabIndex=function isc_c_FormItem_setElementTabIndex(_1,_2){
_1.tabIndex=_2;
if(isc.Browser.isMoz){
_1.style.MozUserFocus=(_2<0?"ignore":"normal")}
}
,isc.A.$12n=function isc_c_FormItem__aboutToFireNativeElementFocus(_1){
if(!isc.Browser.isIE)return;
var _2=this.getActiveElement();
if(_2&&_2.tagName==null)_2=null;
if(_2&&
((_2.tagName.toLowerCase()==this.$12o&&
_2.type.toLowerCase()==this.$12p)||
_2.tagName.toLowerCase()==this.$12q))
{
var _3=_2.createTextRange();
_3.execCommand("Unselect")}
}
,isc.A.$12r=function isc_c_FormItem__textBasedItem(_1,_2){
if(isc.isA.FormItem(_1))_1=_1.getClassName();
if(!this.$12s){
this.$12s={
text:true,
TextItem:true,
textItem:true,
textArea:true,
TextAreaItem:true,
textAreaItem:true
}
this.$12t={
popUpTextArea:true,
PopUpTextAreaItem:true,
popUpTextAreaItem:true
}
}
return this.$12s[_1]||(!_2||this.$12t[_1])}
,isc.A.$12u=function isc_c_FormItem__nativeFocusHandler(){
if(!window.isc||!isc.DynamicForm)return;
var _1=(isc.EH.useFocusInEvents&&
isc.EH.synchronousFocusNotifications);
if(_1)return isc.FormItem.$188m(this);
isc.EH.$h1("IFCS");
var _2;
if(isc.Log.supportsOnError){
_2=isc.FormItem.$763(this)}else{
try{
_2=isc.FormItem.$763(this)}catch(e){
isc.Log.$am(e);
if(isc.Log.rethrowErrors){
throw e;}
}
}
isc.EH.$h2();
return _2}
,isc.A.$188m=function isc_c_FormItem___nativeAsyncFocusHandler(_1){
var _2=(isc.EH.useFocusInEvents&&
isc.EH.synchronousFocusNotifications);
if(_2){
var _3=isc.DynamicForm._getItemInfoFromElement(_1),
_4=_3.item;
if(_4){
_4.$188n()}
return}
}
,isc.A.$763=function isc_c_FormItem___nativeFocusHandler(_1){
var _2=isc.DynamicForm._getItemInfoFromElement(_1),
_3=_2.item;
if(_3!=null){
if(_3.isDisabled()){
_1.blur();
return}
var _4=this.ns.EH;
if(_4.mouseDownEvent!=null&&
_4.$i2[_4.mouseDownEvent.DOMevent.type]===_4.TOUCH_START&&
this.containerWidget!=null&&
this.containerWidget.isDrawn())
{
var _5=_4.mouseDownEvent.DOMevent,
_6=(_5.target&&(_5.target.nodeType==1?_5.target
:_5.target.parentElement));
if(_6!=null&&!this.containerWidget.getClipHandle().contains(_6)){
_1.blur();
return}
}
return _3.$12v(_1,_3)}
isc.EH.$h2()}
,isc.A.$12w=function isc_c_FormItem__nativeBlurHandler(){
if(!window.isc||!isc.DynamicForm)return;
if(isc.EH.useFocusInEvents&&isc.EH.synchronousFocusNotifications){
return}
isc.EH.$h1("IBLR");
var _1;
if(isc.Log.supportsOnError){
_1=isc.FormItem.$764(this)}else{
try{
_1=isc.FormItem.$764(this)}catch(e){
isc.Log.$am(e);
if(isc.Log.rethrowErrors){
throw e;}
}
}
isc.EH.$h2();
return _1}
,isc.A.$764=function isc_c_FormItem___nativeBlurHandler(_1){
var _2=isc.DynamicForm._getItemInfoFromElement(_1),
_3=_2.item;
if(_3&&_3.hasFocus){
return _3.$12x(_1,_3)}
}
,isc.A.$1851=function isc_c_FormItem__nativeCut(_1){
if(!window.isc)return;
var _2=this,
_3=isc.DynamicForm._getItemInfoFromElement(_2),
_4=_3.item;
if(_4&&_4.hasFocus){
return _4.$43a(_2,_4,true,_1)}
}
,isc.A.$1852=function isc_c_FormItem__nativePaste(_1){
if(!window.isc)return;
var _2=this,
_3=isc.DynamicForm._getItemInfoFromElement(_2),
_4=_3.item;
if(_4&&_4.hasFocus){
return _4.$43a(_2,_4,false,_1)}
}
,isc.A.$12y=function isc_c_FormItem__nativeChangeHandler(){
if(!window.isc||!isc.DynamicForm)return;
var _1=this,
_2=isc.DynamicForm._getItemInfoFromElement(_1),
_3=_2.item;
if(_3)return _3.$12z()}
,isc.A.$120=function isc_c_FormItem__nativeIconFocus(){
if(isc.EH.useFocusInEvents&&isc.EH.synchronousFocusNotifications)return;
var _1=this,
_2=isc.DynamicForm._getItemInfoFromElement(_1),
_3=_2.item,
_4=_2.overIcon;
if(_3){
if(_3.iconIsDisabled(_4))_1.blur();
else return _3.$121(_4,_1)}
}
,isc.A.$122=function isc_c_FormItem__nativeIconBlur(){
if(!window.isc)return;
if(isc.EH.useFocusInEvents&&isc.EH.synchronousFocusNotifications)return;
var _1=this,
_2=isc.DynamicForm._getItemInfoFromElement(_1),
_3=_2.item,
_4=_2.overIcon;
if(_3&&!_3.iconIsDisabled(_4))return _3.$123(_4,_1)}
,isc.A.$124=function isc_c_FormItem__nativeIconClick(){
return false}
,isc.A.$137y=function isc_c_FormItem__testStuckSelectionAfterRedraw(_1){
if(!isc.Browser.isIE)return;
this.$137z=_1;
this.fireOnPause("testStuckSelection",{target:this,methodName:"$1370"})}
,isc.A.$1370=function isc_c_FormItem__testStuckSelection(){
var _1=this.$137z;
if(_1==null||
_1.destroyed||
!_1.isDrawn()||
!_1.isVisible()||
!_1.hasFocus)
{
return}
if(_1.$100a()){
_1.focusInItem()}
}
,isc.A.getErrorPromptString=function isc_c_FormItem_getErrorPromptString(_1){
var _2="";
if(!isc.isAn.Array(_1))_1=[_1];
for(var i=0;i<_1.length;i++){
_2+=(i>0?"<br>":"")+_1[i].asHTML()};
return _2}
,isc.A.$82b=function isc_c_FormItem__getOuterTableStartTemplate(){
if(!this.$819){
isc.Canvas.$816.add({
target:this,
methodName:"$82a"
});
this.$819=true}
if(this.$13y==null){
this.$13y=[
"<TABLE role='presentation' CELLSPACING=0 CELLPADDING=0 BORDER=0 ID='",
,
"' STYLE='"+isc.Canvas.$42a,
,
"' CLASS='",
,
"'><TR>",
,
"<TD style='",
,
"' VALIGN=",
,
">"
]}
return this.$13y}
,isc.A.$82c=function isc_c_FormItem__getIconsCellTemplate(){
if(!this.$819){
isc.Canvas.$816.add({
target:this,
methodName:"$82a"
});
this.$819=true}
if(this.$131==null){
this.$131=[
"</TD><TD VALIGN=",
,
,
,
" style='"+isc.Canvas.$42a+"line-height:",
,
"px' class='",
,
"' ID='",
,
"'>",
null
]}
return this.$131}
,isc.A.$82a=function isc_c_FormItem__doublingStringsChanged(){
this.$13y=null;
this.$131=null}
,isc.A.getPickerIcon=function isc_c_FormItem_getPickerIcon(_1,_2){
var _3=isc.FormItem.standardPickers[_1];
if(!_3)return null;
_3+="."+isc.pickerImgType;
var _4=isc.FormItem.defaultPickerIconSpace||0,
_5=isc.FormItem.defaultPickerIconHeight||22
;
return isc.addProperties({hspace:_4,height:_5,src:_3},_2)}
);
isc.B._maxIndex=isc.C+23;
isc.A=isc.FormItem;
isc.A.$12o="input";
isc.A.$12p="text";
isc.A.$12q="textarea";
isc.A.$15y={};
isc.A.$132s={};
isc.A.standardPickers={
"clear":"[SKIN]/pickers/clear_picker",
"comboBox":"[SKIN]/pickers/comboBoxPicker",
"date":"[SKIN]/pickers/date_picker",
"refresh":"[SKIN]/pickers/refresh_picker",
"search":"[SKIN]/pickers/search_picker"
}
;
isc.A=isc.FormItem.getPrototype();
isc.B=isc._allFuncs;
isc.C=isc.B._maxIndex;
isc.D=isc._funcClasses;
isc.D[isc.C]=isc.A.Class;
isc.A.$152o=null;
isc.A.emptyDisplayValue="";
isc.A.optionTextMatchStyle="exact";
isc.A.multipleValueSeparator=", ";
isc.A.fetchMissingValues=true;
isc.A.alwaysFetchMissingValues=false;
isc.A.loadingDisplayValue="Loading...";
isc.A.useShortDateFormat=true;
isc.A.showInputElement=true;
isc.A.valueIconSize=16;
isc.A.valueIconLeftPadding=0;
isc.A.valueIconRightPadding=3;
isc.A.showFocusedPickerIcon=false;
isc.A.pickerIconHSpace=0;
isc.A.pickerIconDefaults={
};
isc.A.pickerIconName="picker";
isc.A.pickerIconSrc="";
isc.A.pickerDefaults={
backgroundColor:"lightgray"
};
isc.A.visible=true;
isc.A.disableIconsOnReadOnly=true;
isc.A.accessKey=null;
isc.A.changeOnKeypress=true;
isc.A.maintainSelectionOnTransform=true;
isc.A.dirtyOnKeyDown=true;
isc.A.showTitle=true;
isc.A.titleSuffix=null;
isc.A.titlePrefix=null;
isc.A.rightTitleSuffix=null;
isc.A.rightTitlePrefix=null;
isc.A.requiredTitlePrefix=null;
isc.A.requiredTitleSuffix=null;
isc.A.requiredRightTitlePrefix=null;
isc.A.requiredRightTitleSuffix=null;
isc.A.clipTitle=null;
isc.A.width="*";
isc.A.height=20;
isc.A.titleColSpan=1;
isc.A.colSpan=1;
isc.A.rowSpan=1;
isc.A.applyAlignToText=false;
isc.A.left=0;
isc.A.top=0;
isc.A.browserInputTypeMap={
"digits":"number",
"phone":"tel"
};
isc.A.icons=null;
isc.A.$156h=null;
isc.A.$156i=null;
isc.A.$156j=0;
isc.A.$156k=null;
isc.A.$156l=0;
isc.A.defaultIconSrc="[SKIN]/DynamicForm/default_formItem_icon.gif";
isc.A.iconHSpace=3;
isc.A.iconVAlign=isc.Canvas.BOTTOM;
isc.A.iconWidth=20;
isc.A.iconHeight=20;
isc.A.iconPrompt="";
isc.A.showIcons=true;
isc.A.redrawOnShowIcon=false;
isc.A.errorIconHeight=16;
isc.A.errorIconWidth=16;
isc.A.errorIconSrc="[SKIN]/DynamicForm/validation_error_icon.png";
isc.A.showHint=true;
isc.A.showFocused=false;
isc.A.showDisabled=true;
isc.A.showRTL=false;
isc.A.showPending=null;
isc.A.cellStyle="formCell";
isc.A.hintStyle="formHint";
isc.A.titleStyle="formTitle";
isc.A.editPendingCSSText="color:#0066CC;";
isc.A.valueDeselectedCSSText="color:#A8A8A8;text-decoration:line-through;";
isc.A.showFocusedErrorState=false;
isc.A.$125=false;
isc.A.showClippedTitleOnHover=true;
isc.A.showClippedValueOnHover=true
;
isc.A.nullOriginalValueText="None"
;
isc.B.push(isc.A.getReadOnlyDisplay=function isc_FormItem_getReadOnlyDisplay(){
if(this.readOnlyDisplay!=null)return this.readOnlyDisplay;
var _1=this;
while(_1.parentItem!=null){
_1=_1.parentItem;
if(_1.readOnlyDisplay!=null)return _1.readOnlyDisplay}
var _2=this.form;
if(_2!=null){
return _2.readOnlyDisplay}
return isc.DynamicForm.$b4.readOnlyDisplay}
,isc.A.setReadOnlyDisplay=function isc_FormItem_setReadOnlyDisplay(_1){
var _2=this.getReadOnlyDisplay();
this.readOnlyDisplay=_1;
_1=this.getReadOnlyDisplay();
var _3=(_2!==_1&&this.isReadOnly()&&this.isDrawn());
this.updateReadOnlyDisplay(_3);
if(_3)this.redraw()}
,isc.A.updateReadOnlyDisplay=function isc_FormItem_updateReadOnlyDisplay(_1){
var _2=this.$152o;
var _3=this.$152o=this.getReadOnlyDisplay();
if(_2!==_3){
this.$152p(_3,_1)}
}
,isc.A.$152p=function isc_FormItem__readOnlyDisplayChanged(_1,_2){
if(this.readOnlyDisplayChanged!=null)this.readOnlyDisplayChanged(_1)}
,isc.A.getReadOnlyTextBoxStyle=function isc_FormItem_getReadOnlyTextBoxStyle(){
return this.readOnlyTextBoxStyle||
(this.form?this.form.readOnlyTextBoxStyle:"staticTextItem")}
,isc.A.$1617=function isc_FormItem__getClipStaticValue(){
var _1=this;
do{
var _2=_1.clipStaticValue;
if(_2!=null)return _2;
_1=_1.parentElement}while(_1!=null);
var _3=this.form;
if(_3!=null){
return!!_3.clipStaticValue}
return!!isc.DynamicForm.$b4.clipStaticValue}
,isc.A.setTitle=function isc_FormItem_setTitle(_1){
this.title=_1;
this.clearTitleHeightCache(true)}
,isc.A.getTitleHeight=function isc_FormItem_getTitleHeight(){
return this.form&&this.form.getTitleHeight(this)}
,isc.A.clearTitleHeightCache=function isc_FormItem_clearTitleHeightCache(_1){
delete this.$243h;
if(_1){
if(this.form)this.form.markForRedraw("clearTitleHeightCache");
else this.redraw("clearTitleHeightCache")}
}
,isc.A.fitWidthToValueIcon=function isc_FormItem_fitWidthToValueIcon(){
return false}
,isc.A.valueIconClick=function isc_FormItem_valueIconClick(){}
,isc.A.isInGrid=function isc_FormItem_isInGrid(){
return this.$198z?true:isc.isA.GridRenderer(this.containerWidget)}
,isc.A.getListGrid=function isc_FormItem_getListGrid(){
return this.isInGrid()?this.form&&this.form.grid:null}
,isc.A.getGridRowNum=function isc_FormItem_getGridRowNum(){
return this.rowNum}
,isc.A.getGridColNum=function isc_FormItem_getGridColNum(){
return this.colNum}
,isc.A.getTopLevelCanvas=function isc_FormItem_getTopLevelCanvas(){
return this.containerWidget?this.containerWidget.getTopLevelCanvas():null}
,isc.A.getVAlign=function isc_FormItem_getVAlign(){
if(this.form&&this.form.getTitleOrientation(this)=="top")return"top";
return this.vAlign}
,isc.A.shouldWrap=function isc_FormItem_shouldWrap(){
if(this.renderAsStatic()&&this.wrapStaticValue!=null)return this.wrapStaticValue
return this.wrap}
,isc.A.getUpdateTextBoxOnOver=function isc_FormItem_getUpdateTextBoxOnOver(){
return this.updateTextBoxOnOver}
,isc.A.getUpdateControlOnOver=function isc_FormItem_getUpdateControlOnOver(){
return this.updateControlOnOver}
);
isc.B._maxIndex=isc.C+20;
isc.A=isc.FormItem.getPrototype();
isc.B=isc._allFuncs;
isc.C=isc.B._maxIndex;
isc.D=isc._funcClasses;
isc.D[isc.C]=isc.A.Class;
isc.A.$o5="height";
isc.A.$o6="width";
isc.A.$126="colSpan";
isc.A.$127="rowSpan";
isc.A.$pa="*";
isc.A.$bv="_";
isc.A.$128="value";
isc.A.$129="dataElement";
isc.A.$11="label";
isc.A.$16ae=" for='";
isc.A.$1566=" accesskey='";
isc.A.$4n=" class='";
isc.A.$1567=[
"<label id='",
,
"'",
,
,
,
,
,
,
" style='",
,
"'",
,
,
,
">",
,
"</label>"
];
isc.A.$o9="%";
isc.A.errorMessageWidth=80;
isc.A.$170o="_label";
isc.A.$68w=1;
isc.A.$682=new RegExp(".*_inactiveContext(.*)$");
isc.A.$13a="<DIV STYLE='position:absolute;z-index:";
isc.A.$139w=";left:";
isc.A.$13b="px;top:";
isc.A.$13c="px;width:";
isc.A.$13d="px;height:";
isc.A.$13e="px;' ID='";
isc.A.$13f="'>";
isc.A.$13g="</DIV>";
isc.A.$13h=[
"<SPAN style='",
,
"' eventProxy=",
,
" "+isc.DynamicForm.$89+"='",
,
"' ID='",
,
"'>"
];
isc.A.$13i="</SPAN>";
isc.A.$13j="$13k";
isc.A.addContentToStandaloneFormProxy=isc.Browser.isChrome;
isc.A.$13l="$13m";
isc.A.$13n=[
"<DIV isDisabledEventMask='true' style='overflow:hidden;position:absolute;width:",
null,
"px;height:",
null,
"px' "+isc.DynamicForm.$89+"='",
null,
"' "+isc.DynamicForm.$9a+"='"+isc.DynamicForm.$9b+"' ID='",
,
"'>",
null,
"</DIV>"
];
isc.A.$13o="hiddenDataElement";
isc.A.$13p="control";
isc.A.$13q="textBox";
isc.A.$169o="inlineiconswrapper";
isc.A.$13r="pickerIconCell";
isc.A.$59p="hintCell";
isc.A.$13s="FormItemStyling";
isc.A.$13t="deprecated";
isc.A.$13u="Over";
isc.A.$13v="Down";
isc.A.$13w="Disabled";
isc.A.$258q="Focused";
isc.A.$2909="FocusedOver";
isc.A.$260b="Error";
isc.A.$260j="ErrorOver";
isc.A.$260k="ErrorDown";
isc.A.$260l="ErrorDisabled";
isc.A.$291a="ErrorFocused";
isc.A.$291b="ErrorFocusedOver";
isc.A.$13x="valueIcon";
isc.A.$169p="absolutePositioning";
isc.A.$13z="</TD></TR></TABLE>";
isc.A.$130=[
"<TABLE role='presentation' ID='",
,
"' "+isc.DynamicForm.$89+"='",
,
"' "+isc.DynamicForm.$9a+"='"+isc.DynamicForm.$9e,
"' CELLPADDING=0 CELLSPACING=0 STYLE='",
,
"' CLASS='",
,
"'><TR><TD style='",
,
"'>",
,
"</TD><TD ID='",
,
"' "+isc.DynamicForm.$9a+"='"+isc.DynamicForm.$1905,
"' CLASS='",
,
"' STYLE='",
,
"'>",
,
"</TD></TR></TABLE>"
];
isc.A.$132=[
"<TD ID='",
,
"' CLASS='",
,
"' style='",
,
,
,
,
"'",
,
">",
,
,
,
,
null
];
isc.A.showErrorIconInline=null;
isc.A.$169q=[
"<div id='",
,
"' class='",
,
"' style='position:relative;display:inline-block;",
,
"'>",
,
,
,
"</div>"
];
isc.A.hintPlacement=null;
isc.A.$92q="iconCell";
isc.A.$133="$134";
isc.A.$160x="parentItemCell";
isc.A.$160y="printTitle";
isc.A.$160z="title";
isc.A.inlineStyleSuffix="";
isc.A.showInlineStyle=false;
isc.A.$1600="printTextBox";
isc.A.$1601="pickerIcon";
isc.A.$135="white-space:normal;";
isc.A.$136="white-space:nowrap;";
isc.A.$137="min-width:";
isc.A.$11j="max-width:";
isc.A.$138="min-height:";
isc.A.$93="width:";
isc.A.$92="height:";
isc.A.$38="px;";
isc.A.$39=";";
isc.A.$139={};
isc.A.$14a="cursor:default;";
isc.A.$1148="overflow:hidden;"+isc.Browser.$114w+":ellipsis;";
isc.A.$14c="text-align:";
isc.A.$1028="line-height:";
isc.A.$1103="border-box";
isc.A.$1106=isc.Element.$1434+":";
isc.A.$14d="font-size:";
isc.A.$14e=" ACCESSKEY='";
isc.A.$14f=" TABINDEX='";
isc.A.$ob="'";
isc.A.$14g=["<DIV ID='",
,
"' "+isc.DynamicForm.$89+"='",
,
"' "+isc.DynamicForm.$9a+"='"+isc.DynamicForm.$9c,
"' CLASS='",
,
"' STYLE='",
,
"'",
,
">",
,
,
"</DIV>"
];
isc.A.$157e=[
"<table role='presentation' cellpadding='0' cellspacing='0' style='table-layout:fixed;overflow:hidden' width='",
,
"'",
,
"><tbody><tr><td",
,
" id='",
,
"' "+isc.DynamicForm.$89+"='",
,
"' "+isc.DynamicForm.$9a+"='"+isc.DynamicForm.$9c,
"' class='",
,
"' style='",
,
";overflow:hidden' valign='middle'",
,
">",
,
,
"</td></tr></tbody></table>"
];
isc.A.$115o=" nowrap='true'";
isc.A.errorIconName="isc_errorIcon";
isc.A.$n3="drawing";
isc.A.mustRefocusOnRedraw=true;
isc.A.$14h="#";
isc.A.$92r=(!isc.Browser.isSafari)&&
(!isc.Browser.isMoz);
isc.A.$156m="<table role='presentation' cellpadding=0 cellspacing=0 margin=0 style='";
isc.A.$156n="'><tr>";
isc.A.$156o="<td>";
isc.A.$156p="</td>";
isc.A.$156q="</table>";
isc.A.showErrorPickerIcon=false;
isc.A.showErrorHintStyle=false;
isc.A.$132t="rtl";
isc.A.$132u="RTL";
isc.A.$14i="vertical-align:";
isc.A.$133c=[
,
,
";margin-top:",
,
"px;margin-bottom:",
,
"px;",
,
,
,
,
"-webkit-touch-callout:none"
,""
];
isc.A.$14j={};
isc.A._$_iLink_="_iLink_";
isc.A._$_iImg_="_iImg_";
isc.A.$18q="true";
isc.A.$18r="false";
isc.A.$14k="cell";
isc.A.$54t="&nbsp;";
isc.A.canEscapeHTML=false;
isc.A.applyStaticTypeFormat=true;
isc.A.mapEmptyDisplayValue=true;
isc.A.$14l="smart";
isc.A.$172l=0;
isc.A.$14m={
"Tab":true,
"Arrow_Left":true,
"Arrow_Right":true,
"Arrow_Up":true,
"Arrow_Down":true,
"Home":true,
"End":true,
"Page_Up":true,
"Page_Down":true,
"Enter":true
};
isc.A.shouldSaveValue=true;
isc.A.$152q=null;
isc.A.useAdvancedCriteria=null;
isc.A.allowEmptyStringInArrayCriterion=false;
isc.A.$228c=[
"Tab"
];
isc.A.$146q="setSelectionRange";
isc.A.$14n="character";
isc.A.$279t=["password","search","tel","text","url"];
isc.A.allowTextSelection=null;
isc.A.$146r="getSelectionRange";
isc.A.$14o="EndToEnd";
isc.A.$14p="EndToStart";
isc.A.$119n="StartToEnd";
isc.A.$119o="StartToStart";
isc.A.$14n="character";
isc.A.enforceLength=false;
isc.A.$683={
};
isc.A.$115=isc.Class.NO_OP;
isc.A.suppressPickerForCustomIconClick=true;
isc.A.$10j="Enter";
isc.A.$304="Space";
isc.A.$20w="Escape";
isc.A.iconClickOnEnter=true;
isc.A.iconClickOnSpace=true;
isc.A.$54n="img";
isc.A.readOnlyCanSelectText=["static","readOnly"];
isc.A.supportsMultilineEntry=false;
isc.A.$1160=isc.Class.NO_OP;
isc.A.supportsCutPasteEvents=false;
isc.A.$jf="Tab";
isc.A.$145b={
"Backspace":true,
"Delete":true
};
isc.A.$145c={
"Arrow_Up":true,
"Arrow_Left":true,
"Home":true
};
isc.A.$145d={
"Arrow_Down":true,
"Arrow_Right":true,
"End":true
};
isc.A.stopCharacterKeyPressBubbling=false;
isc.A.stopNavKeyPressBubbling=false;
isc.A.$14q="$14r";
isc.A.$1598="$149y";
isc.A.$170p=["Tab","Arrow_Up","Arrow_Down","Arrow_Left","Arrow_Right","Insert",
"Home","End","Page_Up","Page_Down","Escape","Shift","Ctrl","Alt"];
isc.A.$14s={
colSpan:true,
rowSpan:true,
startRow:true,
endRow:true,
showTitle:true,
showHint:true
};
isc.A.$59q={
baseStyle:true,
showFocused:true,
showErrorStyle:true,
controlStyle:true,
pickerIconStyle:true,
textBoxStyle:true
};
isc.A.$172o={
readOnlyWhen:true,
visibleWhen:true,
requiredWhen:true,
formula:true,
textFormula:true
};
isc.A.$59r="itemCellStyle";
isc.A.defaultBetweenOperator="iBetweenInclusive";
isc.A.useWildCardsByDefault=true;
isc.A.$87p="ZZZZZZZZZZ";
isc.B.push(isc.A.init=function isc_FormItem_init(){
if(isc.$cv)arguments.$cw=this;
if(this.icons!=null){
var _1=[];
for(var i=0;i<this.icons.length;i++){
_1.add(isc.addProperties({},this.icons[i]))}
this.icons=_1}
if(this.readOnlyCanSelectText!=null&&
this.getClass().getPrototype().readOnlyCanSelectText==this.readOnlyCanSelectText)
{
this.readOnlyCanSelectText=this.readOnlyCanSelectText.duplicate()}
this.$152q=this.getCanEdit();
this.$152o=this.getReadOnlyDisplay();
if(this.ID==null||window[this.ID]!=this){
isc.ClassFactory.addGlobalID(this)}
if(this.showInlineStyle&&this.inlineStyleSuffix){
if(this.textBoxStyle)this.textBoxStyle+=this.inlineStyleSuffix;
if(this.controlStyle)this.controlStyle+=this.inlineStyleSuffix}
this.initializeTabPosition();
if(this.options&&!this.valueMap){
this.valueMap=this.options;
delete this.options}
this.$14t(this.$o5);
this.$14t(this.$o6);
this.$14t(this.$126);
this.$14t(this.$127);
this._value=this.getDefaultValue();
this.$14u=true;
this.$14v();
if((!this.validateOnExit||!this.synchronousValidation)&&
this.validators&&this.validators.length>0)
{
for(var i=0;i<this.validators.length;i++){
if(this.validators[i].stopOnError){
this.validateOnExit=true;
this.synchronousValidation=true;
break}
}
}
if((!this.validateOnExit||!this.synchronousValidation)&&
((this.stopOnError==null&&this.form&&this.form.stopOnError)||this.stopOnError))
{
this.validateOnExit=true;
this.synchronousValidation=true}
this.$249q();
if(this.__sgwtRelink)this.__sgwtRelink();
this.onInit()}
,isc.A.initializeTabPosition=function isc_FormItem_initializeTabPosition(_1){
var _2=this.form?this.form.getID():null;
isc.TabIndexManager.addTarget(
this.ID,
true,
_2,
null,
{target:this,methodName:"autoTabIndexUpdated"},
{target:this,methodName:"syntheticShiftFocus"},
this.tabGroupExit!=null?{target:this,methodName:"tabGroupExit"}:null
)}
,isc.A.onInit=function isc_FormItem_onInit(){
}
,isc.A.isRTL=function isc_FormItem_isRTL(){
return this.containerWidget==null?isc.Page.isRTL():this.containerWidget.isRTL()}
,isc.A.$14t=function isc_FormItem__convertRawToMeasure(_1){
var _2=this[_1];
if(_2==null||isc.isA.Number(_2)||_2==this.$pa)return _2;
var _3=parseInt(_2);
if(_3==_2){
this[_1]=_3;
return _2}
return _2}
,isc.A.destroy=function isc_FormItem_destroy(_1,_2,_3,_4,_5){
if(this.destroyed)return;
if(isc.FormItem.$92t==this){
isc.FormItem.$92t.checkForEditorExit(true,true)}
this.invalidateDisplayValueCache(true);
if(this.isDrawn())this.cleared();
if(this.reusePickList!=null){
var _6=this.pickList;
this.pickList=null;
if(_6!=null){
if(_6.formItem==this)delete _6.formItem;
if(_6.isVisible())_6.hide();
if(!this.reusePickList())_6.destroy();
else if(_6.body)_6.body.$100r=true}
}
var _7=this.$542;
if(_7!=null){
for(var _8 in _7){
var _9=_7[_8];
for(var i=0,_11=_9.length;i<_11;++i){
var _12=_9[i],
_13=(_12?window[_12]:null)||this[_8];
if(_13&&!_13.destroyed&&_13.destroy&&!_13.dontAutoDestroy){
_13.destroy()}
}
delete this[_8]}
}
this.destroyed=true;
if(this.form){
this.form.$180m(this);
this.form=null}
this.$14x=null;
isc.ClassFactory.dereferenceGlobalID(this);
this.$63x();
if(isc.EH.$52d==this)isc.EH.$52d=null;
this.invokeSuper(isc.FormItem,"destroy",_1,_2,_3,_4,_5)}
,isc.A.clear=function isc_FormItem_clear(){
if(this.picker)this.picker.clear()}
,isc.A.getDataSource=function isc_FormItem_getDataSource(){
if(isc.isA.String(this.dataSource))return isc.DS.get(this.dataSource);
return this.dataSource}
,isc.A.registerWithDataView=function isc_FormItem_registerWithDataView(_1){
if(!this.inputDataPath)return;
if(!_1){
_1=this.form;
while(_1&&!isc.isA.DataView(_1))_1=_1.parentElement}
if(!_1){
this.logWarn("Component initialized with an inputDataPath property, but no DataView was found in the parent hierarchy. inputDataPath is only applicable to DataBoundComponents and FormItems being managed by a DataView");
return}
_1.registerItem(this)}
,isc.A.$170g=function isc_FormItem__getNotificationCallback(_1){
var _2=this;
do{
if(_1 in _2){
return{
target:_2,
methodName:_1
}}
}while((_2=_2.parentItem)!=null);
return null}
,isc.A.getFieldName=function isc_FormItem_getFieldName(){
return this.name}
,isc.A.getDataPath=function isc_FormItem_getDataPath(){
return this.dataPath}
,isc.A.getTrimmedDataPath=function isc_FormItem_getTrimmedDataPath(){
var _1=this.getDataPath();
if(_1&&this.form&&this.form.dataPath){
_1=this.form.$840(_1)}
if(_1&&_1.endsWith("/"))_1=_1.substring(0,_1.length-1);
return _1}
,isc.A.getFullDataPath=function isc_FormItem_getFullDataPath(){
var _1=this.getDataPath()||this.getFieldName();
if(!_1){
if(this.shouldSaveValue){
this.logWarn("Encountered field with neither name nor dataPath: "+
this.echo(this))}
_1=""}
if(!isc.isA.String(_1))_1=_1+"";
if(_1.startsWith(isc.Canvas.$70l))return _1;
var _2=this.form.getFullDataPath();
if(_2&&_2!=isc.Canvas.$70l){
return _2+isc.Canvas.$70l+_1}
return _1}
,isc.A.shouldSaveOnEnter=function isc_FormItem_shouldSaveOnEnter(){
var _1=this.saveOnEnter!=null?this.saveOnEnter:false;
return _1}
,isc.A.getItemName=function isc_FormItem_getItemName(){
return this.getFieldName()}
,isc.A.getElementName=function isc_FormItem_getElementName(){
if(this.isInactiveHTML())return"";
var _1=this.getFieldName();
if(this.parentItem){
var _2=this.parentItem.getElementName();
if(_1==isc.emptyString)_1=_2;
else _1=[_2,this.$bv,_1].join(isc.emptyString)}
if(_1==null||_1==this.getID()||_1==isc.emptyString){
_1=this.$qs(this.$128)}
return _1}
,isc.A.getBrowserInputType=function isc_FormItem_getBrowserInputType(){
var _1=this.browserInputType;
if(_1==null)return null;
if(this.browserInputTypeMap.hasOwnProperty(_1)){
_1=this.browserInputTypeMap[_1]}
return _1}
,isc.A.getDataElementId=function isc_FormItem_getDataElementId(){
if(this.isInactiveHTML())return this.$qs(this.$129);
if(this.$14y==null){
this.$14y=this.$qs(this.$129,true)}
return this.$14y}
,isc.A.getItemID=function isc_FormItem_getItemID(){
return this.getID()}
,isc.A.getID=function isc_FormItem_getID(){
if(this.ID==null){
isc.ClassFactory.addGlobalID(this)}
return this.ID}
,isc.A.shouldShowTitle=function isc_FormItem_shouldShowTitle(){
return this.showTitle}
,isc.A.willWriteTitleInline=function isc_FormItem_willWriteTitleInline(){
return false}
,isc.A.$1568=function isc_FormItem__getLabelElementID(){
return this.$qs(this.$11)}
,isc.A.getTitleHTML=function isc_FormItem_getTitleHTML(){
if(this.willWriteTitleInline())return"";
return this.$236p(this.getTitle())}
,isc.A.$236p=function isc_FormItem__getTitleHTML(_1){
var _2=this.$1567,
_3=null,
_4=null;
if(this.$kk()){
_4=this.accessKey;
if(_4!=null){
_1=isc.Canvas.hiliteCharacter(_1,_4)}
if(this.hasDataElement())_3=this.getDataElementId()}
_2[1]=this.$1568();
if(_3!=null){
_2[3]=this.$16ae
_2[4]=_3;
_2[5]=isc.apos}else{
_2[5]=_2[4]=_2[3]=null}
if(_4!=null){
_2[6]=this.$1566
_2[7]=_4;
_2[8]=isc.apos}else{
_2[8]=_2[7]=_2[6]=null}
if(!this.labelAsTitle&&(isc.isA.CheckboxItem(this)||isc.isA.RadioItem(this))){
_2[10]="vertical-align: middle;";
if(this.labelStyle){
_2[12]=this.$4n;
_2[13]=this.labelStyle;
_2[14]=isc.apos}else{
_2[12]=_2[13]=_2[14]=null}
}else{
_2[10]="display:inline;";
_2[12]=_2[13]=_2[14]=null}
_2[16]=_1;
return _2.join(isc.$ad)}
,isc.A.getMaxTitleSpace=function isc_FormItem_getMaxTitleSpace(){
return this.getVisibleWidth()}
,isc.A.getTitle=function isc_FormItem_getTitle(){
var _1;
if(!this.form)return;
var _2=this[this.form.titleField]
if(_2!==_1){
if(isc.isA.emptyString(_2))_2="&nbsp;"
return _2}
if(!this._autoAssignedName)return this.name}
,isc.A.getTitleOrientation=function isc_FormItem_getTitleOrientation(){return this.form.getTitleOrientation(this)}
,isc.A.isVisible=function isc_FormItem_isVisible(_1){
if(!_1&&!this.containerWidget.isVisible())return false;
if(this.visible==false)return false;
if(this.parentItem&&!this.parentItem.isVisible(_1))return false;
return true}
,isc.A.getRowSpan=function isc_FormItem_getRowSpan(){
return this.rowSpan}
,isc.A.getColSpan=function isc_FormItem_getColSpan(){
var _1=this.colSpan;
if(this.form&&this.form.linearMode){
if(this.linearColSpan!=null){
_1=this.linearColSpan}else if(this.form.linearAutoSpanItems){
_1="*"}
}
if(_1==0)_1=1;
return _1}
,isc.A.getTitleColSpan=function isc_FormItem_getTitleColSpan(){
if(this.titleColSpan==0)this.titleColSpan=1;
return this.titleColSpan}
,isc.A.isStartRow=function isc_FormItem_isStartRow(){
var _1=this.startRow;
if(this.form&&this.form.linearMode){
if(this.linearStartRow!=null)_1=this.linearStartRow
else if(this.form.linearAutoSpanItems)_1=false}
return _1}
,isc.A.isEndRow=function isc_FormItem_isEndRow(){
var _1=this.endRow;
if(this.form&&this.form.linearMode){
if(this.linearEndRow!=null){
_1=this.linearEndRow}else if(this.form.linearAutoSpanItems){
_1=true}
}
return _1}
,isc.A.getRect=function isc_FormItem_getRect(){
return[this.getLeft(),this.getTop(),this.getVisibleWidth(),this.getVisibleHeight()]}
,isc.A.getPageRect=function isc_FormItem_getPageRect(_1){
if(_1)return this.getPageRectIncludingTitle();
return[this.getPageLeft(),this.getPageTop(),
this.getVisibleWidth(),this.getVisibleHeight()]}
,isc.A.getPeerRect=function isc_FormItem_getPeerRect(){
return this.getPageRect()}
,isc.A.getPageRectIncludingTitle=function isc_FormItem_getPageRectIncludingTitle(){
var _1=this.getPageLeft(),
_2=this.getPageTop(),
_3=this.getVisibleWidth(),
_4=this.getVisibleHeight();
if(this.showTitle){
var _5=this.getTitlePageLeft(),
_6=this.getTitlePageTop(),
_7=this.getVisibleTitleWidth(),
_8=this.form.getTitleHeight(this);
if(this.titleOrientation=="left"||this.titleOrientation==null){
_1=_1<_5?_1:_5;
_3+=_7}else{
_1=_1<_5?_1:_5;
_3=_3>_7?_3:_7;
if(isc.isA.Number(_8)){
_4+=_8;
_2-=_8}
}
}
return[_1,_2,_3,_4]}
,isc.A.getCellHeight=function isc_FormItem_getCellHeight(_1){
if(isc.$cv)arguments.$cw=this;
if(this.cellHeight!=null){
return this.cellHeight}
var _2=this.getHeight(_1);
if(!isc.isA.Number(_2))return _2;
var _3=this.getIconsHeight();
if(_2<_3){
_2=_3}
if(this.pickerIconHeight&&this.$185k()){
var _4=this.pickerIconHeight+this.$14z();
if(_4>_2)_2=_4}
var _5=this.containerWidget;
if(this.$11e()||!isc.isA.DynamicForm(_5))return _2;
_2+=this.$140();
if(this.showTitle&&this.form.getTitleOrientation(this)==isc.Canvas.TOP&&!this.form.linearMode){
_2+=this.form.getTitleHeight(this)}
return _2}
,isc.A.shouldFixRowHeight=function isc_FormItem_shouldFixRowHeight(){
return this.cellHeight!=null||
(!this.shouldApplyHeightToTextBox()&&this.getHeight()!=null)}
,isc.A.$140=function isc_FormItem__getCellVBorderPadSpacing(){
var _1=0,
_2=this.form,
_3=this.getCellStyle();
if(this.parentItem)_2=this.parentItem;
_1+=2*_2.cellSpacing;
var _4=isc.isA.Number(_2.cellPadding)?_2.cellPadding:0,
_5=isc.Element.$tt(_3,true);
if(_5==null)_5=_4
var _6=isc.Element.$tu(_3,true);
if(_6==null)_6=_4;
_1+=_5;
_1+=_6;
_1+=isc.Element.$ym(_3);
return _1}
,isc.A.$141=function isc_FormItem__getCellHBorderPadSpacing(){
var _1=0,
_2=this.form,
_3=this.getCellStyle();
if(this.parentItem)_2=this.parentItem;
if(isc.isA.Number(_2.cellHSpacing))_1+=2*_2.cellHSpacing;
else if(isc.isA.Number(_2.cellSpacing))_1+=2*_2.cellSpacing;
var _4=isc.isA.Number(_2.cellPadding)?_2.cellPadding:0,
_5=isc.Element.$tr(_3,true);
if(_5==null)_5=_4;
var _6=isc.Element.$ts(_3,true);
if(_6==null)_6=_4;
_1+=_5;
_1+=_6;
_1+=isc.Element.$yn(_3);
return _1}
,isc.A.getInnerHeight=function isc_FormItem_getInnerHeight(){
var _1=this.containerWidget;
if(this.$11e())return this.$11p(this.height,true);
if(this.$8t==null&&this.height!=null&&isc.isA.String(this.height)&&
this.containerWidget&&!isc.isA.DynamicForm(this.containerWidget)&&
this.containerWidget.sizeFormItem!=null)
{
this.containerWidget.sizeFormItem(this)}
if(this.$8t){
var _2=this.$8t[1];
if(!isc.isA.Number(_2))return _2;
if(this.$142()){
_2-=this.$140()}
return _2}
return this.getHeight()}
,isc.A.getInnerWidth=function isc_FormItem_getInnerWidth(_1){
var _2=this.containerWidget;
if(this.$11e())return this.$11p(this.width);
if(this.$8t==null&&this.width!=null&&isc.isA.String(this.width)&&
this.containerWidget&&!isc.isA.DynamicForm(this.containerWidget)&&
this.containerWidget.sizeFormItem!=null)
{
this.containerWidget.sizeFormItem(this)}
var _3=this.$8t?this.$8t[0]:this.width;
if(!isc.isA.Number(_3)){
return _3}
if(this.$142()){
_3-=this.$141()}
return Math.max(0,_3)}
,isc.A.getColWidth=function isc_FormItem_getColWidth(){
var _1=this.form?this.form.items:null;
if(_1&&_1.$8r!=null&&this.$8m!=null){
var _2=this.$8m[0],
_3=this.$8m[2];
if(this.showTitle){
var _4=this.getTitleOrientation();
if(_4==isc.Canvas.LEFT)_2+=1;
else if(_4==isc.Canvas.RIGHT)_3-=1}
var _5=0;
for(var c=_2;c<_3;c++){
_5+=_1.$8r[c]}
return _5}
return null}
,isc.A.getMaxHeight=function isc_FormItem_getMaxHeight(){
return this.maxHeight}
,isc.A.getMinHeight=function isc_FormItem_getMinHeight(){
return this.minHeight}
,isc.A.$11e=function isc_FormItem__absPos(){
return(this.containerWidget.$11e&&this.containerWidget.$11e())}
,isc.A.$142=function isc_FormItem__writtenIntoCell(){
return(this.containerItem!=null||
(this.form==this.containerWidget&&!this.$11e()))}
,isc.A.$11p=function isc_FormItem__getPercentCoord(_1,_2){
if(isc.isA.String(_1)&&isc.endsWith(_1,this.$o9)){
var _3=this.containerWidget,
_4=_2?_3.getInnerHeight():_3.getInnerWidth();
return Math.round((parseInt(_1,10)/100)*_4)}
return _1}
,isc.A.getElementWidth=function isc_FormItem_getElementWidth(){
if(this.fitWidthToValueIcon()&&this.showValueIconOnly){
var _1=this.$186i();
_1+=this.getPickerIconHSpace();
return _1}
var _1=this.getInnerWidth();
if(!isc.isA.Number(_1))return null;
_1-=this.getTotalIconsWidth();
return(isc.isA.Number(_1)?Math.max(_1,1):null)}
,isc.A.getPickerIconHSpace=function isc_FormItem_getPickerIconHSpace(){
var _1=0;
if(this.showPickerIcon){
if(this.$185k()){
_1+=this.getPickerIconWidth()}
var _2=this.getPickerIcon();
if(_2.hspace!=null)_1+=_2.hspace;
if(this.pickerIconStyle)
_1+=isc.Element.$yp(this.getPickerIconStyle());
if(this.controlStyle){
_1+=isc.Element.$yp(this.getControlStyle())}
}
return _1}
,isc.A.getTextBoxWidth=function isc_FormItem_getTextBoxWidth(_1){
if(this.fitWidthToValueIcon()&&this.showValueIconOnly){
return this.$186i()}
var _2=this.getElementWidth();
if(!isc.isA.Number(_2))return _2;
var _3=this.getTextBoxStyle();
if(_3!=null){
_2-=(isc.Element.$tf(_3)+
isc.Element.$tg(_3));
if(this.$143()){
_2-=isc.Element.$yp(_3)}
}
if(!this.$68y()&&this.$1857()&&this.controlStyle){
_2-=isc.Element.$yp(this.getControlStyle())}
if(this.$185k()){
_2-=this.getPickerIconWidth();
var _4=this.getPickerIcon();
if(_4.hspace!=null)_2-=_4.hspace;
if(this.pickerIconStyle)
_2-=isc.Element.$yp(this.getPickerIconStyle())}
_2-=this.$156j+this.$156l;
if(this.hasDataElement()&&this.$144(_1)){
_2-=((this.getValueIconWidth()||0)+
(this.valueIconLeftPadding+this.valueIconRightPadding))}
return Math.max(0,_2-this.$672())}
,isc.A.getLogicalTextBoxWidth=function isc_FormItem_getLogicalTextBoxWidth(){
var _1=this.getElementWidth();
if(this.showPickerIcon)_1-=this.getPickerIconHSpace();
return _1}
,isc.A.getErrorWidth=function isc_FormItem_getErrorWidth(){
var _1=0;
if(this.shouldShowErrorIconInline()){
return this.errorIconWidth+this.iconHSpace}else if(this.form.showInlineErrors&&this.hasErrors()){
var _2=this.getErrorOrientation();
if(_2==isc.Canvas.LEFT||_2==isc.Canvas.RIGHT){
if(this.shouldShowErrorText()){
_1+=this.errorMessageWidth}else if(this.shouldShowErrorIcon()){
_1+=this.errorIconWidth+this.iconHSpace}
}
}
return _1}
,isc.A.$672=function isc_FormItem__getErrorWidthAdjustment(){
var _1=this.getErrorWidth();
if(_1!=0&&this.expandHintAndErrors&&(this.getColWidth()!=null)){
var _2=this.getColWidth()-this.getInnerWidth();
if(_2>0)_1-=_2;
if(_1<0)_1=0}
return _1}
,isc.A.shouldApplyHeightToTextBox=function isc_FormItem_shouldApplyHeightToTextBox(){
if(this.applyHeightToTextBox!=null)return this.applyHeightToTextBox;
if(this.renderAsStatic())return!!this.clipStaticValue;
return true}
,isc.A.getTextBoxHeight=function isc_FormItem_getTextBoxHeight(_1){
if(!this.shouldApplyHeightToTextBox()){
return null}
var _2=this.getPixelHeight(true);
if(!isc.isA.Number(_2))return _2;
var _3=this.getTextBoxStyle();
if(_3!=null){
_2-=(isc.Element.$th(_3)+
isc.Element.$ti(_3));
if(this.$143()){
_2-=isc.Element.$yo(_3)}
}
if(this.$1857()&&this.controlStyle){
_2-=isc.Element.$yo(this.getControlStyle())}
if(this.showTitle&&this.form.getTitleOrientation(this)==isc.Canvas.TOP&&
!isc.isA.Number(this.getCellHeight()))
{
_2-=this.form.getTitleHeight(this)}
return _2}
,isc.A.$143=function isc_FormItem__sizeTextBoxAsContentBox(){
return!isc.Browser.isBorderBox}
,isc.A.getPickerIconWidth=function isc_FormItem_getPickerIconWidth(){
var _1=this.pickerIconWidth!=null?this.pickerIconWidth:this.getPickerIconHeight(true);
if(_1==null)_1=this.iconWidth;
return _1}
,isc.A.getPickerIconHeight=function isc_FormItem_getPickerIconHeight(_1){
if(this.pickerIconHeight!=null)return this.pickerIconHeight;
else{
var _2=(isc.isA.Number(this.getHeight())?this.getHeight():this.getInnerHeight());
if(!_1&&_2==null)return this.iconHeight;
if(!isc.isA.Number(_2))return null;
_2-=this.$14z();
this.pickerIconHeight=_2;
return _2}
}
,isc.A.$14z=function isc_FormItem__getPickerIconVPad(){
var _1=0;
if(this.controlStyle){
_1+=isc.Element.$yo(this.controlStyle)}
if(this.pickerIconStyle){
_1+=isc.Element.$yo(this.pickerIconStyle)}
return _1}
,isc.A.getHeight=function isc_FormItem_getHeight(){
return(this.renderAsStatic()?(this.staticHeight||this.height):this.height)}
,isc.A.getPixelHeight=function isc_FormItem_getPixelHeight(_1){
var _2=this.getHeight();
if(!isc.isA.Number(_2)){
var _3=this.getInnerHeight();
if(this.cellHeight!=null&&isc.isA.String(_2)&&
_2.endsWith("%"))
{
var _4=parseInt(_2);
if(isc.isA.Number(_3)){
_2=Math.round(_3*(_4/100))}else{
_2=_3}
}else{
_2=_3}
}
if(!isc.isA.Number(_2))return _1?_2:-1;
if(this.valueIcons!=null||this.getValueIcon!=null){
var _5=this.getValueIconHeight();
if(_5>_2)_2=_5}
return _2}
,isc.A.getVisibleHeight=function isc_FormItem_getVisibleHeight(){
var _1=this.isDrawn()?this.getOuterElement():null;
if(_1==null){
this.logInfo("getVisibleHeight() - unable to determine drawn height for this item - returning pixel height from specified height","sizing");
if(isc.isA.Number(this.height)){
return this.height}
this.logWarn("getVisibleHeight() unable to determine height - returning zero",
"sizing");
return 0}
return _1.offsetHeight}
,isc.A.getIconHeight=function isc_FormItem_getIconHeight(_1){
if(_1==null&&this.icons!=null&&this.icons.getLength()>0)_1=this.icons[0];
else if(!this.$145(_1)){
this.logWarn("getIconHeight() passed invalid icon:"+isc.Log.echoAll(_1));
return null}
return(_1.height!=null?_1.height:this.iconHeight)}
,isc.A.getTitleVisibleHeight=function isc_FormItem_getTitleVisibleHeight(){
var _1=this.isDrawn()&&this.form
?isc.Element.get(this.form.$427(this))
:null;
if(_1==null){
var _2="getTitleHeight() Unable to determine position for "+
(this.name==null?"this item ":this.name)+". ";
if(this.isDrawn()){
_2+="This method is not supported by items of type "+this.getClass()}else{
_2+="Position cannot be determined before the element is drawn"
}
_2+=" - returning zero.";
this.form.logWarn(_2);
return 0}
return isc.Element.getVisibleHeight(_1)}
,isc.A.getWidth=function isc_FormItem_getWidth(){
return this.width}
,isc.A.getPixelWidth=function isc_FormItem_getPixelWidth(){
var _1=this.getWidth();
if(!isc.isA.Number(_1)){
var _2=this.getInnerWidth();
if(_2!=null){
_1=_2;
_1+=isc.Element.getHBorderSize(this.getHandle())}
}
return isc.isA.Number(_1)?_1:-1}
,isc.A.getVisibleWidth=function isc_FormItem_getVisibleWidth(){
var _1=this.isDrawn()?this.getOuterElement():null;
if(_1==null){
this.logInfo("getVisibleWidth() - unable to determine drawn width for this item - returning pixel width from specified width","sizing");
if(isc.isA.Number(this.width)){
return this.width}else if(this.form&&this.form.items.$8r!=null){
return this.getColWidth()}
this.logWarn("getVisibleWidth() unable to determine width - returning zero",
"sizing");
return 0}
return _1.offsetWidth}
,isc.A.getVisibleTitleWidth=function isc_FormItem_getVisibleTitleWidth(_1){
if(_1){
var _2=isc.Element.get(this.$170q());
if(_2==null){
this.logInfo("getVisibleTitleWidth() was called with labelOnly: true, but this item ("+this.getID()+") has no label element.  Returning the width of the containing cell, as if labelOnly were false")}else{
return _2.offsetWidth}
}
var _2=this.isDrawn()&&this.form
?isc.Element.get(this.form.$427(this))
:null;
if(_2==null){
this.logInfo("getVisibleTitleWidth() - unable to determine drawn width for this item - returning 0","sizing");
return 0}
return _2.offsetWidth}
);
isc.evalBoundary;isc.B.push(isc.A.$170q=function isc_FormItem__getTitleLabelID(){
return this.getID()+this.$170o}
,isc.A.getIconWidth=function isc_FormItem_getIconWidth(_1){
if(_1==null&&this.icons!=null&&this.icons.getLength()>0)_1=this.icons[0];
else if(!this.$145(_1)){
this.logWarn("getIconWidth() passed invalid icon:"+isc.Log.echoAll(_1));
return null}
return(_1.width!=null?_1.width:this.iconWidth)}
,isc.A.setHeight=function isc_FormItem_setHeight(_1){
if("100%"==_1){
this.height="*"}else{
this.height=_1}
this.redraw()}
,isc.A.setWidth=function isc_FormItem_setWidth(_1){
if(_1==this.width)return;
var _2=this.getPixelWidth();
if("100%"==_1){
this.width="*"}else{
this.width=_1}
if(_2==this.getPixelWidth())return;
this.redraw()}
,isc.A.setLeft=function isc_FormItem_setLeft(_1){
this.left=_1;
this.redraw()}
,isc.A.setTop=function isc_FormItem_setTop(_1){
this.top=_1;
this.redraw()}
,isc.A.moved=function isc_FormItem_moved(){
}
,isc.A.visibilityChanged=function isc_FormItem_visibilityChanged(){
}
,isc.A.zIndexChanged=function isc_FormItem_zIndexChanged(){
}
,isc.A.getInactiveEditorHTML=function isc_FormItem_getInactiveEditorHTML(_1,_2,_3,_4){
this.$68x=true;
this.$68u=this.setupInactiveContext(_4);
if(this.logIsDebugEnabled("inactiveEditorHTML")){
this.logDebug("getInactiveEditorHTML() called - context passed in:"+this.echo(_4)+
" generated context ID:"+this.$68u,"inactiveEditorHTML")}
this.$185l();
var _5=this.getStandaloneItemHTML(_1,_2,_3);
delete this.$68u;
delete this.$68x;
return _5}
,isc.A.setupInactiveContext=function isc_FormItem_setupInactiveContext(_1){
if(_1==null)_1={};
if(this.$68y())_1.isPrintHTML=true;
var _2=this.$68w++;
_1.inactiveContextID=_2;
_1.formItem=this;
if(!this.$68v)this.$68v={};
this.$68v[_2]=_1;
return _2}
,isc.A.clearAllInactiveEditorContexts=function isc_FormItem_clearAllInactiveEditorContexts(){
delete this.$68v}
,isc.A.clearInactiveEditorContext=function isc_FormItem_clearInactiveEditorContext(_1){
if(isc.isAn.Object(_1))_1=_1.inactiveContextID;
if(this.$68v)delete this.$68v[_1]}
,isc.A.$681=function isc_FormItem__getInactiveContextFromElement(_1){
if(_1&&_1.id!=null&&this.$68v!=null){
var _2=_1.id,
_3=this.$557(_2);
if(_3){
var _4=_3.match(this.$682);
if(_4){
return this.getInactiveContext(_4[1])}
}
}
return null}
,isc.A.getInactiveContext=function isc_FormItem_getInactiveContext(_1){
return this.$68v[_1]}
,isc.A.isInactiveHTML=function isc_FormItem_isInactiveHTML(){
if(this.parentItem&&this.parentItem.isInactiveHTML())return true;
return this.$68y()||this.$68x}
,isc.A.$68y=function isc_FormItem__isPrinting(){
return this.containerWidget&&this.containerWidget.isPrinting}
,isc.A.$187i=function isc_FormItem__cellNoWrap(){
return false}
,isc.A.getStandaloneItemWrapCSS=function isc_FormItem_getStandaloneItemWrapCSS(){
return"white-space:nowrap;"
}
,isc.A.getStandaloneItemHTML=function isc_FormItem_getStandaloneItemHTML(_1,_2,_3){
var _4=isc.SB.create(),
_5=this.form;
if(_5){
if(this.$11e()){
var _6=this.$11p(this.left),
_7=this.$11p(this.top,true),
_8=this.getInnerWidth(),
_9=this.getInnerHeight();
if(!isc.isA.Number(_6))_6=0;
if(!isc.isA.Number(_7))_7=0;
_4.append(this.$13a);
_4.appendNumber(isc.Canvas._nextZIndex);
_4.append(this.$139w);
_4.appendNumber(_6);
_4.append(this.$13b);
_4.appendNumber(_7);
if(isc.isA.Number(_8)){
_4.append(this.$13c);
_4.appendNumber(_8)}
if(isc.isA.Number(_9)){
_4.append(this.$13d);
_4.appendNumber(_9)}
_4.append(this.$13e,this.$146(),this.$13f)}
var _10=this.$13h,
_11=_5.getID(),
_12=this.getID();
_10[1]=this.getStandaloneItemWrapCSS();
_10[3]=_11;
_10[5]=_12;
_10[7]=this.$qs(this.$13j);
_4.append(_10);
_4.append(this.getInnerHTML(_1,_2,_3,true));
if(this.addContentToStandaloneFormProxy)_4.append(" ");
_4.append(this.$13i);
if(this.$11e()){
_4.append(this.$13g)}
}
return _4.release(false)}
,isc.A.$146=function isc_FormItem__getAbsDivID(){
return this.$qs(this.$13l)}
,isc.A.getAbsDiv=function isc_FormItem_getAbsDiv(_1){
if(this.$13m)return this.$13m;
var _2=this.isDrawn();
if(!_1&&!_2)return;
var _3=isc.Element.get(this.$146());
if(_2)this.$13m=_3;
return _3}
,isc.A.$147=function isc_FormItem__hasExternalIcons(){
var _1=this.icons;
if(!_1)return false;
var _2=this.$156r();
for(var i=0;i<_1.length;i++){
if(_2&&_1[i].inline)continue;
if(!_1[i].writeIntoItem)return true}
return false}
,isc.A.useDisabledEventMask=function isc_FormItem_useDisabledEventMask(){
return((isc.Browser.isMoz&&this.hasDataElement())||
(isc.Browser.isIE&&isc.isA.TextItem(this)))&&
this.getHeight()!=null}
,isc.A.renderDisabledEventMask=function isc_FormItem_renderDisabledEventMask(){
return(this.isInactiveHTML()||this.isDisabled())&&this.useDisabledEventMask()}
,isc.A.$203r=function isc_FormItem__isDisabledEventMaskElement(_1){
if(!this.renderDisabledEventMask())return false;
return this.$43b()!=_1}
,isc.A.$148=function isc_FormItem__getEventMaskHTML(){
var _1=this.$13n;
_1[1]=this.$149();
_1[3]=this.getHeight();
_1[5]=this.getItemID();
_1[7]=this.$qs("eventMask");
_1[9]=this.$938();
return _1.join(isc.emptyString)}
,isc.A.$938=function isc_FormItem__getEventMaskSpacerHTML(){
return isc.Canvas.spacerHTML(1600,100)
}
,isc.A.$43b=function isc_FormItem__getEventMaskElement(){
return isc.Element.get(this.$qs("eventMask"))}
,isc.A.$149=function isc_FormItem__getEventMaskWidth(){
var _1=this.getTextBoxWidth();
if(_1==null){
if(isc.RadioItem&&isc.isA.RadioItem(this)&&this.parentItem!=null){
_1=this.parentItem.getElementWidth()}
if(_1==null)return 0}else{
if(this.form.showInlineErrors&&this.hasErrors()
&&this.getErrorOrientation()==isc.Canvas.LEFT)
{
_1-=this.getErrorWidth()}
}
return _1}
,isc.A.getBrowserSpellCheck=function isc_FormItem_getBrowserSpellCheck(){
if(this.browserSpellCheck!=null)return this.browserSpellCheck;
return this.form.browserSpellCheck}
,isc.A.$11d=function isc_FormItem__useHiddenDataElement(){
return(this.shouldSaveValue&&!this.hasDataElement()&&this.shouldSubmitValue())}
,isc.A.$15a=function isc_FormItem__getHiddenDataElementID(){
return this.$qs(this.$13o)}
,isc.A.$15b=function isc_FormItem__getHiddenDataElement(){
return this.$15c(this.$13o)}
,isc.A.$15c=function isc_FormItem__getHTMLPartHandle(_1){
if(!this.isDrawn())return null;
if(!this.$15d)this.$15d={};
var _2=this.$15d[_1];
if(_2==null){
_2=isc.Element.get(this.$qs(_1));
if(_2!=null)this.$15d[_1]=_2}
return _2}
,isc.A.$15e=function isc_FormItem__getControlTableID(){
return this.$qs(this.$13p)}
,isc.A.$15f=function isc_FormItem__getControlTableElement(){
return this.$15c(this.$13p)}
,isc.A.$15g=function isc_FormItem__getTextBoxID(){
return this.$qs(this.$13q)}
,isc.A.$15h=function isc_FormItem__getTextBoxElement(){
if(this.hasDataElement()&&this.$15i&&!this.renderAsStatic()){
return this.getDataElement()}
return this.$15c(this.$13q)}
,isc.A.$169r=function isc_FormItem__getInlineIconsWrapperID(){
return this.$qs(this.$169o)}
,isc.A.$169s=function isc_FormItem__getElementStyledAsTextBox(){
if(this.$169t()&&this.$169p==="divStyledAsDataElement"){
return this.$15c(this.$169o)}else{
return this.$15h()}
}
,isc.A.$15j=function isc_FormItem__getPickerIconCellID(){
return this.$qs(this.$13r)}
,isc.A.$15k=function isc_FormItem__getPickerIconCellElement(){
return this.$15c(this.$13r)}
,isc.A.$15l=function isc_FormItem__getHiddenDataElementHTML(){
return"<INPUT type='hidden' name='"+
this.getFieldName()+"' ID='"+this.$15a()+"'>"}
,isc.A.$59s=function isc_FormItem__getHintCellID(){
return this.$qs(this.$59p)}
,isc.A.$59t=function isc_FormItem__getHintCellElement(){
return this.$15c(this.$59p)}
,isc.A.updateStateForRollover=function isc_FormItem_updateStateForRollover(){
this.$176a();
this.$176b();
var _1=isc.EH.lastEvent,
_2=_1.itemInfo,
_3=_2&&_2.item,
_4=(_2&&_2.overIcon&&this.getIcon(_2.overIcon));
var _5=this.$185k()?this.getPickerIcon():null;
if(_5&&this.updatePickerIconOnOver!=false){
this.$168v(_5,
(this.$142q||this.$176c||(_4==_5)))}
var _6=this.icons;
if(_6){
for(var i=0;i<_6.length;i++){
if(_6[i]==_5||_6[i]==null)continue;
if(this.$165(_6[i])){
var _8=this.$176d(_6[i]),
_9=_4==_6[i]||
(_8=="item"&&_3==this&&!_2.overTitle)||
(_8=="textBox"&&(this.$176c||this.$176c));
this.$168v(_6[i],_9)}
}
}
}
,isc.A.updateState=function isc_FormItem_updateState(){
if(!this.isDrawn())return;
var _1=(this.containerWidget!=this.form||this.$11e());
if(!_1){
this.$176e();
this.$176f()}
this.$176a();
this.$176b()}
,isc.A.$176e=function isc_FormItem__updateCellState(){
if(this.containerWidget!=this.form||this.$11e())return;
var _1=this.logIsDebugEnabled(this.$13s);
var _2=this.getCellStyle();
if(_1)this.logDebug("About to apply basic cell style:"+_2,"FormItemStyling");
var _3=this.getFormCell();
if(_3)_3.className=_2;
var _4=this.getOuterTableElement();
if(_4)_4.className=this.getCellStyle()}
,isc.A.$176f=function isc_FormItem__updateTitleCellState(){
if(this.showTitle)this.form.updateTitleCellState(this)}
,isc.A.$176a=function isc_FormItem__updatePickerCellAndControlTableState(){
var _1=this.logIsDebugEnabled(this.$13s);
if(this.$1857()){
var _2=this.getControlStyle();
if(_1){
this.logDebug("About to apply cell styles to control box and picker icon cell:"+
[_2,_4],"FormItemStyling")}
var _3=this.$15f();
if(_3)_3.className=_2}
var _4=this.getPickerIconStyle();
var _5=this.$15k();
if(_5){
_5.removeAttribute("className");
if(_4)_5.className=_4
const h=_5.offsetHeight}
}
,isc.A.$176b=function isc_FormItem__updateTextBoxState(){
var _1=this.logIsDebugEnabled(this.$13s);
var _2=!this.$1563?this.getTextBoxStyle()
:this.$66v();
if(_1)this.logDebug("About to apply text box style:"+_2,"FormItemStyling");
var _3=this.$169s();
if(_3!=null){
_3.className=_2}
var _4=this.$15h();
if(_4!=null){
var _5=_4.style;
if(this.getImplicitSave()){
if(this.awaitingImplicitSave){
if(_5&&this.$95y!=true){
this.$95y=true;
this.$95z=""+_5.cssText;
_5.cssText=""+_5.cssText+this.editPendingCSSText}
}else{
if(this.wasAwaitingImplicitSave==true&&this.$95z){
delete this.$95y;
delete this.wasAwaitingImplicitSave;
_5.cssText=""+this.$95z;
delete this.$95z}
}
}
if(this.textColor){
if(_2.contains("Pending")){
_5.color=null}else{
_5.color=this.textColor}
}
}
if(this.$15m()&&_4){
if(!this.$15n){
var _6=this.getValue();
var _7=this.getTextBoxWidth(_6),_8=this.getTextBoxHeight(_6);
_7+=isc.Element.getHBorderSize(_4)-2;
if(_8!=null)_8+=isc.Element.getVBorderSize(_4)-2;
var _9=this.$qs("focusOutline");
var _2=this.getTextBoxStyle();
isc.Element.insertAdjacentHTML(
_4,
"beforeBegin",
"<DIV ID='"+_9+
(_2?"' CLASS='"+_2+"Focused'":"'")+
" STYLE='background-image:none;background-color:transparent;position:absolute;width:"
+
_7+
(_8==null?"px;":"px;height:"+_8)+
"px;visibility:hidden;border:1px dotted white;z-index:100;'>&nbsp;</DIV>"
);
this.$15n=isc.Element.get(_9)}
if(this.hasFocus)this.$15n.style.visibility="inherit";
else this.$15n.style.visibility="hidden"}
}
,isc.A.$15o=function isc_FormItem__warnDeprecated(_1,_2,_3){
if(!this.logIsInfoEnabled(this.$13t))return;
if(!this.$15p)this.$15p={};
if(this.$15p[_1]==true)return;
if(_3==null)_3="5.5";
var _4=isc.SB.create();
_4.append(
"Using '",_1,"': ",this[_1],
" to style this form item.  This property is deprecated as of SmartClient Version ",
_3," - we recommend removing this property and using '",_2,"' instead.");
this.logInfo(_4.release(false),"deprecated");
this.$15p[_1]=true}
,isc.A.getInnerHTML=function isc_FormItem_getInnerHTML(_1,_2,_3,_4){
var _5,_6;
if(this.isInactiveHTML()&&this.$68u==null){
_5=true;
var _7,_8=this.parentItem;
if(_8!=null&&_8.isInactiveHTML()){
if(_8.$68u==null){
_8.setupInactiveContext();
_6=true}
_7=_8.$68v[_8.$68u]}
this.$68u=this.setupInactiveContext(_7);
if(this.logIsDebugEnabled("inactiveEditorHTML")){
this.logDebug("getInnerHTML(): Item is marked as inactive - set up new inactive context ID:"+this.$68u,
"inactiveEditorHTML")}
}
this.$15q=_2&&!this.$207e();
var _9;
if(this.$11d()){
if(!_9)_9=isc.SB.create();
_9.append(this.$15l())}
if(this.$712())_2=false;
var _10=this.$15r(_1,_2,_3);
var _11;
if(_9!=null){
_9.append(_10);
if(_4){
_11=_9.getArray().duplicate();
_9.release(true)}else{
_11=_9.release(false)}
}else{
_11=(_4?_10:_10.join(isc.emptyString))}
if(_5)delete this.$68u;
if(this.parentItem&&_6)
delete this.parentItem.$68u;
return _11}
,isc.A.$15s=function isc_FormItem__writeOuterTable(_1,_2){
if(_2)return true;
if(_1&&this.getHint()!=null)return true;
if(this.$147())return true}
,isc.A.$157c=function isc_FormItem__getValueIconStateSuffix(){
var _1;
if((this.isDisabled()||this.isReadOnly())&&this.showValueIconDisabled){
_1=this.$13w}else _1=this.$15t;
if(this.showValueIconError&&this.hasErrors()){
_1=this.$260b+(_1?_1:"")}
return _1}
,isc.A.$144=function isc_FormItem__getValueIcon(_1){
if(this.suppressValueIcon)return null;
if(_1==null){
this.logInfo("null value passed to $144()")}
var _2;
if(this.$68y()&&this.getPrintValueIcon!=null){
_2=this.getPrintValueIcon(_1)}else if(this.getValueIcon!=null){
_2=this.getValueIcon(_1)}else{
if(_1==null)_2=this.emptyValueIcon;
else if(this.valueIcons!=null)_2=this.valueIcons[_1]}
if(_2==null)return null;
if(_2==isc.Canvas.$5w)return _2;
var _3=isc.Canvas.$1861(_2);
if(!_3){
var _4=isc.Media.getStockIconKeyForSrc(_2);
if(_4){
_2=isc.Media.getStockIconSrc(_2);
_3=isc.Canvas.$1861(_2)}
}
if(_3){
if(!_3.cssClass)_3.cssClass=this.iconBaseStyle}
var _5=this.$157c();
if(_5!=null){
var _6=isc.isAn.Object(_2)?_2._base:_2;
if(!isc.CheckboxItem.$15u)isc.CheckboxItem.$15u={};
var _7=isc.CheckboxItem.$15u[_6];
if(!_7){
_7={};
var _8=this.showValueIconFocused&&!this.showValueIconOver?this.$258q:this.$13u;
if(_3){
_7._base=isc.addProperties({},_3);
_7.Focused=isc.addProperties({},_3);
_7.FocusedOver=isc.addProperties({},_3);
_7.Over=isc.addProperties({},_3);
_7.Down=isc.addProperties({},_3);
_7.Disabled=isc.addProperties({},_3);
if(this.showValueIconError){
_7.Error=isc.addProperties({},_3);
_7.ErrorOver=isc.addProperties({},_3);
_7.ErrorDown=isc.addProperties({},_3);
_7.ErrorDisabled=isc.addProperties({},_3);
_7.ErrorFocused=isc.addProperties({},_3);
_7.ErrorFocusedOver=isc.addProperties({},_3)}
if(_3.src&&!_3.svg){
_7.Over.src=isc.Img.urlForState(_7.Over.src,false,false,this.$13u);
_7.Focused.src=isc.Img.urlForState(_7.Focused.src,false,false,_8);
_7.FocusedOver.src=isc.Img.urlForState(_7.FocusedOver.src,false,false,_8);
_7.Down.src=isc.Img.urlForState(_7.Down.src,false,false,this.$13v);
_7.Disabled.src=isc.Img.urlForState(_7.Disabled.src,false,false,this.$13w);
if(this.showValueIconError){
_7.Error.src=isc.Img.urlForState(_7.Error.src,false,false,this.$260b);
_7.ErrorOver.src=isc.Img.urlForState(_7.ErrorOver.src,false,false,this.$260j);
_7.ErrorDown.src=isc.Img.urlForState(_7.ErrorDown.src,false,false,this.$260k);
_7.ErrorDisabled.src=isc.Img.urlForState(_7.ErrorDisabled.src,false,false,this.$260l);
_7.ErrorFocused.src=isc.Img.urlForState(_7.ErrorFocused.src,false,false,"Error"+_8);
_7.ErrorFocusedOver.src=isc.Img.urlForState(_7.ErrorFocusedOver.src,false,false,"Error"+_8)}
}
if(_3.cssClass){
_7.Over.cssClass+=this.$13u;
_7.Focused.cssClass+=_8;
_7.FocusedOver.cssClass+=_8;
_7.Down.cssClass+=this.$13v;
_7.Disabled.cssClass+=this.$13w;
if(this.showValueIconError){
_7.Error.cssClass+=this.$260b;
_7.ErrorOver.cssClass+=this.$260b+this.$13u;
_7.ErrorFocused.cssClass+=this.$260b+_8;
_7.ErrorFocusedOver.cssClass+=this.$260b+_8;
_7.ErrorDown.cssClass+=this.$260b+this.$13v;
_7.ErrorDisabled.cssClass+=this.$260b+this.$13w}
}
if(_3.svg&&_3.statefulId){
_7.Over=isc.Canvas.$1861(isc.Img.urlForState(_2,false,false,this.$13u));
_7.Focused=isc.Canvas.$1861(isc.Img.urlForState(_2,false,false,_8));
_7.FocusedOver=isc.Canvas.$1861(isc.Img.urlForState(_2,false,false,_8));
_7.Down=isc.Canvas.$1861(isc.Img.urlForState(_2,false,false,this.$13v));
_7.Disabled=isc.Canvas.$1861(isc.Img.urlForState(_2,false,false,this.$13w));
if(this.showValueIconError){
_7.Error=isc.Canvas.$1861(isc.Img.urlForState(_2,false,false,this.$260b));
_7.ErrorOver=isc.Canvas.$1861(isc.Img.urlForState(_2,false,false,this.$260j));
_7.ErrorDown=isc.Canvas.$1861(isc.Img.urlForState(_2,false,false,this.$260k));
_7.ErrorDisabled=isc.Canvas.$1861(isc.Img.urlForState(_2,false,false,this.$260l));
_7.ErrorFocused=isc.Canvas.$1861(isc.Img.urlForState(_2,false,false,"Error"+_8));
_7.ErrorFocusedOver=isc.Canvas.$1861(isc.Img.urlForState(_2,false,false,"Error"+_8))}
}
}else if(isc.isA.String(_2)){
_7.Over=isc.Img.urlForState(_2,false,false,this.$13u);
_7.Focused=isc.Img.urlForState(_2,false,false,this.$258q);
_7.Down=isc.Img.urlForState(_2,false,false,this.$13v);
_7.Disabled=isc.Img.urlForState(_2,false,false,this.$13w);
if(this.showValueIconError){
_7.Error=isc.Img.urlForState(_2,false,false,this.$260b);
_7.ErrorOver=isc.Img.urlForState(_2,false,false,this.$260j);
_7.ErrorDown=isc.Img.urlForState(_2,false,false,this.$260k);
_7.ErrorDisabled=isc.Img.urlForState(_2,false,false,this.$260l);
_7.ErrorFocused=isc.Img.urlForState(_2,false,false,this.$291a)}
}else{
_7=_2}
isc.CheckboxItem.$15u[_6]=_7}
_2=_7[_5]}else if(isc.isAn.Object(_2)){
_2=_2._base}else{
if(_3){
if(!_3.cssClass)_3.cssClass=this.iconBaseStyle;
_2=isc.Canvas.$2166(_3)}
}
return _2}
,isc.A.$157d=function isc_FormItem__getValueIconStyle(_1){
if(this.getValueIconStyle==null)return null;
var _2;
if(this.$68y()&&this.getPrintValueIconStyle!=null){
_2=this.getPrintValueIconStyle(_1)}else{
_2=this.getValueIconStyle(_1)}
if(_2!=null){
var _3=this.$157c();
if(_3!=null){
_2+=_3}
}
return _2}
,isc.A.getValueIconWidth=function isc_FormItem_getValueIconWidth(){
if(this.suppressValueIconSizing)return null;
var _1=this.valueIconWidth;
if(_1==null)_1=this.valueIconSize;
return _1}
,isc.A.$186i=function isc_FormItem__getValueIconAndPadWidth(){
return this.getValueIconWidth()+
(this.valueIconLeftPadding+this.valueIconRightPadding)}
,isc.A.getValueIconHeight=function isc_FormItem_getValueIconHeight(){
if(this.suppressValueIconSizing)return null;
var _1=this.valueIconHeight;
if(_1==null)_1=this.valueIconSize;
return _1}
,isc.A.$xq=function isc_FormItem__getValueIconHTML(_1){
var _2=this.$144(_1);
if(_2==null){
return isc.emptyString}
if(this.imageURLSuffix!=null&&_2!=isc.Canvas.$5w){
_2+=this.imageURLSuffix}
var _3=this.imageURLPrefix||this.baseURL||this.imgDir;
var _4=isc.Canvas.$1861(_2);
var _5=(_4&&_4.cssClass)||this.$157d(_1);
var _6=this.getValueIconWidth();
var _7=this.getValueIconHeight();
var _8=this.isRTL(),
_9=_8?this.valueIconRightPadding:this.valueIconLeftPadding,
_10=_8?this.valueIconLeftPadding:this.valueIconRightPadding;
return isc.Canvas.$xq(_2,_3,_5,_6,_7,
_9,_10,
this.$qs(this.$13x),
this.containerWidget)}
,isc.A.$15v=function isc_FormItem__getValueIconHandle(){
if(!this.isDrawn())return null;
var _1=isc.Element.get(this.$qs(this.$13x));
return _1}
,isc.A.$156r=function isc_FormItem__supportsInlineIcons(){
return false}
,isc.A.$169t=function isc_FormItem__haveInlineIcons(){
return this.$156r()&&this.$156h!=null&&this.$156h.length>0}
,isc.A.$165z=function isc_FormItem__fillHintCellTemplate(_1,_2,_3){
var _4=this.$132;
_4[1]=this.$59s();
_4[3]=_2;
var _5=this.$1650();
if(!_5){
_4[5]="white-space:nowrap"}else{
_4[5]=null}
var _6=this.$1651(),
_7=!isc.Browser.isIE||isc.Browser.isIE8Strict||isc.Browser.isIE9;
if(_5&&_6>0&&_7){
_4[6]="min-width:";
_4[7]=_6;
_4[8]="px"}else{
_4[6]=null;
_4[7]=null;
_4[8]=null}
_4[10]=_3;
var _8=12
_4[_8+3]=_1;
if(_5&&_6>0&&!_7){
_4[_8]="<div style='width:";
_4[_8+1]=_6;
_4[_8+2]="px'>";
_4[_8+4]="</div>"}else{
_4[_8]=null;
_4[_8+1]=null;
_4[_8+2]=null;
_4[_8+4]=null}
return _4}
,isc.A.$1650=function isc_FormItem__shouldWrapHintText(){
var _1=this.wrapHintText;
if(_1!=null)return _1;
var _2=this.form;
if(_2!=null)return!!_2.wrapHintText;
return false}
,isc.A.$1651=function isc_FormItem__getMinHintWidth(){
var _1=this.minHintWidth;
if(_1!=null)return _1;
var _2=this.form;
if(_2!=null){
_1=_2.minHintWidth;
if(_1!=null)return _1}
return null}
,isc.A.$294h=function isc_FormItem__getHintCellHPadding(){
var _1=this.getHintStyle();
if(_1==null)return 0;
return isc.Element.$sw(_1)}
,isc.A.shouldShowErrorIconInline=function isc_FormItem_shouldShowErrorIconInline(){
return this.showErrorIconInline}
,isc.A.getErrorIconProperties=function isc_FormItem_getErrorIconProperties(){
var _1={
src:this.errorIconSrc,
width:this.errorIconWidth,
height:this.errorIconHeight,
showOver:false,
showDown:false
};
if(this.shouldShowErrorIconInline())_1.inline=true;
var _2=this.getErrorOrientation();
if(!["top","bottom"].contains(_2))
_1.inlineIconAlign=_2;
if(this.errorIconProperties){
_1=isc.addProperties(_1,this.errorIconProperties)}
_1.showError=false;
_1.name=this.errorIconName;
return _1}
,isc.A.checkInlineErrorIconVisibility=function isc_FormItem_checkInlineErrorIconVisibility(_1){
if(this.shouldShowErrorIconInline()){
var _1=_1||this.getErrors();
var _2=this.getIcon(this.errorIconName);
if(_1&&!_2){
_2=this.getErrorIconProperties();
var _3=_2.inlineIconAlign=="right"?(this.icons?this.icons.length:0):0;
if(_2.ignoreIndex)_3=null;
this.addIcon(_2,_3)}else if(!_1&&_2){
this.removeIcon(this.errorIconName)}
}
}
,isc.A.getHintPlacement=function isc_FormItem_getHintPlacement(){
var _1=this.hintPlacement||this.form.hintPlacement;
_1="after";
if(_1=="adaptive"){
if(this.hasDataElement())return"inline"
return"below"}
if(_1=="inline"&&!this.hasDataElement())_1="after";
if(_1==null)_1=="after";
return _1}
,isc.A.showingHintBelow=function isc_FormItem_showingHintBelow(){
return this.getHintPlacement()=="below"&&this.getHint()}
,isc.A.$15r=function isc_FormItem__getTableHTML(_1,_2,_3){
var _4=this.getErrorOrientation(),
_5,
_6=_4==isc.Canvas.LEFT,
_7=!this.shouldShowErrorIconInline(),
_8,
_9=this.isReadOnly()
;
if(_3&&_7&&
(_6||_4==isc.Canvas.RIGHT))
{
var _10=this.getErrors();
if(_10){
_5=true;
_8=this.getErrorHTML(_10)}
}
var _11=this.iconVAlign,
_12=this.$1416(_1),
_13=this.$15s(_2,_5),
_14=this.$1857()
;
var _15=_13?isc.FormItem.$82b():[];
if(_13){
_15.length=13;
_15[1]=this.$15w();
_15[3]=this.getOuterTableCSS();
if(this.containerWidget==this.form&&!this.$11e()){
_15[5]=this.getCellStyle()}else{
_15[5]=null}
if(_5&&_6){
_15[7]=isc.StringBuffer.concat("<TD STYLE='",
isc.Canvas.$42a,"' CLASS='",
this.getCellStyle(),"'>",_8,"</TD>")}else _15[7]=null;
if(!_14)_15[9]=this.getTextBoxCellCSS();
else _15[9]=isc.Canvas.$42a;
_15[11]=_11}
if(this.renderDisabledEventMask()){
_15[_15.length]=this.$148()}
var _16=(_9?this.getReadOnlyHTML(_12,_1)
:this.getElementHTML(_12,_1));
if(this.$169t()){
var _17=this.isRTL(),
_18=this.getTextBoxStyle(),
_19=this.$169b(_18),
_20=this.$169c(_18)
;
var _21=this.getInnerHeight();
if(this.controlStyle){
_21-=isc.Element.$yo(this.getControlStyle())}
var _22=isc.Element.$tl(_18)+_19,
_23=isc.Element.$tm(_18)+_20;
var _24=this.getLogicalTextBoxWidth();
if(this.hasErrors()&&this.shouldShowErrorIcon())_24-=(this.getErrorWidth());
_16="<div id='"+this.$169r()+
(isc.Browser.isIE?"' style='position:relative;display:block;width:":
"' style='position:relative;align-items:center;display:flex;width:")
+_24+"px;'>"
+_16;
_16+=this.getIconsHTML(false,_17?this.$156k:
this.$156i,"position:absolute;left:"+_22+
(isc.Browser.isIE?"px;top:0px;height:"+_21+"px":"px;"));
_16+=this.getIconsHTML(
false,_17?this.$156i:this.$156k,
"position:absolute;right:"+_23+
(isc.Browser.isIE?"px;top:0px;height:"+_21+"px":"px;"));
_16+="</div>"}
if(!_14){
_15[_15.length]=_16}else{
var _25=this.getPickerIconStyle(),
_26=this.getID(),
_27=this.getControlStyle(),
_28=this.$130,
_29=this.$15e(),
_30=this.$15g(),
_31=this.$15j()
;
_28[1]=_29;
_28[3]=_26;
_28[6]=this.getControlTableCSS();
if(_27==null&&this.containerWidget==this.form&&!this.$11e()){
_28[8]=this.getCellStyle();
_28[6]+=isc.Canvas.$42a}else{
_28[8]=_27
}
_28[10]=this.getTextBoxCellCSS();
_28[12]=_16;
if(_14){
_28[14]=_31;
_28[17]=_25;
_28[19]=this.getPickerIconCellCSS();
_28[21]=this.$186d()}else{
_28[14]=_28[17]=null;
_28[19]=_28[21]=null}
for(var i=0;i<_28.length;i++){
_15[_15.length]=_28[i]}
}
if(_13){
if(this.$147()){
var _33=isc.FormItem.$82c();
_33[1]=_11;
_33[5]=this.iconHeight;
_33[7]=this.getCellStyle();
_33[9]=this.getIconCellID();
_33[11]=this.getIconsHTML();
for(var i=0;i<_33.length;i++){
_15[_15.length]=_33[i]}
}
var _34=(_5&&!_6);
var _35;
if(_2){
_35=this.getHint();
if(isc.isA.emptyString(_35))_35=null}
if(_35||_34){
var _36=(_35!=null&&!isc.isAn.emptyString(_35)),
_37=_34&&_8!=null&&!isc.isAn.emptyString(_8);
if(_36){
var _38=this.$165z(_35,this.getHintStyle());
if(this.getHintPlacement()=="below"){
_15.add("</TD><TR>");
_15.push.apply(_15,_38);
_15.add("</TR>")}else{
_15.add("</TD>");
_15.push.apply(_15,_38)}
}
if(_37&&_7){
_15.add(isc.StringBuffer.concat("<TD STYLE='",
isc.Canvas.$42a,"' CLASS='",
this.getCellStyle(),"'>",_8))}
}
_15[_15.length]=this.$13z}
return _15}
);
isc.evalBoundary;isc.B.push(isc.A.$186d=function isc_FormItem__getPickerIconCellValue(){
if(this.$185k()){
var _1=this.getPickerIcon(),
_2=this.$16j(true),
_3=_2&&this.$54o(_1,true);
return this.getIconHTML(_1,null,this.iconIsDisabled(_1),
!!_3)}else{
return null}
}
,isc.A.$169b=function isc_FormItem__getInlineLeftPadding(_1){
if(this.leftInlineIconsPadding!=null)return this.leftInlineIconsPadding;
return isc.Element.$tr(_1)}
,isc.A.$169c=function isc_FormItem__getInlineRightPadding(_1){
if(this.rightInlineIconsPadding!=null)return this.rightInlineIconsPadding;
return isc.Element.$ts(_1)}
,isc.A.getIconCellID=function isc_FormItem_getIconCellID(){
return this.$qs(this.$92q)}
,isc.A.$15w=function isc_FormItem__getOuterTableID(){
return this.$qs(this.$133)}
,isc.A.$15x=function isc_FormItem__getCellStyle(_1,_2){
if(_1==null)return null;
if(this.$161p()&&this.pendingStatus&&!this.$1602){
_1=this.$1603(_1,_2)}
var _3=this.hasErrors(),
_4=this.showRTL&&this.isRTL();
var _5;
if(_4){
_5=isc.FormItem.$132s[_1];
if(!_5){
_5=isc.FormItem.$132s[_1]={
Normal:_1+"RTL",
Error:_1+"ErrorRTL",
Over:_1+"OverRTL",
Focused:_1+"FocusedRTL",
ErrorFocused:_1+"ErrorFocusedRTL",
ErrorOver:_1+"ErrorOverRTL",
FocusedOver:_1+"FocusedOverRTL",
ErrorFocusedOver:_1+"ErrorFocusedOverRTL",
Disabled:_1+"DisabledRTL",
ErrorDisabled:_1+"ErrorDisabledRTL"
}}
}else{
_5=isc.FormItem.$15y[_1];
if(!_5){
_5=isc.FormItem.$15y[_1]={
Normal:_1,
Error:_1+"Error",
Over:_1+"Over",
Focused:_1+"Focused",
ErrorFocused:_1+"ErrorFocused",
ErrorOver:_1+"ErrorOver",
FocusedOver:_1+"FocusedOver",
ErrorFocusedOver:_1+"ErrorFocusedOver",
Disabled:_1+"Disabled",
ErrorDisabled:_1+"ErrorDisabled"
}}
}
var _6;
var _7=this.showFocused&&!this.renderAsDisabled()&&this.isFocused()
&&!this.isInactiveHTML();
if(this.$19g&&!_7){
_7=true}
if(_2==this.$1601&&_7){
_7=this.showFocusedPickerIcon}
var _8=false;
if(this.showOver&&!this.isInactiveHTML()&&!this.renderAsDisabled()&&
(this.$142q||this.$176c))
{
switch(_2){
case this.$13q:
_8=this.getUpdateTextBoxOnOver()!=false;
break;
case this.$13p:
case this.$1601:
_8=this.getUpdateControlOnOver()!=false;
break}
}
if(_3&&this.shouldShowErrorStyle()&&this.form.showInlineErrors){
if(this.hasFocus&&this.showFocusedErrorState){
_6=!this.isInactiveHTML()?
(_8?_5.ErrorFocusedOver:_5.ErrorFocused):
_5.ErrorFocused}else if(this.showDisabled&&this.renderAsDisabled()){
_6=_5.ErrorDisabled}else{
_6=!this.isInactiveHTML()?
(_8?_5.ErrorOver:_5.Error):
_5.ErrorOver}
}else{
if(_7){
_6=_8?_5.FocusedOver:_5.Focused}else if(this.showDisabled&&this.renderAsDisabled()){
_6=_5.Disabled}else{
_6=_8?_5.Over:_5.Normal}
}
if(this.getCustomState){
var _9=_6.substring(_1.length);
_9=this.getCustomState(_2?_2:this.$14k,_9,this);
if(_9)_6=_1+_9}
return _6}
,isc.A.$1603=function isc_FormItem__getPendingBaseStyle(_1,_2){
if(_2===this.$160y||
_2===this.$160z||
_2===this.$14k||
_2===this.$1600||
_2===this.$13q)
{
return _1+"Pending"}
return _1}
,isc.A.getCellStyle=function isc_FormItem_getCellStyle(){
if(this.parentItem!=null){
if(this.parentItem.itemCellStyle)return this.$15x(this.parentItem.itemCellStyle,this.$160x)}
var _1=this.$15x(this.cellStyle,this.$14k);
if(!this.hasErrors()){
if(this.cellClassName!=null){
this.$15o("cellClassName","cellStyle");
_1=this.cellClassName}
}else{
if(this.errorCellClassName!=null){
this.$15o("errorCellClassname","cellStyle");
_1=this.errorCellClassName}
}
return _1}
,isc.A.setCellStyle=function isc_FormItem_setCellStyle(_1){
var _2=this.cellStyle;
this.cellStyle=_1;
if(_2!=_1)this.updateState()}
,isc.A.getTitleStyle=function isc_FormItem_getTitleStyle(){
if(this.$68y()&&this.printTitleStyle){
return this.$15x(this.printTitleStyle,this.$160z)}
var _1=this.getErrors();
if(_1==isc.emptyString)_1=null;
var _2=this.getTitleOrientation()=="top"?this.verticalTitleStyle:null;
_2=_2||this.titleStyle;
var _3=this.$15x(_2,"title");
if(!_1){
if(this.titleClassName!=null){
this.$15o("titleClassName","titleStyle");
_3=this.titleClassName}
}else{
if(this.titleErrorClassName!=null){
this.$15o("titleErrorClassName","titleStyle");
_3=this.titleErrorClassName
}
}
return _3}
,isc.A.getTitleCellStyle=function isc_FormItem_getTitleCellStyle(){
return this.titleCellStyle||this.getTitleStyle()}
,isc.A.getHintStyle=function isc_FormItem_getHintStyle(){
if(this.hintClassName!=null){
this.$15o("hintClassName","hintStyle");
return this.hintClassName}
if(this.hintStyle!=null)return this.hintStyle}
,isc.A.getTextBoxStyle=function isc_FormItem_getTextBoxStyle(){
var _1=(this.getCanEdit()==false&&this.renderAsStatic());
if(this.$68y()){
if(_1&&this.printReadOnlyTextBoxStyle){
return this.$15x(this.printReadOnlyTextBoxStyle,this.$1600)}else if(this.printTextBoxStyle){
return this.$15x(this.printTextBoxStyle,this.$1600)}
}
var _2=(_1?
this.getReadOnlyTextBoxStyle():this.textBoxStyle),
_3=this.$15x(_2,this.$13q)
;
if(this.elementClassName!=null){
this.$15o("elementClassName","textBoxStyle");
_3=this.elementClassName}
return _3}
,isc.A.getPickerIconStyle=function isc_FormItem_getPickerIconStyle(){
var _1=this.getPickerIcon();
if(_1&&_1.visible){
if(this.pickerIconStyle!=null){
return this.$15x(this.pickerIconStyle,this.$1601)}else{
return this.cellStyle+(this.renderAsDisabled()?"Disabled":"")}
}
if(this.pickerIconStyle)return this.pickerIconStyle;
return null}
,isc.A.getControlStyle=function isc_FormItem_getControlStyle(){
var _1=(this.getCanEdit()==false&&this.renderAsStatic());
if(_1&&this.readOnlyControlStyle!==undefined){
return this.$15x(this.readOnlyControlStyle,this.$13p)}
else if(this.controlStyle!=null)return this.$15x(this.controlStyle,this.$13p);
return null}
,isc.A.getOuterTableCSS=function isc_FormItem_getOuterTableCSS(){
return this.$135}
,isc.A.getControlTableCSS=function isc_FormItem_getControlTableCSS(){
var _1=isc.SB.create();
_1.append(this.$14a);
var _2=this.getElementWidth()-this.$672();
if(isc.isA.Number(_2))_1.append(this.$93,_2,this.$38);
var _3=this.getExtraControlTableCSS();
if(_3)_1.append(_3);
return _1.release(false)}
,isc.A.getExtraTextBoxCSS=function isc_FormItem_getExtraTextBoxCSS(){
var _1="";
if(isc.TComponentEditor&&isc.isA.TComponentEditor(this.form)){
_1+="border:none;box-shadow:none;"}
if(this.extraTextBoxCSS){
_1+=this.extraTextBoxCSS;
if(!_1.endsWith(";"))_1+=";"}
return _1}
,isc.A.getExtraControlTableCSS=function isc_FormItem_getExtraControlTableCSS(){
var _1="";
if(isc.TComponentEditor&&isc.isA.TComponentEditor(this.form)){
_1+="border:none;box-shadow:none;"}
if(this.extraControlTableCSS){
_1+=this.extraControlTableCSS;
if(!_1.endsWith(";"))_1+=";"}
return _1}
,isc.A.$167v=function isc_FormItem__getTextAlign(){
var _1=this.textAlign;
if(_1==null){
if(this.applyAlignToText&&this.align!=null){
return this.align}else if(this.icons!=null&&this.icons.length>0){
return this.isRTL()?"right":"left"}
}
return _1}
,isc.A.getTextBoxCellCSS=function isc_FormItem_getTextBoxCellCSS(){
return this.textBoxCellCSS!=null?this.textBoxCellCSS:isc.Canvas.$42a}
,isc.A.getTextBoxCSS=function isc_FormItem_getTextBoxCSS(_1){
var _2=isc.SB.create(),
_3=this.$157f(),
_4=this.$1618();
if(!(isc.Browser.isIE&&isc.Browser.version<11&&_3)){
var _5=this.$68y();
if(!_5||isc.isA.Number(this.width)){
var _6=this.getTextBoxWidth(_1);
if(isc.isA.Number(_6)){
if((isc.Browser.isOpera
||isc.Browser.isMoz
||isc.Browser.isSafari
||isc.Browser.isIE9)&&!_4){
_2.append(this.$137,_6,this.$38)}else{
_2.append(this.$93,_6,this.$38)}
}
}
if(this.$169t()&&this.$169p==="absolutePositioning"){
var _7=this.isRTL(),
_8=this.getTextBoxStyle(),
_9=_7?this.$156l:this.$156j,
_10=_7?this.$156j:this.$156l;
var _11=this.$169b(_8)
+_9,
_12=this.$169c(_8)
+_10;
_2.append("padding-right:",_12,this.$38);
_2.append("padding-left:",_11,this.$38)}
var _13=this.getTextBoxHeight(_1),
_14=isc.isA.Number(_13);
if(_14&&(!this.$169t()||this.$169p!=="divStyledAsDataElement")){
if(!_5&&!_4){
_2.append(this.$138,_13,this.$38)}else{
_2.append(this.$92,_13,this.$38);
if(_5&&!this.shouldWrap())_2.append(this.$1028,_13,this.$38)}
}
}
if(_4)_2.append(this.$1148);
if(this.shouldWrap()){
_2.append(this.$135)}else{
_2.append(this.$136);
if(this.$157g()&&!_3){
if(isc.Browser.isMoz&&isc.Browser.version<68)_2.append(this.$1028,"-moz-block-height;");
else if(_14)_2.append(this.$1028,_13,this.$38)}
}
var _15=this.$167v();
if(_15!=null){
_2.append(this.$14c,_15,this.$39)}
if(isc.Browser.isBorderBox){
_2.append(this.$1106,this.$1103,this.$39)}
var _16=this.getExtraTextBoxCSS();
if(_16)_2.append(";",_16);
return _2.release(false)}
,isc.A.getPickerIconCellCSS=function isc_FormItem_getPickerIconCellCSS(){
if(isc.Browser.isIE)return isc.emptyString;
var _1=this.getPickerIconHeight();
if(isc.isA.Number(_1)&&_1<this.getInnerHeight()){
return this.$14d+_1+this.$38}
return isc.emptyString}
,isc.A.getPickerIcon=function isc_FormItem_getPickerIcon(){
var _1={
showFocused:this.showFocusedPickerIcon,
hspace:this.pickerIconHSpace,
width:this.getPickerIconWidth(),
height:this.getPickerIconHeight(),
src:this.pickerIconSrc,
prompt:this.pickerIconPrompt
};
if(this.$150==null){
var _2=isc.addProperties({},
this.pickerIconDefaults,this.pickerIconProperties,
{
pickerIcon:true,
writeIntoItem:true,
inline:false
},
_1
);
this.$753(_2,this.pickerIconName);
this.setupPickerIconTabPosition(_2);
this.$150=_2;
if(this.iconIsDisabled(_2))_2.$153=true}else{
isc.addProperties(this.$150,_1)}
return this.$150}
,isc.A.$157g=function isc_FormItem__shouldVerticallyCenterTextBox(){
return false}
,isc.A.$157f=function isc_FormItem__needTextBoxTable(){
return(this.$157g()&&
!this.$68y()&&
isc.Browser.isIE&&
((!isc.Browser.isStrict&&7<=isc.Browser.version&&isc.Browser.version<=8)||
isc.Browser.version<=6))}
,isc.A.getElementHTML=function isc_FormItem_getElementHTML(_1,_2){
var _3=isc.SB.create(),
_4=this.$15m();
var _5=this.$872(),
_6,
_7,
_8=this.getTextBoxStyle();
if(this.$1441){
_8=this.$66v()}
if(_5){
var _9=this.$154(),
_10=this.renderAsDisabled()?null:this.accessKey;
if(_4){
_7=isc.Canvas.getFocusProxyString(
this.getID(),
false,0,0,
this.getTextBoxWidth(_2),this.getTextBoxHeight(_2),
this.isVisible(),!this.renderAsDisabled(),
_9,_10,
false
)}else{
var _11=isc.SB.create();
if(_10!=null)_11.append(this.$14e,_10,this.$ob);
_11.append(this.$14f,_9,this.$ob);
_6=_11.release()}
}
if(_7!=null)_3.append(_7);
var _12,
_13;
if(this.$157f()){
_12=this.$157e;
_13=6;
var _14=this.getTextBoxWidth(_2);
if(isc.Browser.isIE6&&isc.Browser.isStrict){
_14+=isc.Element.$yp(_8)}
_12[1]=_14;
var _15=this.getTextBoxHeight(_2);
if(isc.isA.Number(_15)){
if(isc.Browser.isIE6&&isc.Browser.isStrict){
_15+=isc.Element.$yo(_8)}
_12[3]=" height='"+_15+"'"}else{
_12[3]=null}
_12[5]=this.shouldWrap()?null:this.$115o}else{
_12=this.$14g;
_13=0}
_12[_13+1]=this.$15g();
_12[_13+3]=this.getID();
_12[_13+6]=String.asAttValue(_8);
_12[_13+8]=this.getTextBoxCSS(_2);
_12[_13+10]=_6;
var _16;
if(this.multiple&&isc.isAn.Array(_2)){
if(_2.length==1){
_16=this.$xq(_2[0])}
}else{
_16=this.$xq(_2)}
_12[_13+12]=_16;
_12[_13+13]=(this.showValueIconOnly?null:_1);
_3.append(_12);
return _3.release(false)}
,isc.A.getReadOnlyHTML=function isc_FormItem_getReadOnlyHTML(_1,_2){
return this.getElementHTML(_1,_2)}
,isc.A.getPrintHTML=function isc_FormItem_getPrintHTML(_1,_2){
var _3=this.getValue();
var _4=this[this.isReadOnly()?"getReadOnlyHTML":"getElementHTML"](this.mapValueToDisplay(_3),_3);
if(_4==null)_4=isc.emptyString;
return _4}
,isc.A.$15m=function isc_FormItem__writeOutFocusProxy(){
if(this.useFocusProxy!=null)return this.useFocusProxy;
return(isc.Browser.isMoz&&isc.Browser.geckoVersion<20051111)&&
this.$kk()&&!this.hasDataElement()}
,isc.A.$155=function isc_FormItem__getItemElementAttributeHTML(){
if(!isc.FormItem.$156){
isc.FormItem.$156=[
" ",isc.DynamicForm.$89,"='",
null,
"' ",
isc.DynamicForm.$9a,"='",isc.DynamicForm.$9b,"'"
]}
isc.FormItem.$156[3]=this.getItemID();
return isc.FormItem.$156.join(isc.emptyString)}
,isc.A.isValid=function isc_FormItem_isValid(){
var _1=this.getErrors();
if(_1==null||isc.isAn.emptyObject(_1)){
return true}
return false}
,isc.A.getErrors=function isc_FormItem_getErrors(){
if(this.form)return this.form.getFieldErrors(this)}
,isc.A.getError=function isc_FormItem_getError(){
this.logWarn("call to deprecated method FormItem.getError(). Use FormItem.getErrors() instead."
);
return this.getErrors()}
,isc.A.getErrorMessage=function isc_FormItem_getErrorMessage(_1){
var _2=this.$158i();
return(isc.isAn.Array(_1)?"<ul id='"+_2+"'><li>"+_1.join("</li><li>")+"</li></ul>"
:"<span id='"+_2+"'>"+_1+"</span>")}
,isc.A.$158i=function isc_FormItem__getErrorMessageID(){
return this.$qs("errorMessage")}
,isc.A.shouldShowErrorIcon=function isc_FormItem_shouldShowErrorIcon(){
return this.showErrorIcon!=null?this.showErrorIcon:this.form.showErrorIcons}
,isc.A.shouldShowErrorText=function isc_FormItem_shouldShowErrorText(){
return this.showErrorText!=null?this.showErrorText:this.form.shouldShowErrorText()}
,isc.A.shouldShowErrorStyle=function isc_FormItem_shouldShowErrorStyle(){
return this.showErrorStyle!=null?this.showErrorStyle:this.form.showErrorStyle}
,isc.A.shouldShowErrorIconPrompt=function isc_FormItem_shouldShowErrorIconPrompt(){
return this.shouldShowErrorIcon&&!this.shouldShowErrorText()}
,isc.A.getErrorOrientation=function isc_FormItem_getErrorOrientation(){
return this.errorOrientation!=null?this.errorOrientation:this.form.getErrorOrientation()}
,isc.A.getErrorHTML=function isc_FormItem_getErrorHTML(_1){
var _2=this.shouldShowErrorText(),
_3=this.shouldShowErrorIcon();
if((!_2&&!_3)||this.shouldShowErrorIconInline())
return isc.emptyString;
var _4=this.form,
_5=(isc.Browser.isStrict?_3:
_3&&_2),
_6=!_5&&_3&&
((this.getErrorOrientation()==isc.Canvas.LEFT)||
(this.getErrorOrientation()==isc.Canvas.RIGHT)),
_7=(_2&&this.form.showTitlesWithErrorMessages&&
this.getTitle()!=null?this.getTitle()+": ":null),
_8,
_9=_2?this.getErrorMessage(_1):null;
if(!_5){
_8=isc.SB.concat("<DIV ",
this.$99s(),
(_6?"style='display:inline;'":null)
," CLASS='",this.getCellStyle(),"'>"
,(_3?this.getErrorIconHTML(_1)+"&nbsp;":null)
,_7
,_9
,"</DIV>"
)}else{
_8=isc.SB.create();
_8.append("<TABLE ",
this.$99s(),
" role='presentation' WIDTH=100% CELLSPACING=0 CELLPADDING=0><TR>",
"<TD WIDTH=",this.errorIconWidth+this.iconHSpace,">"
,this.getErrorIconHTML(_1)
,"</TD>"
);
if(_2){
_8.append("<TD STYLE='",isc.Canvas.$42a,"' CLASS='",
this.getCellStyle(),"'>&nbsp;"
,_7
,_9
,"</TD>"
)}
_8.append("</TR></TABLE>");
_8=_8.release(false)}
return _8}
,isc.A.$158j=function isc_FormItem__getInlineErrorHandleID(){
return this.$qs("inlineErrorHandle")}
,isc.A.$99s=function isc_FormItem__getInlineErrorHandleAttributes(){
if(this.$99t==null){
this.$99t=isc.SB.concat(
"ID='",this.$158j(),"' ",
isc.DynamicForm.$89,"='",this.getID(),"' ",
isc.DynamicForm.$9a,"='",isc.DynamicForm.$99r,"' "
)}
return this.$99t}
,isc.A.getInlineErrorHandle=function isc_FormItem_getInlineErrorHandle(){
return this.getDocument().getElementById(this.$158j())}
,isc.A.getErrorIconHTML=function isc_FormItem_getErrorIconHTML(_1){
this.$79u=_1;
var _2=this.getErrorIconId();
var _3="";
if(_1!=null&&isc.Canvas.ariaEnabled()&&!isc.Canvas.useLiteAria()){
if(isc.isAn.Array(_1))_1=_1.join(",");
_3=" aria-label='"+String.asAttValue(String.htmlStringToString(_1))+"'"}
var _4=this.iconHSpace;
if(this.getErrorOrientation()=="left")_4*=-1;
return this.$157(
_2,
this.errorIconWidth,this.errorIconHeight,
"top",
0,
_4,
null,
this.form.getImgURL(this.errorIconSrc),
false,
_3,
null,
isc.DynamicForm.$89+"='"+this.getID()+"' "+
isc.DynamicForm.$9a+"='"+this.errorIconName+"'"
)}
,isc.A.getErrorIconId=function isc_FormItem_getErrorIconId(){
return this.$qs("error")}
,isc.A.getHint=function isc_FormItem_getHint(){
if(!this.showHint||!this.hint)return null;
return this.hint}
,isc.A.itemVisibilityChanged=function isc_FormItem_itemVisibilityChanged(_1){
this.visibilityChanged()}
,isc.A.drawing=function isc_FormItem_drawing(_1){
if(this.logIsInfoEnabled(this.$n3)){
this.logInfo("About to draw this form item."+
(_1?" [Item added / visibility changed]."
:" [ContainerWidget drawn]."),
"drawing")}
this.$185l()}
,isc.A.drawn=function isc_FormItem_drawn(){
if(this.logIsInfoEnabled(this.$n3)){
this.logInfo("Form item drawn "+
(this.containerWidget==this.form?
"in form "+this.form.getID():
"in container widget "+this.containerWidget.getID())+
(this.logIsDebugEnabled("drawing")?this.getStackTrace():""),
"drawing")}
if(this.$145l()){
var _1=this.containerWidget;
while(_1!=null){
_1.$144z();
_1=_1.parentElement}
}
this.$189t=true;
this.$if=true;
if(this.$15q)this.$158=true;
this.$15q=null;
this.$159();
this.$142r();
delete this.$189t;
if(isc.screenReader)this.addContentRoles()}
,isc.A.redrawing=function isc_FormItem_redrawing(){
if(this.logIsInfoEnabled(this.$n3)){
this.logInfo("About to redraw this form item.","drawing")}
if(isc.Browser.isIE&&this.hasFocus&&this.form&&!this.form.$10u){
this.form.elementChanged(this)}
if(this.mustRefocusOnRedraw&&this.$16j(true)){
this.$516()}
this.form.clearingElement(this);
this.$13m=null;
this.$146y=true;
this.$185l();
if(this.mustRefocusOnRedraw&&this.hasFocus)this.blurItemWithoutHandler()}
,isc.A.redrawn=function isc_FormItem_redrawn(){
if(this.logIsInfoEnabled("drawing")){
this.logInfo("Form item redrawn "+
(this.containerWidget==this.form?
"in form "+this.form.getID():
"in container widget "+this.containerWidget.getID())+
(this.logIsDebugEnabled("drawing")?this.getStackTrace():""),
"drawing")}
this.$16a();
this.$159();
this.$142r(true);
if(isc.screenReader)this.addContentRoles();
if(this.mustRefocusOnRedraw&&this.$16j(true)){
this.$109()}
delete this.$146y;
if(this.$17m){
this.$195e=true}
}
,isc.A.$142r=function isc_FormItem__showValueAfterDraw(_1){
if(!this.valueHasChanged()&&
(this.isSetToDefaultValue()||this._value==null))
{
this.setValue()}else{
this.$124t(this._value);
if(_1&&this.form.$146y)this.$1949=true}
}
,isc.A.valueHasChanged=function isc_FormItem_valueHasChanged(){
return this.form.valueHasChanged(this.name)}
,isc.A.$516=function isc_FormItem__storeFocusForRedraw(){
if(this.$199k)return;
this.$105=true;
this.rememberSelection();
if(this.items){
for(var i=0;i<this.items.length;i++){
if(this.items[i].hasFocus){
return this.items[i].$516()}
}
}
var _2=this.$166();
if(_2!=null&&_2!=this.getFocusElement()){
var _3=this.getPickerIcon();
if(_3!=null&&this.$16g(_3)==_2){
this.$65o=_3}else if(this.icons){
for(var i=0;i<this.icons.length;i++){
if(this.$16g(this.icons[i])==_2){
this.$65o=this.icons[i];
break}
}
}
}
}
,isc.A.$109=function isc_FormItem__refocusAfterRedraw(){
var _1=this.isDrawn()&&this.isVisible();
if(_1){
var _2=isc.EH.getFocusCanvas();
if(_2!=null&&_2!=this.form){
_1=false}else{
var _3=this.form.getFocusSubItem();
if(_3!==this&&_3!=this.parentItem&&
(!this.items||this.items.contains(_3)))
{
_1=false}
}
}
delete this.$105;
if(_1&&isc.Browser.isIE){
isc.FormItem.$137y(this)}
if(_1){
this.form.$65n(this);
this.containerWidget.notifyAncestorsAboutToReflow()}
var _4=false;
if(this.$65o){
var _5=this.getIcon(this.$65o);
delete this.$65o;
if(_5){
if(_1){
this.focusInIcon(_5)}
_4=true}
}
if(_1&&!_4){
this.$93l=true;
this.focusInItem()}
if(_1){
this.containerWidget.notifyAncestorsReflowComplete();
if(isc.EH.useFocusInEvents&&
isc.EH.synchronousFocusNotifications)
{
this.containerWidget.notifyAncestorsAboutToReflow();
this.$188o=true}
}
}
,isc.A.$159=function isc_FormItem__applyHandlersToElement(){
if(this.$kk()){
var _1=this.getFocusElement();
if(!_1){
if(this.$872()){
this.logWarn("Attempting to apply event handlers to this item. Unable to get a pointer to this item's focus element");
return}
}else{
if(this.$105m){
if(this.multiple){
_1.multiple=this.multiple}else{
_1.multiple=false}
}
if(this.accept){
_1.accept=this.accept}
_1.onfocus=isc.FormItem.$12u;
_1.onblur=isc.FormItem.$12w;
if(this.supportsCutPasteEvents){
_1.onpaste=isc.FormItem.$1852;
_1.oncut=isc.FormItem.$1851}
if(this.$16b){
for(var _2 in this.$16b){
if(this.$16b[_2]==null)continue;
_1[_2]=this.$16b[_2]}
}
}
}
this.$16c()}
,isc.A.$16c=function isc_FormItem__setUpIconEventHandlers(){
if(this.showPickerIcon){
var _1=this.getPickerIcon();
if(_1&&_1.visible){
this.$16d(this.getPickerIcon())}
}
if(this.showIcons&&this.icons&&this.icons.length>0){
for(var i=0;i<this.icons.length;i++){
var _3=this.icons[i];
if(_3&&(this.$16e(_3)||_3.visible)){
this.$16d(_3)}
}
}
}
,isc.A.$16d=function isc_FormItem__iconDrawn(_1){
if(!_1.imgOnly){
var _2=this.$16g(_1);
if(_2){
_2.onfocus=isc.FormItem.$120
_2.onblur=isc.FormItem.$122
if(this.$92r){
_2.href=this.$14h;
_2.onclick=isc.FormItem.$124}
}
}
}
,isc.A.clearing=function isc_FormItem_clearing(_1){
if(this.logIsInfoEnabled("drawing")){
this.logInfo("About to clear this form item"+
(_1?" [Item removed / visibility changed]."
:" [ContainerWidget cleared]."),
"drawing")}
}
,isc.A.cleared=function isc_FormItem_cleared(){
if(this.logIsInfoEnabled("drawing")){
this.logInfo("Form item cleared "+
(this.containerWidget==this.form?
"from within form "+this.form.getID():
"from within container widget "+this.containerWidget.getID())+
(this.logIsDebugEnabled("drawing")?this.getStackTrace():""),
"drawing")}
if(this.$145l()){
var _1=this.containerWidget;
while(_1!=null){
_1.$1440();
_1=_1.parentElement}
}
this.form.clearingElement(this);
this.$16a();
this.$158=false;
this.$15q=false;
this.$if=false;
if(isc.FormItem.$92t==this){
isc.FormItem.$92t.checkForEditorExit(true,true)}
}
,isc.A.$16a=function isc_FormItem__clearCachedHandles(){
this.$14x=null;
this.$13m=null;
this.$16i=null;
this.$15d={}}
,isc.A.isDrawn=function isc_FormItem_isDrawn(){
return this.$if}
,isc.A.$14v=function isc_FormItem__setUpIcons(){
this.$156h=null;
this.$156i=null;
this.$156j=0;
this.$156k=null;
this.$156l=0;
var _1=this.icons;
if(_1==null)return;
var _2=_1.length;
for(var i=0;i<_2;++i){
var _4=_1[i];
this.$36c(_4)}
if(this.$156r()){
var _5=this.$156h=[],
_6=this.$156i=[],
_7=this.$156k=[];
for(var i=0;i<_2;++i){
var _4=_1[i];
if(_4.inline){
_5.add(_4)}
}
var _8=_5.length
;
for(var j=0;j<_8;++j){
var _4=_5[j];
if(_4.inlineIconAlign==null||
(_4.inlineIconAlign!=="left"&&_4.inlineIconAlign!=="right"))
{
_4.inlineIconAlign=(j==0?"left":"right")}
if(_4.inlineIconAlign==="left"){
_6.add(_4)}else{
_7.add(_4)}
}
}
}
,isc.A.$180o=function isc_FormItem__removeIcons(){
if(!this.icons||this.icons.length==0)return;
for(var i=this.icons.length-1;i>=0;i--){
isc.TabIndexManager.removeTarget(this.getTabIndexIdentifierForIcon(this.icons[i]))}
this.icons=null}
,isc.A.$156s=function isc_FormItem__recomputeLeftAndRightInlineIconsWidth(){
this.$156j=0;
this.$156l=0;
if(this.$156r()&&this.$156h!=null){
var _1=this.$156i,
_2=_1.length
;
for(var i=0;i<_2;++i){
var _4=_1[i];
if(_4.visible){
this.$156j+=_4.width+_4.hspace}
}
_1=this.$156k;
_2=_1.length;
for(var i=0;i<_2;++i){
var _4=_1[i];
if(_4.visible){
this.$156l+=_4.width+_4.hspace}
}
}
}
,isc.A.$36c=function isc_FormItem__setUpIcon(_1){
this.$753(_1);
this.setupIconTabPosition(_1);
if(this.iconIsDisabled(_1))_1.$153=true;
if(_1.width==null)_1.width=this.iconWidth;
if(_1.height==null)_1.height=this.iconHeight;
if(_1.hspace==null)_1.hspace=this.iconHSpace;
_1.hspace=Math.max(0,_1.hspace);
if(_1.canFocus==false)_1.imgOnly=true}
,isc.A.getIconTabPosition=function isc_FormItem_getIconTabPosition(_1){
var _2=this.icons.indexOf(_1);
if(this.showPickerIcon)_2++;
return _2}
,isc.A.setupIconTabPosition=function isc_FormItem_setupIconTabPosition(_1){
var _2=this.getIconTabPosition(_1);
if(_2==-1){
this.logWarn("Icon passed to setupIconTabPosition is not present in this.icons:"
+this.echo(_1),"TabIndexManager");
return}
isc.TabIndexManager.addTarget(
this.getTabIndexIdentifierForIcon(_1),
true,
this.ID,
_2,
{target:this,methodName:"iconAutoTabIndexUpdated"},
{target:this,methodName:"iconSyntheticShiftFocus"}
)}
,isc.A.getTabIndexIdentifierForIcon=function isc_FormItem_getTabIndexIdentifierForIcon(_1){
if(this.$180p==null)this.$180p={};
if(this.$180p[_1.name]==null){
this.$180p[_1.name]="$"+this.ID+"_"+_1.name}
return this.$180p[_1.name]}
,isc.A.getIconFromTabIndexIdentifier=function isc_FormItem_getIconFromTabIndexIdentifier(_1){
if(this.$180p==null)return null;
for(var _2 in this.$180p){
if(this.$180p[_2]==_1)return _2}
}
);
isc.evalBoundary;isc.B.push(isc.A.getPickerIconTabPosition=function isc_FormItem_getPickerIconTabPosition(){
return 0}
,isc.A.setupPickerIconTabPosition=function isc_FormItem_setupPickerIconTabPosition(_1){
var _2=this.getPickerIconTabPosition();
isc.TabIndexManager.addTarget(
this.getTabIndexIdentifierForIcon(_1),
true,
this.ID,
_2,
{target:this,methodName:"iconAutoTabIndexUpdated"},
{target:this,methodName:"pickerIconSyntheticShiftFocus"}
)}
,isc.A.iconAutoTabIndexUpdated=function isc_FormItem_iconAutoTabIndexUpdated(_1){
var _2=this.getIconFromTabIndexIdentifier(_1),
_3=_2?this.getIcon(_2):null;
if(_3){
var _4=this.$16g(_3);
if(_4){
isc.FormItem.setElementTabIndex(_4,this.$16p(_3))}
}
}
,isc.A.getIconsHTML=function isc_FormItem_getIconsHTML(_1,_2,_3){
if(!this.showIcons)return isc.emptyString;
var _4=this.$16j(true),
_5=_1&&this.$185k()
;
if((this.icons==null||this.icons.length==0)&&!_5){
return isc.emptyString}
var _6=isc.SB.create(),
_7=false;
if(_2==null){
var _2=[];
if(_1){
var _8=this.getPickerIcon();
if(_8&&_8.visible){
_2=[_8]}
}
_2.addList(this.icons);
if(this.$169t()){
var k=0;
for(var i=0;i<_2.length;++i){
var _11=_2[i];
if(_11.inline){
++k}else if(k>0){
_2[i-k]=_11}
}
_2.setLength(_2.length-k)}
}
for(var i=0;i<_2.length;i++){
var _11=_2[i];
if(!_11.visible||this.$16e(_11)){
continue}
if(_7==false){
_7=true;
_6.append(this.$156m,_3,this.$156n)}
_6.append(this.$156o);
var _12=_4&&this.$54o(_11,true);
_6.append(this.getIconHTML(_11,null,this.iconIsDisabled(_11),!!_12));
_6.append(this.$156p)}
if(_7)_6.append(this.$156q);
return _6.release(false)}
,isc.A.$16j=function isc_FormItem__hasRedrawFocus(_1){
var _2=this.hasFocus||this.$105;
if(_1&&!_2&&this.items!=null){
for(var i=0;i<this.items.length;i++){
if(this.items[i].hasFocus||this.items[i].$105)_2=true;
break}
}
return!!_2}
,isc.A.$753=function isc_FormItem__setupIconName(_1,_2){
if(_2==null)_2=_1.autoName||_1.name;
if(_2==null&&_1.$151!=null){
this.logWarn("Attempting to use '$151' property as icon name - this property has been deprecated in favor of 'name'");
_2=_1.$151}
if(_2!=null){
var _3=this.icons?this.icons.findAll("name",_2):[];
if(_3!=null&&_3.length>0&&
(_3.length>1||_3[0]!=_1))
{
this.logWarn("This form item has more than one icon with the same specified name:"
+_2+". Ignoring this name and using an auto-generated one instead.");
_2=null}else{
_1.name=_2;
return _1}
}
if(this.$16k==null)this.$16k=0;
_1.name="_"+this.$16k++;
return _1}
,isc.A.$16l=function isc_FormItem__getIconVAlign(_1){
if(this.$150&&(_1==this.$150))return null;
var _2=this.iconVAlign;
if(_2==isc.Canvas.TOP){
return"top"}else if(_2==isc.Canvas.BOTTOM){
return(isc.Browser.isSafari?"bottom":"text-bottom")}else if(_2==isc.Canvas.CENTER){
return"middle"}
return _2}
,isc.A.$16m=function isc_FormItem__getIconVMargin(){
return 0}
,isc.A.$1681=function isc_FormItem__getIconTextAlign(_1){
return this.$1682}
,isc.A.getIconPrompt=function isc_FormItem_getIconPrompt(_1){
if(this.iconIsDisabled(_1))return null;
return _1&&_1.prompt||this.iconPrompt}
,isc.A.getIconURL=function isc_FormItem_getIconURL(_1,_2,_3,_4){
let _5=_1.src||this.defaultIconSrc;
if(_5==isc.Canvas.$5w)return isc.Canvas.$wz;
_3=this.showDisabled&&(_3||this.iconIsDisabled(_1));
let _6=_3?isc.StatefulCanvas.STATE_DISABLED
:_2?isc.StatefulCanvas.STATE_OVER:null,
_7=(_1.showRTL&&this.isRTL()?this.$132t:null),
_8=_1.customState
;
if(_1.showError&&this.hasErrors())_6=this.$260b+(_6?_6:"");
let _9=false;
if(isc.isAn.Object(_5)){
if(_5._base){
_9=true;
if(_6)_5=_5[_6]||_5._base;
else _5=_5._base}
}
let _10=isc.Canvas.$1861(_5);
if(!_10&&isc.isA.String(_5)){
var _11=isc.Media.getStockIconSrc(_5);
if(_11)_10=isc.Canvas.$1861(_11);
if(!_10){
var _12=isc.Media.getStockIconKeyForSrc(_5,null,this);
if(_12){
var _11=isc.Media.getStockIconSrc(_5);
if(_11)_10=isc.Canvas.$1861(_11)}
}
}
if(_10!=null){
if(_10.svg!=null){
_10=isc.Canvas.$1861(isc.Img.urlForState(_5,
false,_4,null,_7,_8));
if(!_10.cssClass){
_10.cssClass=_1.baseStyle||this.iconBaseStyle}
}else if(_10.src!=null){
_10.src=isc.Img.urlForState(_10.src,
false,_4,_6,_7,_8)}
if(_10.cssClass!=null){
if(this.showErrorPickerIcon&&this.hasErrors()){
_10.cssClass+="Error"}
if(_3){
_10.cssClass+=isc.StatefulCanvas.STATE_DISABLED}else{
if(_4)_10.cssClass+=isc.StatefulCanvas.FOCUSED;
if(_2)_10.cssClass+=isc.StatefulCanvas.STATE_OVER}
if(_7!=null)_10.cssClass+=_7
if(_8!=null)_10.cssClass+=_8}
return _10}else{
if(_9)return _5;
if(this.showErrorPickerIcon&&this.hasErrors()){
_6="Error"+_6}
_5=isc.Img.urlForState(_5,false,_4,_6,_7,_8);
return _5}
}
,isc.A.getIconStyle=function isc_FormItem_getIconStyle(_1,_2,_3,_4){
if(!_1)return null;
var _5;
if(_1.baseStyle!=null)_5=_1.baseStyle;
if(_5==null){
var _6=isc.Media.getStockIconKeyForSrc(_1.src||_1,null,this);
if(_6){
var _7=isc.Media.getStockIconSrc(_1.src||_1);
if(_7){
var _8=isc.Canvas.$1861(_7);
if(_8&&_8.cssClass)_5=_8.cssClass}
}
}
if(_5==null){
if(this.isPickerIcon(_1)){
_5=this.pickerIconStyle}
}
if(_5==null)_5=this.iconBaseStyle;
if(_5==null)return null;
if(this.showDisabled&&(_3||this.iconIsDisabled(_1))){
_5+=isc.StatefulCanvas.STATE_DISABLED}else{
if(_4)_5+=isc.StatefulCanvas.FOCUSED;
if(_2)_5+=isc.StatefulCanvas.STATE_OVER}
if(_1.showRTL&&this.isRTL())_5+=this.$132u;
if(_1.customState!=null)_5+=_1.customState;
return _5}
,isc.A.getIconBackgroundColor=function isc_FormItem_getIconBackgroundColor(_1,_2,_3,_4){
return _1.backgroundColor}
,isc.A.getIconHTML=function isc_FormItem_getIconHTML(_1,_2,_3,_4){
var _5=_1.inline&&this.$156r(),
_6=this.getIconWidth(_1),
_7=this.getIconHeight(_1),
_8=(_1.hspace!=null?_1.hspace:this.iconHSpace),
_9=this.getIconBackgroundColor(_1,_2,_3,_4),
_10=this.form.getID(),
_11=this.getItemID(),
_12=_1.name,
_13=this.getIconStyle(_1,_2,_3,_4),
_3=this.iconIsDisabled(_1),
_14=(this.canTabToIcons==null&&this.form!=null)
?this.form.canTabToIcons:this.canTabToIcons,
_15=_3||_14==false?-1:this.$16p(_1);
var _16=_1&&_1.extraCSS;
if(_5&&_1.inlineIconAlign==="left"){
_8*=-1}
if(_5&&_1.text!=null){
var _17=this.isRTL();
if(_8<0){
_8*=-1;
_17=!_17}
var _18=this.$16m(_1);
var _19="<div role='button' id='"+this.$16q(_12)+"'";
if(_13!=null)_19+=" class='"+_13+"'";
var _20=this.$1681(_1);
_19+=" style='display:inline-block";
if(isc.Browser.isIE&&isc.Browser.version<=7){
if(_13!=null){
_6=Math.max(0,_6-isc.Element.$yp(_13));
_7=Math.max(0,_7-isc.Element.$yo(_13))}
}else{
_19+=";"+isc.Element.$1434+":border-box"}
var _21=_1.baseStyle&&isc.Element.getStyleDeclaration(_1.baseStyle);
var _22=parseInt(_21&&_21.lineHeight);
if(isNaN(_22))_22=_7;
_19+=";width:"+_6+
"px;height:"+_7+
"px;line-height:"+_22+
"px;vertical-align:"+this.$16l(_1)+
(_20?";text-align: "+_20:"")+
";margin-top:"+_18+
"px;margin-bottom:"+_18+
"px;"+
(_17?"margin-right:":"margin-left:")+_8+
"px";
if(_9!=null){
_19+=";background-color:"+_9}
_19+=";overflow:hidden'";
if(isc.Canvas.ariaEnabled()){
_19+=" aria-label='"+String.asAttValue(String.htmlStringToString(_1.prompt))+"'";
if(_3)_19+=" aria-disabled='true'"}
if(_3)_19+=" disabled='disabled'";
_19+=" tabindex='"+_15+"'";
_19+=" "+isc.DynamicForm.$89+"='"+_11+"'";
_19+=" "+isc.DynamicForm.$9a+"='"+_12+"'";
_19+=" handleNativeEvents='false'";
_19+=">"+_1.text+"</div>";
return _19}
var _23=this.getIconURL(_1,_2,_3,_4);
if(_23&&(_23.svg||_23.src)&&_23.cssClass)_13=_23.cssClass;
var _24=(_13==null?isc.emptyString:" class='"+_13+this.$ob);
var _25=(_3?_1.disabledCursor:_1.cursor);
if(!_25)_25=(_3?isc.Canvas.DEFAULT:isc.Canvas.POINTER_OR_HAND);
if(_1.imgOnly){
var _26=(_24==null?"":_24+" "),
_27=isc.DynamicForm.$89+"='"+_11+"' "+
isc.DynamicForm.$9a+"='"+_12+"'"
;
return this.$157(
this.$16n(_12),
_6,
_7,
this.$16l(_1),
this.$16m(_1),
_8,
_9,
_23,
!_5,
_26,
_25,
_27,
_1
)}else{
if(isc.FormItem.$16o==null){
isc.FormItem.$950=" style='margin-left:";
isc.FormItem.$951=" style='margin-right:";
isc.FormItem.$16o=[
(this.$92r
?"<a role='button' ID='":"<span role='button' ID='"),
,
"'",
isc.FormItem.$950,
,
"px;"
+(isc.Browser.isMoz?"-moz-user-focus:":""),
,
,
"' tabIndex=",
,
" ",
isc.DynamicForm.$89,
"='",
,
"' ",
isc.DynamicForm.$9a,
"='",
,
"' handleNativeEvents=false>",
,
(this.$92r?"</a>":"</span>")
]
}
var _28=isc.FormItem.$16o;
_28[1]=this.$16q(_12);
var _29=this.$16r(_1);
if(_29){
if(this.isRTL()){
_28[3]=isc.FormItem.$951}else{
_28[3]=isc.FormItem.$950}
_28[4]=_8}else{
_28[4]="0"
}
if(isc.Browser.isMoz)_28[6]=(_15<0?"ignore;":"normal;");
if(!_5){
_28[7]=";display:block;height:"+_7+"px;"
}else{
_28[7]=null}
if(_1.extraCSS){
if(!_28[7])_28[7]="";
_28[7]+=_1.extraCSS}
_28[9]=_15;
_28[10]=" ";
if(isc.Canvas.ariaEnabled()&&!isc.Canvas.useLiteAria()){
if(_1.prompt){
_28[10]=" aria-label='"+String.asAttValue(String.htmlStringToString(_1.prompt))+"' "}
if(_3)_28[10]+=" aria-disabled='true' "}
_28[13]=_11;
_28[17]=_12;
_28[19]=this.$157(
this.$16n(_12),
_6,
_7,
this.$16l(_1),
this.$16m(_1),
(!_29?_8:null),
_9,
_23,
!isc.Browser.isDOM||!isc.Browser.isIE,
_24,
_25,
null,
_1
);
return _28.join(isc.emptyString)}
}
,isc.A.$16r=function isc_FormItem__applyIconHSpaceToLink(_1){
return(!isc.Browser.isIE&&!isc.Browser.isSafari&&!_1.imgOnly&&!isc.Browser.isStrict)}
,isc.A.$157=function isc_FormItem__getIconImgHTML(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13){
var _14=this.$133c;
if(_4!=null){
_14[0]=this.$14i;
_14[1]=_4}else{
_14[0]=null;
_14[1]=null}
_14[3]=_5;
_14[5]=_5;
if(_6!=null){
var _15=this.isRTL();
if(_6<0){
_6*=-1;
_15=!_15}
_14[7]=(_15?"margin-right:":"margin-left:")+_6+"px;"}else{
_14[7]=null}
_14[8]=(_7!=null?"background-color:"+_7+";":null);
if(_9)_14[9]="display:block;";
else _14[9]=""
_14[10]=(_11!=null?"cursor:"+_11+";":null);
if(_13&&_13.extraCSS){
if(!_14[7])_14[7]="";
_14[7]+=_13.extraCSS}
var _16=_14.join(isc.$ad);
if(_10==null){
_10=" id='"+_1+"'"}else{
_10+=" id='"+_1+"'"}
var _17=isc.FormItem.$4s=isc.FormItem.$4s||
{align:isc.Browser.isSafari?"absmiddle":"TEXTTOP"};
_17.src=_8;
_17.width=_2;
_17.height=_3;
_17.extraCSSText=_16;
_17.extraStuff=_10;
_17.eventStuff=_12;
return isc.Canvas.imgHTML(_17)}
,isc.A.$16q=function isc_FormItem__getIconLinkId(_1){
if(this.isInactiveHTML()){
return this.$qs(this._$_iLink_+_1)}
if(!this.$16t)this.$16t={};
var _2=this.$16t;
if(!_2[_1]){
_2[_1]=this.$qs(this._$_iLink_+_1,true)}
return _2[_1]}
,isc.A.$16n=function isc_FormItem__getIconImgId(_1){
if(this.isInactiveHTML()){
return this.$qs(this._$_iImg_+_1)}
if(!this.$16u)this.$16u={};
var _2=this.$16u;
if(!_2[_1]){
_2[_1]=this.$qs(this._$_iImg_+_1,true)}
return _2[_1]}
,isc.A.$16g=function isc_FormItem__getIconLinkElement(_1){
_1=this.getIcon(_1);
if(_1==null||_1.imgOnly)return null;
var _2=this.$16q(_1.name);
return isc.Element.get(_2)}
,isc.A.$16v=function isc_FormItem__getIconImgElement(_1){
var _2=this.getIcon(_1);
if(_2==null){
if(_1==this.errorIconName){
return isc.Element.get(this.getErrorIconId())}
return null}
var _3=this.$16n(_2.name);
return isc.Element.get(_3)}
,isc.A.$16w=function isc_FormItem__getTargetIcon(_1){
if(!_1||!this.icons)return null;
var _2=isc.DynamicForm._getItemInfoFromElement(_1);
if(!_2||_2.item!=this)return null;
return _2.icon}
,isc.A.isPickerIcon=function isc_FormItem_isPickerIcon(_1){
if(isc.isAn.Object(_1))return _1.pickerIcon;
var _2=this.getPickerIcon();
return(_2&&_2.name==_1)}
,isc.A.$184e=function isc_FormItem__getShowIconOnFocus(_1){
var _2=_1.showOnFocus;
if(_2==null){
_2=_1.pickerIcon?this.showPickerIconOnFocus:this.showIconsOnFocus}
return!!_2}
,isc.A.$184f=function isc_FormItem__getShowDisabledIconOnFocus(_1){
var _2=_1.showDisabledOnFocus;
if(_2==null){
_2=_1.pickerIcon
?this.showDisabledPickerIconOnFocus:this.showDisabledIconsOnFocus}
return _2}
,isc.A.$185l=function isc_FormItem__resolveIconsVisibility(){
if(this.showPickerIcon){
var _1=this.getPickerIcon();
_1.visible=this.$16f(_1)}
if(this.shouldShowErrorIconInline())this.checkInlineErrorIconVisibility();
if(!this.icons)return;
var _2=this.icons,
_3=false;
for(var i=0;i<_2.length;i++){
var _5=_2[i];
if(_5.name==null){
this.$185m(_5)}
var _6=_5.visible,
_7=this.$16f(_5);
if(_6!=_7){
_5.visible=_7}
if(_5.inline){
if(_5.inline)_3=true}
}
if(_3){
this.$156s()}
}
,isc.A.$16f=function isc_FormItem__shouldShowIcon(_1,_2){
if(_1==null)return false;
if(_1.pickerIcon&&!this.showPickerIcon)return false;
if(!_1.pickerIcon&&this.$185n)return false;
if(this.$184e(_1)){
if(_2==null)_2=this.$16j(true);
if(_2==false){
if(!this.$19g)return false;
if(this.$128z&&!this.$128z()){
return false}
}
if(this.iconIsDisabled(_1)&&!this.$184f(_1)){
return false}
}
return this.$1858(_1)}
,isc.A.$1858=function isc_FormItem__evaluateIconShowIf(_1){
if(this.$68y()||(this.renderAsStatic()&&_1.pickerIcon)){
return false}
if(_1.showIf==null)return true;
if(_1.showIf===true||_1.showIf==this.$18q)return true;
if(_1.showIf===false||_1.showIf==this.$18r)return false;
isc.Func.replaceWithMethod(_1,"showIf","form,item");
return!!_1.showIf(this.form,this)}
,isc.A.$185k=function isc_FormItem__pickerIconVisible(){
if(!this.showPickerIcon)return false;
if(this.$68y()){
return false}
var _1=this.getPickerIcon();
if(_1&&_1.visible){
return true}
return false}
,isc.A.$1857=function isc_FormItem__writeControlTable(){
if(this.$185k())return true;
if(this.alwaysShowControlBox!=null)return this.alwaysShowControlBox;
if(this.showPickerIcon){
var _1=this.getPickerIcon();
if(_1&&this.$1858(_1))return true}
return false}
,isc.A.$16e=function isc_FormItem__writeIconIntoItem(_1){
if(_1.writeIntoItem)return true;
return false}
,isc.A.$16x=function isc_FormItem__mayShowIcons(){
return this.showIcons&&this.icons!=null}
,isc.A.getTotalIconsWidth=function isc_FormItem_getTotalIconsWidth(){
if(!this.$16x())return 0;
var _1=0,
_2=this.$16j(true),
_3=this.$156r();
for(var i=0;i<this.icons.length;i++){
var _5=this.icons[i];
if(!_5.visible||this.$16e(_5)||
(_3&&_5.inline))
{
continue}
_1+=(_5.width!=null?_5.width:this.iconWidth)+
(_5.hspace!=null?_5.hspace:this.iconHSpace);
if(_5.baseStyle)_1+=isc.Element.$yp(_5.baseStyle)}
return _1}
,isc.A.getIconsHeight=function isc_FormItem_getIconsHeight(){
if(!this.$16x())return 0;
var _1=0,
_2=this.$16j(true);
for(var i=0;i<this.icons.length;i++){
var _4=this.icons[i];
if(!_4.visible||this.$16e(_4)){
continue}
var _5=(_4.height!=null?_4.height:this.iconHeight);
_5+=this.$16m()*2;
if(_5>_1)_1=_5}
return _1}
,isc.A.setIcons=function isc_FormItem_setIcons(_1){
this.$180o();
this.icons=_1;
this.$14v();
this.redraw()}
,isc.A.addIcon=function isc_FormItem_addIcon(_1,_2){
if(_1==null)return;
if(this.icons==null)this.icons=[];
var _3=this.getIcon(_1.name);
var _4=this.icons.indexOf(_3);
if(_4>=0){
if(_2!=null&&_2!=_4){
this.icons.slide(_4,_2)}
}else{
if(_2==null)_2=this.icons.length;
this.icons.addAt(_1,_2)}
this.setIcons(this.icons);
return this.getIcon(_1.name)}
,isc.A.removeIcon=function isc_FormItem_removeIcon(_1){
if(!this.icons||this.icons.length==0)return;
var _2=isc.isA.String(_1)?_1:_1.name;
var _3=this.getIcon(_2);
if(_3){
isc.TabIndexManager.removeTarget(this.getTabIndexIdentifierForIcon(_3));
this.icons.remove(_3);
_3=null;
this.setIcons(this.icons);
return true}
return false}
,isc.A.getIconByProperty=function isc_FormItem_getIconByProperty(_1,_2){
if(this.icons!=null)return this.icons.find(_1,_2)}
,isc.A.setIconEnabled=function isc_FormItem_setIconEnabled(_1){
_1=this.getIcon(_1);
if(!_1)return;
var _2=!this.iconIsDisabled(_1);
if(!!_1.$153!=_2)return;
if(!_2)_1.$153=true;
else delete _1.$153;
if(!this.isDrawn())return;
var _3=this.$16g(_1),
_4=this.$16v(_1);
if(_3!=null){
if(!_2){
isc.FormItem.setElementTabIndex(_3,-1);
_3.style.cursor="default"
}else{
isc.FormItem.setElementTabIndex(_3,this.$16p(_1))
_3.style.cursor=""}
if(isc.Canvas.ariaEnabled())_3.setAttribute("aria-disabled",!_2);
_3.disabled=!_2;
if(_1.inline&&this.$156r()&&_1.text!=null){
var _5=this.getIconStyle(_1,null,!_2);
if(_5!=null)_3.className=_5}
}
if(_4!=null){
var _6=this.getIconURL(_1,null,!_2);
isc.Canvas.$wg(_4,_6);
var _5=this.getIconStyle(_1,null,!_2);
if(_5!=null&&!isc.Media.isFontIconConfig(_6))_4.className=_5;
_4.style.cursor=!_2?"default":isc.Canvas.POINTER_OR_HAND}
}
,isc.A.setIconDisabled=function isc_FormItem_setIconDisabled(_1,_2){
_1=this.getIcon(_1);
if(!_1)return;
var _3=this.iconIsDisabled(_1);
_1.disabled=_2;
if(_3!=_2){
this.setIconEnabled(_1)}
}
,isc.A.enableIcon=function isc_FormItem_enableIcon(_1){
this.setIconDisabled(_1,false)}
,isc.A.disableIcon=function isc_FormItem_disableIcon(_1){
this.setIconDisabled(_1,true)}
,isc.A.$181b=function isc_FormItem__setIconVisibilityRequiresRedraw(_1,_2){
var _3=_2&&this.$156r()&&_1.inline;
return this.redrawOnShowIcon||_3||_1.writeIntoItem||
_1.redrawOnShowIcon}
,isc.A.showIcon=function isc_FormItem_showIcon(_1){
if(isc.isA.String(_1)||isc.isA.Number(_1))_1=this.getIcon(_1);
if(!isc.isAn.Object(_1))return;
if(_1.name==null){
this.$185m(_1)}
var _2=_1.visible;
_1.showIf=this.$18q;
if(!_2&&this.$16f(_1)){
var _3=this.$16j(true),
_4=_3&&this.$54o(_1,true);
this.$185o(_1,_4)}
}
,isc.A.$185o=function isc_FormItem__showIcon(_1,_2){
_1.visible=true;
if(!this.showIcons||!this.containerWidget.isDrawn()||!this.isVisible())return;
if(this.$181b(_1,true)||
this.containerWidget.isDirty())
{
this.redraw();
return}
var _3=isc.Element.get(this.getIconCellID());
if(_3!=null){
if(_3.childNodes.length==0){
_3.innerHTML=this.getIconsHTML(!!_1.pickerIcon)}else{
var _4=this.getIconHTML(_1,null,this.renderAsDisabled(),
_2),
_5="<td>"+_4+"</td>",
_6=_3.firstChild,
_7=0;
for(var i=0;i<this.icons.length;i++){
if(this.icons[i]==_1)break;
if(this.icons[i].visible){
_7++}
}
if(_7==0){
isc.Element.insertAdjacentHTML(_6.rows[0],"afterBegin",
_5)}else{
isc.Element.insertAdjacentHTML(_6.rows[0].cells[_7-1],
"afterEnd",_5)}
}
this.$16z();
this.$16d(_1)}else{
this.logInfo("showIcon(): Unable to dynamically update icon visibility - redrawing the form","formItemIcons");
this.redraw()}
}
,isc.A.hideIcon=function isc_FormItem_hideIcon(_1){
if(isc.isA.String(_1)||isc.isA.Number(_1))_1=this.getIcon(_1);
if(!isc.isAn.Object(_1))return;
if(_1.name==null){
this.$185m(_1)}
var _2=_1.visible;
_1.showIf=this.$18r;
if(_2&&!this.$16f(_1)){
this.$185p(_1)}
}
,isc.A.$185p=function isc_FormItem__hideIcon(_1){
_1.visible=false;
if(!this.showIcons||!this.containerWidget.isDrawn()||!this.isVisible())return;
if(this.$181b(_1,false)||this.containerWidget.isDirty())
{
this.redraw();
return}
var _2=_1.imgOnly?this.$16v(_1)
:this.$16g(_1);
if(_2==null){
this.logInfo("hideIcon(): Unable to dynamically update icon visibility - redrawing the form");
this.redraw();
return}
var _3=_2.parentNode;
if(_3.tagName!="TD"){
isc.Element.clear(_2)}else{
_3.parentNode.removeChild(_3)}
var _4=this.$156r()&&_1.inline;
if(_4)this.$156s();
this.$16z()}
,isc.A.setIconShowOnFocus=function isc_FormItem_setIconShowOnFocus(_1,_2){
_1.showOnFocus=_2;
this.$181c([_1])}
,isc.A.setShowIconsOnFocus=function isc_FormItem_setShowIconsOnFocus(_1){
this.showIconsOnFocus=_1;
this.$181c()}
,isc.A.setShowPickerIconOnFocus=function isc_FormItem_setShowPickerIconOnFocus(_1){
this.showPickerIconOnFocus=_1;
this.$181c([this.getPickerIcon()])}
,isc.A.$16z=function isc_FormItem__iconVisibilityChanged(){
this.$160()}
,isc.A.$1809=function isc_FormItem__setIconVisibilityForFocus(_1,_2){
var _3;
_1=!!_1;
if(!_1)delete this.$185n;
var _4=_2?_2:[];
if(!_2){
if(this.showPickerIcon)_4.add(this.getPickerIcon())
if(this.icons!=null){
_4.addList(this.icons)}
}
if(_4.length==0){
return}
var _5=[],
_6=[],
_7=this.showIcons,
_8=this.$19g
;
var _9=this.logIsDebugEnabled("icons");
for(var i=0;i<_4.length;i++){
var _11=_4[i],
_12=_11.visible,
_13=this.$16f(_4[i],_1);
if(_9){
this.logDebug("Setting icons visibility for focus - icon "
+(_11.pickerIcon?"(picker)":this.icons.indexOf(_11))+
((_12==_13)?" visibility unchanged.":
(_13?" showing.":" hiding.")),"icons")}
if(_13==_12){
if(_12){
this.$181e(_11,_1)}
continue}
var _14=this.$181b(_11,_13);
if(_14){
if(_9){
this.logDebug("Set icon visibility requires item redraw","icons")}
this.redraw();
return}
if(_13){
_5.add(_11)}else{
_6.add(_11)}
}
for(var i=0;i<_5.length;i++){
var _15=this.$54o(_5[i],_1);
this.$185o(_5[i],_1&&_15)}
if(_6.length>0&&!_2){
for(var i=0;i<_6.length;i++){
this.$185p(_6[i])}
}
}
,isc.A.$185q=function isc_FormItem__hideIconsForKeypress(){
this.$185n=true;
var _1=this.icons;
if(!_1||_1.length==0){
return}
var _2=[];
for(var i=0;i<_1.length;i++){
var _4=_1[i];
if(!_4.visible)continue;
if(this.$181b(_4,false)||
this.containerWidget.isDirty())
{
this.redraw();
return}
_2.add(_4)}
for(var i=0;i<_2.length;i++){
this.$185p(_2[i])}
}
,isc.A.$181c=function isc_FormItem__updateOnFocusIconVisibility(_1){
var _2=this.$16j(true);
if(!_2)this.$1809(false,_1)}
,isc.A.getIcon=function isc_FormItem_getIcon(_1){
if(_1==null)return;
var _2;
if(this.icons){
if(isc.isA.Number(_1)){
return this.icons[_1]}
for(var i=0;i<this.icons.length;i++){
if(this.icons[i]==_1||this.icons[i].name==_1)_2=this.icons[i]}
}
if(!_2&&this.showPickerIcon){
if(this.isPickerIcon(_1))_2=this.getPickerIcon()}
if(!_2){
this.logInfo("FormItem unable to get pointer to icon with name:"+_1+
" - Invalid name, or icons array has been inappropriately modified. To update icon[s] for some form item, use the method 'setIcons()'.")
}
return _2}
,isc.A.$168v=function isc_FormItem__setIconState(_1,_2,_3){
if(_3==null)_3=this.hasFocus&&this.$54o(_1,true);
_3=_3&&!this.iconIsDisabled(_1);
var _4=isc.Canvas.$1861(_1.src),
_5=_4!=null,
_6=_4&&_4.svg!=null
;
var _7=this.getIconStyle(_1,_2,null,_3);
if(_1.inline&&this.$156r()&&_1.text!=null){
var _8=this.$16g(_1);
if(_8!=null&&_7!=null){
_8.className=_7}
}else{
var _9=this.$16v(_1);
if(_9!=null){
var _10=this.getIconURL(_1,_2,null,_3);
isc.Canvas.$1865(_9,_10,null,this.containerWidget,_7,
this)}
}
}
,isc.A.$165=function isc_FormItem__iconShouldShowOver(_1){
if(!_1||this.iconIsDisabled(_1))return false;
if(_1.showOver!=null)return _1.showOver;
if(this.showOver&&(this.updatePickerIconOnOver!=false)&&
this.isPickerIcon(_1))
{
return true}
return this.showOverIcons}
,isc.A.$176d=function isc_FormItem__iconShowOverWhen(_1){
if(_1.showOverWhen)return _1.showOverWhen;
return"icon"}
,isc.A.$54o=function isc_FormItem__iconShouldShowFocused(_1,_2){
if(!_1||this.iconIsDisabled(_1))return false;
if(_2&&_1.showFocusedWithItem==false)return false;
if(_1.showFocused!=null)return _1.showFocused;
return this.showFocusedIcons}
,isc.A.setIconBackgroundColor=function isc_FormItem_setIconBackgroundColor(_1,_2){
_1.backgroundColor=_2;
var _3;
if(_1.inline&&this.$156r()&&_1.text!=null){
_3=this.$16g(_1)}else{
_3=this.$16v(_1)}
if(_3!=null){
try{
_3.style.backgroundColor=_2==null?"":_2}catch(e){}
}
}
,isc.A.setIconCustomState=function isc_FormItem_setIconCustomState(_1,_2){
if(_1.customState!=_2){
_1.customState=_2;
this.$168v(_1)}
}
,isc.A.showPicker=function isc_FormItem_showPicker(_1,_2,_3,_4){
var _5=this.picker;
_3=isc.addProperties(_3||{},{
callingForm:this.form,
callingFormItem:this
});
if(isc.isA.String(_5)&&isc.isA.Canvas(window[_5])){
_5=this.picker=window[_5]}
if(!_5){
_5=this.picker=this.createPicker(_3);
if(!isc.isA.Function(_5.dataChanged)){
_5.dataChanged=isc.Class.NO_OP}
_5.observe(_5,"resized",
"observed.placeNear(observed.lastShowRect)");
if(this.pickerDataChanged&&_5.dataChanged){
this.observe(_5,"dataChanged","observer.pickerDataChanged(observed)")}
}else{
isc.addProperties(_5,_3)}
var _6=_5.getID();
if(!_4){
if(this.getPickerRect){
_4=this.getPickerRect()}else if(_2){
var _7=this.getIconPageRect(_2);
_4=[_7[0],_7[1]]
}
else _4=[isc.EH.getX(),isc.EH.getY()]}
_5.lastShowRect=_4;
_5.setRect(_4);
if(!_5.isDrawn()){
_5.moveTo(null,-9999);
_5.draw()}
this.picker.placeNear(_4);
if(isc.isA.Function(_5.setData)){
if(_5.$1275){
delete _5.$1275}else{
if(isc.isA.Function(this.getPickerData)){
_5.setData(this.getPickerData(_5))}else _5.setData(this.getValue(_5))}
}
var _8=_1?null:_6+".hide()";
if(_1&&isc.isA.Function(_5.clickMaskClicked))
_8=_6+".clickMaskClicked()";
_5.showClickMask(_8,!_1,_5);
if(_1!=null&&_5.isModal==null)_5.isModal=_1;
_5.show();
_5.bringToFront();
_5.focus();
return false}
,isc.A.createPicker=function isc_FormItem_createPicker(_1){
return this.createAutoChild("picker",_1)}
,isc.A.hidePicker=function isc_FormItem_hidePicker(){
if(!this.picker)return;
this.picker.hideClickMask();
this.picker.hide()}
,isc.A.redraw=function isc_FormItem_redraw(_1){
if(!this.isDrawn())return;
if(isc.EH.$km||isc.EH.$ku){
this.logDebug("Delaying call to formItem.redraw() during mouseDown/mouseUp sequence",
"nativeFocus");
this.delayCall("redraw",[_1],null);
return}
if(this.$105){
var _2=this.form.getFocusSubItem();
if(_2!=null&&_2!=this&&_2.parentItem!=this){
delete this.$105}
}
if(this.hasFocus){
this.$105=true}
if(!this.hasFocus&&this.items!=null){
for(var i=0;i<this.items.length;i++){
if(this.items[i].hasFocus){
this.$105=true;
break}
}
}
if(this.containerWidget.redrawFormItem){
this.containerWidget.redrawFormItem(this,_1)}else{
this.containerWidget.markForRedraw("Form item redrawn"+(_1?": "+_1:isc.emptyString))}
}
);
isc.evalBoundary;isc.B.push(isc.A.adjustOverflow=function isc_FormItem_adjustOverflow(_1){
if(!this.$43c){
this.$43c=[this.getID(),"  overflow changed: "]
}
if(_1==null)this.$43c[2]="No Reason Specified.";
else this.$43c[2]=_1;
if(isc.isA.DynamicForm(this.containerWidget)){
this.containerWidget.$t5=true;
this.containerWidget.$103();
this.containerWidget.adjustOverflow(this.$43c.join(isc.emptyString))}
}
,isc.A.show=function isc_FormItem_show(_1){
if(this.visible==true&&this.showIf==null)return;
this.visible=true;
if(!_1)this.showIf=null;
if(this.hideUsingDisplayNone&&this.isDrawn()){
this.getHandle().classList.remove("formItemHidden")}else{
if(this.containerWidget.redrawFormItem)
this.containerWidget.redrawFormItem(this,"showing form item");
else this.containerWidget.markForRedraw("showing form item")}
this.itemVisibilityChanged(true)}
,isc.A.hide=function isc_FormItem_hide(_1){
if(this.visible==false)return;
this.visible=false;
if(!_1)this.showIf=null;
if(this.hideUsingDisplayNone&&this.isDrawn()){
this.getHandle().classList.add("formItemHidden")}else{
if(this.containerWidget.redrawFormItem)
this.containerWidget.redrawFormItem(this,"hiding form item");
else this.containerWidget.markForRedraw("hiding form item")}
this.itemVisibilityChanged(false)}
,isc.A.$145l=function isc_FormItem__needHideUsingDisplayNone(){
return false}
,isc.A.$104=function isc_FormItem__updateHTMLForPageLoad(){
if(!isc.Browser.isSafari||!this.isDrawn())return;
this.$160()}
,isc.A.$160=function isc_FormItem__resetWidths(){
if(!this.isDrawn())return;
var _1=this.$1618();
if(this.$1857()){
var _2=this.$15f();
if(_2)_2.style.width=this.getElementWidth()+"px";
var _3=this.getPickerIcon(),
_4=this.$16v(_3);
if(_4){
_4.style.height=_3.height;
_4.style.width=_3.width}
}
var _5=this.getValue(),
_6=this.getTextBoxWidth(_5),
_7=(_6==null?isc.emptyString:_6+isc.px),
_8=this.getTextBoxHeight(_5),
_9=(_8==null?isc.emptyString:_8+isc.px),
_10=this.$15h();
if(_10){
if(_1)_10.style.width=_7;
else _10.style.minWidth=_7;
if(!this.$169t()||this.$169p!=="divStyledAsDataElement"){
_10.style.height=_9}
}
if(this.$15m()){
var _11=this.getFocusElement()
if(_11){
_11.style.width=_7;
_11.style.height=_9}
}
}
,isc.A.hasElement=function isc_FormItem_hasElement(){
return this.hasDataElement()}
,isc.A.hasDataElement=function isc_FormItem_hasDataElement(){
if(this.showValueIconOnly)return false;
if(this.showInputElement==false)return false;
return this.$125}
,isc.A.getElement=function isc_FormItem_getElement(_1){
return this.getDataElement(_1)}
,isc.A.getFocusElement=function isc_FormItem_getFocusElement(){
if(!this.isDrawn()||!this.$kk())return null;
if(this.hasDataElement())return this.getDataElement();
if(this.$15m()){
if(!this.$16i){
this.$16i=isc.Element.get(this.getID()+"__focusProxy")}
return this.$16i}
return this.$872()?this.$15h():null}
,isc.A.$166=function isc_FormItem__getCurrentFocusElement(){
if(this.hasFocus==null&&!isc.EH.$vm==this){
return null}
var _1=this.$167;
if(isc.Browser.isIE&&!isc.EH.synchronousFocusNotifications&&_1!=this.getActiveElement()){
this.logInfo("not returning focus element "+this.echoLeaf(_1)+
" since it's not active"+isc.EH.$lb(),
"nativeFocus");
if(this.hasFocus){
this.hasFocus=false;
this.elementBlur()}
this.$167=null;
return null}
return _1}
,isc.A.getDataElement=function isc_FormItem_getDataElement(_1){
if(_1==null){
var _2=this}else{
var _2=this.form.getItem(_1)}
if(!_2.hasDataElement())return null;
if(!this.isDrawn())return;
var _3=this.$14x;
if(_3==null){
_3=(this.$14x=isc.Element.get(this.getDataElementId()))}
return _3
}
,isc.A.getOuterElement=function isc_FormItem_getOuterElement(){
if(!this.isDrawn())return null;
var _1=this.$158;
if(this.$15s(_1)){
return this.getOuterTableElement()}
if(this.$1857()){
return this.$15f()}
var _2=this.$15h();
if(_2==null){
_2=this.getHandle()}
return _2}
,isc.A.getHandle=function isc_FormItem_getHandle(){
if(!this.isDrawn())return null;
if(this.$11e())return this.getAbsDiv();
if(this.containerWidget==this.form)return this.getFormCell();
return isc.Element.get(this.$qs(this.$13j))}
,isc.A.$199y=function isc_FormItem__getItemInfoElement(){
if(!this.isDrawn())return null;
if(this.$11e()||this.containerWidget!=this.form){
return isc.Element.get(this.$qs(this.$13j))}
return this.getFormCell()}
,isc.A.getOuterTableElement=function isc_FormItem_getOuterTableElement(){
return this.$15c(this.$133)}
,isc.A.$168=function isc_FormItem__overElement(_1){
if(!_1)_1=isc.EH.lastEvent;
var _2=_1.itemInfo;
return(_2&&_2.overElement)}
,isc.A.$169=function isc_FormItem__overTextBox(_1){
if(!_1)_1=isc.EH.lastEvent;
var _2=_1.itemInfo;
return(_2&&(_2.overTextBox||_2.overElement))}
,isc.A.$17a=function isc_FormItem__overControlTable(_1){
if(!_1)_1=isc.EH.lastEvent;
var _2=_1.itemInfo;
return(_2&&
(_2.overControlTable||this.$169(_1)||
(_2.overIcon&&this.getIcon(_2.overIcon)==this.getPickerIcon())
)
)}
,isc.A.getFormCellID=function isc_FormItem_getFormCellID(){
return this.$qs(this.$14k)}
,isc.A.getFormCell=function isc_FormItem_getFormCell(){
return isc.Element.get(this.getFormCellID())}
,isc.A.getDisplayValue=function isc_FormItem_getDisplayValue(_1){
return this.$1416(_1,true)}
,isc.A.$1416=function isc_FormItem__getDisplayValue(_1,_2){
var _3;
if(this.multiple){
var _4=false;
if(_2&&_1===_3){
_1=this.getValue();
_4=true}
if(!(_1==null||isc.isAn.Array(_1))){
if(_4){
this.logWarn(
"getDisplayValue - this is a multiple FormItem but the value obtained from getValue() was not null and was not an array.");
_1=[_1]}else{
return this.mapValueToDisplay(_1)}
}
if(_1!=null){
if(_1.length==0){
return this.emptyDisplayValue}
var _5=[];
for(var i=0,_7=_1.length;i<_7;i++){
_5[i]=this.mapValueToDisplay(_1[i],null,(_7>1))}
return _5}
}
return this.mapValueToDisplay((!_2||_1!==_3)?_1:this.getValue())}
,isc.A.mapValueToDisplay=function isc_FormItem_mapValueToDisplay(_1,_2,_3){
var _4=this.skipLineBreaks,
_5=this.getCanEscapeHTML()&&
(this.escapeHTML||this.outputAsHTML||this.asHTML);
if(isc.isA.FloatItem(this)||
isc.isA.StaticTextItem(this)&&isc.SimpleType.inheritsFrom(this.type,"float"))
{
var _6=this.mapFloatValueToDisplay(_1);
if(_6!=null)return _6}
var _7;
if(this.multiple&&isc.isAn.Array(_1)){
var _8=_1.length;
var _9=new Array(_8);
for(var i=0;i<_8;++i){
var _11=_1[i];
_7="";
var _12=this.$xq(_11);
if(_12!=null)_7+=_12;
if(this.autoTrimMultipleValues&&_11&&_11.trim)_11=_1[i]=_11.trim();
_7+=this.mapValueToDisplay(_11,true);
_9[i]=_7}
if(!_2)_7=this.$161q(_9,_1);
else _7=_9.join(this.multipleValueSeparator)}else{
if(_3&&_1!=null&&this.$144(_1)){
_7="";
var _12=this.$xq(_1);
if(_12!=null)_7+=_12;
_7+=this.$17b(_1,true)}else{
_7=this.$17b(_1,true)}
var _13=this.getDisplayFieldName();
if(_13!=null){
var _14=this.getOptionDataSource();
var _15=(_14==null?null:_14.getField(_13));
if(_15!=null&&this.getCanEscapeHTML()&&_15.escapeHTML){
_4=_15.skipLineBreaks;
_5=true}
if(_7==null){
var _16=(_14==null||this.suppressOptionDSCacheAccess
?null:_14.getCacheData());
if(_16!=null){
var _17=this.getValueFieldName();
if(_14.getField(_17)!=null){
var _18=_16.find(_17,_1);
if(_18!=null)_7=_18[_13]}
}
}
}
_7=this.$17c(_7!=null?_7:_1,_5,_4);
if(this.multiple&&_7&&_7.trim)_7=_7.trim();
var _19=(_1==null||_1==isc.emptyString);
if(!_19&&(_7==isc.emptyString)){
_7=this.getEmptyStringDisplayValue()
}
_7=this.$1604(_7,_1)}
return _7}
,isc.A.getCanEscapeHTML=function isc_FormItem_getCanEscapeHTML(){
return this.canEscapeHTML}
,isc.A.$161q=function isc_FormItem__finishMapMultipleValueToDisplay(_1,_2){
return _1.join(this.multipleValueSeparator)}
,isc.A.$1604=function isc_FormItem__finishMapValueToDisplay(_1,_2){
return _1}
,isc.A.$1605=function isc_FormItem__getDisplayValueForOldValueHover(_1,_2){
return this.mapValueToDisplay(_1,null,true)}
,isc.A.shouldApplyStaticTypeFormat=function isc_FormItem_shouldApplyStaticTypeFormat(){
if(this.applyStaticTypeFormat)return true;
if(this.formatOnBlur){
var _1=this.hasFocus;
return!_1}
return false}
,isc.A.$17c=function isc_FormItem__formatDataType(_1,_2,_3){
var _4=this.shouldApplyStaticTypeFormat();
var _5=this;
var _6=this.getOptionDataSource(),
_7=this.getDisplayFieldName();
if(_6&&_7){
var _8=_6.getField(_7);
if(_8!=null){
_5=_8}
}
var _9,_10;
if(_4){
if(this.formatValue!=null){
var _11=this.form,
_12=this.form?this.form.values:{};
_9=this.formatValue(_1,_12,_11,this)}else{
var _13=this.format||_5.format;
if(_13!=null&&(isc.isA.Number(_1)||isc.isA.Date(_1))){
_9=isc.isA.Number(_1)?isc.NumberUtil.format(_1,_13)
:isc.DateUtil.format(_1,_13)}else{
var _14=_5.$62;
if(_14&&_14.format){
if(isc.isA.Number(_1)||isc.isA.Date(_1)){
_9=isc.isA.Number(_1)
?isc.NumberUtil.format(_1,_14.format)
:isc.DateUtil.format(_1,_14.format)}
}else if(this.shouldFormatStaticValueAsImage(_5)){
_9=this.form.formatValueAsImage(_1,this,_12);
_2=false}
}
}
}else if(this.formatEditorValue!=null){
var _11=this.form,
_12=this.form?this.form.values:{};
_9=this.formatEditorValue(_1,_12,_11,this)}else{
var _14=_5.$62;
if(_14&&_14.editFormatter){
var _11=this.form,
_12=this.form?this.form.values:{};
_9=_14.editFormatter(_1,this,_11,_12)}
}
if(_9===_10){
if(isc.isA.Date(_1)){
if(this.$851(_5)){
var _15=this.$30o();
var _16=isc.SimpleType.inheritsFrom(this.getDisplayFieldType(),"time");
_9=isc.Time.toTime(_1,_15,_16)}else{
var _15=this.$45i();
var _17=this.getDisplayFieldType(),
_18=isc.SimpleType.inheritsFrom(_17,"date"),
_19=isc.SimpleType.inheritsFrom(_17,"datetime");
if(_18&&!_19){
_9=_1.toShortDate(_15,false)}else{
if(this.useShortDateFormat){
_9=_19?_1.toShortDatetime(_15,true)
:_1.toShortDate(_15,true)}else{
_9=_1.toNormalDate(_15)}
}
}
}else{
if(_5.$62&&isc.isA.Function(_5.$62.normalDisplayFormatter)&&
_4)
{
_9=_5.$62.normalDisplayFormatter(_1,_5,
this.form,this.form.values)}else if(_1!=null){
if(this.isSimpleTypeValue(_1)){
_9=isc.iscToLocaleString(_1)}
}
}
}
if(_9==null)_9=this.emptyDisplayValue;
if(_2){
var _20=(_1==null||_1==isc.emptyString),
_21=(_9==null)||
(_20&&
(_9==this.emptyDisplayValue||
_9==this.$54t));
if(!_21){
_9=String(_9).asHTML(null,_3)}
}
return _9}
,isc.A.shouldFormatStaticValueAsImage=function isc_FormItem_shouldFormatStaticValueAsImage(){
var _1=this.type,
_2=isc.SimpleType?isc.SimpleType.inheritsFrom(_1,"image"):_1=="image";
if(_2){
if(this.showImageAsURL!=null){
return!this.showImageAsURL}
return!this.form.showImageAsURL}
return false}
,isc.A.isSimpleTypeValue=function isc_FormItem_isSimpleTypeValue(_1){
return((isc.DS&&isc.DS.isSimpleTypeValue(_1))||
(_1!=null&&(!isc.isAn.Object(_1)||isc.isA.Date(_1))))}
,isc.A.getEmptyStringDisplayValue=function isc_FormItem_getEmptyStringDisplayValue(){
return this.emptyDisplayValue}
,isc.A.$851=function isc_FormItem__formatAsTime(){
var _1=null;
if(this.timeFormatter==null&&this.dateFormatter!=null)_1=false;
if(this.dateFormatter==null&&this.timeFormatter!=null)_1=true;
if(_1==null){
var _2=this.getDisplayFieldType(),
_3=isc.SimpleType.inheritsFrom(_2,"time");
_1=_3}
return _1}
,isc.A.$45i=function isc_FormItem__getDateFormatter(){
if(this.dateFormatter!=null)return this.dateFormatter;
if(this.format!=null)return this.format;
var _1=this.getDisplayFieldType(),
_2=isc.SimpleType.inheritsFrom(_1,"datetime"),
_3=_2||isc.SimpleType.inheritsFrom(_1,"date");
if(_3&&this.displayFormat!=null)return this.displayFormat;
if(_2&&this.form.datetimeFormatter!=null)return this.form.datetimeFormatter;
return this.form.dateFormatter}
,isc.A.$30o=function isc_FormItem__getTimeFormatter(){
if(this.timeFormatter!=null)return this.timeFormatter;
if(this.displayFormat!=null&&isc.SimpleType.inheritsFrom(this.type,"time")){
return this.displayFormat}
return this.form.timeFormatter}
,isc.A.mapDisplayToValue=function isc_FormItem_mapDisplayToValue(_1){
_1=this.$79d(_1);
if(this.mapEmptyDisplayValue||
(_1!=this.emptyDisplayValue))_1=this.$17d(_1);
return _1}
,isc.A.forceTimeConversion=function isc_FormItem_forceTimeConversion(){
return false}
,isc.A.$79d=function isc_FormItem__parseDisplayValue(_1,_2){
var _3=this.shouldApplyStaticTypeFormat();
if(!_3){
if(this.parseEditorValue!=null){
_1=this.parseEditorValue(_1,this.form,this)}else if(this.$62&&this.$62.parseInput){
var _4=this.form,
_5=_4?_4.values:{};
if(_2||!this.$85m()){
_1=this.$62.parseInput(_1,this,_4,_5)}
}
if(_1!=null&&isc.isA.String(_1)){
var _6=this.getType();
var _7=isc.SimpleType.inheritsFrom(_6,"date"),
_8=isc.SimpleType.inheritsFrom(_6,"time"),
_9=isc.SimpleType.inheritsFrom(_6,"datetime"),
_10=!_7&&!_8&&!_9&&(
isc.SimpleType.inheritsFrom(_6,"integer")||
isc.SimpleType.inheritsFrom(_6,"float")),
_11=(_1=="")
;
if(_9||_7||_8){
if(this.$851()){
if(_11&&this.allowEmptyValue){
_1=null}else{
var _12;
if(!_8&&isc.isA.Date(this._value)){
_12=this._value}
var _13=isc.Time.parseInput(
_1,!this.forceTimeConversion(),
false,!_8,_12);
if(isc.isA.Date(_13))_1=_13}
}else{
var _14=this.inputFormat;
if(_14==null){
_14=isc.DateUtil.mapDisplayFormatToInputFormat(
this.$45i())}
var _15=_7&&!_9;
var _16=isc.DateUtil.parseInput(_1,_14,
this.centuryThreshold,false,!_15);
if(isc.isA.Date(_16))_1=_16}
}else if(_10){
if(_11&&this.allowEmptyValue){
_1=null}
}
}
}
return _1}
,isc.A.getType=function isc_FormItem_getType(){
var _1=this.form?this.form.getFieldType(this):null;
return _1||this.defaultType}
,isc.A.getDisplayFieldType=function isc_FormItem_getDisplayFieldType(){
var _1=this.getOptionDataSource(),
_2=this.getDisplayFieldName();
if(_1&&_2){
var _3=_1.getField(_2);
if(_3!=null&&_3.type!=null){
return _3.type}
}
return this.getType()}
,isc.A.setToZeroTime=function isc_FormItem_setToZeroTime(_1){
isc.DateUtil.setToZeroTime(_1)}
,isc.A.$17b=function isc_FormItem__mapKey(_1,_2){
var _3=_2?null:_1;
var _4=this.getAllValueMappings();
if(!_4)return _3;
if(isc.isA.String(_4))_4=this.getGlobalReference(_4);
if(isc.isAn.Array(_4))return _3;
return isc.getValueForKey(_1,_4,_3)}
,isc.A.$17d=function isc_FormItem__unmapKey(_1,_2){
var _3=_2?null:_1;
var _4=this.getAllValueMappings();
if(!_4)return _2?null:_1;
if(isc.isA.String(_4))_4=this.getGlobalReference(_4);
if(isc.isAn.Array(_4))return _1;
var _5=isc.getKeyForValue(_1,_4,_3);
if(_5!=null&&_5==_1&&_5===this.emptyDisplayValue){
_5="";
var _6=this.getValueFieldName();
if(_6!=null){
var _7=this.getOptionDataSource();
var _8=(_7==null||this.suppressOptionDSCacheAccess
?null:_7.getCacheData());
if(_8!=null){
var _9=_8.find(this.getDisplayFieldName(),_1);
if(_9!=null){
_5=_9[_6]}
}
}
}
return _5}
,isc.A.setValueMap=function isc_FormItem_setValueMap(_1){
this.valueMap=_1;
this.updateValueMap()}
,isc.A.setOptionDataSource=function isc_FormItem_setOptionDataSource(_1){
if(isc.isA.String(_1))_1=isc.DataSource.get(_1);
var _2=this.getOptionDataSource();
if(_1==_2){
if(this.optionDataSource!=_1){
this.optionDataSource=_1}
return}
this.ignoreOptionDataSource();
this.optionDataSource=_1;
this.invalidateDisplayValueCache()}
,isc.A.setValueIcons=function isc_FormItem_setValueIcons(_1){
this.valueIcons=_1;
if(this.isDrawn())this.redraw()}
,isc.A.setOptions=function isc_FormItem_setOptions(_1){
return this.setValueMap(_1)}
,isc.A.updateValueMap=function isc_FormItem_updateValueMap(_1){
if(_1!=false&&!this.$1563){
this.$952(this.getDisplayValue(),this.getValue())}
if(this.hasElement())this.setElementValueMap(this.getValueMap())}
,isc.A.setElementValueMap=function isc_FormItem_setElementValueMap(_1){
}
,isc.A.getAllValueMappings=function isc_FormItem_getAllValueMappings(){
var _1=this.getValueMap();
var _2=!isc.isAn.Array(this.specialValues)?this.specialValues:null;
if(_2!=null){
if(_1==null)_1=_2;
else{
if(isc.isAn.Array(_1)){
var _3=_1;
_1={};
for(var i=0;i<_3.length;i++){
_1[_3[i]]=_3[i]}
}
_1=isc.addProperties({},_1);
var _5;
for(var _6 in _2){
if(_1[_6]===_5)_1[_6]=_2[_6]}
}
}
return _1}
,isc.A.getValueMap=function isc_FormItem_getValueMap(){
var _1=this.valueMap;
if(isc.isA.String(_1)){
_1=this.getGlobalReference(_1)}
var _2=this.$43d;
if(_2!=null){
if(_1==null)_1=_2;
else{
if(isc.isAn.Array(_1)){
var _3=_1;
_1={};
for(var i=0;i<_3.length;i++){
_1[_3[i]]=_3[i]}
}
_1=isc.addProperties({},_1);
var _5;
for(var _6 in _2){
if(_1[_6]===_5)_1[_6]=_2[_6]}
}
}
return _1}
,isc.A.getValueFieldName=function isc_FormItem_getValueFieldName(){
if(this.valueField)return this.valueField;
if(this.form&&this.form.dataSource&&this.foreignKey){
return isc.DS.getForeignFieldName(this,this.form.dataSource)}
var _1=this.getFieldName();
return _1||"name"}
,isc.A.getDisplayFieldName=function isc_FormItem_getDisplayFieldName(){
var _1=this.getOptionDataSource(),
_2=this.form.getDataSource();
if(_1){
if(this.$272d()){
return this.foreignDisplayField}else if(_2==null&&this.displayField){
return this.displayField}
}else if(this.displayField){
return this.displayField}
if(this.displayField){
var _3=_2.getField(this.getFieldName()),
_4=_3?_3.displayField:null;
if(this.displayField!=_4||
_1.getField(this.displayField)!=null)
{
return this.displayField}else{
this.logInfo(
"Ignoring specified displayField:"+this.displayField+
" - this doesn't  match any fields present in our optionDataSource:"+
_1)}
}
var _5=this.getValueFieldName();
if(_1&&
_1!=isc.DataSource.getDataSource(this.form.dataSource)&&
(this.displayField!=null||
(_1.getField(_5)&&
_1.getField(_5).hidden==true)))
{
return _1.getTitleField()}
}
,isc.A.$272d=function isc_FormItem__useForeignDisplayField(){
return this.foreignDisplayField!=null}
,isc.A.$426=function isc_FormItem__displayFieldValueFromFormValues(){
if(this.displayField!=null){
var _1=this.form&&this.form.valuesManager||this.form;
var _2=_1.getValues();
var _3,
_4=this.getFieldName();
if(_2[_4]!==_3){
var _5=this.getValueFieldName(),
_6=this.displayField,
_7=this.getDisplayFieldName(),
_8;
if(_5!=_4||
(_6!=null&&_7!=_6))
{
_8={};
_8[_5]=_2[_4];
_8[_7]=_2[_6]}else{
_8=isc.addProperties({},_2)}
if(_8){
this.$848([_8]);
this.updateDisplayValueMap(true)}
}
}
}
,isc.A.getOptions=function isc_FormItem_getOptions(){
return this.getValueMap()
}
,isc.A.getOptionDataSource=function isc_FormItem_getOptionDataSource(){
var _1=this.optionDataSource;
if(_1==null){
var _2=this.form?this.form.getDefaultOptionDataSource(this):null;
if(this.foreignKey)_1=isc.DS.getForeignDSName(this,_2);
if(_1==null&&_2)_1=_2}
if(isc.isA.String(_1))_1=isc.DataSource.getDataSource(_1);
return _1}
,isc.A.getPickListFields=function isc_FormItem_getPickListFields(){
if(this.pickListFields){
var _1=this.emptyDisplayValue;
if(_1!=null){
var _2=this.pickListFields,
_3=this.getValueFieldName(),
_4=this.getDisplayFieldName(),
_5,_6;
if((_5=_2.find("name",_4))!=null&&
_5.emptyCellValue===_6)_5.emptyCellValue=_1;
else if((_5=_2.find("name",_3))!=null&&
_5.emptyCellValue===_6)_5.emptyCellValue=_1}
return this.pickListFields}
var _4=this.getDisplayFieldName(),
_7;
if(_4!=null){
_7={width:"*",name:_4}
}else{
_7={width:"*",name:this.getValueFieldName(),
valueMap:this.getAllValueMappings()
}
}
if(this.canEscapeHTML&&
(this.escapeHTML||this.outputAsHTML||this.asHTML))
{
_7.skipLineBreaks=this.skipLineBreaks;
_7.escapeHTML=true}
if(this.emptyDisplayValue!=null){
_7.emptyCellValue=(this.canEscapeHTML?this.emptyDisplayValue:String(this.emptyDisplayValue).asHTML())}
if(this.dateFormatter!=null){
_7.type="date"
}
if(this.imageURLPrefix)_7.imageURLPrefix=this.imageURLPrefix;
if(this.imageURLSuffix)_7.imageURLSuffix=this.imageURLSuffix;
_7.$720=true;
return[_7]
}
,isc.A.getValueMapTitle=function isc_FormItem_getValueMapTitle(_1){
var _2=this.getAllValueMappings();
if(isc.isAn.Array(_2))return(_2.contains(_1)?_1:"");
return _2[_1]}
,isc.A.setOptionCriteria=function isc_FormItem_setOptionCriteria(_1){
this.optionCriteria=_1;
this.$172t=null}
,isc.A.getOptionCriteriaCopy=function isc_FormItem_getOptionCriteriaCopy(){
if(this.optionCriteria==null)return null;
if(this.$172t){
return this.$172t}
var _1=isc.addProperties({},this.optionCriteria);
if(!isc.DS.isAdvancedCriteria(_1)){
if(_1.operator&&_1.criteria){
_1._constructor="AdvancedCriteria";
this.$172t=_1}else if(_1.fieldName&&_1.operator){
_1={
_constructor:"AdvancedCriteria",
operator:"and",
criteria:isc.isAn.Array(_1)?_1:[_1]
};
this.$172t=_1}else{
this.$172t=this.optionCriteria}
}
return _1}
,isc.A.saveValue=function isc_FormItem_saveValue(_1,_2){
this.$172m=this.$172l;
var _3;
this._value=_1;
this.$14u=_2;
if(this.isDrawn()){
if(this.$11d())this.$17e(_1)}
var _4=this.form;
if(_4==null)return;
if(_1==_3&&this.$17f){
_4.clearItemValue(this)}else{
_4.saveItemValue(this,_1)}
if(this.$161p())this.updatePendingStatus(_1)}
,isc.A.$161p=function isc_FormItem__getShowPending(){
var _1=this.parentItem;
if(_1!=null)return _1.$161p();
var _2=this.form;
if(this.showPending==null&&_2!=null)return!!_2.showPending;
else return!!this.showPending}
,isc.A.$161r=function isc_FormItem__getShowDeletions(){
var _1=this.parentItem;
if(_1!=null)return _1.$161r();
var _2,
_3;
if((_2=this.showDeletions)!=null){
return!!_2}else if((_3=this.form)!=null&&
(_2=_3.showDeletions)!=null)
{
return!!_2}else{
return this.$161p()}
}
,isc.A.setFixedPendingStatus=function isc_FormItem_setFixedPendingStatus(_1){
this.fixedPendingStatus=_1;
if(this.$161p()){
this.$1606=true;
this.updatePendingStatus(this._value);
this.$1606=false}
}
,isc.A.updatePendingStatus=function isc_FormItem_updatePendingStatus(_1){
var _2=this.form;
var _3=!!this.pendingStatus,
_4=this.$160w()
;
var _5=isc.SimpleType.getType(this.type);
if(_5&&_5.getAtomicValue&&_5.updateAtomicValue){
_4=_5.getAtomicValue(_4,"edit")}
var _6=this.compareValues(_4,_1),
_7=(this.fixedPendingStatus!=null
?!!this.fixedPendingStatus.valueOf()
:!_6)
;
var _8=this.form&&this.form.valuesManager;
if(_8&&(_8.$180b||_8.$181w)){
_7=false}
this.pendingStatus=_7;
if(_3!=_7){
if(!_7)isc.Hover.clear();
this.$1607(_7)}
}
,isc.A.$1607=function isc_FormItem__pendingStatusChanged(_1){
var _2=(this.pendingStatusChanged!=null&&
this.pendingStatusChanged(this.form,this,_1,
this._value,this.$160w())==false);
this.$1602=_2;
if(!_2){
this.$1608(_1)}
}
,isc.A.$1608=function isc_FormItem__defaultPendingStatusChangedBehavior(_1){
this.updateState()}
,isc.A.$17e=function isc_FormItem__setHiddenDataElementValue(_1){
var _2=this.$15b();
if(_2)_2.value=_1}
,isc.A.setValue=function isc_FormItem_setValue(_1,_2,_3,_4){
this.$2081=true;
this.$17g=true;
var _5=!_4&&
(this.maintainSelectionOnTransform&&this.hasFocus&&
(this.$17h()!=this.$14l));
if(_5&&!isc.EH.synchronousFocusNotifications&&isc.Browser.isIE){
if(!this.$820()){
_5=false}
}
if(_5)this.rememberSelection(_3);
if(this.$17i!=null){
isc.Timer.clearTimeout(this.$17i);
this.$17i=null}
var _6;
if(_1==null&&!_2){
var _7=this.getDefaultValue();
if(_7!=null){
_6=true;
_1=_7}
}
if(this.multiple&&_1!=null&&!isc.isAn.Array(_1)){
var _8=isc.DS.$57z[this.getOperator()];
if(_8&&_8.valueType=="valueSet"&&_8.processValue){
_1=_8.processValue(_1)}else{
_1=[_1]}
}
if(this.enforceLength&&this.length!=null&&_1!=null){
var _9=isc.isA.Number(_1);
if(_9){
if(this.$184w){
_1=this.$184w(_1)}else{
_1=""+_1}
}
if(isc.isA.String(_1)&&_1.length>this.length){
_1=_1.substring(0,this.length)}
if(_9)_1=this.mapDisplayToValue(_1,true)}
this.saveValue(_1,_6);
this.$124t(_1,_5);
this.$2081=false;
return _1
}
,isc.A.$124t=function isc_FormItem__showValue(_1,_2){
if(this.destroyed)return;
if(_1!=null){
if(this.multiple){
var _3=[];
for(var i=0,_5=_1.length;i<_5;++i){
var _6=_1[i];
if(_6!=null&&this.shouldFetchMissingValue(_6)){
_3.push(_6)}
}
this.$78w();
this.$43f(_3)}else if(this.shouldFetchMissingValue(_1)){
this.$78w();
this.$43f(_1)}else{
if(this.$78y==null||
!this.compareValues(this.$78y,this._value))
{
this.$846()}
}
}else{
if(this.$78y==null||
!this.compareValues(this.$78y,this._value))
{
this.$846()}
}
var _7=this.$1416(_1);
this.$952(_7,_1);
if(_2){
this.resetToLastSelection(true)}
}
,isc.A.shouldFetchMissingValue=function isc_FormItem_shouldFetchMissingValue(_1){
var _2=this.$128s(_1,this.getValueFieldName());
if(_2!=null){
return _2}
if(!(this.isReadOnly())&&this.$1709)return false;
if(this.getDisplayFieldName()==null)return false;
var _3=(this.$17b(_1,true)!=null);
return!_3}
,isc.A.shouldFetchMissingDisplayValue=function isc_FormItem_shouldFetchMissingDisplayValue(_1){
var _2=this.getDisplayFieldName();
if(_2==null)return false;
var _3=this.$128s(_1,_2);
if(_3!=null)return _3;
var _4=(this.$17d(_1,true)!=null);
return!_4}
,isc.A.$128s=function isc_FormItem__shouldFetchMissingValue(_1,_2){
if(this.fetchMissingValues==false)return false;
if(this.getOptionDataSource()==null)return false;
var _3=this.getValueFieldName(),
_4=(_3==_2);
if(this.$145o&&_4
&&this.$145o[_1]!=null)
{
return false}
if(!_4){
var _5=this.getDisplayFieldName();
if(this.$145p&&_2==_5
&&this.$145p[_1]!=null)
{
return false}
}
var _6=false;
if(this.$847!=null&&
(this.$43e||
this.$847.find(_2,_1)!=null))
{
_6=true}
if(_6)return false;
if(this.alwaysFetchMissingValues)return true;
return null}
);
isc.evalBoundary;isc.B.push(isc.A.setDefaultValue=function isc_FormItem_setDefaultValue(_1){
var _2=this.defaultValue,_3;
this.defaultValue=_1;
if(this.isSetToDefaultValue()||(this._value==null&&_2===_3))
this.clearValue()}
,isc.A.$43f=function isc_FormItem__checkForDisplayFieldValue(_1){
return this.$128u(
_1,this.getValueFieldName(),false)}
,isc.A.$128v=function isc_FormItem__checkForValueFieldValue(_1){
return this.$128u(
_1,this.getDisplayFieldName(),true)}
,isc.A.$128u=function isc_FormItem__checkForTargetFieldValue(_1,_2,_3){
var _4=_3;
var _5;
if(_3){
if(!this.$128w)this.$128w={};
_5=this.$128w}else{
if(!this.$128t)this.$128t={};
_5=this.$128t}
var _6=false;
if(isc.isAn.Array(_1)){
for(var i=0,_8=_1.length;i<_8;++i){
var _9=_1[i];
if(!_5[_9]){
_6=true;
_5[_9]=++this.$172l}
}
}else if(!_5[_1]){
_6=true;
_5[_1]=++this.$172l}
if(_6){
if(!_4)this.$127k();
var _10=this.$281z(_2,_3);
var _11=this.getOptionCriteriaCopy();
if(_11&&_11._constructor!="AdvancedCriteria"&&
this.optionTextMatchStyle!="exact")
{
_11=isc.DataSource.convertCriteria(_11,this.optionTextMatchStyle,_10)}
if(!_11&&this.getPickListFilterCriteria&&this.optionOperationId){
_11=this.getPickListFilterCriteria();
if(_11&&_11._constructor!="AdvancedCriteria"&&
this.textMatchStyle!="exact")
{
_11=isc.DataSource.convertCriteria(_11,this.textMatchStyle,_10)}
}
if(!this.filterLocally){
var _12={};
if(isc.isAn.Array(_1)&&_1.length==1){
_12[_2]=_1[0]}else{
_12[_2]=_1}
_11=(_10||isc.DS).combineCriteria(
_11,_12,"and","exact"
)}
var _13=isc.addProperties(
{},
this.optionFilterContext,
{showPrompt:false,
internalClientContext:{newValue:_1,
filterLocally:this.filterLocally,
targetField:_2,
fetchingMissingValues:_5},
componentId:this.containerWidget.getID(),
componentContext:this.getFieldName(),
textMatchStyle:"exact"}
);
var _14;
if(this.optionOperationId!==_14){
_13.operationId=this.optionOperationId}
_10.fetchData(
_11,
{
target:this,
methodName:"fetchMissingValueReply"
},
_13
)}
return!_6}
,isc.A.$281z=function isc_FormItem__getTargetFieldValueDataSource(_1,_2){
return this.getOptionDataSource()}
,isc.A.fetchMissingValueReply=function isc_FormItem_fetchMissingValueReply(_1,_2,_3){
var _4=_1.internalClientContext,
_5=_4.newValue,
_6=_4.targetField,
_7=_4.fetchingMissingValues,
_8=_4.filterLocally,
_9=(this.$128t===_7),
_10;
if(!_9){
var _11=_1.internalClientContext.newValue;
_10=false;
if(this.$128w&&
this.$128w[_11])
{
_10=true;
var _12=this.$128w[_11]
if(_12<=this.$172m){
_10=false}else{
for(var _13 in this.$128w){
if(this.$128w[_13]>_12){
_10=false;
break}
}
}
}else{
}
}
if(!isc.isAn.Array(_5))_5=[_5];
var _14;
if(!_8){
_14=[]}
var _15=0,
_16=[];
for(var i=0,_18=_5.length;i<_18;++i){
if(!_7||!_5||!_5[i]){
this.logWarn("fetchMissingValueReply returned unexpected data: "+this.echo(_4))}
delete _7[_5[i]];
var _19=_2?_2.find(_6,_5[i]):null;
if(!_19){
if(_9){
this.logInfo("Unable to retrieve display value for data value:"+_5[i]+
" from dataSource "+this.getOptionDataSource())}
_16.add(_5[i]);
++_15}else if(!_8){
_14.push(_19)}
}
var _20=_2?_2.getLength():0,
_21=_5.getLength();
if(!_8&&(_20>(_21-_15))){
if(_9){
this.logWarn("FetchMissingValues - filterLocally is false yet optionDataSource fetch included records that do not match our current data value. Ignoring these values.","fetchMissingValues")}
this.logDebug("Data returned:"+this.echoAll(_2),"fetchMissingValues");
_2=_14}
if(_9){
this.$128x(
_1,_2,_3,_15,_16)}else if(this.$128w===_7){
this.$128y(
_1,_2,_3,_15,_16,_10)}
}
,isc.A.$128x=function isc_FormItem__fetchMissingDisplayFieldValueReply(_1,_2,_3,_4,_5,_6){
if(_5!=null&&_5.length>0){
this.$145q(_5,_6)}
var _7=this.$848(_2);
var _8=_7&&
this.$849();
if(_1.internalClientContext.filterLocally)this.$43e=true;
this.updateDisplayValueMap(_8,_5);
if(this.$1441){
if(!_6){
this.$127l(_4)}else{
if(!this.$127i(true)){
this.logWarn(
"Possible confusion: Callback fired from 'fetchMissingValueFieldValue()' [attempt to map user-entered display value to a data value]. The loadingDisplayValue is currently showing. This should only be shown when the fetching a display value from a data value. This can occur with overlapping fetches but we do not appear to have an outstanding fetch for display field values.",
"loadingDisplayValue")}
}
}
if(_7)this.form.itemDisplayValueModified(this,this._value);
if(this.$179r){
delete this.$179r;
this.selectValue()}
}
,isc.A.$145q=function isc_FormItem__cacheNoMatchDisplayValues(_1,_2){
if(this.$145p==null){
this.$145p={}}
if(this.$145o==null){
this.$145o={}}
var _3=_2?
this.$145p:this.$145o;
if(_1!=null&&_1.length>0){
for(var i=0;i<_1.length;i++){
_3[_1[i]]=true}
}
}
,isc.A.$127m=function isc_FormItem__clearPendingMissingValue(_1){
if(this.$128w)delete this.$128w[_1]}
,isc.A.$127i=function isc_FormItem__fetchMissingValueInProgress(_1,_2){
var _3=_1
?this.$128t:this.$128w;
if(_2!=null){
return _3!=null&&(_3[_2]>0)}
return(_3!=null&&!isc.isAn.emptyObject(_3))}
,isc.A.$127k=function isc_FormItem__setLoadingDisplayValue(){
this.logDebug("showing loadingDisplayValue. Value specified as: "
+this.loadingDisplayValue,"loadingDisplayValue");
if(this.loadingDisplayValue!=null){
if(!this.isReadOnly()){
this.$148w=this.canEdit;
this.setCanEdit(false);
this.$127n=true}
if(this.$1441){
this.logInfo(
"$127k called, but the value is already showing. This may be valid if we have a second fetch kicked off before the first completes (due to 2 calls to 'setValue()', say)",
"loadingDisplayValue")}
this.$1441=true;
this.$66s();
this.setElementValue(this.loadingDisplayValue)}
}
,isc.A.$127l=function isc_FormItem__clearLoadingDisplayValue(_1){
this.logDebug("clearLoadingDisplayValue called","loadingDisplayValue");
var _2=this.$1441
if(!_2){
this.logInfo("$1442 value called without a prior call to show the loading display value","loadingDisplayValue")}
var _3=this.getValue();
var _4;
if(this.multiple&&isc.isAn.Array(_3)){
for(var i=0;i<_3.length;i++){
_4=_4||
this.$127i(true,_3[i])}
}else{
_4=this.$127i(true,_3)}
if(!_4){
this.logDebug("clearLoadingDisplayValue() - no outstanding fetch for display value, so clearing loading marker",
"loadingDisplayValue");
this.$1441=false;
if(this.$127n){
delete this.$127n;
this.setCanEdit(this.$148w)}
if(_2){
var _6=this.getDisplayValue();
this.$952(_6,this._value);
this.$176b()}
}else{
this.logInfo("clearLoadingDisplayValue(): Still has outstanding fetch for display value- leaving loading marker visible","loadingDisplayValue")}
}
,isc.A.$128y=function isc_FormItem__fetchMissingValueFieldValueReply(_1,_2,_3,_4,_5,_6){
this.$128x(_1,_2,_3,_4,_5,true);
if(_6){
var _7=_1.internalClientContext.newValue;
this.$10y(_7);
this.$846()}
}
,isc.A.$953=function isc_FormItem__addRecordToDisplayFieldCache(_1){
this.logInfo("Adding Record to displayFieldCache:"+this.echo(_1),"displayFieldCache");
var _2=_1==null?null:[_1];
return this.$848(_2)}
,isc.A.$848=function isc_FormItem__addDataToDisplayFieldCache(_1){
this.logInfo("Adding Data to displayFieldCache"+
(this.logIsDebugEnabled("displayFieldCache")?this.echoAll(_1):""),
"displayFieldCache");
return this.$954(_1,true,true,false,true)}
,isc.A.$955=function isc_FormItem__removeValueFromDisplayFieldCache(_1){
var _2=this.$847;
if(_2){
var _3=this.getValueFieldName(),
_4=_2.find(_3,_1);
if(_4!=null){
this.logInfo("Removing record from displayFieldCache"+this.echo(_4),
"displayFieldCache");
return this.$954([_4],false,false,true,true)}
}
return false}
,isc.A.$954=function isc_FormItem__modifyDataInDisplayFieldCache(_1,_2,_3,_4,_5){
var _6=false;
if(_1==null)return _6;
if(this.$847==null){
this.$847=[]}
var _7=this.$847,
_8=this.getValueFieldName(),
_9=this.getDisplayFieldName(),
_10=(_9!=_8),
_11=_2&&!(_3||_4);
if(_5){
var _12=this.getValue();
if(!isc.isAn.Array(_12))_12=[_12]}
var _13=_7.getValueIndexMap(_8);
for(var i=0;i<_1.length;i++){
var _15=_1[i],
_16=_15[_8],
_17=_15[_9],
j=_13[_16],
_19=false
;
if(this.$145o&&
this.$145o[_16])
{
delete this.$145o[_16]}
if(_10&&this.$145p&&
this.$145p[_17])
{
delete this.$145p[_17]}
if(j==null){
if(_2){
_7.push(_15);
_19=true}
}else if(_3||_4){
var _20=_7[j],
_21=(_15[_9]!=_20[_9]);
if(_3&&_21){
_7[j]=_15;
_19=true}else if(_4){
_7.splice(j,1);
_19=true}
}
if(_5&&_19&&!_6){
_6=(_12.indexOf(_16)!=-1)}
}
var _22=this.getOptionDataSource();
if(_22&&!this.isObserving(_22,"dataChanged")){
this.observe(_22,
"dataChanged","observer.dataSourceDataChanged(observed,dsRequest,dsResponse)")}
if(_5)return _6}
,isc.A.$849=function isc_FormItem__refreshForDisplayValueChange(){
return true}
,isc.A.updateDisplayValueMap=function isc_FormItem_updateDisplayValueMap(_1){
this.$846();
var _2=this.$847,
_3=this.getDisplayFieldName(),
_4=this.getValueFieldName();
var _5=this.$43d={};
if(_2!=null){
var _6;
for(var i=0;i<_2.length;i++){
var _8=_2[i];
var _9=_8[_4],_10=_8[_3];
if(_9==null||_5[_9]!==_6){
if(_5[_9]!=_10){
this.logWarn("Deriving valueMap for '"+_4+
"' from dataSource based on displayField '"+_3+
"'. This dataSource contains more than one record with "+_4
+" set to "+_9+" with differing "+_3+" values. Derived valueMap is therefore unpredictable.",
"fetchMissingValues")}
continue}
_5[_8[_4]]=_3!=null?_10:_9}
}
this.updateValueMap(_1)}
,isc.A.invalidateDisplayValueCache=function isc_FormItem_invalidateDisplayValueCache(_1){
this.$43d=null;
this.$847=null;
this.$145p=null;
this.$145o=null;
this.$78w();
this.$43e=false;
this.ignoreOptionDataSource();
if(_1)return;
if(this.form.$425(this)){
this.$426()}else if(this._value!=null&&this.shouldFetchMissingValue(this._value)){
this.$78w();
this.$43f(this._value)}
this.updateValueMap()}
,isc.A.ignoreOptionDataSource=function isc_FormItem_ignoreOptionDataSource(){
var _1=this.getOptionDataSource();
if(_1!=null&&this.isObserving(_1,"dataChanged")){
this.ignore(_1,"dataChanged")}
}
,isc.A.dataSourceDataChanged=function isc_FormItem_dataSourceDataChanged(_1,_2,_3){
var _4=this.logIsDebugEnabled("fetchMissingValues");
if(_4){
this.logDebug("dataSourceDataChanged is firing for request:"+this.echo(_2),
"fetchMissingValues")}
var _5=this.$847;
if(_5==null)return;
if(_3.invalidateCache){
if(_4){
this.logDebug("Request had invalidateCache set, dropping cached display values",
"fetchMissingValues")}
this.invalidateDisplayValueCache()}else{
var _6=this.getDisplayFieldName(),
_7=this.getValueFieldName();
var _8=_1.getUpdatedData(_2,_3,true),
_9=_2.operationType=="add",
_10=_2.operationType=="update",
_11=_2.operationType=="remove";
if(_4){
this.logDebug("Operation type:"+_2.operationType+", updateData:"+
this.echoAll(_8),"fetchMissingValues")}
if(_8==null||(!_9&&!_11&&!_10))return;
if(!isc.isAn.Array(_8)){
_8=[_8]}
var _12=false;
var _13=(_7!=_6);
if(_9){
_5.addList(_8)}
var _14=_1.getPrimaryKeyFields();
var _15=this._value;
if(this.multiple&&!(_15==null||isc.isAn.Array(_15))){
this.logWarn(
"dataSourceDataChanged - this is a multiple FormItem but this._value is not null and is not an array.");
_15=[_15]}
for(var i=0;i<_8.length;i++){
var _17=_8[i];
if(!_11){
if(this.$145o&&
this.$145o[_17[_7]])
{
delete this.$145o[_17[_7]]}
if(_13&&this.$145p&&
this.$145p[_17[_6]])
{
delete this.$145p[_17[_6]]}
}else{
if(this.$145o==null){
this.$145o={}}
this.$145o[_17[_7]]=true;
if(_13){
if(this.$145p==null){
this.$145p={}}
this.$145p[_17[_6]]=true}
}
var _18;
if(_9){
_18=_17[_7]}else{
var _19=isc.applyMask(_17,_14);
var _20=_1.findByKeys(_19,_5);
if(_20==-1){
if(_11)continue;
_5.add(_17)}else{
if(_11){
_18=_5[_20][_7];
_5.removeAt(_20)}else{
_5[_20]=_17;
_18=_5[_20][_7]}
}
}
if(_18!=null){
if(this.multiple){
if(_15!=null){
var _21=_15.getLength();
for(var k=0;!_12&&k<_21;++k){
_12=_18==_15[k]}
}
}else if(_18==_15){
_12=true}
}
}
this.updateDisplayValueMap(_12&&this.$849());
if(_12)this.form.itemDisplayValueModified(this,this._value)}
}
,isc.A.getSelectedRecord=function isc_FormItem_getSelectedRecord(){
if(this.$78y!=null){
if(!this.compareValues(this.$78y,this._value)){
this.logInfo("getSelectedRecord - cached record doesn't match new value - dropping",
"fetchMissingValues");
this.$78w()}
}
return this.$751}
,isc.A.$846=function isc_FormItem__updateSelectedRecord(){
var _1=this.$751;
var _2=false;
if(this._value==null||this.$847==null){
this.$78w()}else{
var _3=this.getValueFieldName();
this.$78y=this._value;
if(this.multiple){
var _4=this._value;
if(!(_4==null||isc.isAn.Array(_4))){
this.logWarn(
"$846 - this is a multiple FormItem but this._value is not null and is not an array");
_4=[_4]}
if(_4==null){
this.$751=null}else{
this.$751=[];
for(var i=0,_6=_4.length;i<_6;++i){
this.$751.push(
this.$847.find(_3,_4[i]))}
}
}else{
this.$751=this.$847.find(_3,this._value)}
}
if(_1!=this.$751){
this.selectedRecordChanged(this.$751)}
}
,isc.A.$78w=function isc_FormItem__clearSelectedRecord(){
delete this.$751;
delete this.$78y}
,isc.A.selectedRecordChanged=function isc_FormItem_selectedRecordChanged(_1){
}
,isc.A.clearValue=function isc_FormItem_clearValue(){
this.$17f=true;
this.setValue();
delete this.$17f}
,isc.A.$952=function isc_FormItem__setElementValue(_1,_2){
if(this.multiple&&_1!=null&&isc.isAn.Array(_1)){
_1=this.$161q(_1,_2)}
return this.setElementValue(_1,_2)}
,isc.A.setElementValue=function isc_FormItem_setElementValue(_1,_2){
if(!this.isDrawn())return;
var _3;
if(_2===_3){
_2=this._value}
_1=this.$170f(_1,_2);
if(this.hasDataElement()){
var _4=this.getDataElement();
if(_4!=null){
this.$17j(_2);
if(_4.value!==_1){
var _5,_6,
_7=false,
_8=false;
if(isc.Browser.isIE){
_8=isc.isA.TextItem(this);
if(isc.Browser.version>=10){
_7=true;
_5=_4.scrollLeft;
_6=_4.scrollTop}
}
_4.value=(_8&&_1==null)?isc.emptyString
:_1;
if(_7){
_4.scrollLeft=_5;
_4.scrollTop=_6}
}
if(_1==null||isc.isAn.emptyString(_1)){
this.$1563=false}
return _1}
}else if(this.$11d()){
this.$17e(_2)}
var _9=this.$15h();
if(_9!=null){
if(this.showValueIconOnly)_1=isc.emptyString;
var _10;
if(this.multiple&&isc.isAn.Array(_2)){
if(_2.length==1){
_10=this.$xq(_2[0])}
}else{
_10=this.$xq(_2)}
if(_10!=null){
_1=_10+(_1!=null?_1:isc.emptyString)}
if(isc.Browser.isIE){
if(_1&&_1.startsWith("<nobr>"))
_1=_1.substring(6);
if(_1&&_1.endsWith("</nobr>"))
_1=_1.substring(0,_1.length-7);
try{
_9.innerHTML=_1}catch(e){
var _11=document.createElement("span");
_11.innerHTML=_1;
_9.innerHTML="";
_9.appendChild(_11)}
}else{
_9.innerHTML=_1}
if(!this.$1618()||this.height==null||this.width==null){
this.adjustOverflow("textBox value changed")}
}
}
,isc.A.$170f=function isc_FormItem__convertDisplayToLoadingValue(_1,_2){
if(!this.$127i(true)){
return _1}
var _3;
if(_2===_3){
_2=this.mapDisplayToValue(_1)}
if(this.loadingDisplayValue!=null){
var _4=false;
if(this.multiple&&isc.isAn.Array(_2)){
for(var i=0;i<_2.length;i++){
if(this.$127i(true,_2[i])){
_4=true;
break}
}
}else{
if(this.$127i(true,_2)){
_4=true}
}
if(_4){
if(!this.$1441||_1!=this.loadingDisplayValue){
this.logInfo("setElementValue() called while attempting to fetch missing display-value / record from DataSource. "+
(_1!=this.loadingDisplayValue?
" Specified element value is :"+_1+
" (doesn't match this.loadingDisplayValue).":"")+
(!this.$1441?
"  setLoadingDisplayValue() hasn't yet been called.":"")+
" Will set value to loadingDisplayValue and mark showingLoadingDisplayValue as true",
"loadingDisplayValue")}
this.$1441=true;
_1=this.loadingDisplayValue}
}
return _1}
,isc.A.$17j=function isc_FormItem__updateValueIcon(_1){
if(this.suppressValueIcon||!this.isDrawn())return;
var _2=this.$144(_1),
_3=this.$15v();
if(_2!=null){
if(_3!=null){
var _4=isc.Canvas.$1861(_2);
if(this.imageURLSuffix!=null&&_2!=isc.Canvas.$5w){
if(_4){
if(_4.src&&_4.src!=isc.Canvas.$5w){
_4.src+=this.imageURLSuffix}
}else{
_2+=this.imageURLSuffix}
}
var _5=this.imageURLPrefix||this.baseURL||this.imgDir;
isc.Canvas.$1865(_3,_2,_5,this.containerWidget,
this.$157d(_1),this)}else{
var _6=false;
if(this.hasDataElement()){
var _7=this.getDataElement();
if(_7!=null){
isc.Element.insertAdjacentHTML(
_7,"beforeBegin",this.$xq(_1)
);
var _8=this.getTextBoxWidth(_1);
_7.style.width=(isc.isA.Number(_8)?_8+isc.px:_8);
_6=true}
}else{
var _9=this.$15h();
if(_9!=null){
isc.Element.insertAdjacentHTML(
_9,"afterBegin",this.$xq(_1)
);
_6=true}
}
if(!_6)this.redraw()}
}else if(_3!=null&&!(isc.isAn.Array(_1)&&_1.length>0)){
isc.Element.clear(_3);
if(this.hasDataElement()){
var _7=this.getDataElement(),
_8=this.getTextBoxWidth(_1);
_7.style.width=(isc.isA.Number(_8)?_8+isc.px:_8)}
}
}
,isc.A.setPrompt=function isc_FormItem_setPrompt(_1){
this.prompt=_1}
,isc.A.setHint=function isc_FormItem_setHint(_1){
if(this.hint==_1)return;
this.hint=_1;
if(this.showHint){
var _2;
if(this.$712()&&this.$1564()&&
(_2=this.getDataElement())!=null)
{
_2.placeholder=String.htmlStringToString(_1)}else{
this.redraw()}
}
}
,isc.A.setHintStyle=function isc_FormItem_setHintStyle(_1){
if(!this.$712()&&this.getHint()){
var _2=this.$59t();
if(_2)_2.className=_1}
}
,isc.A.$66t=function isc_FormItem__showInFieldHint(){
if(!this.$1563&&!this.hasFocus){
var _1=String.htmlStringToString(this.getHint());
var _2=this.getDataElement();
if(_2!=null){
_2.className=this.$66v();
if(isc.isA.PasswordItem&&isc.isA.PasswordItem(this)){
if(!isc.Browser.isIE||isc.Browser.isIE9){
try{
var _3=_2.type;
_2.type="text";
this.$857=_3}catch(e){}
}
if(_2.type!=="text")_1=""}
}else{
var _4=this.$169s();
if(_4!=null){
_4.className=this.$66v()}
}
this.setElementValue(_1);
this.$1563=true}
}
,isc.A.$66s=function isc_FormItem__hideInFieldHint(_1){
if(this.$1563){
var _2=this.getDataElement();
if(_2!=null){
_2.className=this.getTextBoxStyle();
if(this.$857!=null){
try{
_2.type=this.$857}catch(e){}
this.$857=null}
}else{
var _3=this.$169s();
if(_3!=null){
_3.className=this.getTextBoxStyle()}
}
if(!_1)this.setElementValue(isc.emptyString);
this.$1563=false}
}
,isc.A.$66v=function isc_FormItem__getInFieldHintStyle(){
var _1=this.showRTL&&this.isRTL();
var _2=this.textBoxStyle;
if(this.showErrorHintStyle&&this.hasErrors()){
}
if((this.showDisabled&&this.renderAsDisabled())||
(this.isReadOnly()&&this.useDisabledHintStyleForReadOnly))
{
return _2+(_1?"DisabledHintRTL":"DisabledHint")}else{
return _2+(_1?"HintRTL":"Hint")}
}
,isc.A.$2257=function isc_FormItem___mayShowHintInField(){
return this.showHintInField!=null?this.showHintInField:
this.form&&this.form.linearMode&&this.linearWidth==null}
,isc.A.$207e=function isc_FormItem__mayShowHintInField(){
return false}
,isc.A.$712=function isc_FormItem__getShowHintInField(){
return this.$207e()&&!!this.getHint()}
,isc.A.$176g=function isc_FormItem__getShowHintTextInDataElement(){
return this.$712()&&
!this.$1564()}
,isc.A.$1564=function isc_FormItem__getUsePlaceholderForHint(){
return false}
,isc.A.getDefaultValue=function isc_FormItem_getDefaultValue(){
if(this.defaultDynamicValue){
this.convertToMethod("defaultDynamicValue");
var _1=this,
_2=this.form,
_3=this.form.getValues()
;
return this.defaultDynamicValue(_1,_2,_3)}
return this.defaultValue}
,isc.A.setToDefaultValue=function isc_FormItem_setToDefaultValue(){
return this.clearValue()}
,isc.A.isSetToDefaultValue=function isc_FormItem_isSetToDefaultValue(){
return(this.$14u==true)}
,isc.A.updateValue=function isc_FormItem_updateValue(_1){
if(_1){
if(this.form&&this.form.$10u){
return}
if(!this.isDrawn()||this.$146y||this.$189t){
return}
}
if(this.$149z!=null)delete this.$149z;
if(this.$1441)return;
if(this.$2081)return;
if(!this.hasElement()||this.getDataElement()==null)return;
if(this.$2075())return;
var _2=this.getElementValue();
return this.$10y(_2)}
,isc.A.$2075=function isc_FormItem__suppressUpdateValueFromElement(){
if(this.getCanEdit()==false)return true;
return false}
,isc.A.$1748=function isc_FormItem__remappedDisplayValueUnchanged(_1){
if(this.getDisplayFieldName()!=null){
var _2=this.mapValueToDisplay(this._value);
if(_2==_1&&
(_2!=this._value||this.getSelectedRecord()!=null))
{
return true}
return false}
}
,isc.A.$10y=function isc_FormItem__updateValue(_1,_2){
if(this.$1441&&_1==this.$172a){
return}
if(this.$17k){
_1=this.$17l(_1)}
if(this.$1748(_1))return;
_1=this.mapDisplayToValue(_1);
return this.storeValue(_1)}
,isc.A.storeValue=function isc_FormItem_storeValue(_1,_2){
if(this.compareValues(_1,this._value)){
return true}
if(this.$17m){
if(this.compareValues(_1,this.$17n)){
return true}
}
var _3=this.handleChange(_1,this._value);
var _4=this.$195e;
delete this.$195e;
if(!_3)return false;
if(this.destroyed)return;
_1=this.$17n;
this.updateAppearance(_1);
if(!this.compareValues(_1,this._value)){
if(!(this._value==null&&_1&&_1==this.emptyDisplayValue)){
this.saveValue(_1)}
}
delete this.$17n;
this.handleChanged(this._value);
if(_2||_4)this.$124t(_1);
return _3}
,isc.A.handleChanged=function isc_FormItem_handleChanged(_1){
if(this.form&&this.form.rulesEngine!=null&&!this.form.$179d){
this.form.rulesEngine.processChanged(this.form,this)}
if(this.changed){
this.changed(this.form,this,_1)}
if(this.form){
this.form.$167p(this,_1);
this.checkForImplicitSave()}
}
,isc.A.checkForImplicitSave=function isc_FormItem_checkForImplicitSave(){
if(this.getImplicitSave()){
var _1=this;
this.form.$95x(this);
this.form.awaitingImplicitSave=true;
this.form.fireOnPause("fiImplicitSave",
function(){
if(_1.form.awaitingImplicitSave){
_1.form.performImplicitSave(_1,true)}
},this.form.implicitSaveDelay
)}
}
,isc.A.updateAppearance=function isc_FormItem_updateAppearance(_1){
if(this.valueIcons||this.getValueIcon){
this.$17j(_1)}
}
,isc.A.getValue=function isc_FormItem_getValue(){
if(this.destroyed||this.destroying)return;
var _1;
if(this._value!==_1){
return this._value}
return this.form.getSavedItemValue(this)}
,isc.A.$160w=function isc_FormItem__getOldValue(){
var _1=this.form;
if(_1==null)return;
var _2=this.getTrimmedDataPath()||this.name;
return _1.$10s&&_1.$10s[_2]}
);
isc.evalBoundary;isc.B.push(isc.A.getElementValue=function isc_FormItem_getElementValue(){
if(this.$1563)return this.emptyDisplayValue;
var _1=this.getDataElement();
if(!_1)return null;
var _2="";
if(this.$105m&&_1.files&&_1.files.length>1){
for(var i=0;i<_1.files.length;i++){
if(_2!="")_2+=this.multipleValueSeparator;
_2+=_1.files[i].name}
}else{
_2=_1.value}
return _2}
,isc.A.resetValue=function isc_FormItem_resetValue(){
var _1=this.form.$10s[this.getFieldName()];
this.setValue(_1)}
,isc.A.getValueAsInteger=function isc_FormItem_getValueAsInteger(){
var _1=this.getValue(),
_2=parseInt(_1);
return isNaN(_2)||_2.toString()!=_1?null:_2}
,isc.A.shouldSubmitValue=function isc_FormItem_shouldSubmitValue(){
return this.form.$11q()}
,isc.A.applyFormula=function isc_FormItem_applyFormula(){
if(!this.form)return;
var _1=this.form.getRulesEngine();
if(!_1)return;
var _2=this.getTrimmedDataPath()||this.getFieldName(),
_3=(this.formula?"formula":"textFormula"),
_4=this.form.$1638(_3,{fieldName:_2})
;
if(!_4)return;
var _5=_1.getRule(_4);
if(_5){
this.$176n=true;
_1.processRules([_5])}
}
,isc.A.getCanEdit=function isc_FormItem_getCanEdit(){
return!this.isReadOnly()}
,isc.A.setCanEdit=function isc_FormItem_setCanEdit(_1){
if(this.$127n==true){
this.$148w=_1;
return}
var _2=this.getCanEdit();
this.canEdit=_1;
_1=this.getCanEdit();
var _3=_2!=_1;
this.updateCanEdit(_3);
if(_3){
this.redraw()}
}
,isc.A.renderAsStatic=function isc_FormItem_renderAsStatic(){
return this.getCanEdit()==false&&this.getReadOnlyDisplay()=="static"}
,isc.A.renderAsReadOnly=function isc_FormItem_renderAsReadOnly(){
return this.getCanEdit()==false&&this.getReadOnlyDisplay()=="readOnly"}
,isc.A.renderAsDisabled=function isc_FormItem_renderAsDisabled(){
return(this.isDisabled()||
(this.getCanEdit()==false&&this.getReadOnlyDisplay()=="disabled"))}
,isc.A.updateCanEdit=function isc_FormItem_updateCanEdit(_1){
var _2=this.$152q;
var _3=this.$152q=this.getCanEdit();
if(_2!=_3){
if(!this.renderAsDisabled()&&!_1){
var _4=!_3;
this.setElementReadOnly(_4);
this.$177();
this.$17j(this.getValue());
this.updateState()}
this.$152r(_3,_1)}
}
,isc.A.$152r=function isc_FormItem__canEditChanged(_1,_2){
if(this.canEditChanged)this.canEditChanged(_1)}
,isc.A.setElementReadOnly=function isc_FormItem_setElementReadOnly(_1){
if(this.hasDataElement())this.redraw()}
,isc.A.$86y=function isc_FormItem__setElementReadOnly(_1){
if(this.hasDataElement()){
var _2=this.getDataElement();
if(_2){
if(!_1&&!_2.readOnly){
_2.disabled=_1}else{
_2.readOnly=_1;
if(isc.screenReader){
if(_2.setAttribute)_2.setAttribute("aria-readonly","true")}
}
_2.tabIndex=this.$154()}
}else if(this.$kk()){
var _2=this.getFocusElement();
if(_2)_2.tabIndex=this.$154()}
}
,isc.A.isReadOnly=function isc_FormItem_isReadOnly(){
var _1=this;
while(_1.parentItem!=null){
if(_1.canEdit!=null){
return!_1.canEdit}
_1=_1.parentItem}
return!isc.DynamicForm.canEditField(_1,this.form)}
,isc.A.isEditable=function isc_FormItem_isEditable(){
this.logWarn("Encoutered a call to FormItem.isEditable(): This is an internal  method scheduled for removal - please use getCanEdit() instead");
return this.getCanEdit()}
,isc.A.getCriteriaFieldName=function isc_FormItem_getCriteriaFieldName(){
var _1=this.criteriaField||this.getDataPath()||this.getFieldName();
if(_1!=null&&this.form&&this.form.dataPath!=null){
_1=this.form.$840(_1);
if(_1.endsWith("/"))_1=_1.substring(0,_1.length-1)}
return _1}
,isc.A.getCriteriaValue=function isc_FormItem_getCriteriaValue(_1){
var _2;
if(this.canEditOpaqueValues){
var _3=isc.SimpleType.getType(this.type);
if(_3&&_3.getAtomicValue){
_2=_3.getAtomicValue(this.getValue(),"criteria")}else{
_2=this.getValue()}
}else{
_2=this.getValue()}
if(!_1){
_2=this.performTypeConversion(_2)}
return _2}
,isc.A.performTypeConversion=function isc_FormItem_performTypeConversion(_1){
var _2=this.getType();
if(_2!=null){
if(isc.isA.String(_1)){
if(isc.SimpleType.inheritsFrom(
_2,"integer",this.form.getDataSource()))
{
var _3=parseInt(_1);
if(_3==_1)_1=_3}else if(isc.SimpleType.inheritsFrom(
_2,"float",this.form.getDataSource()))
{
var _4=parseFloat(_1);
if(_4==_1)_1=_4}
}
}
return _1}
,isc.A.$2039=function isc_FormItem__shouldUseAdvancedCriteria(){
if(this.useAdvancedCriteria!=null)return this.useAdvancedCriteria;
if(this.form&&this.form.useAdvancedCriteria!=null){
return this.form.useAdvancedCriteria}
if(this.grid&&this.grid.useAdvancedCriteria!=null){
return this.grid.useAdvancedCriteria}
}
,isc.A.hasAdvancedCriteria=function isc_FormItem_hasAdvancedCriteria(){
if(this.$2039())return true;
var _1=this._value==null?null:this._value,
_2=this.getSpecifiedOperator(isc.isAn.Array(_1))
;
var _3=isc.DS.$57z[_2];
if(_3&&_3.valueType=="none")return true;
return(_1!=null&&(_2!=null||this.$85m()))}
,isc.A.$85m=function isc_FormItem__shouldAllowExpressions(){
var _1=isc.isA.TextItem(this)||isc.isA.TextAreaItem(this)||
isc.isA.CanvasItem(this)||isc.isA.ContainerItem(this)||
isc.isA.DateItem(this)
;
if(!_1)return false;
_1=this.allowExpressions;
if(this.form==null){
return _1}
if(_1==null)_1=this.form.allowExpressions;
return _1}
,isc.A.getOperator=function isc_FormItem_getOperator(_1,_2){
return this.operator?this.operator:
this.getDefaultOperator(_1,_2)}
,isc.A.getSpecifiedOperator=function isc_FormItem_getSpecifiedOperator(_1){
return this.operator?this.operator:
this.getDefaultOperator(null,_1,true)}
,isc.A.supportsOperator=function isc_FormItem_supportsOperator(_1,_2){
_2=_2||this.getValidOperators();
return _2.contains(_1)}
,isc.A.getValidOperators=function isc_FormItem_getValidOperators(_1){
if(this.validOperators)return this.validOperators;
if(this.lgField&&this.lgField.validOperators)return this.lgField.validOperators;
var _2=isc.DataSource.get(this.dataSource||(this.form&&this.form.dataSource)),
_3=this.getType()||"text"
;
if(_2&&!_1){
var _4=_2.getField(this.getCriteriaFieldName());
return _2.getFieldOperators(_4)}else{
var _5=isc.SimpleType.getValidOperators(_3);
if(_5)return _5}
if(isc.DataSource&&!_1){
var _5=isc.DataSource.getTypeOperators(_3);
if(_5)return _5}
return null}
,isc.A.getDefaultOperator=function isc_FormItem_getDefaultOperator(_1,_2,_3){
var _4=null;
var _5=false;
if(this.defaultOperator){
_4=this.defaultOperator;
_5=true}
if(!_4&&_2){
if(this.defaultMultipleOperator!=null){
_4=this.defaultMultipleOperator;
_5=true}
if(!_4){
if(_3)return null;
_4="inSet"}
}
if(!_4){
var _6=isc.DataSource.get(this.dataSource||(this.form&&this.form.dataSource));
if(_6){
_4=_6.getFieldDefaultOperator(this.getCriteriaFieldName(),_3)}else if(!_3){
if(this.valueMap||this.optionDataSource){
_4="equals"}else{
_4=isc.SimpleType.getDefaultOperator(this.getType())}
}
}
var _7=_3||_5||
(!_5&&_4&&
!(this.form&&this.form.allowExpressions&&_4=="iContains"));
_4=this.$199l(_1,_2,
_7,_4);
var _8=this.getValidOperators();
if(!_8||_8.length==0){
this.logInfo("This item does not support filter operators.");
return _4}
if(_4){
if(this.supportsOperator(_4,_8))return _4}
if(_3)return null;
this.logInfo("Detected defaultOperator, '"+_4+"', is unsupported in this item.  Valid operators are: "+isc.echoAll(_8)+"\n Using "+_8[0]+" instead.");
return _8[0]}
,isc.A.$199l=function isc_FormItem__getDefaultOperator(_1,_2,_3,_4){
var _5=this.getValidOperators();
var _6=this.getType();
if(this.valueMap||this.optionDataSource||
isc.SimpleType.inheritsFrom(_6,"enum")||
isc.SimpleType.inheritsFrom(_6,"boolean")||
isc.SimpleType.inheritsFrom(_6,"float")||
isc.SimpleType.inheritsFrom(_6,"integer")||
isc.SimpleType.inheritsFrom(_6,"date")||
isc.SimpleType.inheritsFrom(_6,"datetime")||
isc.SimpleType.inheritsFrom(_6,"time"))
{
return _3?_4:"equals"}else{
var _7=_3?null:"iContains";
if(this.form){
_7=this.form.defaultSearchOperator||(_3?null:
(this.form.allowExpressions?"iContainsPattern":"iContains"));
var _8=this.form.getDataSource(),
_9=_8&&_8.getFieldOperators(this.name),
_10=_9&&_9.contains(_7)
;
if(!_10&&_9){
if(_3)return _4;
_7=_9[0]}
}
return isc.DataSource.getCriteriaOperator(null,_1,_7,_3)||
_4}
}
,isc.A.canEditCriterion=function isc_FormItem_canEditCriterion(_1,_2){
if(this.hasMatchingCriterion(_1))return true;
if(_1.valuePath!=null)return false;
var _3=this.getOperator(null,isc.isAn.Array(_1.value));
var _4=this.getCriteriaFieldName();
if(_1.fieldName!=null&&_1.fieldName==_4
&&_1.operator==_3)
{
return true}
var _5=this.$85m();
if(this.multiple||_5){
var _6=_5?this.form.expressionDataSource:null;
_6=_6||this.form.dataSource;
var _7=isc.DS.getCriteriaFields(_1,_6,true);
if(_5){
return _7.contains(_4)}else{
var _8=isc.DS.isAdvancedCriteria(_1,_6);
if(_8&&_1.operator=="or"){
return _7.contains(_4)
&&_7.getUniqueItems().length==1}
}
}
return false}
,isc.A.canEditSimpleCriterion=function isc_FormItem_canEditSimpleCriterion(_1){
var _2=this.getCriteriaFieldName();
return _2==_1}
,isc.A.setSimpleCriterion=function isc_FormItem_setSimpleCriterion(_1,_2){
this.setValue(_1)}
,isc.A.getCriterion=function isc_FormItem_getCriterion(_1,_2){
var _3=this.getOperator(_1,isc.isAn.Array(this.getValue())),
_4=isc.DataSource.$57z[_3],
_5=this.getCriteriaFieldName();
if(!_4)return;
var _6=this.getType(),
_7=this.form.getDataSource();
var _8=(!_6||!_7||
(!_7.getTypeOperators(_6).contains(_3)&&
_7.getTypeOperators("text").contains(_3)))||
(this.form&&this.form.allowExpressions);
var _9=this.getCriteriaValue(_8);
if(_4.valueType=="criteria"&&isc.isA.String(_9)){
return this.parseValueExpressions(_9,_5,_4)}
if(_4.valueType!="none"&&!_2&&(_9==null||isc.is.emptyString(_9))){
return}
if(isc.isAn.Array(_9)){
var _10=_9.getUniqueItems();
if(_9.length==0||
(!this.allowEmptyStringInArrayCriterion&&_10.length==1&&
isc.isA.String(_9[0])&&isc.is.emptyString(_9[0])
)
)
{
return}
}
var _11={fieldName:_5,operator:_3};
if(_4.valueType!="none")_11.value=_9;
if(isc.isA.String(_9)&&this.$85m()){
var _12=this.parseValueExpressions(_9,_5,_3);
if(_12!=null){
var _13=isc.DS.$57z[_12.operator];
if(_13.valueType=="valueSet"&&_12.value!=null&&isc.isA.String(_12.value)){
_12.value=_13.processValue(_12.value)}
if(!this.canEditCriterion(_12))_11=null;
else _11=_12}
}
return _11}
,isc.A.hasMatchingCriterion=function isc_FormItem_hasMatchingCriterion(_1){
if(this.$235e)return;
this.$235e=true;
var _2=false;
var _3=this.grid&&this.grid.getDataSource();
if(_3){
var _4=this.getCriterion();
_2=(_3.compareCriteria(_4,_1)==0)}
delete this.$235e;
return _2}
,isc.A.setCriterion=function isc_FormItem_setCriterion(_1){
var _2=this.$85m(),
_3=_1?_1.value:null
;
var _4=isc.DS.isAdvancedCriteria(_1);
if(_2){
var _5=isc.DS.$57z[_1.operator];
var _6=this.form&&this.form.grid;
if(_4||_5.valueType=="valueRange"||
(_6&&_6.shouldAllowFilterOperators&&!_6.shouldAllowFilterOperators()))
{
_3=this.buildValueExpressions(_1)}else{
if(_5.valueType=="valueSet"){
if(isc.isAn.Array(_3)){
_3=_3.join(_5.valueSeparator)}
}
}
}else{
if(this.multiple){
if(_4&&_1.operator=="or"){
var _7=[],
_8=_1.criteria,
_9=this.getCriteriaFieldName(),
_10=_8[0]?_8[0].operator:null,
_11=false
;
for(var i=0;i<_8.length;i++){
var _13=_8[i];
if(_13.criteria||_13.fieldName!=_9||
_13.operator!=_10)
{
_11=true;
break}
_7.add(_13.value)}
if(!_11)_3=_7}
}
}
this.setValue(_3)}
,isc.A.$1156=function isc_FormItem__getTextBoxScrollWidth(_1){
return _1.scrollWidth}
,isc.A.$1618=function isc_FormItem__getClipValue(){
return(this.renderAsStatic()?this.$1617():!!this.clipValue)}
,isc.A.valueClipped=function isc_FormItem_valueClipped(){
var _1=this.$1618(),
_2=_1?this.$15h():null,
_3=_2?this.$1156(_2)-isc.Element.getClientWidth(_2):0
;
return _3>1}
,isc.A.clearErrors=function isc_FormItem_clearErrors(_1){
var _2=this.getFieldName();
if(_2)this.form.clearFieldErrors(_2,true,_1)}
,isc.A.setErrors=function isc_FormItem_setErrors(_1){
var _2=this.getFieldName();
if(_2)this.form.setFieldErrors(_2,_1,true)}
,isc.A.setError=function isc_FormItem_setError(_1){
var _2=this.getFieldName();
if(_2)this.form.setError(_2,_1)}
,isc.A.hasErrors=function isc_FormItem_hasErrors(){
if(this.parentItem!=null)return this.parentItem.hasErrors();
var _1=this.getFieldName();
if(_1&&this.form)return this.form.hasFieldErrors(_1);
var _2=this.getDataPath();
if(_2&&this.form)return this.form.hasFieldErrors(_2);
return false}
,isc.A.validate=function isc_FormItem_validate(_1,_2){
var _3=this.hasErrors(),
_4=[],
_5=null,
_6=false,
_7=this.form
;
var _8=isc.rpc.startQueue();
var _9=this.getValue(),
_10=_7.$181h(true),
_11={unknownErrorMessage:_7.unknownErrorMessage,
typeValidationsOnly:_7.validateTypeOnly,
deferServerValidation:_1}
;
if(_2!=null){
isc.addProperties(_11,_2)}
var _12=_7.validateFieldAndDependencies(this,this.validators,_9,
_10,_11);
var _13=this.name;
if(_13==null)_13=this.getDataPath();
if(_13==null){
this.logWarn("item has no specified name or dataPath - unable to meaningfully store validation errors.")}
if(!_8)isc.rpc.sendQueue();
if(_12!=null){
if(_12.resultingValue!=null){
this.setValue(_12.resultingValue)}
if(!_12.valid){
_4=_12.errors[_13];
if(_4==null)_4=[]}
_6=_12.stopOnError;
_5=_12.errors}
var _14=false;
if(_4.length>0||_3){
if(_4.length>0){
if(_7.setFieldErrors(_13,_4)){
_14=true}
}else{
_7.clearFieldErrors(_13,false);
_14=true}
this.setBlockingErrors(_6)}
if(_5){
for(var _15 in _5){
if(_15!=_13){
var _16=_5[_15];
if((_16!=null&&!isc.isAn.emptyArray(_16))||
_7.hasFieldErrors(_15))
{
if(_7.setFieldErrors(_15,_16)){
_14=true}
}
}
}
}
if(_14){
this.redraw()}
return(_4.length==0)}
,isc.A.shouldDisallowEditorExit=function isc_FormItem_shouldDisallowEditorExit(){
return(this.$228d||this.$228e)}
,isc.A.setDisallowEditorExit=function isc_FormItem_setDisallowEditorExit(_1){
this.$228e=_1}
,isc.A.setBlockingErrors=function isc_FormItem_setBlockingErrors(_1){
this.$228d=_1}
,isc.A.setRequired=function isc_FormItem_setRequired(_1){
if(_1==this.required)return;
this.required=_1;
if(this.form==null)return;
if(_1){
var _2=this.form.getRequiredValidator(this);
this.addValidator(_2)}else{
this.removeValidator({type:"required"})}
this.redraw()}
,isc.A.addValidator=function isc_FormItem_addValidator(_1){
if(this.validators==null)this.validators=[];
else if(!isc.isAn.Array(this.validators))this.validators=[this.validators];
if(this.validators.$69){
this.validators=this.validators.duplicate()}
this.validators.add(_1)}
,isc.A.removeValidator=function isc_FormItem_removeValidator(_1){
if(this.validators==null)return;
if(!isc.isAn.Array(this.validators))this.validators=[this.validators];
if(this.validators.$69){
this.validators=this.validators.duplicate()}
var _2=this.validators.find(_1);
this.validators.remove(_2)}
,isc.A.setAutoComplete=function isc_FormItem_setAutoComplete(_1){
this.autoComplete=_1;
this.$10q()}
,isc.A.$10q=function isc_FormItem__handleAutoCompleteChange(){
var _1=this.$17h();
if(isc.Browser.isIE&&this.hasDataElement()){
var _2=this.getDataElement();
if(_2)_2.autoComplete=(_1=="native"?"":"off")}
}
,isc.A.$17h=function isc_FormItem__getAutoCompleteSetting(){
if(this.autoCompleteKeywords!=null&&isc.isAn.Array(this.autoCompleteKeywords)){
return this.autoCompleteKeywords.join(" ")}else if(this.autoComplete!=null)return this.autoComplete;
return this.form?this.form.autoComplete:null}
,isc.A.autoCompleteEnabled=function isc_FormItem_autoCompleteEnabled(){
if(isc.Browser.isSafari)return false;
return this.$17h()=="smart"}
,isc.A.uniqueMatchOnly=function isc_FormItem_uniqueMatchOnly(){
if(this.uniqueMatch!=null)return this.uniqueMatch;
return this.form.uniqueMatch}
,isc.A.getCandidates=function isc_FormItem_getCandidates(){
var _1=this.autoCompleteCandidates;
if(_1==null){
var _2=this.getAllValueMappings();
if(_2!=null){
if(isc.isAn.Array(_2))_1=_2;
else _1=isc.getValues(_2)}else if(this.form.grid){
var _3=this.form.grid.data;
if(isc.isA.ResultSet!=null&&isc.isA.ResultSet(_3))_1=_3.getValuesList(this.name);
else _1=_3.getProperty(this.name)}
}
if(_1!=null)_1=_1.getUniqueItems();
return _1}
,isc.A.getCompletion=function isc_FormItem_getCompletion(_1){
if(_1==null)return;
var _2=this.getCandidates();
if(_2==null||_2.length==0)return;
var _3=_1.toUpperCase(),
_4=this.uniqueMatchOnly(),
_5;
for(var i=0;i<_2.length;i++){
var _7=_2[i],
_8=_7!=null?_7.toUpperCase():null;
if(_8==_3)return null;
if(isc.startsWith(_8,_3)){
if(!_4)return _7;
if(_5!=null)return null;
_5=_7}
}
return _5}
,isc.A.showCompletion=function isc_FormItem_showCompletion(_1){
this.clearCompletion();
if(!this.canAutoComplete||!this.hasDataElement()||
!this.autoCompleteEnabled())return;
var _2=isc.EH.lastEvent.keyName;
if(_2=="Backspace"||_2=="Delete")return;
var _3=this.getCompletion(_1);
if(_3==null){
return}
this.form.$106();
this.form.$11b(this);
this.setElementValue(_1+_3.substring(_1.length));
this.$17o=_1;
this.$17k=_3;
if(this.$173y()){
this.setSelectionRange(_1.length,_3.length)}
}
,isc.A.$17l=function isc_FormItem__handleChangeWithCompletion(_1){
var _2=this.$17k,
_3=isc.EH.lastEvent.keyName;
if(this.$14m[_3]==true){
this.acceptCompletion(_3==this.$10j);
return _2}
var _4=_2.substring(this.$17o.length);
if(!_1.endsWith(_4)){
this.clearCompletion();
return _1}
if(this.getSelectedText()==_4){
return this.$17o}
this.clearCompletion();
return _1}
,isc.A.clearCompletion=function isc_FormItem_clearCompletion(){
delete this.$17k;
delete this.$17o}
,isc.A.acceptCompletion=function isc_FormItem_acceptCompletion(_1){
var _2=this.$17k;
if(!_2)return;
if(this.autoCompleteEnabled()){
var _3=_1?[_2.length,_2.length]:null;
if(this.getElementValue()!=_2){
if(!_1&&this.$173y()){
_3=this.getSelectionRange()}
this.setElementValue(_2)}
if(this.hasFocus&&_3&&this.$173y()){
this.setSelectionRange(_3[0],_3[1])}
}
this.clearCompletion()}
,isc.A.$173y=function isc_FormItem__canSetSelectionRange(){
if(!isc.isA.TextItem(this)&&!isc.isA.TextAreaItem(this))return false;
if(isc.isA.TextItem(this)){
var _1=(this.$156t()||"text").toLowerCase();
if(this.$279t.indexOf(_1)==-1)return false}
return true}
,isc.A.setSelectionRange=function isc_FormItem_setSelectionRange(_1,_2){
if(!this.$173y())return;
if(!this.isDrawn())return;
if(isc.isAn.Array(_1)){
_1=_1[0];
_2=_1[1]}
if(!isc.isA.Number(_1))_1=0;
if(!isc.isA.Number(_2))_2=0;
if(_1>_2){
var _3=_2;
_2=_1;
_1=_3}
var _4=this.getDataElement();
if(_4==null)return;
var _5=this.ns.EH,
_6=_5.mouseDownEvent&&_5.mouseDownEvent.DOMevent;
if(_6!=null&&_5.$129k()&&_5.$145u(_4)){
var _7=(_6.target&&
(_6.target.nodeType==1?_6.target
:_6.target.parentElement));
if(_7!=null&&_4.contains(_7)){
return}
}
if(this.logIsInfoEnabled("nativeFocus")&&!this.$820()){
this.logInfo("setSelectionRange() about to change focus "+isc.EH.$lb()+
(this.logIsDebugEnabled("traceFocus")?this.getStackTrace():""),
"nativeFocus")}
var _8=this.$1621;
this.$1621=true;
var _9;
if(isc.Browser.isIE){
this.$180c(_1,_2)}else{
if(!this.hasFocus){
_4.focus()}
isc.EH.$904=true;
_4.setSelectionRange(_1,_2);
_9=isc.EH.$904}
if(!_8)delete this.$1621;
if(_2>_1){
this.$1161=[_1,_2]}
return _9}
,isc.A.$180c=function isc_FormItem__selectIETextRange(_1,_2,_3){
if(this.$180d){
isc.Timer.clear(this.$180d);
delete this.$180d}
isc.EH.$904=true;
var _4=this.getDataElement();
if(_4==null)return;
var _5=true,
_6=_4.createTextRange()
;
_6.collapse(true);
_6.moveStart(this.$14n,_1);
_6.moveEnd(this.$14n,(_2-_1));
try{
_6.select()}
catch(err){
_5=false;
this.logWarn("Text selection failure: '"+err.message+"'.  "+
(!_3?"Retrying selection in another thread.":
"Retry failed - no selection will be made.")
)}
delete isc.EH.$904;
if(!_5&&!_3){
this.$180d=isc.Timer.setTimeout(this.getID()+
".$180c("+_1+","+_2+",true)",0
)}
}
,isc.A.selectValue=function isc_FormItem_selectValue(){
var _1=this.getElementValue(),
_2=isc.isA.String(_1)?_1.length:0;
this.setSelectionRange(0,_2)}
,isc.A.deselectValue=function isc_FormItem_deselectValue(_1){
if(!this.hasFocus)return;
if(_1)this.setSelectionRange(0,0);
else{
var _2=this.getElementValue(),
_3=isc.isA.String(_2)?_2.length:0;
this.setSelectionRange(_3,_3)}
}
,isc.A.getSelectionRange=function isc_FormItem_getSelectionRange(_1){
if(!this.$173y())return;
if(isc.isA.UploadItem(this))return;
if(!this.allowTextSelection){
var _2=this.browserInputType=="time"||
this.browserInputType=="date"||
this.browserInputType=="datetime-local";
if((isc.Browser.isChrome&&
(this.browserInputType=="digits"||this.browserInputType=="number"||
this.browserInputType=="email"||_2))||
(isc.Browser.isEdge&&_2))
{
return}
}
var _3=this.getDataElement();
if(_3==null)return;
if(isc.Browser.isIE&&isc.Browser.version<10){
if(!this.$820())return null;
var _4=this.$17p();
if(_4==null)return null;
if(isc.isA.TextAreaItem(this)){
if(!this.supportsSelectionRange)return null;
var _5=_4.duplicate();
_5.moveToElementText(_3);
var _6=_5.text.length;
_5.setEndPoint(this.$119o,_4);
var i=_6-_5.text.length;
return[i,i+_4.text.length]}else{
var _8=[],
_5=_3.createTextRange();
if(_5==null)return null;
if(_5.compareEndPoints(this.$14o,_4)==0){
_8[1]=_5.text.length}else{
_5.setEndPoint(this.$14o,_4);
_8[1]=_5.text.length}
_5.setEndPoint(this.$14p,_4);
_8[0]=_5.text.length;
return _8}
}else if(isc.Browser.isMoz||isc.Browser.isSafari||isc.Browser.isOpera||isc.Browser.isIE){
return[_3.selectionStart,_3.selectionEnd]}
}
,isc.A.getCursorPosition=function isc_FormItem_getCursorPosition(){
var _1=this.getSelectionRange();
return _1?_1[0]:null}
,isc.A.clearSelectionRange=function isc_FormItem_clearSelectionRange(_1){
delete this.$1161;
if(_1){
var _2=this.getDataElement();
if(_2){
_2.selectionStart=_2.selectionEnd}
}
}
,isc.A.$820=function isc_FormItem__hasNativeFocus(){
var _1=this.getFocusElement(),
_2=this.getActiveElement()
;
return(_1==_2)}
,isc.A.getSelectedText=function isc_FormItem_getSelectedText(){
if(!isc.isA.TextItem(this)&&!isc.isA.TextAreaItem(this)){
return}
if(isc.Browser.isIE){
var _1=this.$17p();
if(_1)return _1.text}else if(isc.Browser.isMoz||isc.Browser.isSafari){
var _2=this.getElement();
if(_2!=null){
return _2.value.substring(_2.selectionStart,_2.selectionEnd)}
}
}
,isc.A.$100a=function isc_FormItem__IESelectionStuck(){
if(!isc.Browser.isIE)return false;
if(isc.Browser.version>9)return false;
try{
var _1=document.selection?document.selection.typeDetail:null}catch(e){
this.logDebug("Internet explorer native 'stuck focus' state detected");
return true}
return false}
,isc.A.$17p=function isc_FormItem__getIESelectionRange(){
if(!isc.Browser.isIE)return;
if(isc.isA.TextAreaItem(this)&&!this.supportsSelectionRange)return null;
var _1=this.getDocument().selection,
_2=(_1!=null?_1.createRange():null);
if(_2!=null&&_2.parentElement().id==this.getDataElementId())return _2;
return null}
,isc.A.rememberSelection=function isc_FormItem_rememberSelection(_1){
if(!this.isDrawn()||!this.$173y())return;
if((!isc.isA.TextItem(this)&&!isc.isA.TextAreaItem(this))
||isc.isAn.UploadItem(this))
{
return}
var _2=this.getElementValue();
if(_2==isc.emptyString)return;
this.$17q=_2;
var _3=this.getSelectionRange(_1);
if(_3){
this.$17r=_3[0];
this.$17s=_3[1]}
}
,isc.A.resetToLastSelection=function isc_FormItem_resetToLastSelection(_1){
if(!this.isDrawn()||this.$17r==null)return;
var _2,
_3=this.getElementValue(),
_4=this.$17q;
if(_4==null||_3==null){
_2=false}else if(!_1){
_2=(_3==_4)}else{
_2=true;
if(this.$17r==0&&this.$17s==_4.length){
this.$17s=_3.length}else{
if(_3.toLowerCase()!=_4.toLowerCase()){
this.$17r=this.$17s=_3.length}
}
}
if(_2&&this.$173y()){
this.setSelectionRange(this.$17r,this.$17s)}
delete this.$17r;
delete this.$17s;
delete this.$17q}
,isc.A.handleChange=function isc_FormItem_handleChange(_1,_2){
var _3=this.form.getFieldErrors(this.name);
if(this.$17m&&this.compareValues(_1,this.$17n))return true;
this.$17m=true;
this.$17n=_1;
var _4=_1;
if(isc.isA.Date(_4))_4=_4.duplicate();
else if(isc.isAn.Array(_4))_4=_4.duplicate();
else if(isc.isAn.Object(_4))_4=isc.addProperties({},_4);
if(this.transformInput){
_1=this.transformInput(this.form,this,_1,_2)}
var _5=this.hasErrors(),
_6=false,
_7=[],
_8=null,
_9,
_10
;
this.$17g=false;
var _11=this.$1490(_1,_2);
if(_11!=_1){
_1=_11;
_6=(_1==_2)}
if(!_6){
var _12=isc.rpc.startQueue();
var _13=this.form.$181h(),
_14={unknownErrorMessage:this.form.unknownErrorMessage,
changing:true}
;
_10=this.form.validateFieldAndDependencies(this,this.validators,_1,
_13,_14);
if(!_12)isc.rpc.sendQueue();
var _15=false;
if(_10!=null){
_15=!_10.valid;
if(_10.resultingValue!=null){
_9=_10.resultingValue}
if(!_10.valid){
_7=_10.errors[this.name];
if(_7==null)_7=[]}
_8=_10.errors}
var _16;
if(_15&&_9===_16&&this.$65v())
{
_6=true;
_9=_2;
if(_2==null)_9=null}
if(_9!==_16)_1=_9;
var _17;
if(_15){
if(!isc.isAn.Array(_3)){
_3=_3==null?[]:[_3]}
var _18=_7;
if(!isc.isAn.Array(_18)){
_18=[_18]}
var _17=_18.length!=_3.length;
if(!_17){
for(var i=0;i<_3.length;i++){
if(!_18.contains(_3[i])){
_17=true;
break}
}
}
if(_17){
this.clearErrors(true);
this.setError(_7)}
}else if(_10!=null&&_5){
_17=true;
this.clearErrors(true)}
if((!_15||this.changeOnError)){
if(this.change!=null){
if(this.change(this.form,this,_1,_2)==false){
_1=_2;
_6=true}
}
if(this.destroyed)return;
if(!_6&&this.form&&this.form.itemChange!=null){
if(this.form.itemChange(this,_1,_2)==false){
_1=_2;
_6=true}
}
}
}
var _20=this.$17g;
var _21=!this.compareValues(_1,_4);
if((_6||_21)&&!_20)
{
this.setValue(_1,null,true,_6);
if(_6&&this.maintainSelectionOnTransform){
this.$17t()}
}
if(this.$17g)this.$17n=this._value;
if(this.redrawOnChange||_17){
this.redraw()}
if(_8){
for(var _22 in _8){
if(_22!=this.name){
this.form.setFieldErrors(_22,_8[_22],true)}
}
}
if(!_6&&this.hasFocus)this.showCompletion(_1);
delete this.$17m;
return(!_6)}
,isc.A.$1490=function isc_FormItem__enforceLengthOnEdit(_1,_2){
if(this.enforceLength&&this.length!=null&&_1!=null){
var _3=isc.isA.Number(_1);
if(_3){
if(this.$184w){
_1=this.$184w(_1)}else{
_1=""+_1}
}
if(isc.isA.String(_1)&&_1.length>this.length){
if(_3){
if(isc.isA.Number(_2)){
_2=this.$184w(_2,true)}
}
var _4=_2!=null&&isc.isA.String(_2)&&
_2.length==this.length;
if(_4){
_1=_2}else{
_1=_1.substring(0,this.length)}
}
if(_3)_1=this.mapDisplayToValue(_1,true)}
return _1}
);
isc.evalBoundary;isc.B.push(isc.A.$65v=function isc_FormItem__rejectInvalidValueOnChange(){
return(this.rejectInvalidValueOnChange!=null)?this.rejectInvalidValueOnChange
:this.form.rejectInvalidValueOnChange}
,isc.A.compareValues=function isc_FormItem_compareValues(_1,_2){
if(_1===_2)return true;
var _3=isc.Canvas.compareValues;
if(this.multiple){
if(!(_1==null||isc.isAn.Array(_1))){
if(!this.$105m&&!this.suppressMultipleComparisonWarning)
{
this.logWarn(
"compareValues - this is a multiple FormItem but compareValues was called with a non-null first argument `value1` that is not an array.")}
_1=[_1]}
if(!(_2==null||isc.isAn.Array(_2))){
if(!this.$105m&&!this.suppressMultipleComparisonWarning){
this.logWarn(
"compareValues - this is a multiple FormItem but compareValues was called with a non-null second argument `value2` that is not an array.")}
_2=[_2]}
if(_1==null&&_2==null){
return true}else if(_1==null||_2==null){
return false}
if(_1.length!=_2.length){
return false}
var i=0,_5=_1.length;
while(i<_5&&_3(_1[i],_2[i],this)){
++i}
return(i==_5)}
return _3(_1,_2,this)}
,isc.A.elementChanged=function isc_FormItem_elementChanged(){
var _1=(isc.EH.$lc!=null);
if(!_1)isc.EH.$h1("ICHG");
this.logDebug("native change");
if(isc.Log.supportsOnError){
this.updateValue(true)}else{
try{
this.updateValue(true)}catch(e){
isc.Log.$am(e);
if(isc.Log.rethrowErrors){
throw e;}
}
}
if(!_1)isc.EH.$h2();
return true}
,isc.A.$680=function isc_FormItem__handleInactiveEditorEvent(_1,_2,_3){
if(this.logIsDebugEnabled("inactiveEditorHTML")){
this.logDebug("handling inactive editor event:"+_1+", inactive context:"+
this.echo(_2),"inactiveEditorHTML")}
var _4=this.$683[_1];
if(_4==null){
_4=this.$683[_1]=
"inactiveEditor"+_1.substring(0,1).toUpperCase()+_1.substring(1)}
if(this[_4]!=null){
return this[_4](_2,_3)}
}
,isc.A.$17u=function isc_FormItem__fireStandardHandler(_1){
this.convertToMethod(_1);
return this[_1](this.form,this,isc.EH.lastEvent)}
,isc.A.handleTitleClick=function isc_FormItem_handleTitleClick(){
if(this.isDisabled())return;
if(this.editingOn){
this.editProxy.click();
this.handleClick();
return false}
return this.$17u("titleClick")}
,isc.A.handleTitleDoubleClick=function isc_FormItem_handleTitleDoubleClick(){
if(this.isDisabled())return;
return this.$17u("titleDoubleClick")}
,isc.A.handleClick=function isc_FormItem_handleClick(){
if(this.editingOn){
isc.EditContext.selectCanvasOrFormItem(this,true);
return false}
if(this.isDisabled())return;
var _1=this.$17u("click");
if(this.$173z){
delete this.$173z;
if(_1!=false){
this.selectValue()}
}
return _1}
,isc.A.handleDoubleClick=function isc_FormItem_handleDoubleClick(){
if(this.isDisabled())return;
return this.$17u("doubleClick")}
,isc.A.handleShowContextMenu=function isc_FormItem_handleShowContextMenu(){
return this.$17u("showContextMenu")}
,isc.A.handleCellClick=function isc_FormItem_handleCellClick(){
if(this.isDisabled())return;
return this.$17u("cellClick")}
,isc.A.handleCellDoubleClick=function isc_FormItem_handleCellDoubleClick(){
if(this.isDisabled())return;
return this.$17u("cellDoubleClick")}
,isc.A.$12z=function isc_FormItem__handleElementChanged(){
return this.form.elementChanged(this.getID())}
,isc.A.handleMouseMove=function isc_FormItem_handleMouseMove(){
var _1=isc.EH.lastEvent.itemInfo;
if(!this.isDisabled()&&(this.showValueIconOver||this.showValueIconDown)){
var _2=(_1.overElement||_1.overTextBox||
_1.overControlTable),
_3=this.$15t;
if(_2){
if(this.$j6&&this.showValueIconDown){
if(_3!=this.$13v){
this.$15t=this.$13v;
this.$17j(this.getValue())}
}else{
if(this.showValueIconOver&&_3!=this.$13u){
this.$15t=this.$13u;
this.$17j(this.getValue())}
}
}else{
var _4=(this.showValueIconFocused&&this.hasFocus)?
(this.showValueIconFocusedAsOver?this.$13u:this.$258q):null;
if(_3!=_4){
this.$15t=_4;
this.$17j(this.getValue())}
}
}
var _5=this.$142q,
_6=this.$176c;
this.$142q=_1&&(_1.overElement||_1.overTextBox);
if(!this.$142q&&_1&&_1.overIcon){
var _7=this.getIcon(_1.overIcon);
if(_7&&_7.inline&&this.$156r()){
this.$142q=true}
}
this.$176c=this.$142q||
(_1&&_1.overControlTable)||
(_1.overIcon&&
this.getIcon(_1.overIcon)==this.getPickerIcon());
if(this.showOver&&(_6!=this.$176c)){
this.updateStateForRollover()}
if(this.$17u("mouseMove")==false)return false;
if(this.$142q){
if(_1.overIcon){
this.$113(_1.overIcon);
if(this.handleTextBoxMove()==false)return false}else{
if(!_5){
if(this.handleTextBoxOver()==false)return false}
if(this.handleTextBoxMove()==false)return false}
}else if(_5){
this.handleTextBoxOut(_1)}
}
,isc.A.shouldUpdateHoverInPlace=function isc_FormItem_shouldUpdateHoverInPlace(){
if(this.updateHoverInPlace!=null)return this.updateHoverInPlace;
return this.form.updateHoverInPlace}
,isc.A.handleMouseOver=function isc_FormItem_handleMouseOver(){
this.updateStateForRollover();
if(!this.shouldUpdateHoverInPlace()&&isc.Hover.isActive)isc.Hover.clear();
isc.Hover.setAction(this,this.$wb,null,this.$17v());
return this.$17u("mouseOver")}
,isc.A.handleMouseOut=function isc_FormItem_handleMouseOut(){
var _1=(this.showValueIconFocused&&this.hasFocus)?
(this.showValueIconFocusedAsOver?this.$13u:this.$258q):null;
if(this.$15t!=_1){
this.$15t=_1;
this.$17j(this.getValue())}
this.stopHover();
var _2=this.$17u("mouseOut");
var _3=this.$142q,
_4=this.$176c;
this.$142q=this.$176c=false;
this.updateStateForRollover();
if(_3){
var _5=this.handleTextBoxOut();
_2=_5==null?_2:(_2&&_5)}
return _2}
,isc.A.handleMouseDown=function isc_FormItem_handleMouseDown(){
this.$j6=true;
isc.Page.setEvent(isc.EH.MOUSE_UP,this,isc.Page.FIRE_ONCE,"$17w");
var _1=isc.EH.lastEvent.itemInfo,
_2=_1.inactiveContext;
if(_2!=null){
return this.form.bubbleInactiveEditorEvent(this,"mouseDown",_1)}
if(!this.isDisabled()&&this.showValueIconDown){
var _3=(_1.overElement||_1.overTextBox||_1.overControlTable);
if(_3){
this.$15t=this.$13v;
this.$17j(this.getValue())}
}
var _4;
if(this.mouseDown)_4=this.$17u("mouseDown");
var _5=this._value,
_6=this.getDisplayValue()
;
if(_1&&_1.overElement&&
!this.hasFocus&&
_4!=false&&
this.$1730()&&this.$173y()&&
((_5!=null&&_5!==isc.emptyString)||
(_6!=null&&_6!==isc.emptyString)||
this.mask!=null
))
{
this.setSelectionRange(0,0);
this.$173z=true}
return _4}
,isc.A.$178s=function isc_FormItem__stopBubblingMouseWheelEvent(_1,_2){
return false}
,isc.A.stopHover=function isc_FormItem_stopHover(){
isc.Hover.clearForTargetMouseOut()}
,isc.A.setHoverFocusKey=function isc_FormItem_setHoverFocusKey(_1){
this.hoverFocusKey=_1}
,isc.A.setHoverPersist=function isc_FormItem_setHoverPersist(_1){
this.hoverPersist=_1}
,isc.A.$17w=function isc_FormItem__clearMouseDown(){
this.$j6=null;
if(this.$15t==this.$13v){
this.$15t=this.showValueIconFocused?this.$258q:
this.showValueIconOver?this.$13u:null;
this.$17j(this.getValue())}
}
,isc.A.handleMouseStillDown=function isc_FormItem_handleMouseStillDown(_1){
if(this.mouseStillDown){
return this.$17u("mouseStillDown")}
}
,isc.A.$17v=function isc_FormItem__getHoverDelay(){
return this.hoverDelay!=null?this.hoverDelay:this.form.itemHoverDelay}
,isc.A.handleTitleMove=function isc_FormItem_handleTitleMove(){
return this.$17u("titleMove")}
,isc.A.handleTitleOver=function isc_FormItem_handleTitleOver(){
if(!this.shouldUpdateHoverInPlace()&&isc.Hover.isActive)isc.Hover.clear();
isc.Hover.setAction(this,this.$17x,null,this.$17v());
return this.$17u("titleOver")}
,isc.A.handleTitleOut=function isc_FormItem_handleTitleOut(){
this.stopHover();
return this.$17u("titleOut")}
,isc.A.handleTextBoxMove=function isc_FormItem_handleTextBoxMove(){
return this.$17u("textBoxMove")}
,isc.A.handleTextBoxOver=function isc_FormItem_handleTextBoxOver(){
if(!this.shouldUpdateHoverInPlace())isc.Hover.clear();
isc.Hover.setAction(this,this.$1149,null,this.$17v());
return this.$17u("textBoxOver")}
,isc.A.handleTextBoxOut=function isc_FormItem_handleTextBoxOut(_1){
if(_1&&_1.overIcon){
this.$170()}else{
this.stopHover()}
return this.$17u("textBoxOut")}
,isc.A.$121=function isc_FormItem__iconFocus(_1,_2){
var _3=this.getIcon(_1);
if(_3!=null){
var _4=(_3.prompt!=null?_3.prompt:this.iconPrompt)
window.status=_4;
if(this.$54o(_3)){
this.$168v(_3,false,true)}
else if(this.$165(_3))this.$168v(_3,true)}
return this.$12v(_2,this)}
,isc.A.$123=function isc_FormItem__iconBlur(_1,_2){
var _3=this.getIcon(_1);
if(_3!=null){
window.status="";
var _4=this.$54o(_3),
_5=_3.showFocusedWithItem!=false,
_6=_3.showOnFocus||
_3.showOnFocus==null&&this.showIconsOnFocus;
if(_4&&(!_6||!_5)){
this.$168v(_3,false,false)}
if(this.$165(_3))this.$168v(_3,false,false)}
return this.$12x(_2,this)}
,isc.A.$113=function isc_FormItem__iconMouseOver(_1){
if(_1==this.errorIconName)return this.$17y();
var _2=this.getIcon(_1);
if(_2!=null){
if(this.$165(_2))this.$168v(_2,true);
this.$17z=_2;
if(!this.shouldUpdateHoverInPlace())isc.Hover.clear();
isc.Hover.setAction(this,this.$170,null,this.$17v());
var _3=(_2.prompt!=null?_2.prompt:this.iconPrompt)
window.status=_3;
return true}
}
,isc.A.$114=function isc_FormItem__iconMouseOut(_1){
if(_1==this.errorIconName)return this.$171();
var _2=this.getIcon(_1);
if(_2!=null){
window.status="";
if(this.$165(_2)){
var _3=this.$176d(_2),
_4=isc.EH.lastEvent.itemInfo,
_5=_3=="item"?_4&&_4.item==this:
(_3=="textbox"?this.$169:false);
if(!_5){
this.$168v(_2,false)}
}
delete this.$17z;
if(!this.shouldUpdateHoverInPlace())isc.Hover.clear();
isc.Hover.setAction(this,this.$wb,null,this.$17v());
return true}
}
,isc.A.$116=function isc_FormItem__iconClick(_1){
if(_1==this.errorIconName)return this.$238o();
var _2=this.getIcon(_1);
if(_2==null)return;
if(this.iconIsDisabled(_2))return;
if(_2.click!=null){
if(!isc.isA.Function(_2.click)){
isc.Func.replaceWithMethod(_2,"click","form,item,icon")}
if(_2.click(this.form,this,_2)==false){
return false}
}
if(_2.pickerIcon&&this.pickerIconClick){
if(this.pickerIconClick(this.form,this,_2)==false){
return false}
}
if(this.iconClick){
if(this.iconClick(this.form,this,_2)==false){
return false}
}
}
,isc.A.pickerIconClick=function isc_FormItem_pickerIconClick(){
var _1=this.getIcon("picker");
if(this.suppressPickerForCustomIconClick
&&_1!=null&&_1.click!=null)
{
return}
this.showPicker();
return false}
,isc.A.$172=function isc_FormItem__iconKeyPress(_1){
var _2=this.getIcon(_1);
if(_2){
var _3=isc.EH.getKey(),
_4=isc.EH.getKeyEventCharacter();
if(_2.keyPress){
if(!isc.isA.Function(_2.keyPress)){
isc.Func.replaceWithMethod(_2,"keyPress","keyName, character,form,item,icon")}
if(_2.keyPress(_3,_4,this.form,this,_2)==false)
return false}
if(this.iconKeyPress)this.iconKeyPress(_3,_4,this.form,this,_2);
if((this.iconClickOnEnter&&_3==this.$10j)||
(this.iconClickOnSpace&&_3==this.$304))
{
if(this.$116(_2)==false)return false}
}
}
,isc.A.$17y=function isc_FormItem__handleErrorIconMouseOver(){
if(!this.shouldUpdateHoverInPlace())isc.Hover.clear();
isc.Hover.setAction(this,this.$79v,null,this.$17v())}
,isc.A.$171=function isc_FormItem__handleErrorIconMouseOut(){
if(!this.shouldUpdateHoverInPlace())isc.Hover.clear();
isc.Hover.setAction(this,this.$wb,null,this.$17v())}
,isc.A.$238o=function isc_FormItem__handleErrorIconClick(){
if(isc.Browser.isTouch){
this.$79v()}
}
,isc.A.$79v=function isc_FormItem__handleErrorIconHover(){
if(this.canHover==false)return;
if(this.itemHover&&this.itemHover(this,this.form)==false)return false;
if(this.shouldShowErrorIconInline())this.getErrorIconHTML(this.getErrors());
var _1=this.shouldShowErrorIconPrompt()
?isc.FormItem.getErrorPromptString(this.$79u)
:isc.emptyString;
if(!this.shouldUpdateHoverInPlace())isc.Hover.clear();
if(_1&&!isc.is.emptyString(_1))
isc.Hover.showForTargetMouseOver(_1,this.form.$1845(this));
else isc.Hover.setAction(this,this.$wb,null,this.$17v())}
,isc.A.shouldShowOldValueInHover=function isc_FormItem_shouldShowOldValueInHover(){
var _1=false;
if(this.showOldValueInHover!=null){
_1=this.showOldValueInHover}else if(this.form&&this.form.showOldValueInHover!=null){
_1=this.form.showOldValueInHover}else{
_1=this.$161p()}
return _1}
,isc.A.$wb=function isc_FormItem__handleHover(){
if(this.canHover==false)return;
var _1=this.form,
_2=this.$170g("itemHover");
if(_2!=null&&
this.fireCallback(_2,null,[_2.target,_1])==false)
{
return false}
var _3=this.shouldShowOldValueInHover();
if(this.disabledHover&&this.renderAsDisabled())_3=false;
var _4;
if(_3){
if(this.originalValueMessage!=null)_4=this.originalValueMessage;
else if(_1.originalValueMessage!=null)_4=_1.originalValueMessage}
var _5=this;
while(_5.parentItem!=null)_5=_5.parentItem;
var _6,
_7,
_8=this.$170g("itemHoverHTML");
if(_8!=null){
_6=this.fireCallback(_8,null,[_8.target,_1])}else if((_3&&_4!=null&&_5.valueHasChanged())
||(_5.showClippedValueOnHover&&_5.valueClipped())){
_7="";
if(_5.showClippedValueOnHover&&_5.valueClipped()){
_7+=_5.form.valueHoverHTML(_5,_5.form);
_7+="<p style='margin-bottom: 0px;'>"}
if(_3&&_4!=null&&_5.valueHasChanged())
_7+=_4;
_6=_7.replace(/(\$?)\$(value|newValue)/g,function(_10,_11,_12,_13,_7){
if(_11==="$")return"$"+_12;
else if(_12==="value"){
var _9=_5.$1605(_5.$160w());
return _9==""?_5.nullOriginalValueText:_9}else if(_12==="newValue"){
var _9=_5.$1605(_5._value);
return _9==""?_5.nullOriginalValueText:_9}
})}else if(_1.itemHoverHTML===isc.DynamicForm.$1145){
_6=isc.DynamicForm.$1145(this)}else{
var _5=this;
while(_5.parentItem!=null)_5=_5.parentItem;
_6=_1.itemHoverHTML(_5,_1)}
if(_6&&_6.length>0){
this.form.$119(this,_6)}
}
,isc.A.$17x=function isc_FormItem__handleTitleHover(_1){
if(this.canHover==false)return;
if(this.titleHover&&this.titleHover(this,this.form)==false)return false;
var _2;
if(this.titleHoverHTML)_2=this.titleHoverHTML(this,this.form);
else _2=this.form.titleHoverHTML(this,this.form);
this.form.$119(this,_2)}
,isc.A.$1149=function isc_FormItem__handleTextBoxHover(){
if(this.canHover==false)return;
var _1=isc.EH.lastEvent.itemInfo,
_2=this.getIcon(_1&&_1.overIcon);
if(_2&&_2==this.$17z&&_2.inline){
var _3=this.getIconPrompt(_2);
if(_3&&!isc.is.emptyString(_3)){
return this.$170()}
}
var _4=this.$170g("valueHover");
if((this.$170g("itemHoverHTML")!=null||
this.form.itemHoverHTML!==isc.DynamicForm.$1145)&&
_4==null&&
this.form.valueHoverHTML===isc.DynamicForm.$1146)
{
return this.$wb()}
if(this.showClippedValueOnHover||this.shouldShowOldValueInHover()){
return this.$wb()}
if(_4!=null&&
this.fireCallback(_4,null,[_4.target,this.form])==false)
{
return false}
if(this.showClippedValueOnHover==false){
return}
var _5,
_6=this.$170g("valueHoverHTML");
if(_6!=null){
_5=this.fireCallback(_6,null,[_6.target,this.form])}else{
var _7=this;
while(_7.parentItem!=null)_7=_7.parentItem;
_5=this.form.valueHoverHTML(_7,this.form)}
this.form.$119(this,_5)}
,isc.A.$170=function isc_FormItem__handleIconHover(){
if(this.canHover==false)return;
if(this.itemHover&&this.itemHover(this,this.form)==false){
return false}
var _1=this.$17z,
_2=_1&&this.getIconPrompt(_1);
if(!this.shouldUpdateHoverInPlace())isc.Hover.clear();
if(_2&&!isc.is.emptyString(_2)){
isc.Hover.showForTargetMouseOver(_2,this.form.$1845(this))}
else isc.Hover.setAction(this,this.$wb,null,this.$17v())}
,isc.A.getHoverComponent=function isc_FormItem_getHoverComponent(){
}
,isc.A.getGlobalTabIndex=function isc_FormItem_getGlobalTabIndex(){
if(this.form&&this.form.$167w){
return-1}
if(this.globalTabIndex==null){
if(this.tabIndex==-1)this.globalTabIndex=-1;
else{
return isc.TabIndexManager.getTabIndex(this.ID)}
}
return this.globalTabIndex}
,isc.A.getTabIndex=function isc_FormItem_getTabIndex(){
if(this.tabIndex!=null)return this.tabIndex;
if(this.globalTabIndex||!this.$kk())return null;
if(this.$10p==null){
return null}
return this.$10p}
,isc.A.setGlobalTabIndex=function isc_FormItem_setGlobalTabIndex(_1){
this.globalTabIndex=_1;
this.$173(_1)}
,isc.A.setTabIndex=function isc_FormItem_setTabIndex(_1){
if(this.tabIndex==_1)return;
this.globalTabIndex=null;
this.tabIndex=_1;
if(_1!=-1&&this.form&&!this.form.addingItems){
this.form.assignItemsTabPosition()}
this.$173(this.getGlobalTabIndex())}
,isc.A.$154=function isc_FormItem__getElementTabIndex(_1){
if(this.isInactiveHTML()||
(!_1&&this.renderAsDisabled()))
{
return-1}
return this.getGlobalTabIndex()}
,isc.A.$173=function isc_FormItem__setElementTabIndex(_1,_2){
if(!this.$kk()||!this.isDrawn())return;
if(this.getFocusElement()!=null){
isc.FormItem.setElementTabIndex(this.getFocusElement(),_1);
if(!_2)this.$175()}else{
this.redraw("set tab index")}
}
,isc.A.$16p=function isc_FormItem__getIconTabIndex(_1){
if(_1.tabIndex==-1||this.iconIsDisabled(_1)||(this.form&&this.form.$167w))return-1;
if(this.globalTabIndex!=null){
return this.$154(true)}
return isc.TabIndexManager.getTabIndex(this.getTabIndexIdentifierForIcon(_1))}
,isc.A.$175=function isc_FormItem__updateIconTabIndices(){
var _1=[];
if(this.$185k())_1.add(this.getPickerIcon());
_1.addList(this.icons);
for(var i=0;i<_1.length;i++){
var _3=_1[i];
if(!_3||_3.imgOnly)continue;
var _4=this.$16g(_3)||this.$16v();
if(_4!=null){
isc.FormItem.setElementTabIndex(_4,this.$16p(_3))}
}
}
,isc.A.setDisabled=function isc_FormItem_setDisabled(_1){
var _2=this.isDisabled();
this.disabled=_1;
var _3=this.isDisabled();
if(_2!=_3)this.updateDisabled()}
,isc.A.setShowDisabled=function isc_FormItem_setShowDisabled(_1){
this.showDisabled=_1;
this.updateDisabled()}
,isc.A.updateDisabled=function isc_FormItem_updateDisabled(){
var _1=this.isDisabled();
this.$176(!_1);
this.$177();
this.$17j(this.getValue());
if(this.showDisabled)this.updateState()}
,isc.A.setEnabled=function isc_FormItem_setEnabled(_1){
return this.setDisabled(!_1)}
,isc.A.isDisabled=function isc_FormItem_isDisabled(){
if(this.form==null)return this.disabled;
var _1=this.disabled;
if(!_1){
if(this.parentItem!=null)_1=this.parentItem.isDisabled();
else{
_1=this.form.isDisabled();
if(!_1&&this.containerWidget!=this.form)_1=this.containerWidget.isDisabled()}
}
return _1}
,isc.A.enable=function isc_FormItem_enable(){
this.setDisabled(false)}
,isc.A.disable=function isc_FormItem_disable(){
this.setDisabled(true)}
,isc.A.$176=function isc_FormItem__setElementEnabled(_1){
if(this.hasDataElement()){
var _2=this.getDataElement();
if(_2){
_2.disabled=!_1;
_2.tabIndex=this.$154();
if(this.useDisabledEventMask()&&!this.renderDisabledEventMask()){
var _3=this.$43b();
if(_3&&(!_3.getAttribute||
_3.getAttribute("isDisabledEventMask")!="true"))
{
_3=null}
if(_1&&_3){
isc.Element.clear(_3)}else if(!_1&&!_3){
isc.Element.insertAdjacentHTML(_2,"beforeBegin",this.$148())}
}
}
}else if(this.$kk()){
var _2=this.getFocusElement();
if(_2)_2.tabIndex=this.$154()}
}
,isc.A.$177=function isc_FormItem__setIconsEnabled(){
if(this.showPickerIcon){
var _1=this.getPickerIcon();
this.setIconEnabled(_1)}
if(!this.icons||this.icons.length<1)return;
for(var i=0;i<this.icons.length;i++){
this.setIconEnabled(this.icons[i])}
}
,isc.A.iconIsDisabled=function isc_FormItem_iconIsDisabled(_1){
_1=this.getIcon(_1);
if(!_1)return;
if(this.containerWidget&&this.containerWidget.isDisabled())return true;
if(_1.neverDisable)return false;
if(this.isDisabled()||_1.disabled)return true;
var _2=_1.disableOnReadOnly;
if(_2==null){
_2=this.disableIconsOnReadOnly}
if(_2)return this.isReadOnly();
return false}
,isc.A.$kk=function isc_FormItem__canFocus(){
if(this.canFocus!=null)return this.canFocus;
return this.hasDataElement()}
,isc.A.$872=function isc_FormItem__canFocusInTextBox(){
return this.$kk()&&
!this.renderAsStatic()
}
,isc.A.getCanFocus=function isc_FormItem_getCanFocus(){
return this.$kk()}
,isc.A.$884=function isc_FormItem__shouldSelectOnFocus(){
if(this.$1621){
return false}
var _1=this.selectOnFocus;
if(_1==null&&this.form)_1=this.form.selectOnFocus;
if(_1){
var _2=isc.EH.isMouseEvent()&&
(this.containerWidget.contains(isc.EH.lastEvent.target,true));
if(_2)_1=false}
return _1}
,isc.A.$1730=function isc_FormItem__shouldSelectOnClick(){
var _1=this.selectOnClick;
if(_1==null&&this.form)_1=this.form.selectOnClick;
return _1}
,isc.A.focusAtEnd=function isc_FormItem_focusAtEnd(_1){
return isc.TabIndexManager.shiftFocusWithinGroup(this.getID(),null,_1)}
,isc.A.focusInItem=function isc_FormItem_focusInItem(){
var _1=this.isVisible()&&this.$kk()&&!this.renderAsDisabled(),
_2=_1?this.getFocusElement():null;
if(_1&&_2==null){
if(_1&&this.isVisible()&&!this.isDrawn()&&
this.containerWidget&&this.containerWidget.isDrawn()&&this.containerWidget.isDirty())
{
this.containerWidget.redraw();
_2=this.getFocusElement()}
}
if(!_1||!_2){
return}
var _3=this.$93l;
var _4=this.form;
if(isc.EH.$223w(_4,this,this.getFocusElement(),null,true)&&!_4.$1196){
var _5=isc.EH.clickMaskRegistry.last();
isc.EH.setMaskedFocusCanvas(_4,_5);
_4.setFocusItem(this);
return}
if(this.hasFocus){
this.logDebug("focusInItem() not calling element.focus() as element already has native focus","nativeFocus")}
var _6=this.ns.EH,
_7=_6.mouseDownEvent&&_6.mouseDownEvent.DOMevent;
if(_7!=null&&_6.$129k()&&_6.$145u(_2)){
var _8=(_7.target&&
(_7.target.nodeType==1?_7.target
:_7.target.parentElement));
if(_8!=null&&_2.contains(_8)){
return}
}
if(_2.focus){
var _9=false;
if(this.$100a()){
try{
document.selection.clear()}catch(e){
this.logInfo("Internet explorer error calling document.selection.clear()."
+e.message)}
this.logDebug("focusInItem(): Internet Explorer selection is currently wedged due to a native bug tripped by synchronous focus manipulation and redraw. Explicitly clearing selection before resetting native focus.",
"nativeFocus")}else if(isc.Browser.isIE&&_2==this.getActiveElement()){
_9=true}
if(!_9){
this.logInfo("about to call element.focus() "+isc.EH.$lb()+
(this.logIsDebugEnabled("traceFocus")?this.getStackTrace():""),
"nativeFocus");
isc.EH.$h2();
_2=this.getFocusElement();
if(_2&&_2.focus){
isc.FormItem.$12n(this);
isc.EventHandler.$lg=this;
_2.focus()}else{
}
}else{
this.logInfo("element already focused, not focus()ing","nativeFocus")}
if(isc.Browser.isIE&&isc.EH.synchronousFocusNotifications){
isc.EH.$vm=this;
this.$167=_2}
}else{
this.logInfo("can't call element focus, no element","nativeFocus")}
var _10=this.$884();
if(_3){
this.resetToLastSelection(true)}else if(_10&&_2.select){
_2.select()}
}
,isc.A.blurItemWithoutHandler=function isc_FormItem_blurItemWithoutHandler(){
if(!this.hasFocus)return;
this.form.$2142(this);
this.blurItem()}
,isc.A.blurItem=function isc_FormItem_blurItem(_1){
if(!this.isVisible()||!(this.hasFocus||isc.EH.$vm==this))return;
var _2=this.$166();
if(_2&&_2.blur){
this.logInfo("about to call element blur"+isc.EH.$lb()+
(this.logIsDebugEnabled("traceBlur")?this.getStackTrace():""),
"nativeFocus");
isc.EH.$ld=this;
if(isc.Browser.isIE){
try{
_2.blur()}catch(e){
}
}else{
_2.blur()}
}else{
this.logInfo("can't call element blur, no element","nativeFocus")}
}
,isc.A.focusInIcon=function isc_FormItem_focusInIcon(_1){
_1=this.getIcon(_1);
if(_1==null||_1.imgOnly)return false;
var _2=this.$16g(_1);
if(_2!=null){
this.logDebug("focusInIcon() about to call native focus()","nativeFocus");
_2.focus();
return true}
return false}
,isc.A.blurIcon=function isc_FormItem_blurIcon(_1){
if(isc.isA.String(_1))_1=this.getIcon(_1);
if(_1==null||!this.icons||!this.icons.contains(_1)||_1.imgOnly)return;
var _2=this.$16g(_1);
if(_2!=null){
this.logDebug("blurIcon() about to call native blur()","nativeFocus");
_2.blur()}
}
,isc.A.isFocused=function isc_FormItem_isFocused(){
return this.hasFocus}
,isc.A.$12v=function isc_FormItem__nativeElementFocus(_1,_2){
if(this.$93l)delete this.$93l;
if(isc.EH.$lg==this)delete isc.EH.$lg
isc.EH.$la(this,true);
if(isc.Browser.isMoz&&!this.isVisible()){
this.logWarn("calling element.blur() to correct focus in hidden item: "+this,
"nativeFocus");
_1.blur();
return}
this.hasFocus=true;
this.$167=_1;
var _3=this.form.elementFocus(_1,_2);
return _3}
,isc.A.$188n=function isc_FormItem__handleAsyncFocusNotification(){
if(this.$188o){
delete this.$188o;
this.containerWidget.notifyAncestorsReflowComplete()}
}
,isc.A.$12x=function isc_FormItem__nativeElementBlur(_1,_2){
if(isc.EH.$ld==this)delete isc.EH.$ld
if(this.$17i!=null){
isc.Timer.clearTimeout(this.$17i);
this.$14r()}
isc.EH.$la(this);
this.hasFocus=false;
delete this.$167;
var _3=this.form.elementBlur(_1,_2);
return _3}
,isc.A.elementFocus=function isc_FormItem_elementFocus(_1){
if(this.prompt)this.form.showPrompt(this.prompt);
if(!_1)this.$1809(true);
if(this.formatOnBlur){
var _2=this.getDisplayValue();
this.$952(_2,this._value)}
if(this.showFocused)this.updateState();
if(this.showValueIconFocused&&this.showValueIconFocusedAsOver&&this.showValueIconOver&&this.$15t==null){
this.$15t=this.$13u;
this.$17j(this.getValue())}else if(this.showValueIconFocused&&this.showValueIconFocusedAsOver!=true){
this.$15t=this.$258q;
this.$17j(this.getValue())}
if(_1)return;
if((this.grid&&this.grid.blockOnFieldBusy(this))
||(!this.grid&&this.form.blockOnFieldBusy(this)))
{
return false}
this.handleEditorEnter()
if(this.focus){
this.convertToMethod("focus");
return this.focus(this.form,this)}
return true}
,isc.A.$181e=function isc_FormItem__updateIconForFocus(_1,_2){
if(this.$54o(_1,true)){
if(_1.inline&&this.$156r()&&_1.text!=null){
var _3=this.$16g(_1);
if(_3!=null){
var _4=this.getIconStyle(_1,false,null,_2);
if(_4!=null)_3.className=_4}
return}
var _5=this.$16v(_1);
if(_5!=null){
isc.Canvas.$wg(_5,this.getIconURL(_1,false,null,_2));
var _4=this.getIconStyle(_1,false,null,_2);
if(_4!=null)_5.className=_4}
}
}
);
isc.evalBoundary;isc.B.push(isc.A.elementBlur=function isc_FormItem_elementBlur(){
if(this.prompt)this.form.clearPrompt();
if(this.formatOnBlur){
var _1=this.getDisplayValue();
this.$952(_1,this._value)}
if(this.showFocused){
this.updateState()}
if(this.$15t==this.$13u||this.$15t==this.$258q){
this.$15t=null
this.$17j(this.getValue())}
this.acceptCompletion();
this.checkForEditorExit();
if(this.blur){
this.convertToMethod("blur");
return this.blur(this.form,this)}
return true}
,isc.A.checkForEditorExit=function isc_FormItem_checkForEditorExit(_1,_2){
if(!_1){
isc.FormItem.$92t=this;
this.$92u=this.delayCall("checkForEditorExit",[true]);
return}
if(_2&&this.$92u!=null){
isc.Timer.clearTimeout(this.$92u)}
this.$92u=null;
if(isc.FormItem.$92t==this){
isc.FormItem.$92t=null}
var _3=false;
var _4=this.getActiveElement();
if(_4!=null){
var _5=isc.DynamicForm._getItemInfoFromElement(_4);
if(_5!=null){
var _6=_5.item;
while(_6){
if(_6==this)return;
if(_6.parentItem==null){
_3=(_6.form==this.form)}
_6=_6.parentItem}
}
}
if(this.form.hasFocus&&!_3){
isc.EH.blurFocusCanvas(this.form,false)}
this.handleEditorExit()}
,isc.A.focusAfterItem=function isc_FormItem_focusAfterItem(_1){
isc.TabIndexManager.shiftFocusAfterGroup(this.getID(),_1)}
,isc.A.$184c=function isc_FormItem__getCurrentFocusTargetID(){
var _1=this.getFocusIconIndex(true),
_2;
if(_1!=null){
if(this.$150!=null){
if(_1==0)_2=this.$150;
else _1--}
if(_2==null)_2=this.icons[_1]}
if(_2!=null)return this.getTabIndexIdentifierForIcon(_2);
return this.getID()}
,isc.A.$kf=function isc_FormItem__focusInNextTabElement(_1){
return this.$180q(_1,false)}
,isc.A.$180q=function isc_FormItem___focusInNextTabElement(_1,_2){
var _3=this.$184c()||this.getID();
var _4;
if(_2){
_4=isc.TabIndexManager.shiftFocusWithinGroup(this.getID(),_3,_1)}else{
_4=isc.TabIndexManager.shiftFocus(_3,_1)}
return _4}
,isc.A.autoTabIndexUpdated=function isc_FormItem_autoTabIndexUpdated(_1){
if(this.form!=null){
this.form.itemAutoTabIndexUpdated(_1)}
}
,isc.A.syntheticShiftFocus=function isc_FormItem_syntheticShiftFocus(_1){
if(!this.isValidTabStop())return false;
this.focusInItem();
return true}
,isc.A.isValidTabStop=function isc_FormItem_isValidTabStop(_1){
if(!this.isDrawn()||!this.isVisible()||this.renderAsDisabled()||!this.$kk()||
(!_1&&!this.$872())||
this.getTabIndex()==-1)
{
return false}
var _2=this.form.$1096();
if(_2!=null&&isc.EH.$223w(this.form,this,null,_2))return false;
return true}
,isc.A.pickerIconSyntheticShiftFocus=function isc_FormItem_pickerIconSyntheticShiftFocus(){
if(!this.isValidTabStop(true))return false;
var _1=this.$150,
_2=(this.canTabToIcons==null&&this.form!=null)
?this.form.canTabToIcons:this.canTabToIcons;
if(_2!=false&&
_1&&_1.visible&&!_1.imgOnly&&
_1.tabIndex!=-1)
{
this.logInfo("Moving to picker icon","syntheticTabIndex");
return this.focusInIcon(_1)}
return false}
,isc.A.iconSyntheticShiftFocus=function isc_FormItem_iconSyntheticShiftFocus(_1){
if(!this.isValidTabStop(true))return false;
var _2,
_3=(this.canTabToIcons==null&&this.form!=null)
?this.form.canTabToIcons:this.canTabToIcons;
if(_3!=false&&this.showIcons&&this.icons!=null){
var _4=this.getIconFromTabIndexIdentifier(_1),
_2=_4?this.getIcon(_4):null;
if(_2&&_2.visible&&!_2.imgOnly&&
_2.tabIndex!=-1)
{
this.logInfo("Moving to icon:"+this.echo(_2),"syntheticTabIndex");
return this.focusInIcon(_2)}
}
if(_2==null){
this.logInfo("Synthetic ShiftFocus failed to find target icon matching ID:"
+_1,"syntheticTabIndex")}
return false}
,isc.A.$11s=function isc_FormItem__moveFocusWithinItem(_1){
return this.$180q(_1,true)}
,isc.A.getFocusIconIndex=function isc_FormItem_getFocusIconIndex(_1){
var _2=this.$166();
var _3;
if(_1&&this.$150!=null){
_3=[this.$150];
_3.addList(this.icons)}else{
_3=this.icons}
if(_2==null||_3==null||_3.length==0)return null;
for(var i=0;i<_3.length;i++){
if(this.$16g(_3[i])==_2)return i}
return null}
,isc.A.$kr=function isc_FormItem__allowNativeTextSelection(_1,_2){
if(_2.overTitle)return;
if(_2.overIcon){
return true}
if(_1==null)_1=isc.EH.lastEvent;
if(_1.nativeTarget&&(_1.nativeTarget.tagName&&
_1.nativeTarget.tagName.toLowerCase()==this.$54n))
return false;
if(this.canSelectText==false)return false;
if(this.getCanEdit()==false){
var _3=this.readOnlyCanSelectText;
if(!_3)return false;
if(_3===true){
_3=["static","readOnly"]}
return _3.contains(this.getReadOnlyDisplay())}
return true}
,isc.A.$188y=function isc_FormItem__allowNativeDrag(_1,_2){
if(_2.overIcon){
return false}
return this.$kr(_1,_2)}
,isc.A.handleEditorExit=function isc_FormItem_handleEditorExit(){
if(!this.form)return;
if(!this.$178)return;
this.$178=null;
if(!this.$16j(true)){
this.$1809(false)}
var _1=this.getValue();
if(!this.$843)this.$844(_1);
if(!this.form.implicitSaveInProgress&&this.getImplicitSaveOnBlur()){
this.form.performImplicitSave(this,false)}
if(this.shouldDisallowEditorExit()){
this.focusInItem();
return}
if(this.editorExit)this.editorExit(this.form,this,_1)}
,isc.A.getImplicitSave=function isc_FormItem_getImplicitSave(){
if(this.form==null)return false;
return!!(this.implicitSave!=null?this.implicitSave:this.form.implicitSave)}
,isc.A.getImplicitSaveOnBlur=function isc_FormItem_getImplicitSaveOnBlur(){
if(this.form==null)return false;
return!!(this.implicitSaveOnBlur!=null?
this.implicitSaveOnBlur:this.form.implicitSaveOnBlur)}
,isc.A.$844=function isc_FormItem__performValidateOnEditorExit(_1){
if(this.form==null)return;
var _2=this.alwaysValidateOnExit||
((this.validateOnExit||this.form.validateOnExit)&&
(this.$84r||
(this.form.getSaveOperationType&&this.form.getSaveOperationType()!="update")
||!this.compareValues(_1,this.$75h)
)
);
if(_2){
this.validate(null,{exiting:true});
this.$84r=null;
this.$75h=null}
var _3=this.form.rulesEngine;
if(_3!=null){
_3.processEditorExit(this.form,this)}
}
,isc.A.handleEditorEnter=function isc_FormItem_handleEditorEnter(){
if(isc.FormItem.$92t!=null){
isc.FormItem.$92t.checkForEditorExit(true,true)}
if(this.$178)return;
this.$178=true;
var _1=this.getValue();
if(this.validateOnExit||this.form.validateOnExit)this.$75h=_1;
if(this.editorEnter)this.editorEnter(this.form,this,_1);
if(this.form.rulesEngine!=null){
this.form.rulesEngine.processEditorEnter(this.form,this)}
}
,isc.A.$179=function isc_FormItem__setupFocusCheck(){
var _1=this;
this.$18a=isc.Page.setEvent(
isc.EH.MOUSE_UP,function(){
if(!_1.destroyed)_1.$18b()})}
,isc.A.$18b=function isc_FormItem__checkNativeFocus(){
isc.Page.clearEvent(isc.EH.MOUSE_UP,this.$18a);
delete this.$18a;
if(this.getActiveElement()==document.body){
this.focusInItem()
}
}
,isc.A.$1550=function isc_FormItem__manageCharacterInput(){
return!!this.mask}
,isc.A.getIsMultiLineEditor=function isc_FormItem_getIsMultiLineEditor(){
return!!this.isMultiLineEditor}
,isc.A.getHasInternalNavigation=function isc_FormItem_getHasInternalNavigation(){
return!!this.hasInternalNavigation}
,isc.A.$429=function isc_FormItem__willHandleInput(){
return false}
,isc.A._handleInput=function isc_FormItem__handleInput(){
isc.EH.$h1("INP");
this.$2102=true;
this.$105w();
this.$2102=false;
isc.EH.$h2()}
,isc.A.$105w=function isc_FormItem___handleInput(){
if(!this.$1550()){
if(this.$1853){
this.logDebug("Native input event from cut","cutpaste");
this.$1854=true}
delete this.$1853;
if(this.$1855){
this.logDebug("Native input event from paste","cutpaste");
this.$1856=true}
delete this.$1855;
if(this.$1856){
this.fireTransformPaste()
}
if(this.changeOnKeypress){
if(isc.Log.supportsOnError){
this.updateValue(true)}else{
try{
this.updateValue(true)}catch(e){
isc.Log.$am(e);
if(isc.Log.rethrowErrors){
throw e;}
}
}
}else{
var _1=this.getElementValue();
this.$122m(_1)}
delete this.$1856;
delete this.$1854}
}
,isc.A.fireTransformPaste=function isc_FormItem_fireTransformPaste(){
if(!this.transformPastedValue)return;
var _1=this.$186u();
if(_1==null)return;
var _2=this.getElementValue()||"";
var _3=this.getSelectionRange()[0];
var _4=this.$187h,
_5=this.supportsMultilineEntry;
if(_4==null||_4==-1||_3<=_4){
this.logWarn("Paste event occurred, but unable to determine pasted text position in element value. Skipping transformPastedValue()",
"cutpaste");
return}
if(!_5){
var _6=_1.indexOf("\r"),
_7=_1.indexOf("\n"),
_8=_6>=0?Math.min(_6,_7):_7;
if(_8>=0){
this.logDebug("Multi-line paste into single-line item detected.","cutpaste")}
}
var _9=this.transformPastedValue(this,this.form,_1);
if(_9!=null&&_9!=_1){
if(!_5&&
(_9.contains("\n")||_9.contains("\r")))
{
this.logWarn("transformPastedValue() returned multi-line value. This is not supported for this item type. Value may be natively truncated or modified.",
"cutpaste")}
var _10=_2.substring(_3);
this.setElementValue(_2.substring(0,_4)
+_9+_10);
var _11=this.getElementValue(),
_12=_11.lastIndexOf(_10);
if(_12!=-1){
this.setSelectionRange(_12,_12)}
}
}
,isc.A.$186u=function isc_FormItem__getPastedValue(){
return this.$186v
}
,isc.A.$122m=function isc_FormItem__minimalUpdateValue(_1){
if(this.mask)return;
var _2=this.$149z;
if(_2==null)_2=this._value;
var _3=this.$1490(_1,_2);
if(_3!=_1){
this.setElementValue(_3);
if(_3==_2)this.$17t()}
this.$149z=_3}
,isc.A.$1162=function isc_FormItem__handleSelect(){
isc.EH.$h1("SEL");
this.$1160();
isc.EH.$h2()}
,isc.A.$43a=function isc_FormItem__nativeCutPaste(_1,_2,_3,_4){
this.logDebug("Native "+(_3?"oncut":"onpaste")+" event received","cutpaste");
if(!_3){
var _5=_4?
_4.clipboardData||window.clipboardData
:window.clipboardData;
if(_5&&_5.getData){
this.$186v=_5.getData(isc.Browser.isIE?'Text':'text/plain');
this.logDebug("Native Paste event - got pasted value from clipboard data:"
+this.$186v,"cutpaste");
var _6=this.getSelectionRange();
if(_6!=null){
this.$187h=_6[0]}
}
}
if(!this.$429()){
if(this.changeOnKeypress){
this.$18c(_3,!_3)}else{
this.$1491(_3,!_3)}
}else{
if(_3){
this.$1853=true}else{
this.$1855=true}
}
}
,isc.A.isCutEvent=function isc_FormItem_isCutEvent(){
return(!!this.$1854)}
,isc.A.isPasteEvent=function isc_FormItem_isPasteEvent(){
return(!!this.$1856)}
,isc.A.handleKeyPress=function isc_FormItem_handleKeyPress(_1,_2){
if(!this.form)return;
var _3=this.form.$ne(_1),
_4=_1.keyName;
if(_3.overIcon){
if(this.$172(_3.overIcon)==false)return false}else{
if(this.shouldDisallowEditorExit()&&
this.$228c&&this.$228c.contains(_4))
{
return false}
if(!this.$429()){
if(this.changeOnKeypress){
this.$18c()}else{
this.$1491()}
}else{
this.rememberSelectionForUpdate()}
if(this.hideIconsOnKeypress&&_4!=this.$jf){
this.$185q()}
}
var _5=_1.characterValue;
var _6=this.$18d(this,this.form,_4,_5);
if(_6!==false&&this.shouldStopKeyPressBubbling(_4,_5)){
_6=isc.EH.STOP_BUBBLING}
return _6}
,isc.A.shouldStopKeyPressBubbling=function isc_FormItem_shouldStopKeyPressBubbling(_1,_2){
if(_1=="Tab")return true;
var _3=[this.$20w,this.$10j];
if(this.stopCharacterKeyPressBubbling&&!this.isReadOnly()&&
!isc.EH.ctrlKeyDown()&&!isc.EH.altKeyDown()&&
(this.$145b[_1]||
(_2!=null&&_2!=0&&(!_3.contains(_1)))
))
{
return true}
if(this.stopNavKeyPressBubbling&&!isc.EH.altKeyDown()){
if(this.$145c[_1]){
if(!this.$173y()){
return true}
var _4=this.$2197||this.getSelectionRange();
if(_4){
if(_4[0]==0&&_4[1]==0){
return false}
return true}
}
if(this.$145d[_1]){
if(!this.$173y())return true;
var _4=this.$2197||this.getSelectionRange();
if(_4){
var _5=this.getElementValue().length;
if(_4[0]==_5&&_4[1]==_5)return false;
return true}
}
}
}
,isc.A.$18d=function isc_FormItem__fireKeyPressHandlers(_1,_2,_3,_4){
if(this.keyPress!=null&&this.keyPress(_1,_2,_3,_4)==false){
return false}
if(!this.form)return false;
if(this.$86z!=null
&&this.$86z(_1,_2,_3,_4)==false)
{
return false}
if(this.parentItem==null){
return this.form.handleItemKeyPress(_1,_3,_4)}
}
,isc.A.$18c=function isc_FormItem__queueForUpdate(_1,_2){
if(this.$17i!=null){
isc.Timer.clearTimeout(this.$17i);
this.$14r()}
this.rememberSelectionForUpdate();
if(_1)this.$1853=true;
if(_2)this.$1855=true;
this.$17i=this.delayCall("$14r",[],0)}
,isc.A.rememberSelectionForUpdate=function isc_FormItem_rememberSelectionForUpdate(){
if(this.maintainSelectionOnTransform&&
(this.$17h()!=this.$14l))
{
this.$18e()}
}
,isc.A.$14r=function isc_FormItem__delayedUpdate(){
if(this.$1853)this.$1854=true;
delete this.$1853;
if(this.$1855)this.$1856=true;
delete this.$1855;
if(this.$1856){
this.fireTransformPaste()
}
this.updateValue(true);
this.$18f();
delete this.$1856;
delete this.$1854}
,isc.A.$1491=function isc_FormItem__queueForMinimalUpdate(_1,_2){
if(this.$17i!=null){
isc.Timer.clearTimeout(this.$17i);
this.$14r(_1,_2)}
if(!this.$1492){
this.rememberSelectionForUpdate();
this.$1492=
isc.Timer.setTimeout({target:this,methodName:this.$1598},
0)}
if(_1)this.$1853=true;
if(_2)this.$1855=true}
,isc.A.$149y=function isc_FormItem__delayedMinimalUpdate(){
delete this.$1492;
if(this.$1853)this.$1854=true;
delete this.$1853;
if(this.$1855)this.$1856=true;
delete this.$1855;
if(this.$1856){
this.fireTransformPaste()
}
this.$122m(this.getElementValue());
this.$18f();
delete this.$1856;
delete this.$1854}
,isc.A.$18e=function isc_FormItem__rememberPreChangeSelection(){
if(!this.$173y())return;
var _1=this.getSelectionRange(true);
if(_1){
this.$18g=_1[0];
this.$18h=_1[1]}
}
,isc.A.$17t=function isc_FormItem__revertToPreChangeSelection(){
if(this.$18g==null)return;
if(this.$173y()){
this.setSelectionRange(this.$18g,this.$18h)}
}
,isc.A.$18f=function isc_FormItem__clearPreChangeSelection(){
delete this.$18g;
delete this.$18h}
,isc.A.handleKeyDown=function isc_FormItem_handleKeyDown(_1,_2){
var _3=_1.keyName,
_4=this.$170p.contains(_3);
if(this.dirtyOnKeyDown&&!_4){
this.$18i()}else{
}
this.$2197=this.getSelectionRange();
var _5=this,
_6=this.form;
if(this.keyDown!=null&&this.keyDown(_5,_6,_3)==false)return false
}
,isc.A.$10v=function isc_FormItem__itemValueIsDirty(){
return this.$18j==true}
,isc.A.$18i=function isc_FormItem__markValueAsDirty(){
this.$18j=true}
,isc.A.$10x=function isc_FormItem__markValueAsNotDirty(){
this.$18j=false}
,isc.A.handleKeyUp=function isc_FormItem_handleKeyUp(_1,_2){
if(!this.form)return;
var _3=this,
_4=this.form,
_5=_1.keyName;
if(this.keyUp!=null&&this.keyUp(_3,_4,_5)==false)return false}
,isc.A.getSerializeableFields=function isc_FormItem_getSerializeableFields(_1,_2){
_1=_1||[];
_1.addList(["form"]);
return this.Super("getSerializeableFields",[_1,_2],arguments)}
,isc.A.getLeft=function isc_FormItem_getLeft(){
var _1=this.isDrawn()?this.getOuterElement():null;
if(_1==null){
var _2="getLeft() Unable to determine position for "+
(this.name==null?"this item ":this.name)+". ";
if(this.isDrawn()){
_2+="This method is not supported by items of type "+this.getClass()}else{
_2+="Position cannot be determined before the element is drawn"
}
_2+=" - returning zero.";
this.form.logWarn(_2);
return 0}
return this.$18k(_1)}
,isc.A.getTitleLeft=function isc_FormItem_getTitleLeft(){
var _1=this.isDrawn()&&this.form
?isc.Element.get(this.form.$427(this))
:null;
if(_1==null){
if(!this.showTitle){
this.logInfo("getTitleLeft() invoked on an item with showTitle set to false. Returning zero")}else{
var _2="getTitleLeft() Unable to determine position for "+
(this.name==null?"this item ":this.name)+". ";
if(this.isDrawn()){
_2+="This method is not supported by items of type "+this.getClass()}else{
_2+="Position cannot be determined before the element is drawn"
}
_2+=" - returning zero.";
this.form.logWarn(_2)}
return 0}
return this.$18k(_1)}
,isc.A.$18k=function isc_FormItem__getElementLeft(_1){
var _2=_1.offsetParent,
_3=this.containerWidget.getClipHandle(),
_4=_3.offsetParent,
_5=isc.Element.getOffsetLeft(_1);
while(_2&&_2!=_3&&_2!=_4){
_5+=isc.Element.getOffsetLeft(_2)
_5-=(_2.scrollLeft||0);
var _6=parseInt(isc.Element.getComputedStyleAttribute(_2,"borderLeftWidth"));
if(isc.isA.Number(_6))_5+=_6;
var _7=parseInt(isc.Element.getComputedStyleAttribute(_2,"marginLeft"));
if(isc.isA.Number(_7))_5+=_7;
_2=_2.offsetParent}
if(_2==_4){
_5-=isc.Element.getOffsetLeft(_3)
}
return _5}
,isc.A.$145=function isc_FormItem__isValidIcon(_1){
return(_1!=null&&
(this.icons&&this.icons.contains(_1)||
this.showPickerIcon&&this.getPickerIcon()==_1))}
,isc.A.getIconLeft=function isc_FormItem_getIconLeft(_1){
if(_1==null&&this.icons!=null&&this.icons.getLength()>0)_1=this.icons[0];
else if(!this.$145(_1)){
this.logWarn("getIconLeft() passed invalid icon:"+isc.Log.echoAll(_1));
return null}
var _2;
if(_1.inline&&this.$156r()&&_1.text!=null){
_2=this.$16g(_1)}else{
_2=this.$16v(_1)}
if(_2==null){
this.logWarn("getIconLeft() unable to return position of icon - this icon is not currently drawn into the page. Returning null");
return null}
return isc.Element.getLeftOffset(_2,this.containerWidget.getClipHandle())}
,isc.A.getTop=function isc_FormItem_getTop(){
var _1=this.isDrawn()?this.getOuterElement():null;
if(_1==null){
var _2="getTop() Unable to determine position for "+
(this.name==null?"this item ":this.name)+". ";
if(this.isDrawn()){
_2+="This method is not supported by items of type "+this.getClass()}else{
_2+="Position cannot be determined before the element is drawn"
}
_2+=" - returning zero.";
this.form.logWarn(_2);
return 0}
var _3=this.$18l(_1);
return _3}
,isc.A.getTitleTop=function isc_FormItem_getTitleTop(){
var _1=this.isDrawn()&&this.form
?isc.Element.get(this.form.$427(this))
:null;
if(_1==null){
var _2="getTitleTop() Unable to determine position for "+
(this.name==null?"this item ":this.name)+". ";
if(this.isDrawn()){
_2+="This method is not supported by items of type "+this.getClass()}else{
_2+="Position cannot be determined before the element is drawn"
}
_2+=" - returning zero.";
this.form.logWarn(_2);
return 0}
return this.$18l(_1)}
,isc.A.$18l=function isc_FormItem__getElementTop(_1){
var _2=this.containerWidget.getClipHandle(),
_3=_2.offsetParent,
_4=_1.offsetParent,
_5=isc.Element.getOffsetTop(_1)
;
while(_4&&_4!=_2&&_4!=_3){
_5+=isc.Element.getOffsetTop(_4)
_5-=(_4.scrollTop||0);
var _6=(isc.Browser.isMoz?0:
(isc.Browser.isIE?
parseInt(_4.currentStyle.borderTopWidth):
parseInt(isc.Element.getComputedStyleAttribute(_4,
"borderTopWidth"))
)
);
if(isc.isA.Number(_6))_5+=_6;
var _7=(isc.Browser.isIE?
parseInt(_4.currentStyle.marginTop):
parseInt(isc.Element.getComputedStyleAttribute(_4,"marginTop")));
if(isc.isA.Number(_7))_5+=_7;
_4=_4.offsetParent}
if(_4==_3){
_5-=isc.Element.getOffsetTop(_2)
}
return _5}
,isc.A.getIconTop=function isc_FormItem_getIconTop(_1){
if(_1==null&&this.icons!=null&&this.icons.getLength()>0)_1=this.icons[0];
else if(!this.$145(_1)){
this.logWarn("getIconTop() passed invalid icon:"+isc.Log.echoAll(_1));
return null}
var _2;
if(_1.inline&&this.$156r()&&_1.text!=null){
_2=this.$16g(_1)}else{
_2=this.$16v(_1)}
if(_2==null){
this.logWarn("getIconTop() unable to return position of icon - this icon is not currently drawn into the page. Returning null");
return null}
return isc.Element.getTopOffset(_2,this.containerWidget.getClipHandle())}
,isc.A.getPageLeft=function isc_FormItem_getPageLeft(){
var _1=this.containerWidget;
var _2=(this.isRTL()&&_1.overflow!=isc.Canvas.VISIBLE);
if(!_2){
return this.getLeft()+
((this.containerWidget.getPageLeft()
+this.containerWidget.getLeftMargin()
+this.containerWidget.getLeftBorderSize())
-this.containerWidget.getScrollLeft())}else{
var _3=_1.getScrollRight();
return this.getLeft()+
(this.containerWidget.getPageLeft()
+this.containerWidget.getLeftMargin()
+this.containerWidget.getLeftBorderSize()
+(_1.vscrollOn?_1.getScrollbarSize():0))
-(_1.getScrollLeft()-_3)}
}
,isc.A.getPageTop=function isc_FormItem_getPageTop(){
return this.getTop()+
((this.containerWidget.getPageTop()
+this.containerWidget.getTopMargin()
+this.containerWidget.getTopBorderSize())
-this.containerWidget.getScrollTop())}
,isc.A.getTitlePageLeft=function isc_FormItem_getTitlePageLeft(){
return this.getTitleLeft()+
((this.containerWidget.getPageLeft()
+this.containerWidget.getLeftMargin()
+this.containerWidget.getLeftBorderSize())
-this.containerWidget.getScrollLeft())}
,isc.A.getTitlePageTop=function isc_FormItem_getTitlePageTop(){
return this.getTitleTop()+
((this.containerWidget.getPageTop()
+this.containerWidget.getTopMargin()
+this.containerWidget.getTopBorderSize())
-this.containerWidget.getScrollTop())}
,isc.A.getIconRect=function isc_FormItem_getIconRect(_1){
return[this.getIconLeft(_1),
this.getIconTop(_1),
this.getIconWidth(_1),
this.getIconHeight(_1)]}
,isc.A.getIconPageRect=function isc_FormItem_getIconPageRect(_1){
var _2=this.getIconRect(_1);
_2[0]+=this.containerWidget.getPageLeft();
_2[1]+=this.containerWidget.getPageTop();
return _2}
,isc.A.propertyChanged=function isc_FormItem_propertyChanged(_1,_2){
if(this.destroyed)return;
if(this.$14s[_1]==true)this.$18m=true;
if(this.$59q[_1]==true)this.updateState();
if(this.$172o[_1]==true&&this.form)this.form.$172p(this,_1);
if(_1==this.$59r&&this.items){
for(var i=0;i<this.items.length;i++){
this.items[i].updateState()}
}
}
,isc.A.doneSettingProperties=function isc_FormItem_doneSettingProperties(){
if(this.$18m){
var _1=this.form,_2=_1.items;
_2.$8j=null;
_1.markForRedraw()}
delete this.$18m}
,isc.A.$249r=function isc_FormItem__initTextMatchStyle(){
if(this.hasOwnProperty("defaultOperator")&&!this.hasOwnProperty("textMatchStyle")){
var _1=this.$249s(this.defaultOperator);
if(_1)this.textMatchStyle=_1}
}
,isc.A.$249q=function isc_FormItem__initOptionTextMatchStyle(){
if(this.hasOwnProperty("defaultOperator")&&
!this.hasOwnProperty("optionTextMatchStyle"))
{
var _1=this.$249s(this.defaultOperator);
if(_1)this.optionTextMatchStyle=_1}
}
,isc.A.$249s=function isc_FormItem__getTextMatchStyleForOperator(_1){
switch(_1){
case"equals":return"exactCase";
case"iEquals":return"exact";
case"iContains":return"substring";
case"iStartsWith":return"startsWith"}
}
,isc.A.parseValueExpressions=function isc_FormItem_parseValueExpressions(_1,_2,_3){
var _4=this.getType(),
_5=isc.SimpleType.inheritsFrom(_4,"time"),
_6=(isc.SimpleType.inheritsFrom(_4,"integer")||
isc.SimpleType.inheritsFrom(_4,"float")),
_7=(isc.SimpleType.inheritsFrom(_4,"date")||
isc.SimpleType.inheritsFrom(_4,"datetime")||
_5||_6
),
_8=isc.DynamicForm.getOperatorIndex(),
_9=isc.getKeys(_8),
_10={operator:"and",criteria:[]},
_11=_10.criteria,
_12=[],
_13=this.$85m(),
_14=isc.DS.get(this.form.expressionDataSource||this.form.dataSource)
;
if(!_1)_1=this.getValue();
if(!_1)return;
if(!isc.isA.String(_1))_1+="";
if(_5){
_1=isc.Time.$111q(_1)}
if(isc.isAn.Object(_3))_3=_3.ID;
var _15=isc.DataSource.$57z[_3];
var _16=this.getOperator();
if(_15){
if(_15.symbol=="..."&&!_1.contains("...")){
_3=this.getDefaultOperator();
_16=_3}else if(_15.valueType=="criteria"&&(""+_1!="")&&
!_1.contains(_15.symbol)){
_3=this.getDefaultOperator();
_16=_3}
}
if(_16)_9.add(_16);
var _17=_3||_16,
_18=isc.DS.getSearchOperator(_17,_14)||{ID:_17};
var _19=_18.caseInsensitive;
if(_7&&_1.contains(" and ")){
_12=_1.split(" and ")}else if(_7&&_1.contains(" or ")){
_12=_1.split(" or ");
_10.operator="or"}else if(_1.contains("...")){
if(_15.symbol!="..."){
if(_7){
if(isc.SimpleType.inheritsFrom(this.type,"text")){
_3="iBetweenInclusive"}else{
_3="betweenInclusive"}
}
}
_12=_1.split("...");
if(_12.length==2){
var _20=_8["..."]||[];
if(!_3||!_20.getProperty("ID").contains(_3)){
if(!_3){
this.logWarn("No operator passed for 'between' expression for item '"+
this.name+"' - using defaultBetweenOperator: "+
this.defaultBetweenOperator)}else{
this.logInfo("Invalid 'between' operator for item '"+
this.name+"' - using defaultBetweenOperator: "+
this.defaultBetweenOperator)}
_3=this.defaultBetweenOperator}
var _21=_20.find("ID",_3);
if(!_21){
this.logWarn("unexpected auto-detection of 'between' operator for item '"+
this.name+"' - this is unexpected...");
var _22=(_3.startsWith("i")?_3.substring(1):
_3).toLowerCase()
;
for(var o=0;o<_20.length;o++){
var _24=(_20[o].ID.startsWith("i")?
_20[o].ID.substring(1):_20[o].ID).toLowerCase()
if(_19==_20[o].caseInsensitive){
if(_24==_22){
_21=_20[o];
break}
}
}
if(!_21)_21=_20[0]}
var _25=_14?_14.getField(_2):null;
if(_25){
if(_6){
_12[0]=this.$79d(_12[0],true);
_12[1]=this.$79d(_12[1],true)}else if(isc.SimpleType.inheritsFrom(_25.type,"date")||
isc.SimpleType.inheritsFrom(_25.type,"datetime"))
{
_12[0]=new Date(Date.parse(_12[0]));
_12[0].logicalDate=true;
_12[1]=new Date(Date.parse(_12[1]));
_12[1].logicalDate=true}else if(isc.SimpleType.inheritsFrom(_25.type,"time")){
var _26=isc.Time.createLogicalTime(0,0,0,0);
_12[0]=isc.Time.parseInput(_12[0],false,false,false,_26);
_26.setSeconds(59,999);
_12[1]=isc.Time.parseInput(_12[1],false,false,false,_26)}else if(_25.type=="text"){
if(!_12[1].endsWith(this.$87p)){
_12[1]+=this.$87p}
}
}
return{fieldName:_2,operator:_21.ID,
start:_12[0],end:_12[1]}}
}else{
_12=[_1]}
var _27=[" and "," or "];
for(var i=0;i<_12.length;i++){
var _29=_12[i],
_30={fieldName:_2}
_25=_14?_14.getField(_2):null,
_31=(_25?
_25.type&&
(isc.SimpleType.inheritsFrom(_25.type,"date")||isc.SimpleType.inheritsFrom(_25.type,"datetime"))
:false),
_32=(_25?_25.type&&isc.SimpleType.inheritsFrom(_25.type,"time"):false),
_33=false
;
var _34=null;
for(var _35 in _8){
if(!_35)continue;
if(isc.isA.String(_29)&&_29.startsWith(_35)){
_34=_35;
break}
}
for(var _36 in _8){
if(!_36)continue;
if(_34&&_36!=_34)continue;
var _37=_8[_36].duplicate(),
_38=false,
_39=null
;
if(_35=="=="&&isc.isA.String(_29)&&_29.startsWith("=")&&
!_29.startsWith("==")&&!_29.startsWith("=("))
{
_38=true}
if(_37&&_37.length){
if(_37.length==1){
_39=_37[0]}else{
var _40=[];
for(var _41=0;_41<_37.length;_41++){
var _42=_37[_41];
if(!isc.propertyDefined(_42,"caseInsensitive"))_42.caseInsensitive=false;
_40.add(_42)}
if(_40.length==1){
_39=_40[0]}else if(_40.length>1){
for(var _43=0;_43<_40.length;_43++){
if(_40[_43].caseInsensitive==_19){
_39=_40[_43];
break}
}
if(!_39)_39=_40[0]}
}
}
if(!_39||!_39.symbol||_27.contains(_39.symbol)){
continue}
if(_9.contains(_39.symbol)&&
((isc.isA.String(_29)&&(_29.startsWith(_39.symbol)||
(_39.symbol=="..."&&_29.contains(_39.symbol)))
)
||_38))
{
_33=true;
if(_29.startsWith(_39.symbol)){
_29=_29.substring(_39.symbol.length-(_38?1:0))}
if(_39.closingSymbol){
if(_29.endsWith(_39.closingSymbol)){
_29=_29.substring(0,_29.length-_39.closingSymbol.length)}
}
if(_29.contains("...")){
var _44=_29.split("...");
if(_44.length==2){
var _20=_8["..."],
_21;
if(_20)_21=(_19?_20.find("caseInsensitive",true):_20[0]);
var _25=_14?_14.getField(_2):null;
if(_25){
if(isc.SimpleType.inheritsFrom(_25.type,"date")||
isc.SimpleType.inheritsFrom(_25.type,"datetime"))
{
_44[0]=new Date(Date.parse(_44[0]));
_44[0].logicalDate=true;
_44[1]=new Date(Date.parse(_44[1]));
_44[1].logicalDate=true}else if(isc.SimpleType.inheritsFrom(_25.type,"time")){
var _26=isc.Time.createLogicalTime(0,0,0,0);
_44[0]=isc.Time.parseInput(_44[0],false,false,false,_26);
_26.setSeconds(59,999);
_44[1]=isc.Time.parseInput(_44[1],false,false,false,_26)}else if(_25.type=="text"){
if(!_44[1].endsWith(this.$87p)){
_44[1]+=this.$87p}
}
}
_10.criteria.add({fieldName:_2,operator:_21.ID,
start:_44[0],end:_44[1]
});
continue}
}
if(_31){
_29=new Date(Date.parse(_29));
_29.logicalDate=true}else if(_32){
var _26=null;
if(_39.upperBounds){
if(_39.inclusive)_26=isc.Time.createLogicalTime(0,0,59,999);
else _26=isc.Time.createLogicalTime(0,0,0,0)}else if(_39.lowerBounds){
if(_39.inclusive)_26=isc.Time.createLogicalTime(0,0,0,0);
else _26=isc.Time.createLogicalTime(0,0,59,999)}
_29=isc.Time.parseInput(_29,false,false,false,_26)}else{
_29=this.$79d(_29,!_6)}
_30.operator=_39.ID;
if(_39.processValue){
_29=_39.processValue(_29,_14)}
if(_39.wildCard&&isc.isA.String(_29)&&_29.contains(_39.wildCard)){
var _45=_14?_14.patternMultiWildcard:"*";
_45=isc.isA.Array(_45)?_45[0]:_45;
var _46=_29.replaceAll(_39.wildCard,_45);
var _39=_19?"iMatchesPattern":"matchesPattern";
if(_3){
_39=_3}
_10.criteria.add({
operator:_39,
fieldName:_2,
value:_46
});
_30.operator=null;
this.$877=true}else{
if(_39.valueType!="none")_30.value=_29}
break}
}
if(!_33){
_30.operator=_16;
var _47=isc.DS.$57z[_16];
if(_47.processValue){
_30.value=_47.processValue(_29,_14)
}else{
_30.value=this.$79d(_29,true)}
}
if(_30.operator)_10.criteria.add(_30)}
if(_10.criteria.length==1)_10=_10.criteria[0];
if(_10.criteria&&_10.criteria.length==0)_10=null;
if(_10.criteria&&!_10._constructor)_10._constructor="AdvancedCriteria";
return _10}
);
isc.evalBoundary;isc.B.push(isc.A.flattenExpressionCriteria=function isc_FormItem_flattenExpressionCriteria(_1){
var _2=[];
for(var i=0;i<_1.length;i++){
var _4=_1[i];
if(!_4.criteria){
_2.add(_4)}else{
_2.addList(this.flattenExpressionCriteria(_4.criteria))
}
}
return _2}
,isc.A.buildValueExpressions=function isc_FormItem_buildValueExpressions(_1){
var _2=_1,
_3=isc.shallowClone(_2),
_4=" "+_3.operator+" ",
_5=[_4],
_6=[],
_7="",
_8=isc.DS.get(this.form.expressionDataSource||this.form.dataSource)
;
if(_2.criteria){
_3.criteria=this.flattenExpressionCriteria(_2.criteria)}
var _9=isc.DynamicForm.getOperatorIndex(),
_10=isc.getKeys(_9),
_11=this.getValidOperators()
;
var _12=this.getOperator();
if(_12)_11.add(_12);
var _13=isc.DS.getSearchOperator(_12,_8)||{ID:_12};
var _14=_13.caseInsensitive,
_15=false,
_16
;
if(!_3.criteria){
var _17=[_3];
_3={criteria:_17}}
var _18=["startsWith","iStartsWith","contains","iContains",
"endsWith","iEndsWith"
];
if(this.useWildCardsByDefault&&this.type=="text"&&
(_3.criteria.length>1||
(_3.criteria.length==1&&
_18.contains(_3.criteria[0].operator)&&
_3.criteria[0].value&&_3.criteria[0].value.startsWith("=")&&
!_3.criteria[0].value.startsWith("==")&&!_3.criteria[0].value.startsWith("=(")
)||this.$877
))
{
_15=true;
var _19=_9["=="];
var _20=_19.find({"ID":"equals"});
_16=_20.wildCard;
_5[0]=""}
var _21=0;
var _22=["between","iBetween","betweenInclusive","iBetweenInclusive"];
for(var i=0;i<_3.criteria.length;i++){
var _24=_3.criteria[i],
_25=_24.operator,
_26=_24.value,
_27=_8?_8.getField(_24.fieldName):null
;
for(var j=0;j<_10.length;j++){
var _19=_9[_10[j]];
var _29=_19.find({"ID":_25});
if(_29){
_25=_29;
break}
}
if(i>0){
_5.add(_4)}
if(isc.isA.String(_25)){
this.logWarn("Unknown filter-expression operator: '"+_25+"'")}else if(_15){
if(_25.ID=="contains"||_25.ID=="iContains"){
if(_6[_6.length-1]!=_16)_6.add(_16);
_6.add(_24.value);
_6.add(_16)}else if(_25.ID=="startsWith"||_25.ID=="iStartsWith"){
_6.add(_24.value);
_6.add(_16)}else if(_25.ID=="endsWith"||_25.ID=="iEndsWith"){
if(_6[_6.length-1]!=_16)_6.add(_16);
_6.add(_24.value)}
}else if(_25.ID==_12&&!_22.contains(_25.ID)){
if(isc.isAn.Array(_24.value)){
_6.add(_24.value.join(_25.valueSeparator))}else{
_6.add(this.$111i(_24.value))}
}else if(_22.contains(_25.ID)){
if(_3.criteria.length>1)_5.addAt(_25.symbol,_21);
else _5[_21]=_25.symbol
_21++;
var _30=_24.end;
if(_27&&_27.type=="text"){
if(_30&&_30.endsWith(this.$87p)){
_30=_30.replace(this.$87p,"")}
}
var _31=this.$111i(_24.start);
_30=this.$111i(_30);
if(_31!=_30)_6.addList([_31,_30]);
else _6.add(_31)}else if(_25.ID=="isBlank"||_25.ID=="notBlank"||
_25.ID=="isNull"||_25.ID=="notNull"){
_6.add(_25.symbol)}else if(_11.contains(_25.ID)){
var _32=_25;
if(isc.isAn.Array(_26))_26=_26.join(_25.valueSeparator);
if(_32.ID!=_13){
_26=(_32&&_32.symbol?_32.symbol:"")+this.$111i(_26);
if(_32.closingSymbol)_26+=_32.closingSymbol}
_6.add(_26)}else if(_25.ID.startsWith("i")){
var _33=_25.ID.substring(1),
_34=_33.charAt(0)
;
_33=_34.toLowerCase()+_33.substring(1)
if(_11.contains(_33)){
var _35=_10.find("ID",_33);
if(_35.ID!=_13){
_26=(_32&&_32.symbol?_32.symbol:"")+this.$111i(_26);
if(_32.closingSymbol)_26+=_32.closingSymbol}
_6.add(_26)}
}
_21++}
if(_15)_6.addAt("=",0);
if(_5.length>1){
for(var i=0;i<_6.length;i++){
_7+=_6[i];
if(i<_6.length-1)_7+=_5[i]}
}else{
_7=_6.join((_6.length>1?_5[0]:""))}
delete this.$877;
return _7.length>0?_7:null}
,isc.A.enteredCompleteExpression=function isc_FormItem_enteredCompleteExpression(){
var _1=this._value;
if(!isc.isA.String(_1)){
this.$1464=true;
return true}
if(this.$1464&&(_1==null||isc.isAn.emptyString(_1))){
delete this.$1464;
return true}
var _2=isc.DS.get(this.form.expressionDataSource||this.form.dataSource),
_3=this.getValidOperators()||[],
_4=!["$","!$","#","!#"].contains(_1),
_5=true
;
if(_5&&_3.contains(_1)&&_4){
_5=false}
if(_5&&_1.contains("=(")&&!_1.contains(")")){
_5=false}
if(_5&&_4){
var _6=isc.DS.$57z;
for(var j=0;j<_3.length;j++){
var _8=_6[_3[j]];
if(_8.symbol&&_8.symbol.startsWith(_1)){
_5=false;
break}
}
}
this.$1464=_5;
return this.$1464}
,isc.A.$111i=function isc_FormItem__formatCriterionValue(_1){
return String(_1)}
,isc.A.getValueAsFloat=function isc_FormItem_getValueAsFloat(){
var _1=this.getValue(),
_2=null
;
if(isc.SimpleType.inheritsFrom(this.type,"localeFloat")){
_2=isc.NumberUtil.parseLocaleFloat(_1)}else _2=parseFloat(_1);
return isNaN(_2)?null:_2}
,isc.A.mapFloatValueToDisplay=function isc_FormItem_mapFloatValueToDisplay(_1){
if(isc.isA.StaticTextItem(this)||!this.$956){
var _2=null;
if(isc.isA.String(_1)&&(this.type==null||!this.type.startsWith("locale"))){
var _3=window.parseFloat(_1);
if(!window.isNaN(_3)&&_3==_1){
_2=_3}
}else if(isc.isA.Number(_1)){
_2=_1}
if(_2!=null){
if(this.format){
return isc.NumberUtil.format(_2,this.format)}else if(this.$184w&&
(this.decimalPrecision!=null||this.decimalPad!=null||this.precision))
{
var _4=this.$184w(_2);
if(_4)return _4}else if(this.$62!=null&&this.$62.normalDisplayFormatter!=null){
var _5=this.form,
_6=_5?_5.values:{};
return this.$62.normalDisplayFormatter(_1,this,_5,_6)}
}
}
}
,isc.A.checkDateRangeValidator=function isc_FormItem_checkDateRangeValidator(_1,_2){
if(!this.generateValidator)return;
_1=_1||this.startDate;
_2=_2||this.endDate;
var _3=null,
_4=null,
_5=false,
_6=this.validators||[]
;
if(!this.validators)this.validators=_6;
for(var i=0;i<_6.length;i++){
if(_6[i].type=="dateRange"){
if(!_6[i].autoGenerated)_4=i;
else _3=i}
}
if(_4!=null){
if(_3==null)return;
_6.removeAt(_3);
this.$249o=null;
_5=true}else{
if(isc.isA.Date(_1)||isc.isA.Date(_2)){
var _5=_3==null;
if(!_5&&this.$249o){
if(_1&&isc.DateUtil.compareLogicalDates(_1,this.$249o.min)!=0){
_5=true}else if(_2&&isc.DateUtil.compareLogicalDates(_2,this.$249o.max)!=0){
_5=true}
}
var _8=this.$249o||
{type:"dateRange",clientOnly:true,autoGenerated:true,exclusive:false}
_8.min=_1;
_8.max=_2;
this.$249o=_8;
if(_3==null)_3=_6.length;
_6[_3]=this.$249o}
}
if(_5&&this.isDrawn()&&this.getValue()!=null)this.validate()}
);
isc.B._maxIndex=isc.C+651;
isc.FormItem.registerStringMethods({
showIf:"item,value,form,values",
defaultDynamicValue:"item,form,values",
focus:"form,item",
blur:"form,item",
editorEnter:"form,item,value",
editorExit:"form,item,value",
click:"form,item",
doubleClick:"form,item",
showContextMenu:"form,item",
pickerIconClick:"form,item,pickerIcon",
iconClick:"form,item,icon",
iconKeyPress:"keyName,character,form,item,icon",
change:"form,item,value,oldValue",
changed:"form,item,value",
pendingStatusChanged:"form,item,pendingStatus,newValue,value",
transformInput:"form,item,value,oldValue",
cellClick:"form,item",
cellDoubleClick:"form,item",
titleClick:"form,item",
titleDoubleClick:"form,item",
mouseMove:"form,item",
mouseOver:"form,item",
mouseOut:"form,item",
titleMove:"form,item",
titleOver:"form,item",
titleOut:"form,item",
textBoxMove:"form,item",
textBoxOver:"form,item",
textBoxOut:"form,item",
itemHover:"item,form",
titleHover:"item,form",
valueHover:"item,form",
keyPress:"item, form, keyName, characterValue",
keyDown:"item,form,keyName",
keyUp:"item,form,keyName",
transformPastedValue:"item,form,pastedValue",
getValueIcon:"value",
formSaved:"request,response,data",
formatValue:"value,record,form,item",
formatEditorValue:"value,record,form,item",
parseEditorValue:"value,form,item"
});
isc.FormItem.getPrototype().toString=function(){
return"["+this.Class+" ID:"+this.ID+
(this.name!=null?" name:"+this.name:"")+"]"};
isc.ClassFactory.defineClass("FormItemFactory");isc.A=isc.FormItemFactory;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$gx="text";isc.A.$18n="Item";isc.A.$18o="TextareaItem";isc.A.$679="TextAreaItem";isc.A.$68a="DatetimeItem";isc.A.$68b="DateTimeItem";isc.A.$18p={};isc.B.push(isc.A.getItemClassName=function isc_c_FormItemFactory_getItemClassName(_1,_2,_3,_4){if(_2==null)_2=_1.editorType||_1.formItemType||_1.type;if(isc.isA.String(_2)){var _5=_2.toLowerCase();if(_5.contains(isc.DynamicForm.$12b)){if(_5=="selectother"||_5=="selectotheritem"){_5="select";if(!_4)_1.isSelectOther=true}
if(_5=="select"||_5=="selectitem"){_3=_1.form||_3;var _6=(!isc.ListGrid||(_1.multiple&&_1.multipleAppearance=="grid")||(_3?_3.useNativeSelectItems:false));if(_6)_2="NativeSelectItem"
else _2="SelectItem"}
}
if(_5==isc.DynamicForm.$52w)_2="MultiFileItem";else if(_5==isc.DynamicForm.$12g)_2="MultiUploadItem";else if(_5==isc.DynamicForm.$51x.toLowerCase())_2="SOAPUploadItem"}
return _2}
,isc.A.getItemClass=function isc_c_FormItemFactory_getItemClass(_1){var _2=isc.ClassFactory.getClass(_1);if(!_2||!isc.isA.FormItem(_2)){if(isc.SGWTFactory&&isc.isA.SGWTFactoryObject(_2))return _2;if(_1!=null&&_1.startsWith("T")){var _3=_1.substring(1),_2=isc.ClassFactory.getClass(_3);if(isc.isA.FormItem(_2))return _2}
if(_1==null)_1=this.$gx;var _4=this.$18p,_5=_4[_1];if(!_5){_5=_4[_1]=_1.substring(0,1).toUpperCase()+_1.substring(1)+this.$18n}
if(_5==this.$18o)_5=this.$679;if(_5==this.$68a)_5=this.$68b;_2=isc.ClassFactory.getClass(_5)}
return _2}
,isc.A.makeItem=function isc_c_FormItemFactory_makeItem(_1){if(_1==null)return null;if(isc.isA.FormItem(_1)){return _1}
var _2=this.getItemClassName(_1),_3=this.getItemClass(_2);if(!_3){this.logWarn("makeItem(): type "+_1.type+" not recognized, using TextItem");_3=isc.TextItem}
return isc.ClassFactory.newInstance(_3,_1)}
);isc.B._maxIndex=isc.C+3;isc.ClassFactory.defineClass("Validator");isc.Validator.addProperties({})
isc.A=isc.Validator;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.notABoolean="Must be a true/false value.";isc.A.notAString="Must be a string.";isc.A.notAnInteger="Must be a whole number.";isc.A.notADecimal="Must be a valid decimal.";isc.A.notADate="Must be a date.";isc.A.notARelativeDate="Must be a relative-date.";isc.A.notADateOrRelativeDate="Must be a date or relative-date.";isc.A.notATime="Must be a time.";isc.A.notAnIdentifier="Identifiers must start with a letter, underscore or $ character, and may contain only letters, numbers, underscores or $ characters.";isc.A.notARegex="Must be a valid regular expression.";isc.A.notAColor="Must be a CSS color identifier.";isc.A.mustBeLessThan="Must be no more than ${max}";isc.A.mustBeGreaterThan="Must be at least ${min}";isc.A.mustBeLaterThan="Must be ${min.toShortDate()} or later";isc.A.mustBeLaterThanTime="Must be ${isc.Time.toShortTime(min)} or later";isc.A.mustBeEarlierThan="Must be ${max.toShortDate()} or earlier";isc.A.mustBeEarlierThanTime="Must be ${isc.Time.toShortTime(max)} or earlier";isc.A.mustBeShorterThan="Must be no more than ${max} characters";isc.A.mustBeLongerThan="Must be at least ${min} characters";isc.A.mustBeExactLength="Must be exactly ${max} characters";isc.A.mustBeUnique="Value must be unique";isc.A.notAMeasure="Must be a whole number, percentage, '*' or 'auto'";isc.A.notAMeasureOrIdentifier="Must be a whole number, percentage, '*' or 'auto', or a valid JS identifier";isc.A.notIntegerOrIdentifier="Must be a whole number or a valid JS identifier";isc.A.notIntegerOrAsterisk="Must be a positive whole number or '*'";isc.A.requiredField="Field is required";isc.A.requiredFile="Non-empty file required";isc.A.notOneOf="Not a valid option";isc.A.notAFunction="Must be a function.";isc.A.maxFileSizeExceeded="Size of '${uploadedFileName}' (${isc.NumberUtil.toMiBString(uploadedFileSize, maxFileSize)} MiB) exceeds maximum allowed file size of ${isc.NumberUtil.toMiBString(maxFileSize, uploadedFileSize)} MiB.";isc.A.$18q="true";isc.A.$18r="false";isc.A.$605=".";isc.A.READONLY="readOnly";isc.A.HIDDEN="hidden";isc.A.DISABLED="disabled";isc.A.$74u={isBoolean:{type:"isBoolean",description:"Value is boolean",valueType:"none",dataType:"none",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(isc.isA.Boolean(_3))return true;if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.notABoolean}
if(isc.isA.String(_3)){var _4=isc.Validator;_2.resultingValue=(_3==_4.$18q);return(_3==_4.$18q||_3==_4.$18r)}else if(isc.isA.Number(_3)){_2.resultingValue=(_3!=0);return(_3==0||_3==1)}
_2.resultingValue=!!_3;return false}
},isString:{type:"isString",description:"Value is a string",valueType:"none",dataType:"none",condition:function(_1,_2,_3){if(_3==null||isc.isA.String(_3))return true;if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.notAString;_2.resultingValue=isc.iscToLocaleString(_3);return true}
},isInteger:{type:"isInteger",description:"Value is a whole number",valueType:"none",dataType:"none",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(!_2.errorMessage&&!_2.defaultErrorMessage){_2.defaultErrorMessage=isc.Validator.notAnInteger}
if(isc.isA.String(_3)){_3=_3.trim();if(_3.length==0){_2.resultingValue=null;return false}
}
if(isNaN(_3)){_2.resultingValue=null;return false}
var _4=(_1&&_1.stringInBrowser!==undefined?isc.booleanValue(_1.stringInBrowser):undefined);if(_4===true&&isc.isA.String(_3)){_2.resultingValue=_3;return true}
if(_1&&_1.type&&_1.type.startsWith("locale")&&isc.isA.String(_3)){var _5=isc.NumberUtil.parseLocaleInt(_3);if(isNaN(_5)){_2.resultingValue=null;return false}else{_2.resultingValue=_5;return true}
}
var _5=parseInt(_3,10),_6=(_3==_5);if(!_6){if(_2.convertToInteger){var _7=parseFloat(_3);_5=Math.round(_7);_2.resultingValue=_5;return true}else{return false}
}else{if(_5==Number.POSITIVE_INFINITY||_5==Number.NEGATIVE_INFINITY){if(isc.isA.String(_3)&&(_4===true||isc.booleanValue(isc.DataSource.defaultStringInBrowser,true)))
{_2.resultingValue=_3;return true}
}
_2.resultingValue=_5;return true}
}
},isFloat:{type:"isFloat",description:"Value is a floating point number",valueType:"none",dataType:"none",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.notADecimal;if(isc.isA.String(_3)){_3=_3.trim();if(_3.length==0){_2.resultingValue=null;return false}
}
if(isNaN(_3)){_2.resultingValue=null;return false}
var _4=(_1&&_1.stringInBrowser!==undefined?isc.booleanValue(_1.stringInBrowser):undefined);if(_4===true&&isc.isA.String(_3)){_2.resultingValue=_3;return true}
var _5;if(_3==isc.Validator.$605){_5="0."}else if(_1&&_1.type&&_1.type.startsWith("locale")&&isc.isA.String(_3)){_5=isc.NumberUtil.parseLocaleFloat(_3);if(isNaN(_5)){return false}
}else{_5=parseFloat(_3);if((_5==Number.POSITIVE_INFINITY||_5==Number.NEGATIVE_INFINITY)){if(isc.isA.String(_3)&&(_4===true||isc.booleanValue(isc.DataSource.defaultStringInBrowser,true)))
{_2.resultingValue=_3;return true}
}
}
_2.resultingValue=_5;return true}
},isDate:{type:"isDate",description:"Value is a date",valueType:"none",dataType:"none",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3)||isc.isA.Date(_3))return true;if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.notADate;var _4=isc.Validator.$93n?isc.DateUtil.parseInput(_3):isc.DateUtil.parseSchemaDate(_3);if(_4==null||isNaN(_4.getTime()))return false;_2.resultingValue=_4;return true}
},isTime:{type:"isTime",description:"Value is a logical Time value",valueType:"none",dataType:"none",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3)||isc.isA.Date(_3))return true;if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.notATime;var _4=isc.Time.parseInput(_3,true);if(_4==null){_4=isc.DateUtil.parseSchemaDate(_3)}
if(_4!=null){_2.resultingValue=_4;return true}
return false}
},isRelativeDate:{type:"isRelativeDate",description:"Relative-date string or object",valueType:"none",dataType:"none",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(isc.isA.Date(_3))return false;if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.notARelativeDate;return isc.DateUtil.isRelativeDate(_3,true)}
},isDateOrRelativeDate:{type:"isDateOrRelativeDate",description:"Date or Relative-date",valueType:"none",dataType:"none",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3)||isc.isA.Date(_3))return true;if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.notADateOrRelativeDate;var _4=isc.Validator.$93n?isc.DateUtil.parseInput(_3):isc.DateUtil.parseSchemaDate(_3);if(_4!=null&&_4.getTime&&!isNaN(_4.getTime())){_2.resultingValue=_4;return true}
return isc.DateUtil.isRelativeDate(_3,true)}
},isIdentifier:{type:"isIdentifier",valueType:"none",dataType:"none",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(!_2.errorMessage&&!_2.defaultErrorMessage){_2.defaultErrorMessage=isc.Validator.notAnIdentifier}
return isc.isA.String(_3)&&_3.match(/^[a-zA-Z_\$][\w\$]*$/)!=null}
},isRegexp:{type:"isRegexp",description:"Matches pattern",valueType:"none",dataType:"none",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.notARegex;if(typeof _3=='object'&&_3.constructor==RegExp)return true;if(isc.Browser.isDOM){if(!isc.Validator.$18t){isc.Validator.$18t=isc.$aq("value","try{var regex=new RegExp(value)}catch(e){return false}return true")}
return isc.Validator.$18t(_3)}else{var _4=new RegExp(_3);return true}
}
},isFunction:{type:"isFunction",valueType:"none",dataType:"none",condition:function(_1,_2,_3){if(_3==null||isc.isAn.emptyString(_3)||_3===isc.Class.NO_OP||isc.isA.Function(_3)||isc.isA.StringMethod(_3))
{return true}
if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.notAFunction;if(isc.isAn.Array(_3)){if(!_1.multiple)return false;var _4=new Array(_3.length);for(var i=0;i<_3.length;++i){var _6=_3[i];if(_6==null||isc.isAn.emptyString(_6)||_6===isc.Class.NO_OP||isc.isA.Function(_6)||isc.isA.StringMethod(_6))
{_4[i]=_6}else{try{isc.Func.expressionToFunction("",_6)}catch(e){return false}
if(_6.iscAction)_6=_6.iscAction;_4[i]=isc.StringMethod.create({value:_6})}
}
_2.resultingValue=_4;return true}else{try{isc.Func.expressionToFunction("",_3)}catch(e){return false}
if(_3.iscAction)_3=_3.iscAction;_2.resultingValue=isc.StringMethod.create({value:_3});return true}
}
},isColor:{type:"isColor",valueType:"none",dataType:"text",condition:function(_1,_2,_3){if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.notAColor;if(!_3)return true;return isc.isA.color(_3)}
},isMeasure:{type:"isMeasure",valueType:"none",dataType:["integer","string"],condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3)||_3=="*")return true;if(!_2.errorMessage&&!_2.defaultErrorMessage){_2.defaultErrorMessage=isc.Validator.notAMeasure}
if(isc.isA.String(_3)&&_3.charAt(_3.length-1)=='%'){_3=_3.slice(0,-1);return _3.match(/^\d+(\.\d+)?$/)!=null}
return isc.Validator.processValidator(_1,_2,_3,"integerOrAuto")}
},isMeasureOrIdentifier:{type:"isMeasureOrIdentifier",valueType:"none",dataType:["integer","string"],condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3)||_3=="*")return true;if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.notAMeasureOrIdentifier;if(isc.Validator.processValidator(_1,_2,_3,"isIdentifier")){return true}
return isc.Validator.processValidator(_1,_2,_3,"isMeasure")}
},integerOrAuto:{type:"integerOrAuto",valueType:"none",dataType:["integer","string"],condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3)||(isc.isA.String(_3)&&_3.toLowerCase()=="auto"))return true;return isc.Validator.processValidator(_1,_2,_3,"isInteger")}
},integerOrIdentifier:{type:"integerOrIdentifier",valueType:"none",dataType:["integer","string"],condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(!_2.errorMessage&&!_2.defaultErrorMessage){_2.defaultErrorMessage=isc.Validator.notIntegerOrIdentifier}
if(isc.Validator.processValidator(_1,_2,_3,"isIdentifier")){return true}
return isc.Validator.processValidator(_1,_2,_3,"isInteger")}
},positiveIntegerOrAsterisk:{type:"positiveIntegerOrAsterisk",valueType:"none",dataType:["integer","string"],condition:function(_1,_2,_3){if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.notIntegerOrAsterisk;if(_3==null||isc.is.emptyString(_3))return true;if(_3=="*")return true;return isc.Validator.processValidator(_1,_2,_3,"isInteger")}
},integerRange:{type:"integerRange",title:"Value in range",description:"Value is an integer within the specified range",valueType:"valueRange",dataType:"integer",rangeStartAttribute:"min",rangeEndAttribute:"max",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(isc.isA.String(_3)){_3=_3.trim();if(_3.length==0){return true}
}
if(isNaN(_3))return true;var _4;if(isc.isA.Number(_3)){_4=_3}else{_4=parseInt(_3,10)}
if(_1&&isc.booleanValue(_1.stringInBrowser)===true&&isc.isA.String(_3)){return true}
_2.dynamicErrorMessageArguments={validator:_2,max:_2.max,min:_2.min};if(_1&&isc.booleanValue(_1.stringInBrowser,true)!==false&&isc.isA.String(_3)&&!(_3==_4.toString())){var _5=isc.BigDecimal.create(_3);if(isc.isA.Number(_2.max)&&((!_2.exclusive&&_5.compareTo(_2.max)>0)||(_2.exclusive&&_5.compareTo(_2.max)>=0)))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeLessThan
}
return false}
if(isc.isA.Number(_2.min)&&((!_2.exclusive&&_5.compareTo(_2.min)<0)||(_2.exclusive&&_5.compareTo(_2.min)<=0)))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeGreaterThan
}
return false}
return true}
if(isc.isA.Number(_2.max)&&((!_2.exclusive&&_4>_2.max)||(_2.exclusive&&_4>=_2.max)))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeLessThan
}
return false}
if(isc.isA.Number(_2.min)&&((!_2.exclusive&&_4<_2.min)||(_2.exclusive&&_4<=_2.min)))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeGreaterThan}
return false}
return true}
},lengthRange:{type:"lengthRange",title:"String length in range",description:"Value is a string whose length falls within the specified range",valueType:"valueRange",dataType:"text",rangeStartAttribute:"min",rangeEndAttribute:"max",editorTitle:"Range",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(!isc.isA.String(_3))return true;_2.dynamicErrorMessageArguments={validator:_2,max:_2.max,min:_2.min};var _4=_3.length,_5=_2.max!=null?parseInt(_2.max,10):null,_6=_2.min!=null?parseInt(_2.min,10):null;if(!isc.isA.Number(_5))_5=null;if(!isc.isA.Number(_6))_6=null;if(_5!=null&&_4>_5){_2.defaultErrorMessage=(_5==_6?isc.Validator.mustBeExactLength
:isc.Validator.mustBeShorterThan);return false}
if(_6!=null&&_4<_6){_2.defaultErrorMessage=(_5==_6?isc.Validator.mustBeExactLength
:isc.Validator.mustBeLongerThan);return false}
return true}
},contains:{type:"contains",title:"String contains substring",description:"Value contains the specified substring",valueType:"fieldType",dataType:"text",valueAttribute:"substring",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(!isc.isA.String(_3))_3=isc.iscToLocaleString(_3);return _3.indexOf(_2.substring)>-1}
},doesntContain:{type:"doesntContain",shortName:"Doesn't Contain",title:"String does not contain substring",description:"Value does not contain the specified substring",valueType:"fieldType",dataType:"text",valueAttribute:"substring",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(!isc.isA.String(_3))_3=isc.iscToLocaleString(_3);return _3.indexOf(_2.substring)==-1}
},substringCount:{type:"substringCount",title:"String contains substring multple times",description:"Value contains a specified substring multiple times",reifyName:"Repeating strings",valueType:"custom",dataType:"text",editorType:"SubstringCountEditor",editorTitle:"Substring",getAttributesFromEditor:function(_1,_2){var _3=_2.canvas;return _3.getValues()},setEditorAttributes:function(_1,_2,_3){var _4=_2.canvas;if(_3==null){_4.clearValues();return}
_4.setValue("substring",_3.substring);_4.setValue("count",_3.count);_4.setValue("operator",_3.operator)},condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;var _4=_2.substring;for(var _5=0,_6=0;_5<_3.length;_5++){_5=_3.indexOf(_4,_5);if(_5>-1)_6++;else break}
var _7=_2.operator,_8=_2.count
;if(!_7)_7="==";if(!_8)_8=0;switch(_7){case"==":return _6==_8;case"!=":return _6!=_8;case"<":return _6<_8;case"<=":return _6<=_8;case">":return _6>_8;case">=":return _6>=_8}
return false}
},regexp:{type:"regexp",title:"Value matches regex",description:"Value matches a regular expression",reifyName:"Matches pattern",valueType:"fieldType",dataType:"text",valueAttribute:"expression",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;var _4=_2.expression;if(isc.isA.String(_4)){_4=new RegExp(_4)}
_4.lastIndex=0;return _4.test(_3)}
},mask:{type:"mask",title:"Values matches regex mask",description:"Value matches a regular expression mask",reifyName:"Match pattern and transform",valueType:"custom",dataType:"text",editorType:"MaskRuleEditor",getAttributesFromEditor:function(_1,_2){var _3=_2.canvas;return _3.getValues()},setEditorAttributes:function(_1,_2,_3){var _4=_2.canvas;if(_3==null){_4.clearValues();return}
_4.setValue("mask",_3.mask);_4.setValue("transformTo",_3.transformTo)},condition:function(_1,_2,_3){if(_3==null)return true;if(!isc.isA.String(_3)&&isc.isA.Function(_3.toString))
_3=_3.toString();if(isc.is.emptyString(_3))return true;var _4=_2.mask;if(isc.isA.String(_4))_4=_2.mask=new RegExp(_4);_4.lastIndex=0;if(!_4.test(_3)){return false}else{if(_2.transformTo){_2.resultingValue=_3.replace(_4,_2.transformTo)}
}
return true}
},dateRange:{type:"dateRange",title:"Value in range",description:"Value is a date within the specified range",valueType:"valueRange",dataType:"date",rangeStartAttribute:"min",rangeEndAttribute:"max",editorType:"RelativeDateItem",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;var _4=_3;if(!isc.isA.Date(_4)){_4=isc.DateUtil.getAbsoluteDate(_4);if(!isc.isA.Date(_4))return false}
var _5=_2.min,_6=_2.max;if(_5!=null&&!isc.isA.Date(_5)){_5=_2.min=isc.DateUtil.parseSchemaDate(_5)}
if(_6!=null&&!isc.isA.Date(_6)){_6=_2.max=isc.DateUtil.parseSchemaDate(_6)}
_2.dynamicErrorMessageArguments={validator:_2,max:_6,min:_5};if(isc.isA.Date(_5)&&((!_2.exclusive&&_4.getTime()<_5.getTime())||(_2.exclusive&&_4.getTime()<=_5.getTime())))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeLaterThan
}
return false}
if(isc.isA.Date(_6)&&((!_2.exclusive&&_4.getTime()>_6.getTime())||(_2.exclusive&&_4.getTime()>=_6.getTime())))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeEarlierThan}
return false}
return true}
},timeRange:{type:"timeRange",title:"Value in range",description:"Value is a logical time value within the specified range",valueType:"valueRange",dataType:"time",rangeStartAttribute:"min",rangeEndAttribute:"max",condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(!isc.isA.Date(_3))return false;var _4=_2.min,_5=_2.max;if(_4!=null&&!isc.isA.Date(_4)){if(isc.isA.String(_4)&&_4.contains(":")){var _6=_4.split(":"),_7=_6[0]||0,_8=_6[1]||0,_9=_6[2]||0,_10=_6[3]||0
;_4=_2.min=new Date(0,0,0,_7,_8,_9,_10)}else{_4=_2.min=isc.DateUtil.parseSchemaDate(_4)}
}
if(_5!=null&&!isc.isA.Date(_5)){if(isc.isA.String(_5)&&_5.contains(":")){var _6=_5.split(":"),_7=_6[0]||0,_8=_6[1]||0,_9=_6[2]||0,_10=_6[3]||0
;_5=_2.max=new Date(0,0,0,_7,_8,_9,_10)}else{_5=_2.max=isc.DateUtil.parseSchemaDate(_5)}
}
_2.dynamicErrorMessageArguments={validator:_2,max:_5,min:_4};_4.setFullYear(_3.getFullYear());_4.setMonth(_3.getMonth());_4.setDate(_3.getDate());_5.setFullYear(_3.getFullYear());_5.setMonth(_3.getMonth());_5.setDate(_3.getDate());if(isc.isA.Date(_4)&&((!_2.exclusive&&_3<_4)||(_2.exclusive&&_3<=_4)))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeLaterThanTime}
return false}
if(isc.isA.Date(_5)&&((!_2.exclusive&&_3>_5)||(_2.exclusive&&_3>=_5)))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeEarlierThanTime}
return false}
return true}
},floatLimit:{type:"floatLimit",valueType:"custom",dataType:"float",condition:function(_1,_2,_3){var _4;if(_2.precision!=null){if(_2.roundToPrecision==null)_2.roundToPrecision=true;if(!isc.Validator.processValidator(_1,_2,_3,"floatPrecision"))
return false;if(_2.resultingValue!=null)
_3=_4=_2.resultingValue}
if(_2.min!=null||_2.max!=null){if(!isc.Validator.processValidator(_1,_2,_3,"floatRange")){return false
}else{if(_4!=null&&_2.resultingValue==null&&_2.roundToPrecision)
_2.resultingValue=_4}
}
return true}
},floatRange:{type:"floatRange",title:"Value in range",description:"Value is a floating point number within the specified range",valueType:"custom",dataType:"float",editorType:"FloatRangeEditor",getAttributesFromEditor:function(_1,_2){var _3=_2.canvas;return _3.getValues()},setEditorAttributes:function(_1,_2,_3){var _4=_2.canvas;if(_3==null){_4.clearValues();return}
_4.setValue("min",_3.min);_4.setValue("max",_3.max);_4.setValue("exclusive",!!_3.exclusive)},condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(isc.isA.String(_3)){_3=_3.trim();if(_3.length==0){return true}
}
if(isNaN(_3))return true;var _4;if(isc.isA.Number(_3)){_4=_3}else{_4=parseFloat(_3)}
if(_1&&isc.booleanValue(_1.stringInBrowser)===true&&isc.isA.String(_3)){return true}
_2.dynamicErrorMessageArguments={validator:_2,max:_2.max,min:_2.min};var _5,_6;if(_2.max!=null){_5=isc.isA.Number(_2.max)?_2.max:parseFloat(_2.max)}
if(_2.min!=null){_6=isc.isA.Number(_2.min)?_2.min:parseFloat(_2.min)}
if(_1&&isc.booleanValue(_1.stringInBrowser,true)!==false&&isc.isA.String(_3)&&!(_3==_4.toString())){var _7=isc.BigDecimal.create(_3);if(isc.isA.Number(_5)&&((!_2.exclusive&&_7.compareTo(_5)>0)||(_2.exclusive&&_7.compareTo(_5)>=0)))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeLessThan
}
return false}
if(isc.isA.Number(_6)&&((!_2.exclusive&&_7.compareTo(_6)<0)||(_2.exclusive&&_7.compareTo(_6)<=0)))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeGreaterThan
}
return false}
return true}
if(isc.isA.Number(_5)&&(_4>Number.MAX_VALUE||_4==Number.POSITIVE_INFINITY||(!_2.exclusive&&_4>_5)||(_2.exclusive&&_4>=_5)))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeLessThan}
return false}
if(isc.isA.Number(_6)&&(_4<-Number.MAX_VALUE||_4==Number.NEGATIVE_INFINITY||(!_2.exclusive&&_4<_6)||(_2.exclusive&&_4<=_6)))
{if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.mustBeGreaterThan}
return false}
return true}
},floatPrecision:{type:"floatPrecision",title:"Floating point number precision check",description:"Value is a floating point number specified to the appropriate precision",valueType:"custom",dataType:"float",editorType:"FloatPrecisionEditor",getAttributesFromEditor:function(_1,_2){var _3=_2.canvas;return _3.getValues()},setEditorAttributes:function(_1,_2,_3){var _4=_2.canvas;if(_3==null){_4.clearValues();return}
_4.setValue("precision",_3.precision);_4.setValue("roundToPrecision",_3.roundToPrecision)},condition:function(_1,_2,_3){if(_3==null||isc.is.emptyString(_3))return true;if(isc.isA.String(_3)){_3=_3.trim();if(_3.length==0){return false}
}
if(isNaN(_3))return false;var _4=parseFloat(_3);if(_1&&isc.booleanValue(_1.stringInBrowser)===true&&isc.isA.String(_3)){return true}
if(_1&&isc.booleanValue(_1.stringInBrowser,true)!==false){var _5=!(_3==_4.toString());if(isc.isA.String(_3)&&_5){var r=new RegExp('^([+|-](?=\\d|(?:\\.(?=\\d))))?(\\d*)(\\.(?=\\d)\\d*)?(?:e([+|-])?(\\d+))?','i');var _7=r.exec(_3);if(_7[2]==null)_7[2]='';_7[2]=_7[2].replace(/^0+/,'');if(_7[3]==null)_7[3]='';if(_7[3].indexOf('.')==0)_7[3]=_7[3].substring(1);_7[3]=_7[3].replace(/0+$/,'');var _8=_7[2]+_7[3];if(_8.length<=16){var _8=_7[2]+_7[3]+'0000000000000000';_8=_8.substring(0,16);var _9=r.exec(_4.toExponential(16));if(_9[2]==null)_9[2]='';_9[2]=_9[2].replace(/^0+/,'');if(_9[3]==null)_9[3]='';if(_9[3].indexOf('.')==0)_9[3]=_9[3].substring(1);var _10=_9[2]+_9[3]+'0000000000000000';_10=_8.substring(0,16);_5=!(_8==_10)}else{_5=true}
}
if(isc.isA.String(_3)&&_5){return true}
}
if(isc.isA.Number(_2.precision)){var _11=Math.pow(10,_2.precision);var _12=(Math.round(_4*_11))/_11;if(_2.roundToPrecision){_2.resultingValue=_12;return true}else{return(_4==_12)}
}
}
},requiredIf:{type:"requiredIf",description:"Conditionally required field",valueType:"fieldType",dataType:"none",valueAttribute:"expression",editorType:"TextAreaItem",condition:function(_1,_2,_3,_4){if(_2.expression!=null&&!isc.isA.Function(_2.expression)){isc.Func.replaceWithMethod(_2,"expression","item,validator,value,record")}
var _5=_2.expression(_1,_2,_3,_4);var _6,_7,_8;if(_5&&(_6=isc.Validator.$1610(_1))!=null&&(_7=_6.getFocusElement())!=null&&(_8=_7.files)!=null)
{if(!_2.errorMessage){_2.errorMessage=isc.Validator.requiredFile}
var _9=_8.length;for(var i=0;i<_9;++i){var _11=_8[i],_12=_11.size||_11.fileSize;if(_12>0)return true}
return false}else{if(!_2.errorMessage){_2.errorMessage=isc.Validator.requiredField}
return!_5||(_3!=null&&!isc.isAn.emptyString(_3))}
}
},isOneOf:{type:"isOneOf",title:"Value in list",description:"Is one of list",valueType:"valueSet",dataType:"none",valueAttribute:"list",editorTitle:"Values",condition:function(_1,_2,_3,_4){if(_3==null||isc.is.emptyString(_3))return true;if(isc.isA.DynamicProperty(_3))return true;var _5=_2.list||(_1?(_1.getValueMap?_1.getValueMap()
:_1.valueMap)
:null),_6=_5;if(!isc.isAn.Array(_5)&&isc.isAn.Object(_5)){_6=isc.getKeys(_5)}
if(_6!=null){for(var i=0,_8=_6.length;i<_8;i++){if(_6[i]==_3)return true}
}else{isc.Log.logWarn("isOneOf validator specified with no specified list of options or valueMap - validator will always fail. Field definition:"+isc.Log.echo(_1),"validation")}
if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.notOneOf}
return false}
},inSet:{type:"inSet",title:"Value in set",description:"In list of values",valueType:"valueSet",dataType:"none",valueAttribute:"list",editorTitle:"Values",condition:function(_1,_2,_3,_4){if(_3==null||isc.is.emptyString(_3))return true;var _5=_2.list||(_1?(_1.getValueMap?_1.getValueMap()
:_1.valueMap)
:null),_6=_5;if(!isc.isAn.Array(_5)&&isc.isAn.Object(_5)){_6=isc.getKeys(_5)}
if(_6!=null){for(var i=0,_8=_6.length;i<_8;i++){if(_6[i]==_3)return true}
}else{isc.Log.logWarn("inSet validator specified with no specified list of options or valueMap - validator will always fail. Field definition:"+isc.Log.echo(_1),"validation")}
if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.notInSet}
return false}
},notInSet:{type:"notInSet",title:"Value in set",description:"Not in list of values",valueType:"valueSet",dataType:"none",valueAttribute:"list",editorTitle:"Values",condition:function(_1,_2,_3,_4){if(_3==null||isc.is.emptyString(_3))return true;var _5=_2.list,_6=_5;if(!isc.isAn.Array(_5)&&isc.isAn.Object(_5)){_6=isc.getKeys(_5)}
if(_6!=null){for(var i=0,_8=_6.length;i<_8;i++){if(_6[i]==_3)return true}
}else{isc.Log.logWarn("inSet validator specified with no specified list of options - validator will always fail. Field definition:"+isc.Log.echo(_1),"validation")}
if(!_2.errorMessage){_2.defaultErrorMessage=isc.Validator.notInSet}
return false}
},required:{type:"required",title:"Required",reifyName:"Required When",description:"Value must be provided if other record values match criteria",valueType:"none",dataType:"none",requiresApplyWhen:true,condition:function(_1,_2,_3,_4){var _5=isc.Validator.$1610(_1),_6,_7;if(_5!=null&&(_6=_5.getFocusElement())!=null&&(_7=_6.files)!=null)
{if(!_2.errorMessage){_2.errorMessage=isc.Validator.requiredFile}
var _8=_7.length;for(var i=0;i<_8;++i){var _10=_7[i],_11=_10.size||_10.fileSize;if(_11>0)return true}
return false}else{if(!_2.errorMessage){_2.errorMessage=isc.Validator.requiredField}
var _12=(_3!=null&&!isc.is.emptyString(_3));if(_12&&_1&&_1.multiple){if(isc.isAn.Array(_3)&&_3.isEmpty())_12=false}
return _12}
},action:function(_1,_2,_3,_4,_5){if(_2&&!_2.required){_2.$11m=(_1!=null)}
}
},equals:{type:"equals",title:"Equals value",description:"Equals value",valueType:"fieldType",condition:function(_1,_2,_3,_4){if(_2.value==null){isc.logWarn("equals validator is missing 'value' definition. Validator forced false.");return false}
return(_3==_2.value)}
},notEqual:{type:"notEqual",shortName:"Doesn't equal",title:"Not equal value",description:"Not equal value",valueType:"fieldType",condition:function(_1,_2,_3,_4){if(_2.value==null){isc.logWarn("not equals validator is missing 'value' definition. Validator forced false.");return false}
return(_3!=_2.value)}
},matchesField:{type:"matchesField",title:"Match another field",description:"Matches another field value",valueType:"fieldName",dataType:"none",valueAttribute:"otherField",editorTitle:"Field Name",condition:function(_1,_2,_3,_4){if(_2.otherField==null){isc.logWarn("matchesField validator is missing 'otherField' definition. Validator forced false.");return false}
var _5;if(isc.isA.String(_2.otherField)){_5=_2.otherField}else{_5=_2.otherField.dataPath||_2.otherField.name}
var _6=(isc.DataSource!=null?isc.DataSource.getPathValue(_4,_5,_2.otherField):_4[_5]);return(_3==_6)},getDependentFields:function(_1,_2){if(!_1.otherField||_1.otherField=="")return _1.fieldName;return[_1.fieldName,_1.otherField]}
},fieldCondition:{type:"fieldCondition",title:"Condition on Record Values",reifyName:"Condition on Record Values",description:"Always fails",requiresApplyWhen:true,condition:function(_1,_2,_3,_4){return false}
},isUnique:{type:"isUnique",title:"Value is unique",description:"Validate field value is unique on DataSource",valueType:"custom",dataType:"none",editorType:"IsUniqueEditor",editorTitle:"Options",hintText:" ",getAttributesFromEditor:function(_1,_2){var _3=_2.canvas;var _4={};if(_3.getValue("useMultipleFields")===true){_4.criteriaFields=(_3.getValue("selectFields")||[]).join(",")}
if(_3.getValue("isCaseSensitive")===true){_4.caseSensitive=true}
return _4},setEditorAttributes:function(_1,_2,_3){var _4=_2.canvas;if(_3==null){_4.clearValues();return}
_4.setValue("isCaseSensitive",_3.caseSensitive);_4.setValue("useMultipleFields",_3.criteriaFields&&_3.criteriaFields.length>0);_4.setValue("selectFields",(isc.isA.String(_3.criteriaFields)?_3.criteriaFields:"").split(","));_4.getItem("selectFields").setDisabled(_4.getValue("useMultipleFields")!==true)},condition:function(_1,_2,_3,_4,_5){if(!_4){if(isc.Log.logIsDebugEnabled('validation')){isc.Log.logDebug('Record is null, ignoring client-side isUnique validation for item '+_1.name,'validation')}
return true}
if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.mustBeUnique;if(!_1){isc.Log.logWarn('Item is null, ignoring client-side isUnique validation for item '+_1.name,'validation');_5.needsServerValidation=true;return true}
if(!_5&&(!_5.dataSource||!_5.component)){isc.logWarn('Component is null, ignoring client-side isUnique validation for item '+_1.name
);_5.needsServerValidation=true;return true}
var _6=_5.dataSource||_5.component.dataSource;if(!isc.isA.DataSource(_6)){_6=isc.DataSource.get(_6)}
if(!_6){isc.logWarn('Unable to derive dataSource from item. Ignoring client-side isUnique validation for item '+_1.name
);_5.needsServerValidation=true;return true}
var _7,_8=_2.checkComponentData;if(_8==null)_8="both";if(_5.component&&_8!="none"){var _9=_5.component,_10=_9.getOriginalData?_9.getOriginalData():_9.data,_11=isc.isA.ResultSet(_10)&&(_8=="forceBoth"||(_10.componentId==_9.ID&&(_10.fetchOperation==null||_10.fetchOperation==(_6.ID+"$2466"))
)
);if(_11){var _12=_10.getAllCachedRows(),_13=_10.allRowsCached();if(_12!=null&&(_12.length>0||_13)){_7=isc.Validator.getMatchingRecordsCriteria(_6,_1.name,_3,_2,_4);var _14=_6.applyFilter(_12,_7);if(_14&&_14.length>0){isc.Validator.logInfo("isUnique validator: Uniqueness check failed on client based on cached component data");return false}else{if(_13&&(_8=="both"||_8=="forceBoth"))
{isc.Validator.logInfo("isUnique validator: Uniqueness check satisfied by cached component data");return true}
}
}
}
}
if(!_6.clientOnly&&!(_6.cacheAllData&&_6.hasAllData())){isc.logInfo('DataSource '+_6.ID+' does not appear to have all rows loaded.  Skipping client-side isUnique validation on item'+_1.name
);_5.needsServerValidation=true;return true}
if(_7==null){_7=isc.Validator.getMatchingRecordsCriteria(_6,_1.name,_3,_2,_4)}
var _15=_6.getClientOnlyResponse({operationType:"fetch",data:_7
},null,true);return _15.data.length==0}
},hasRelatedRecord:{type:"hasRelatedRecord",valueType:"none",dataType:"none",title:"Value exists on related DataSource",description:"Validate field value exists on the related DataSource",requiresServer:true
},serverCustom:{type:"serverCustom",valueType:"none",dataType:"none",description:"Validate field value using a custom server expression",requiresServer:true
},maxFileSize:{type:"maxFileSize",description:"Size of file to be uploaded does not exceed maxFileSize",valueType:"custom",dataType:"binary",condition:function(_1,_2,_3,_4){if(!_2.errorMessage)_2.defaultErrorMessage=isc.Validator.maxFileSizeExceeded;_2.dynamicErrorMessageArguments=null;var _5=_2.maxFileSize;if(_5==null){isc.logWarn("maxFileSize validator specified with no maxFileSize. Validator will return false causing validation to fail.Field definition:"+isc.Log.echo(_1),"validation");return false}
var _6=isc.Validator.$1610(_1);if(_6==null){isc.logWarn("maxFileSize validator supported on editable UploadItem and FileItem only. This field appears to be the wrong editor type, or not be editable. Validator will return false causing validation to fail.\nField definition:"+isc.Log.echo(_1),"validation");return false}
var _7=_6.getFocusElement();if(_7==null)return true;var _8=_7.files,_9;if(_8==null||(_9=_8.length)==0)return true;for(var i=0;i<_9;++i){var _11=_8[i];var _12=_11.size||_11.fileSize;if(_12==null)continue;if(_12>=_5){var _13=_11.webkitRelativePath||_11.name||_11.fileName;_2.dynamicErrorMessageArguments={uploadedFileName:String(_13).asHTML(),uploadedFileSize:_12,maxFileSize:_5
};return false}
}
return true}
},message:{type:"message",title:"Display message",description:"Displays an informational or warning message",valueType:"none",dataType:"none",isRule:true,supportedTargets:["FormItem"],action:function(_1,_2,_3,_4,_5){var _6=_3.displayMode,_7=(_3.message==null?"errorMessage":"message"),_8=isc.Validator.getErrorMessage(_3,_7);if(_6=="form"){if(!_5.addFieldErrors){return}
if(_1==true){_5.addFieldErrors(_2.name,_8,true)}else{_5.setFieldErrors(_2.name,null,true)}
}else if(_6=="transient"){if(_1==true){var _9=function(){if(_5&&_5.hasFocus)_5.blur();isc.showFadingPrompt(_8,_3.duration)};isc.Page.setEvent("idle",_9,isc.Page.FIRE_ONCE)}
}else{var _10=_3.severity;if(_1==true){var _9=function(){if(_5&&_5.hasFocus)_5.blur();if(_10=="warning"){isc.warn(_8)}else{isc.say(_8)}
};isc.Page.setEvent("idle",_9,isc.Page.FIRE_ONCE)}
}
}
},populate:{type:"populate",title:"Populate value",description:"Populates a target field with a value calculated based on values in other fields",valueType:"custom",dataType:"none",editorType:"PopulateRuleEditor",getAttributesFromEditor:function(_1,_2){return _2.getValue()},setEditorAttributes:function(_1,_2,_3){if(_3!=null&&_3.formula!=null){_2.setValue({formula:_3.formula,formulaVars:_3.formulaVars})}else{_2.clearValue()}
},isRule:true,supportedTargets:["FormItem","Canvas"],action:function(_1,_2,_3,_4,_5,_6){if(_1!=true)return;var _7=isc.DynamicProperty.evalSimpleExpression(_3,_4,_3.targetRuleScope,_5,_6,_2),_8=(_6=="Canvas"?_2:_2.name)
;var _9=_3.targetType,_10
;if(isNaN(_7)){_7=_10}
if(_7!=null&&_9!=null){var _11=_9&&isc.SimpleType.getType(_9);if(_11&&_11.parseInput){_7=_11.parseInput(_7)}else if("boolean"==_9){_7=("true"==_7.toLowerCase())}else if(("text"==_9||"string"==_9)&&!isc.isA.String(_7))
{_7=""+_7}
}
var _12=_3.logCategory||"rulesEngine",_13=isc.Log.logIsDebugEnabled(_12),_14=!_13&&isc.Log.logIsInfoEnabled(_12)
;if(_6=="FormItem"){if(_2&&_2.setValue){var _15=_2.getValue(),_16=_2.$176o,_17=(_16==null&&_7!=null),_18=(_3.autoPopulateClearedFlag!=false&&_16!=null&&_15==null&&!_2.hasFocus),_19=!_3.overwriteInvalidValue||_17||_18
;if(_2.$176n){_19=true;delete _2.$176n}
if(!_19&&_2.form&&_16!=null){_19=true;if(_2.canEdit!=false&&_15!=_16){var _20={skipServerValidation:true
},_21=_2.form.validateField(_2,_2.validators,_15,_2.form.getValues(),_20)
;_19=(!_2.isFocused()&&_21&&!_21.valid)}
}
if(_19&&_15!=_7){_2.setValue(_7);_2.$176o=_7;if(_2.form&&_2.form.rulesEngine){isc.Class.delayCall("processChanged",[_2.form,_2],0,_2.form.rulesEngine)}
if(_14){isc.Log.logInfo("Set (populate) '"+_2.form.ID+"."+_2.name+"' to"+(_15==null?" [initial value]: ":": ")+_7,_12)}
}else if(_19&&_13){var _22="["+(_15==null?"initial":(_15!=_7?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populate) '"+_2.form.ID+"."+_2.name+"' to "+_22+": "+_7,_12)}
}else if(_2&&_5&&_5.setValue){var _23=_2.fieldName;if(_23==null)_23=_2.dataPath;var _15=_5.getValue(_23);if(_15!=_7){_5.setValue(_23,_7);if(_14){isc.Log.logInfo("Set (populate) '"+_5.ID+"."+_23+"' to"+(_15==null?" [initial value]: ":": ")+_7,_12)}
}else if(_13){var _22="["+(_15==null?"initial":(_15!=_7?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populate) '"+_5.ID+"."+_23+"' to "+_22+": "+_7,_12)}
}
}else{var _15=(_5.getProperty?_5.getProperty(_8):_5[_8]);if(_5.setProperty)_5.setProperty(_8,_7);else _5[_8]=_7;if(_14&&_15!=_7){isc.Log.logInfo("Set (populate) '"+_5.ID+"."+_8+"' to"+(_15==null?" [initial value]: ":": ")+_7,_12)}else if(_13){var _22="["+(_15==null?"initial":(_15!=_7?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populate) '"+_5.ID+"."+_8+"' to "+_22+": "+_7,_12)}
}
},getDependentFields:function(_1,_2){if(_1.formulaVars==null||!isc.isAn.Object(_1.formulaVars))return null;var _3=[];for(var _4 in _1.formulaVars){_3.add(_1.formulaVars[_4])}
return _3}
},populateText:{type:"populateText",title:"Populate text value",description:"Populates a target field with a text value formatted from values in other fields",valueType:"custom",dataType:"none",editorType:"PopulateTextRuleEditor",getAttributesFromEditor:function(_1,_2){return _2.getValue()},setEditorAttributes:function(_1,_2,_3){if(_3!=null&&_3.formula!=null){_2.setValue({formula:_3.formula,formulaVars:_3.formulaVars})}else{_2.clearValue()}
},isRule:true,supportedTargets:["FormItem","Canvas"],action:function(_1,_2,_3,_4,_5,_6){if(_1!=true)return;if(!_3.template){_3.template=_3.formula;delete _3.formula}
var _7=isc.DynamicProperty.evalSimpleExpression(_3,_4,_3.targetRuleScope,_5,_6,_2),_8=(_6=="Canvas"?_2:_2.name)
;var _9=_3.targetType;if(_7!=null&&_9!=null){var _10=_9&&isc.SimpleType.getType(_9);if(_10&&_10.parseInput){_7=_10.parseInput(_7)}else if("boolean"==_9){_7=("true"==_7.toLowerCase())}else if(("text"==_9||"string"==_9)&&!isc.isA.String(_7))
{_7=""+_7}
}
var _11=_3.logCategory||"rulesEngine",_12=isc.Log.logIsDebugEnabled(_11),_13=!_12&&isc.Log.logIsInfoEnabled(_11)
;if(_6=="FormItem"){if(_2.setValue){var _14=_2.getValue(),_15=_2.$176o,_16=(_15==null&&_7!=null),_17=(_3.autoPopulateClearedFlag!=false&&_15!=null&&_14==null&&!_2.hasFocus),_18=!_3.overwriteInvalidValue||_16||_17
;if(_2.$176n){_18=true;delete _2.$176n}
if(!_18&&_2.form&&_15!=null){_18=true;if(_2.canEdit!=false&&_14!=_15){var _19={skipServerValidation:true
},_20=_2.form.validateField(_2,_2.validators,_14,_2.form.getValues(),_19)
;_18=(!_2.isFocused()&&_20&&!_20.valid)}
}
if(_18&&_14!=_7){_2.setValue(_7);_2.$176o=_7;if(_2.form&&_2.form.rulesEngine){isc.Class.delayCall("processChanged",[_2.form,_2],0,_2.form.rulesEngine)}
if(_13){isc.Log.logInfo("Set (populateText) '"+_2.form.ID+"."+_2.name+"' to"+(_14==null?" [initial value]: ":": ")+_7,_11)}
}else if(_18&&_12){var _21="["+(_14==null?"initial":(_14!=_7?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populateText) '"+_2.form.ID+"."+_2.name+"' to "+_21+": "+_7,_11)}
}else if(_5&&_5.setValue){var _22=_2.fieldName;if(_22==null)_22=_2.dataPath;var _14=_5.getValue(_22);if(_14!=_7){_5.setValue(_22,_7);if(_13){isc.Log.logInfo("Set (populateText) '"+_5.ID+"."+_22+"' to"+(_14==null?" [initial value]: ":": ")+_7,_11)}
}else if(_12){var _21="["+(_14==null?"initial":(_14!=_7?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populateText) '"+_5.ID+"."+_22+"' to "+_21+": "+_7,_11)}
}
}else{var _14=(_5.getProperty?_5.getProperty(_8):_5[_8]);if(_5.setProperty)_5.setProperty(_8,_7);else _5[_8]=_7;if(_13&&_14!=_7){isc.Log.logInfo("Set (populateText) '"+_5.ID+"."+_8+"' to"+(_14==null?" [initial value]: ":": ")+_7,_11)}else if(_12){var _21="["+(_14==null?"initial":(_14!=_7?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populateText) '"+_5.ID+"."+_8+"' to "+_21+": "+_7,_11)}
}
},getDependentFields:function(_1,_2){if(_1.formulaVars==null||!isc.isAn.Object(_1.formulaVars)||isc.isAn.emptyArray(_1.formulaVars))return null;var _3=[];for(var _4 in _1.formulaVars){_3.add(_1.formulaVars[_4])}
return _3}
},populateExpression:{type:"populateExpression",title:"Populate expression",description:"Populates a target field with a value calculated based on values in other fields",valueType:"custom",dataType:"none",editorType:"PopulateRuleEditor",getAttributesFromEditor:function(_1,_2){return _2.getValue()},setEditorAttributes:function(_1,_2,_3){if(_3!=null&&_3.formula!=null){_2.setValue({formula:_3.formula,formulaVars:_3.formulaVars})}else{_2.clearValue()}
},isRule:true,supportedTargets:["FormItem"],action:function(_1,_2,_3,_4,_5,_6){if(_1!=true)return;var _7=isc.DynamicProperty.evalSimpleExpression(_3,_4,_3.targetRuleScope,_5,_6,_2);var _8=function(_22,_23,_24){return _22=="date"?(isc.DateUtil.compareDates(_23,_24)==0):(_23==_24)};var _9=_3.logCategory||"rulesEngine",_10=isc.Log.logIsDebugEnabled(_9),_11=!_10&&isc.Log.logIsInfoEnabled(_9)
;if(_2.setValue){var _12=_2.type||_2.defaultType,_13=_2.getValue(),_14=_2.$176o,_15=(_14==null),_16=(_3.autoPopulateClearedFlag!=false&&_14!=null&&_13==null&&!_2.hasFocus),_17=!_3.overwriteInvalidValue||_15||_16
;if(_2.$176n){_17=true;delete _2.$176n}
if(!_17&&_2.form&&_14!=null){_17=true;if(_2.canEdit!=false&&!_8(_12,_13,_14)){var _18={skipServerValidation:true
},_19=_2.form.validateField(_2,_2.validators,_13,_2.form.getValues(),_18)
;_17=(_19&&!_19.valid)}
}
if(_17&&!_8(_12,_13,_7)){_2.setValue(_7);_2.$176o=_7;if(_2.form&&_2.form.rulesEngine){isc.Class.delayCall("processChanged",[_2.form,_2],0,_2.form.rulesEngine)}
if(_11){isc.Log.logInfo("Set (populateExpression) '"+_2.form.ID+"."+_2.name+"' to"+(_13==null?" [initial value]: ":": ")+_7,_9)}
}else if(_17&&_10){var _20="["+(_13==null?"initial":(_13!=_7?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populateExpression) '"+_2.form.ID+"."+_2.name+"' to "+_20+": "+_7,_9)}
}else if(_5&&_5.setValue){var _21=_2.fieldName;if(_21==null)_21=_2.dataPath;var _13=_5.getValue(_21);if(_13!=_7){_5.setValue(_21,_7);if(_11){isc.Log.logInfo("Set (populateExpression) '"+_5.ID+"."+_21+"' to"+(_13==null?" [initial value]: ":": ")+_7,_9)}
}else if(_10){var _20="["+(_13==null?"initial":(_13!=_7?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populateExpression) '"+_5.ID+"."+_21+"' to "+_20+": "+_7,_9)}
}
},getDependentFields:function(_1,_2){if(_1.formulaVars==null||!isc.isAn.Object(_1.formulaVars))return null;var _3=[];for(var _4 in _1.formulaVars){_3.add(_1.formulaVars[_4])}
return _3}
},populateFromDataPath:{type:"populateFromDataPath",title:"Populate value from ruleScope DataPath",description:"Populates a target with a DataPath value",valueType:"custom",dataType:"none",getAttributesFromEditor:function(_1,_2){return _2.getValue()},setEditorAttributes:function(_1,_2,_3){if(_3!=null&&_3.formula!=null){_2.setValue({formula:_3.formula,formulaVars:_3.formulaVars})}else{_2.clearValue()}
},isRule:true,supportedTargets:["FormItem","Canvas"],action:function(_1,_2,_3,_4,_5,_6){if(_1!=true)return;var _7=(_6=="Canvas"?_2:_2.name),_8=_3.targetType,_9
;if(!_3.dataPath){_3.dataPath=_3.formula;delete _3.formula}
var _10=isc.DynamicProperty.evalSimpleExpression(_3,_4,_3.targetRuleScope,_5,_6,_2);if(_10!=null&&_8!=null){var _11=_8&&isc.SimpleType.getType(_8);if(_11&&_11.parseInput){_10=_11.parseInput(_10)}else if("boolean"==_8){_10=("true"==_10.toLowerCase())}else if(("text"==_8||"string"==_8)&&!isc.isA.String(_10))
{_10=""+_10}
}
var _12=_3.logCategory||"rulesEngine",_13=isc.Log.logIsDebugEnabled(_12),_14=!_13&&isc.Log.logIsInfoEnabled(_12)
;if(_6=="FormItem"){if(_2.setValue){var _15=_2.getValue(),_16=_2.$176o,_17=(_16==null),_18=(_3.autoPopulateClearedFlag!=false&&_16!=null&&_15==null&&!_2.hasFocus),_19=!_3.overwriteInvalidValue||_17||_18
;if(_2.$176n){_19=true;delete _2.$176n}
if(!_19&&_2.form&&_16!=null){_19=true;if(_2.canEdit!=false&&_15!=_16){var _20={skipServerValidation:true
},_21=_2.form.validateField(_2,_2.validators,_15,_2.form.getValues(),_20)
;_19=(_21&&!_21.valid)}
}
if(_19&&_15!=_10){_2.setValue(_10);_2.$176o=_10;if(_2.form&&_2.form.rulesEngine){isc.Class.delayCall("processChanged",[_2.form,_2],0,_2.form.rulesEngine)}
if(_14&&_15!=_10){isc.Log.logInfo("Set (populateFromDataPath) '"+_2.form.ID+"."+_2.name+"' to"+(_15==null?" [initial value]: ":": ")+_10,_12)}
}else if(_19&&_13){var _22="["+(_15==null?"initial":(_15!=_10?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populateFromDataPath) '"+_2.form.ID+"."+_2.name+"' to "+_22+": "+_10,_12)}
}else if(_5&&_5.setValue){var _23=_2.fieldName;if(_23==null)_23=_2.dataPath;var _15=_5.getValue(_23);if(_15!=_10){_5.setValue(_23,_10);if(_14&&_15!=_10){isc.Log.logInfo("Set (populateFromDataPath) '"+_5.ID+"."+_23+"' to"+(_15==null?" [initial value]: ":": ")+_10,_12)}
}else if(_13){var _22="["+(_15==null?"initial":(_15!=_10?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populateFromDataPath) '"+_5.ID+"."+_23+"' to "+_22+": "+_10,_12)}
}
}else{var _15=(_5.getProperty?_5.getProperty(_7):_5[_7]);if(_5.setProperty)_5.setProperty(_7,_10);else _5[_7]=_10;if(_14&&_15!=_10){isc.Log.logInfo("Set (populateFromDataPath) '"+_5.ID+"."+_7+"' to"+(_15==null?" [initial value]: ":": ")+_10,_12)}else if(_13){var _22="["+(_15==null?"initial":(_15!=_10?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populateFromDataPath) '"+_5.ID+"."+_7+"' to "+_22+": "+_10,_12)}
}
},getDependentFields:function(_1,_2){if(_1.formulaVars==null||!isc.isAn.Object(_1.formulaVars)||isc.isAn.emptyArray(_1.formulaVars))return null;var _3=[];for(var _4 in _1.formulaVars){_3.add(_1.formulaVars[_4])}
return _3}
},populateFromCriteria:{type:"populateFromCriteria",title:"Populate value from ruleScope DataPath",description:"Populates a target with boolean derived from an AdvancedCriteria",valueType:"custom",dataType:"none",getAttributesFromEditor:function(_1,_2){return _2.getValue()},setEditorAttributes:function(_1,_2,_3){if(_3!=null&&_3.formula!=null){_2.setValue({formula:_3.formula,formulaVars:_3.formulaVars})}else{_2.clearValue()}
},isRule:true,supportedTargets:["FormItem","Canvas"],action:function(_1,_2,_3,_4,_5,_6){if(_1!=true)return;if(!_3.trueWhen){_3.trueWhen=_3.formula;delete _3.formula}
var _7=isc.DynamicProperty.evalSimpleExpression(_3,_4,_3.targetRuleScope,_5,_6,_2);var _8=_3.logCategory||"rulesEngine",_9=isc.Log.logIsDebugEnabled(_8),_10=!_9&&isc.Log.logIsInfoEnabled(_8)
;if(_6=="Canvas"){var _11=(_5.getProperty?_5.getProperty(_2):_5[_2]);if(_5.setProperty)_5.setProperty(_2,_7);else _5[_2]=_7;if(_10&&_11!=_7){isc.Log.logInfo("Set (populateFromCriteria) '"+_5.ID+"."+_2+"' to"+(_11==null?" [initial value]: ":": ")+_7,_8)}else if(_9){var _12="["+(_11==null?"initial":(_11!=_7?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populateFromCriteria) '"+_5.ID+"."+_2+"' to "+_12+": "+_7,_8)}
}
},getDependentFields:function(_1,_2){return null}
},populateFromMapping:{type:"populateFromMapping",title:"Populate enum value from ruleScope criteria mapping",description:"Populates a target with value derived from a criteria mapping",valueType:"custom",dataType:"none",isRule:true,supportedTargets:["FormItem","Canvas"],action:function(_1,_2,_3,_4,_5,_6){if(_1!=true)return;var _7=isc.DynamicProperty.evalValueFrom(_3.formula,_4,_3.targetRuleScope,_5,_6,_2);var _8=_3.targetType;if(_7!=null&&_8!=null){var _9=_8&&isc.SimpleType.getType(_8);if(_9&&_9.parseInput){_7=_9.parseInput(_7)}else if("boolean"==_8){_7=("true"==_7.toLowerCase())}else if(("text"==_8||"string"==_8)&&!isc.isA.String(_7))
{_7=""+_7}
}
var _10=_3.logCategory||"rulesEngine",_11=isc.Log.logIsDebugEnabled(_10),_12=!_11&&isc.Log.logIsInfoEnabled(_10)
;if(_6=="Canvas"){var _13=(_5.getProperty?_5.getProperty(_2):_5[_2]);if(_5.setProperty)_5.setProperty(_2,_7);else _5[_2]=_7;if(_12&&_13!=_7){isc.Log.logInfo("Set (populateFromMapping) '"+_5.ID+"."+_2+"' to"+(_13==null?" [initial value]: ":": ")+_7,_10)}else if(_11){var _14="["+(_13==null?"initial":(_13!=_7?"changed":"existing"))+" value]"
isc.Log.logDebug("Set (populateFromMapping) '"+_5.ID+"."+_2+"' to "+_14+": "+_7,_10)}
}
},getDependentFields:function(_1,_2){return null}
},setRequired:{type:"setRequired",title:"Set required",description:"Set field required state",valueType:"none",dataType:"none",isRule:true,supportedTargets:["FormItem"],action:function(_1,_2,_3,_4,_5){if((_3.logCategory&&isc.Log.logIsDebugEnabled(_3.logCategory))||(!_3.logCategory&&isc.Log.logIsDebugEnabled("rulesEngine")))
{isc.Log.logDebug("Perform 'setRequired' rule action with result: "+_1,_3.logCategory||"rulesEngine")}
var _6=!!_1;var _7=_2;if(!_7.setRequired&&_5.getItem){_7=_5.getItem(_2.name||_2.dataPath)}
var _8=(_7||_2).required;if(_7&&_7.setRequired){_7.setRequired(_6)}else{_2.required=_6}
var _9=_3.logCategory||"rulesEngine",_10=isc.Log.logIsDebugEnabled(_9),_11=!_10&&isc.Log.logIsInfoEnabled(_9)
;if(_10||_11){if(_11&&_8!=_6){isc.Log.logInfo("Set field "+(_6?"":"not ")+"required "+_7.form.ID+"."+_7.name+"'",_9)}else if(_10){isc.Log.logDebug("Set field "+(_1?"":"not ")+"required "+_7.form.ID+"."+_7.name+"'",_9)}
}
}
},readOnly:{type:"readOnly",valueType:"custom",dataType:"none",editorType:"ReadOnlyRuleEditor",valueAttribute:"fieldAppearance",title:"Set read-only appearance",description:"Set field read-only state/appearance",isRule:true,supportedTargets:["FormItem","ListGridField","Canvas","Section"],action:function(_1,_2,_3,_4,_5,_6){if(_2.editingOn)_1=false;var _7;if(_3.fieldAppearance==isc.Validator.HIDDEN){if(_1==true){if(_5==null){if(_2.hide){_7=!_2.isVisible();_2.hide()}
}else{if(_6=="Section"){var _8=_5.getSection(_2);_7=_8&&_8.hidden;_5.hideSection(_2)}else if(_6=="FormItem"){var _9=_5.getField(_9);_7=_9&&!_9.isVisible(true);_5.hideItem(_2)}
}
}else{if(_5==null){if(_2.show){_7=!_2.isVisible();_2.show()}
}else{if(_6=="Section"){var _8=_5.getSection(_2);_7=_8&&_8.hidden;_5.showSection(_2)}else if(_5.showField){var _9=_5.getField(_9);_7=_9&&!_9.isVisible(true);_5.showField(_2)}
}
}
}else if(_3.fieldAppearance==isc.Validator.DISABLED){if(_1==true){if(_5==null){_7=!_2.isDisabled();_2.disable()}else{if(_6=="Section"){_7=!_2.isDisabled();_2.disable();if(_2.items){for(var i=0;i<_2.items.length;i++){_2.items[i].disable()}
}
}else if(_5.disableField){var _9=_5.getField(_9);_7=_9&&!_9.isDisabled();_5.disableField(_2)}
}
}else{if(_5==null){_7=!_2.isDisabled();_2.enable()}else{if(_6=="Section"){_7=!_2.isDisabled();_2.enable();if(_2.items){for(var i=0;i<_2.items.length;i++){_2.items[i].enable()}
}
}else if(_5.enableField){var _9=_5.getField(_9);_7=_9&&!_9.isDisabled();_5.enableField(_2)}
}
}
}else if(_5.setFieldCanEdit){if(_6!="FormItem"&&_6!="ListGridField"){isc.logWarn("ReadOnly rule with fieldAppearance set to '"
+_3.fieldAppearance+"' not supported for specified locator:"
+_3.locator);_7=_1}else{var _9=_5.getField(_2.name);switch(_6){case"FormItem":_7=_9&&!_9.getCanEdit();break;case"ListGridField":_7=_9&&!_9.canEdit;break}
_5.setFieldCanEdit(_2.name,_1!=true)}
}
var _11=_3.logCategory||"rulesEngine",_12=isc.Log.logIsDebugEnabled(_11),_13=!_12&&isc.Log.logIsInfoEnabled(_11)
;if(_12||_13){var _14=(_6=="FormItemIcon"?_5.form.ID+"."+_5.name+".":(_5?_5.ID+".":""));if(_13&&_7!=!!_1){isc.Log.logInfo("Set "+(_1?"read-only":"editable")+" (appearance "+_3.fieldAppearance+") "+_6+" '"+_14+(_2.name||_2.ID)+"'",_11)}else if(_12){var _15=(_7!=!!_1?"":" [not changed]");isc.Log.logDebug("Set "+(_1?"read-only":"editable")+" (appearance "+_3.fieldAppearance+") "+_6+" '"+_14+(_2.name||_2.ID)+"'"+_15,_11)}
}
}
},visibility:{type:"visibility",valueType:"custom",dataType:"none",title:"Set visibility",description:"Set field visibility",isRule:true,supportedTargets:["FormItem","FormItemIcon","Canvas","Section","MenuItem","Tab","ListGridField"],action:function(_1,_2,_3,_4,_5,_6){if(_2.editingOn){if(!_1){_2.editProxy.setHiddenByRule(true);_1=true}else{_2.editProxy.setHiddenByRule(false)}
}
var _7;if(_6=="Section"){var _8=_5.getSection(_2);_7=_8&&!_8.hidden;if(_1==true){_5.showSection(_2)}else{_5.hideSection(_2)}
}else if(_6=="FormItemIcon"){var _9=_5.getIcon(_2);_7=_9.visible;if(_1==true){_5.showIcon(_2)}else{_5.hideIcon(_2)}
}else if(_6=="FormItem"){if(_5!=null){var _10=_5.getField(_10);_7=_10&&_10.isVisible(true);if(_1)_5.showField(_2);else _5.hideField(_2)}
}else{var _11=_5||_2;var _12=_11.processVisibilityRule(_1,_3);_7=_12?!_1:_1}
var _13=_3.logCategory||"rulesEngine",_14=isc.Log.logIsDebugEnabled(_13),_15=!_14&&isc.Log.logIsInfoEnabled(_13)
;if(_14||_15){var _16=(_6=="FormItemIcon"?_5.form.ID+"."+_5.name+".":(_5?_5.ID+".":""));if(_15&&_7!=!!_1){isc.Log.logInfo((_1?"Show ":"Hide ")+_6+" '"+_16+(_2.ID||_2.name)+"'",_13)}else if(_14){isc.Log.logDebug((_1?"Show ":"Hide ")+_6+" '"+_16+(_2.ID||_2.name)+"'",_13)}
}
}
},enable:{type:"enable",valueType:"custom",dataType:"none",title:"Enable/disable",description:"Enable/disable field",isRule:true,supportedTargets:["FormItem","FormItemIcon","Canvas","Section","MenuItem","NavItem","Tab","ListGridField"],action:function(_1,_2,_3,_4,_5,_6){var _7;if(_6=="Section"){_7=!_2.isDisabled();if(_1){_2.enable();if(_2.items){for(var i=0;i<_2.items.length;i++){_2.items[i].enable()}
}
}else{_2.disable();if(_2.items){for(var i=0;i<_2.items.length;i++){_2.items[i].disable()}
}
}
}else if(_6=="FormItemIcon"){_7=_5.iconIsDisabled(_2);_5.setIconDisabled(_2,!_1)}else if(_6=="FormItem"){if(_5!=null){var _9=_5.getField(_9);_7=_9&&!_9.isDisabled();if(_1)_5.enableField(_2);else _5.disableField(_2)}
}else{var _10=_5||_2,_11=_10.processEnableRule(_1,_3);_7=_11?!_1:!!_1}
var _12=_3.logCategory||"rulesEngine",_13=isc.Log.logIsDebugEnabled(_12),_14=!_13&&isc.Log.logIsInfoEnabled(_12)
;if(_13||_14){var _15=(_6=="FormItemIcon"?_5.form.ID+"."+_5.name+".":(_5?_5.ID+".":"")),_16=(_6=="MenuItem"?_2.getItem(_3.menuItem).title:(_2.ID||_2.name))
;if(_14&&_7!=!!_1){isc.Log.logInfo((_1?"Enabling ":"Disabling ")+_6+" '"+_15+_16+"'",_12)}else if(_13){isc.Log.logDebug((_1?"Enabling ":"Disabling ")+_6+" '"+_15+_16+"'",_12)}
}
}
}
};isc.A.$93n=false;isc.B.push(isc.A.$1610=function isc_c_Validator__getUploadItem(_1){if(!isc.isAn.UploadItem||!(isc.isAn.UploadItem(_1)||(isc.isA.FileItem&&isc.isA.FileItem(_1)&&isc.isAn.UploadItem(_1.uploadItem))))
{return null}
var _2=_1;if(isc.isA.FileItem&&isc.isA.FileItem(_1)){_2=_1.uploadItem}
return _2}
);isc.evalBoundary;isc.B.push();isc.B._maxIndex=isc.C+1;isc.A=isc.Validator;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.emailFormatErrorMessage="Must be in the form name@host.com";isc.A.emailGeneralErrorMessage="Your email address does not appear to be valid. Please check the spelling and try again";isc.B.push(isc.A.create=function isc_c_Validator_create(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13){this.logWarn("A Validator shouldn't be created directly. Instead pass properties as each Validator in a FormItem's validators property or wherever a Validator is needed.");return isc.addProperties({},_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12,_13)}
,isc.A.getValidatorType=function isc_c_Validator_getValidatorType(_1){var _2=_1.type;if(_2==null&&_1._constructor)_2=_1._constructor;return _2}
,isc.A.isServerValidator=function isc_c_Validator_isServerValidator(_1){if(_1.serverOnly)return true;var _2=this.$74u[this.getValidatorType(_1)];if(_2!=null&&_2.requiresServer)return true;return false}
,isc.A.processValidator=function isc_c_Validator_processValidator(_1,_2,_3,_4,_5,_6){if(_2.serverOnly)return true;if(_4==null)_4=isc.Validator.getValidatorType(_2);if(_6==null)_6={};var _7=true;var _8;if(_4!=null)_8=this.$74u[_4];if(_2.isRule||(_8&&_8.isRule)){return true}
var _9;if(_8==null){if(_2.condition){if(!isc.isA.Function(_2.condition)){this.logDebug("Creating function for validation condition:\r"+_2.condition);isc.Func.replaceWithMethod(_2,"condition","item,validator,value,record")}
_9=_2.condition}
}else{if(_8.requiresServer==true){return true}
if(isc.isA.String(_8.condition)){this.logDebug("Creating function for validation condition:\r"+_8.condition);isc.Func.replaceWithMethod(_8,"condition","item,validator,value,record")}
_9=_8.condition;if(!_2.errorMessage&&!_2.defaultErrorMessage){_2.defaultErrorMessage=_8.defaultErrorMessage}
}
if(_9!=null){if(_8){_6.validatorDefinition=_8}
var _10=_2.validateEachItem;if(_10==null&&_1)_10=_1.validateEachItem;if(_10==null&&_1&&_1.multiple)_10=true;if(_1&&_1.multiple&&_10&&(isc.isAn.Array(_3)))
{var _11;if(_3.length>0){var _12=[];for(var i=0;i<_3.length;i++){delete _2.resultingValue;_7=_7&&_9(_1,_2,_3[i],_5,_6);_12[i]=(_2.resultingValue!=null?_2.resultingValue:_3[i])}
_2.resultingValue=_12}else{var _11,_14=_11,_15=_2.validateEmptyArray;if(_15==null&&_1)_15=_1.validateEmptyArray;if(_1.validateEmptyArray)_14=_3;delete _2.resultingValue;_7=_9(_1,_2,_14,_5,_6)}
}else{delete _2.resultingValue;_7=_9(_1,_2,_3,_5,_6)}
}else{this.logWarn("validator not understood on item: "+isc.echo(_1)+":\r"+isc.echo(_2))}
delete _6.validatorDefinition;return _7}
,isc.A.performAction=function isc_c_Validator_performAction(_1,_2,_3,_4,_5,_6){var _7=this.getValidatorType(_3);var _8;if(_7!=null)_8=this.$74u[_7];if(_6==null)_6="FormItem";var _9=_3.isRule,_10=_3.supportedTargets;var _11;if(_8!=null){if(isc.isA.String(_8.action)){this.logDebug("Creating function for validation action:\r"+_8.action);isc.Func.replaceWithMethod(_8,"action","result,item,validator,record,component,targetObjectType")}
_11=_8.action;if(_9==null)_9=_8.isRule;if(_9&&_10==null){_10=_8.supportedTargets||["FormItem"]
}
}
if(_9&&!_10.contains(_6)){this.logWarn("Rule of type:"+_7+" called for target object "+_2+", of type:"+_6+". This is not a valid target for this rule. Ignoring.")}
if(_11==null&&_3.action){if(!isc.isA.Function(_3.action)){this.logDebug("Creating function for validation action:\r"+_3.action);isc.Func.replaceWithMethod(_3,"action","result,item,validator,record,component,targetObjectType")}
_11=_3.action}
if(_11!=null){_11(_1,_2,_3,_4,_5,_6);if(_1&&_3.trackFireTime)_3.$143n=new Date()}
}
,isc.A.getErrorMessage=function isc_c_Validator_getErrorMessage(_1,_2){var _3=_2?_1[_2]:_1.errorMessage;if(_3==null)_3=_1.defaultErrorMessage;if(_3&&_1.dynamicErrorMessageArguments){_3=_3.evalDynamicString(null,_1.dynamicErrorMessageArguments)}
return _3}
,isc.A.getShortName=function isc_c_Validator_getShortName(_1){var _2=(this.$179e?this.$179e[_1]:null);if(!_2){_2=isc.DS.getAutoTitle(_1);if(!this.$179e)this.$179e={};this.$179e[_1]=_2}
return _2}
,isc.A.addValidator=function isc_c_Validator_addValidator(_1,_2){if(isc.isA.String(_1)){var _3={};_3[_1]=_2;return this.addValidators(_3)}
}
,isc.A.addValidators=function isc_c_Validator_addValidators(_1){for(var _2 in _1){var _3={};_3.type=_2;_3.condition=_1[_2];if(!isc.isA.Function(_3.condition)){isc.Func.replaceWithMethod(_3,"condition","item,validator,value")}
_1[_2]=_3}
this.addValidatorDefinitions(_1)}
,isc.A.addValidatorDefinition=function isc_c_Validator_addValidatorDefinition(_1,_2){if(!isc.isAn.Object(_2)){isc.logWarn("Invalid validator in call to addValidatorDefinition. Ignored.")}
var _3={};_3[_1]=_2;return this.addValidatorDefinitions(_3)}
,isc.A.addValidatorDefinitions=function isc_c_Validator_addValidatorDefinitions(_1){if(!_1||!isc.isAn.Object(_1))return;for(var _2 in _1){if(this.$74u[_2]){isc.logWarn("addValidatorDefinitions: Validator definition already exists for type "+_2+". Replacing.")}
}
isc.addProperties(this.$74u,_1)}
,isc.A.getValidatorDefinition=function isc_c_Validator_getValidatorDefinition(_1){return this.$74u[_1]}
,isc.A.getStandardEmailValidators=function isc_c_Validator_getStandardEmailValidators(_1){return[{type:"lengthRange",max:100,min:8,errorMessage:this.emailGeneralErrorMessage},{type:"regexp",errorMessage:this.emailFormatErrorMessage,expression:"^([a-zA-Z0-9_.\\-+])+@(?!abcd)(?!asd)(([a-zA-Z0-9\\-]{2,60})+\\.)+[a-zA-Z]{2,63}$"},{type:"regexp",errorMessage:this.emailGeneralErrorMessage,expression:"^(?!(S|s)df).*$"},{type:"regexp",errorMessage:this.emailGeneralErrorMessage,expression:"^(?!(G|g)fd).*$"},{type:"regexp",errorMessage:this.emailGeneralErrorMessage,expression:"^(?!(F|f)ds).*$"},{type:"regexp",errorMessage:this.emailGeneralErrorMessage,expression:"^(?!qq@).*$"}
]
}
,isc.A.getMatchingRecordsCriteria=function isc_c_Validator_getMatchingRecordsCriteria(_1,_2,_3,_4,_5){var _6=_1.getPrimaryKeyFieldNames();var _7='iEquals';if(_4.caseSensitive||!_1.getFieldOperators(_2).contains('iEquals')){_7='equals'
}
var _8={_constructor:"AdvancedCriteria",operator:"and",criteria:[{fieldName:_2,operator:_7,value:_3}
]
}
var _9=[];if(_4.criteriaFields){if(isc.isA.String(_4.criteriaFields)){_9=_4.criteriaFields.split(',')}
}
if(!_9.intersect(_6).isEmpty()){_9.removeList(_6);isc.logWarn('Primary key unnecessarily provided in criteria to isUnique validator.  Discarded.'
)}
for(var i=0;i<_9.length;i++){var _11=_9[i];var _12='iEquals';if(_4.caseSensitive||!_1.getFieldOperators(_11).contains('iEquals')){_12='equals'
}
_8.criteria.add({fieldName:_11,operator:_12,value:_5[_11]
})}
for(var i=0;i<_6.length;i++){var _13=_6[i];var _14='iNotEqual';if(_4.caseSensitive||!_1.getFieldOperators(_13).contains('iNotEqual')){_14='notEqual'
}
_8.criteria.add({fieldName:_13,operator:_14,value:_5[_13]
})}
return _8}
);isc.B._maxIndex=isc.C+14;isc.Validator.addValidatorDefinition("regex",isc.Validator.getValidatorDefinition("regexp"));isc.ClassFactory.defineClass("ContainerItem","FormItem");isc.A=isc.ContainerItem.getPrototype();isc.A.cellSpacing=0;isc.A.cellPadding=2;isc.A.cellBorder=0;isc.A.recalculateItemsOnRedraw=false;isc.A.$125=false;isc.A.changeOnKeypress=false;isc.ContainerItem.addMethods(isc.applyMask(isc.DynamicForm.getPrototype(),["getTableStartHTML","$174w","$11n","$11o","getCellStartHTML","$11g","getCellEndHTML","$11h","getTitleAlign","getItemPromptHTML","getTitleCellHTML","$11i","$427","isRTL","getItem","getTitleVAlign","$99","getTitleCellInnerHTML","shouldClipTitle"
]))
isc.A=isc.ContainerItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$63z="$428";isc.A.itemTitleOrientation="top";isc.A.itemTitleAlign="left";isc.A.showItemTitles=false;isc.A.writeOutLabelTag=true;isc.A.$9z="<br>";isc.B.push(isc.A.init=function isc_ContainerItem_init(){this.Super("init",arguments);this.setItems(this.items?this.items:null)}
,isc.A.destroy=function isc_ContainerItem_destroy(){if(this.items){for(var i=0;i<this.items.length;i++){this.items[i].destroy()}
}
this.Super("destroy",arguments)}
,isc.A.setItems=function isc_ContainerItem_setItems(_1){var _2=this.items?this.items:null;if(_1)this.items=_1;else _1=this.items;if(!this.items)return null;this.logDebug("Creating "+this.items.length+" contained items");var _3=false;for(var _4=0;_4<_1.length;_4++){var _5=_1[_4];if(!_5){_1.removeItem(_4--);continue}
isc.addMethods(_5,{handleKeyPress:function(){var _6=this.Super("handleKeyPress",arguments);if(_6==false)return false;return true}
}
);_5.containerWidget=this.containerWidget;_5.parentItem=this;_5.eventParent=this;_5.form=this.form;if(_5.showTitle==null)_5.showTitle=this.showItemTitles;_5.align=_5.titleAlign||this.itemTitleAlign;if(!isc.isA.FormItem(_5))_1[_4]=_5=isc.FormItemFactory.makeItem(_5);if(this.accessKey!=null&&!_3&&_5.$kk()){_5.accessKey=this.accessKey;_3=true}
if(_5.name!=null)this[_5.name]=_5}
if(this.isDrawn()){if(_2&&_2!=this.items){if(this.$60r==null)this.$60r={};for(var i=0;i<_2.length;i++){var _8=_2[i];if(!_1.contains(_2[i])){this.$60r[_2[i].getID()]=_2[i]}
}
}
}
this.assignItemsTabPosition();this.redraw()}
,isc.A.syntheticShiftFocus=function isc_ContainerItem_syntheticShiftFocus(_1){return false}
,isc.A.$184c=function isc_ContainerItem__getCurrentFocusTargetID(){var _1=this.form&&this.form.$10n;if(_1!=null){var _2=_1,_3=false;while(_2.parentItem!=null){if(_2.parentItem==this){_3=true;break}
_2=_2.parentItem}
if(_3)return _2.$184c()}
return this.Super("$184c",arguments)}
,isc.A.assignItemsTabPosition=function isc_ContainerItem_assignItemsTabPosition(){var _1=this.items;if(!_1||_1.length==0)return;var _2=this.sortItemsIntoTabOrder();for(var i=0,_4=0;i<_2.length;i++){var _5=_2[i];if(_5==null)continue;isc.TabIndexManager.moveTarget(_5.ID,this.ID,_4);_4++}}
,isc.A.sortItemsIntoTabOrder=function isc_ContainerItem_sortItemsIntoTabOrder(){return isc.DynamicForm.sortItemsIntoTabOrder(this.items,this)}
,isc.A.getPickerIconTabPosition=function isc_ContainerItem_getPickerIconTabPosition(){return this.items?this.items.length:0}
,isc.A.getIconTabPosition=function isc_ContainerItem_getIconTabPosition(_1){var _2=this.items?this.items.length:0;return this.Super("getIconTabPosition",arguments)+_2}
,isc.A.getItems=function isc_ContainerItem_getItems(){return this.items}
,isc.A.handleKeyPress=function isc_ContainerItem_handleKeyPress(){var _1=this.Super("handleKeyPress",arguments);if(_1==false||_1==isc.EH.STOP_BUBBLING)return _1;var _2=isc.EH.lastEvent.keyTarget;if(_2&&_2!=this){if(_2.shouldStopKeyPressBubbling(isc.EH.getKey(),isc.EH.characterValue)){return isc.EH.STOP_BUBBLING}
}
return _1}
,isc.A.getItemTitleOrientation=function isc_ContainerItem_getItemTitleOrientation(_1){if(_1&&!_1.shouldShowTitle())return null;return(_1?_1.titleOrientation:null)||this.itemTitleOrientation||isc.Canvas.TOP}
,isc.A.getTitleHTML=function isc_ContainerItem_getTitleHTML(_1){var _2,_3;_1=_1||this;var _4=_1.getTitle();if(!_1.writeOutLabelTag||!_1.getCanFocus()){return _4}
if(_1.accessKey!=null){_4=isc.Canvas.hiliteCharacter(_4,_1.accessKey)}
if(_1==this){for(var i=0;i<this.items.length;i++){if(this.items[i].getCanFocus()&&this.items[i].hasDataElement()){_3=this.items[i];break}
}
}
if(!_3){return _4}
return isc.SB.concat("<LABEL FOR=",_3.getDataElementId(),">",_4,"</LABEL>")}
,isc.A.isFocused=function isc_ContainerItem_isFocused(){return(this.hasFocus||this.childIsFocused())}
,isc.A.childIsFocused=function isc_ContainerItem_childIsFocused(){var _1=this.$1977();return _1&&_1!=this}
,isc.A.$1977=function isc_ContainerItem__getFocusChild(){var _1=this.form&&this.form.$10n;if(_1!=null){if(_1.hasFocus==false)return null;if(_1==this)return this;var _2=_1,_3=false;while(_2.parentItem!=null){if(_2.parentItem==this){_3=true;break}
_2=_2.parentItem}
if(_3)return _1}
return null}
,isc.A.$173=function isc_ContainerItem__setElementTabIndex(_1){if(!this.isVisible()||!this.containerWidget.isDrawn())return;for(var i=0;i<this.items.length;i++){if(this.items[i].$kk())this.items[i].$173(_1)}
if(!this.form.isDirty()){this.$175()}}
,isc.A.$kk=function isc_ContainerItem__canFocus(){if(!this.items)return false;for(var i=0;i<this.items.length;i++){if(this.items[i].$kk())return true}
return false}
,isc.A.focusInItem=function isc_ContainerItem_focusInItem(){if(!this.isVisible()||!this.$kk())return;for(var i=0;i<this.items.length;i++){if(this.items[i].$kk()){this.items[i].focusInItem();break}
}}
,isc.A.blurItem=function isc_ContainerItem_blurItem(){for(var i=0;i<this.items.length;i++){if(this.items[i].hasFocus){this.items[i].blurItem();break}
}}
,isc.A.$159=function isc_ContainerItem__applyHandlersToElement(){this.$16c()}
,isc.A.drawing=function isc_ContainerItem_drawing(_1){this.Super("drawing",arguments);var _2=this.items;if(!_2)return;for(var i=0;i<_2.length;i++){if(_2[i].visible!=false)_2[i].drawing(_1)}}
,isc.A.drawn=function isc_ContainerItem_drawn(){var _1=this.items;if(!_1)return;for(var i=0;i<_1.length;i++){if(_1[i].visible!=false)_1[i].drawn()}
return this.Super("drawn",arguments)}
,isc.A.redrawing=function isc_ContainerItem_redrawing(){this.Super("redrawing",arguments);var _1=this.items;if(!_1)return;for(var i=0;i<_1.length;i++){var _3=_1[i];if(_3.visible!=false){if(!_3.isDrawn())_3.drawing();else _3.redrawing()}else{if(_3.isDrawn())_3.clearing}
}}
,isc.A.redrawn=function isc_ContainerItem_redrawn(){var _1=this.items;if(!_1)return;for(var i=0;i<_1.length;i++){var _3=_1[i];if(_3.visible!=false){if(!_3.isDrawn())_3.drawn();else _3.redrawn()}else{if(_3.isDrawn())_3.cleared()}
}
this.notifyRemovedItems();return this.Super("redrawn",arguments)}
,isc.A.clearing=function isc_ContainerItem_clearing(_1){this.Super("clearing",arguments);var _2=this.items;if(!_2)return;for(var i=0;i<_2.length;i++){if(_2[i].isDrawn())_2[i].clearing(_1)}}
,isc.A.cleared=function isc_ContainerItem_cleared(){var _1=this.items;if(!_1)return;for(var i=0;i<_1.length;i++){if(_1[i].isDrawn())_1[i].cleared()}
this.notifyRemovedItems();return this.Super("cleared",arguments)}
,isc.A.notifyRemovedItems=function isc_ContainerItem_notifyRemovedItems(){if(this.$60r==null)return;for(var _1 in this.$60r){var _2=this.$60r[_1];if(this.items.contains(_2))continue;if(_2.destroyed||_2.destroying)continue;_2.cleared()}}
,isc.A.makeNamedItem=function isc_ContainerItem_makeNamedItem(_1,_2){if(!this.itemCache)this.itemCache={};var _3=this.itemCache[_1];if(!_3){_3=(this[_1]||this.getClass()[_1]);if(_2!=null){_3=isc.addProperties({},_3,_2)}
_3=this.itemCache[_1]=isc.FormItemFactory.makeItem(_3)}
return _3}
,isc.A.$166d=function isc_ContainerItem__appendHintOrErrorCell(_1,_2,_3,_4,_5){var _6=" rowspan='"+_4+"' colspan='"+_5+"'",_7=this.getHint(),_8=!_1?_2:null,_9=(_7&&_8)?_7+_8:(_7||_8);if(_9&&!isc.isAn.emptyString(_9)){var _10=this.$165z(_9,_7?this.getHintStyle():null,_6);_3.append(_10);_3.append("</TD>")}}
,isc.A.getInnerHTML=function isc_ContainerItem_getInnerHTML(_1,_2,_3,_4){if(!_1)_1={};if(!this.items||this.recalculateItemsOnRedraw||!isc.isA.FormItem(this.items[0]))this.setItems();if(!this.items)return"No items set for containerItem "+this;var _5;if(this.isInactiveHTML()&&this.$68u==null){_5=true;this.$68u=this.setupInactiveContext(null);if(this.logIsDebugEnabled("inactiveEditorHTML")){this.logDebug("getInnerHTML(): Item is marked as inactive - set up new inactive context ID:"+this.$68u,"inactiveEditorHTML")}
}
var _6=this.getErrorOrientation(),_7,_8=_6==isc.Canvas.LEFT,_9;if(_3&&(_8||_6==isc.Canvas.RIGHT))
{var _10=this.getErrors();if(_10){_7=true;_9=this.getErrorHTML(_10)}
}
var _11=isc.StringBuffer.create();if(this.$11d()){_11.append(this.$15l())}
var _12=this.$8t?this.$8t[0]:null;var _13=(_12!=null)&&this.$174z();if(_13){_11.append("<div style='width:"+this.width+"px;'>")}
_11.append(this.getTableStartHTML());var _14=this.items;for(var _15=0;_15<_14.length;_15++){var _16=_14[_15];_16.$10x()
_16.form=this.form;if(_16.showIf){if(!isc.isA.Function(_16.showIf)){isc.Func.replaceWithMethod(_16,"showIf","item,value,form")}
var _17=this.getItemValue(_16,_1);var _18=(_16.showIf(_16,_17,this.form)!=false)
;if(_18!=_16.visible){_16.visible=_18}
}
}
var _19=true,_20=true,_14=this.items,_21=_14.length,_22=1,_23=1,_24=[1];for(var _15=1;_15<_21;++_15){var _16=_14[_15];if(!_16)continue;if(_16.$8l){_23=Math.max(_23,_24[_22-1]);++_22;_24[_22-1]=1}else{++_24[_22-1]}
}
_23=Math.max(_23,_24[_22-1]);for(var _15=0;_15<_21;_15++){var _16=_14[_15];if(!_16)continue;if(!_16.visible)continue;var _17=this.getItemValue(_16,_1);if(_16.$8l||_19){if(!_19){if(_20&&(_2||(_7&&!_8))){this.$166d(_8,_9,_11,_22,_23-_24[0]+1)}
_20=false;_11.append("</TR>")}
_11.append("<TR>")}
if(_19&&_7&&_8){_11.append("<TD ROWSPAN=",_22,">",_9,"</TD>")}
_19=false;var _25=_16.getErrors();var _26=(_16.showTitle!=false)&&!_16.willWriteTitleInline(),_27=this.getItemTitleOrientation(_16);if(_26&&_27==isc.Canvas.LEFT){_11.append(this.getTitleCellHTML(_16,_25))}
_11.append(this.getCellStartHTML(_16));if(_26&&_27==isc.Canvas.TOP){_11.append(this.getTitleSpanHTML(_16,_25),this.$9z)}
_11.append(_16.getInnerHTML(_17,true));_11.append(this.getCellEndHTML(_16))}
var _28=this.$185k();if(_28||(this.showIcons&&this.icons!=null)){var _12=this.getTotalIconsWidth();if(_28)_12+=this.getPickerIconWidth();var _29=this.icons&&(_28||this.icons.length>1);_11.append(this.$11g((this.form.isRTL()?isc.Canvas.RIGHT:isc.Canvas.LEFT),null,this.getCellStyle(),1,1,_12,null," id='"+this.$qs(this.$13r)+"' ",isc.Canvas.$42a,null,null,null,_29
)
);_11.append(this.getIconsHTML(true));_11.append(this.$11h(_29))}
if(_20&&(_2||(_7&&!_8))){this.$166d(_8,_9,_11,_22,_23-_24[0]+1)}
_11.append("</TR></TABLE>");if(_13){_11.append("</div>")}
if(_5)delete this.$68u;return _11.release(false)}
,isc.A.$160=function isc_ContainerItem__resetWidths(){this.Super("$160",arguments);for(var i=0;i<this.items.length;i++){this.items[i].$160()}}
,isc.A.$174z=function isc_ContainerItem__writeSizingDiv(){return false}
,isc.A.$1857=function isc_ContainerItem__writeControlTable(){return false}
,isc.A.getOuterElement=function isc_ContainerItem_getOuterElement(){return this.isDrawn()?this.$11o():null}
,isc.A.getPickerIcon=function isc_ContainerItem_getPickerIcon(){var _1=this.Super("getPickerIcon",arguments);_1.writeIntoItem=false;return _1}
,isc.A.getItemValue=function isc_ContainerItem_getItemValue(_1,_2){if(_2==null)_2={};if(!isc.isA.FormItem(_1))_1=this.getItem(_1);if(!_1)return null;var _3=_1.getFieldName(),_4=null
;if(_1.value!=null)_4=_1.value;if(_4==null&&_3){_4=_2[_3]}
if(_4==null){_4=_1.getValue()}
return _4}
,isc.A.$10v=function isc_ContainerItem__itemValueIsDirty(){if(this.items==null)return false;for(var i=0;i<this.items.length;i++){if(this.items[i].$10v())return true}
return this.$18j}
,isc.A.$10x=function isc_ContainerItem__markValueAsNotDirty(){this.$18j=false;for(var i=0;i<this.items.length;i++){this.items[i].$10x()}}
,isc.A.updateDisabled=function isc_ContainerItem_updateDisabled(_1){this.Super("updateDisabled",arguments);if(this.items){for(var i=0;i<this.items.length;i++)this.items[i].updateDisabled(_1)}}
,isc.A.getTextDirection=function isc_ContainerItem_getTextDirection(){return this.form.getTextDirection()}
,isc.A.getLeft=function isc_ContainerItem_getLeft(){var _1=this.$11o();if(_1==null){this.logWarn("getLeft() Unable to determine position for "+(this.name==null?"this item ":this.name)+". Position cannot be determined before the item is drawn - returning zero");return 0}
return this.$18k(_1)}
,isc.A.getTop=function isc_ContainerItem_getTop(){var _1=this.$11o();if(_1==null){this.logWarn("getTop() Unable to determine position for "+(this.name==null?"this item ":this.name)+". Position cannot be determined before the item is drawn - returning zero");return 0}
return this.$18l(_1)}
,isc.A.getVisibleWidth=function isc_ContainerItem_getVisibleWidth(){var _1=this.$11o();if(_1==null)return this.Super("getVisibleWidth",arguments);return _1.offsetWidth}
,isc.A.getVisibleHeight=function isc_ContainerItem_getVisibleHeight(){var _1=this.$11o();if(_1==null)return this.Super("getVisibleHeight",arguments);return _1.offsetHeight}
,isc.A.getTitleSpanHTML=function isc_ContainerItem_getTitleSpanHTML(_1,_2){var _3=isc.StringBuffer.create();if(_1.showTitle==false)return"";_3.append("<SPAN ",this.$11i(_1)," CLASS='",_1.getTitleStyle(),"' ALIGN='",this.getTitleAlign(_1),"'>");_3.append(_1.getTitleHTML());_3.append("</SPAN>");return _3.release(false)}
,isc.A.$1608=function isc_ContainerItem__defaultPendingStatusChangedBehavior(_1){this.Super("$1608",arguments);this.$1609()}
,isc.A.$1609=function isc_ContainerItem__updatePendingStatuses(){var _1=this.$161p()&&this.pendingStatus;var _2=this.items;if(_2!=null){for(var i=0,_4=_2.length;i<_4;++i){var _5=_2[i];_5.setFixedPendingStatus(_1)}
}}
,isc.A.$152p=function isc_ContainerItem__readOnlyDisplayChanged(_1,_2){var _3=this.items;if(_3!=null){for(var i=0,_5=_3.length;i<_5;++i){var _6=_3[i];_6.updateReadOnlyDisplay(_2)}
}
this.Super("$152p",arguments)}
,isc.A.$152r=function isc_ContainerItem__canEditChanged(_1,_2){var _3=this.items;if(_3!=null){for(var i=0,_5=_3.length;i<_5;++i){var _6=_3[i];_6.updateCanEdit(_2)}
}
this.Super("$152r",arguments)}
);isc.B._maxIndex=isc.C+50;isc.ClassFactory.defineClass("CanvasItem","FormItem");isc.A=isc.CanvasItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.width="*";isc.A.height=null;isc.A.shouldSaveValue=false;isc.A.showValue=isc.Class.NO_OP;isc.A.autoDestroy=false;isc.B.push(isc.A.$952=function isc_CanvasItem__setElementValue(_1,_2){var _3;if(_2===_3){_2=this._value}
this.showValue(_1,_2,this.form,this)}
,isc.A.$142r=function isc_CanvasItem__showValueAfterDraw(_1){if(_1){return}
return this.Super("$142r",arguments)}
,isc.A.$18v=function isc_CanvasItem__canvas_resized(_1,_2,_3){this.Super("resized",arguments);if(!this.dragResizing()&&this.canvasItem&&(this.canvasItem.canvas==this)){this.canvasItem.canvasResized(_1,_2,_3)}
}
,isc.A.$18w=function isc_CanvasItem__canvas_dragResized(){this.canvasItem.canvasResized(1,1);return this.Super("dragResized",arguments)}
);isc.B._maxIndex=isc.C+4;isc.A=isc.CanvasItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.sizeCanvasAsTextBox=true;isc.A.mustRefocusOnRedraw=false;isc.A.editCriteriaInInnerForm=true;isc.A.applyPromptToCanvas=true;isc.B.push(isc.A.init=function isc_CanvasItem_init(){this.Super("init",arguments);this.$18y(this.form,this);this.canvasInitialized=true}
,isc.A.$kk=function isc_CanvasItem__canFocus(){if(this.canFocus==true)return this.canFocus;var _1=this.canvas;if(_1&&_1.$kk)return _1.$kk();return false}
,isc.A.getOuterElement=function isc_CanvasItem_getOuterElement(_1,_2,_3){var _4=this.$15c("spacerParent");if(_4&&_4.firstChild)_4=_4.firstChild;return _4?_4:this.invokeSuper(isc.CanvasItem,"getOuterElement",_1,_2,_3)}
,isc.A.$18y=function isc_CanvasItem__createCanvas(){if(this.createCanvas!=null){var _1=this.canvas;this.canvas=this.fireCallback("createCanvas","form,item",arguments);if(this.canvas==null)this.canvas=_1}
if(!isc.isAn.Object(this.canvas)&&!this.canvasProperties&&!window[this.canvas]){this.logInfo("CanvasItem: "+(this.getFieldName()?this.getFieldName():this.getID())+" defined with no canvas property - creating a default canvas for this item.")}
if(!isc.isAn.Object(this.canvas)&&isc.isA.Canvas(window[this.canvas])){this.canvas=window[this.canvas]
}
var _2={_redrawWithParent:false,destroyWithParent:false
};_2.resized=this.$18v;_2.dragResized=this.$18w;_2.handleClick=function(){var _3=this.Super("handleClick",arguments);if(!isc.isA.StatefulCanvas(this)&&this.canvasItem){_3=this.canvasItem.handleClick()&&_3}
return _3}
_2.handleActivate=function(){var _3=this.Super("handleActivate",arguments);if(this.canvasItem)_3=this.canvasItem.handleClick()&&_3;return _3}
_2.handleDoubleClick=function(){var _3=this.Super("handleDoubleClick",arguments);if(this.canvasItem)_3=this.canvasItem.handleDoubleClick()&&_3;return _3}
_2.handleKeyPress=function(){var _3=this.Super("handleKeyPress",arguments);if(this.canvasItem){var _4=this.canvasItem.$18d(this.canvasItem,this.canvasItem.form,isc.EH.getKey(),isc.EH.getKeyEventCharacterValue()
);if(_4==false)_3=false}
return _3}
_2.handleKeyDown=function(_10,_11){var _3=this.Super("handleKeyDown",arguments);if(this.canvasItem){var _4=this.canvasItem.handleKeyDown(_10,_11);if(_4==false)_3=false}
return _3}
_2.handleKeyUp=function(_10,_11){var _3;if(this.keyUp!=null){_3=this.keyUp(_10,_11)}
if(this.canvasItem){var _4=this.canvasItem.handleKeyUp(_10,_11);if(_4==false)_3=false}
return _3}
_2.handleItemKeyPress=function(_10,_11,_12){var _3=this.Super("handleKeyPress",arguments);if(this.canvasItem){var _4=this.canvasItem.$18d(this.canvasItem,this.canvasItem.form,isc.EH.getKey(),isc.EH.getKeyEventCharacterValue()
);if(_4==false)_3=false}
return _3}
if(this.dataSource)_2.dataSource=this.dataSource;if(this.prompt&&this.applyPromptToCanvas)_2.prompt=this.prompt;if(this.overflow!=null)_2.overflow=this.overflow;if(this.accessKey!=null)_2.accessKey=this.accessKey;if(this.showFocused!=null)_2.showFocused=this.showFocused;if(this.showFocusedAsOver!=null)_2.showFocusedAsOver=this.showFocusedAsOver;if(this.hasOwnProperty("hoverFocusKey"))_2.hoverFocusKey=this.hoverFocusKey;else _2.hoverFocusKey=this.form&&this.form.hoverFocusKey;if(this.hoverPersist!=null)_2.hoverPersist=this.hoverPersist;else _2.hoverPersist=this.form&&this.form.hoverPersist;if(this.canHover!=null)_2.canHover=this.canHover;if(isc.isA.String(this.canvas)&&window[this.canvas])this.canvas=window[this.canvas];if(!isc.isA.Canvas(this.canvas)){isc.addProperties(_2,this.canvas,{canvasItem:this});if(_2.ID!=null)_2.ID=null;this.autoDestroy=true;this.canvas=this.createAutoChild("canvas",_2,isc.Canvas)}else{if(isc.isA.CanvasItem(this.canvas.canvasItem)&&this.canvas.canvasItem!==this)
{this.canvas.canvasItem.setCanvas(null)}
var _5={};for(var _6 in _2){_5[_6]=this.canvas[_6]}
this.canvas.$906=_5
if(this.applyPromptToCanvas)this.canvas.setPrompt(this.prompt);this.canvas.setAccessKey(this.accessKey);isc.addProperties(this.canvas,_2,{canvasItem:this});if(_2.dataSource)this.canvas.bindToDataSource()}
if(isc.isA.DynamicForm(this.canvas)){this.canvas.setReadOnlyDisplay(this.getReadOnlyDisplay());this.canvas.setCanEdit(this.getCanEdit())}
this.canvas.setDisabled(this.shouldDisableCanvas());if(this.canvas!=null){this.canvas.$129a=this.canvas.percentBox;this.canvas.percentBox="custom"}
this.updateCanvasTabPosition();if(this.containerWidget!=this.form){if(isc.EH.clickMaskUp()){var _7=isc.EH.getAllClickMaskIDs();for(var i=_7.length-1;i>=0;i--){var _9=isc.EH.targetIsMasked(this.containerWidget,_7[i]);if(!_9){isc.EH.addUnmaskedTarget(this.canvas,_7[i]);break}
}
}
}
if(this.canvas){this.observe(this.canvas,"$lf","observer.canvasFocusChanged()");this.observe(this.canvas,"$170y","observer.canvasChildFocusChanged()")}
if(isc.isA.DynamicForm(this.canvas)){this.observe(this.canvas,"setFocusItem","observer.nestedFormSetFocusItem()")}
}
,isc.A.updateCanvasTabPosition=function isc_CanvasItem_updateCanvasTabPosition(){var _1=this.canvas;if(_1!=null){_1.updateTabPositionOnDraw=false;_1.updateTabPositionOnReparent=false;isc.TabIndexManager.moveTarget(_1.ID,this.ID,0);if(this.globalTabIndex!=null){this.canvas.setTabIndex(this.globalTabIndex)}
}
}
,isc.A.getPickerIconTabPosition=function isc_CanvasItem_getPickerIconTabPosition(){return this.canvas?1:0}
,isc.A.getIconTabPosition=function isc_CanvasItem_getIconTabPosition(_1){var _2=this.canvas?1:0;return this.Super("getIconTabPosition",arguments)+_2}
,isc.A.$184c=function isc_CanvasItem__getCurrentFocusTargetID(){if(isc.isA.Canvas(this.canvas)&&isc.EH.$ke!=null&&this.canvas.contains(isc.EH.$ke,true))
{if(isc.isA.DynamicForm(isc.EH.$ke)){return isc.EH.$ke.getFocusSubItem().$184c()}
return isc.EH.$ke.getID()}
return this.Super("$184c",arguments)}
,isc.A.setCanvas=function isc_CanvasItem_setCanvas(_1){if(isc.isA.Canvas(this.canvas)){if(this.canvas!=_1){this.$112n()}else{return}
}
if(_1)this.canvas=_1;if(this.canvasInitialized){this.$18y();if(this.containerWidget&&this.containerWidget.isDrawn()&&this.isDrawn()){var _2=this.containerWidget;var _3=_1?_1.getParentCanvas():null;if(_1&&_3!==_2){if(_3!=null&&this.isObserving(_3,"$807")){this.ignore(_3,"$807")}
_2.addChild(_1)}
this.containerWidget.markForRedraw()}
}
}
,isc.A.$152r=function isc_CanvasItem__canEditChanged(_1,_2){var _3=this.canvas;if((this.canEditChanged==null||this.canEditChanged(_1)!=false)&&_3!=null)
{if(isc.isA.DynamicForm(_3)){_3.setCanEdit(_1)}
_3.setDisabled(this.shouldDisableCanvas())}
}
,isc.A.$152p=function isc_CanvasItem__readOnlyDisplayChanged(_1,_2){var _3=this.canvas;if((this.readOnlyDisplayChanged==null||this.readOnlyDisplayChanged(_1)!=false)&&_3!=null)
{if(isc.isA.DynamicForm(_3)){_3.setReadOnlyDisplay(_1)}
}
}
,isc.A.drawing=function isc_CanvasItem_drawing(_1){var _2=this.canvas,_3=this.containerWidget;if(_2&&_2.destroyed){this.$18y()}
_2=this.canvas;var _4=_2?_2.getParentCanvas():null;if(_2&&_4!==_3){if(_4!=null&&this.isObserving(_4,"$807")){this.ignore(_4,"$807")}
_3.addChild(_2)}
this.Super("drawing",arguments)}
,isc.A.itemVisibilityChanged=function isc_CanvasItem_itemVisibilityChanged(_1){if(!_1&&this.canvas&&this.containerWidget&&!this.containerWidget.isDrawn()&&this.canvas.getParentCanvas()==this.containerWidget)
{this.canvas.deparent()}
}
,isc.A.destroy=function isc_CanvasItem_destroy(){this.$112n();return this.Super("destroy",arguments)}
,isc.A.$112n=function isc_CanvasItem__destroyCanvas(){if(this.canvas){delete this.canvas.canvasItem;var _1=this.canvas.getParentCanvas();if(_1===this.containerWidget){if(this.isObserving(this.containerWidget,"$807")){this.ignore(this.containerWidget,"$807")}
this.containerWidget.removeChild(this.canvas)}
if(this.autoDestroy){this.canvas.destroy(true)}else{isc.$1025=true;isc.addProperties(this.canvas,this.canvas.$906);delete this.canvas.$906;delete isc.$1025;if(this.canvas.isDrawn()){this.canvas.clear()}
this.canvas.deparent();isc.TabIndexManager.moveTarget(this.canvas.getID());this.ignore(this.canvas,"$lf");if(isc.isA.DynamicForm(this.canvas)){this.ignore(this.canvas,"setFocusItem")}
this.canvas.percentBox=this.canvas.$129a;delete this.canvas.$129a;this.canvas=null}
}
}
,isc.A.placeCanvas=function isc_CanvasItem_placeCanvas(_1){var _2=this.canvas;if(!_2)return;if(_2.destroyed)return;if(this.visible==false){return}
if(this.form&&!this.form.isDrawn()&&this.form.position==isc.Canvas.RELATIVE){this.form.$2634=true;_2.hide();return}
var _3=this.containerWidget;if(!_3.isVisible()){if(!this.isObserving(_3,"$807")){this.observe(_3,"$807",this.$156d)}
return}
var _4=_3.getHandle(),_5=isc.Element.get(this.getID()+"$18z");if(isc.Browser.isIE&&!isc.Browser.isStrict&&isc.Browser.version>=9){_5=_5&&_5.firstChild}
var _6=_5?isc.Element.getOffsets(_5,_4,null,null,null,true):{left:0,top:0},_7=Math.round(_6[isc.Canvas.LEFT])+_3.getScrollLeft(),_8=Math.round(_6[isc.Canvas.TOP])+_3.getScrollTop();if(!_3.$113l){var _9=_3.$tj();_7-=_9.left;_8-=_9.top}
var _10=_2.getParentCanvas();if(_10!==_3){if(_10!=null&&this.isObserving(_10,"$807")){this.ignore(_10,"$807")}
_3.addChild(_2)}
_2.moveTo(_7,_8);if(this.$11e()){var _11=this.getAbsDiv(true);if(_11&&_11.style){var _12=parseInt(_11.style.zIndex);if(_2.getZIndex()<_12){_2.setZIndex(_12+1)}
}
}
if(_2.visibility==isc.Canvas.HIDDEN){_2.show()}
if(!_2.isDrawn()){_2.draw()}
if(this.form!=_3){var _13=this.ns.EH;if(_13.clickMaskUp()){var _14=_13.getAllClickMaskIDs();for(var i=_14.length-1;i>=0;i--){var _16=_13.targetIsMasked(this.form,_14[i]);if(!_16){_13.addUnmaskedTarget(_2,_14[i]);break}
}
}
}
if(!_1&&isc.Browser.isMac&&isc.Browser.isMoz&&_7==0&&_8==0){isc.Timer.setTimeout({target:this,methodName:"$180"},0)}
}
,isc.A.$180=function isc_CanvasItem__delayedPlaceCanvas(){this.placeCanvas(true)}
,isc.A.$156d=function isc_CanvasItem__containerWidgetVisibilityChanged(){if(this.containerWidget.isVisible())this.placeCanvas()}
,isc.A.cleared=function isc_CanvasItem_cleared(_1){this.Super("cleared",arguments);if(this.canvas&&this.canvas.isDrawn()){this.canvas.clear();if(_1){if(this.isObserving(this.containerWidget,"$807")){this.ignore(this.containerWidget,"$807")}
this.containerWidget.removeChild(this.canvas);this.containerWidget.$t5=true;this.containerWidget.$t6("CanvasItem canvas cleared")}
}
}
,isc.A.moved=function isc_CanvasItem_moved(){if(this.isDrawn()||(this.containerWidget!=null&&this.containerWidget.isDrawn())){this.placeCanvas()}
}
,isc.A.checkCanvasOverflow=function isc_CanvasItem_checkCanvasOverflow(){return this.sizeCanvas(true)}
,isc.A.$143=function isc_CanvasItem__sizeTextBoxAsContentBox(){return false}
,isc.A.shouldApplyHeightToTextBox=function isc_CanvasItem_shouldApplyHeightToTextBox(){if(this.sizeCanvasAsTextBox)return true;return this.Super("shouldApplyHeightToTextBox",arguments)}
,isc.A.sizeCanvas=function isc_CanvasItem_sizeCanvas(_1){var _2=this.canvas;if(!_2)return;if(_1&&!(_2.overflow==isc.Canvas.VISIBLE||_2.overflow==isc.Canvas.CLIP_H))
{this.logDebug("ignoring first pass, can't overflow","canvasItemSizing");return}
var _3=this.getValue(),_4=this.sizeCanvasAsTextBox?this.getTextBoxWidth(_3)
:this.getInnerWidth(),_5=this.sizeCanvasAsTextBox?this.getTextBoxHeight(_3)
:this.getInnerHeight(),_6,_7;if(this.getHint()!=null&&!this.$712()){var _8=this.$1651(),_9=this.$294h()||0,_10=isc.isA.Number(this.form.cellPadding)?this.form.cellPadding*2:0,_11=(this.getColSpan()||1)*6;if(_8!=null&&isc.isA.Number(_4)){_4-=(_8+_9+_10+_11);this.logDebug("reduced policyWidth by hint cell size: "+(_8+_9+_10+_11)+" (hintWidth:"+_8+" + hintPadding:"+_9+" + formCellPadding:"+_10+" + colSpanMargin:"+_11+"), new policyWidth: "+_4,"canvasItemSizing")}
}
if(this.heightIncludesTitle&&this.showTitle&&this.getTitleOrientation()==isc.Canvas.TOP)
{_5-=this.form.getTitleHeight(this)}
_7=_5;var _12=!this.$197k?_2.$pn:null;var _13=_12==null
||_12=="*"||_12=="100%";_6=(_13?_4:_12);var _14=_2._percent_width,_15=_2._percent_height;var _16;if(_4!=null&&_14!=null&&_14.endsWith("%")&&!window.isNaN(_16=parseInt(_14)))
{_13=true;_6=Math.round(_4*(_16/100))}
this.$197k=_13;var _17=true;if(!_2.isDirty()&&(_6==null||_6<=_2.getVisibleWidth())&&_2.getHeight()<_2.getVisibleHeight()&&_7<=_2.getVisibleHeight())
{this.logDebug("not applying height: "+_7+" to overflowed Canvas with height: "+_2.getVisibleHeight(),"canvasItemSizing");_7=null;_17=false}
this.$197l=_17;if(!isc.isA.Number(_6))_6=null;if(!isc.isA.Number(_7))_7=null;this.$602(_6,_7,_14,_15);this.logDebug("this.$8t: "+this.$8t+", policy size: "+[_4,_5]+", specifiedSize: "+[_12,_2.$po||this.height]+", Resized Canvas to: "+[_6,_7],"canvasItemSizing");if(!_2.isDrawn()){var _18=this.containerWidget.getDrawnState();if(_18==isc.Canvas.COMPLETE||_18==isc.Canvas.HANDLE_DRAWN){isc.Canvas.moveOffscreen(_2);_2.draw()}
}else _2.redrawIfDirty("CanvasItem getting new size");var _19=_2.getVisibleWidth(),_20=_2.getVisibleHeight();this.logDebug("visible size of embedded Canvas: "+[_19,_20],"canvasItemSizing");if(!_1)this.$168w=null;else this.$168w=_20>_2.getHeight()?_20:null;if(_20>_5)return true}
,isc.A.$602=function isc_CanvasItem__setCanvasSize(_1,_2,_3,_4){this.$181=true;this.canvas.resizeTo(_1,_2);if(_3!=null)this.canvas._percent_width=_3;if(_4!=null)this.canvas._percent_height=_4;this.$181=false}
,isc.A.getInnerHTML=function isc_CanvasItem_getInnerHTML(){if(this.canvas)this.sizeCanvas();return this.Super("getInnerHTML",arguments)}
,isc.A.getElementHTML=function isc_CanvasItem_getElementHTML(_1){var _2=this.canvas;if(!_2)return null;var _3="";if(isc.Browser.isIE&&isc.Browser.isTransitional){_3="border:0px solid transparent;"
}
return"<SPAN style='padding:0px;margin:0px;"+_3+"' ID='"
+this.getID()+"$18z'>"
+isc.Canvas.spacerHTML(_2.getVisibleWidth(),_2.getVisibleHeight())
+"</SPAN>"}
,isc.A.getPrintHTML=function isc_CanvasItem_getPrintHTML(_1,_2){if(this.canvas==null)return isc.nbsp;return this.canvas.getPrintHTML(_1,_2)}
,isc.A.$159=function isc_CanvasItem__applyHandlersToElement(){this.$16c()}
,isc.A.getHeight=function isc_CanvasItem_getHeight(_1){var _2=this.canvas;if(_2==null){return this.Super("getHeight",arguments)}
if(_1){var _3=_2.getVisibleHeight();if(_3>_2.getHeight())return _3}
return _2.$po||this.height||_2.defaultHeight}
,isc.A.getWidth=function isc_CanvasItem_getWidth(){return this.canvas==null?this.Super("getWidth",arguments):(this.canvas.$pn||this.width||this.canvas.defaultWidth)}
,isc.A.setWidth=function isc_CanvasItem_setWidth(_1){this.Super("setWidth",arguments);if(this.canvas){var _2=this.getValue(),_3=this.sizeCanvasAsTextBox?this.getTextBoxWidth(_2)
:this.getInnerWidth();if(this.getHint()!=null&&!this.$712()){var _4=this.$1651(),_5=this.$294h()||0,_6=isc.isA.Number(this.form.cellPadding)?this.form.cellPadding*2:0,_7=(this.getColSpan()||1)*6;if(_4!=null&&isc.isA.Number(_3)){_3-=(_4+_5+_6+_7)}
}
this.canvas.setWidth(Math.max(1,_3));this.$197k=true}
}
,isc.A.setHeight=function isc_CanvasItem_setHeight(_1){this.Super("setHeight",arguments);var _2=this.getValue(),_3=this.sizeCanvasAsTextBox?this.getTextBoxHeight(_2)
:this.getInnerHeight();if(this.heightIncludesTitle&&this.showTitle&&this.getTitleOrientation()==isc.Canvas.TOP)
{_3-=this.form.getTitleHeight(this)}
this.canvas.setHeight(_3);this.$197l=true}
,isc.A.getMaxHeight=function isc_CanvasItem_getMaxHeight(){return this.maxHeight!=null?this.maxHeight:this.canvas.maxHeight}
,isc.A.getMinHeight=function isc_CanvasItem_getMinHeight(){var _1=this.minHeight!=null?this.minHeight:this.canvas.minHeight;return this.$168w==null?_1:Math.max(_1,this.$168w)}
,isc.A.canvasResized=function isc_CanvasItem_canvasResized(_1,_2,_3){if(this.$181)return;var _4=this.canvas;if(!isc.isA.Canvas(_4)){this.logWarn("canvasItem canvasResized notification fired, but this.canvas is not a live Canvas instance. Ignoring.");return}
var _5=Math.max(1,_4.getWidth()),_6=_4.getHeight();if(_3!="init"&&_3!="overflow"&&_3!="Overflow on initial draw")
{if(_1!=null&&_1!=0){_4.updateUserSize(_5,_4.$o6)}
if(_2!=null&&_2!=0){_4.updateUserSize(_6,_4.$o5)}
}
this.logDebug("canvas resized: new specified sizes: "+[_5,_6],"canvasItemSizing");if(!_4.isDrawn())return;this.redraw()}
,isc.A.shouldDisableCanvas=function isc_CanvasItem_shouldDisableCanvas(){var _1=this.canvas;if(_1==null)return false;if(isc.isA.DynamicForm(_1)){return this.isDisabled()}else{return this.isDisabled()||this.isReadOnly()}
}
,isc.A.updateDisabled=function isc_CanvasItem_updateDisabled(_1){this.Super("updateDisabled",arguments);this.canvas.setDisabled(this.shouldDisableCanvas(),_1)}
,isc.A.setElementReadOnly=function isc_CanvasItem_setElementReadOnly(){this.$176(!this.isReadOnly()&&!this.isDisabled())}
,isc.A.focusInItem=function isc_CanvasItem_focusInItem(){if(this.canvas!=null&&isc.isA.Canvas(this.canvas)){var _1=this.canvas.getID();this.logDebug("CanvasItem.focusInItem(): Asking TabIndexManager to shift focus into:"
+_1,"syntheticTabIndex");return isc.TabIndexManager.shiftFocus(this.getID(),true,this.getID())
}else{return this.Super("focusInItem",arguments)}
}
,isc.A.syntheticShiftFocus=function isc_CanvasItem_syntheticShiftFocus(_1){return false}
,isc.A.blurItem=function isc_CanvasItem_blurItem(_1){if(!_1&&this.canvas)this.canvas.blur();return this.Super("blurItem",arguments)}
,isc.A.$191y=function isc_CanvasItem__getNestedFocusItem(){var _1=this.canvas,_2=isc.EH.getFocusCanvas();if(_1&&_2&&isc.isA.DynamicForm(_2)&&_1.contains(_2,true))
{return _2.getFocusSubItem()}
}
,isc.A.$10v=function isc_CanvasItem__itemValueIsDirty(){if(this.Super("$10v",arguments))return true;var _1=this.$191y();if(_1){return _1.$10v()}
return false}
,isc.A.updateValue=function isc_CanvasItem_updateValue(){var _1=this.$191y();if(_1){_1.updateValue()}
return this.Super("updateValue",arguments)}
,isc.A.canvasFocusChanged=function isc_CanvasItem_canvasFocusChanged(){this.$170z()}
,isc.A.canvasChildFocusChanged=function isc_CanvasItem_canvasChildFocusChanged(){this.$170z()}
,isc.A.$170z=function isc_CanvasItem__canvasFocusChanged(){var _1=this.canvas&&this.canvas.containsFocus();if(_1!=this.hasFocus){this.hasFocus=_1;var _2=this.form;if(this.canvas.containsFocus()){if(_2.getFocusSubItem()!==this){_2.setFocusItem(this);this.elementFocus()}
}else{this.elementBlur();if(_2.getFocusSubItem()===this)_2.setFocusItem(null)}
}
}
,isc.A.isFocused=function isc_CanvasItem_isFocused(){if(this.canvas&&this.canvas.containsFocus())return true;return this.Super("isFocused",arguments)}
,isc.A.nestedFormSetFocusItem=function isc_CanvasItem_nestedFormSetFocusItem(){this.form.setFocusItem(this)}
,isc.A.hasAdvancedCriteria=function isc_CanvasItem_hasAdvancedCriteria(){if(this.editCriteriaInInnerForm&&isc.isA.DynamicForm(this.canvas))return true;return this.Super("hasAdvancedCriteria",arguments)}
,isc.A.canEditCriterion=function isc_CanvasItem_canEditCriterion(_1){if(this.editCriteriaInInnerForm&&isc.isA.DynamicForm(this.canvas)){if(_1.operator!=this.canvas.operator)return false;for(var i=0;i<_1.criteria;i++){var _3=this.canvas.getItems(),_4;for(var _5=0;_5<_3.length;_5++){if(_3[_5].canEditCriterion(_1.criteria[i])){_4=true;break}
}
if(!_4)return false}
return true}
return this.Super("canEditCriterion",arguments)}
,isc.A.getCriterion=function isc_CanvasItem_getCriterion(){if(this.editCriteriaInInnerForm&&isc.isA.DynamicForm(this.canvas)){return this.canvas.getValuesAsAdvancedCriteria()}else return this.Super("getCriterion",arguments)}
,isc.A.setCriterion=function isc_CanvasItem_setCriterion(_1){if(this.editCriteriaInInnerForm&&isc.isA.DynamicForm(this.canvas)){this.canvas.setValuesAsCriteria(_1,true)}else return this.Super("setCriterion",arguments)}
,isc.A.setPrompt=function isc_CanvasItem_setPrompt(_1){this.Super("setPrompt",_1);if(this.applyPromptToCanvas&&this.canvas){if(isc.isA.Canvas(this.canvas))this.canvas.setPrompt(_1);else this.canvas.prompt=_1}
}
,isc.A.setHoverPersist=function isc_CanvasItem_setHoverPersist(_1){this.Super("setHoverPersist",arguments);if(this.canvas)this.canvas.hoverPersist=_1}
,isc.A.setHoverFocusKey=function isc_CanvasItem_setHoverFocusKey(_1){this.Super("setHoverFocusKey",arguments);if(this.canvas)this.canvas.setHoverFocusKey(_1)}
,isc.A.$243w=function isc_CanvasItem__setHoverPersist(_1){if(!this.hoverPersist&&this.canvas)this.canvas.hoverPersist=_1}
,isc.A.$243v=function isc_CanvasItem__setHoverFocusKey(_1){if(this.canvas&&!this.hasOwnProperty("hoverFocusKey")){this.canvas.setHoverFocusKey(_1)}
}
);isc.B._maxIndex=isc.C+59;isc.CanvasItem.registerStringMethods({createCanvas:"form,item",showValue:"displayValue,dataValue,form,item"});isc.ClassFactory.defineClass("TextItem","FormItem");isc.A=isc.TextItem;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.DEFAULT="default";isc.A.UPPER="upper";isc.A.LOWER="lower";isc.A.$713={'0':{charFilter:"[0-9+\\-]"},'#':{charFilter:"[0-9]"},'9':{charFilter:"[0-9 ]"},'L':{charFilter:"[A-Za-z]"},'?':{charFilter:"[A-Za-z ]"},'a':{charFilter:"[0-9A-Za-z]"},'A':{charFilter:"[0-9A-Za-z]"},'C':{charFilter:"."}
};isc.A.$126z=isc.Browser.isIE&&isc.Browser.version<=9&&(isc.Browser.version<=7||!isc.Browser.isStrict);isc.A.suppressClearIconClassName="isc_suppressClearIcon";isc.B.push(isc.A.createClearIconCSSDefinition=function isc_c_TextItem_createClearIconCSSDefinition(){if(this.$1946==null){this.$1946=isc.Canvas.create({visibility:"hidden",width:1,height:1,top:1,_generated:true,autoDraw:false,getInnerHTML:function(){return"<style>."
+isc.TextItem.suppressClearIconClassName
+"::-ms-clear {width:0;height:0}</style>"
}
});this.$1946.draw()}
}
);isc.B._maxIndex=isc.C+1;isc.A=isc.TextItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.width=150;isc.A.height=isc.Browser.isSafari?22:19;isc.A.textBoxStyle="textItem";isc.A.length=null;isc.A.enforceLength=true;isc.A.canAutoComplete=true;isc.A.$183="TEXT";isc.A.$125=true;isc.A.$15i=true;isc.A.emptyStringValue=null;isc.A.redrawOnShowIcon=false;isc.A.clipValue=true;isc.A.$16b={onmousedown:(isc.Browser.isIE?function(){var _1=this,_2=isc.DynamicForm._getItemInfoFromElement(_1),_3=_2.item;if(_3)_3.$179()}:isc.Browser.isIPhone&&isc.Browser.iOSVersion<5?function(_1){var _2=isc.EventHandler;_2.DOMevent=_1;var _3=_2.getMouseEventProperties(_1);return _2.handleMouseDown(_1,_3)}:null
),onmouseup:(isc.Browser.isIPhone&&isc.Browser.iOSVersion<5?function(_1){var _2=isc.EventHandler;_2.DOMevent=_1;var _3=_2.getMouseEventProperties(_1);return _2.handleMouseUp(_1,_3)}:null
)
};isc.A.supportsCutPasteEvents=true;isc.A.$1709=true;isc.A.usePlaceholderForHint=true;isc.A.printFullText=false;isc.A.saveOnEnter=true;isc.A.escapeHTML=true;isc.A.$228c=["Enter","Escape","Tab"
];isc.B.push(isc.A.getCanEscapeHTML=function isc_TextItem_getCanEscapeHTML(){if((this.$68y()&&this.printFullText)||this.renderAsStatic()){return true}
return this.canEscapeHTML}
);isc.B._maxIndex=isc.C+1;isc.A=isc.TextItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$1565={"email":true,"number":(!isc.Browser.isAndroidWebView||!(2.3<isc.Browser.androidMinorVersion&&isc.Browser.androidMinorVersion<4.2)),"password":true,"search":true,"tel":true,"text":true,"url":true
};isc.A.$186=[,"<INPUT TYPE=",," NAME='",,"' ID='",,"' handleNativeEvents=false"
];isc.A.$14f=" TABINDEX=";isc.A.$oa=">";isc.A.$pi=" DISABLED ";isc.A.$187="native";isc.A.$188=" AUTOCOMPLETE=OFF ";isc.A.$192t=" AUTOCOMPLETE= ";isc.A.$14e=" ACCESSKEY=";isc.A.suppressBrowserClearIcon=null;isc.A.$19a=[" CLASS='",,"' STYLE='",,,,,,,,,,,,,,,,(isc.Browser.isMoz?"-moz-user-focus:"
:null),,,"' "
];isc.A.$19b="normal;";isc.A.$19c="ignore;";isc.A.$78v="margin-top:-1px;margin-bottom:-1px;";isc.A.$1619="INPUT";isc.A.$162a="TEXTAREA";isc.A.characterCasing=isc.TextItem.DEFAULT;isc.A.stopNavKeyPressBubbling=true;isc.A.stopCharacterKeyPressBubbling=true;isc.A.formatOnFocusChange=false;isc.A.maskPadChar=" ";isc.A.maskPromptChar="_";isc.B.push(isc.A.$207e=function isc_TextItem__mayShowHintInField(){return!!(this.showHint&&this.$2257())}
,isc.A.$1564=function isc_TextItem__getUsePlaceholderForHint(){if(!this.usePlaceholderForHint)return false;return this.$1560()}
,isc.A.$1560=function isc_TextItem__supportsPlaceholderAttribute(){if(!isc.Browser.$1560)return false;var _1=this.$156t();if(_1==null)return true;_1=_1.toLowerCase();return this.$1565.hasOwnProperty(_1)}
,isc.A.$1550=function isc_TextItem__manageCharacterInput(){return(!!this.mask||!!this.$66y||this.characterCasing==isc.TextItem.UPPER||this.characterCasing==isc.TextItem.LOWER)}
,isc.A.$429=function isc_TextItem__willHandleInput(){return!isc.Browser.isIE}
,isc.A.$105w=function isc_TextItem___handleInput(){if(isc.Browser.isIE&&isc.Browser.version>=10){if(this.$1164==null&&!this.getElementValue()){this.updateValue()}
}else{this.$105x();return this.Super("$105w",arguments)}
}
,isc.A.$1160=function isc_TextItem___handleSelect(){if(this.$1550()){this.$1161=this.getSelectionRange()}
return this.Super("$1160",arguments)}
,isc.A.$105x=function isc_TextItem__fixMaskAfterCutPaste(){delete this.$1164;if(this.$1550()){var _1=this.$1903(this.getValue());var _2=(this.mask?this.$714(_1):_1),_3=this.getElementValue();if(!_3){if(this.changeOnKeypress){this.updateValue()}else{this.$122m(_3)}
return}
_1="";var _4=this.getSelectionRange(),_5=0,_6=_3.length,_7=_3.length;var _2=this.$714("");this.setElementValue(_1);this.$72a(_5);if(this.mask){var _8=this.$180z(_3.substring(_5,_6),_5);this.$72a(_4[1]-_8)}else{var _9=_3.substring(_5);var _10=0;for(var i=0;i<_9.length;++i){var c=_9[i];var _13=c;if(!this.mask)_13=this.$72j(c,this.characterCasing);if(this.$66y&&!this.$66y.test(_13)){++_10;continue}
_1+=_13}
this.setElementValue(_1);if(this.changeOnKeypress){this.updateValue()}
this.$72a(_4[1]-_10)}
}
}
,isc.A.$180z=function isc_TextItem__insertTextAtSelectionStart(_1,_2){var _3=_2,_4=false;for(var i=0;i<_1.length;++i){var c=_1.charAt(i),_7=_1.charCodeAt(i);if(i==0)this.$1165(_7);var _8=this.$1166(_7,true,false);if(_8===false){_4=true}else if(!_4){_3=_8}
}
return _3}
,isc.A.$1800=function isc_TextItem__getMaskSlots(_1,_2){var _3=0;if(_1<_2){if(_2>this.$718)_2=this.$1802;for(var i=_1;i<_2;i++){if(this.$72i[i]!=null)_3++}
}else{if(_1>this.$718)_1=this.$1802;for(var i=_2;i<_1;i++){if(this.$72i[i]!=null)_3--}
}
return _3}
,isc.A.$1801=function isc_TextItem__getReplaySuffixForCutPaste(_1,_2,_3,_4){var _5=isc.StringBuffer.create(),_6=_5.getArray();if(_2>0){for(var i=_3-_4;i<_1.length;i++){if(this.$72i[i]==null)continue;if(_2>0&&(this.maskOverwriteMode||_1.charAt(i)==this.maskPromptChar))
{_2--;continue}
_6[_6.length]=_1.charAt(i)}
}else{for(var i=_3-_4;i<_1.length;i++){if(this.$72i[i]==null)continue;if(_2<0&&!this.maskOverwriteMode&&_1.charAt(i)==this.maskPromptChar)
{for(var j=0;j<-_2;j++){_6[_6.length]=this.maskPromptChar}
_2=0}
_6[_6.length]=_1.charAt(i)}
if(_2<0){for(var j=0;j<-_2;j++){_6[_6.length]=this.maskPromptChar}
}
}
return _5.toString()}
,isc.A.getTextBoxCellCSS=function isc_TextItem_getTextBoxCellCSS(){return this.$136
}
,isc.A.setElementReadOnly=function isc_TextItem_setElementReadOnly(_1){this.$86y(_1)}
,isc.A.$156r=function isc_TextItem__supportsInlineIcons(){if(this.$169p==null)return false;var _1=this.$156t();if(_1!=null)_1=_1.toLowerCase();var _2=isc.TextItem.$b4;return((_1==null||_1==="text"||_1==="password")&&this.getElementStyleHTML===_2.getElementStyleHTML&&this.getIconHTML===_2.getIconHTML&&this.getIconsHTML===_2.getIconsHTML)}
,isc.A.$16z=function isc_TextItem__iconVisibilityChanged(){var _1=this.getDataElement();if(_1!=null&&this.$169t()){if(this.$169p==="absolutePositioning"){var _2=this.getTextBoxStyle(),_3=this.isRTL(),_4=(_3?this.$156l:this.$156j),_5=(_3?this.$156j:this.$156l),_6=isc.Element.$tr(_2)+_4,_7=isc.Element.$ts(_2)+_5,_8=_1.style;_8.paddingRight=_7+"px";_8.paddingLeft=_6+"px"}else{this.redraw("iconVisibilityChanged, 'divStyledAsDataElement' inline icons markup approach")}
}
this.Super("$16z",arguments)}
,isc.A.$15s=function isc_TextItem__writeOuterTable(){var _1=this.Super("$15s",arguments);if(_1)return true;if(this.valueIcons||this.getValueIcon)return true;return false}
,isc.A.$156t=function isc_TextItem__getInputType(){var _1=this.$183;if(this.browserInputType!=null){_1=this.getBrowserInputType()}
return _1}
,isc.A.drawing=function isc_TextItem_drawing(){if(this.$1947()){isc.TextItem.createClearIconCSSDefinition()}
this.Super("drawing",arguments)}
,isc.A.supportsValueDictation=function isc_TextItem_supportsValueDictation(){return true}
,isc.A.getElementHTML=function isc_TextItem_getElementHTML(_1,_2){var _3=this.$xq(_2);if(this.showValueIconOnly)return _3;if(this.showInputElement==false)return"";var _4;if(this.$68y()||this.renderAsStatic()){if(this.printFullText){_4=isc.StringBuffer.concat("<SPAN ",this.getElementStyleHTML(_1),">",_2==null?"&nbsp;":_2.asHTML(),"</SPAN>"
)}else{_4=this.Super("getElementHTML",arguments)}
}else{var _5=this.$186,_6=_5.length,_7=this.form,_8=_7.getID(),_9=this.getItemID()
;_5[0]=_3;var _10=this.$156t();_5[2]=_10;_5[4]=this.getElementName();_5[6]=this.getDataElementId();_5[8]=this.$155();if(isc.Browser.isMoz||isc.Browser.isSafari||isc.Browser.isEdge||(isc.Browser.isIE&&isc.Browser.version>=10))
{if(this.getBrowserSpellCheck())_5[_5.length]=" spellcheck=true";else _5[_5.length]=" spellcheck=false"
}
if(isc.Browser.isSafari){if(this.browserAutoCapitalize==false){_5[_5.length]=" autocapitalize=off"}
if(this.browserAutoCorrect!=null){_5[_5.length]=this.browserAutoCorrect?" autocorrect='on'":" autocorrect='off'"}
if(this.browserInputType=="digits"){_5[_5.length]=" pattern='\\d*'"}
}
if(this.$429()||(isc.Browser.isIE&&isc.Browser.version>=10)){_5[_5.length]=" ONINPUT='"
_5[_5.length]=this.getID()
_5[_5.length]="._handleInput()'"
}
_5[_5.length]=" ONSELECT='if (window.";_5[_5.length]=this.getID()
_5[_5.length]=" == null) return;";_5[_5.length]=this.getID();_5[_5.length]=".$1162()'";if(this.isDisabled()||(this.$183=="FILE"&&this.isReadOnly())){_5[_5.length]=this.$pi}
if(this.$1397()){_5[_5.length]=" READONLY=TRUE";if(isc.screenReader)_5[_5.length]=" aria-readonly=true"}
if(this.isInactiveHTML()&&_1!=null&&_1!=isc.emptyString){_5[_5.length]=" value='"+String.asAttValue(_1)+"'"}
var _11=this.$17h();if(this.autoCompleteKeywords!=null&&isc.isAn.Array(this.autoCompleteKeywords)){_5[_5.length]=this.$192t+"\""+_11+"\""}else if(_11!=this.$187){_5[_5.length]=this.$188}
if(this.$712()&&this.$1564()){var _12=this.getHint();_5[_5.length]=" placeholder='"+String.asAttValue(String.htmlStringToString(_12))+"'"}
_5[_5.length]=this.getElementStyleHTML(_2);if(this.$183=="FILE"){if(!this.capture){if(this.form.parentElement&&this.form.parentElement.dataSource){var _13=this.form.parentElement.dataSource,_14=isc.DS.get(_13).getField(this.name);if(_14&&_14.mimeType){var _15=_14.mimeType.toUpperCase();if(_15=="AUDIO/3GPP"||_15=="AUDIO/MP4"||_15=="VIDEO/MP4"||_15=="VIDEO/3GPP"||_15=="IMAGE/JPEG"||_15=="IMAGE/PNG")
{_5[_5.length]="capture"}
}
}
}else{_5[_5.length]="capture="+this.capture}
}
var _16=this.$154();if(_16!=null){var _17=_5.length;_5[_17]=this.$14f;isc.$bk(_5,_16,_17+1,5)}
if(this.showTitle==false&&this.accessKey!=null){_5[_5.length]=this.$14e;_5[_5.length]=this.accessKey}
_5[_5.length]=this.$oa;_4=_5.join(isc.emptyString);_5.length=_6}
return _4}
,isc.A.setSuppressBrowserClearIcon=function isc_TextItem_setSuppressBrowserClearIcon(_1){if(this.suppressBrowserClearIcon!=_1){this.suppressBrowserClearIcon=_1;this.redraw()}
}
,isc.A.$1947=function isc_TextItem__shouldSuppressBrowserClearIcon(){return isc.Browser.isIE&&(this.suppressBrowserClearIcon!=null
?this.suppressBrowserClearIcon:this.form.suppressBrowserClearIcons)}
,isc.A.$1397=function isc_TextItem__elementIsReadOnly(){return this.isInactiveHTML()||this.isReadOnly()}
,isc.A.$2075=function isc_TextItem__suppressUpdateValueFromElement(){if(this.$1397())return true;return this.Super("$2075",arguments)}
,isc.A.$143=function isc_TextItem__sizeTextBoxAsContentBox(){if(this.$68y()){return this.Super("$143",arguments)}
return isc.Browser.isStrict}
,isc.A.$12x=function isc_TextItem__nativeElementBlur(_1,_2){if(this.form&&!this.form.$10u&&(this.form.$11v==null))
{this.form.elementChanged(this)}
var _3=this.Super("$12x",arguments);if(!this.isReadOnly()&&(this.formatOnFocusChange||this.mask!=null||this.$84f==null||this.$84f!=this.getEnteredValue()))
{this.refreshDisplayValue()}
if(this.$712()&&!this.$1564()){var _4=this.getElementValue();if(_4==null||isc.isAn.emptyString(_4)){this.$66t()}
}
if(this.$85u!=null){isc.Timer.clear(this.$85u);this.$85u=null}
return _3}
,isc.A.refreshDisplayValue=function isc_TextItem_refreshDisplayValue(){var _1=this.getValue();if(this.mapValueToDisplay){_1=this.mapValueToDisplay(_1)}
if(!this.hasFocus&&this.$712()&&!this.$1564()&&(_1==null||isc.isAn.emptyString(_1)))
{this.$66t()}else{this.setElementValue(_1)}
}
,isc.A.getTextBoxStyle=function isc_TextItem_getTextBoxStyle(){var _1;if((!this.hasFocus&&this.$712()&&!this.$1564()&&this._value==null)||(this.$1441))
{_1=this.$66v()}else{_1=this.Super("getTextBoxStyle",arguments)}
if(this.$1947()){_1+=" "+isc.TextItem.suppressClearIconClassName}
return _1}
,isc.A.getElementStyleHTML=function isc_TextItem_getElementStyleHTML(_1){var _2=this.$68y()&&this.printFullText;var _3=this.$19a,_4=this.getTextBoxWidth(_1),_5=this.getTextBoxHeight(_1),_6=this.getTextBoxStyle(),_7=this.$169t();_3[1]=_6;if(isc.isA.Number(_4)){_3[3]=this.$93;isc.$bk(_3,_4,4,4);_3[8]=this.$38}else{_3[3]=_3[4]=_3[5]=_3[6]=_3[7]=_3[8]=null}
if(isc.isA.Number(_5)&&(!_7||this.$169p!=="divStyledAsDataElement")){_3[9]=this.$92;isc.$bk(_3,_5,10,4);_3[14]=this.$38}else{_3[9]=_3[10]=_3[11]=_3[12]=_3[13]=_3[14]=null}
if(this.textAlign){_3[15]=this.$14c;_3[16]=this.textAlign;_3[17]=this.$39}else{_3[15]=_3[16]=_3[17]=null}
if(isc.TextItem.$126z){_3[18]=_2?null:this.$78v}
if(isc.Browser.isMoz&&!_2){_3[19]=(this.$154()>0?this.$19b
:this.$19c)}
if(this.$169t()){var _8=this.isRTL(),_9=_8?this.$156l:this.$156j;if(this.$169p==="absolutePositioning"){var _10=isc.Element.$tr(_6)+_9,_11=_8?this.$156j:this.$156l,_12=isc.Element.$ts(_6)+_11;_3[20]="padding-right:"+_12+"px;padding-left:"+_10+"px"}else{if(isc.Browser.isIE&&!isc.Browser.isStrict){_3[20]=isc.Canvas.$42a+"position:relative;left:"+_9+"px"}else{_3[20]=isc.Canvas.$42a+"position:relative;top:0px;bottom:0px;left:"+_9+"px"}
if(isc.Browser.isIE&&9<=isc.Browser.version&&isc.Browser.version<=10){_3[20]+="; height: "+this.getTextBoxHeight()+"px;"}
}
}else{_3[20]=null}
var _13=this.getExtraTextBoxCSS();if(_13){_3[21]=";"+_13+"'"}else{_3[21]="' "}
return _3.join(isc.emptyString)}
,isc.A.$104v=function isc_TextItem__getMeasureCanvas(){return isc.TextItem.$78l||(isc.TextItem.$78l=isc.Canvas.create({_generated:true,top:-1000,ariaState:{hidden:true
},overflow:"visible",autoDraw:true,height:1,width:1,markForRedraw:function(){}
}))}
,isc.A.$1156=function isc_TextItem__getTextBoxScrollWidth(_1,_2,_3,_4){var _5=_1.tagName;if((_5===this.$1619||_5===this.$162a)&&(isc.Browser.isEdge||isc.Browser.isIE10||isc.Browser.isMoz||(this.textAlign!=null&&this.textAlign!=(this.isRTL()?"right":"left"))
)
)
{var _6=this.getTextBoxStyle(),_7=this.getElementValue();if(_7==null)_7="";else _7=String(_7);if(this.$1157==null||this.$1157.textBoxStyle!=_6||this.$1157.elementValue!=_7)
{var _8=this.$104v();if(_8.styleName!=_6)_8.setStyleName(_6);_8.setContents("<span style='white-space:nowrap'>"+isc.makeXMLSafe(_7)+"</span>");_8.redraw("value scrollWidth measurement: "+_7);var _9=_8.getScrollWidth(true);this.$1157={width:_9,textBoxStyle:_6,elementValue:_7
}}
return this.$1157.width}else{return this.invokeSuper(isc.TextItem,"$1156",_1,_2,_3,_4)}
}
,isc.A.getEnteredValue=function isc_TextItem_getEnteredValue(){return this.getElementValue()}
,isc.A.mapValueToDisplay=function isc_TextItem_mapValueToDisplay(_1,_2){var _3;if(this.mask&&this.hasFocus&&!_2){_3=this.$715()}else{_3=isc.FormItem.$b4.mapValueToDisplay.call(this,_1);if(_3==null)return isc.emptyString;if(this.mask){_3=this.$714(_3)}
}
return _3}
,isc.A.$184w=function isc_TextItem__getFormattedNumberString(_1){if(isc.SimpleType.inheritsFrom(this.type,"float")){if(this.decimalPrecision!=null||this.decimalPad!=null){return isc.Canvas.getFloatValueAsString(_1,this.decimalPrecision,this.decimalPad)}else if(this.precision!=null){return isc.Canvas.getNumberValueAsString(_1,this.precision,"float")}
}
return""+_1}
,isc.A.handleEditorEnter=function isc_TextItem_handleEditorEnter(){if(isc.SimpleType.inheritsFrom(this.getType(),"float")||isc.SimpleType.inheritsFrom(this.getType(),"localeFloat"))
{this.$956=true;var _1=this.getValue(),_2=this.mapValueToDisplay(_1);var _3=this.getEnteredValue()||"";if(_3!=_2){var _4=this.getSelectionRange(),_5;if(_4){if(_3.length==_2.length||(_4[0]==0&&_4[1]==0))
{_5=_4}else if(_4[1]==_3.length){if(_4[0]==0){_5=[0,_2.length]}else if(_4[0]==_3.length){_5=[_2.length,_2.length]}
}
this.setElementValue(_2,_1);if(_5!=null){this.setSelectionRange(_5[0],_5[1])}
}
}
}
this.Super("handleEditorEnter",arguments)}
,isc.A.handleEditorExit=function isc_TextItem_handleEditorExit(){this.Super("handleEditorExit",arguments);if(isc.SimpleType.inheritsFrom(this.getType(),"float")||isc.SimpleType.inheritsFrom(this.getType(),"localeFloat"))
{this.$956=false;var _1=this.getValue(),_2=this.mapValueToDisplay(_1);this.setElementValue(_2,_1)}
}
,isc.A.shouldApplyStaticTypeFormat=function isc_TextItem_shouldApplyStaticTypeFormat(){if(this.renderAsStatic()){return this.Super("shouldApplyStaticTypeFormat",arguments)}else{if(this.formatOnBlur){var _1=this.hasFocus;return!_1}
return false}
}
,isc.A.mapDisplayToValue=function isc_TextItem_mapDisplayToValue(_1){var _2;if(this.mask){_2=this.$716(_1)}else{if(this.mapEmptyDisplayValue||(_1!=this.emptyDisplayValue)){_2=this.$17d(_1)}
}
_2=this.$79d(_2);if(isc.is.emptyString(_2))_2=this.emptyStringValue;return _2}
,isc.A.saveValue=function isc_TextItem_saveValue(_1,_2){if(this.mask)this.$714(_1);this.Super("saveValue",arguments)}
,isc.A.setValue=function isc_TextItem_setValue(_1,_2,_3,_4){this.$66s();var _5;if(this.emptyStringValue===null||this.emptyStringValue===_5){if(_1==null||isc.is.emptyString(_1)){this.emptyStringValue=_1}
}
if(_1!==_5&&_1!=null&&this.characterCasing!=isc.TextItem.DEFAULT){if(this.characterCasing==isc.TextItem.UPPER){if(isc.isA.Array(_1))
this.arrayToUpperCase(_1);else
_1=_1.toUpperCase()}else if(this.characterCasing==isc.TextItem.LOWER){if(isc.isA.Array(_1))
this.arrayToLowerCase(_1);else
_1=_1.toLowerCase()}
}
_1=this.invokeSuper(isc.TextItem,"setValue",_1,_2,_3,_4);if(!this.hasFocus&&this.$712()&&!this.$1564()){var _6=this.getElementValue();if(_6==null||isc.isAn.emptyString(_6)){this.$66t()}else{var _7=this.getDataElement();if(_7!=null)_7.className=this.getTextBoxStyle()}
}else if(this.hasFocus&&this.mask&&(_1==null||isc.isAn.emptyString(_1))){this.$72a(this.$72g==null?0:this.$72g)}
return _1}
,isc.A.$124t=function isc_TextItem__showValue(_1,_2){var _3=false;if(!this.hasFocus&&this.$712()&&!this.$1564()){var _4=this.getDisplayValue(_1);if(_4==null||isc.isAn.emptyString(_4)){_3=true}
}
if(_3){if(this.$1563&&this.getElementValue()!=String.htmlStringToString(this.getHint())){this.$1563=false}
this.$66t()}else{if(this.$1563)this.$1563=false;return this.Super("$124t",arguments)}
}
,isc.A.arrayToUpperCase=function isc_TextItem_arrayToUpperCase(_1){for(var i=0;i<_1.length;i++){_1[i]=_1[i].toUpperCase()}
}
,isc.A.arrayToLowerCase=function isc_TextItem_arrayToLowerCase(_1){for(var i=0;i<_1.length;i++){_1[i]=_1[i].toLowerCase()}
}
,isc.A.getCriteriaFieldName=function isc_TextItem_getCriteriaFieldName(){if(this.criteriaField)return this.criteriaField;if(this.displayField)return this.displayField;return this.Super("getCriteriaFieldName",arguments)}
,isc.A.$12v=function isc_TextItem__nativeElementFocus(_1,_2){var _3=this.$93l;var _4=this.Super("$12v",arguments);var _5=this.getClass().isMethodSupported("getSelectionRange");var _6=this.$1563;this.$66s();if(this.$j6){if(_5)this.$236q=this.getSelectionRange()}
if(this.mask&&this.mapValueToDisplay){this.mapValueToDisplay(this.getValue(),true)}
if(this.isReadOnly())return _4;var _7=this.$j6;var _8;if(this.formatOnFocusChange||this.formatOnBlur){var _9=this.getElementValue();this.refreshDisplayValue()
if((isc.Browser.isIE10||(isc.Browser.isIE&&_9!=this.getElementValue())))
{_8=true}
}
if(this.mask){this.$717(false);var _10=!_7&&(!_3||(this.selectOnFocus&&this.showPickerIconOnFocus))&&this.$884();if(!_10){this.$2644=_7?this.$236q:null;this.$236r();this.$236s=this.getSelectionRange();if(_7){this.$2645=true;isc.Page.setEvent("click",this,isc.Page.FIRE_ONCE,"$236t"
)}else{this.$2645=true;this.delayCall("$236r",null,50)}
}else{this.$85u=this.delayCall("$85w")}
}else{var _10=!_7&&!_3&&this.$884();var _11=this.getEnteredValue();if(_5){if(_10){if(_11!=null&&!this.$85u){this.$85u=this.delayCall("$85w")}
}else if(_8){var _9=this.getElementValue();if(_9.length>0){this.setSelectionRange(_9.length,_9.length)}
}
}
this.$84f=_11}
return _4}
,isc.A.$85v=function isc_TextItem__delayed_setSelection(_1,_2){this.$85u=null;if(!this.$820())return;this.$72a(_1,_2)}
,isc.A.$85w=function isc_TextItem__delayed_selectValue(){this.$85u=null;if(!this.$820())return;this.selectValue()}
,isc.A.$236t=function isc_TextItem__fixCaretForMaskOnMouseUp(){if(this.$820()){var _1=this.getSelectionRange();if(this.$2644==null&&(_1[0]!=this.$236s[0]||_1[1]!=this.$236s[1]))
{this.$2644=_1;this.$236r()}
}
}
,isc.A.setKeyPressFilter=function isc_TextItem_setKeyPressFilter(_1){if(this.mask){this.logWarn("setKeyPressFilter() ignored because mask is enabled");return}
this.keyPressFilter=_1;this.$66y=null;if(this.keyPressFilter){this.$66y=new RegExp(this.keyPressFilter)}
}
,isc.A.init=function isc_TextItem_init(){this.Super("init",arguments);if(this.inputDataType!=null&&this.browserInputType==null){this.browserInputType=this.inputDataType}
if(this.mask){if((isc.ComboBoxItem&&isc.isA.ComboBoxItem(this))||(isc.SpinnerItem&&isc.isA.SpinnerItem(this)))
{this.logWarn("item.mask is unsupported for this FormItem type. This item has mask specified as '"+this.mask+"' - ignoring.");this.mask=null}else if(this.browserInputType=="digits"||this.browserInputType=="number"){this.logWarn("item.mask is unsupported for a FormItem with browserInputType '"+this.browserInputType+"'. Ignoring.");this.mask=null}else{this.$72b();if(this.keyPressFilter){this.logWarn("init: keyPressFilter ignored because mask is enabled")}
}
}else if(this.keyPressFilter){this.$66y=new RegExp(this.keyPressFilter)}
}
,isc.A.handleKeyPress=function isc_TextItem_handleKeyPress(_1,_2){var _3=this.Super("handleKeyPress",arguments);if(_3==false){return false}
if(this.isReadOnly())return _3;var _4=_1.keyName||"";if((isc.EventHandler.ctrlKeyDown()||isc.EventHandler.altKeyDown()||isc.EH.metaKeyDown())&&(_2.characterValue===null||_2.characterValue<128)){if(this.mask&&(_4.startsWith("Arrow_")||_4=="Home"||_4=="End")&&!isc.EH.shiftKeyDown())
{this.clearSelectionRange()}
return _3}
if((!this.characterCasing||this.characterCasing==isc.TextItem.DEFAULT)&&!this.$66y&&!this.mask)
{return _3}
var _5=_1.characterValue
;if(this.mask){var _6=this.$72c();if(isc.Browser.isFirefox){var _7=this.$2197;if(_7){_6.begin=_7[0];_6.end=_7[1]}
}
var _8=isc.Browser.isSafari;var _9=_6.begin;if(_4=="Backspace"||_4=="Delete"){if((_6.begin-_6.end)!=0||(_8&&this.$72d))
{if(isc.Browser.isSafari&&this.$72d){_6=this.$72d;this.$72d=null}
if(this.maskOverwriteMode){this.$72e(_6.begin,_6.end)}else{var _10=_6.end-_6.begin;this.$72f(_6.begin,_10)}
this.$717(true);this.$73t(_6.begin,0)}else{if(_4=="Backspace"){var _11=_9-1;if(_11>=0){if(this.maskOverwriteMode){while(!this.$72i[_11]&&_11>=0)_11--;if(_11>-1){this.$72l[_11]=this.maskPromptChar}
}else{this.$72f(_11)}
if(_11>=0){this.$717(true);this.$73t(_11,-1)}
}
}else{if(this.maskOverwriteMode){if(_9<this.$718&&_9==this.$72h(_9-1)){this.$72l[_9]=this.maskPromptChar}
}else{this.$72f(_9)}
this.$717(true);this.$73t(_9,0)}
}
return false}else if((_4.startsWith("Arrow_")||_4=="Home"||_4=="End")&&!isc.EH.shiftKeyDown())
{this.clearSelectionRange(true)}
if(this.$1897(_5)){this.$1165(_5)}
if(_4=="Escape"){if(this.resetMaskOnEscape){this.$72e(0,this.$718);this.$717(true);this.$72a(this.$72g==null?0:this.$72g)}
}
}
if(this.$1166(_5)==false){return false}else{if(_3!=false)this.clearSelectionRange();return _3}
}
,isc.A.$1897=function isc_TextItem__willInsertCharacterValue(_1){var _2=this.$72c(),_3=_2.begin;if((this.mask&&!this.$660(_1))||(!this.mask&&((!this.$66y&&!this.$66z(_1))||(this.$66y&&!this.$660(_1)))))
{return false}
var c=String.fromCharCode(_1);if(this.mask){var p=this.$72h(_3-1);if(p<this.$718){if(!this.maskOverwriteMode){var _6=this.$236k(_3,_2);if(_6)return false}
var _7=this.$72i[p];if(_7!=null){if(c!==this.maskPromptChar&&_7.casing!=null){c=this.$72j(c,_7.casing).charAt(0)}
if(_7.filter.test(c)||(c===this.maskPromptChar&&_7.filter.test(this.maskPadChar)))
{return true}
}
}
return false}
return true}
,isc.A.$236k=function isc_TextItem__subsequentMaskBufferFull(_1,_2){var _3=true;if(_1<_2.end){_3=false}else{var _4=_1,_5=_1;while(_4<=this.$718){var _6=this.$72l[_4];if(_6==this.maskPromptChar){_3=false;break}
_5=this.$72h(_5);if(_5==_4){_3=true;break}
if(_6!=this.maskPromptChar){var _7=this.$72i[_5];if(_7&&!_7.filter.test(_6)){_3=true;break}
}
_4=_5}
}
return _3}
);isc.evalBoundary;isc.B.push(isc.A.$1166=function isc_TextItem__insertCharacterValue(_1,_2){var _3=this.$72c(),_4=_3.begin;if((this.mask&&!this.$660(_1))||(!this.mask&&((!this.$66y&&!this.$66z(_1))||(this.$66y&&!this.$660(_1)))))
{return true}
var c=String.fromCharCode(_1);if(this.mask){var p=this.$72h(_4-1);if(p<this.$718){if(!this.maskOverwriteMode){if(this.$236k(p,_3))return false}
var _7=this.$72i[p];if(_7!=null){if(c!==this.maskPromptChar&&_7.casing!=null){c=this.$72j(c,_7.casing).charAt(0)}
if(_7.filter.test(c)||(c===this.maskPromptChar&&_7.filter.test(this.maskPadChar)))
{if(!this.maskOverwriteMode&&!_2){this.$72k(p)}
this.$72l[p]=c;var _8=p;if(this.$717(true)){_8=this.$72h(p)}
this.$72a(_8);if(_2&&c!==this.maskPromptChar)return _8}
}
}
return false}
var _9=c;if(!this.mask)_9=this.$72j(c,this.characterCasing);if(c==_9&&!this.$66y)return true;if(this.$66y){if(this.$660(_1)&&!this.$66y.test(_9)){return false}
}
if(c==_9)return true;var _10=this.getValue()||"";if(!this.changeOnKeypress){_10=this.getElementValue()||""}
_3=this.getSelectionRange();_10=_10.substring(0,_3[0])+_9+_10.substring(_3[1]);if(this.changeOnKeypress){this.setElementValue(_10);this.updateValue()}else{this.setValue(_10)}
this.setSelectionRange(_3[0]+1,_3[0]+1);return false}
,isc.A.$1165=function isc_TextItem__setUpInsertCharacterValue(_1){if(this.mask){var _2=this.$72c();var _3=isc.Browser.isSafari;if(this.$660(_1)&&((_2.begin-_2.end)!=0||(_3&&this.$72d)))
{if(isc.Browser.isSafari&&this.$72d){_2=this.$72d;this.$72d=null}
if(this.maskOverwriteMode){this.$72e(_2.begin,_2.end)}else{_2=this.$72c();var _4=_2.end-_2.begin;this.$72f(_2.begin,_4)}
}
if(_3&&(_2.begin-_2.end)!=0&&!this.$660(_1))
{this.$72d=_2}else{this.$72d=null}
}
}
,isc.A.$660=function isc_TextItem__isTypableCharacter(_1){return _1!=null&&(((_1>=32&&_1<=126)||_1>127))}
,isc.A.$66z=function isc_TextItem__isAlphaCharacter(_1){return(_1>=65&&_1<=90)||(_1>=97&&_1<=122)}
,isc.A.$72j=function isc_TextItem__mapCharacterCase(_1,_2){if(_2==isc.TextItem.UPPER){_1=_1.toUpperCase()}else if(_2==isc.TextItem.LOWER){_1=_1.toLowerCase()}
return _1}
,isc.A.setMask=function isc_TextItem_setMask(_1){if(isc.isA.ComboBoxItem(this)||isc.isA.SpinnerItem(this)){this.logWarn("setMask(): This TextItem subclass does not support input masks.")
return}
if(!this.mask!=!_1&&this.$85u!=null){isc.Timer.clear(this.$85u);this.$85u=null}
this.mask=_1;this.$72b();if(this.keyPressFilter){this.$66y=null;this.logWarn("setMask: keyPressFilter ignored because mask is enabled")}
this.clearValue()}
,isc.A.$72b=function isc_TextItem__parseMask(){var _1=this.mask;if(!_1)return;this.$72i=[];this.$72g=null;this.$72l=[];this.$718=0;var _2=null;var _3=false;var _4=false;var _5="";for(var i=0,_7=_1.length;i<_7;++i){var c=_1.charAt(i);if(!_4){if(!_3&&c==="\\"){_3=true}else if(_3){this.$72m(c,_2);_3=false}else if(c==="<"){_2=(_2==isc.TextItem.LOWER?null:isc.TextItem.LOWER)}else if(c===">"){_2=(_2==isc.TextItem.UPPER?null:isc.TextItem.UPPER)}else if(c==="["){_4=true;_5+=c}else{this.$72n(c,_2)}
}else{if(c==="]"){_4=false;_5+=c;this.$1628(_5,_2);_5=""}else{_5+=c}
}
}
if(!_4){if(_3){this.logWarn("Invalid mask syntax: Trailing backslash");this.$72m("\\",_2);_3=false}
}else{this.logWarn("Invalid mask syntax: Character class regular expression was not terminated");_4=false;_5+="]";this.$1628(_5,_2);_5=""}
}
,isc.A.$72m=function isc_TextItem__addLiteralToMask(_1,_2){this.$72i.push(null);this.$72l.push(_1);this.$718++}
,isc.A.$1628=function isc_TextItem__addCustomRegexToMask(_1,_2){this.$72i.add({filter:new RegExp(_1),casing:_2
});if(this.$72g==null){this.$72g=this.$72i.length-1}
this.$72l.push(this.maskPromptChar);this.$718++}
,isc.A.$72n=function isc_TextItem__addUnknownToMask(_1,_2){var _3=isc.TextItem.$713[_1];if(_3){this.$72i.push({filter:new RegExp(_3.charFilter),casing:_2}
);if(this.$72g==null){this.$72g=this.$72i.length-1}
this.$72l.push(this.maskPromptChar)}else{this.$72i.push(null);this.$72l.push(_1)}
this.$718++}
,isc.A.$72c=function isc_TextItem__getSelection(){var _1=this.getSelectionRange();if(_1==null)_1=[0,0];return{begin:_1[0],end:_1[1]}}
,isc.A.$72a=function isc_TextItem__setSelection(_1,_2){if(this.hasFocus){_2=(isc.isA.Number(_2)?_2:_1);this.setSelectionRange(_1,_2)}
}
,isc.A.$72h=function isc_TextItem__getNextEntryPosition(_1){while(++_1<this.$718){if(this.$72i[_1])return _1}
return this.$718}
,isc.A.$719=function isc_TextItem__getEndPosition(){var _1;for(var i=this.$718-1;i>=0;i--){if(this.$72i[i]){if(this.$72l[i]==this.maskPromptChar)
_1=i;else
break}
}
if(_1==null)_1=this.$718;return _1}
,isc.A.$714=function isc_TextItem__maskValue(_1){var _2=_1||"";_2=this.$1903(_2);this.$72e(0,this.$718);var _3=-1;if(this.maskSaveLiterals){for(var i=0,_5=0;i<_2.length;i++){if(this.$72i[i]){var c=_2.charAt(i);if(c==" "){this.$72l[i]=this.hasFocus?this.maskPromptChar:this.maskPadChar}else if(this.$72i[i].filter.test(c)){this.$72l[i]=c;_3=i}
}
}
}else{for(var i=0,_5=0;i<this.$718;i++){if(this.$72i[i]){while(_5<_2.length){var c=_2.charAt(_5++);var _7=this.$72i[i];if(c==" "){this.$72l[i]=this.hasFocus?this.maskPromptChar:this.maskPadChar;break}else if(_7.filter.test(c)){this.$72l[i]=_7.casing?this.$72j(c,_7.casing):c;_3=i;break}
}
if(_5>_2.length)break}
}
}
_2=this.$715();if(!this.hasFocus){if(_3>=0){for(var i=_3+1;i<this.$718;i++){if(this.$72i[i])break;_3++}
}
var _8=_2,_2=_2.substring(0,_3+1);if(this.maskPadChar!=" "&&(!this.$712()||_2.length)){for(var i=_3+1;i<this.$718;i++){var _7=this.$72i[i];_2+=_7?this.maskPadChar:_8[i]}
}
}
return _2}
,isc.A.$716=function isc_TextItem__unmaskValue(_1){if(_1==null)_1="";var _2=false;var _3=-1;var _4="";for(var i=0,_6=0;i<_1.length;i++){var c=_1.charAt(i);if(this.$72i[i]){if(c!=this.maskPromptChar&&this.$72i[i].filter.test(c)){_4+=c;_2=true;_3=_6++}else{_4+=this.maskPadChar;_6++}
}else if(this.maskSaveLiterals){_4+=c;_3=_6++}
}
if(!_2){_4=""}else{_4=_4.substring(0,_3+1)}
return _4}
,isc.A.$715=function isc_TextItem__getMaskBuffer(){if(this.$72l==null)return"";return this.$72l.join('')}
,isc.A.$72e=function isc_TextItem__clearMaskBuffer(_1,_2){for(var i=_1;i<_2&&i<this.$718;i++){if(this.$72i[i])this.$72l[i]=this.maskPromptChar}
}
,isc.A.$717=function isc_TextItem__saveMaskBuffer(_1){var _2=this.$715();this.setElementValue(_2);if(_1&&this.changeOnKeypress){var _3=this.$716(_2);var _4=this.handleChange(_3,this._value);if(this.destroyed)return;_3=this.$17n;this.updateAppearance(_3);this.saveValue(_3);this.handleChanged(_3);return _4}
return true}
,isc.A.setSelectionRange=function isc_TextItem_setSelectionRange(_1,_2){if(this.$2645){this.$2644=[_1,_2]
}
return this.Super("setSelectionRange",arguments)}
,isc.A.$236r=function isc_TextItem__fixCaretForMask(){var _1=this.$2644;delete this.$2645;var _2=this.$719(),_3,_4;if(_1==null||this.getValue()==null){_3=_4=_2}else{var _5=Math.min(_2,this.$72h(-1));_3=Math.max(_5,Math.min(_1[0],_2));_4=Math.max(_5,Math.min(_1[1],_2))}
this.setSelectionRange(_3,_4)}
,isc.A.$73t=function isc_TextItem__positionCaret(_1,_2){if(_2<0){while(!this.$72i[_1]&&_1>0)_1--}else{while(!this.$72i[_1]&&_1<=this.$718)_1++}
this.$72a(_1)}
,isc.A.$72f=function isc_TextItem__shiftMaskBufferLeft(_1,_2){var _3;if(_2==null||_2==0){while(!this.$72i[_1]&&_1>0)_1--;_3=1}else{_3=_2}
var _4=[],_5=false;for(var _6=_1,_7=_1+(_3-1);_6<this.$718;_6++){var _8=this.$72i[_6];if(!_8){continue}
_7=this.$72h(_7);var _9;if(_7>=this.$718)_9=this.maskPromptChar;else{_9=this.$72l[_7];if(_9!=this.maskPromptChar&&!_8.filter.test(_9)){_5=true;break}else{if(_8.casing){_9=this.$72j(_9,_8.casing)}
}
}
_4.add({c:_9,from:_7,to:_6})}
if(_5){for(var i=_1;i<_1+_3;i++){if(this.$72i[i])this.$72l[i]=this.maskPromptChar}
}else{for(var i=0;i<_4.length;i++){var c=_4[i].c,_12=_4[i].from,_13=_4[i].to;this.$72l[_13]=c}
}
return!_5}
,isc.A.$72k=function isc_TextItem__shiftMaskBufferRight(_1){for(var i=_1,c=this.maskPromptChar;i<this.$718;i++){var _4=this.$72i[i];if(_4){if(_4.casing){c=this.$72j(c,_4.casing)}
var j=this.$72h(i);var t=this.$72l[i];this.$72l[i]=c;if(j<this.$718&&this.$72i[j].filter.test(t)){c=t}else{break}
}
}
}
,isc.A.$1903=function isc_TextItem__getMaskableValue(_1){if(this.canEditOpaqueValues&&isc.isAn.Object(_1)){if(isc.SimpleType){var _2=isc.SimpleType.getType(this.type)
if(_2&&_2.getAtomicValue){_1=_2.getAtomicValue(_1,"mask")}
}
}
if(_1==null)_1="";if(!isc.isA.String(_1))_1=_1.toString();return _1}
);isc.B._maxIndex=isc.C+78;isc.ClassFactory.defineClass("IntegerItem","TextItem");isc.A=isc.IntegerItem.getPrototype();isc.A.defaultType="integer";isc.IntegerItem.addMethods({})
isc.ClassFactory.defineClass("FloatItem","TextItem");isc.A=isc.FloatItem.getPrototype();isc.A.$956=false;isc.A.defaultType="float";isc.A.$84r=true;isc.FloatItem.addMethods({})
isc.ClassFactory.defineClass("DoubleItem","FloatItem");isc.A=isc.DoubleItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getValueAsDouble=function isc_DoubleItem_getValueAsDouble(){var _1=this.getValue(),_2=parseFloat(_1);return isNaN(_2)?null:_2}
);isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("BlurbItem","FormItem");isc.A=isc.BlurbItem.getPrototype();isc.A.shouldSaveValue=false;isc.A.height=null;isc.A.showTitle=false;isc.A.colSpan="*";isc.A.startRow=true;isc.A.endRow=true;isc.A.textBoxStyle="staticTextItem";isc.A.canSelectText=true;isc.A.emptyDisplayValue="&nbsp;";isc.A.clipValue=false;isc.ClassFactory.defineClass("ButtonItem","CanvasItem");isc.A=isc.ButtonItem.getPrototype();isc.A.canFocus=true;isc.A.shouldSaveValue=false;isc.A.height=null;isc.A.width=null;isc.A.titleStyle=null;isc.A.showTitle=false;isc.A.startRow=true;isc.A.endRow=true;isc.A.buttonConstructor=isc.Button;isc.A.autoFit=true;isc.A.buttonDefaults={getTitle:function(){return this.canvasItem.getTitle()},showFocusedAsOver:this.showFocusedAsOver
};isc.A.autoDestroy=true;isc.A.$pi="disabled";isc.A.readOnlyDisplay="disabled";isc.A.showFocusedAsOver=false;isc.A=isc.ButtonItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$19d={width:true,height:true,icon:true
};isc.B.push(isc.A.init=function isc_ButtonItem_init(){if(this.enableWhen!=null){var _1=this.enableWhen;if(!isc.DS.isAdvancedCriteria(_1)){if(_1.operator&&_1.criteria){_1=isc.addProperties({},_1);_1._constructor="AdvancedCriteria"}else if(!_1.fieldName||!_1.operator){_1=isc.DS.convertCriteria(_1,"exact")}
}
this.readOnlyWhen={_constructor:"AdvancedCriteria",operator:"not",criteria:[_1]
};this.logInfo("ButtonItem.enableWhen specified - ignoring any readOnlyWhen set");if(this.readOnlyDisplay!=this.$pi){this.readOnlyDisplay=this.$pi;this.logWarn("ButtonItem.enableWhen is incompatible with any but the default setting of 'disabled' for readOnlyDisplay - forcing to default")}
}
this.invokeSuper(isc.ButtonItem,"init")}
,isc.A.setReadOnlyDisplay=function isc_ButtonItem_setReadOnlyDisplay(_1){if(this.enableWhen!=null){if(!this.$193y){this.$193y=true;this.logWarn("ButtonItem.enableWhen is incompatible with any but the default setting of 'disabled' for readOnlyDisplay - so ignoring call to setter")}
return}
this.invokeSuper(isc.ButtonItem,"setReadOnlyDisplay",_1)}
,isc.A.getTitleHTML=function isc_ButtonItem_getTitleHTML(){return this.getTitle()}
,isc.A.setTitle=function isc_ButtonItem_setTitle(_1){this.title=_1;if(this.canvas)this.canvas.setTitle(_1)}
,isc.A.setButtonTitleAlign=function isc_ButtonItem_setButtonTitleAlign(_1){if(this.canvas)this.canvas.setAlign(_1)}
,isc.A.$18y=function isc_ButtonItem__createCanvas(){var _1={canFocus:this.$kk(),width:this.width
};if(this.height!=null)_1.height=this.height;if(this.icon)_1.icon=this.icon;if(this.titleStyle)_1.titleStyle=this.titleStyle;if(this.baseStyle)_1.baseStyle=this.baseStyle;if(this.autoFit!=null)_1.autoFit=this.autoFit;if(this.showFocusedAsOver!=null)_1.showFocusedAsOver=this.showFocusedAsOver;if(this.buttonTitleAlign)_1.align=this.buttonTitleAlign;this.canvas=this.button=this.createAutoChild("button",_1,this.buttonConstructor);this.Super("$18y",arguments);if(this.form&&this.form.itemLayout=="absolute")this.canvas.bringToFront()}
,isc.A.$602=function isc_ButtonItem__setCanvasSize(_1,_2,_3,_4){if(_1==null&&_2==null)return;return this.invokeSuper(isc.ButtonItem,"$602",_1,_2,_3,_4)}
,isc.A.propertyChanged=function isc_ButtonItem_propertyChanged(_1,_2){if(this.canvas!=null&&this.$19d[_1]){this.canvas.setProperty(_1,_2)
}
this.Super("propertyChanged",arguments)}
,isc.A.$85m=function isc_ButtonItem__shouldAllowExpressions(){return false}
,isc.A.setShowFocusedAsOver=function isc_ButtonItem_setShowFocusedAsOver(_1){this.showFocusedAsOver=_1;if(this.button)this.button.setShowFocusedAsOver(_1)}
);isc.B._maxIndex=isc.C+10;if(isc.ListGrid){isc.ClassFactory.defineClass("PickListMenu","ScrollingMenu");isc.$1922={$51t:{},pickListCacheLimit:50};isc.$1923={useAllDataSourceFields:false,tabIndex:-1,canResizeFields:false,canFreezeFields:false,styleName:"pickListMenu",bodyStyleName:"pickListMenuBody",canShowFilterEditor:false,canSaveSearches:false,savedSearchAbstractType:"dropList",normalCellHeight:16,scrollToCellXPosition:"left",scrollToCellYPosition:"top",animateTransitions:!isc.Browser.isMobileIE,skinUsesCSSTransitions:false,animateDuration:350,getTransformCSS:function(){if(!this.$1484||!isc.Browser.$139c||!this.animateTransitions||!this.skinUsesCSSTransitions){return null}else{var y=!this.$148a?"100%":"0px";return";"+isc.Element.$159t+": translateY("+y+");"}
},handleTransitionEnd:function(_1,_2){if(_2.target===this&&this.$1484!=null){this.$1393();if(!this.$148a){this.$1484.hide()}else{if(this.showModal)this.body.focus()}
}
},$vl:function(_1){if(_1&&isc.Browser.$139c&&this.animateTransitions&&this.skinUsesCSSTransitions&&this.$148a)
{return false}
return this.Super("$vl",arguments)},$148c:function(){if(!isc.Canvas.$151r(this.$1484)){this.$1484.bringToFront()}
this.$1484.show();if(!this.isDrawn())this.draw();if(!isc.Browser.$139c||!this.animateTransitions||!this.skinUsesCSSTransitions){this.show();this.moveTo(0,this.getInnerHeight());this.animateMove(0,0,function(){},this.animateDuration)}else{this.$148a=true;this.show();this.delayCall("$151v")}
},$151v:function(){this.$1392();isc.Element.$136r(this,"translateY(0px)")},$148d:function(){if(!isc.Browser.$139c||!this.animateTransitions||!this.skinUsesCSSTransitions){var _1=this.$1484;this.animateMove(0,this.getInnerHeight(),function(){_1.hide()},this.animateDuration)}else{this.$148a=false;this.delayCall("$155u",null,100)}
},$155u:function(){this.$1392();isc.Element.$136r(this,"translateY(100%)");if(this.$1484){this.$1484.resizeTo(1,1);this.$1484.hide()}
},getValueIcon:function(_1,_2,_3){var _4=this.formItem;var _5=_4&&!_4.suppressValueIcons&&(_4.valueIcons!=null||_4.getValueIcon!=null);if(_5){var _6=_4.getValueFieldName(),_7=_4.valueIconField||_4.getDisplayFieldName()||_6;if(this.getFieldName(_1)==_7){return _4.$144(_3[_6])}
}
return this.Super("getValueIcon",arguments)},getArrowKeyAction:function(){return this.allowMultiSelect?"focus":"select"},showOverAsSelected:true,rowClick:function(_1,_2,_3,_4){this.$119p=_4;this.Super("rowClick",arguments);delete this.$119p;if(_1&&this.clickInCheckboxArea&&this.clickInCheckboxArea(_1)){this.itemClick(_1)}
},recordClick:function(_1,_2,_3,_4,_5,_6,_7){var _8=false;if(this.allowMultiSelect&&this.formItem.specialValues&&!this.separateSpecialValues){var _9=this.formItem.specialValues,_10=this.formItem.getValueFieldName(),_6=_2[_10];if(isc.isAn.Array(_9)){for(var i=0;i<_9.length;i++){if(_9[i]==_6){_8=true;break}
}
}else if(isc.isAn.Object(_9)){if(_9[_6]!=null)_8=true}
}
if(!_8&&_2[_1.recordCanSelectProperty]==false)return;var _12;if(this.$119p){var _13=this.ns.EH.getKey(),_14=(_13=="Enter");if(!_14){var _15=this.formItem;if(isc.Canvas.ariaEnabled()&&_15!=null&&_15.ariaRole==="combobox"&&this.body!=null)
{var _16=this.body.getDrawArea()[0];var _17=this.getRowElementId(_3,_3-_16);_15.setAriaState("activedescendant",_17)}
if(_13!="Space"||!_15.allowMultiSelect)return;_12=false}else{_12=true}
}else{_12=!this.allowMultiSelect}
var _18=false;if(_2!=null&&_2.isFolder){if(this.singleClickFolderToggle){_12=false}else if(this.fireItemClickForFolders==false)_12=false}
if(_8||_12)this.hide();if(_2!=null){if(_2.isFolder){if(_18)this.itemClick(_2);else{if(this.fireItemClickForFolders&&!this.singleClickFolderToggle){this.itemClick(_2)}else this.toggleFolder(_2)}
}else{this.itemClick(_2)}
}
},selectOnGeneratedCellClick:function(_1,_2,_3,_4){if(this.allowMultiSelect&&isc.EH.getKey()=="Enter")return false;return this.Super("selectOnGeneratedCellClick",arguments)},headerClick:function(_1,_2){var _3=this.Super("headerClick",arguments);var _4=this.getField(_1);if(this.isCheckboxField(_4)&&this.allowMultiSelect){this.multiSelectChanged()}
return _3},applySelection:function(){if(!this.formItem)return;this.multiSelectChanged()},multiSelectChanged:function(){if(!this.formItem)return;var _1=this.formItem,_2=_1.getValueFieldName(),_3=this.getSelection(),_4=!_3||_3.length==0?null:_3.getProperty(_2)
;_1.pickValue(_4)},itemClick:function(_1){var _2=this.formItem,_3=_2.getValueFieldName(),_4=_1[_3],_5=null,_6=false,_7=_2.separateValuesList&&_2.separateValuesList.getData().length>0;if(_7){_5=_2.separateValuesList.find(_1)}else if(_2.specialValues){var _8=_2.specialValues;if(isc.isAn.Array(_8)){for(var i=0;i<_8.length;i++){if(_8[i]==_4){_6=true;break}
}
}else if(isc.isAn.Object(_8)){if(_8[_4]!=null)_6=true}
}
if(((_7&&_5==null)||(!_6&&_5==null)||(!_6&&!_7))&&this.allowMultiSelect)
{this.multiSelectChanged()}else{var _3=_2.getValueFieldName();var _10=(_5&&_7?_2.$190c:_2.getValueFieldName());var _4=_1[_10];if(isc.PickList.selectAllStoredValue&&_4==isc.PickList.selectAllStoredValue){var _11=this,_8=this.getData(),_12=_2.specialValues||[],_13=[],_14;if(!isc.isAn.Array(_12)){var _15=0;for(var _16 in _12){_13[_15]=_16;_15++}
}else{_13=_12}
if(isc.ResultSet&&isc.isA.ResultSet(_8)||isc.isA.ResultTree(_8)){if(_8.allMatchingRowsCached()){_14=_8.getAllRows()}else{_14=_8.getAllLoadedRows();isc.warn("<b>selectAllStoredValue</b> is not valid when data paging is enabled. Selecting all loaded rows, behavior from now on is undefined")}
}else{_14=_8}
var _17=0;if(!_2.separateSpecialValues)_17=_13.length;for(var i=_17;i<_14.length;i++){_2.pickList.selectRecord(i)}
var _18=_2.pickList.getSelection(),_4=_18.getProperty(_3);_2.pickValue(_4)}else{if(isc.PickList.emptyStoredValue&&_4==isc.PickList.emptyStoredValue){_2.pickList.deselectAllRecords();_4=null}
_2.pickValue(_4)}
}
},hide:function(_1,_2,_3,_4){var _5=this.isVisible()&&this.isDrawn();if(this.$1484){this.$148d()}else{this.invokeSuper(isc.PickListMenu,"hide",_1,_2,_3,_4)}
if(!this.formItem)return;if(_5&&this.showModal)this.formItem.focusInItem();this.formItem.$19g=null;if(_5)this.formItem.$19h();delete this.formItem.$19i;this.clearLastHilite()},show:function(){var _1=this.isVisible()&&this.isDrawn();this.generateClickOnEnter=true;this.generateClickOnSpace=this.allowMultiSelect;if(this.parentElement==null)this.bringToFront();this.Super("show",arguments);if(!_1){this.formItem.$19j()}
},showClickMask:function(){if(this.$1484){return}
if(!this.clickMaskUp(this.getID())){var _1=this.Super("showClickMask",arguments);if(this.formItem){var _2=this.formItem.form,_3=isc.EH.clickMaskRegistry.find("ID",_1);if(_3.$li)_3.$li=null}
}
},getBaseStyle:function(_1,_2,_3,_4,_5,_6){var _7=this.invokeSuper(isc.PickListMenu,"getBaseStyle",_1,_2,_3,_4,_5,_6);var _8=this.formItem;if(isc.isA.SelectItem&&isc.isA.SelectItem(_8)&&_8.multiple&&!_8.$1602&&_8.$161p())
{var _9=this.getField(_3),_10=_8.getValueFieldName();if(this.getField(_10)===_9){var _11=_8.$161a;if(this.isSelected(_1)){if(!_11.has(_1[_10]))_7+="Pending"}else{if(_8.$161r()&&_11.has(_1[_10])){_7+="Deselected"}
}
}
}
return _7},$19e:"background-color:",$19f:"color:",getCellCSSText:function(_1,_2,_3){var _4=this.Super("getCellCSSText",arguments);if(this.selectionManager!=null&&this.selectionManager.getSelectedRecord()==_1)
{var _5=[];if(this.hiliteColor!=null){_5[0]=this.$19e;_5[1]=this.hiliteColor;_5[2]=isc.semi}
if(this.hiliteTextColor!=null){_5[3]=this.$19f;_5[4]=this.hiliteTextColor;_5[5]=isc.semi}
if(_4!=null){if(!_4.endsWith(isc.semi))_4+=isc.semi;return _5.join(isc.emptyString)+_4}
return _5.join(isc.emptyString)}else if(_4!=null){return _4}
},keyDown:function(){return this.$248u()},$248u:function(){if(this.formItem&&!this.formItem.hasPopOutPicker()){var _1=isc.EH.lastEvent.keyName;if(_1=="Tab"){this.hide();return false}
}
},$315:function(_1,_2,_3,_4,_5,_6,_7,_8){if(this.formItem==null)return this.Super("$315",arguments);var _9=this.getFieldName(_5);_1=this.formItem.formatPickListValue(_1,_9,_2);return this.Super("$315",[_1,_2,_3,_4,_5,_6,_7,_8],arguments)},bodyKeyPress:function(_1,_2){var _3=isc.EH.lastEvent.keyName;if(isc.Browser.isSafari){if(_3=="Tab"){if(this.$248u()==false)return false}
}
var _4=isc.EH.getKeyEventCharacterValue();if(_4!=null&&_3!="Enter"){var _5=this.formItem.getAllLocalOptions();if(!_5||_5.length<1){if(this.data&&this.data.localData)_5=this.data.localData}
if(isc.isAn.Array(_5)&&_5.length>1){var _6=String.fromCharCode(_4).toLowerCase(),_7=this.formItem,_8=_7.getValueFieldName(),_9=this.getArrowKeyAction(),_10=_9=="focus"?this.getFocusRow():null
;if(_10==null||_10<0){var _11=this.getSelectedRecord();if(_11)_10=_5.indexOf(_11);if(_10==null)_10=-1}
var _12=_10<(_5.length-1)?_10+1:0;var _13=_10>0;var _14=_6;var _15=false;if(_7&&_7.$177l){_7.$177l(_4,true);_14=_7.$177m;if(_14==(_6+_6)){_7.$177m="";_7.$177l(_4,true);_14=_7.$177m}
if(_14.length>1){_12=_10;_15=true}
}
_14=_14.toLowerCase();while(_15||_12!=_10){_15=false;if(_10<0)_10=0;if(!_5[_12]){if(_13){_13=false;_12=0;continue}
return}
var _16=_5[_12][_8];_16=_7.mapValueToDisplay(_16);var _17=_16.replace(/<(?:.|\n)*?>/gm,'').toLowerCase();if(isc.isA.String(_16)&&_16.length>0&&_17.startsWith(_14)){if(!_7.multiple)this.deselectAllRecords();this.scrollRecordIntoView(_12);if(_9=="focus"){this.$88(_12)}else{this.$24x(_12,null,true)}
return}
_12+=1;if(_12>=_5.length)_12=0}
}
}
var _18=this.getFocusRow();if(_18==null&&_3=="Enter"){this.cancel();return false}
if(["Page_Up","Page_Down","Home","End"].contains(_3)){this.$222z=_3}
return this.Super("bodyKeyPress",arguments)},scrolled:function(){if(this.$222z){var _1;if(this.$222z=="End")_1=this.data.getLength();else _1=this.getVisibleRows()[0];if(_1!=null){this.$88(_1)}
delete this.$222z}
},$253v:function(_1,_2,_3,_4){var _5=this.data;if(!_5)return;var _5=this.requestVisibleRows();if(_5&&Array.isLoading(_5[0])){return}
this.Super("$253v",arguments);var _6=this.formItem;if(_2&&this.getSelectedRecord()==_2&&_6){var _7=this.data.indexOf(_2),_8=_7==-1?null:this.data.get(_7);if(_8){var _9=_6.getValueFieldName();_6.setValue(_8[_9])}else{_6.clearValue()}
}
},createBodies:function(){if(this.body&&this.body.$100r)delete this.body.$100r;this.Super("createBodies",arguments)}};isc.PickListMenu.addClassProperties(isc.$1922)
isc.PickListMenu.addProperties(isc.$1923)
isc.PickListMenu.changeDefaults("bodyDefaults",{remapOverStyles:[0,2,2,2,4,6,6,6,8,10,10,10,12
],getCellStyleName:function(_1,_2,_3,_4){if(this.grid&&this.grid.showOverAsSelected){_1=this.remapOverStyles[_1]}
return this.Super("getCellStyleName",[_1,_2,_3,_4],arguments)},selectOnMouseDown:function(_1,_2,_3,_4,_5,_6){var _7=this.grid.allowMultiSelect,_8=_7&&this.grid.selectionAppearance,_9=(_8=="checkbox")&&(this.grid.frozenFields==null||this.grid.frozenBody==this)&&(_3==this.grid.getCheckboxFieldPosition());var _10=this.Super("selectOnMouseDown",arguments);if(_9){this.grid.multiSelectChanged()}
return _10}});isc.defineClass("PickTreeMenu","ScrollingTreeMenu");isc.PickTreeMenu.addClassProperties(isc.$1922)
isc.PickTreeMenu.addProperties(isc.$1923)
isc.A=isc.PickTreeMenu.getPrototype();isc.A.canShowFilterEditor=false;isc.A.canSaveSearches=false;isc.A.savedSearchAbstractType="dropTree";isc.A.fireItemClickForFolders=true;isc.PickTreeMenu.changeDefaults("bodyDefaults",{remapOverStyles:[0,2,2,2,4,6,6,6,8,10,10,10,12
],getCellStyleName:function(_1,_2,_3,_4){if(this.grid&&this.grid.showOverAsSelected){_1=this.remapOverStyles[_1]}
return this.Super("getCellStyleName",[_1,_2,_3,_4],arguments)}})}
if(isc.ListGrid){isc.ClassFactory.defineInterface("PickList");isc.PickList.addInterfaceProperties({clickMaskMode:"hard",pickListHeight:300,emptyPickListHeight:100,emptyPickListMessage:"No items to show",pickListMaxWidth:400,pickListBaseStyle:"pickListCell",pickListApplyRowNumberStyle:false,animatePickList:null,pickListAnimationTime:200,fetchDelay:200,pickListCellHeight:16,$294z:function(){if(this.pickListDefaults==null&&this.pickListProperties==null)return null;return isc.addProperties({},this.pickListDefaults,this.pickListProperties)},pickListHeaderHeight:22,singleClickFolderToggle:false,rootNodeId:null,autoOpenTree:"none",gridStyleName:"pickListMenu",gridBodyStyleName:"pickListMenuBody",allowMultiSelect:true,$190c:"value",$190d:"display",separateValuesListDefaults:{showHeader:false,showEmptyMessage:false,autoFitData:"vertical",height:1,_constructor:isc.ListGrid,width:"100%",leaveScrollbarGap:false,alternateRecordStyles:false,styleName:"pickListMenu",bodyStyleName:"pickListMenuBody",normalCellHeight:16,showOverAsSelected:true,bodyDefaults:{remapOverStyles:[0,2,2,2,4,6,6,6,8,10,10,10,12
],getCellStyleName:function(_1,_2,_3,_4){if(this.grid&&this.grid.showOverAsSelected){_1=this.remapOverStyles[_1]}
return this.Super("getCellStyleName",[_1,_2,_3,_4],arguments)}
},recordClick:function(_1,_2,_3,_4,_5,_6,_7){if(_2[_1.recordCanSelectProperty]==false)return;_1.pickList.hide();if(_2!=null)_1.pickList.itemClick(_2)},rowOver:function(_1,_2,_3){if(this.pickList.enableSelectOnRowOver)this.pickList.deselectAllRecords()}
},fillScreenContainerDefaults:{width:"100%",height:"100%",overflow:"hidden",autoDraw:false
},fillScreenContainerConstructor:"Layout",dataSetType:"list",pickListConstructor:"PickListMenu",pickTreeConstructor:"PickTreeMenu",getPickListClass:function(){var _1=this.dataSetType=="tree"?this.pickTreeConstructor:this.pickListConstructor;if(isc.isA.ClassObject(_1)){return _1}else if(isc.isA.String(_1)){var _2;_2=isc.ClassFactory.getClass(_1);if(!isc.isAn.Object(_2))_2=isc.PickListMenu;return _2}
}});isc.PickList.addInterfaceMethods({showPickList:function(_1,_2){this.$19g=true;var _3=!this.pickList||(this.pickList.formItem!=this);if(!this.pickList)this.makePickList(_1,null,_2);else this.setUpPickList(_1,_2);if(!_1&&(_3||!this.$128z())){this.$19l()}
this.stopHover()},$19l:function(){var _1=this.pickList;if(!this.isDrawn()||(this.shouldHideEmptyPickList()&&_1.getTotalRows()<1)){return}
this.placePickList();if(!this.$128z()){if(this.separateSpecialValues){if(this.separateValuesList.data&&this.separateValuesList.data.length>0){this.$161l(true)}else if(this.separateValuesList.isVisible()){this.$161l(false)}
}else{this.$161l(false)}
if(this.animatePickList){if(_1.$1484){_1.$148c()}else{_1.bringToFront();_1.animateShow("wipe",null,this.pickListAnimationTime)}
}else
_1.show()}
},$161l:function(_1){var _2=this.pickList,_3=this.separateValuesList,_4=_2.children.find("$161m",true)||_2.gridComponents.find("$161m",true)
;if(_4==null){this.logWarn("Unable to find container for 'separateValuesList'");return}
if(_3==null&&this.separateSpecialValues){this.logWarn("SeparateValues list not defined for this item")}
if(_1){if(!_4.contains(_3)){if(_4.children&&_4.children.length>0){_4.children[0].deparent()}
_4.addChild(_3)}
_4.setVisibility("inherit")}else{_4.setVisibility("hidden")}
},updateSpecialValues:function(_1){if(this.separateValuesList){this.separateValuesList.setData(_1);if(this.$128z()){this.$161l(true)}
}
},fetchData:function(_1,_2,_3){if(this.getOptionDataSource()==null){this.logWarn("fetchData() called for a non-databound pickList. Ignoring");return}
if(_2==null)_2={};if(_1!=null){_2.internalClientContext={$03:_1
}}
_2.componentContext=this.form.ID+"."+this.name;if(!this.pickList){this.makePickList(false,_2,false,!_3)}else{this.setUpPickList(false,false,_2,!_3)}
},mapValueToDisplay:function(_1,_2,_3,_4){if(this.isSelectOther){if(_1==this.otherValue)return this.otherTitle;if(_1==this.separatorValue)return this.separatorTitle}
return this.invokeSuper(isc.SelectItem,"mapValueToDisplay",_1,_2,_3,_4)},makePickList:function(_1,_2,_3,_4){var _5=isc.timeStamp();if(this.separateSpecialValues&&!this.separateValuesList){var _6=[{name:this.$190c,hidden:true},{name:this.$190d}
];this.separateValuesList=this.createAutoChild("separateValuesList",{fields:_6,formItem:this,showModal:false,baseStyle:this.pickListSeparateValuesBaseStyle||this.pickListBaseStyle,normalBaseStyle:this.pickListBaseStyle,tallBaseStyle:(this.pickListTallBaseStyle||this.pickListBaseStyle),hiliteColor:this.pickListHiliteColor,hiliteTextColor:this.pickListHiliteTextColor
}
)}
var _7=this.reusePickList();if(_7){var _8=this.getSharedPickList();if(_8&&_8.Class==this.getPickListClass().Class)this.pickList=_8}
var _9=this.pickList!=null;if(!this.pickList){var _10=this.$294z()||{};if(this.multiple){if(_10.noDoubleClicks==null){_10.noDoubleClicks=true}
}else{if(_10.noDoubleClicks==null){_10.noDoubleClicks=false}
}
var _11=isc.Canvas.create({autoDraw:false,height:1,overflow:"visible"
});if(this.hasPopOutPicker()){if(!this.pickerNavigationBar)this.createPickerNavigationBar();_11.addChild(this.pickerNavigationBar)}else{_11.visibility="hidden"}
var _12=isc.Canvas.create({$161m:true,autoDraw:false,height:1,overflow:"visible",visibility:"hidden"
});if(this.separateValuesList){_12.addChild(this.separateValuesList)}
var _13=_10.gridComponents;if(!_13){_13=[_11,_12,"filterEditor","header","body","summaryRow"
]}else{_13=_13.duplicate();_13.addListAt([_11,_12],0);_10=isc.addProperties({},_10);delete _10.gridComponents}
var _14=this.$19m()?this.getOptionDataSource():null;if(_14){_10.dataSource=_14}
this.pickList=this.getPickListClass().create({headerHeight:this.pickListHeaderHeight},_10,{gridComponents:_13}
);this.pickList.pickerNavigationBarParent=_11;var _15=this.pickList.dataProperties||{};if(this.filterLocally)_15.fetchMode="local";if(this.useClientFiltering!=null){_15.useClientFiltering=this.useClientFiltering}
_15.fetchRemoteDataReply=function(_18,_15,_2){this.Super("fetchRemoteDataReply",arguments);if(this.$175m){isc.PickList.$85b(this,_18,_15,_2)}
}
this.pickList.dataProperties=_15;if(_7)this.storeSharedPickList()}
if(this.separateValuesList){this.separateValuesList.pickList=this.pickList}
if(this.fetchDisplayedFieldsOnly&&this.optionDataSource&&(!this.optionFilterContext||!this.optionFilterContext.outputs))
{var _6=this.pickListFields?this.pickListFields.duplicate():[];if(this.valueField)_6.add(this.valueField);if(this.displayField)_6.add(this.displayField);if(_6.length>0){if(!this.optionFilterContext)this.optionFilterContext={};var _16=[];for(var i=0;i<_6.length;i++){if(isc.isA.String(_6[i])){_16.add(_6[i])}else{_16.add(_6[i].name)}
}
this.optionFilterContext.outputs=_16.getUniqueItems().join(',')}
}
this.setUpPickList(_1,_3,_2,_4);if(this.logIsInfoEnabled("timing"))
this.logInfo("Time to initially create pickList:"+(isc.timeStamp()-_5),"timing")},cachePickListResults:true,reusePickList:function(){return this.pickListProperties==null&&this.pickListDefaults==null&&this.cachePickListResults&&(!this.specialValues||this.separateSpecialValues)},getSharedPickList:function(){if(this.$19m()){var _1=this.getOptionDataSource().getID(),_2=isc.PickListMenu.$51t[_1];if(_2){for(var i=0;i<_2.length;i++){if(_2[i].$51u==this.pickListFields){_2[i].$511=isc.timeStamp();var _4=_2[i].$51v;if(_4.destroyed){_2.removeAt(i);this.$82l(_4);i--;continue}
return _4}
}
}
return null}else{if(isc.PickList.$14w&&isc.PickList.$14w.destroyed){this.$82l(isc.PickList.$14w);isc.PickList.$14w=null;return null}
return isc.PickList.$14w}
},$82l:function(_1){if(_1.$513!=null){for(var _2 in _1.$513){if(window[_2]&&window[_2].pickList==_1){delete window[_2].pickList}
}
}
},storeSharedPickList:function(){if(this.$19m()){var _1=this.getOptionDataSource().getID(),_2=isc.PickListMenu.$51t
;if(!_2[_1])_2[_1]=[];var _3={$51v:this.pickList,$51u:this.pickListFields,$511:isc.timeStamp()}
_2[_1].add(_3);if(isc.PickListMenu.$512==null){isc.PickListMenu.$512=1}else{isc.PickListMenu.$512+=1;if(isc.PickListMenu.$512>isc.PickListMenu.pickListCacheLimit){var _4,_5=isc.timeStamp();for(var _1 in _2){var _6=_2[_1];for(var i=0;i<_6.length;i++){var _8=_6[i];if(_8.$511<=_5&&(_8!=_3)){_4=_8;_5=_8.$511}
}
}
if(_4){isc.PickListMenu.$512-=1;var _9=_4.$51v;var _6=_2[_9.getDataSource().getID()];_6.remove(_4);if(_9.$513!=null){for(var _10 in _9.$513){if(window[_10]&&window[_10].pickList==_9)
delete window[_10].pickList
}
}
_4.$51v.delayCall("destroy")}
}
}
}else{isc.PickList.$14w=this.pickList}
},getPickListCellHeight:function(){var _1=this.pickListCellHeight;var _2=this.$294z();if(_2&&_2.cellHeight!=null){_1=_2.cellHeight}
if(this.valueIcons!=null||this.getValueIcon!=null){var _3=this.getValueIconHeight();if(_3>_1)_1=_3}
return _1},$152n:function(){if(this.preDrawConfig&&this.preDrawConfig.initialSort){this.initialSort=this.preDrawConfig.initialSort;this.preDrawConfig.initialSort=null}
var _1=this.initialSort;if(_1){if(!isc.isAn.Array(this.initialSort))this.initialSort=[this.initialSort];return _1.duplicate()}
var _2=this.$294z();var _3=this.sortField==null?this.sortFieldNum==null?(_2&&_2.sortField):this.sortFieldNum:this.sortField;if(isc.isA.Number(_3)){var _4=this.pickList;if(_4){_3=this.sortField=_4.getFieldName(_3)}else if(this.pickListFields&&this.pickListFields[_3]){_3=this.sortField=this.pickListFields[_3].name}else{_3=null}
}
if(_3==null)return null;var _5=this.sortDirection||(_2&&_2.sortDirection);if(!isc.isAn.Array(_3))_3=[_3];var _1=[];for(var i=0;i<_3.length;i++){_1.add({property:_3[i],direction:_5})}
return _1},isRSorRT:function(_1,_2){_1=_1||this.pickList.data;var _3=isc.ResultSet&&isc.isA.ResultSet(_1),_4=!_2&&isc.ResultTree&&isc.isA.ResultTree(_1)
;return _3||_4},setUpPickList:function(_1,_2,_3,_4){var _5=this.pickList;if(_5.formItem!==this&&_5.isDrawn()){_5.clear()}
var _6=this.getPickListCellHeight();_5.setCellHeight(_6);if(this.separateValuesList){this.separateValuesList.setCellHeight(_6)}
if(this.dataSetType=="tree"){var _7=_5;_7.singleClickFolderToggle=this.singleClickFolderToggle;if(this.rootNodeId!=null)_7.data.rootValue=_7.dataProperties.rootValue=this.rootNodeId;if(this.autoOpenTree!=null)_7.data.autoOpen=_7.dataProperties.autoOpen=this.autoOpenTree}
this.$19n();this.setUpPickListFields();var _8=(this.isEntryTooShortToFilter&&this.isEntryTooShortToFilter());if(!_5.originalEmptyMessage)_5.originalEmptyMessage=_5.emptyMessage;var _9=_5.emptyMessage=(_8?this.getEntryTooShortMessage()
:this.emptyPickListMessage)
||_5.originalEmptyMessage;_5.emptyMessage=_9;var _10=this.$152n();if(_10&&_10.length>0){var _11=this.$19m();var _12=false;if(this.pickList.data&&this.isRSorRT(this.pickList.data)){var _13=this.getOptionDataSource();if(this.pickList.getDataSource()!=_13){_12=true}else{var _14=this.getPickListFilterCriteria(),_15={textMatchStyle:this.textMatchStyle,showPrompt:false
};if(this.form){_14=isc.DataSource.resolveDynamicCriteria(_14,this.form.getRuleContext())}
if(this.optionFilterContext!=null){isc.addProperties(_15,this.optionFilterContext)}
if(this.optionOperationId!=null){_15.operationId=this.optionOperationId}
if(_3!=null){isc.addProperties(_15,_3)}
if(!this.pickList.useExistingDataModel(_14,_15.operationId,_15))
{_12=true}
}
}
if(_12)this.pickList.setData([]);this.pickList.setSort(_10)}else{this.pickList.clearSort()}
this.filterPickList(_1,_2,_3,_4);this.pickList.emptyMessageHeight=this.emptyPickListHeight;if(!this.hasPopOutPicker()){this.pickList.setWidth(Math.max(1,this.pickListWidth||this.getElementWidth()));var _16,_17=this.$294z();if(_17&&_17.autoFitFieldWidths!=null)_16=_17.autoFitFieldWidths;else _16=this.autoSizePickList&&!this.pickList.showHeader;this.pickList.autoFitFieldWidths=_16;this.pickList.setAutoFitData(_16?"both":"vertical");var _18=1;if(this.pickList.showHeader)_18+=this.pickList.headerHeight;if(this.pickList.showFilterEditor)_18+=this.pickList.filterEditorHeight;this.pickList.setHeight(_18);this.pickList.setAutoFitMaxHeight(this.pickListHeight);this.pickList.setAutoFitMaxWidth(this.pickListMaxWidth);this.pickList.setWidth(this.pickList.getVisibleWidth())}
},$19n:function(){var _1=this.pickList.formItem;if(_1==this)return;var _2={};isc.addProperties(_2,{formItem:this,showHeader:null,normalBaseStyle:this.pickListBaseStyle,tallBaseStyle:(this.pickListTallBaseStyle||this.pickListBaseStyle),applyRowNumberStyle:this.pickListApplyRowNumberStyle,hiliteColor:this.pickListHiliteColor,hiliteTextColor:this.pickListHiliteTextColor,showModal:this.hasPopOutPicker()?true:this.modalPickList,clickMaskMode:this.clickMaskMode,dateFormatter:this.dateFormatter,dataArrived:function(_6,_7){if(isc.$cv)arguments.$cw=this;this.Super("dataArrived",arguments);if(this.formItem)this.formItem.handleDataArrived(_6,_7,this.data)},$253v:function(_6,_7,_8,_9,_10,_11){this.Super("$253v",arguments);if(_6=="remove"&&_7&&this.formItem)this.formItem.handleDataRemoved(_7)},fireSelectionUpdated:function(){if(!this.$188c){this.Super("fireSelectionUpdated",arguments)}
},$199x:function(_6,_7){if(this.formItem){this.formItem.selectItemFromValue(this.formItem.getValue())}
this.Super("$199x",arguments)
}
});if(this.multiple&&this.multipleAppearance=="picklist"
&&this.allowMultiSelect)
{_2.selectionAppearance="checkbox";_2.allowMultiSelect=true;_2.enableSelectOnRowOver=false;_2.selectionType="simple";_2.$859=false;_2.styleName=this.gridStyleName||isc.ListGrid.getInstanceProperty("styleName");_2.bodyStyleName=this.gridBodyStyleName||isc.ListGrid.getInstanceProperty("bodyStyleName")||"gridBody"}else{_2.selectionAppearance="rowStyle";_2.allowMultiSelect=false;_2.enableSelectOnRowOver=this.pickList.getClass().getInstanceProperty("enableSelectOnRowOver");_2.selectionType="single";_2.$859=true;_2.styleName=this.pickList.getClass().getInstanceProperty("styleName");_2.bodyStyleName=this.pickList.getClass().getInstanceProperty("bodyStyleName")}
if(this.animatePickList)_2.styleName+="Animated";var _3=this.$294z();if(_3){isc.addProperties(_2,_3);if(this.pickList.gridComponents)delete _2.gridComponents}
if(this.dataSetType=="tree"&&this.pickList.data){if(this.rootNodeId!=null)this.pickList.data.rootValue=this.rootNodeId;if(this.autoOpenTree!=null)this.pickList.data.autoOpen=this.autoOpenTree}
this.pickList.setProperties(_2);if(this.pickList.dataProperties==null)this.pickList.dataProperties={};this.pickList.dataProperties.formItem=this;if(this.pickList.data!=null){this.pickList.data.formItem=this}
if(!this.pickList.$513)this.pickList.$513={};this.pickList.$513[this.getID()]=true;if(_1){if(this.pickList.isObserving(_1.containerWidget,"hide")){this.pickList.ignore(_1.containerWidget,"hide")}
if(this.pickList.isObserving(_1.containerWidget,"clear")){this.pickList.ignore(_1.containerWidget,"clear")}
}
if(!this.pickList.isObserving(this.containerWidget,"visibilityChanged")){this.pickList.observe(this.containerWidget,"visibilityChanged","if (observer.isVisible && !observed.isVisible()) observer.hide();")}
if(!this.pickList.isObserving(this.containerWidget,"clear")){this.pickList.observe(this.containerWidget,"clear","if(observer.isDrawn())observer.clear();")}
var _4=this.pickList.pickerNavigationBarParent;if(this.hasPopOutPicker()){if(!this.pickerNavigationBar){this.createPickerNavigationBar()}
var _5=this.getPickerNavigationBarIcons();this.pickerNavigationBar.setIcons(_5);if(!_4.contains(this.pickerNavigationBar)){if(_4.children!=null&&_4.children.length==1){_4.removeChild(_4.children[0])}
_4.addChild(this.pickerNavigationBar)}
_4.setVisibility("inherit")}else{_4.setVisibility("hidden")}
this.pickList.markForRedraw()},iconPlacement:"both",getPickerNavigationBarIcons:function(){if(!this.icons)return null;var _1=[],_2=this.$16j(true);for(var i=0;i<this.icons.length;i++){var _4=this.icons[i];if(!this.$16f(_4,_2,true)||this.$16e(_4))
{continue}
_1.add(_4)}
return(_1.length>0?_1:null)},$128m:function(_1){if(this.$128n)return this.$128n;var _2=null;if(this.specialValues){var _3,_4;if(this.separateSpecialValues){_3=this.$190c;_4=this.$190d}
_2=isc.PickList.optionsFromValueMap(this,this.specialValues,null,_3,_4);this.$128n=_2}else if(_1&&this.allowEmptyValue&&!this.multiple){var _3=this.getValueFieldName(),_4=this.getDisplayFieldName()
;var _5={};_5[_3]=null;_2=[_5]}
return _2},formatPickListValue:function(_1,_2,_3){var _4=this.pickList.getField(_2);if(_4&&_4.$720){return this.$17c(_1)}
return _1},useOptionTextMatchStyleInPickList:true,getPickListFilterCriteria:function(){var _1=this.getOptionDataSource();var _2=this.getOptionCriteriaCopy();if(_2!=null&&this.useOptionTextMatchStyleInPickList&&!isc.DataSource.isAdvancedCriteria(_2)&&this.textMatchStyle!=this.optionTextMatchStyle)
{_2=isc.DataSource.convertCriteria(_2,this.optionTextMatchStyle,_1)}
var _3=(_1||isc.DS).combineCriteria(_2,this.pickListCriteria,null,this.textMatchStyle);if(_3&&this.form){_3=isc.DataSource.resolveDynamicCriteria(_3,this.form.getRuleContext())}
return _3},getAllLocalOptions:function(){return this.$19m()?null:this.getClientPickListData()},$19o:function(_1,_2,_3){var _4=this.getOptionDataSource(),_5=this.getDisplayFieldName(),_6=this.getValueFieldName();if(_5==null&&_4==null){return}
if((_4==null||!_3)&&(_5==null||_5==_6))return _1;var _7=this.getPickListResultSet();var _8;if(_7!=null){if(isc.isAn.Array(_7)){_8=_7}else{_8=_7.allRows||_7.localData}
}
var _9=(_4&&!this.suppressOptionDSCacheAccess?_4.getCacheData():null);if(_8==null){_8=_9;if(_8==null)return}
var _10=(_2?_6
:_5||_6),_11=(_2?_5||_6
:_6);var _12;if(isc.isAn.Array(_1)){_12="";var _13=isc.shallowClone(_1);for(var i=0;i<_1.length;i++){var _15=_13[i];var _16=_8.find(_11,_1[i]);if(_16==null&&_9!=null&&_8!=_9){_16=_9.find(_11,_1[i])}
if(_16!=null){_12+=_16[_10]}else continue;if(i!=_1.length-1)_12+=this.multipleValueSeparator}
}else{var _16=_8.find(_11,_1);if(_16==null&&_9!=null&&_8!=_9){_16=_9.find(_11,_1)}
if(_16!=null){_12=_16[_10]}
}
return _12},getPickListResultSet:function(){var _1=this.pickList&&this.pickList.formItem==this&&!this.pickList.destroyed?(this.pickList.originalData||this.pickList.data):null;return _1},$18q:"true",setUpPickListFields:function(){var _1=this.pickList,_2=this.getPickListFields(),_3=_1.fields;var _4=!_3||(_3.length!=_2.length);if(!_4){for(var i=0;i<_2.length;i++){var _6=_2[i],_7=_3[i];for(var _8 in _6){if(_6[_8]!=_7[_8]){_4=true;break}
}
if(_4)break}
}
if(_4){for(var i=0;i<_2.length;i++){if(_2[i].showIf==null&&_2[i].hidden!=true){_2[i].showIf=this.$18q}
}
if(this.valueIcons!=null||this.getValueIcon!=null){for(var i=0;i<_2.length;i++){var _6=_2[i];if(_6.name==this.getValueFieldName()){if(_6.valueIconHeight==null){_6.valueIconHeight=this.valueIconHeight}
if(_6.valueIconWidth==null){_6.valueIconWidth=this.valueIconWidth}
if(_6.valueIconSize==null){_6.valueIconSize=this.valueIconSize}
if(_6.imageURLPrefix==null){_6.imageURLPrefix=this.imageURLPrefix||this.baseURL||this.imgDir}
if(_6.imageURLSuffix==null){_6.imageURLSuffix=this.imageURLSuffix}
}
}
}
_1.setFields(_2)}
var _9=_1.showHeader;if(_9!=null&&!_4)return;var _10=this.$294z();if(this.pickListHeaderHeight==0)_9=false;else if(_10){if(_10.showHeader!=null){_9=_10.showHeader}else if(_10.headerHeight==0){_9=false}
};if(_9==null){var _11=_1.getFields();var _12=(this.multiple&&this.multipleAppearance=="picklist"
&&this.allowMultiSelect==true)?2:1;_9=(_11.length>_12)}
if(_9){_1.setHeaderHeight(this.pickListHeaderHeight);_1.setShowHeader(true)}else{_1.setShowHeader(false)}
},$19m:function(){if(this.optionDataSource)return true;if((this.showOptionsFromDataSource||!this.valueMap)&&this.getOptionDataSource()!=null)return true;return false},$1280:"fetch",$1281:"$19p",filterPickList:function(_1,_2,_3,_4){if(!_2)
this.$19p(_1,_3,null,_4);else{this.$82m=true;this.$43i=_1;this.fireOnPause(this.$1280,{target:this,methodName:this.$1281,args:[null,_3,true,_4]},this.fetchDelay)}
},$1282:function(){return this.pendingActionOnPause(this.$1280)},$19p:function(_1,_2,_3,_4){if(_3&&this.pickList.formItem!=this)return;this.$82m=null;if(_3)_1=this.$43i;delete this.$43i;this.$19i=_1;var _5=this.$19m();if(_5){var _6=this.getOptionDataSource();if(this.pickList.getDataSource()!=_6){this.pickList.setDataSource(_6,this.getPickListFields())}
this.filterDataBoundPickList(_2,_4)}else if(this.dataSetType=="tree"){isc.logWarn("Tree data can't be filtered without a DataSource")}else{var _7=this.filterClientPickListData();if(this.pickList.data!=_7)this.pickList.setData(_7);this.filterComplete()}
},$61x:function(_1){if(!this.$19m()||!_1)return;var _2=this.getOptionDataSource();if(_1.getDataSource()==_2&&_1.data){var _3=_1.data.context,_4=_1.data.criteria;if(_3&&_3.textMatchStyle!=this.textMatchStyle)return true;if(this.optionFilterContext!=null){for(var _5 in this.optionFilterContext){if(this.optionFilterContext[_5]!=_3[_5])return true}
}
var _6=this.getPickListFilterCriteria();if(_6==null)_6={};if(_2.compareCriteria(_4,_6,_3)==0){return false}
}
return true},getFirstOptionValue:function(){var _1;if(this.$19m()){var _2=this.pickList||(this.reusePickList()?this.getSharedPickList():null);if(_2&&!this.$61x(_2)){var _3=_2.data.get(0);if(_3==null||Array.isLoading(_3)){_1=null}else{_1=_3[this.getValueFieldName()]}
}else{this.fetchData(null,null,true)}
}else{var _4=this.getValueMap();if(isc.isAn.Array(_4))_1=_4[0];else if(isc.isAn.Object(_4)){for(var _5 in _4){_1=_5;break}
}
}
if(this.multiple)return[_1];else return _1},getClientPickListData:function(){return isc.PickList.optionsFromValueMap(this)},$957:function(_1){var _2=["moved","parentMoved","scrolled","parentScrolled"];for(var i=0;i<_2.length;i++){var _4=this.pickList.isObserving(this.containerWidget,_2[i]);if(_1){if(!_4)this.pickList.observe(this.containerWidget,_2[i],_1)}else{if(_4)this.pickList.ignore(this.containerWidget,_2[i])}
}
},$19h:function(){if(isc.Canvas.ariaEnabled()){this.setAriaState("expanded",false);this.clearAriaState("owns");this.clearAriaState("activedescendant")}
this.$957();if(this.pickListHidden)this.pickListHidden()},$19j:function(){if(isc.Canvas.ariaEnabled()){this.setAriaState("expanded",true);this.setAriaState("owns",this.pickList.getAriaHandleID())}
this.$957("observer.moveBy(deltaX,deltaY)");if(this.pickListShown)this.pickListShown()},selectDefaultItem:function(){if(this.pickList==null)return false;this.pickList.deselectAllRecords();return this.selectItemFromValue(this.getValue())},selectItemFromValue:function(_1,_2){if(this.pickList)this.pickList.clearLastHilite();if(!isc.isAn.Array(_1))_1=[_1];var _3=this.pickList.getSelection(),_4=this.getValueFieldName(),_5=true,_6,_7=false;var _8=this.getType(),_9=isc.SimpleType.inheritsFrom(_8,"text")||isc.SimpleType.inheritsFrom(_8,"integer")||isc.SimpleType.inheritsFrom(_8,"float"),_10=_9?null:this.compareValues
;if(this.pickList.allowMultiSelect){var _11=this.pickList.$188c;this.pickList.$188c=true}
var _12=[];for(var i=0;i<_1.length;i++){var _14=_1[i],_15;if(this.separateValuesList){var _16=this.separateValuesList.getData(),_17=_16!=null&&_16.find(_4,_14)
;if(_17){this.separateValuesList.selectSingleRecord(_17);_7=true}
}
if(_3.find(_4,_14))continue;if(isc.isA.MultiLinkSelection(this.pickList.selectionManager)){var _18;var _19=this.pickList.data.getOpenList();var _20=_19.findIndex(_4,_14,_10);if(_20!=-1){_18=this.pickList.data.getNodeLocator(_20)}else{var _15;var _16=this.pickList.getData();if(this.isRSorRT(_16)){var _21=isc.isA.ResultSet(_16)?_16.localData:_16.$737;if(_21)_15=_21.find(_4,_14,_10);else{_15=_16.find(_4,_14,_10)}
}else{_15=_16.find(_4,_14,_10)}
if(_15){var _22=_16.createNodeLocator(_15);var _23=_16.$201l(_22.parentId);_16.openFolder(_23);_19=_16.getOpenList();_20=_19.findIndex(_4,_14,_10);if(_20!=-1){_18=this.pickList.data.getNodeLocator(_20)}else{_5=false}
}
}
if(_18){this.pickList.selectionManager.selectSingle(_18);this.pickList.fireSelectionUpdated()}else{_5=false}
}else{var _16=this.pickList.getData();if(this.isRSorRT(_16)){var _21=isc.isA.ResultSet(_16)?_16.localData:_16.$737;if(_21)_15=_21.find(_4,_14,_10);else{_15=_16.find(_4,_14,_10)}
}else{_15=_16.find(_4,_14,_10)}
if(_15&&_15!=Array.LOADING){if(this.pickList.allowMultiSelect){_12.add(_15)}else{this.pickList.selectionManager.selectSingle(_15);this.pickList.fireSelectionUpdated()}
_6=_16.indexOf(_15)}else{_5=false}
}
}
if(_12.length>0){this.pickList.selectRecords(_12)}
if(!_2&&_6!=null)this.pickList.scrollRecordIntoView(_6);if(!_7&&this.selectionManager!=null&&this.separateValuesList){this.separateValuesList.deselectAllRecords()}
if(this.pickList.allowMultiSelect){this.pickList.$188c=_11}
return _5},filterComplete:function(_1,_2,_3,_4){if(!_4&&_3!=null&&_3.clientContext!=null){var _5=this.$84p,_6=_3.clientContext.fetchID;if(_5==null||_5<_6){this.$84p=_6}else{this.logWarn("Server returned out of order responses for databound fetch requests. Ignoring superceded request results");return}
}
this.$43j=false;if(this.pickList.$85a!=null&&this.getID()!==this.pickList.$85a)
{}else{if(this.getID()===this.pickList.$85a){this.pickList.$85a=null}
this.$958=true;this.$82n(_1,_2,_3);this.pickList.$188c=true;this.$82o(_1,_2,_3);this.pickList.$188c=false;this.$958=false;if(isc.Canvas.ariaEnabled()){if(this.pickList.$85a==null||this.getID()===this.pickList.$85a||_4)
{this.pickList.clearAriaState("busy")}
}
}
var _7=(_3&&_3.internalClientContext?_3.internalClientContext.$03:null);if(_7){this.fireCallback(_7,"item,dsResponse,data,dsRequest",[this,_1,_2,_3]
);if(_3&&_3.internalClientContext){delete _3.internalClientContext.$03}
}
},$82n:function(_1,_2,_3){var _4=this.pickList;if(!_4||_4.destroyed)return;if(_4.formItem!=this)return;var _5=_4.hasFocus||(_4.body&&_4.body.hasFocus);var _2=_4.getData();if(this.hasPopOutPicker())return;if(_2.getLength()==0&&this.$128z()){if(this.hideEmptyPickList){_4.hide();if(_5)this.focusInItem()}else if(this.allowPickListToClip){var _6=this.getPickListPosition();_4.setRect([_6[0],_6[1]])}else{isc.PickList.$114o(this,_4,this.separateValuesList)}
}else{if(this.$19i)this.$19l();else if(this.$128z())this.placePickList();_4.setHeight(1);_4.setAutoFitData(_4.autoFitData);delete this.$19i}
},$82o:function(_1,_2,_3){this.selectDefaultItem();if(_1!=null&&_2!=null){this.$848(_2);this.updateDisplayValueMap(false)}
if(this.$43k){delete this.$43k;this.$43f(this._value)}
this.$19v()},isUnknownValue:function(_1){var _2=this.getValueMap();if(_2!=null){if(isc.isAn.Array(_2)){if(_2.contains(_1))return false}else if(isc.isAn.Object(_2)){for(var _3 in _2){if(_2[_3]==_1)return false}
}
}
var _4=this.getOptionDataSource();if(_4!=null){return this.$19o(_1,true,true)==null}
return true},$19v:function(){if(this.isDrawn()&&this.getValueFieldName()!=null
&&this.$19m())
{if(this.isA("ComboBoxItem")){if(this.changeOnKeypress&&this.addUnknownValues==true&&!this.isUnknownValue(this.getElementValue()))
{this.updateValue()}
if(this.hasFocus)return}
var _1;if(!this.$10v())_1=this.getValue();else{if(this.isA("SelectItem"))_1=this.$19w;else _1=this.mapDisplayToValue(this.getElementValue())}
var _2=this.getSelectedRecord();if(_2){var _3=this.mapValueToDisplay(_1);if(this.$19z!=_3){this.$127m(_1);this.setElementValue(_3);this.$127l()}
}
}
},$84q:0,filterDataBoundPickList:function(_1,_2){if(isc.$cv)arguments.$cw=this;if(this.isEntryTooShortToFilter&&this.isEntryTooShortToFilter()){var _3=this.pickList.originalData||this.pickList.data;if(_3&&this.isRSorRT(_3)){this.pickList.setData([])}
this.filterComplete();return}
var _4=this.getPickListFilterCriteria(),_5={textMatchStyle:this.textMatchStyle,showPrompt:false
};if(this.form){_4=isc.DataSource.resolveDynamicCriteria(_4,this.form.getRuleContext())}
if(this.pickList.ignoreEmptyCriteria){_4=isc.DataSource.filterCriteriaForFormValues(_4)}
if(this.optionFilterContext!=null)isc.addProperties(_5,this.optionFilterContext);if(this.optionOperationId!=null)_5.operationId=this.optionOperationId;if(_1!=null){isc.addProperties(_5,_1)}
var _6=this.getOptionDataSource();var _7=false,_8=_6&&_6.canFetchSynchronous();var _3=this.pickList.originalData||this.pickList.data;if(_3&&this.isRSorRT(_3)){_3.$1283=true;if(_2){if(_3.$394)_3.$394();else _3.invalidateCache()}else{if(!_3.willFetchData(_4,this.textMatchStyle)){if(!_3.lengthIsKnown){if(_3.getLength()!=0&&!_3.isLoaded(_3.get(0))){_7=true}else{_8=true}
}else{if(!_3.lengthIsKnown()||(_3.getLength()!=0&&!_3.rowIsLoaded(0))){_7=true}else{_8=true}
}
}
}
if(!_7){_5.fetchID=this.$84q++;_3.$175m=false}
}
this.pickList.filterData(_4,{target:this,methodName:"filterComplete"},_5);if(_8&&this.pickList.data.getLength()>0&&(this.pickList.data.rowIsLoaded&&!this.pickList.data.rowIsLoaded(0)))
{this.logInfo("filterData with new criteria caused async fetch even though data.willFetchData() returned false.","pickListFilter");_8=false}
if(_8)this.filterComplete();else{this.$43j=true;if(isc.Canvas.ariaEnabled()){this.pickList.setAriaState("busy",true);this.clearAriaState("activedescendant")
}
var _9=this.pickList.data;if(!_7){this.pickList.$85a=this.getID();this.pickList.$39v=_9.$39r}else{_9.$175m=true;if(_3!=_9)_3.$175m=false;this.pickList.$85a=this.getID();this.pickList.$85c=_9.$39r}
}
},handleDataArrived:function(_1,_2,_3){if(this.defaultToFirstOption&&this.getValue()==null&&_1==0){this.setToDefaultValue()}
this.$19v();this.$848(_3.getRange(_1,_2));var _4=this.$958;this.$958=true;this.updateDisplayValueMap(false);this.$958=_4;if(this.dataArrived)this.dataArrived(_1,_2,_3)},dataArrived:isc.Class.NO_OP,handleDataRemoved:function(_1){if(this.$128n==null)return;var _2=this.getValueFieldName(),_3=this.getDisplayFieldName(),_4=_1[_2],_5=this.$128n
;for(var i=0;i<_5.length;i++){var _7=_5[i];if(_7[_2]==_4){_5.removeAt(i);if(this.pickList.isVisible()&&this.pickList.isDrawn()){if(!this.separateSpecialValues){this.filterPickList()}
}
break}
}
},textMatchStyle:"startsWith",$19q:"substring",separatorRows:[{isSeparator:true}],filterClientPickListData:function(){if(this.isEntryTooShortToFilter&&this.isEntryTooShortToFilter())return null;var _1=this.getClientPickListData();var _2=this.getPickListFilterCriteria();if(_2==null||isc.isA.emptyObject(_2))return _1;var _3=[],_4;if(this.showAllOptions)_4=this.separatorRows.duplicate();var _5=false;for(var _6 in _2){var _7=_2[_6];if(!_7||isc.isA.emptyString(_7))continue;_5=true;if(!isc.isAn.Array(_7))_7=[_7];for(var _8=0;_8<_7.length;_8++){var _9=_7[_8];if(!isc.isA.String(_9))_9+=isc.emptyString;_9=_9.toLowerCase();var _10=_1.getLength(),_11=this.getValueFieldName();for(var i=0;i<_10;i++){var _13=_1.get(i)[_6];if(this.filterDisplayValue&&_6==_11){_13=this.mapValueToDisplay(_13)}
if(!isc.isA.String(_13))_13+="";_13=_13.toLowerCase();if((this.textMatchStyle==this.$19q&&!_13.contains(_9))||(this.textMatchStyle!=this.$19q&&!isc.startsWith(_13,_9)))
{if(this.showAllOptions)_4.add(_1.get(i))}else{_3.add(_1.get(i))}
}
}
}
if(!_5)_3=_1.duplicate();if(this.showAllOptions&&_4.length>1)_3.addList(_4);return _3},shouldHideEmptyPickList:function(){if(this.hideEmptyPickList!=null)return this.hideEmptyPickList;return!this.$19m()},$128z:function(){var _1=this.pickList;if(_1==null)return false;if(_1.$1484)_1=_1.$1484;return _1.isDrawn()&&_1.isVisible()},getPickListPosition:function(){var _1=this.getPageLeft();if(this.containerWidget.isRTL()&&this.pickList){_1+=this.getWidth();_1-=this.pickList.getVisibleWidth()}
return[this.getPageLeft(),this.getPageTop()+this.getHeight()]},placePickList:function(){var _1=this.pickList;var _2=this.getPickListPlacement();if(_2!="nearOrigin"){var _3;if(_2=="halfScreen"){_3=[isc.Page.getScrollLeft(),isc.Page.getScrollTop()+parseInt(isc.Page.getHeight()/2),isc.Page.getWidth(),isc.Page.getHeight()/2
]
}else{var _4;if(isc.isA.Canvas(_2))_4=_2;else if(_2=="fillPanel"){_4=this.containerWidget;while(_4!=null){if(isc.isA.SplitPane(_4)){if(_4.navigationPane&&_4.navigationPane.contains(this.containerWidget))
{_4=_4.navigationPane}else if(_4.listPane&&_4.listPane.contains(this.containerWidget))
{_4=_4.listPane}else if(_4.detailPane&&_4.detailPane.contains(this.containerWidget))
{_4=_4.detailPane}
break}else{_4=_4.getParentCanvas()}
}
}
if(_4!=null){_3=_4.getPageRect()}else{_3=[isc.Page.getScrollLeft(),isc.Page.getScrollTop(),isc.Page.getWidth(),isc.Page.getHeight()
];var _5=this.$1485();if(_5){_5.setRect(_3)}
}
}
_1.setRect(_3);_1.setVisibility("hidden")}else{if(_1.isDirty()||(_1.body&&_1.body.isDirty())){_1.redraw("Refreshing stale pickList content before positioning")}else if(!_1.isDrawn()){isc.Canvas.moveOffscreen(_1);_1.setVisibility("hidden");_1.draw()}
if(this.allowPickListToClip){var _6=this.getPickListPosition(),_7=_6[0],_8=_6[1];_1.setRect([_7,_8])}else{isc.PickList.$114o(this,_1,this.separateValuesList)}
}
},$1485:function(){if(this.animatePickList&&this.pickList.$1484==null){this.pickList.$1484=this.createAutoChild("fillScreenContainer",{children:[this.pickList]
})}
return this.pickList.$1484},pickValue:function(_1){},getPickListPlacement:function(){if(this.pickListPlacement!=null){var _1=this.pickListPlacement;if(isc.isA.String(_1)){var _2=isc.Canvas.getById(_1);if(_2!=null)_1=_2}
return _1}
return isc.Browser.isHandset||isc.Browser.isTablet?"fillPanel":"nearOrigin"},pickerNavigationBarConstructor:isc.NavigationBar,pickerNavigationBarDefaults:{getIconButton:function(_1){if(this.$146w==null)this.$146w=[];for(var i=0;i<this.$146w.length;i++){if(_1==this.$146w[i].icon){return this.$146w[i].iconButton}
}
var _3=this.creator;var _4=false,_5=_3.$54o(_1,true),_6=_3.iconIsDisabled(_1);var _7=this.createAutoChild("iconButton",{_constructor:isc.Img,icon:_1,src:_3.getIconURL(_1,_4,_6,_5),styleName:_3.getIconStyle(_1,_4,_6,_5),backgroundColor:_1.backgroundColor,height:_3.getIconHeight(_1),width:_3.getIconWidth(_1),prompt:_3.getIconPrompt(_1),layoutAlign:"center",canFocus:!_1.imgOnly,click:function(){_3.$116(this.icon)},keyPress:function(){_3.$172(this.icon)}
});this.$146w.add({icon:_1,iconButton:_7});return _7},setIcons:function(_1){if(this.iconButtons!=null){this.removeMembers(this.iconButtons);for(var i=0;i<this.iconButtons.length;i++){var _3=this.iconButtons[i];if(isc.isA.LayoutSpacer(_3))_3.destroy();if(!this.icons||!this.icons.contains(_3.icon)){var _4=_3.icon;_3.destroy();this.$146w.removeWhere("icon",_4)}
}
}
if(_1==null){this.iconButtons=null}else{this.iconButtons=[];for(var i=0;i<_1.length;i++){if(_1[i].hspace){this.iconButtons.add(isc.LayoutSpacer.create({width:_1[i].hspace
})
)
}
this.iconButtons.add(this.getIconButton(_1[i]))}
this.addMembers(this.iconButtons)}
}
},createPickerNavigationBar:function(){this.pickerNavigationBar=this.createAutoChild("pickerNavigationBar")},hasPopOutPicker:function(){var _1=this.getPickListPlacement();return(_1!="nearOrigin")}});isc.A=isc.PickList;isc.A.selectAllStoredValue="**selectAllValues**";isc.A.emptyStoredValue="**emptyValue**";isc.A.$146x={$16f:function pickListInterface_shouldShowIcon(_1,_2,_3){if(!this.Super("$16f",arguments)){return false}
if(_1==this.getPickerIcon())return!_3;var _4=_1.iconPlacement;if(_4==null)_4=this.iconPlacement;if(_4=="both")return true;return _3?(_4=="pickerNavigationBar")
:(_4=="formItem")}
};isc.A=isc.PickList;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.$85b=function isc_c_PickList__sharedPickListFetchComplete(_1,_2,_3,_4){var _5=_4.componentId,_6=window[_5];if(_6==null){this.logWarn("$85b - unable to get shared pickList which initialized fetch");return}
if(_6.$85c!=_4.internalClientContext.requestIndex){return}
var _7=_6.$85a;if(!_7){this.logWarn("$85b - unable to determine current target formItem");return}
_7=window[_7];_1.$175m=false;if(!_7){return}
_7.filterComplete(_2,_3,_4,true)}
,isc.A.optionsFromValueMap=function isc_c_PickList_optionsFromValueMap(_1,_2,_3,_4,_5){var _6=_2||_1.getValueMap(),_7=[];if(_6==null)_6=[];if(_4==null)_4=_1.getValueFieldName();if(_5==null)_5=_1.getDisplayFieldName();if(isc.isAn.Array(_6)){for(var i=0;i<_6.length;i++){_7[i]={};var _9=_6[i];if(_3&&_9==_3)_9=null;_7[i][_4]=_9;if(_5!=null)_7[i][_5]=_9}
_7.$882=true}else if(isc.isAn.Object(_6)){var i=0;var _10=_1.getType(),_11,_12,_13;if(_10!=null){if(isc.SimpleType.inheritsFrom(_10,"integer"))
{_11=true}else if(isc.SimpleType.inheritsFrom(_10,"float")){_12=true}else if(isc.SimpleType.inheritsFrom(_10,"boolean")){_13=true}
}
for(var j in _6){_7[i]={};var _15=j;if(_11){var _16=parseInt(_15);if(_16==_15)_15=_16}else if(_12){var _17=parseFloat(_15);if(_17==_15)_15=_17}else if(_13){var _18=(_15=="true"?true:(_15=="false"?false:null));if(_18!=null)_15=_18}
_7[i][_4]=_15;if(_5!=null)_7[i][_5]=_6[j];i++}
_7.$882=true}
return _7}
,isc.A.$114p=function isc_c_PickList__placePickListRect(_1,_2,_3,_4,_5,_6){var _7=isc.Page.getWidth(),_8=isc.Page.getHeight(),_9=isc.Page.getScrollLeft(true),_10=isc.Page.getScrollTop(),_11=(_7+_9),_12=(_8+_10),_13=Math.max(_9,Math.min(_11,_3[0])),_14=Math.max(_10,Math.min(_12,_3[1])),_15=Math.max(_9,Math.min(_11,_3[0]+_3[2])),_16=Math.max(_10,Math.min(_12,_3[1]+_3[3]));var _17=0,_18=null,_19=1;for(var i=0;i<4;++i){var _21=((i%2==0)!=_6?_11-_13:_15-_9),_22=(i<2?_12-_16:_14-_10),_23=Math.min(_1,_21),_24=Math.min(_2,_22);if(_23==_1&&_24==_2){_17=i;break}
if(_23>=_4&&_24>=_5){var _25=_23*_24;if(_18==null||_25>_18){_18=_25;_17=i}
}
}
var _26=((_17%2==0)!=_6?_11-_13:_15-_9),_27=(_17<2?_12-_16:_14-_10),_28=Math.min(_1,_26),_29=Math.min(_2,_27),_30=((_17%2==0)!=_6?_13:_15-_28),_31=(_17<2?_16:_14-_29);return[_30,_31,_28,_29]}
,isc.A.$114o=function isc_c_PickList__placeAdjacent(_1,_2,_3){var _4=_2.getPeerRect(),_5=_4[2],_6=_4[3],_7=_1.getPeerRect(),_8=(_3
&&_3.data
&&_3.data.getLength()>0?_3.getVisibleHeight():0),_9=((!_1.shouldHideEmptyPickList()&&_2.getTotalRows()<1&&_1.emptyPickListHeight)||0),_10=Math.max(1,_9,_2.getHeaderHeight()+_8),_11=Math.max(1,_1.pickListWidth||0),_12=_1.containerWidget.isRTL(),_13=isc.PickList.$114p(_5,_6,_7,_11,_10,_12);var _14=_13[0],_15=(isc.Page.getWidth()+isc.Page.getScrollLeft())-_14;if(_1.pickListMaxWidth!=null&&_1.pickListMaxWidth<_15){_15=_1.pickListMaxWidth}
var _16=_13[1],_17=(isc.Page.getHeight()+isc.Page.getScrollTop())-_16;if(_1.pickListHeight!=null&&_1.pickListHeight<_17){_17=_1.pickListHeight}
_2.setAutoFitMaxWidth(_15);_2.setAutoFitMaxHeight(_17-_8);_13[3]-=_8;_2.setPageRect(_13)}
);isc.B._maxIndex=isc.C+4}
isc.ClassFactory.defineClass("NativeSelectItem","FormItem");isc.A=isc.NativeSelectItem;isc.A.DEFAULT_ROW_COUNT=6;isc.A.instances=[];isc.NativeSelectItem.addProperties(isc.$19s)
isc.A=isc.NativeSelectItem.getPrototype();isc.A.height=null;isc.A.stopNavKeyPressBubbling=true;isc.A.$125=true;isc.A.$15i=true;isc.A.textBoxStyle="nativeSelectItem";isc.A.showRTL=true;isc.A.$16b={onchange:isc.FormItem.$12y
};isc.A=isc.NativeSelectItem;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getOptionsHTML=function isc_c_NativeSelectItem_getOptionsHTML(_1,_2,_3){if(_1==null)_1=[];var _4=isc.SB.create();var _5=isc.isAn.Array(_1);if(_5){for(var i=0,_7=_1.length;i<_7;i++){var _8=_1[i];_4.append(this.$196(_8,_8,_2))}
}else{if(_3!=null){if(!this.$256n(_1,_3)){_3=null}
}
if(_3!=null){for(var i=0;i<_3.length;i++){_4.append(this.$196(_3[i].value,_3[i].display,_2))}
}else{for(var _8 in _1){var _9=_1[_8];_4.append(this.$196(_8,_9,_2))}
}
}
return _4.release(false)}
,isc.A.$256n=function isc_c_NativeSelectItem__verifySortedOptions(_1,_2){var _3=isc.getKeys(_1);if(_3.length!=_2.length){return false}else{for(var i=0;i<_2.length;i++){var _5=_2[i].value,_6=_2[i].display;if(!_3.contains(_5)||_1[_5]!=_6){return false}
}
}
return true}
,isc.A.$196=function isc_c_NativeSelectItem__getOptionHTML(_1,_2,_3){var _4=this.$197;if(!_4){this.$198=" SELECTED ";_4=this.$197=[];_4[0]="<OPTION ";_4[2]=' VALUE="';_4[4]='">';_4[6]="</OPTION>"}
_4[1]=(_1==_3?this.$198:null);_4[3]=_1;_4[5]=_2;return _4.join(isc.$ad)}
,isc.A.getOptionCount=function isc_c_NativeSelectItem_getOptionCount(_1){if(isc.isAn.Array(_1)){return _1.length}else{var _2=0;for(var _3 in _1){_2++}
return _2}
}
);isc.B._maxIndex=isc.C+4;isc.A=isc.NativeSelectItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.textMatchStyle="startsWith";isc.B.push(isc.A.getPickListFilterCriteria=function isc_NativeSelectItem_getPickListFilterCriteria(){var _1=this.optionCriteria||{};return isc.addProperties(_1,this.pickListCriteria)}
,isc.A.init=function isc_NativeSelectItem_init(){this.Super("init",arguments);isc.NativeSelectItem.instances.add(this);if(this.optionDataSource){var _1=this.getOptionDataSource();var _2=this.getValueFieldName();var _3=this.getDisplayFieldName();var _4=this;var _5={textMatchStyle:this.textMatchStyle,showPrompt:false
};if(this.optionFilterContext!=null)isc.addProperties(_5,this.optionFilterContext);var _6=this.$152n();if(_6!=null&&_6.length>0){_5.sortBy=_6}
if(this.optionOperationId!=null)_5.operationId=this.optionOperationId;var _7=this.getPickListFilterCriteria();_1.fetchData(_7,function(_12,_13){var _8;if(!_3)_8=[];else _8={};var _9=[];for(var i=0;i<_13.getLength();i++){var _11=_13[i];if(!_3){_8.add(_11[_2]);_9.add({display:_11[_2],value:_11[_2]})}else{_8[_11[_2]]=_11[_3];_9.add({display:_11[_3],value:_11[_2]})}
}
_4.setValueMap(_8,_9)},_5)}
}
,isc.A.setValueMap=function isc_NativeSelectItem_setValueMap(_1,_2){this.$256o=_2;return this.Super("setValueMap",arguments)}
,isc.A.$152n=function isc_NativeSelectItem__getInitialSort(){if(this.preDrawConfig&&this.preDrawConfig.initialSort){this.initialSort=this.preDrawConfig.initialSort;this.preDrawConfig.initialSort=null}
var _1=this.initialSort;if(_1){if(!isc.isAn.Array(this.initialSort))this.initialSort=[this.initialSort];return _1.duplicate()}
var _2=this.sortField!=null?this.sortField:this.sortFieldNum;if(!isc.isA.String(_2))return null;var _3=this.sortDirection!=null?this.sortDirection:"ascending";if(!isc.isAn.Array(_2))_2=[_2];var _1=[];for(var i=0;i<_2.length;i++){_1.add({property:_2[i],direction:_3})}
return _1}
,isc.A.destroy=function isc_NativeSelectItem_destroy(){isc.NativeSelectItem.instances.remove(this);this.Super("destroy",arguments)}
,isc.A.getTextBoxCellCSS=function isc_NativeSelectItem_getTextBoxCellCSS(){return this.$136
}
,isc.A.setElementReadOnly=function isc_NativeSelectItem_setElementReadOnly(_1){this.$176(!_1&&!this.isDisabled())}
,isc.A.getElementHTML=function isc_NativeSelectItem_getElementHTML(_1,_2){this.$199=false;var _3=this.form,_4=_3.getID(),_5=isc.StringBuffer.create(),_6=this.getItemID(),_7=isc.$ad,_8=this.$xq(_2),_9=""
;if(this.showValueIconOnly)return _8;if(_8!=null)_5.append(_8);if(this.showInputElement==false){_9=_5.release(false)}else{if(this.$68y()||this.renderAsStatic()){if(this.printFullText){_9=isc.StringBuffer.concat("<SPAN ",this.getElementStyleHTML(),">",_2==null?"&nbsp;":_2.asHTML(),"</SPAN>"
)}else{_9=isc.StaticTextItem.$b4.getElementHTML.apply(this,arguments)}
}else{_5.append("<SELECT"," NAME=",this.getElementName()," ID=",this.getDataElementId(),this.$155(),(!this.showTitle&&this.accessKey!=null?" ACCESSKEY="+this.accessKey:_7),((this.isReadOnly()||this.isDisabled())?" DISABLED ":_7),this.getElementStyleHTML(),(this.multiple?" MULTIPLE":_7)," TABINDEX=",this.$154()," handleNativeEvents=false>");_5.append(this.getOptionsHTML(this.getValueMap(),this.$256o));_5.append("</SELECT>");_9=_5.release(false)}
}
return _9}
,isc.A.$12z=function isc_NativeSelectItem__handleElementChanged(_1){if(isc.Browser.isIE&&!_1){isc.Timer.setTimeout(this.getID()+".$12z(true)",10);return true}
return this.form.elementChanged(this.getID())}
,isc.A.$12x=function isc_NativeSelectItem__nativeElementBlur(_1,_2){var _3=this.Super("$12x",arguments);if(this.changeOnBlur)this.form.elementChanged(this)}
,isc.A.getOptionsHTML=function isc_NativeSelectItem_getOptionsHTML(_1,_2){var _3=isc.NativeSelectItem.getOptionsHTML(_1?_1:this.getValueMap(),null,_2);if(this.isSelectOther){_3+="<OPTION VALUE=\""+this.separatorValue+"\">"+this.separatorTitle
+"<OPTION VALUE=\""+this.otherValue+"\">"+this.otherTitle
}
return _3}
,isc.A.getOptionCount=function isc_NativeSelectItem_getOptionCount(_1){return isc.NativeSelectItem.getOptionCount(_1?_1:this.getValueMap())}
,isc.A.getTextBoxStyle=function isc_NativeSelectItem_getTextBoxStyle(){if(this.$68y())return isc.TextItem.getInstanceProperty("textBoxStyle");else return this.Super("getTextBoxStyle",arguments)}
,isc.A.getElementStyleHTML=function isc_NativeSelectItem_getElementStyleHTML(){var _1=isc.SB.create(),_2=isc.SB.create();if(this.textBoxStyle!=null)_1.append(" CLASS='",this.getTextBoxStyle(),"' ");if(this.multiple||this.rows){var _3=this.rows;if(!isc.isA.Number(_3)||_3<1)
_3=Math.min(isc.NativeSelectItem.DEFAULT_ROW_COUNT,this.getOptionCount());if(this.height){if(isc.isA.Number(this.height))_2.append("HEIGHT:",this.height,"px;")}
_1.append(" SIZE=",_3)}
if(isc.Browser.isDOM){var _4=this.getTextBoxWidth();if(isc.isA.Number(_4)){_4=Math.max(_4,1);_2.append("width:",_4,"px;")}
if(isc.Browser.isMoz){_2.append("-moz-user-focus:",(this.$154()>0?"normal;":"ignore;")
)}
_2.append("margin-top:0px;margin-bottom:0px;");_2=_2.release(false);if(_2.length>0)_1.append(" STYLE='",_2,"'")}
return _1.release(false)}
,isc.A.$143=function isc_NativeSelectItem__sizeTextBoxAsContentBox(){return false}
,isc.A.$16z=function isc_NativeSelectItem__iconVisibilityChanged(){if(!isc.isA.Number(this.width))return;return this.Super("$16z",arguments)}
,isc.A.$16m=function isc_NativeSelectItem__getIconVMargin(){return 0}
,isc.A.mapValueToDisplay=function isc_NativeSelectItem_mapValueToDisplay(_1){if(isc.isAn.Array(_1)){var _2=[];for(var i=0;i<_1.length;i++){_2[i]=this.mapValueToDisplay(_1[i])}
return _2}
return this.Super("mapValueToDisplay",arguments)}
,isc.A.setElementValue=function isc_NativeSelectItem_setElementValue(_1,_2){if(arguments.length==1)_2=_1;var _3=this.getDataElement();if(!_3)return null;var _4=_3.options;if(!_4){this.logDebug("setElementValue(): element.options is null. ???");return null}
this.$17j(_2);if(!this.multiple){if(_2==null)_2="";for(var i=0;i<_4.length;i++){if(_4[i].value==_2){if(_3.selectedIndex!=i){_3.selectedIndex=i}
return _3.selectedIndex}
}
for(var i=0;i<_4.length;i++){if(_4[i].text==_2){if(_3.selectedIndex!=i){_3.selectedIndex=i}
_3.selectedIndex=i;return _3.selectedIndex}
}
if(this.addUnknownValues){if(isc.Browser.isIE){var _6=0;if(this.$199){_4[_6].text=_1;_4[_6].value=_2}else{_4.add(new Option(_2,_1),_6);this.$199=true}
}else{if(this.$199){var _6=_4.length-1;_4[_6].value=_2;_4[_6].text=_1}else{var _6=_4.length;_4[_6]=new Option(_2,_1);this.$199=true}
}
if(_3.selectedIndex!=_6){_3.selectedIndex=_6}
return _3.selectedIndex}else{return null}
}else{if(_2==null){_2=[]}else if(isc.isA.String(_2)&&_2.contains(",")){_2=_2.split(",")}else if(!isc.isAn.Array(_2)){_2=[_2]}else{_2=_2.duplicate()}
if(_1==null){_1=[]}else if(isc.isA.String(_1)&&_1.contains(",")){_1=_1.split(",")}else if(!isc.isAn.Array(_1)){_1=[_1]}else{_1=_1.duplicate()}
for(var i=0;i<_4.length;i++){var _7=_3.options[i];var _8=_2.indexOf(_7.value);if(_8>-1){if(_7.selected!=true)_7.selected=true;_2.removeItem(_8)}else{if(_7.selected!=false)_7.selected=false}
}
if(_2.length!=0){for(var i=0;i<_4.length;i++){var _7=_3.options[i];var _8=_2.indexOf(_7.text);if(_8>-1){if(_7.selected!=true)_7.selected=true;_2.removeItem(_8)}
}
}
if(_2.length!=0&&this.addUnknownValues){for(var i=0;i<_2.length;i++){var _9=_4[_4.length]=new Option(_2[i],_1[i]);_9.selected=true}
}
return _2}
}
,isc.A.getElementValue=function isc_NativeSelectItem_getElementValue(){var _1=this.getDataElement();if(!_1)return null;var _2=_1.options;if(!_2||_2.length==0)return null;if(!this.multiple){var _3=_2[_1.selectedIndex];if(!_3)return null;return(_3.value!=null?_3.value:_3.text)}else{var _4=[];for(var i=0;i<_2.length;i++){var _3=_2[i];if(_3.selected){_4.add(_3.value!=null?_3.value:_3.text)}
}
if(_4.length==0)return null;return _4}
}
,isc.A.setElementValueMap=function isc_NativeSelectItem_setElementValueMap(_1){this.$199=false;this.Super("setElementValueMap",arguments);var _2=this.getDataElement();if(_2==null)return;var _3=_2.options;_3.length=0;if(isc.isAn.Array(_1)){for(var i=0;i<_1.length;i++){_3[i]=new Option(_1[i],_1[i])
}
}else{if(this.$256o&&isc.NativeSelectItem.$256n(_1,this.$256o)){var _5=this.$256o;for(var i=0;i<_5.length;i++){_3[_3.length]=new Option(_5[i].display,_5[i].value)}
}else{for(var _6 in _1){_3[_3.length]=new Option(_1[_6],_6)
}
}
}
if(this.isSelectOther){_3[_3.length]=new Option(this.separatorTitle,this.separatorValue);_3[_3.length]=new Option(this.otherTitle,this.otherValue)}
}
,isc.A.updateValue=function isc_NativeSelectItem_updateValue(){if(this.isSelectOther){if(!this.hasElement()||this.getDataElement()==null)return;var _1=this._value,_2=this.getElementValue();if(_2==this.separatorValue){this.setValue(_1);return false}
if(_2==this.otherValue){var _3=this.getValueMapTitle(_1);_2=prompt("Other value for \r'"+this.getTitle()+"'?",(_3?_3:""));if(_2==null){this.setValue(_1);return false}
this.setElementValue(_2)}
}
return this.Super("updateValue",arguments)}
);isc.B._maxIndex=isc.C+22;if(isc.ListGrid!=null){isc.ClassFactory.defineClass("SelectItem","FormItem");isc.defer("if (isc.SelectItem.$b4.animatePickList == null) isc.SelectItem.addProperties({ animatePickList: isc.Browser.isHandset || isc.Browser.isTablet });");if(isc.PickList)isc.SelectItem.addMethods(isc.PickList.$146x)
isc.$19s={textBoxStyle:"selectItemText",printTextBoxStyle:"textItem",printReadOnlyTextBoxStyle:"staticTextItem",height:19,width:150,dirtyOnKeyDown:false,changeOnKeypress:false,redrawOnShowIcon:false,addUnknownValues:true,autoSizePickList:true,multipleAppearance:"picklist",separatorTitle:"--------------------",separatorValue:"----",otherTitle:"Other...",otherValue:"***other***",canEditCriterion:function(_1){if(_1.valuePath==null){var _2=this.getCriteriaFieldName();if(_1.fieldName!=null&&_1.fieldName==_2&&(this.multiple||!isc.isAn.Array(_1.value))&&(_1.operator=="equals"||_1.operator=="iEquals"||(this.multiple&&_1.operator=="inSet")))
{return true}
}
return this.Super("canEditCriterion",arguments)}};isc.SelectItem.addProperties(isc.$19s)
isc.A=isc.SelectItem;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.$336o=function isc_c_SelectItem__getChildSelectorTextBoxStyle(_1){return _1.textBoxStyle||_1.styleName||this.getInstanceProperty("textBoxStyle")}
,isc.A.$336p=function isc_c_SelectItem__getChildSelectorWidth(_1,_2){var _3=this.$336o(_2),_4=isc.Element.getFontSpec(_3),_5=0;if(_4){for(var i=0;i<_1.length;i++){var w=isc.Element.measureString(""+_1[i],_4);if(w>_5)_5=w}
}else{_5=isc.Canvas.measureContent(_1.join("<br>"),_3)}
var _8=_2.pickerIconWidth!=null?_2.pickerIconWidth
:this.getInstanceProperty("pickerIconWidth"),_9=_2.controlStyle||this.getInstanceProperty("controlStyle");return Math.ceil(_5)+_8+isc.Element.$yp(_3)+isc.Element.$yp(_9)+4}
);isc.B._maxIndex=isc.C+2;isc.A=isc.SelectItem.getPrototype();isc.A.showPickerIcon=true;isc.A.emptyDisplayValue="&nbsp;";isc.A.controlStyle="selectItemControl";isc.A.pickerIconStyle="selectItemPickerIcon";isc.A.canFocus=true;isc.A.showFocused=true;isc.A.pickerIconSrc="[SKIN]/DynamicForm/SelectItem_PickButton_icon.gif";isc.A.pickerIconDefaults={tabIndex:-1,click:isc.Class.NO_OP
};isc.A.clipValue=true;isc.A.showOver=true;isc.A.updateTextBoxOnOver=false;isc.A.updateControlOnOver=false;isc.A.modalPickList=true;isc.A.changeOnValueChange=true;isc.A.changeOnKeyboardNavigation=true;isc.A.canSelectText=false;isc.A.allowEmptyValue=false;isc.A.autoFetchData=true;isc.A.saveOnEnter=true;isc.A.openOnSpace=false;isc.A.openOnDownArrow=false;isc.A=isc.SelectItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$20u="Page_Up";isc.A.$20v="Page_Down";isc.A.pickerExitButtonDefaults={_constructor:"NavigationButton",click:function(){this.creator.pickerExitButtonClick()}
};isc.A.pickerExitButtonTitle="Done";isc.A.pickerClearButtonDefaults={_constructor:"NavigationButton",click:function(){this.creator.pickerClearButtonClick()}
};isc.A.pickerClearButtonTitle="Clear";isc.A.emptyPickListMessage="No items to show";isc.A.allowMultiCharSearch=true;isc.A.$177n=500;isc.A.selectOtherPrompt="Other value for <br>${item.getTitle()}?";isc.A.dialogWidth=250;isc.A.canEscapeHTML=true;isc.A.$161s=new String("<span aria-hidden='true'>");isc.A.$161t=new String("</span>");isc.A.hasInternalNavigation=true;isc.B.push(isc.A.init=function isc_SelectItem_init(){this.$249r();if(this.specialValues&&this.allowEmptyValue){this.logWarn("Both specialValues and allowEmptyValue properties set. allowEmptyValue will be ignored.");this.allowEmptyValue=false}
if(this.hiliteOnFocus!=null){this.$15o("hiliteOnFocus","showFocused");this.showFocused=this.hiliteOnFocus}
if(this.pickButtonWidth!=null){this.$15o("pickButtonWidth","pickerIconWidth");this.pickerIconWidth=this.pickButtonWidth}
if(this.pickButtonHeight!=null){this.$15o("pickButtonHeight","pickerIconHeight");this.pickerIconHeight=this.pickButtonHeight}
if(this.pickButtonSrc!=null){this.$15o("pickButtonSrc","pickerIconSrc");this.pickerIconSrc=this.pickButtonSrc}
if(this.multiple)this.$161a=isc.Set.create();return this.Super("init",arguments)}
,isc.A.$207e=function isc_SelectItem__mayShowHintInField(){return!!(this.showHint&&this.$2257())}
,isc.A.$157g=function isc_SelectItem__shouldVerticallyCenterTextBox(){return true}
,isc.A.drawn=function isc_SelectItem_drawn(_1,_2,_3,_4){this.invokeSuper(isc.SelectItem,"drawn",_1,_2,_3,_4);if(this.autoFetchData&&this.$19m()){if(this.getCanEdit()==false&&(!this.$127n||this.$148w==false)){this.autoFetchDataOnRedrawn=true}else{this.fetchData(null,null,true)}
}
}
,isc.A.redrawn=function isc_SelectItem_redrawn(_1,_2,_3,_4){this.invokeSuper(isc.SelectItem,"redrawn",_1,_2,_3,_4);if(this.autoFetchDataOnRedrawn==true&&this.getCanEdit()){delete this.autoFetchDataOnRedrawn;this.fetchData(null,null,true)}
}
,isc.A.$156r=function isc_SelectItem__supportsInlineIcons(){if(this.$169p==null)return false;return true}
,isc.A.$16m=function isc_SelectItem__getIconVMargin(){return 0}
,isc.A.$121=function isc_SelectItem__iconFocus(_1,_2){var _3=this.getIcon(_1);if(_3==this.getPickerIcon()){_2.blur();this.focusInItem();return}
return this.Super("$121",arguments)}
,isc.A.setElementReadOnly=function isc_SelectItem_setElementReadOnly(_1){}
,isc.A.$1603=function isc_SelectItem__getPendingBaseStyle(_1,_2){if(this.multiple&&(_2===this.$13q||_2===this.$1600))
{return _1}
return this.Super("$1603",arguments)}
,isc.A.handleClick=function isc_SelectItem_handleClick(){if(!(this.isDisabled())&&!(this.isReadOnly())){this.focusInItem();this.showPicker()}
return this.Super("handleClick",arguments)}
,isc.A.handleKeyPress=function isc_SelectItem_handleKeyPress(_1,_2){var _3=this.Super("handleKeyPress",arguments);if(_3==false)return false;if((this.isDisabled())||(this.isReadOnly()))return _3;var _4=_1.keyName;if(_4=="Enter"&&this.isSelectOther){if(this.$19u!=null)this.updateValue()}else if(_4=="Arrow_Down"){if(this.openOnDownArrow){this.showPicker()}else{if(isc.EH.altKeyDown())this.showPicker();else this.moveToNextValue(1)}
_3=false}else if(_4=="Arrow_Up"){if(isc.EH.altKeyDown())this.showPicker();else this.moveToNextValue(-1);_3=false}else if(_4==this.$20u){this.moveToNextPage(-1);_3=false}else if(_4==this.$20v){this.moveToNextPage(1);_3=false}else if(_4=="Home"){this.moveToFirstValue();_3=false}else if(_4=="End"){this.moveToLastValue();_3=false}else if(_4=="Space"&&this.openOnSpace){this.showPicker()}else{var _5=_1.characterValue;if(_5!=null){this.$177l(_5)}
}
return _3}
,isc.A.$12x=function isc_SelectItem__nativeElementBlur(_1,_2){var _3=this.Super("$12x",arguments);if(this.changeOnBlur||this.$10v()||this.$19u){if(isc.Browser.isMoz&&this.$19u==this.otherValue)
this.form.$11w=true;this.updateValue()}
return _3}
,isc.A.showPicker=function isc_SelectItem_showPicker(_1,_2){this.showPickList(_1,_2)}
,isc.A.showPickList=function isc_SelectItem_showPickList(_1,_2){var _3=isc.PickList.getPrototype().showPickList;_3.apply(this,arguments);if(this.pickList){this.pickList.$188c=true;this.pickList.deselectAllRecords();this.pickList.$188c=false;var _4=this.getValue();if(_4!=null)this.selectItemFromValue(_4)}
}
,isc.A.handleEditorExit=function isc_SelectItem_handleEditorExit(){if(this.$19g)return;return this.Super("handleEditorExit",arguments)}
,isc.A.$19j=function isc_SelectItem__pickListShown(){this.handleEditorEnter();var _1=isc.PickList.getPrototype().$19j;_1.apply(this,arguments)}
,isc.A.$19h=function isc_SelectItem__pickListHidden(){if(this.fireChangeOnSelect==false)this.updateValue();var _1=isc.PickList.getPrototype().$19h;_1.apply(this,arguments)}
,isc.A.createPickerNavigationBar=function isc_SelectItem_createPickerNavigationBar(){if(this.pickerClearButton==null){this.pickerClearButton=this.createAutoChild("pickerClearButton",{title:this.pickerClearButtonTitle,visibility:this.allowEmptyValue?isc.Canvas.INHERIT:isc.Canvas.HIDDEN,icon:"Cancel",canAdaptWidth:true
})}
if(this.pickerExitButton==null){this.pickerExitButton=this.createAutoChild("pickerExitButton",{title:this.pickerExitButtonTitle,icon:"Close",canAdaptWidth:true
})}
if(this.pickerNavigationBar==null){this.pickerNavigationBar=this.createAutoChild("pickerNavigationBar",{controls:[this.pickerClearButton,this.pickerExitButton]
})}else{this.pickerNavigationBar.setControls([this.pickerClearButton,this.pickerExitButton])}
}
,isc.A.pickerExitButtonClick=function isc_SelectItem_pickerExitButtonClick(){this.pickList.hide()}
,isc.A.pickerClearButtonClick=function isc_SelectItem_pickerClearButtonClick(){this.setValue(this.emptyStringValue);this.pickList.hide()}
,isc.A.getAllLocalOptions=function isc_SelectItem_getAllLocalOptions(_1){var _2;if(this.$19m()){if(!this.pickList||this.pickList.destroyed)return;var _3=this.pickList.getOriginalData();if(this.dataSetType=="tree"){if(!_3||!_3.$27m||_3.$27m.length==0)return}else{if(!_3||!_3.lengthIsKnown()||!_3.allMatchingRowsCached())return}
var _4=this.getPickListFilterCriteria();if(this.form){_4=isc.DataSource.resolveDynamicCriteria(_4,this.form.getRuleContext())}
if(_3.compareCriteria(_4,_3.criteria)!=0){if(!_3.allRowsCached()||!_3.useClientFiltering)return;this.filterPickList(false,false)}
if(this.dataSetType=="tree"){_2=_3.$27m}else{_2=_3.getAllRows()}
}else{_2=this.getClientPickListData()}
var _5=[];if(_1){var _6=this.getRecordEnabledProperty(),_7=this.getCanSelectRecordProperty();for(var i=0;i<_2.length;i++){if(_2[i][_6]==false)continue;if(_2[i][_7]==false)continue;_5[_5.length]=_2[i]}
}else{_5=_2}
return _5}
,isc.A.getRecordEnabledProperty=function isc_SelectItem_getRecordEnabledProperty(){if(this.pickList!=null)return this.pickList.recordEnabledProperty;if(this.pickListProperties&&this.pickListProperties.recordEnabledProperty){return this.pickListProperties.recordEnabledProperty}
if(this.pickListDefaults&&this.pickListDefaults.recordEnabledProperty){return this.pickListDefaults.recordEnabledProperty}
return isc.PickListMenu.getPrototype().recordEnabledProperty}
,isc.A.getCanSelectRecordProperty=function isc_SelectItem_getCanSelectRecordProperty(){if(this.pickList!=null)return this.pickList.recordCanSelectProperty;if(this.pickListProperties&&this.pickListProperties.recordCanSelectProperty){return this.pickListProperties.recordCanSelectProperty}
if(this.pickListDefaults&&this.pickListDefaults.recordCanSelectProperty){return this.pickListDefaults.recordCanSelectProperty}
return isc.PickListMenu.getPrototype().recordCanSelectProperty}
,isc.A.$177l=function isc_SelectItem__setClearMoveToTimer(_1,_2){var _3=String.fromCharCode(_1);if(_3==null)return;if(this.$177o){isc.Timer.clear(this.$177o);delete this.$177o}
if(!this.$177m||!this.allowMultiCharSearch)this.$177m="";this.$177m+=_3;if(!_2){if(!this.moveToBuffer(this.$177m)){if(this.$177m==(_3+_3)){this.$177m=_3;this.moveToBuffer(this.$177m)}
}
}
if(this.allowMultiCharSearch){this.$177o=isc.Timer.setTimeout(this.getID()+".$177p()",this.$177n
)}
}
,isc.A.$177p=function isc_SelectItem__$delayedClearMoveTo(){isc.Timer.clear(this.$177o);delete this.$177o;delete this.$177m}
,isc.A.moveToBuffer=function isc_SelectItem_moveToBuffer(_1){var _2=this.getAllLocalOptions(true);if(!_2||_2.length<1){if(this.pickList&&this.pickList.data&&this.pickList.data.localData){_2=this.pickList.data.localData}
}
if(_2==null||_2.length<1)return false;var _3=_1;if(_3==null)return false;_3=_3.toLowerCase();var _4=(this.isSelectOther&&this.$19u!=null)?this.$19u:(this.$10v()?this.$19w:this.getValue()),_5=this.getValueFieldName(),_6=isc.isAn.Array(_4)?_4[0]:_4,_7=_2.findIndex(_5,_6),i=_7<_2.length-1?_7+1:0,_9=_7>0,_1=_3,_10=false
;if(_1.length>1){i=_7;_10=true}
while(_10||i!=_7||(this.multiple&&this.openPickListOnKeyPress&&i<_2.length))
{_10=false;if(_7<0)_7=0;if(!_2[i]){if(_9){_9=false;i=0;continue}
return false}
var _11=_2[i][this.getValueFieldName()],_12=this.mapValueToDisplay(_11);if(isc.isA.String(_12)){var _13=_12.replace(/<(?:.|\n)*?>/gm,'').toLowerCase();if(_13.startsWith(_3)){var _14=_11;if(this.openPickListOnKeyPress){this.showPicker();this.pickList.scrollRecordIntoView(i);this.pickList.$88(i)}else{this.changeToValue(_14,(this.changeOnValueChange&&this.changeOnKeyboardNavigation),_2[i]
)}
return true}
}
i+=1;if(i>=_2.length)i=0}
return false}
,isc.A.moveToNextPage=function isc_SelectItem_moveToNextPage(_1){var _2;if(this.isSelectOther&&this.$19u!=null)_2=this.$19u;else _2=(this.$10v()?this.$19w:this.getValue());var _3=this.getValueFieldName();var _4=-1,_5;var _6=this.getAllLocalOptions(true);if(!_6||_6.length<1){if(this.$19m()&&this.pickList&&!this.pickList.destroyed){var _7=this.pickList.getOriginalData();var _8=this.getPickListFilterCriteria();if(this.form){_8=isc.DataSource.resolveDynamicCriteria(_8,this.form.getRuleContext())}
if(_7&&_7.compareCriteria(_8,_7.criteria)!=0){this.filterPickList(false,false)}
_6=_7}
}
if(_6==null||_6.length<1)return;var _4=_6.findIndex(_3,_2),_5=_6.getLength(),_9=this.dataPageSize
;if(_9==null)_9=this.pickList?this.pickList.dataPageSize||10:10;if(_1<0)_9*=-1;_4+=_9;if(_4<0)_4=0;if(_4>=_5)_4=_5-1;var _10=_6.get(_4);if(_10!=null&&!Array.isLoading(_10)){var _11=_10[_3]
this.changeToValue(_11,(this.changeOnValueChange&&this.changeOnKeyboardNavigation),_10
)}
}
,isc.A.moveToNextValue=function isc_SelectItem_moveToNextValue(_1,_2){var _3=this.getAllLocalOptions(true);if(!_3||_3.length<1){if(this.$19m()&&this.pickList&&!this.pickList.destroyed){var _4=this.pickList.getOriginalData();var _5=this.getPickListFilterCriteria();if(this.form){_5=isc.DataSource.resolveDynamicCriteria(_5,this.form.getRuleContext())}
if(_4&&_4.compareCriteria(_5,_4.criteria)!=0){this.filterPickList(false,false)}
_3=_4}
}
if(_3==null||_3.length<1)return;var _6=_3.getLength();var _7=this.getValueFieldName();var _8=-1;if(_2){if(_6>0){if(_1>0){_8=_6-1}else{_8=0}
}
}else{var _9;if(this.isSelectOther&&this.$19u!=null)_9=this.$19u;else _9=(this.$10v()?this.$19w:this.getValue());_8=_3.findIndex(_7,_9);_8+=_1}
if(_6==null||_8>=_6||_8<0)return;var _10=_3.get(_8);if(_10!=null&&!Array.isLoading(_10)){var _11=_10[_7]
this.changeToValue(_11,(this.changeOnValueChange&&this.changeOnKeyboardNavigation),_10
)}
}
,isc.A.moveToFirstValue=function isc_SelectItem_moveToFirstValue(){this.moveToNextValue(-1,true)}
,isc.A.moveToLastValue=function isc_SelectItem_moveToLastValue(){this.moveToNextValue(1,true)}
,isc.A.$19x=function isc_SelectItem__getIconMouseDownFunction(){if(!this.$19y){this.$19y=isc.$aq("if(window."+this.getID()+")window."+this.getID()+".$19g=true;")}
return this.$19y}
,isc.A.$159=function isc_SelectItem__applyHandlersToElement(_1,_2,_3,_4){this.invokeSuper(isc.SelectItem,"$159",_1,_2,_3,_4);if(isc.Browser.isIE){var _5=this.$16v(this.getPickerIcon());if(_5){_5.onmousedown=this.$19x()}
}
}
,isc.A.$1607=function isc_SelectItem__pendingStatusChanged(_1){if(this.multiple&&!_1){var _2=this.$161a;_2.clear();var _3=this._value;if(isc.isAn.Array(_3)){var _4=_3.length;for(var i=0;i<_4;++i){_2.add(_3[i])}
}else{_2.add(_3)}
this.setLocalValue(_3)}
this.Super("$1607",arguments)}
,isc.A.makePickList=function isc_SelectItem_makePickList(_1){if(this.progressiveLoading===true||this.progressiveLoading===false){if(this.pickListProperties==null)this.pickListProperties={};this.pickListProperties.progressiveLoading=this.progressiveLoading}
if(!this.filterLocally&&(this.allowEmptyValue&&!this.multiple||(this.specialValues&&!this.separateSpecialValues))&&this.$19m())
{if(this.pickListProperties==null)
this.pickListProperties={};if(this.pickListProperties.dataProperties==null)
this.pickListProperties.dataProperties={};this.pickListProperties.dataProperties.fetchMode="basic"}
var _2=isc.PickList.getPrototype().makePickList;var _3=_2.apply(this,arguments);if(this.multiple&&this.pickList&&this.pickList.showFilterEditor){this.logWarn("SelectItem defined with multiple set to true, and showFilterEditor enabled on the pick-list. This combination of settings is not supported as it can lead to ambiguity if a user selects an item, then re-filters such that the item is no longer visible and attempts to modify the selection.")}
return _3}
,isc.A.changeToValue=function isc_SelectItem_changeToValue(_1,_2,_3){var _4=(this.$19u||this.$19w||this.getValue());if(_4==_1)return;if(this.dataSetType=="tree"&&this.pickList&&this.pickList.selection){if(_3){var _5=isc.addProperties({},_3);delete _5.children;this.$848([_5]);this.$846();if(this.getDisplayFieldName()!=this.getValueFieldName()){this.updateDisplayValueMap()}
}
}
if(this.isSelectOther&&(_1==this.separatorValue||_1==this.otherValue))
{this.$952(this.mapValueToDisplay(_1),_1);this.$19u=_1;return}else{delete this.$19u}
if(this.multiple&&_1!=null&&!isc.isAn.Array(_1))_1=[_1];this.setLocalValue(_1);if(_2)this.updateValue()}
,isc.A.setLocalValue=function isc_SelectItem_setLocalValue(_1){this.$19w=_1;this.$255k(_1);this.$18i()}
,isc.A.$255k=function isc_SelectItem__applyLocalValueToElement(_1){if(this.isVisible()&&this.containerWidget.isDrawn()){if(_1==null)_1=null;var _2=this.$1416(_1);this.$952(_2,_1)}
}
,isc.A.setElementValue=function isc_SelectItem_setElementValue(_1,_2,_3,_4,_5){var _6=(_1==null||isc.isAn.emptyString(_1)||_1==this.emptyDisplayValue);if(isc.Canvas.ariaEnabled()&&this.outerAriaRole==="listbox"){this.setAriaRole(_6?"presentation":"option")}
if(!this.$127p&&!this.$127q&&this.$712())
{if(_6){var _7=this.$15h();if(_7!=null)
_7.className=this.$66v();var _8=this.getHint();_1=String.htmlStringToString(_8);this.$1563=true}else{if(this.$1563){var _7=this.$15h();if(_7!=null)_7.className=this.getTextBoxStyle()}
this.$1563=false}
}
_1=this.$170f(_1,_2);this.$19z=_1;return this.invokeSuper(isc.SelectItem,"setElementValue",_1,_2,_3,_4,_5)}
,isc.A.$66t=function isc_SelectItem__showInFieldHint(){if(this.$127p){return}
this.$127p=true;this.Super("$66t",arguments);this.$127p=false}
,isc.A.$66s=function isc_SelectItem__hideInFieldHint(_1){if(this.$127q){return}
this.$127q=true;this.Super("$66s",arguments);this.$127q=false}
,isc.A.updateValue=function isc_SelectItem_updateValue(){if(this.isSelectOther&&this.$19u!=null){var _1=this.getSelectOtherValue(this.$19u);delete this.$19u;this.setLocalValue(_1)}
if(!this.$10v())return;var _2=this.$19w;this.$10y(_2)}
,isc.A.mapDisplayToValue=function isc_SelectItem_mapDisplayToValue(_1){return _1}
,isc.A.getSelectOtherValue=function isc_SelectItem_getSelectOtherValue(_1){if(_1==this.separatorValue)return true;if(_1==this.otherValue){var _2=this.$19w||this.getValue(),_3=(_2==null?"":this.mapValueToDisplay(_2)),_4=this.selectOtherPrompt.evalDynamicString(null,{item:this,value:_2}),_5=isc.addProperties({width:this.dialogWidth},this.dialogDefaults,this.dialogProperties);isc.askForValue(_4,this.getID()+".getSelectOtherValueCallback(value)",_5);return true}
}
,isc.A.getSelectOtherValueCallback=function isc_SelectItem_getSelectOtherValueCallback(_1){if(_1!=null){_1=this.mapDisplayToValue(_1);this.changeToValue(_1,this.changeOnValueChange)}
}
,isc.A.setValue=function isc_SelectItem_setValue(_1,_2,_3,_4){_1=this.$190(_1);var _5,_6=this.$19w;if(_6===_5)_6=this._value;this.$10x();this.invokeSuper(isc.SelectItem,"setValue",_1,_2,_3,_4);_1=this.getValue();if(_1!=_6)this.$255k(_1);if(this.pickList&&this.pickList.isDrawn()&&this.pickListVisible()){this.setUpPickList(true)}
if(!this.hasFocus&&this.$712()){if(_1==null||isc.isAn.emptyString(_1)){this.$66t()}else{this.$66s(true)}
}
return _1}
,isc.A.saveValue=function isc_SelectItem_saveValue(_1,_2,_3,_4,_5){var _6=this._value;if(this.$191(_6,_1))delete this.$192;return this.invokeSuper(isc.SelectItem,"saveValue",_1,_2,_3,_4,_5)}
,isc.A.$191=function isc_SelectItem__dropCacheOnValueChange(_1,_2){return(this.addUnknownValues&&this.$192&&((_1!=null&&!this.$193(_1))||(_2!=null&&!this.$193(_2))))}
,isc.A.$10x=function isc_SelectItem__markValueAsNotDirty(_1,_2,_3,_4){this.invokeSuper(isc.SelectItem,"$10x",_1,_2,_3,_4);delete this.$19w}
,isc.A.getDefaultValue=function isc_SelectItem_getDefaultValue(){var _1=this.Super("getDefaultValue",arguments);if(_1==null&&this.defaultToFirstOption)_1=this.getFirstOptionValue();return this.$190(_1)}
,isc.A.$190=function isc_SelectItem__getValidValue(_1){if(!this.$194(_1)){var _2=this.$195;this.$195=true;var _3;if(_2)_3=_1;else _3=this.$19w||this.getValue();if(_1==_3||!this.$194(_3)){_3=null}
_1=_3}
return _1}
,isc.A.$194=function isc_SelectItem__valueIsValid(_1){if(this.addUnknownValues||this.optionDataSource)return true;if(!this.valueMap&&this.getOptionDataSource())return true;if(_1==null)return true;if(isc.isAn.Array(_1)){for(var i=0;i<_1.length;i++){if(!this.$193(_1[i]))return false}
return true}else{return this.$193(_1)
}
}
,isc.A.$193=function isc_SelectItem__valueInValueMap(_1){var _2=this.getAllValueMappings(),_3;if(isc.isAn.Array(_2)){return _2.contains(_1)
}else if(isc.isAn.Object(_2)){return(_2[_1]!==_3)}
return false}
,isc.A.mapValueToDisplay=function isc_SelectItem_mapValueToDisplay(_1,_2,_3,_4){if(this.isSelectOther){if(_1==this.otherValue)return this.otherTitle;if(_1==this.separatorValue)return this.separatorTitle}
return this.invokeSuper(isc.SelectItem,"mapValueToDisplay",_1,_2,_3,_4)}
,isc.A.$161q=function isc_SelectItem__finishMapMultipleValueToDisplay(_1,_2){if(this.multiple&&this.$161r()){var _3=[];var _4=this.$160w();var _5;if(_4==null)_5=0;else if(!isc.isAn.Array(_4)){_4=[_4];_5=1}else{_5=_4.length}
var _6=(_2==null?0:_2.length);var _7=this.$161a,i=0,j=0,_10=false;while(i<_5&&j<_6){var _11=_4[i],_12=_2[j];if(_7.has(_12)){if(_2.contains(_11)){if(_10){_3.add(this.$161t);_10=false}
_3.add(_1[j]);++i;++j}else{if(!_10){_3.add(this.$161s);_10=true}
_3.add("<span style='"+String.asAttValue(this.valueDeselectedCSSText)+"'>"+this.mapValueToDisplay(_11)+"</span>");++i}
}else{if(_10){_3.add(this.$161t);_10=false}
_3.add(_1[j]);++j}
}
if(i<_5){if(!_10){_3.add(this.$161s);_10=true}
do{_3.add("<span style='"+String.asAttValue(this.valueDeselectedCSSText)+"'>"+this.mapValueToDisplay(_4[i])+"</span>")}while(++i<_5);_3.add(this.$161t);_10=false}else if(j<_6){if(_10){_3.add(this.$161t);_10=false}
do{_3.add(_1[j])}while(++j<_6)}
for(var _13=_3.length,_14=_13;_14>1;--_14){var _15=_3[_14-1];if(_15===this.$161s){if(_14>=2)_3.addAt(this.multipleValueSeparator,_14-1)}else if(_15===this.$161t){if(_14<_13){_3.addAt(this.multipleValueSeparator,_14-1)}
}else{if(_3[_14-2]!==this.$161s&&_3[_14-2]!==this.$161t)
{_3.addAt(this.multipleValueSeparator,_14-1)}
}
}
return _3.join(isc.emptyString)}else return _1.join(this.multipleValueSeparator)}
,isc.A.$1604=function isc_SelectItem__finishMapValueToDisplay(_1,_2){if(this.multiple){if(_2!=null&&!this.$1602&&this.$161p()&&!this.$161a.has(_2))
{if(this.pendingValueStyle){if(!this.renderAsDisabled()){_1=("<span class='"+this.pendingValueStyle+"'>"+_1+"</span>")}else{_1=("<span class='"+this.pendingValueStyle+"Disabled'>"+_1+"</span>")}
}else{_1=("<span style='"+String.asAttValue(this.editPendingCSSText)+"'>"+_1+"</span>")}
}else if(_2==null&&this.$161r()){var _3=this.$161q(null,null);if(_3)_1=_3}
}
return _1}
,isc.A.getSelectedRecord=function isc_SelectItem_getSelectedRecord(){if(this.pickList==null||this.pickList.destroyed)this.makePickList(false);var _1,_2=this.$19w;if(_2===_1)_2=this.getValue();if(this.selectItemFromValue(_2,true)){return this.pickList.getSelectedRecord()}
return this.Super("getSelectedRecord",arguments)}
,isc.A.getSelectedRecords=function isc_SelectItem_getSelectedRecords(){var _1=this.$19w;this.selectItemFromValue(_1,true);var _2=this.pickList.getSelection();return(_2.length>0?_2:null)}
,isc.A.$17b=function isc_SelectItem__mapKey(_1,_2,_3,_4,_5,_6){var _7=this.invokeSuper(isc.SelectItem,"$17b",_1,true,_3,_4,_5,_6);if(_7==null&&this.getDisplayFieldName()!=null){var _8=this.$19o(_1,false),_9;if(_8!==_9){_7=_8}else if(this.specialValues){var _10=this.specialValues;if(isc.isA.String(_10))_10=this.getGlobalReference(_10);if(!isc.isAn.Array(_10)){if(isc.PickList.emptyStoredValue&&_1===null)_1=isc.PickList.emptyStoredValue;_7=isc.getValueForKey(_1,_10,_1)}
}
}
if(_7==null&&!_2)_7=_1;return _7}
,isc.A.$43f=function isc_SelectItem__checkForDisplayFieldValue(_1,_2){var _3=false;if(this.multiple){if(!isc.isAn.Array(_1)){isc.logWarn("newValue is unexpectedly "+(_1==null?"null":"not an array ("+isc.Log.echo(_1)+") ")+" for SelectItem "+this.ID+". Wrapping in array");_1=[_1]}
for(var i=0,_5=_1.getLength();!_3&&i<_5;++i){_3=(this.$17b(_1[i],true)!=null)}
}else{_3=(this.$17b(_1,true)!=null)}
if(_3)return;if(this.$43j){this.$43k=true;return}
this.invokeSuper(isc.SelectItem,"$43f",_1)}
,isc.A.$127i=function isc_SelectItem__fetchMissingValueInProgress(_1,_2){var _3;if(_2!==_3&&_1&&this.$43d&&isc.propertyDefined(this.$43d,_2))
{return false}
if(this.$43k&&_1){return true}
return this.Super("$127i",arguments)}
,isc.A.getClientPickListData=function isc_SelectItem_getClientPickListData(){if(this.$192)return this.$192;var _1=isc.PickList.optionsFromValueMap(this),_2=this.getValueFieldName();var _3=this.$128m(true);if(_3){if(this.separateSpecialValues){this.updateSpecialValues(_3)}else{if(this.multiple){for(var i=0;i<_3.length;i++){_3[i]=isc.addProperties(_3[i],{canSelect:false})}
}
_1.addListAt(_3,0)}
}
var _5=this.getValue();if(_5!=null&&!isc.isAn.Array(_5)){if(this.addUnknownValues!=false&&_1.find(_2,_5)==null&&(!_3||_3.find("value",_5)==null))
{var _6={};_6[_2]=_5;if(this.displayField){_6[this.getDisplayFieldName()]=_5}
_1.addAt(_6,0)}
}
if(this.isSelectOther){var _7={},_8={};_7[_2]=this.separatorValue;_8[_2]=this.otherValue;_1.addListAt([_7,_8],_1.length)}
this.$192=_1;return _1}
,isc.A.updateDisplayValueMap=function isc_SelectItem_updateDisplayValueMap(_1){this.Super("updateDisplayValueMap",arguments);if(this.$128n&&this.$847){var _2=this.getDisplayFieldName();if(_2){var _3=this.$847,_4=this.getValueFieldName(),_5=this.$128n,_6=false
;for(var i=0;i<_5.length;i++){var _8=_5[i],_9=_8[_4],_10=_3.find(_4,_9)
;if(this.multiple&&!this.separateSpecialValues){_8=isc.addProperties(_8,{canSelect:false})}
if(_10!=null){_8[_2]=_10[_2];_6=true}
}
if(_6&&this.separateSpecialValues){if(this.separateValuesList)this.separateValuesList.markForRedraw()}
}
}
}
,isc.A.formatPickListValue=function isc_SelectItem_formatPickListValue(_1,_2,_3){if(this.isSelectOther&&(_2==this.getValueFieldName())){if(_1==this.otherValue)return this.otherTitle;if(_1==this.separatorValue)return this.separatorTitle}
var _4=this.pickList.getField(_2);if(_4&&_4.$720){return this.$17c(_1)}
return _1}
,isc.A.pickValue=function isc_SelectItem_pickValue(_1){var _2;if(this.dataSetType=="tree"&&this.pickList&&this.pickList.selection){_2=this.pickList.selection.lastSelectionItem}
if(this.isSelectOther){if(this.getSelectOtherValue(_1))return}
this.changeToValue(_1,(this.changeOnValueChange&&this.fireChangeOnSelect!=false),_2
)}
,isc.A.getPickListPosition=function isc_SelectItem_getPickListPosition(){var _1=this.getPageTop(),_2=_1+this.getHeight(),_3=this.getPageLeft(),_4=isc.Page.getScrollTop(),_5=isc.Page.getHeight()+_4;var _6;if(!this.pickList.isDrawn()){var _7=this.pickList.data;if(_7==null||_7.getLength()==0){_6=this.emptyPickListHeight}else{_6=Math.min((_7.getLength()*this.pickList.cellHeight)+(this.pickList.showHeader?this.pickList.headerHeight:0)+(this.pickList.showFilterEditor?this.pickList.filterEditorHeight:0),this.pickListHeight)}
}else{_6=this.pickList.getVisibleHeight()}
if(_2+_6>_5){_2=Math.max(_4,(_1-_6))}
if(this.containerWidget.isRTL()){_3+=this.getVisibleWidth();_3-=this.pickList.getVisibleWidth()}
return[_3,_2]}
);isc.evalBoundary;isc.B.push(isc.A.updateValueMap=function isc_SelectItem_updateValueMap(_1){this.Super("updateValueMap",arguments);if(this.$958)return;if(this.$192)delete this.$192;var _2=false;if(this.hasPickList()&&(!this.getOptionDataSource()||(this.pickList.getDataSource()!=this.getOptionDataSource())))
{if(this.pickList.isVisible()&&this.pickList.isDrawn()){this.hidePicker();_2=true}
delete this.pickList.formItem}
var _3=this.getValue(),_4=this.$190(_3);if(_3!=_4){this.setValue(_4)}else{this.$952(this.$1416(_4),_4)}
if(_2)this.showPicker()}
,isc.A.hasPickList=function isc_SelectItem_hasPickList(){return(this.pickList&&!this.pickList.destroyed&&this.pickList.formItem==this)}
,isc.A.pickListVisible=function isc_SelectItem_pickListVisible(){return(this.hasPickList()&&this.pickList.isDrawn()&&this.pickList.isVisible())}
,isc.A.cleared=function isc_SelectItem_cleared(){var _1=this.Super("cleared",arguments);if(this.pickListVisible())this.pickList.hide();return _1}
,isc.A.filterComplete=function isc_SelectItem_filterComplete(){var _1=this.$128m(true);if(_1){if(this.specialValues&&this.separateSpecialValues){this.updateSpecialValues(_1)}else{var _2=this.pickList.getOriginalData();if(isc.isA.ResultSet(_2)){var _3=_2.addSpecialValueRecords(this.getValueFieldName(),this.getDisplayFieldName(),_1);if(_3){if(this.pickListVisible())this.pickList.markForRedraw()}
}
}
}
var _4=isc.PickList.getPrototype().filterComplete;_4.apply(this,arguments)}
);isc.B._maxIndex=isc.C+71;isc.ClassFactory.mixInInterface("SelectItem","PickList");isc.SelectItem.registerStringMethods({dataArrived:"startRow,endRow,data",getPickListFilterCriteria:""})}else{isc.Log.logWarn("Source for standard SelectItem class included in this module, but required related class (ListGrid) is not loaded. This can occur if the Forms module is loaded without the Grids module. SelectItem class will be defined as a subclass of NativeSelectItem.","moduleDependencies");isc.ClassFactory.defineClass("SelectItem","NativeSelectItem")}
isc.defineClass("CycleItem","FormItem");isc.A=isc.CycleItem.getPrototype();isc.A.canSelectText=false;isc.A.canFocus=true;isc.A.iconVAlign="middle";isc.A=isc.CycleItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.handleKeyPress=function isc_CycleItem_handleKeyPress(){var _1=isc.EH.getKey();var _2=this.isReadOnly();if(!_2&&_1=="Space"){this.advanceValue();return false}
return this.Super("handleKeyPress",arguments)}
,isc.A.handleClick=function isc_CycleItem_handleClick(){if(this.isDisabled()||this.isReadOnly())return;if(!this.hasFocus)this.focusInItem();this.advanceValue()}
,isc.A.handleDoubleClick=function isc_CycleItem_handleDoubleClick(){if(this.isDisabled()||this.isReadOnly())return;this.advanceValue()}
,isc.A.advanceValue=function isc_CycleItem_advanceValue(){var _1=this.getValueMap(),_2=isc.isAn.Array(_1),_3;if(_1==null||(_3=(_2?_1:isc.getKeys(_1))).length<2)
{this.logInfo("CycleItem is non interactive as there are no options for this item.");return}
var _4=this.getValue(),_5=_3.indexOf(_4);if(_5<0){var _6;if(_4===_6)_4=false;if(_3.length==2&&!!_3[0]!=!!_3[1])
{if(_2){_5=(!!_4==!!_1[0]?0:1)}else{_5=(!!_1[_4]==!!_1[_3[0]]?0:1)}
}else{if(_2){for(_5=0;_5<_3.length;++_5){if(_4==_1[_5]){break}
}
}else{for(_5=0;_5<_3.length;++_5){if(_1[_4]==_1[_3[_5]]){break}
}
}
_5=Math.min(_5,_3.length-1)}
_4=_3[_5]}
var _7=(_5+1)%_3.length;var _8=_3[_7];if(!this.compareValues(_8,this._value)){var _9=this.mapValueToDisplay(_8);this.setElementValue(_9,_8);if(isc.Canvas.ariaEnabled())this.setAriaState("checked",!!(_2?_8:_1[_8]));this.$10y(_8)}
}
,isc.A.setElementReadOnly=function isc_CycleItem_setElementReadOnly(_1){this.$176(!_1&&!this.isDisabled())}
);isc.B._maxIndex=isc.C+5;isc.defineClass("CheckboxItem","CycleItem");isc.addGlobal("BooleanItem",isc.CheckboxItem);isc.A=isc.CheckboxItem;isc.A.trueFalseValueMap=[true,false];isc.A.trueFalseNullValueMap=[true,false,null];isc.A=isc.CheckboxItem.getPrototype();isc.A.defaultType="boolean";isc.A.textBoxStyle="labelAnchor";isc.A.width=150;isc.A.showLabel=true;isc.A.height=20;isc.A.requiredTitlePrefix="<b>";isc.A.requiredTitleSuffix="</b>";isc.A.valueIconLeftPadding=4;isc.A.valueIconRightPadding=3;isc.A.showValueIconOver=true;isc.A.showValueIconFocused=true;isc.A.showValueIconFocusedAsOver=true;isc.A.showValueIconDown=true;isc.A.showValueIconDisabled=true;isc.A.showValueIconError=false;isc.A.checkedImage="[SKINIMG]/DynamicForm/checked.gif";isc.A.uncheckedImage="[SKINIMG]/DynamicForm/unchecked.gif";isc.A.partialSelectedImage="[SKINIMG]/DynamicForm/partialcheck.gif";isc.A.unsetImage="[SKINIMG]/DynamicForm/unsetcheck.gif";isc.A.checkedDescription="checked";isc.A.uncheckedDescription="unchecked";isc.A.partialSelectedDescription="partially selected";isc.A.unsetDescription="unset";isc.A.valueIconWidth=13;isc.A.valueIconHeight=13;isc.A=isc.CheckboxItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.allowEmptyValue=false;isc.A.$18q="true";isc.A.$18r="false";isc.A.emptyValueKey="**NULL**";isc.A.applyHeightToTextBox=false;isc.A.sizeToCheckboxImage=true;isc.B.push(isc.A.getValueMap=function isc_CheckboxItem_getValueMap(){if(this.$20b)return this.$20b;var _1=this.Super("getValueMap",arguments);if(_1!=null){var _2=false,_3=isc.isAn.Object(_1);if(isc.isAn.Array(_1)){_3=false;if(_1.length!=2){_1=null}else{var _4=_1.indexOf(this.$18r);if(_4!=-1)_1[_4]=false;var _5=_1.indexOf(this.$18q);if(_5!=-1)_1[_5]=true;if(!((_1[0]&&!_1[1])||(!_1[0]&&_1[1]))){this.logInfo("Checkbox item created with valueMap:"+_1+"which has no explicit true/false display values. Mapping the first value to true and the second to false.");var _6={};_6[_1[0]]=true;_6[_1[1]]=false;this.valueMap=_1=_6;_3=true}else{_2=true}
}
}
if(_3){var _7=[],_8=[],_9;for(var _10 in _1){if(_7.length==2){_9=true;break}
var _11=_1[_10];if(_10==this.$18r)_10=false;else if(_10==this.$18q)_10=true;if(_11==this.$18r){_11=_1[_10]=false}else if(_11==this.$18q){_11=_1[_10]=true}
_8[_8.length]=_10;_7[_7.length]=_11}
if(_7.length!=2)_9=true;if(!_9){if((_7[0]&&!_7[1])||(!_7[0]&&_7[1])){}else if((_8[0]&&!_8[1])||(!_8[0]&&_8[1])){_1=_8}else _9=true}
if(_9)_1=null}else if(!_2){_1=null}
}
if(_1&&this.allowEmptyValue){if(_2)_1.add(null);else _1[this.emptyValueKey]=null}
return(this.$20b=_1||(this.allowEmptyValue?isc.CheckboxItem.trueFalseNullValueMap
:isc.CheckboxItem.trueFalseValueMap))}
,isc.A.$17d=function isc_CheckboxItem__unmapKey(){var _1=this.Super("$17d",arguments);if(_1==this.emptyValueKey)_1=null;return _1}
,isc.A.setValueMap=function isc_CheckboxItem_setValueMap(){this.$20b=null;return this.Super("setValueMap",arguments)}
,isc.A.init=function isc_CheckboxItem_init(_1,_2,_3,_4){this.invokeSuper(isc.CheckboxItem,"init",_1,_2,_3,_4);if(this.showValueIconOnly==null)this.showValueIconOnly=!this.showLabel;if(this.textAlign==null&&this.align!=null){this.textAlign=this.align}
var _5=this.booleanBaseStyle;if(_5!=null){this.$161b=_5+"True";this.$161c=_5+"False";this.$161d=_5+"Partial";this.$161e=_5+"Unset"}
var _6=this.printBooleanBaseStyle;if(_6!=null){this.$163j=_6+"True";this.$163k=_6+"False";this.$163l=_6+"Partial";this.$163m=_6+"Unset"}else if(_5!=null){this.$163j=this.$161b;this.$163k=this.$161c;this.$163l=this.$161d;this.$163m=this.$161e}
}
,isc.A.setShowLabel=function isc_CheckboxItem_setShowLabel(_1){this.showLabel=_1;this.showValueIconOnly=!_1;if(this.isDrawn())this.redraw()}
,isc.A.getTextBoxWidth=function isc_CheckboxItem_getTextBoxWidth(){if(this.labelAsTitle){var _1=this.$186i();_1+=this.getPickerIconHSpace();return _1}
return this.Super("getTextBoxWidth",arguments)}
,isc.A.mapValueToDisplay=function isc_CheckboxItem_mapValueToDisplay(_1,_2,_3,_4){if(this.labelAsTitle)return isc.emptyString;var _5=this.$236p(this.getTitle());var _6=this.form;if((this.required||this.$11m)&&_6&&_6.hiliteRequiredFields){_5=this.requiredTitlePrefix+_5+this.requiredTitleSuffix}
return _5}
,isc.A.$161f=function isc_CheckboxItem__mapValue(_1,_2,_3,_4,_5){var _6=this.getValueMap();if(!isc.isAn.Array(_6)&&isc.isAn.Object(_6))_1=_6[_1];if(_1||(_1==null&&this.showNullAsTrue))return _2;else if(_1===false)return _3;else if(_1==null&&this.showNullAsTrueIf){var _7=this.form?this.form.getValues():null;if(_7&&_7[this.showNullAsTrueIf]){return _2}else{return _3}
}else{if(this.showUnsetImage!=null){return this.showUnsetImage?_5:_3}
return this.allowEmptyValue?_5:_3}
}
,isc.A.advanceValue=function isc_CheckboxItem_advanceValue(){var _1=this.getValue();if(_1==null&&this.showNullAsTrue){this._value=true}
return this.Super("advanceValue",arguments)}
,isc.A.$1605=function isc_CheckboxItem__getDisplayValueForOldValueHover(_1){return this.$161f(_1,this.checkedDescription,this.uncheckedDescription,this.partialSelectedDescription,this.unsetDescription)}
,isc.A.getValueIcon=function isc_CheckboxItem_getValueIcon(_1){return this.$161f(_1,this.checkedImage,this.uncheckedImage,this.partialSelectedImage,this.unsetImage)}
,isc.A.getValueIconStyle=function isc_CheckboxItem_getValueIconStyle(_1){if(this.booleanBaseStyle==null)return null;return this.$161f(_1,this.$161b,this.$161c,this.$161d,this.$161e)}
,isc.A.getPrintValueIcon=function isc_CheckboxItem_getPrintValueIcon(_1){return this.$161f(_1,this.printCheckedImage||this.checkedImage,this.printUncheckedImage||this.uncheckedImage,this.printPartialSelectedImage||this.partialSelectedImage,this.printUnsetImage||this.unsetImage)}
,isc.A.getPrintValueIconStyle=function isc_CheckboxItem_getPrintValueIconStyle(_1){if(this.printBooleanBaseStyle==null&&this.booleanBaseStyle==null){return null}
return this.$161f(_1,this.$163j,this.$163k,this.$163l,this.$163m)}
,isc.A.willWriteTitleInline=function isc_CheckboxItem_willWriteTitleInline(){return!this.labelAsTitle}
,isc.A.$15s=function isc_CheckboxItem__writeOuterTable(){return true}
,isc.A.$157g=function isc_CheckboxItem__shouldVerticallyCenterTextBox(){return this.applyHeightToTextBox}
,isc.A.fitWidthToValueIcon=function isc_CheckboxItem_fitWidthToValueIcon(){return this.sizeToCheckboxImage}
,isc.A.$85m=function isc_CheckboxItem__shouldAllowExpressions(){return false}
,isc.A.getValueAsBoolean=function isc_CheckboxItem_getValueAsBoolean(){var _1,_2=this.getValue();if(_2===_1)return this.allowEmptyValue?null:(this.showNullAsTrue?true:false);else return isc.isA.Boolean(_2)?_2:null}
,isc.A.getMaxTitleSpace=function isc_CheckboxItem_getMaxTitleSpace(){var _1=this.$8m,_2=this.form&&this.form.getColumnWidths()
;if(!_1||!_2)return this.getVisibleWidth();return _2.sum(_1[0],_1[2])}
);isc.B._maxIndex=isc.C+21;isc.ClassFactory.defineClass("NativeCheckboxItem","FormItem");isc.A=isc.NativeCheckboxItem.getPrototype();isc.A.textBoxStyle="labelAnchor";isc.A.implementsPromptNatively=isc.screenReader;isc.A.$183="CHECKBOX";isc.A.$125=true;isc.A.showLabel=true;isc.A.$16b={onclick:isc.FormItem.$12y
};isc.A=isc.NativeCheckboxItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$20c=["<TABLE role='presentation' CELLSPACING=0 CELLPADDING=0 BORDER=0 ID='",,"' class='",,"'><TR>","<TD WIDTH=19 align=middle valign=center><INPUT TYPE=",," NAME=",," ID=",,,,,,," handleNativeEvents=false ",,,," TABINDEX=",," style='vertical-align:middle;margin:1px;",(isc.Browser.isMoz?" -moz-user-focus:":null),,"'></TD>",,"</TR></TABLE>"
];isc.A.$20d=["<TD CLASS='",,"' ALIGN=LEFT",,,,," style='"+isc.Canvas.$42a,,"'>",,"</TD>"
];isc.A.$20e=["<A HREF='javascript:void ",,".boxTitleClick()' ONMOUSEOVER='window.status = \"",,"\"; return true' ONMOUSEOUT='window.status = \"\"; return true' CLASS='",,"' title=\"",,"\">",,"</A>"
];isc.A.nativeWidth=22;isc.B.push(isc.A.getInnerWidth=function isc_NativeCheckboxItem_getInnerWidth(_1,_2,_3,_4){if(!this.showLabel||this.showValueIconOnly){return this.nativeWidth}
return this.invokeSuper(isc.NativeCheckboxItem,"getInnerWidth",_1,_2,_3,_4)}
,isc.A.getElementHTML=function isc_NativeCheckboxItem_getElementHTML(_1){var _2=this.form.getID(),_3=this.getItemID(),_4=this.$20c,_5=this.getAnchorTitle()
;_4[1]=this.$qs("checkboxTable");_4[3]=this.getTextBoxStyle();_4[6]=this.$183;_4[8]=this.getElementName();_4[10]=this.getDataElementId();_4[11]=this.$155();if(this.value!=null){_4[12]=" VALUE='";_4[13]=this.value;_4[14]="'";if(this.containerWidget&&this.containerWidget.isPrinting){if(_1==this.value)_4[14]+=" CHECKED='true'"}
}else{_4[12]=null;_4[13]=null;_4[14]=null}
if(this.isDisabled()||this.isReadOnly())_4[15]=" DISABLED";else _4[15]=null;if(this.implementsPromptNatively){if(this.prompt!=null){_4[17]=" TITLE='";_4[18]=this.prompt;_4[19]="'"}else{_4[17]=_4[18]=_4[19]=null}
}
var _6=this.$154();_4[21]=_6;if(isc.Browser.isMoz){_4[24]=(_6>0?"normal;":"ignore;")}
if(this.showLabel&&!this.showValueIconOnly){var _7=this.getElementWidth(),_8=this.getInnerHeight();if(isc.isA.Number(_7))_7=Math.max(20,_7-20);if(isc.Browser.isSafari&&!this.renderAsDisabled()&&(isc.Browser.isChrome?isc.Browser.safariVersion<535:isc.Browser.safariVersion<534.5))
{var _9=this.$20e;_9[1]=_3;_9[3]=this.prompt;_9[5]=this.getTextBoxStyle();_9[7]=this.prompt;_9[9]=_5;_5=_9.join(isc.emptyString)}
var _10=this.$20d;_10[1]=this.getTextBoxStyle();if(_7!=null){_10[3]=" WIDTH=";_10[4]=_7}else{_10[3]=null;_10[4]=null}
if(_8!=null){_10[5]=" HEIGHT=";_10[6]=_8}else{_10[5]=null;_10[6]=null}
if(this.wrap==false){_10[8]=this.$136}else{_10[8]=null}
_10[10]=_5;_4[26]=_10.join(isc.emptyString)}else{_4[26]=null}
return _4.join(isc.emptyString)}
,isc.A.getOuterElement=function isc_NativeCheckboxItem_getOuterElement(_1,_2,_3){if(!this.isDrawn())return null;if(!this.$15s(this.$158)&&!this.showPickerIcon){var _4=this.getCheckboxTableElement();if(_4==null){_4=this.getDataElement()}
return _4}
return this.invokeSuper(isc.NativeCheckboxItem,"getOuterElement",_1,_2,_3)}
,isc.A.getCheckboxTableElement=function isc_NativeCheckboxItem_getCheckboxTableElement(){var _1=this.$qs("checkboxTable");return isc.Element.get(_1)}
,isc.A.willWriteTitleInline=function isc_NativeCheckboxItem_willWriteTitleInline(){return true}
,isc.A.getAnchorTitle=function isc_NativeCheckboxItem_getAnchorTitle(_1,_2,_3,_4){return this.$236p(this.getTitle())}
,isc.A.setElementValue=function isc_NativeCheckboxItem_setElementValue(_1){var _2=this.getDataElement();if(!_2)return null;return _2.checked=(_1&&_1!="false")}
,isc.A.getElementValue=function isc_NativeCheckboxItem_getElementValue(){var _1=this.getDataElement();if(!_1)return null;return(_1.checked==true)}
,isc.A.boxTitleClick=function isc_NativeCheckboxItem_boxTitleClick(){var _1=this.getDataElement();if(_1)_1.checked=!_1.checked;this.form.elementChanged(this.getItemID())}
,isc.A.setElementReadOnly=function isc_NativeCheckboxItem_setElementReadOnly(_1){var _2=this.isDisabled()||_1;this.$176(!_2)}
,isc.A.updateState=function isc_NativeCheckboxItem_updateState(){this.Super("updateState",arguments);var _1=this.getCheckboxTableElement();if(_1){var _2=this.getTextBoxStyle();if(this.showLabel&&!this.showValueIconOnly){var _3=_1.rows[0].cells[1];_3.className=_2}
}
}
);isc.B._maxIndex=isc.C+11;isc.ClassFactory.defineClass("HeaderItem","FormItem");isc.A=isc.HeaderItem.getPrototype();isc.A.shouldSaveValue=false;isc.A.showPending=false;isc.A.defaultValue="Header";isc.A.height=20;isc.A.showTitle=false;isc.A.textBoxStyle="headerItem";isc.A.canSelectText=true;isc.A.colSpan="*";isc.A.startRow=true;isc.A.endRow=true;isc.A.applyAlignToText=true;isc.A.emptyDisplayValue="&nbsp;";isc.defineClass("SectionItem","CanvasItem");isc.A=isc.SectionItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.shouldSaveValue=false;isc.A.defaultValue="Section Header";isc.A.sectionVisible=true;isc.A.sectionExpanded=true;isc.A.sectionHeaderClass="SectionHeader";isc.A.canCollapse=true;isc.A.autoDestroy=true;isc.A.showTitle=false;isc.A.startRow=true;isc.A.endRow=true;isc.A.colSpan="*";isc.A.width="*";isc.A.height=20;isc.A.readOnlyDisplay="readOnly";isc.B.push(isc.A.renderAsDisabled=function isc_SectionItem_renderAsDisabled(){return(this.isDisabled()||(this.canEdit==false&&this.getReadOnlyDisplay()=="disabled"))}
,isc.A.isReadOnly=function isc_SectionItem_isReadOnly(){return this.renderAsDisabled()}
);isc.B._maxIndex=isc.C+2;isc.addGlobal("GroupItem",isc.SectionItem);isc.A=isc.SectionItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_SectionItem_init(){if(this.sectionVisible==false)this.sectionExpanded=false;this.Super("init",arguments)}
,isc.A.$18y=function isc_SectionItem__createCanvas(){var _1=isc.ClassFactory.getClass(this.sectionHeaderClass,true),_2={autoDraw:false,section:this,title:this.value!=null?this.value:this.defaultValue,expanded:this.sectionExpanded,layout:this,height:this.height,canCollapse:this.canCollapse,canDrag:false,canHover:this.canHover,getCurrentCursor:function(){if(this.canvasItem&&this.canvasItem.cursor!=null)return this.canvasItem.cursor;return this.canCollapse==false?isc.Canvas.DEFAULT:isc.Canvas.HAND}
};if(this.baseStyle!=null)_2.baseStyle=this.baseStyle;if(this.printStyleName!=null)_2.printStyleName=this.printStyleName;isc.addProperties(_2,this.canvasDefaults,this.canvasProperties);var _3=_1.create(_2);this.canvas=_3;this.Super("$18y",arguments)}
,isc.A.isExpanded=function isc_SectionItem_isExpanded(){return this.sectionExpanded==true?true:false}
,isc.A.setValue=function isc_SectionItem_setValue(_1){this.Super("setValue",arguments);if(this.canvas)this.canvas.setTitle(this.getValue())}
,isc.A.setHeight=function isc_SectionItem_setHeight(_1){this.Super("setHeight",arguments);if(this.editingOn){this.canvas.setHeight(_1);this.$197l=true}
}
,isc.A.sectionHeaderClick=function isc_SectionItem_sectionHeaderClick(){this.cellClick();return false}
,isc.A.getDragResizeTarget=function isc_SectionItem_getDragResizeTarget(_1){return null}
,isc.A.cellClick=function isc_SectionItem_cellClick(){if(!this.canCollapse)return;if(this.sectionExpanded){this.collapseSection()}else{this.expandSection()}
}
,isc.A.expandSection=function isc_SectionItem_expandSection(){this.form.$100(this);this.$20f();if(this.itemIds==null){this.logWarn("sectionItem defined with no items or itemIds");return}
for(var i=0;i<this.itemIds.length;i++){var _2=this.itemIds[i],_3=this.form.getItem(_2);if(_3==null){this.logWarn("expandSection: no such item: "+_2);continue}
if(_3.showIf==null&&_3.$20g!=null)_3.showIf=_3.$20g;_3.show(true)}
this.canvas.setExpanded(true);this.sectionExpanded=true;this.form.$10m=true}
,isc.A.$20f=function isc_SectionItem__createItems(){if(this.items!=null&&!this.$20h){this.form.addItems(this.items,this.form.items.indexOf(this)+1);this.itemIds=[];for(var i=0;i<this.items.length;i++){this.itemIds[i]=this.items[i].getFieldName();if(this.itemIds[i]==null){this.logWarn("unable to include item:"+this.items[i]+" with no name in section")}
}
this.$20h=true}
}
,isc.A.addItem=function isc_SectionItem_addItem(_1,_2){this.itemIds=this.itemIds||[];var _3=this.form.items.indexOf(this),_4=(_2==null?_3+1+this.itemIds.length:_3+1+_2);this.form.addItems(_1,_4);this.itemIds.add(_1.name)}
,isc.A.removeItem=function isc_SectionItem_removeItem(_1){var _2=(isc.isA.Object(_1)?_1.name:_1);this.itemIds.remove(_2);this.form.removeItems(_1)}
,isc.A.getItem=function isc_SectionItem_getItem(_1){return this.form.getItem(_1)}
,isc.A.collapseSection=function isc_SectionItem_collapseSection(){this.form.$101(this);if(this.itemIds==null){if(this.items==null||this.$20h){this.logWarn("collapseSection with no sectionItem.itemIds");return}
}else{for(var i=0;i<this.itemIds.length;i++){var _2=this.itemIds[i],_3=this.form.getItem(_2);if(_3==null){this.logWarn("collapseSection: no such item: "+_2);continue}
if(_3.showIf!=null)_3.$20g=_3.showIf;_3.hide()}
}
this.canvas.setExpanded(false);this.sectionExpanded=false;this.form.$10m=true}
,isc.A.$85m=function isc_SectionItem__shouldAllowExpressions(){return false}
);isc.B._maxIndex=isc.C+15;isc.ClassFactory.defineClass("HiddenItem","FormItem");isc.A=isc.HiddenItem.getPrototype();isc.A.showTitle=false;isc.A.cellStyle=null;isc.A.width=0;isc.A.height=0;isc.A.colSpan=0;isc.A.rowSpan=0;isc.A.$125=true;isc.A.canFocus=false;isc.A.shouldPrint=false;isc.A.fetchMissingValues=false;isc.A=isc.HiddenItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getInnerHTML=function isc_HiddenItem_getInnerHTML(_1){var _2=isc.StringBuffer.concat("<INPUT ID='",this.getDataElementId(),"' TYPE=HIDDEN NAME=",this.getElementName(),">"
);return _2.toString()}
,isc.A.getRowSpan=function isc_HiddenItem_getRowSpan(){return 0}
,isc.A.getColSpan=function isc_HiddenItem_getColSpan(){return 0}
,isc.A.shouldShowTitle=function isc_HiddenItem_shouldShowTitle(){return false}
,isc.A.getErrorHTML=function isc_HiddenItem_getErrorHTML(_1){this.logError("Error in hidden field '"+this.getFieldName()+"':\r  "+_1);return null}
,isc.A.isStartRow=function isc_HiddenItem_isStartRow(){return false}
,isc.A.isEndRow=function isc_HiddenItem_isEndRow(){return false}
);isc.B._maxIndex=isc.C+7;isc.ClassFactory.defineClass("StaticTextItem","FormItem");isc.A=isc.StaticTextItem.getPrototype();isc.A.height=null;isc.A.applyHeightToTextBox=false;isc.A.applyAlignToText=true;isc.A.wrap=true;isc.A.clipValue=false;isc.A.textBoxStyle="staticTextItem";isc.A.canSelectText=true;isc.A.redrawOnShowIcon=false;isc.A.useShortDateFormat=false;isc.A.canEscapeHTML=true;isc.A.escapeHTML=null;isc.A.emptyDisplayValue="&nbsp;";isc.A=isc.StaticTextItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.$1618=function isc_StaticTextItem__getClipValue(){return!!this.clipValue||this.$1617()}
,isc.A.$kk=function isc_StaticTextItem__canFocus(){if(this.canFocus!=null)return this.canFocus;return isc.screenReader}
);isc.B._maxIndex=isc.C+2;isc.ClassFactory.defineClass("LinkItem","TextItem");isc.A=isc.LinkItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.disableIconsOnReadOnly=false;isc.A.wrap=false;isc.A.clipValue=false;isc.A.iconVAlign="center";isc.A.applyHeightToTextBox=null;isc.A.canEdit=false;isc.B.push(isc.A.shouldApplyStaticTypeFormat=function isc_LinkItem_shouldApplyStaticTypeFormat(){return!this.canEdit}
);isc.B._maxIndex=isc.C+1;isc.A=isc.LinkItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$14g=["<DIV ID='",,"' "+isc.DynamicForm.$89+"='",,,"' CLASS='",,"' STYLE='",,"'>",,"</DIV>"
];isc.A.inactiveEditorLinkDisabled=true;isc.A.$1465=[" onclick='if(window.",null,") return ",null,null,null,isc.DynamicForm.$9a,"='",isc.DynamicForm.$9c,"'",null
];isc.A.$1466="javascript";isc.A.$1467="javascript:void";isc.A.$1468=".$94a(event); ";isc.A.$1469="else {if (event.preventDefault != null) event.preventDefault(); return false}' ";isc.A.$147a=".$30i(event);' ";isc.A.$12a="link";isc.B.push(isc.A.$15m=function isc_LinkItem__writeOutFocusProxy(){return(this.isReadOnly()?false
:this.Super("$15m",arguments))}
,isc.A.$20i=function isc_LinkItem__getLinkElement(){if(!this.isReadOnly()||!this.isDrawn())return null;return(isc.Element.get(this.$qs(this.$12a)))}
,isc.A.getFocusElement=function isc_LinkItem_getFocusElement(){return(this.isReadOnly()?this.$20i()
:this.Super("getFocusElement",arguments))}
,isc.A.hasDataElement=function isc_LinkItem_hasDataElement(){return!this.isReadOnly()}
,isc.A.$kk=function isc_LinkItem__canFocus(){if(this.isReadOnly()){return this.getValue()!=null||this.target=="javascript"}else{return this.Super("$kk",arguments)}
}
,isc.A.getTextBoxStyle=function isc_LinkItem_getTextBoxStyle(){if(!this.isReadOnly())return this.Super("getTextBoxStyle",arguments);if(this.$68y()&&this.printTextBoxStyle){return this.$15x(this.printTextBoxStyle)}
var _1=this.getReadOnlyTextBoxStyle();return(_1?this.$15x(_1):null)}
,isc.A.$94a=function isc_LinkItem__inactiveLinkClicked(_1){if(!this.inactiveEditorLinkDisabled){return this.$30i(_1)}
if(!isc.Browser.isIE){_1.preventDefault()}
return false}
,isc.A.$30i=function isc_LinkItem__linkClicked(_1){var _2=(this.destroyed||!this.isDrawn()||!this.isVisible()||this.renderAsDisabled()
);if(!_2){_2=isc.EH.targetIsMasked(this.containerWidget);if(_2&&(this.form!=this.containerWidget)){_2=isc.EH.targetIsMasked(this.form)}
}
if(!_2&&this.target=="javascript"){_2=true;this.handleClick()}
if(_2){if(!isc.Browser.isIE){_1.preventDefault()}
return false}
return true}
,isc.A.getReadOnlyHTML=function isc_LinkItem_getReadOnlyHTML(_1){var _2=this.getLinkHTML(_1);var _3=this.$14g;_3[1]=this.$15g();_3[3]=this.getID();_3[6]=this.getReadOnlyTextBoxStyle();_3[8]=this.getTextBoxCSS(_1);_3[10]=_2;return _3.join(isc.emptyString)}
,isc.A.updateDisabled=function isc_LinkItem_updateDisabled(){this.Super("updateDisabled",arguments);this.redraw()}
,isc.A.getLinkHTML=function isc_LinkItem_getLinkHTML(_1){var _2=this.$xq(this._value);if(this.showValueIconOnly)return _2;if(this.showInputElement==false)return"";if(_1!=null)_1=isc.iscToLocaleString(_1);var _3=this.linkTitle;if(_1==null)_1=isc.emptyString;if(_3==null)_3=_1;if(_3!=""||_1!=""){var _4=this.target,_5=(_4===this.$1466);if(_5){_1=this.$1467}
var _6=this.$1465;_6[3]=_6[1]=this.getID();if(this.isInactiveHTML()){_6[4]=this.$1468;_6[5]=this.$1469}else{_6[4]=this.$147a;_6[5]=null}
var _7="";if(isc.Browser.isMobileWebkit){if(_5){_7+="-webkit-touch-callout:none;"
}else{_7+="-webkit-touch-callout:default;"
}
}
var _8=this.getTextBoxStyle(),_9=this.getTextBoxHeight("a"),_10=this.isRTL(),_11=_10?this.$156l:this.$156j,_12=isc.Element.$tr(_8)+_11,_13=_10?this.$156j:this.$156l,_14=isc.Element.$ts(_8)+_13
;if(!_9)_9=this.getPixelHeight(true);if(this.$157f()){_7+="position:relative;height:"+_9+"px;line-height:"+_9+"px;"}else{if(_10)_7+="padding-right:"+_14+"px;";else _7+="padding-left:"+_12+"px;"}
_6[10]=" style='"+_7+"'";var _15=_6.join(isc.emptyString);if(this.linkTextClass)_15+=" class='"+this.linkTextClass+"'";if(!this.renderAsDisabled()){_1=isc.Canvas.linkHTML(_1,_3,_4,this.$qs(this.$12a),this.getGlobalTabIndex(),this.accessKey,_15)}else{_1="<span style='text-decoration: underline;'>"+_3+"</span>"}
}
if(_2!=null){_1=_2+_1}
return _1}
,isc.A.setElementValue=function isc_LinkItem_setElementValue(_1,_2){if(!this.isDrawn())return;if(!this.isReadOnly())return this.Super("setElementValue",arguments);if(this.hasFocus)this.blurItem();var _3=this.$15h();if(_3){_3.innerHTML=this.getLinkHTML(_1);this.$159()}
}
,isc.A.setLinkTitle=function isc_LinkItem_setLinkTitle(_1){this.linkTitle=_1;this.redraw()}
,isc.A.setElementReadOnly=function isc_LinkItem_setElementReadOnly(_1){this.redraw()}
,isc.A.$872=function isc_LinkItem__canFocusInTextBox(){if(this.renderAsDisabled())return false;return this.Super("$872",arguments)}
,isc.A.$157f=function isc_LinkItem__needTextBoxTable(){return true}
,isc.A.shouldApplyHeightToTextBox=function isc_LinkItem_shouldApplyHeightToTextBox(){if(this.applyHeightToTextBox!=null)return this.applyHeightToTextBox;if(this.renderAsStatic())return!!this.clipStaticValue;if(this.canEdit!=null)return this.canEdit;return this.Super("shouldApplyHeightToTextBox",arguments)}
);isc.B._maxIndex=isc.C+17;isc.defineClass("PasswordItem","TextItem");isc.A=isc.PasswordItem;isc.A.$1158="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";isc.A=isc.PasswordItem.getPrototype();isc.A.$183="PASSWORD";isc.A.showClippedValueOnHover=false;isc.A=isc.PasswordItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.valueHoverHTML=function isc_PasswordItem_valueHoverHTML(){var _1=this.getElementValue();if(_1==null)_1="";var _2=isc.PasswordItem.$1158;while(_2.length<_1.length)isc.PasswordItem.$1158=_2+=_2;return _2.substring(0,_1.length)}
);isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("RadioGroupItem","ContainerItem");isc.A=isc.RadioGroupItem.getPrototype();isc.A.itemHeight=20;isc.A.vertical=true;isc.A.fillHorizontalSpace=false;isc.A.prompt=null;isc.A.textBoxStyle="labelAnchor";isc.A.labelStyle=null;isc.A.writeOutLabelTag=false;isc.A.useNativeRadioItems=true;isc.A.allowEmptyValue=false;isc.A.checkboxItemDefaults={type:"checkbox",showLabel:true,width:1,showValueIconDown:false,showValueIconDisabled:true,showValueIconOver:true,showValueIconFocused:true,showValueIconError:false,checkedImage:"sprite:cssClass:radioTrue;size:25,25",uncheckedImage:"sprite:cssClass:radioFalse;size:25,25",unsetImage:"sprite:cssClass:radioFalse;size:25,25",change:function(_1,_2,_3,_4){if(!this.parentItem.allowEmptyValue&&_2._value)return false},changed:function(_1,_2,_3){this.parentItem.checkboxChanged(this.value)},$161f:function(_1,_2,_3,_4,_5){if(this.parentItem.useNativeRadioItems==false&&isc.isA.Boolean(_1)){var _6=this.Super("$161f",arguments);return _6}
if(_1==this.value)return _2;return _3}
};isc.A=isc.RadioGroupItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$145e={Arrow_Left:true,Arrow_Right:true,Arrow_Up:true,Arrow_Down:true
};isc.B.push(isc.A.init=function isc_RadioGroupItem_init(){if(this.disabledValues!=null){this.$821={};for(var i=0;i<this.disabledValues.length;i++){var _2=this.disabledValues[i];this.$821[_2]=true}
}
return this.Super("init",arguments)}
,isc.A.setTextBoxStyle=function isc_RadioGroupItem_setTextBoxStyle(_1){this.textBoxStyle=_1;var _2=this.items;if(_2!=null){for(var i=0,_4=_2.length;i<_4;++i){var _5=_2[i];var _6=_5.textBoxStyle;_5.textBoxStyle=_1;if(_6!=_1)_5.updateState()}
}
}
,isc.A.$1609=function isc_RadioGroupItem__updatePendingStatuses(){var _1=this.$161p()&&this.pendingStatus;var _2=this.itemForValue(this._value);if(_2!=null){_2.setFixedPendingStatus(_1)}
}
,isc.A.$11d=function isc_RadioGroupItem__useHiddenDataElement(){return false}
,isc.A.setItems=function isc_RadioGroupItem_setItems(){var _1=isc.SimpleType.inheritsFrom(this.getType(),"boolean");if(_1)this.initBooleanValueMap();var _2=this.getValueMap();if(!this.itemCache)this.itemCache={};var _3=[];if(isc.isAn.Array(_2)){for(var i=0;i<_2.length;i++){var _5=_2[i];_3.add(this.$20k(_5,_5))}
}else{var _6=isc.getKeys(_2);for(var i=0;i<_6.length;i++){var _5=_6[i];var _7=_2[_5];if(_1&&!isc.isA.Boolean(_5)){if(isc.isA.String(_5))_5=_5.toLowerCase();if(_5=="false")_5=false;else if(_5=="true")_5=true;else if(_6.length==2)_5=(i==0)}
_3.add(this.$20k(_7,_5))}
}
this.$1989=true;return this.Super("setItems",[_3])}
,isc.A.$kk=function isc_RadioGroupItem__canFocus(){if(!this.items){if(this.editingOn&&this.editProxy&&this.editProxy.$206h){return true}
return false}
for(var i=0;i<this.items.length;i++){if(this.items[i].$kk()){return true}
}
if(this.editingOn&&this.editProxy&&this.editProxy.$206h){return true}
return false}
,isc.A.focusInItem=function isc_RadioGroupItem_focusInItem(){if(!this.isVisible()||!this.$kk())return;for(var i=0;i<this.items.length;i++){if(this.items[i].$kk()){this.items[i].focusInItem();break}
}
if(this.editingOn&&this.editProxy&&this.editProxy.$206h){delete this.editProxy.$206h;this.editProxy.delayCall("startInlineEditing")}
}
,isc.A.redrawn=function isc_RadioGroupItem_redrawn(){this.Super("redrawn",arguments);if(this.$1989){delete this.$1989;var _1=this._value!=null?this._value:this.value;this.setValue(_1)}
}
,isc.A.$20k=function isc_RadioGroupItem__getRadioItem(_1,_2){var _3=(this.$161p()&&this.pendingStatus);var _4=this.itemCache[_2+"|"+_1];if(_4){var _5=_4._value;if(isc.isA.String(_2))_5+="";if(_2!=_5){delete _4._value;delete _4.$105}
delete _4.hasFocus;delete _4.disabled;delete _4.$146y;_4.$8l=this.vertical;_4.setFixedPendingStatus(_3&&_2==this._value)}else{var _6;if(this.itemPrompt){var _7=new RegExp("\\*","g");_6=this.itemPrompt.replace(_7,_1)}
var _8={name:"$540"+_2,_autoAssignedName:true,value:_2,getElementName:function(){return this.parentItem.getElementName()},title:_1,prompt:_6,height:this.itemHeight,$8l:this.vertical,fixedPendingStatus:_3&&_2==this._value,textBoxStyle:this.textBoxStyle,wrap:this.wrap,setDisabled:function(_11){this.parentItem.$822(this.value,_11);return this.Super("setDisabled",arguments)},shouldSaveValue:false,suppressItemChanged:true,$12z:function(){var _9=this.parentItem;if(!_9||!_9.editingOn){return this.Super("$12z",arguments)}
if(_9.$206i()){return false}
_9.$203s();_9.$203t=this.delayCall("$206j",[this.value],isc.EH.DOUBLE_CLICK_DELAY);return false},$206j:function(_2){var _9=this.parentItem;if(!_9.$206k()){_9.storeValue(_2,true)}
_9.$203s()}
};if(_2==this.value){_8._value=this.value}
if(this.useNativeRadioItems){isc.addProperties(_8,{type:"radio",textBoxStyle:this.labelStyle||this.textBoxStyle,updateValue:function(){this.parentItem.updatePreviousSelection(this.value);return this.Super("updateValue",arguments)}
})}else{isc.addProperties(_8,this.checkboxItemDefaults,this.checkboxItemProperties);if(this.customIconSize){_8.valueIconWidth=_8.valueIconHeight=this.customIconSize}
}
isc.addProperties(_8,this.itemProperties);var _10=this;if(!_8.itemHoverHTML&&this.valueHoverHTML){_8.itemHoverHTML=function(){return _10.valueHoverHTML(_2,_10,_10.form)}
}
_8.form=this.form;_4=this.itemCache[_2+"|"+_1]=isc.FormItemFactory.makeItem(_8)}
if(this.$821!=null&&this.$821[_2]!=null){_4.disabled=this.$821[_2]}
return _4}
,isc.A.getItemValue=function isc_RadioGroupItem_getItemValue(_1){var _2=_1.value;if(_2==this.getValue())return _2;return _1.unselectedValue}
,isc.A.itemForValue=function isc_RadioGroupItem_itemForValue(_1){return this["$540"+_1]}
,isc.A.setValueDisabled=function isc_RadioGroupItem_setValueDisabled(_1,_2){if(this.$821!=null&&this.$821[_1]==_2)return;var _3=this.itemForValue(_1);if(_3&&this.items.contains(_3)){_3.setDisabled(_2)}else{this.$822(_1,_2)}
}
,isc.A.$822=function isc_RadioGroupItem__itemDisabled(_1,_2){if(this.$821==null)this.$821={};this.$821[_1]=_2}
,isc.A.getTitleHTML=function isc_RadioGroupItem_getTitleHTML(){var _1=this.getTitle();return isc.SB.concat("<label id=",this.$1568(),">",_1,"</label>")}
,isc.A.getInnerHTML=function isc_RadioGroupItem_getInnerHTML(_1){this.setItems();return this.Super("getInnerHTML",arguments)}
,isc.A.$174w=function isc_RadioGroupItem__writeWidthAttribute(){if(this.writeWidthAttribute)return true;return this.fillHorizontalSpace}
,isc.A.$174z=function isc_RadioGroupItem__writeSizingDiv(){return!this.$174w()}
,isc.A.setElementReadOnly=function isc_RadioGroupItem_setElementReadOnly(_1){}
,isc.A.initBooleanValueMap=function isc_RadioGroupItem_initBooleanValueMap(){var _1=isc.SimpleType.inheritsFrom(this.getType(),"boolean");if(_1&&isc.isAn.Array(this.valueMap)&&this.valueMap.length==2){this.valueMap={"true":this.valueMap[0],"false":this.valueMap[1]}}
}
,isc.A.setValue=function isc_RadioGroupItem_setValue(_1){this.$17g=true;var _2=(this.valueMap==null)||(isc.isAn.Array(this.valueMap)?!this.valueMap.contains(_1)
:!isc.propertyDefined(this.valueMap,_1));if(_1==null||_2){_1=this.getDefaultValue()}
if(this.items!=null){var _3=this.itemForValue(_1);if(_3!=null){this.itemForValue(_1).setValue(_1);_3.setFixedPendingStatus(this.$161p()&&this.pendingStatus)}
var _4;if(this._value!=null&&this._value!=_1){_4=this.itemForValue(this._value)}else if(this.$17m){_4=this.itemForValue(this.$17n)}
if(_4!=null){_4.setValue(null);_4.setFixedPendingStatus(false)}
}
this.saveValue(_1)}
,isc.A.updatePreviousSelection=function isc_RadioGroupItem_updatePreviousSelection(_1){var _2=this.itemForValue(_1);_2.setFixedPendingStatus(this.$161p()&&this.pendingStatus);var _3=this.getValue();if(isc.isA.String(_1))_3+="";var _4;if(_3==null||_1==_3||(_4=this.itemForValue(_3))==null)
{return}
if(!this.useNativeRadioItems){_4.setValue(null)}else{_4.updateValue()}
_4.setFixedPendingStatus(false)}
,isc.A.updateValue=function isc_RadioGroupItem_updateValue(){var _1;for(var i=0;i<this.items.length;i++){_1=this.items[i].getValue();if(_1!=null){break}
}
if(_1==this._value){if(!this.allowEmptyValue)return;_1=undefined}
if(this.handleChange(_1,this._value)==false){return}
_1=this.$17n;if(_1===undefined){this.clearValue()}else{this.saveValue(_1);this.handleChanged(_1)}
}
,isc.A.checkboxChanged=function isc_RadioGroupItem_checkboxChanged(_1){var _2=_1==this._value;if(_2){if(!this.allowEmptyValue)return}
if(this.handleChange(_1,this._value)==false){return}
if(!_2){this.updatePreviousSelection(_1)}else{var _3=this.itemForValue(_1);_3.clearValue();_1=undefined}
this.saveValue(_1);this.handleChanged(_1)}
,isc.A.setValueMap=function isc_RadioGroupItem_setValueMap(_1){this.Super("setValueMap",arguments);this.redraw()}
,isc.A.setVertical=function isc_RadioGroupItem_setVertical(_1){this.vertical=_1;this.redraw()}
,isc.A.getHeight=function isc_RadioGroupItem_getHeight(){var _1=isc.isA.Number(this.cellPadding)?this.cellPadding:0;if(!this.vertical)return this.itemHeight+_1*2;var _2=this.getValueMap(),_3=0;if(isc.isAn.Array(_2)){_3=_2.length}else{for(var _4 in _2){_3++}
}
return _3*(this.itemHeight+_1*2)}
,isc.A.shouldStopKeyPressBubbling=function isc_RadioGroupItem_shouldStopKeyPressBubbling(_1,_2){if(this.$145e[_1])return true;return this.Super("shouldStopKeyPressBubbling",arguments)}
,isc.A.$203s=function isc_RadioGroupItem__clearPendingClickTimer(){if(this.$203t){isc.Timer.clear(this.$203t);delete this.$203t;delete this.$206l}
}
,isc.A.$206i=function isc_RadioGroupItem__isPendingClickTimer(){return(this.$203t!=null)}
,isc.A.$206m=function isc_RadioGroupItem__setProcessedDoubleClick(){if(this.$203t){this.$206l=true}
}
,isc.A.$206k=function isc_RadioGroupItem__getProcessedDoubleClick(){return this.$206l}
);isc.B._maxIndex=isc.C+31;isc.ClassFactory.defineClass("RadioItem","NativeCheckboxItem");isc.A=isc.RadioItem.getPrototype();isc.A.$183="RADIO";isc.A.value=true;isc.A.defaultValue=null;isc.A=isc.RadioItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.setElementValue=function isc_RadioItem_setElementValue(_1){var _2=this.getDataElement();if(!_2)return null;if(isc.isA.String(this.value))_1=(_1+"");return _2.checked=(this.value==_1)}
,isc.A.getElementValue=function isc_RadioItem_getElementValue(){var _1=this.getDataElement(),_2=this.value,_3=this.unselectedValue;if(!_1)return _3;return(_1.checked?_2:_3)}
,isc.A.boxTitleClick=function isc_RadioItem_boxTitleClick(){var _1=this.getDataElement();if(_1&&!_1.checked){_1.checked=true;this.form.elementChanged(this.getItemID())
}
}
,isc.A.mapValueToDisplay=function isc_RadioItem_mapValueToDisplay(_1){return _1}
,isc.A.mapDisplayToValue=function isc_RadioItem_mapDisplayToValue(_1){return _1}
,isc.A.setElementReadOnly=function isc_RadioItem_setElementReadOnly(_1){this.$176(!_1&&!this.isDisabled())}
);isc.B._maxIndex=isc.C+6;isc.ClassFactory.defineClass("ResetItem","ButtonItem");isc.A=isc.ResetItem.getPrototype();isc.A.title="Reset";isc.A=isc.ResetItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.handleClick=function isc_ResetItem_handleClick(){if(this.Super("handleClick",arguments)==false)return false;this.form.resetValues()}
);isc.B._maxIndex=isc.C+1;if(isc.ListGrid){isc.defineClass("NativeDateItem","TextItem");isc.A=isc.NativeDateItem.getPrototype();isc.A.ariaRole="range";isc.A.browserInputType="date";isc.A.textBoxStyle="nativeDateItem";isc.A.inFieldHintStyle="nativeDateItemInFieldHint";isc.A.showClippedValueOnHover=false;isc.A=isc.NativeDateItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$118w="wrapper";isc.A.$118x="hint";isc.A.operaForegroundColor="black";isc.B.push(isc.A.$118y=function isc_NativeDateItem__getWrapperElementId(){if(this.isInactiveHTML())return this.$qs(this.$118w);if(this.$118z==null){this.$118z=this.$qs(this.$118w,true)}
return this.$118z}
,isc.A.$1180=function isc_NativeDateItem__getHintElementId(){if(this.isInactiveHTML())return this.$qs(this.$118x);if(this.$1181==null){this.$1181=this.$qs(this.$118x,true)}
return this.$1181}
,isc.A.$1182=function isc_NativeDateItem__getInFieldHintElemStyle(){if(this.showDisabled&&this.renderAsDisabled())return this.inFieldHintStyle+"Disabled";return this.inFieldHintStyle}
,isc.A.getElementHTML=function isc_NativeDateItem_getElementHTML(_1,_2){if(!this.$712())return this.Super("getElementHTML",arguments);var _3=this.getHeight();return"<div id='"+this.$118y()+"' class='"+this.$15x(this.$118w)+"' style='display:inline-block;position:relative;height:"+_3+"px'>"+this.Super("getElementHTML",arguments)+"<span id='"+this.$1180()+"' class='"+this.$1182()+"' style='line-height:"+_3+"px'></span></div>"}
,isc.A.getElementStyleHTML=function isc_NativeDateItem_getElementStyleHTML(){var _1=this.Super("getElementStyleHTML",arguments);if(isc.Browser.isOpera){_1=_1.substring(0,_1.length-2)+";color:"+this.operaForegroundColor+_1.substring(_1.length-2)}
var _2=isc.DateUtil.getLogicalDateOnly(this.getStartDate()),_3=isc.DateUtil.getLogicalDateOnly(this.getEndDate());if(_2!=null)_1+="min='"+this.mapValueToDisplay(_2)+"' ";if(_3!=null)_1+="max='"+this.mapValueToDisplay(_3)+"' ";return _1}
,isc.A.getElementValue=function isc_NativeDateItem_getElementValue(){var _1=this.getDataElement(),_2;if(!_1||!(_2=_1.value))return null;return isc.DateUtil.createLogicalDate(parseInt(_2,10),parseInt(_2.substring(5),10)-1,parseInt(_2.substring(8),10))}
,isc.A.setElementValue=function isc_NativeDateItem_setElementValue(_1,_2){if(!this.isDrawn())return;var _3;if(_2===_3){_2=this._value}
var _4=this.getDataElement();if(_4!=null&&_1!=null){if(!_1.contains("-")){var _5=isc.DateUtil.parseInput(_1);if(isc.isA.Date(_5)){if(this.parentItem.browserInputType=="datetime"){_1=_5.toSerializeableDate().replace(" ","T")}else{_1=this.parentItem.getValue().toSchemaDate()}
}
}
_4.value=_1}
}
,isc.A.getStartDate=function isc_NativeDateItem_getStartDate(){var _1=this.startDate;if(_1==null||!isc.isA.Date(_1)){_1=isc.DateItem.DEFAULT_START_DATE}
return _1}
,isc.A.getEndDate=function isc_NativeDateItem_getEndDate(){var _1=this.endDate;if(_1==null||!isc.isA.Date(_1)){_1=isc.DateItem.DEFAULT_END_DATE}
return _1}
,isc.A.mapValueToDisplay=function isc_NativeDateItem_mapValueToDisplay(_1){if(isc.isA.Date(_1)){_1=isc.DateUtil.getLogicalDateOnly(_1);return _1.toSchemaDate()}
return _1}
,isc.A.$66t=function isc_NativeDateItem__showInFieldHint(){var _1=isc.Element.get(this.$1180());if(_1!=null){this.getDataElement().className=this.$66v();_1.className=this.$1182();var _2=this.getHint();_1.innerText=String.htmlStringToString(_2);this.$66u=true}
}
,isc.A.$66s=function isc_NativeDateItem__hideInFieldHint(_1){var _2=isc.Element.get(this.$1180());if(_2!=null){this.getDataElement().className=this.getTextBoxStyle();_2.className=this.$1182();_2.innerText=isc.emptyString;this.$66u=false}
}
,isc.A.updateState=function isc_NativeDateItem_updateState(){this.Super("updateState",arguments);if(this.$66u){var _1=isc.Element.get(this.$1180());if(_1!=null)_1.className=this.$1182()}
}
);isc.B._maxIndex=isc.C+13;isc.defineClass("NativeDateTimeItem","NativeDateItem");isc.A=isc.NativeDateTimeItem.getPrototype();isc.A.browserInputType="datetime-local";isc.A.textBoxStyle="nativeDatetimeItem";isc.A.inFieldHintStyle="nativeDatetimeItemInFieldHint";isc.A=isc.NativeDateTimeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getElementValue=function isc_NativeDateTimeItem_getElementValue(){var _1=this.getDataElement(),_2;if(!_1||!(_2=_1.value))return null;var _3=parseInt(_2,10),_4=parseInt(_2.substring(5),10)-1,_5=parseInt(_2.substring(8),10),h=parseInt(_2.substring(11),10),m=parseInt(_2.substring(14),10),s=(_2.length>=19?parseInt(_2.substring(17),10):0);return new Date(_3,_4,_5,h,m,s)}
,isc.A.mapDisplayToValue=function isc_NativeDateTimeItem_mapDisplayToValue(_1){if(isc.Time.$854&&isc.isA.Date(_1)){return isc.DateUtil.createDatetime(_1.getUTCFullYear(),_1.getUTCMonth(),_1.getUTCDate(),_1.getUTCHours(),_1.getUTCMinutes(),_1.getUTCSeconds(),_1.getUTCMilliseconds())}
return _1}
,isc.A.mapValueToDisplay=function isc_NativeDateTimeItem_mapValueToDisplay(_1){if(isc.isA.String(_1)){var _2=this.parentItem.parseDate(_1),_3=(_2?_2.toSerializeableDate():null)
;if(_3){return _3.substring(0,10)+"T"+_3.substring(11)}
}
if(isc.isA.Date(_1)){var _3=_1.toSerializeableDate();return _3.substring(0,10)+"T"+_3.substring(11)}
return _1}
);isc.B._maxIndex=isc.C+3;isc.NativeDatetimeItem=isc.NativeDateTimeItem;isc.defineClass("DateItem","ContainerItem");isc.A=isc.DateItem;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.mapCache={};isc.A.DAY_MONTH_YEAR="DMY";isc.A.MONTH_DAY_YEAR="MDY";isc.A.YEAR_MONTH_DAY="YMD";isc.A.DAY_MONTH="DM";isc.A.MONTH_DAY="MD";isc.A.YEAR_MONTH="YM";isc.A.MONTH_YEAR="MY";isc.A.DEFAULT_START_DATE=isc.DateUtil.createLogicalDate(isc.DateUtil.getNewDisplayDate().getYear()+1890,0,1);isc.A.DEFAULT_END_DATE=isc.DateUtil.createLogicalDate(isc.DateUtil.getNewDisplayDate().getYear()+1905,11,31);isc.A.DEFAULT_CENTURY_THRESHOLD=new Date().getFullYear()-2000+25;isc.A.chooserWidth=150;isc.A.chooserHeight=175;isc.B.push(isc.A.getChooserWidth=function isc_c_DateItem_getChooserWidth(){return(isc.DateChooser.getPrototype().width||isc.DateItem.chooserWidth)}
,isc.A.getChooserHeight=function isc_c_DateItem_getChooserHeight(){return(isc.DateChooser.getPrototype().height||isc.DateItem.chooserHeight)}
);isc.B._maxIndex=isc.C+2;isc.A=isc.DateItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.maskOverwriteMode=true;isc.A.defaultType="date";isc.A.textFieldDefaults={maskOverwriteMode:true,showTitle:false,name:"dateTextField",type:"text",changeOnBlur:true,width:"100%",$712:function(){return this.parentItem.$712()},$1564:function(){if(!this.parentItem.usePlaceholderForHint)return false;return this.$1560()},getHint:function(){if(this.$712())return this.parentItem.hint;return null},changeOnKeypress:true,changed:function(){this.$18j=true;this.isDirty=true},blur:function(){this.isDirty=false;if(this.parentItem)this.parentItem.updateValue()},shouldSaveValue:false,getTextBoxStyle:function(){var _1=this.parentItem;return _1&&!_1.$1188()
?_1.getTextItemTextBoxStyle()
:this.Super("getTextBoxStyle",arguments)},getTextBoxWidth:function(_1){var _2;if(this.parentItem)_2=this.parentItem.getTextBoxWidth(_1);else _2=this.Super("getTextBoxWidth",arguments);_2-=this.$156j+this.$156l;return _2},$887:true,getDefaultValue:function(){if(this.parentItem)return this.parentItem.getDefaultValue();return this.Super("getDefaultValue",arguments)}
};isc.A.textBoxStyle="textItem";isc.A.wrapHintText=false;isc.A.usePlaceholderForHint=true;isc.A.showItemTitles=false;isc.A.itemTitleOrientation="top";isc.A.itemTitleAlign="center";isc.A.daySelectorDefaults={name:"daySelector",title:"Day",prompt:"Choose a day",type:"select",valueMap:"this.parentItem.getDayOptions()",shouldSaveValue:false,updateValue:function(){this.Super("updateValue",arguments);this.parentItem.updateValue()},getErrorWidth:function(){return 0},suppressItemChanged:true
};isc.A.monthSelectorDefaults={name:"monthSelector",title:"Month",prompt:"Choose a month",type:"select",valueMap:"this.parentItem.getMonthOptions()",shouldSaveValue:false,updateValue:function(){this.Super("updateValue",arguments);this.parentItem.updateValue()},getErrorWidth:function(){return 0},suppressItemChanged:true,pickListHeight:1000
};isc.A.yearSelectorDefaults={name:"yearSelector",title:"Year",prompt:"Choose a year",type:"select",valueMap:"this.parentItem.getYearOptions()",shouldSaveValue:false,updateValue:function(){this.Super("updateValue",arguments);this.parentItem.updateValue()},getErrorWidth:function(){return 0},suppressItemChanged:true
};isc.A.width=150;isc.A.cellPadding=0;isc.A.useSharedPicker=true;isc.A.pickerConstructor="DateChooser";isc.A.pickerDefaults={border:"1px solid black;",showCancelButton:true,showTodayButton:true,autoHide:true,closeOnEscapeKeypress:true,hide:function(){this.Super("hide",arguments);if(this.callingFormItem){this.callingFormItem.checkForEditorExit()}
}
};isc.A.autoUseTextField=true;isc.A.textAlign=isc.Page.isRTL()?isc.Canvas.LEFT:isc.Canvas.RIGHT;isc.A.enforceDate=false;isc.A.enforceValueRange=false;isc.A.invalidDateStringMessage="Invalid date";isc.A.showPickerIcon=true;isc.A.pickerIconWidth=20;isc.A.pickerIconHeight=20;isc.A.pickerIconSrc="[SKIN]/DynamicForm/DatePicker_icon.gif";isc.A.pickerIconHSpace=3;isc.A.pickerIconPrompt="Show Date Chooser";isc.A.generateValidator=true;isc.A.centuryThreshold=isc.DateItem.DEFAULT_CENTURY_THRESHOLD;isc.A.use24HourTime=true;isc.A.showPickerTimeItem=true;isc.B.push(isc.A.$143=function isc_DateItem__sizeTextBoxAsContentBox(){return isc.Browser.isStrict}
,isc.A.getTextItemTextBoxStyle=function isc_DateItem_getTextItemTextBoxStyle(){if(this.textField==null)return this.getTextBoxStyle();if(this.$68y()&&this.printTextBoxStyle){return this.$15x(this.printTextBoxStyle,this.$1600)}
var _1=(this.getCanEdit()==false&&this.renderAsStatic()?this.getReadOnlyTextBoxStyle():this.textBoxStyle),_2=this.textField.$15x(_1,this.$13q)
;return _2}
,isc.A.getOperator=function isc_DateItem_getOperator(_1){if(!this.operator)return"equals";return this.operator}
,isc.A.$16f=function isc_DateItem__shouldShowIcon(_1,_2){if(_1&&_1.pickerIcon){if(this.$1188())return false;if(isc[this.pickerConstructor]==null){this.logWarn("Date Item pickerConstructor class '"+this.pickerConstructor+"' is not loaded. This property may have been modified incorrectly  or a required module may not be loaded. Suppressing the pickerIcon.");return false}
}
return this.Super("$16f",arguments)}
);isc.B._maxIndex=isc.C+4;isc.A=isc.DateItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$g4="date";isc.A.$68l="datetime";isc.A.$792="[01][0-9]";isc.A.$793="[0-3]#";isc.A.$794="####";isc.A.$73d="[0-2][0-9]:[0-6][0-9]";isc.A.$73r={"MDY":"toUSShortDate","DMY":"toEuropeanShortDate","YMD":"toJapanShortDate"
};isc.A.selectorPadding=2;isc.A.showChooserFiscalYearPicker=false;isc.A.showChooserWeekPicker=false
;isc.B.push(isc.A.init=function isc_DateItem_init(){this.shortMonthNames=isc.DateUtil.getShortMonthNames();if(this.useTextField==null)this.useTextField=this.useMask||false;else if(!this.useTextField&&this.showTime){this.logWarn("When showing the time component, useTextField must be true.");this.useTextField=true}
this.$2141=this.useTextField;if(this.autoUseTextField){if(!this.useTextField){if(!this.getCanEdit()&&this.renderAsStatic()){this.useTextField=true}
}
}
if(this.selectorFormat){if(!this.selectorFormat.toUpperCase||this.selectorFormat.length==0){this.selectorFormat=null}else{var _1=this.selectorFormat.toUpperCase();if(!_1.match("^[DMY]*$")){this.selectorFormat=null}
}
}
if(this.$2141){this.saveOnEnter=true;this.textFieldDefaults.readOnlyDisplay=this.readOnlyDisplay}
if(this.showTime&&!this.dateFormatter&&!this.timeFormatter){if(this.$180y()){if(this.use24HourTime){this.timeFormatter="toShort24HourTime"}else{this.timeFormatter="toShortPaddedTime"}
}
}
this.checkDateRangeValidator();this.$2337=true;var _2=this.Super("init",arguments);delete this.$2337;return _2}
,isc.A.$180y=function isc_DateItem__hasCustomUse24HourTimeFlag(){return this.getClass().getInstanceProperty("use24HourTime")!=this.use24HourTime}
,isc.A.$1609=function isc_DateItem__updatePendingStatuses(){var _1=this.$161p()&&this.pendingStatus;if(this.useTextField){var _2=this.textField;if(_2!=null)_2.setFixedPendingStatus(_1)}else{var _3=this.$160w(),_4;if(!isc.isA.Date(_3))_4=null;else if(_3.logicalDate)_4=_3;else _4=isc.DateUtil.getLogicalDateOnly(_3);var _5=this._value,_6;if(!isc.isA.Date(_5))_6=null;else{_6=_5}
var _7=this.daySelector;if(_7!=null){_7.setFixedPendingStatus(_1&&(_4==null||_6==null||_4.getDate()!=_6.getDate()))}
var _8=this.monthSelector;if(_8!=null){_8.setFixedPendingStatus(_1&&(_4==null||_6==null||_4.getMonth()!=_6.getMonth()))}
var _9=this.yearSelector;if(_9!=null){_9.setFixedPendingStatus(_1&&(_4==null||_6==null||_4.getFullYear()!=_6.getFullYear()))}
}
}
,isc.A.$207e=function isc_DateItem__mayShowHintInField(){return!!(this.useTextField&&this.showHint&&this.$2257()&&!(isc.Browser.isOpera&&this.$1189()))}
,isc.A.$712=function isc_DateItem__getShowHintInField(){return this.$207e()&&!!this.hint}
,isc.A.getHint=function isc_DateItem_getHint(){if(!this.showHint||!this.hint||this.$712())return null;return this.hint}
,isc.A.$1188=function isc_DateItem__useNativeInput(){var _1=this.getBrowserInputType();return this.useTextField&&(_1==this.$g4||_1==this.$68l)}
,isc.A.$1189=function isc_DateItem__useNativeDatetimeInput(){return this.useTextField&&this.getBrowserInputType()==this.$68l}
,isc.A.getSelectorFormat=function isc_DateItem_getSelectorFormat(){if(this.selectorFormat){return this.selectorFormat}else if(this.inputFormat&&isc.isA.String(this.inputFormat)){return this.inputFormat}else{var _1=isc.DateUtil.getInputFormat();if(isc.isA.String(_1))return _1;this.logInfo("DateItem selectorFormat unspecified - assuming US format");return"MDY"
}
}
,isc.A.getInputFormatMask=function isc_DateItem_getInputFormatMask(_1){var _2=this.maskDateSeparator||this.$79w();var _3;if(_1=="YMD"){_3=[this.$794,_2,this.$792,_2,this.$793]}else if(_1=="DMY"){_3=[this.$793,_2,this.$792,_2,this.$794]}else{_3=[this.$792,_2,this.$793,_2,this.$794]}
if(isc.isA.DateTimeItem(this)){_3.addList([" ",this.$73d])}
return _3.join("")}
,isc.A.$79w=function isc_DateItem__getDefaultDateSeparator(){return isc.DateUtil.getDefaultDateSeparator()}
,isc.A.$79x=function isc_DateItem__getDefaultDateSeparatorRegex(){var _1=this.$79w();return new RegExp(_1,"/g")}
,isc.A.setItems=function isc_DateItem_setItems(_1){var _2=isc.DateItem,_3=this.getSelectorFormat()
;if(_1!=null&&_1.length!=0){this.logWarn("setItems() called for dateItem with itemList:"+_1+" - ignoring, and making use of default date fields")}
_1=this.items=[];var _4={showOver:this.showOver};if(this.updateTextBoxOnOver!=null)_4.updateTextBoxOnOver=this.updateTextBoxOnOver;if(this.updateControlOnOver!=null)_4.updateControlOnOver=this.updateControlOnOver;if(this.useTextField){var _5={textAlign:this.textAlign,emptyDisplayValue:this.emptyDisplayValue,operator:this.operator,title:this.title
};var _6=isc.addProperties({},_4,this.textFieldDefaults,_2.TEXT_FIELD,this.textFieldProperties);if(_6.selectOnClick==null)_6.selectOnClick=this.selectOnClick;if(_6.selectOnFocus==null)_6.selectOnFocus=this.selectOnFocus;var _7={};if(this.$1188()){_7.textAlign=this.isRTL()?isc.Canvas.RIGHT:isc.Canvas.LEFT;_7.editorType=(this.$1189()
?isc.NativeDateTimeItem
:isc.NativeDateItem);_7.startDate=this.getStartDate(true);_7.endDate=this.getEndDate(true)}else if(this.useMask){var _8=this.getInputFormat();if(!_8)_8="MDY";var _9=this.getInputFormatMask(_8);_7.mask=_9;_7.maskSaveLiterals=true;if(_6.maskOverwriteMode==null)_6.maskOverwriteMode=true;if(this.inputFormat){this.dateFormatter=this.$73r[_8]}
}
var _10=isc.addProperties({},_5,_6,_7);_10.name="dateTextField";if(this.textField){_10.height=this.textField.height}else if(this.height&&(!this.textFieldProperties||!this.textFieldProperties.height))
{_10.height=this.getInnerHeight()}
_1.add(_10);var _11;this.daySelector=this.yearSelector=this.monthSelector=_11}else{for(var i=0;i<_3.length;i++){var _13=_3.charAt(i);var _14,_15,_16,_17=null;if(_13=="D"){var _14=isc.addProperties({},_4,this.daySelectorDefaults,_2.DAY_SELECTOR,this.daySelectorProperties);if(!_14.width){if(this.$1770==null){this.$1770=isc.SelectItem.$336p(this.getDayOptions(),_14)}
_14.width=this.$1770;_14.minWidth=this.$1770}
_14.name="daySelector";_17=_14;_1.add(_14)}else if(_13=="M"){var _15=isc.addProperties({},_4,this.monthSelectorDefaults,_2.MONTH_SELECTOR,this.monthSelectorProperties);if(!_15.width){if(this.$1771==null){this.$1771=isc.SelectItem.$336p(isc.getValues(this.getMonthOptions()),_15)}
_15.width=this.$1771;_15.minWidth=this.$1771}
_15.name="monthSelector";_17=_15;_1.add(_15)}else if(_13=="Y"){var _16=isc.addProperties({},_4,this.yearSelectorDefaults,_2.YEAR_SELECTOR,this.yearSelectorProperties);if(!_16.width){if(this.$1772==null){this.$1772=isc.SelectItem.$336p(this.getYearOptions(),_16)}
_16.width=this.$1772;_16.minWidth=this.$1772}
_16.name="yearSelector";_17=_16;_1.add(_16)}
if(_17){if(_1.length>1){if(_17.cssText==null){_17.cssText="padding-left:3px;"}
}
}
}
}
this.Super("setItems",[_1],arguments);if(this.autoUseTextField&&!this.$2141){if(this._value)this.setValue(this._value)}
if(this.$161p())this.$1609();if(this.useTextField){this.textField=this.dateTextField}
}
,isc.A.updateState=function isc_DateItem_updateState(){var _1=this.Super("updateState",arguments);if(this.autoUseTextField)this.checkStateForUseTextField();return _1}
,isc.A.redrawn=function isc_DateItem_redrawn(){var _1=this.Super("redrawn",arguments);if(this.autoUseTextField)this.checkStateForUseTextField();return _1}
,isc.A.checkStateForUseTextField=function isc_DateItem_checkStateForUseTextField(){var _1=false;if(this.getCanEdit()){if(this.useTextField!=this.$2141){this.setProperty("useTextField",this.$2141);_1=true}
}else{if(!this.useTextField){if(this.renderAsStatic()){this.setProperty("useTextField",true);_1=true}
}else{if(this.useTextField!=this.$2141&&!this.renderAsStatic()){this.setProperty("useTextField",this.$2141);_1=true}
}
}
return _1}
,isc.A.getInnerWidth=function isc_DateItem_getInnerWidth(){if(this.useTextField){return this.Super("getInnerWidth",arguments)}
var _1=0,_2=0;if(this.daySelector){_2+=1;_1+=this.daySelector.width}
if(this.monthSelector){_2+=1;_1+=this.monthSelector.width}
if(this.yearSelector){_2+=1;_1+=this.yearSelector.width}
if(this.showPickerIcon)_1+=this.getPickerIconWidth();if(_2>0)_1+=(_2-1)*this.selectorPadding;return _1}
,isc.A.getEnteredValue=function isc_DateItem_getEnteredValue(){if(this.useTextField&&this.textField!=null){return this.textField.getEnteredValue()}
return this.getValue()}
,isc.A.setElementReadOnly=function isc_DateItem_setElementReadOnly(_1){}
,isc.A.setValue=function isc_DateItem_setValue(_1){this.$17g=true;var _2=false;if(_1==null){var _3=this.getDefaultValue();var _4;if(_3!==_4){_1=_3;_2=true}
}
if(this.enforceValueRange){if(isc.DateUtil.compareLogicalDates(_1,this.getStartDate())>0||isc.DateUtil.compareLogicalDates(_1,this.getEndDate())<0)
{_1=this.getDefaultValue()}
}
var _5=isc.isA.Date(_1)&&isc.isA.Date(this._value)?(this.useLogicalDates()?isc.DateUtil.compareLogicalDates(_1,this._value)==0
:isc.DateUtil.compareDates(_1,this._value)==0):_1==this._value;var _6,_7;if(isc.is.emptyString(_1))_1=null;if(_1==null){_7=true;_6=_1;if(this.$119h)delete this.$119h}else{_6=this.parseDate(_1);if(_6==null){_7=true;_6=_1}
}
if(_7){var _8;if(!this.useTextField){_8=true}else if(this.enforceDate&&_1!=null){var _9=this.dateTextField;_8=!this.$20m||!_9||(_9.getValue()!=_1)}
if(_8){this.logInfo("dateItem.setValue(): invalid date passed: '"+_1+"'.  Ignoring this value. Non date values are only supported  for dateItems where useTextField is true and enforceDate is false.");return false}
}
if(!_7&&this.$20m){delete this.$20m;this.clearErrors();this.redraw()}
var _10=this.getStartDate(),_11=this.getEndDate()
;if(isc.isA.Date(_6)&&!isc.DateUtil.dateInRange(_6,_10,_11)){var _12="Current value ("+_6.toShortDate()+") is outside of the valid range for this item (";if(_10&&!_11)_12+="after "+_11.toShortDate();else if(!_10&&_11)_12+="before "+_11.toShortDate()
else _12+=_10.toShortDate()+" to "+_11.toShortDate();_12+=").  See DateItem.startDate and endDate to change the valid date-range."
this.logWarn(_12)}
this.saveValue(_6,_2);this.$20l=true;if(this.useTextField){if(this.dateTextField){if(_5&&this.dateTextField.isDirty){this.dateTextField.setValue(this.dateTextField._value)}else{var _13=_7?_6:this.formatDate(_6);this.dateTextField.setValue(_13);delete this.dateTextField.isDirty}
}
}else{if(this.daySelector)this.daySelector.setValue(_6.getDate());if(this.monthSelector)this.monthSelector.setValue(_6.getMonth());if(this.yearSelector)this.yearSelector.setValue(_6.getFullYear())}
delete this.$20l;this.checkDateRangeValidator();if(this.$161p())this.$1609();return true}
,isc.A.$17e=function isc_DateItem__setHiddenDataElementValue(_1){var _2=this.$15b();if(_2!=null){if(isc.isA.Date(_1))_2.value=_1.toDBDate();else _2.value=_1}
}
,isc.A.getCellHeight=function isc_DateItem_getCellHeight(){var _1=this.Super("getCellHeight",arguments);if(isc.Browser.isIE&&this.useTextField&&isc.isA.Number(_1))_1+=2;return _1}
,isc.A.elementChanged=function isc_DateItem_elementChanged(){return}
,isc.A.getCriteriaValue=function isc_DateItem_getCriteriaValue(){return this.parseDate(this.getValue())}
,isc.A.updateValue=function isc_DateItem_updateValue(){if(this.$20l)return;this.$20l=true;var _1;if(this.useTextField){this.dateTextField.updateValue();var _2=this.dateTextField.getValue(),_3=this.$1188(),_4;var _5=_2;if(_2==isc.emptyString||_2==null)_1=null;else if(_3){_1=_2;_5=this.formatDate(_2)}else{_1=this.parseDate(_2);if(_1==null){_4=true;_1=_2}else{_5=this.formatDate(_1);if(_2!=_5){this.dateTextField.setValue(_5)}
}
}
if(this._value==_1||(isc.isA.Date(this._value)&&(this.formatDate(this._value)==_5)))
{delete this.$20l;return}
if(!_3&&this.enforceDate){if(this.$20m&&!_4){delete this.$20m;this.clearErrors();this.redraw()}else if(_4){this.logWarn("Invalid date string entered in date text field :"+_1);if(!this.$20m){this.$20m=true;this.setError(this.invalidDateStringMessage);this.redraw()}
}
}
}else{_1=(this._value||this.getDefaultValue());_1=_1.duplicate();var _6=_1.getDate(),_7=this.daySelector,_8=_1.getMonth(),_9=this.monthSelector,_10=_1.getFullYear(),_11=this.yearSelector;if(_7!=null){_6=this.daySelector.getValue();if(_6==null)_6=_1.getDate()}
_1.setDate(1);if(_11!=null){_10=_11.getValue()
if(_10!=null)_1.setFullYear(_10);else _10=_1.getFullYear()}
if(_9!=null){_8=_9.getValue();if(_8!=null)_1.setMonth(_8);else _8=_1.getMonth()}
_1.setDate(_6);if(_8!=_1.getMonth()){_6=_6-_1.getDate();if(_7!=null)_7.setValue(_6);_1.setMonth(_8);_1.setDate(_6)}
if(isc.SimpleType.inheritsFrom(this.type,"datetime")){var _12=this.$119h?this.$119h:isc.isA.Date(this._value)?this._value:null;if(_12){var _13=isc.DateUtil.getLogicalTimeOnly(_12);_1=isc.DateUtil.combineLogicalDateAndTime(_1,_13)}
}
}
delete this.$20l;return this.storeValue(_1)}
,isc.A.saveValue=function isc_DateItem_saveValue(_1){if(isc.isA.Date(_1)&&_1.logicalDate==null&&_1.logicalTime==null){if(this.useLogicalDates())_1.logicalDate=true}
var _2=this.Super("saveValue",arguments);if(this.$161p())this.$1609();return _2}
,isc.A.resetValue=function isc_DateItem_resetValue(){var _1=this.form.$10s[this.getFieldName()];if(isc.isA.Date(_1)&&isc.isA.Date(this._value))
_1=this._value.setTime(_1.getTime());this.setValue(_1)}
,isc.A.getItemValue=function isc_DateItem_getItemValue(_1,_2){if(isc.isAn.emptyObject(_2))_2=null;var _3=isc.isA.Date(_2),_4=isc.isA.Date(this._value);if(_2==this._value||(_3&&_4&&(isc.DateUtil.compareDates(_2,this._value)==0)))
{return _1.getValue()}
if(_1==this.dateTextField)return _3?this.formatDate(_2):_2;else if(_1==this.daySelector)return _3?_2.getDate():null;else if(_1==this.monthSelector)return _3?_2.getMonth():null;else if(_1==this.yearSelector)return _3?_2.getFullYear():null}
,isc.A.getDisplayValue=function isc_DateItem_getDisplayValue(){var _1=this.getValue();if(!isc.isA.Date(_1))return this.Super("getDisplayValue",arguments);if(this.useTextField||!this.items){return this.formatDate(_1)}else{if(!this.isDrawn()){if(this.yearSelector)this.yearSelector.setValue(_1.getFullYear());if(this.monthSelector)this.monthSelector.setValue(_1.getMonth());if(this.daySelector)this.daySelector.setValue(_1.getDate())}
return this.items.callMethod("getDisplayValue").join(" ")}
}
,isc.A.getDefaultValue=function isc_DateItem_getDefaultValue(){var _1=null;if(this.$2337&&this.name){if(this.form&&this.form.values&&this.form.values[this.name]){_1=this.form.values[this.name];if(this.enforceValueRange){if(isc.DateUtil.compareDates(_1,this.getStartDate())>0||isc.DateUtil.compareDates(_1,this.getEndDate())<0)
{_1=this.getStartDate().duplicate()}
}
return _1}
}
_1=this.Super("getDefaultValue",arguments);if(!isc.isA.Date(_1)){var _2=this.parseDate(_1);if(isc.isA.Date(_2))_1=_2;else if(!this.useTextField||this.enforceDate){var _3;if(_1!=null){this.logWarn("Default DateItem value provided as:"+_1+". This is not recognized as a valid date - defaulting to a new date");_3=this.defaultValue==_1}
if(!this.useTextField)_1=this.$603();if(_1!=null&&isc.DateUtil.compareDates(_1,this.getStartDate())>0||isc.DateUtil.compareDates(_1,this.getEndDate())<0)
{_1=this.getStartDate().duplicate()}
if(_3)this.defaultValue=_1}
}
return _1}
,isc.A.$603=function isc_DateItem__getEmptyDate(){return isc.DateUtil.today()}
,isc.A.useLogicalDates=function isc_DateItem_useLogicalDates(){var _1=this.getType(),_2=isc.SimpleType.inheritsFrom(_1,"date"),_3=isc.SimpleType.inheritsFrom(_1,"datetime");return _1!=null&&_2&&!_3}
,isc.A.getStartDate=function isc_DateItem_getStartDate(_1){var _2=this.startDate;if(isc.isA.String(_2))_2=this.parseDate(this.startDate);if((_2==null&&!_1)||!isc.isA.Date(_2)){if(_2!=null){this.logWarn("startDate was not in valid date format - using default start date")}
_2=isc.DateItem.DEFAULT_START_DATE}
if(isc.SimpleType.inheritsFrom(this.type,"datetime")){return isc.DateUtil.adjustDate(_2,"-0D")}
return isc.DateUtil.createLogicalDate(_2)}
,isc.A.setStartDate=function isc_DateItem_setStartDate(_1){this.startDate=_1;var _2=this.dateTextField;if(_2&&this.$1188()){_1=this.getStartDate(true);_2.startDate=_1;var _3=_2.getDataElement();if(_1==null)_3.removeAttribute("min");else{_3.min=_2.mapValueToDisplay(_1)}
}
this.checkDateRangeValidator();this.updateValue()}
,isc.A.getEndDate=function isc_DateItem_getEndDate(_1){var _2=this.endDate;if(isc.isA.String(_2))_2=this.parseDate(this.endDate);if((_2==null&&!_1)||!isc.isA.Date(_2)){if(_2!=null){this.logWarn("endDate was not in valid date format - using default end date")}
_2=isc.DateItem.DEFAULT_END_DATE}
if(isc.SimpleType.inheritsFrom(this.type,"datetime")){return isc.DateUtil.adjustDate(_2,"+0D")}
return isc.DateUtil.createLogicalDate(_2)}
,isc.A.setEndDate=function isc_DateItem_setEndDate(_1){this.endDate=_1;var _2=this.dateTextField;if(_2&&this.$1188()){_1=this.getEndDate(true);_2.endDate=_1;var _3=_2.getDataElement();if(_1==null)_3.removeAttribute("max");else{_3.max=_2.mapValueToDisplay(_1)}
}
this.checkDateRangeValidator();this.updateValue()}
,isc.A.$kk=function isc_DateItem__canFocus(){if(this.canFocus!=null)return this.canFocus;return true}
,isc.A.focusInItem=function isc_DateItem_focusInItem(){if(!this.isVisible())return;if(this.useTextField){if(this.dateTextField)this.dateTextField.focusInItem()}else{var _1=this.getSelectorFormat(),_2=_1.charAt(0)
;if(_2=="D"&&this.daySelector)this.daySelector.focusInItem();if(_2=="M"&&this.monthSelector)this.monthSelector.focusInItem();if(_2=="Y"&&this.yearSelector)this.yearSelector.focusInItem()}
}
,isc.A.setSelectionRange=function isc_DateItem_setSelectionRange(_1,_2){if(this.dateTextField)return this.dateTextField.setSelectionRange(_1,_2)}
,isc.A.getSelectionRange=function isc_DateItem_getSelectionRange(){if(this.dateTextField)return this.dateTextField.getSelectionRange()}
,isc.A.selectValue=function isc_DateItem_selectValue(){if(this.dateTextField)return this.dateTextField.selectValue()}
,isc.A.deselectValue=function isc_DateItem_deselectValue(_1){if(this.dateTextField)return this.dateTextField.deselectValue()
}
,isc.A.getDayOptions=function isc_DateItem_getDayOptions(){var _1=this.getStartDate(),_2=this.getEndDate();var _3=1,_4=31;if(_1.getYear()==_2.getYear()&&_1.getMonth()==_2.getMonth())
{_3=_1.getDate()
_4=_2.getDate()
}
var _5="day."+_3+"."+_4;if(isc.DateItem.mapCache[_5])return isc.DateItem.mapCache[_5];var _6=isc.DateItem.mapCache[_5]=[];for(var i=_3;i<=_4;i++)_6[i-_3]=i;return _6}
,isc.A.getMonthOptions=function isc_DateItem_getMonthOptions(){var _1=this.getStartDate(),_2=this.getEndDate();var _3=0,_4=11;if(_1.getYear()==_2.getYear()){_3=_1.getMonth()
_4=_2.getMonth()
}
var _5="month."+_3+"."+_4;if(isc.DateItem.mapCache[_5])return isc.DateItem.mapCache[_5];var _6=isc.DateItem.mapCache[_5]={};for(var i=_3;i<=_4;i++)_6[i]=this.shortMonthNames[i];return _6}
,isc.A.getYearOptions=function isc_DateItem_getYearOptions(){var _1=this.getStartDate().getFullYear(),_2=this.getEndDate().getFullYear();var _3="year."+_1+"."+_2;if(isc.DateItem.mapCache[_3])return isc.DateItem.mapCache[_3];var _4=isc.DateItem.mapCache[_3]=[];for(var i=_1;i<=_2;i++){_4[i-_1]=i}
return _4}
,isc.A.parseDate=function isc_DateItem_parseDate(_1,_2){if(isc.isA.Date(_1))return _1;if(this.parseEditorValue!=null){var _3=this.parseEditorValue(_1,this.form,this);return _3}
if(_2==null)_2=this.getInputFormat();var _4=this.useLogicalDates();var _5=isc.DateUtil.parseInput(_1,_2,this.centuryThreshold,true,!_4);return _5}
,isc.A.formatDate=function isc_DateItem_formatDate(_1){if(this.formatEditorValue!=null){var _2=this.form?this.form.values:{};return this.formatEditorValue(_1,_2,this.form,this)}
if(!isc.isA.Date(_1))return _1;if(this.format&&!this.getCanEdit()){return isc.DateUtil.format(_1,this.format)}
var _3=this.$45i(),_4=this.getType(),_5=isc.SimpleType.inheritsFrom(_4,"date"),_6=isc.SimpleType.inheritsFrom(_4,"datetime");if(this.showTime){if(this.$180y()&&!_3){var _7=this.timeFormatter||"toShortPaddedTime";var _8=_1.toShortDate()+" "+isc.Time.format(_1,_7);return _8}
return _1.toShortDatetime(_3,_6||!_5)}else{return _1.toShortDate(_3,_6||!_5)}
}
,isc.A.getInputFormat=function isc_DateItem_getInputFormat(){if(this.inputFormat)return this.inputFormat;var _1=this.$45i();if(_1){return isc.DateUtil.mapDisplayFormatToInputFormat(_1)}
return isc.DateUtil.getInputFormat()}
,isc.A.getPickerIcon=function isc_DateItem_getPickerIcon(_1,_2,_3,_4){var _5=this.invokeSuper(isc.DateItem,"getPickerIcon",_1,_2,_3,_4);if(_5.prompt==null)_5.prompt=this.pickerIconPrompt;return _5}
,isc.A.getFiscalCalendar=function isc_DateItem_getFiscalCalendar(){return this.fiscalCalendar||isc.DateUtil.getFiscalCalendar()}
,isc.A.setFiscalCalendar=function isc_DateItem_setFiscalCalendar(_1){this.fiscalCalendar=_1}
,isc.A.showPicker=function isc_DateItem_showPicker(){if(isc[this.pickerConstructor]==null){this.logWarn("Date Item pickerConstructor class '"+this.pickerConstructor+"' is not loaded. This property may have been modified incorrectly  or a required module may not be loaded. Refusing to show picker.");return}
if(!this.form.$10u)this.updateValue();var _1=isc.addProperties({showFiscalYearChooser:this.showChooserFiscalYearPicker,showWeekChooser:this.showChooserWeekPicker
},this.pickerDefaults,this.pickerProperties);var _2=this.shouldShowPickerTimeItem();if(!this.picker){if(this.useSharedPicker){var _3=isc.addProperties({},{fiscalCalendar:this.getFiscalCalendar(),showTimeItem:_2,use24HourTime:this.use24HourTime
},_1);this.picker=isc[this.pickerConstructor].getSharedDateChooser(_3,this.getType())}else{this.picker=isc[this.pickerConstructor].create(isc.addProperties({},_1,{_generated:true,autoHide:true,closeOnEscapeKeypress:true,fiscalCalendar:this.getFiscalCalendar(),showTimeItem:_2,use24HourTime:this.use24HourTime
},this.pickerProperties
)
)}
if(!this.picker.isDrawn()){this.picker.moveTo(null,-9999);this.picker.draw()}
}else{if(isc.getKeys(_1).length>0){this.picker.setProperties(_1)}
}
var _4=this.picker;var _5=_4.callingFormItem;if(_5!=this){if(_5)_5.ignore(_4,"dataChanged");this.observe(_4,"dataChanged","observer.pickerDataChanged(observed)");_4.callingFormItem=this;_4.callingForm=this.form;_4.locatorParent=this.form}
_4.startYear=this.getStartDate().getFullYear();_4.endYear=this.getEndDate().getFullYear();_4.fiscalCalendar=this.getFiscalCalendar();_4.showFiscalYearChooser=this.showChooserFiscalYearPicker;_4.showWeekChooser=this.showChooserWeekPicker;_4.showTimeItem=_2;_4.use24HourTime=this.use24HourTime;if(this.pickerTimeItemProperties){_4.timeItemProperties=isc.addProperties({},this.pickerTimeItemProperties)}
if(this.shouldShowPickerTimeItem()&&this.picker.timeLayout.visibility==isc.Canvas.HIDDEN){this.picker.timeLayout.show();_4.reflowNow()}else{_4.reflowNow();if(!this.shouldShowPickerTimeItem()&&this.picker.timeLayout.visibility!=isc.Canvas.HIDDEN)
this.picker.timeLayout.hide()}
var _6=this.Super("showPicker",arguments);if(_4.updateUI)_4.updateUI();return _6}
,isc.A.checkForEditorExit=function isc_DateItem_checkForEditorExit(_1,_2){if(_1){var _3=isc.EH.getFocusCanvas();if(this.picker!=null&&this.picker.contains(_3,true)){return}
}
return this.Super("checkForEditorExit",arguments)}
,isc.A.shouldShowPickerTimeItem=function isc_DateItem_shouldShowPickerTimeItem(){if(this.showPickerTimeItem==false)return false;return isc.SimpleType.inheritsFrom(this.type,"datetime")}
,isc.A.getPickerRect=function isc_DateItem_getPickerRect(){var _1=this.getPageLeft(),_2=this.getPageTop(),_3=isc.DateItem.getChooserWidth()+3,_4=isc.DateItem.getChooserHeight()+3
;_1+=Math.round((this.getVisibleWidth()-(this.getPickerIconWidth()/2))-
(_3/2));_2+=Math.round((this.getPickerIconHeight()/2)-(_4/2));return[_1,_2]}
,isc.A.pickerDataChanged=function isc_DateItem_pickerDataChanged(_1){var _2=_1.getData(),_3=isc.DateUtil.getLogicalDateOnly(_2),_4=_3.getFullYear(),_5=_3.getMonth(),_6=_3.getDate(),_7=_2.getTime()
;var _8=this.useLogicalDates();if(!_8){}
this.$20l=true;if(this.useTextField){var _9=this.formatDate(_2);this.dateTextField.setValue(_9)}else{var _10=this._value||this.getDefaultValue(),_11;if(this.yearSelector)this.yearSelector.setValue(_4);else{_10.setFullYear(_4);_11=true}
if(this.monthSelector)this.monthSelector.setValue(_5);else{_10.setMonth(_5-1);_11=true}
if(this.daySelector)this.daySelector.setValue(_6);else{_10.setDate(_6);_11=true}
if(isc.SimpleType.inheritsFrom(this.type,"datetime")){var _12=isc.DateUtil.getLogicalTimeOnly(_2);this.$119h=_12}
if(_11){this._value=_10}
}
this.$20l=false;this.updateValue();if(!this.hasFocus&&!isc.Browser.isMobile)this.focusInItem();if(this.useTextField){var _13=this.getErrors();if(_13&&_13.length>0){this.validate(true)}
}
if(this.validateOnExit||(this.form&&this.form.validateOnExit)){this.$84r=true}
}
,isc.A.setHint=function isc_DateItem_setHint(_1){if(this.useTextField&&this.$712()){this.dateTextField.setHint(_1)}else{this.Super("setHint",arguments)}
}
,isc.A.getPickerData=function isc_DateItem_getPickerData(){var _1=this.getValue();if(_1!=null){if(!isc.isA.Date(_1)){if(isc.isA.String(_1))_1=this.parseDate(_1);else _1=new Date(_1)}
if(isc.isA.Date(_1)&&!isNaN(_1.getTime()))return _1}
return this.getDefaultChooserDate()}
,isc.A.getDefaultChooserDate=function isc_DateItem_getDefaultChooserDate(){return this.defaultChooserDate}
,isc.A.$85m=function isc_DateItem__shouldAllowExpressions(){if(this.useTextField){return this.Super("$85m",arguments)}else{return false}
}
,isc.A.propertyChanged=function isc_DateItem_propertyChanged(_1){if(_1=="useTextField"||_1=="useMask"){this.setItems()}else if(_1=="startDate"||_1=="endDate"){this.checkDateRangeValidator()}
this.Super("propertyChanged",arguments)}
);isc.B._maxIndex=isc.C+61}
if(isc.ListGrid){isc.defineClass("DateTimeItem","DateItem");isc.A=isc.DateTimeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.useTextField=true;isc.A.showTime=true;isc.A.defaultType="datetime";isc.B.push(isc.A.shouldShowPickerTimeItem=function isc_DateTimeItem_shouldShowPickerTimeItem(){return this.showPickerTimeItem}
);isc.B._maxIndex=isc.C+1}
isc.ClassFactory.defineClass("SpacerItem","FormItem");isc.A=isc.SpacerItem.getPrototype();isc.A.shouldSaveValue=false;isc.A.showTitle=false;isc.A.width=20;isc.A.height=20;isc.A.showHint=false;isc.A.showIcons=false;isc.A=isc.SpacerItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getElementHTML=function isc_SpacerItem_getElementHTML(_1){return isc.Canvas.spacerHTML(this.width,this.height)}
,isc.A.shouldShowTitle=function isc_SpacerItem_shouldShowTitle(){return false}
);isc.B._maxIndex=isc.C+2;isc.ClassFactory.defineClass("RowSpacerItem","SpacerItem");isc.A=isc.RowSpacerItem.getPrototype();isc.A.showTitle=false;isc.A.colSpan="*";isc.A.startRow=true;isc.A.endRow=true;isc.A.width=20;isc.A.height=20;isc.ClassFactory.defineClass("SubmitItem","ButtonItem");isc.A=isc.SubmitItem.getPrototype();isc.A.title="Submit";isc.A=isc.SubmitItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.handleClick=function isc_SubmitItem_handleClick(){if(this.Super("handleClick",arguments)==false)return false;this.form.submit();this.form.completeEditing()}
);isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("CancelItem","ButtonItem");isc.A=isc.CancelItem.getPrototype();isc.A.title="Cancel";isc.A=isc.CancelItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.handleClick=function isc_CancelItem_handleClick(){if(this.Super("handleClick",arguments)==false)return false;this.form.cancelEditing()}
);isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("TextAreaItem","FormItem");isc.A=isc.TextAreaItem;isc.A.OFF="OFF";isc.A.SOFT="SOFT";isc.A.VIRTUAL="SOFT";isc.A.ON="HARD";isc.A.HARD="HARD";isc.A.PHYSICAL="HARD";isc.A=isc.TextAreaItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.wrap=isc.TextAreaItem.VIRTUAL;isc.A.width=150;isc.A.height=100;isc.A.pickerIconHeight=20;isc.A.staticHeight=1;isc.A.textBoxStyle="textItem";isc.A.length=null;isc.A.enforceLength=false;isc.A.redrawOnShowIcon=false;isc.A.clipValue=true;isc.A.$125=true;isc.A.$15i=true;isc.A.emptyStringValue=null;isc.A.lineBreakValue="\n";isc.A.iconVAlign=isc.Canvas.TOP;isc.A.$16b={onmousedown:(isc.Browser.isIE?function(){var _1=this,_2=isc.DynamicForm._getItemInfoFromElement(_1),_3=_2.item;if(_3)_3.$179()}:null
)
};isc.A.supportsCutPasteEvents=true;isc.A.supportsSelectionRange=true;isc.A.usePlaceholderForHint=true;isc.A.printFullText=true;isc.A.showClippedValueOnHover=false;isc.B.push(isc.A.supportsValueDictation=function isc_TextAreaItem_supportsValueDictation(){return true}
,isc.A.getEnteredValue=function isc_TextAreaItem_getEnteredValue(){return this.getElementValue()}
);isc.B._maxIndex=isc.C+2;isc.A=isc.TextAreaItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.escapeHTML=true;isc.A.allowNativeResize=false;isc.A.minHeight=16;isc.A.supportsMultilineEntry=true;isc.A.applyStaticTypeFormat=false;isc.A.stopNavKeyPressBubbling=true;isc.A.stopCharacterKeyPressBubbling=true;isc.A.$145f="Page_Up";isc.A.$145g="Page_Down";isc.A.$10j="Enter";isc.A.isMultiLineEditor=true;isc.A.hasInternalNavigation=true;isc.B.push(isc.A.$207e=function isc_TextAreaItem__mayShowHintInField(){return!!(this.showHint&&this.$2257())}
,isc.A.$1564=function isc_TextAreaItem__getUsePlaceholderForHint(){if(!this.usePlaceholderForHint)return false;return this.$1560()}
,isc.A.$1560=function isc_TextAreaItem__supportsPlaceholderAttribute(){return isc.Browser.$1560}
,isc.A.getTextBoxCellCSS=function isc_TextAreaItem_getTextBoxCellCSS(){return this.$136}
,isc.A.$143=function isc_TextAreaItem__sizeTextBoxAsContentBox(){return isc.Browser.isStrict}
,isc.A.$145l=function isc_TextAreaItem__needHideUsingDisplayNone(){return isc.Browser.isTouch}
,isc.A.$429=function isc_TextAreaItem__willHandleInput(){return!isc.Browser.isIE}
,isc.A.setElementReadOnly=function isc_TextAreaItem_setElementReadOnly(_1){this.$86y(_1)}
,isc.A.getCanEscapeHTML=function isc_TextAreaItem_getCanEscapeHTML(){if((this.$68y()&&this.printFullText)||this.renderAsStatic()){return true}
return this.canEscapeHTML}
,isc.A.$156r=function isc_TextAreaItem__supportsInlineIcons(){if(this.$169p==null)return false;return true}
,isc.A.$16z=function isc_TextAreaItem__iconVisibilityChanged(){var _1=this.getDataElement();if(_1!=null&&this.$169t()){if(this.$169p==="absolutePositioning"){var _2=this.getTextBoxStyle(),_3=this.isRTL(),_4=(_3?this.$156l:this.$156j),_5=(_3?this.$156j:this.$156l),_6=isc.Element.$tr(_2)+_4,_7=isc.Element.$ts(_2)+_5,_8=_1.style;_8.paddingRight=_7+"px";_8.paddingLeft=_6+"px"}else{this.redraw("iconVisibilityChanged, 'divStyledAsDataElement' inline icons markup approach")}
}
this.Super("$16z",arguments)}
,isc.A.$1618=function isc_TextAreaItem__getClipValue(){if(this.$68y()&&this.printFullText)return false;return this.Super("$1618",arguments)}
,isc.A.getElementHTML=function isc_TextAreaItem_getElementHTML(_1,_2){var _3=this.form,_4=_3.getID(),_5=this.getItemID(),_6=isc.StringBuffer.create(),_7=this.$xq(_2);if(_7!=null)_6.append(_7);if(!this.showValueIconOnly&&this.showInputElement!=false){var _8=this.$68y(),_9=(_8&&this.printFullText)||this.renderAsStatic();if(_9){var _10=this.Super("getElementHTML",[_1.asHTML(),_2],arguments);return _10}else{var _11=this.$17h(),_12=this.autoCompleteKeywords!=null&&isc.isAn.Array(this.autoCompleteKeywords);_6.append("<TEXTAREA NAME=",this.getElementName()," ID=",this.getDataElementId(),this.$155(),this.getElementStyleHTML(_2),(this.isDisabled()?" DISABLED ":""),(_12?" AUTOCOMPLETE=\""+_11+"\" ":_11!="native"?" AUTOCOMPLETE=OFF ":""),(this.$712()&&this.$1564()
?" placeholder='"+String.asAttValue(String.htmlStringToString(this.getHint()))+"'"
:null),((isc.Browser.isMoz||isc.Browser.isSafari||isc.Browser.isEdge||(isc.Browser.isIE&&isc.Browser.version>=10))?(this.getBrowserSpellCheck()?" spellcheck=true":" spellcheck=false"):null),(isc.Browser.isSafari&&this.browserAutoCapitalize==false
?" autocapitalize='off'"
:null),(isc.Browser.isSafari&&this.browserAutoCorrect!=null
?(this.browserAutoCorrect?" autocorrect='on'":" autocorrect='off'")
:null)," WRAP=",this.wrap," TABINDEX=",this.$154(),(this.showTitle==false&&this.accessKey!=null?" ACCESSKEY="+this.accessKey:""),(this.$429()?" ONINPUT='"+this.getID()+"._handleInput()'"
:null),(this.isReadOnly()||this.isInactiveHTML()?(isc.Canvas.ariaEnabled()?" aria-readonly='true' READONLY=TRUE":" READONLY=TRUE"):null)," handleNativeEvents=false>",(this.isInactiveHTML()?_1:null),"</TEXTAREA>"
)}
}
return _6.release(false)}
,isc.A.handleMouseMove=function isc_TextAreaItem_handleMouseMove(){var _1=this.Super("handleMouseMove",arguments);if(_1==false||!this.allowNativeResize)return false;if(isc.EH.mouseIsDown()&&this.$90g==null){this.$90g=isc.Page.setEvent("idle",this.getID()+".$90h()")}
}
,isc.A.$90h=function isc_TextAreaItem__checkForElementResize(){var _1=false;var _2=this.getDataElement();if(_2){var _3=this.getValue();if(_2.offsetWidth!=this.getTextBoxWidth(_3))_1=true;if(_2.offsetHeight!=this.getTextBoxHeight(_3))_1=true}
if(_1)this.$90i();if(!isc.EH.mouseIsDown()){isc.Page.clearEvent("idle",this.$90g);this.$90g=null}
}
,isc.A.$90i=function isc_TextAreaItem__nativeElementResize(){var _1=this.containerWidget;if(_1)_1.$t6("Native textarea resize")}
,isc.A.$12v=function isc_TextAreaItem__nativeElementFocus(_1,_2){var _3=this.Super("$12v",arguments);this.$66s();this.$84f=this.getEnteredValue();return _3}
,isc.A.$12x=function isc_TextAreaItem__nativeElementBlur(_1,_2){this.form.elementChanged(this);var _3=this.Super("$12x",arguments);if(this.$84f==null||this.$84f!=this.getEnteredValue())
{var _4=this.getValue();if(this.mapValueToDisplay){_4=this.mapValueToDisplay(_4)}
this.setElementValue(_4)}
if(this.$712()&&!this.$1564()){var _4=this.getElementValue();if(_4==null||isc.isAn.emptyString(_4)){this.$66t()}
}
return _3}
,isc.A.getElementStyleHTML=function isc_TextAreaItem_getElementStyleHTML(_1){var _2=this.getTextBoxWidth(_1),_3=this.getTextBoxHeight(_1),_4=this.getTextBoxStyle(),_5;if(this.$169t()){var _6=this.isRTL(),_7=_6?this.$156l:this.$156j;if(this.$169p==="absolutePositioning"){var _8=isc.Element.$tr(_4)+_7,_9=_6?this.$156j:this.$156l,_10=isc.Element.$ts(_4)+_9;_5="padding-right:"+_10+"px;padding-left:"+_8+"px"}else{if(isc.Browser.isIE&&!isc.Browser.isStrict){_5=isc.Canvas.$42a+"position:relative;left:"+_7+"px"}else{_5=isc.Canvas.$42a+"position:relative;top:0px;bottom:0px;left:"+_7+"px"}
if(isc.Browser.isIE&&9<=isc.Browser.version&&isc.Browser.version<=10){_5+="; height: "+this.getTextBoxHeight()+"px;"}
}
}
return isc.StringBuffer.concat(" CLASS='"+this.getTextBoxStyle(),(isc.Browser.isMoz&&isc.isA.String(this.wrap)&&this.wrap.toLowerCase()!="off"?"' ROWS=10 COLS=10":"'")," STYLE='",this.getElementCSSText(_2,_3),_5,"' ")}
,isc.A.getElementCSSText=function isc_TextAreaItem_getElementCSSText(_1,_2){if(isc.isA.Number(_1)&&_1<=0)_1=1;if(isc.isA.Number(_2)&&_2<this.minHeight)_2=this.minHeight;if((isc.Browser.isWin||isc.Browser.isMac)&&isc.Browser.isMoz&&isc.Browser.version>=52)
{if(_2>=1)_2-=0.5}
return isc.StringBuffer.concat(this.allowNativeResize?null:"resize:none;",(isc.TextItem.$126z
?"margin-top:-1px;margin-bottom:-1px;margin-left:0px;margin-right:0px;"
:"margin:0px;"),(isc.isA.Number(_1)?"WIDTH:"+_1+"px;":""),(isc.isA.Number(_2)?"HEIGHT:"+_2+"px;":""),(this.textAlign?"text-align:"+this.textAlign+";":""),"display:block;",(isc.Browser.$1395&&this.$198s()?"-webkit-overflow-scrolling:touch;":null),isc.isA.String(this.wrap)&&this.wrap.toUpperCase()==isc.TextAreaItem.OFF?"white-space:pre;":"white-space:pre-wrap;",(isc.Browser.isMoz?"-moz-user-focus:"+(this.$154()>0?"normal;"
:"ignore;"):"")
)}
,isc.A.shouldFixRowHeight=function isc_TextAreaItem_shouldFixRowHeight(_1,_2,_3){if((isc.Browser.isWin||isc.Browser.isMac)&&isc.Browser.isMoz&&isc.Browser.version>=52)
{return true}
return this.invokeSuper(isc.TextAreaItem,"shouldFixRowHeight",_1,_2,_3)}
,isc.A.$198s=function isc_TextAreaItem__useNativeTouchScrollingCSS(){var _1=this.containerWidget;return _1.$1399&&_1.useNativeTouchScrolling}
,isc.A.getStandaloneItemWrapCSS=function isc_TextAreaItem_getStandaloneItemWrapCSS(){if(isc.Browser.isIE)return null;return this.Super("getStandaloneItemWrapCSS",arguments)}
,isc.A.$187i=function isc_TextAreaItem__cellNoWrap(){return true}
,isc.A.mapValueToDisplay=function isc_TextAreaItem_mapValueToDisplay(_1,_2,_3,_4,_5){var _6=this.invokeSuper(isc.TextAreaItem,"mapValueToDisplay",_1,_2,_3,_4,_5);if(_6==null)_6=isc.emptyString;return _6}
,isc.A.mapDisplayToValue=function isc_TextAreaItem_mapDisplayToValue(_1){var _2=this.$79d(_1);_2=this.$17d(_2);if(isc.is.emptyString(_2))_2=this.emptyStringValue;return _2}
,isc.A.setValue=function isc_TextAreaItem_setValue(_1){this.$66s();var _2;if(this.emptyStringValue===null||this.emptyStringValue===_2){if(_1==null||isc.is.emptyString(_1)){this.emptyStringValue=_1}
}
delete this.$20n;_1=this.Super("setValue",arguments);if(!this.hasFocus&&this.$712()&&!this.$1564()){if(_1==null||isc.isAn.emptyString(_1)){this.$66t()}
}
return _1}
,isc.A.updateValue=function isc_TextAreaItem_updateValue(){this.$20n=true;return this.Super("updateValue",arguments)}
,isc.A.compareValues=function isc_TextAreaItem_compareValues(_1,_2){if(_1==null&&_2==null)return true;else if(_1==null||_2==null)return false;if(isc.isA.String(_2)){if(isc.isA.Number(_1)||isc.isA.SpecialNumber(_1)){return String(_1)==_2}
}else if(isc.isA.String(_1)){if(isc.isA.Number(_2)||isc.isA.SpecialNumber(_2)){return _1==String(_2)}
}
return this.Super("compareValues",arguments)}
,isc.A.getValue=function isc_TextAreaItem_getValue(){var _1=this.Super("getValue",arguments);if(this.$20n&&isc.isA.String(_1)){if(!this.$20o)
this.$20o=new RegExp("(\\r\\n|[\\r\\n])","g");_1=""+_1;_1=_1.replace(this.$20o,this.lineBreakValue)}
return _1}
,isc.A.shouldStopKeyPressBubbling=function isc_TextAreaItem_shouldStopKeyPressBubbling(_1,_2){if(_1==this.$10j)return true;if(_1==this.$145f)return this.getScrollTop()!=0;if(_1==this.$145g){var _3=this.$15h();if(_3){return(_3.scrollHeight-_3.clientHeight)>this.getScrollTop()}
}
return this.Super("shouldStopKeyPressBubbling",arguments)}
,isc.A.getScrollHeight=function isc_TextAreaItem_getScrollHeight(){var _1=this.$15h();if(_1==null)return this.getHeight();return _1.scrollHeight}
,isc.A.getScrollWidth=function isc_TextAreaItem_getScrollWidth(){var _1=this.$15h();if(_1==null)return this.getWidth();return _1.scrollWidth}
,isc.A.$20p=function isc_TextAreaItem__hscrollOn(){var _1=this.$15h();return _1&&_1.scrollWidth>_1.clientWidth}
,isc.A.$20q=function isc_TextAreaItem__vscrollOn(){var _1=this.$15h();return _1&&_1.scrollHeight>_1.clientHeight}
,isc.A.getScrollTop=function isc_TextAreaItem_getScrollTop(){var _1=this.$15h();if(_1==null)return 0;return _1.scrollTop}
,isc.A.getScrollLeft=function isc_TextAreaItem_getScrollLeft(){var _1=this.$15h();if(_1==null)return 0;return _1.scrollLeft}
,isc.A.scrollTo=function isc_TextAreaItem_scrollTo(_1,_2){var _3=this.$15h();if(_3==null)return;if(_1!=null)_3.scrollLeft=_1;if(_2!=null)_3.scrollTop=_2}
,isc.A.scrollToTop=function isc_TextAreaItem_scrollToTop(){this.scrollTo(null,0)}
,isc.A.scrollToBottom=function isc_TextAreaItem_scrollToBottom(){var _1=this.getScrollBottom();if(_1>=0){this.scrollTo(null,_1)}
}
,isc.A.getScrollBottom=function isc_TextAreaItem_getScrollBottom(){var _1=this.$15h();if(_1==null)return 0;return _1.scrollHeight-_1.clientHeight}
,isc.A.$178s=function isc_TextAreaItem__stopBubblingMouseWheelEvent(_1,_2){var _3=this.$142q,_4=false;if(_3&&this.$20q()){if(this.$178t==null){var _5=this.getScrollTop(),_6=isc.EH.getWheelDelta();if(_6==0){return true}
var _7=(_6<0)?(_5==0)
:(_5>=this.getScrollBottom());this.$178t=_7?"parent":"textbox"}
_4=(this.$178t=="textbox");isc.EH.fireOnPause("clearCurrentScrollTargetElement",{target:this,methodName:"clearCurrentScrollTargetElement"},200)}
return _4}
,isc.A.clearCurrentScrollTargetElement=function isc_TextAreaItem_clearCurrentScrollTargetElement(){delete this.$178t}
);isc.B._maxIndex=isc.C+43;isc.ClassFactory.defineClass("AutoFitTextAreaItem","TextAreaItem");isc.A=isc.AutoFitTextAreaItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.supportsSelectionRange=true;isc.B.push(isc.A.getTestBox=function isc_AutoFitTextAreaItem_getTestBox(_1){var _2=this.getValue();var _3=this.$1416(_2);var _4=isc.AutoFitTextAreaItem;if(!_4.$552){_4.$552=isc.Canvas.create({autoDraw:true,overflow:"hidden",left:0,top:-100,ariaState:{hidden:true
},contents:["<textarea ID='isc_autoFitTextArea_sizeTester' role='presentation' ","style='overflow:hidden;",(isc.Browser.isIE?"margin-top:-1px;margin-bottom:-1px;margin-left:0px;margin-right:0px;":"margin:0px;"),"'></textarea>"].join("")
})}
var _5=isc.Element.get("isc_autoFitTextArea_sizeTester");if(_4.currentItem!=this||_1){_5.className=this.getTextBoxStyle();if(isc.Browser.isMoz){if(isc.isA.String(this.wrap)&&this.wrap.toLowerCase()!="off"){_5.rows=5;_5.cols=10}else{_5.rows="";_5.cols=""}
}
_5.setAttribute("wrap",this.wrap);var _6=this.getTextBoxWidth(_2),_7=this.getTextBoxHeight(_2);_4.$552.$u9(_5.style,"width",_6);_4.$552.$u9(_5.style,"height",_7);_5.style.textAlign=this.textAlign||"";_5.cssText=this.getElementCSSText(_6,_7);_4.currentItem=this}
_5.value=_3;var _8=_5.scrollHeight;return _5}
,isc.A.getScrollHeight=function isc_AutoFitTextAreaItem_getScrollHeight(_1){var _2=this.getTestBox(_1);return _2.scrollHeight}
,isc.A.getScrollWidth=function isc_AutoFitTextAreaItem_getScrollWidth(_1){var _2=this.getTestBox(_1);return _2.scrollWidth}
,isc.A.getElementCSSText=function isc_AutoFitTextAreaItem_getElementCSSText(_1,_2){var _3=this.Super("getElementCSSText",arguments);_3+="overflow:hidden;"
return _3}
,isc.A.$198s=function isc_AutoFitTextAreaItem__useNativeTouchScrollingCSS(){return false}
,isc.A.$553=function isc_AutoFitTextAreaItem__getTextBoxHPadding(){if(this.$554!=null)return this.$554;var _1=this.getDataElement();if(!_1)return 0;var _2=parseInt(isc.Element.getComputedStyleAttribute(_1,"paddingLeft")),_3=parseInt(isc.Element.getComputedStyleAttribute(_1,"paddingRight")),_4=(isc.isA.Number(_2)?_2:0)+(isc.isA.Number(_3)?_3:0);this.$554=_4;return _4}
,isc.A.$555=function isc_AutoFitTextAreaItem__getTextBoxVPadding(){if(this.$556!=null)return this.$556;var _1=this.getDataElement();if(!_1)return 0;if(isc.Browser.isIE&&_1.currentStyle==null)return 0;var _2=parseInt(isc.Element.getComputedStyleAttribute(_1,"paddingTop")),_3=parseInt(isc.Element.getComputedStyleAttribute(_1,"paddingBottom")),_4=(isc.isA.Number(_2)?_2:0)+(isc.isA.Number(_3)?_3:0);this.$556=_4;return _4}
,isc.A.getMaxHeight=function isc_AutoFitTextAreaItem_getMaxHeight(){return this.maxHeight}
,isc.A.getMaxWidth=function isc_AutoFitTextAreaItem_getMaxWidth(){return this.maxWidth}
,isc.A.updateSize=function isc_AutoFitTextAreaItem_updateSize(_1){var _2=this.getDataElement();if(!_2)return;var _3,_4;var _5=this.getTextBoxHeight(),_6=this.$555(),_7=this.getScrollHeight(_1),_8=_2.offsetHeight-_6,_9=_7,_10=this.getMaxHeight();if(this.$143())_9-=_6;if(_10!=null&&_10<_9){_9=_10}
if(_9>_8){_2.style.height=""+_9+"px";_4=true}else if(_9<_8&&_8>_5){if(_9<_8){_3=true;_2.style.height=""+Math.max(_9,_5)+"px"}
_4=true
}
var _11=this.getTextBoxWidth(this.getValue()),_12=isc.Browser.isIE?0:this.$553(),_13=this.getScrollWidth(_1),_14=_2.offsetWidth,_15=_12+_13,_16=this.getMaxWidth();if(_16!=null&&_15>_16)_15=_16;if(_15>_14){_2.style.width=_15;_4=true}else if(_15<_14&&_14>_11){_2.style.width=Math.max(_11,_15);_3=true
_4=true
}
if(_3)this.containerWidget.$t5=true;if(_4)this.adjustOverflow("Updated size to fit content")}
,isc.A.handleChanged=function isc_AutoFitTextAreaItem_handleChanged(){this.updateSize();return this.Super("handleChanged",arguments)}
,isc.A.drawn=function isc_AutoFitTextAreaItem_drawn(){this.Super("drawn",arguments);delete this.$554;delete this.$556;this.updateSize(true)}
,isc.A.redrawn=function isc_AutoFitTextAreaItem_redrawn(){this.Super("redrawn",arguments);delete this.$554;delete this.$556;this.updateSize(true)}
,isc.A.$160=function isc_AutoFitTextAreaItem__resetWidths(){this.Super("$160",arguments);this.updateSize(true)}
,isc.A.setValue=function isc_AutoFitTextAreaItem_setValue(){this.Super("setValue",arguments);this.updateSize(true)}
);isc.B._maxIndex=isc.C+15;isc.defineClass("NativeTimeItem","TextItem");isc.A=isc.NativeTimeItem.getPrototype();isc.A.ariaRole="range";isc.A.browserInputType="time";isc.A.textBoxStyle="nativeTimeItem";isc.A.inFieldHintStyle="nativeTimeItemInFieldHint";isc.A.showClippedValueOnHover=false;isc.A=isc.NativeTimeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$118w="wrapper";isc.A.$118x="hint";isc.B.push(isc.A.getHint=function isc_NativeTimeItem_getHint(){if(this.hint!=null)return this.hint;if(isc.Browser.isChrome)return isc.TimeItem.getInstanceProperty("shortTimeFormat");return isc.TimeItem.getInstanceProperty("short24TimeFormat")}
,isc.A.$118y=function isc_NativeTimeItem__getWrapperElementId(){if(this.isInactiveHTML())return this.$qs(this.$118w);if(this.$118z==null){this.$118z=this.$qs(this.$118w,true)}
return this.$118z}
,isc.A.$1180=function isc_NativeTimeItem__getHintElementId(){if(this.isInactiveHTML())return this.$qs(this.$118x);if(this.$1181==null){this.$1181=this.$qs(this.$118x,true)}
return this.$1181}
,isc.A.$1182=function isc_NativeTimeItem__getInFieldHintElemStyle(){if(this.showDisabled&&this.renderAsDisabled())return this.inFieldHintStyle+"Disabled";return this.inFieldHintStyle}
,isc.A.getElementHTML=function isc_NativeTimeItem_getElementHTML(_1,_2){if(!this.$712())return this.Super("getElementHTML",arguments);var _3=this.getHeight();return"<div id='"+this.$118y()+"' class='"+this.$15x(this.$118w)+"' style='display:inline-block;position:relative;height:"+_3+"px'>"+this.Super("getElementHTML",arguments)+"<span id='"+this.$1180()+"' class='"+this.$1182()+"' style='line-height:"+_3+"px'></span></div>"}
,isc.A.getElementValue=function isc_NativeTimeItem_getElementValue(){var _1=this.getDataElement(),_2;if(!_1||!(_2=_1.value))return null;var h=parseInt(_2,10),m=parseInt(_2.substring(3),10),s=(_2.length>=8?parseInt(_2.substring(6),10):0);return isc.Time.createLogicalTime(h,m,s)}
,isc.A.setElementValue=function isc_NativeTimeItem_setElementValue(_1,_2){if(!this.isDrawn())return;var _3;if(_2===_3){_2=this._value}
var _4=this.getDataElement();if(_4!=null){_4.value=_1}
}
,isc.A.mapValueToDisplay=function isc_NativeTimeItem_mapValueToDisplay(_1){if(isc.isA.Date(_1))return isc.Time.toShortTime(_1,"toTimestamp");return _1}
,isc.A.$66t=function isc_NativeTimeItem__showInFieldHint(){var _1=isc.Element.get(this.$1180());if(_1!=null){this.getDataElement().className=this.$66v();_1.className=this.$1182();var _2=this.getHint();_1.innerText=String.htmlStringToString(_2);this.$66u=true}
}
,isc.A.$66s=function isc_NativeTimeItem__hideInFieldHint(_1){var _2=isc.Element.get(this.$1180());if(_2!=null){this.getDataElement().className=this.getTextBoxStyle();_2.className=this.$1182();_2.innerText=isc.emptyString;this.$66u=false}
}
,isc.A.updateState=function isc_NativeTimeItem_updateState(){this.Super("updateState",arguments);if(this.$66u){var _1=isc.Element.get(this.$1180());if(_1!=null)_1.className=this.$1182()}
}
);isc.B._maxIndex=isc.C+11;isc.ClassFactory.defineClass("TimeItem","ContainerItem");isc.A=isc.TimeItem;isc.A.DEFAULT_TIME="00:00:00";isc.A=isc.TimeItem.getPrototype();isc.A.textFieldDefaults={showTitle:false,name:"timeTextField",type:"text",changeOnBlur:true,$712:function(){return this.parentItem.$712()},$1564:function(){if(!this.parentItem.usePlaceholderForHint)return false;return this.$1560()},getHint:function(){if(this.$712()){return(this.parentItem.hint!=null
?this.parentItem.hint
:this.parentItem.getDefaultHint())}
return null},changeOnKeypress:false,shouldSaveValue:false,getInnerWidth:function(){return this.parentItem.getInnerWidth()},$887:true,handleKeyPress:function(){var _1=this.Super("handleKeyPress",arguments);if(_1!=false){var _2=isc.EH.getKey();if(_2=="Enter"&&!this.useMask){if(this.parentItem)this.parentItem.updateValue();this.setElementValue(this.mapValueToDisplay(this.getValue()))}
}
return _1},setMask:function(_1){this.logWarn("setMask: custom mask ignored")},shouldApplyStaticTypeFormat:function(){if(this.isReadOnly())return true;return this.Super("shouldApplyStaticTypeFormat",arguments)}
};isc.A.wrapHintText=false;isc.A.usePlaceholderForHint=true;isc.A.showItemTitles=true;isc.A.itemTitleOrientation="top";isc.A.itemTitleAlign="center";isc.A.showHourItem=true;isc.A.hourItemDefaults={name:"hourItem",type:"select",addUnknownValues:false,valueMap:"this.parentItem.getHourValues()",shouldSaveValue:false,defaultDynamicValue:"(this.parentItem.defaultValue && this.parentItem.getDefaultValue().getHours()) || this.parentItem.getHourValues()[0]",saveValue:function(){this.Super("saveValue",arguments);this.parentItem.updateValue()},getErrorWidth:function(){return 0},suppressItemChanged:true
};isc.A.hourItemTitle="Hour";isc.A.hourItemPrompt="Choose hours";isc.A.showMinuteItem=true;isc.A.minuteItemDefaults={name:"minuteItem",type:"select",addUnknownValues:false,defaultDynamicValue:"(this.parentItem.defaultValue && this.parentItem.getDefaultValue().getMinutes()) || this.parentItem.getMinuteValues()[0]",valueMap:"this.parentItem.getMinuteValues()",shouldSaveValue:false,saveValue:function(){this.Super("saveValue",arguments);this.parentItem.updateValue()},getErrorWidth:function(){return 0},suppressItemChanged:true
};isc.A.minuteItemTitle="Min";isc.A.minuteItemPrompt="Choose minutes";isc.A.showSecondItem=true;isc.A.secondItemDefaults={name:"secondItem",type:"select",addUnknownValues:false,valueMap:"this.parentItem.getSecondValues()",shouldSaveValue:false,defaultDynamicValue:"(this.parentItem.defaultValue && this.parentItem.getDefaultValue().getSeconds()) || this.parentItem.getSecondValues()[0]",saveValue:function(){this.Super("saveValue",arguments);this.parentItem.updateValue()},getErrorWidth:function(){return 0},suppressItemChanged:true
};isc.A.secondItemTitle="Sec";isc.A.secondItemPrompt="Choose seconds";isc.A.showMillisecondItem=false;isc.A.showMillisecondItem=false;isc.A.millisecondItemDefaults={name:"millisecondItem",type:"select",addUnknownValues:false,defaultDynamicValue:"(this.parentItem.defaultValue && this.parentItem.getDefaultValue().getMilliseconds()) || this.parentItem.getMillisecondValues()[0]",valueMap:"this.parentItem.getMillisecondValues()",shouldSaveValue:false,saveValue:function(){this.Super("saveValue",arguments);this.parentItem.updateValue()},getErrorWidth:function(){return 0},suppressItemChanged:true
};isc.A.millisecondItemTitle="Ms";isc.A.millisecondItemPrompt="Choose milliseconds";isc.A.ampmItemDefaults={name:"ampmItem",prompt:"Choose AM or PM",type:"select",addUnknownValues:false,valueMap:"this.parentItem.getAmpmOptions()",shouldSaveValue:false,defaultDynamicValue:"this.parentItem.getAmpmOptions()[0]",saveValue:function(){this.Super("saveValue",arguments);this.parentItem.updateValue()},getErrorWidth:function(){return 0},suppressItemChanged:true
};isc.A.ampmItemTitle="AM/PM";isc.A.timeFormatter24Hour="toShort24HourTime";isc.A.timeFormatter12Hour="toShortTime";isc.A.allowEmptyValue=true;isc.A.width=120;isc.A.cellPadding=0;isc.A.useTextField=true;isc.A.textAlign=isc.Page.isRTL()?isc.Canvas.RIGHT:isc.Canvas.LEFT;isc.A.invalidTimeStringMessage="Invalid time";isc.A.use24HourTime=null;isc.A=isc.TimeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.textBoxStyle=null;isc.A.hourMinValue=null;isc.A.hourMaxValue=null;isc.A.hourIncrement=1;isc.A.minuteMinValue=null;isc.A.minuteMaxValue=null;isc.A.minuteIncrement=1;isc.A.secondMinValue=null;isc.A.secondMaxValue=null;isc.A.secondIncrement=1;isc.A.millisecondMinValue=null;isc.A.millisecondMaxValue=null;isc.A.millisecondIncrement=1;isc.A.selectorFormat="HMSL";isc.B.push(isc.A.showing24HourTime=function isc_TimeItem_showing24HourTime(){return this.use24HourTime}
,isc.A.getSubItemValues=function isc_TimeItem_getSubItemValues(_1){var _2=this[_1+"Values"],_3=_1.substring(0,1).toUpperCase()+_1.substring(1,_1.length)
;if(!_2){_2=[];var _4=this["get"+_3+"MinValue"](),_5=this["get"+_3+"MaxValue"](),_6=0
;for(var i=_4;i<=_5;i+=this[_1+"Increment"]){if(i<10)_2.add(isc.NumberUtil.stringify(i,2));else _2.add(isc.NumberUtil.stringify(i));_6++}
this[_1+"Values"]=_2}
return this[_1+"Values"]}
,isc.A.setHourValues=function isc_TimeItem_setHourValues(_1){this.hourValues=_1;if(this.hourItem)this.hourItem.setValueMap(this.getHourValues())}
,isc.A.getHourValues=function isc_TimeItem_getHourValues(){return this.getSubItemValues("hour")}
,isc.A.getHourMinValue=function isc_TimeItem_getHourMinValue(){if(this.hourMinValue==null)this.hourMinValue=(this.showing24HourTime()?0:1);return this.hourMinValue}
,isc.A.getHourMaxValue=function isc_TimeItem_getHourMaxValue(){if(this.hourMaxValue==null)this.hourMaxValue=(this.showing24HourTime()?23:12);return this.hourMaxValue}
,isc.A.setMinuteValues=function isc_TimeItem_setMinuteValues(_1){this.minuteValues=_1;if(this.minuteItem)this.minuteItem.setValueMap(this.getMinuteValues())}
,isc.A.getMinuteValues=function isc_TimeItem_getMinuteValues(){return this.getSubItemValues("minute")}
,isc.A.getMinuteMinValue=function isc_TimeItem_getMinuteMinValue(){if(this.minuteMinValue==null)this.minuteMinValue=0;return this.minuteMinValue}
,isc.A.getMinuteMaxValue=function isc_TimeItem_getMinuteMaxValue(){if(this.minuteMaxValue==null)this.minuteMaxValue=59;return this.minuteMaxValue}
,isc.A.setSecondValues=function isc_TimeItem_setSecondValues(_1){this.secondValues=_1;if(this.secondItem)this.secondItem.setValueMap(this.getSecondValues())}
,isc.A.getSecondValues=function isc_TimeItem_getSecondValues(){return this.getSubItemValues("second")}
,isc.A.getSecondMinValue=function isc_TimeItem_getSecondMinValue(){if(this.secondMinValue==null)this.secondMinValue=0;return this.secondMinValue}
,isc.A.getSecondMaxValue=function isc_TimeItem_getSecondMaxValue(){if(this.secondMaxValue==null)this.secondMaxValue=59;return this.secondMaxValue}
,isc.A.setMillisecondValues=function isc_TimeItem_setMillisecondValues(_1){this.millisecondValues=_1;if(this.millisecondItem)this.millisecondItem.setValueMap(this.getMillisecondValues())}
,isc.A.getMillisecondValues=function isc_TimeItem_getMillisecondValues(){return this.getSubItemValues("millisecond")}
,isc.A.getMillisecondMinValue=function isc_TimeItem_getMillisecondMinValue(){if(this.millisecondMinValue==null)this.millisecondMinValue=0;return this.millisecondMinValue}
,isc.A.getMillisecondMaxValue=function isc_TimeItem_getMillisecondMaxValue(){if(this.millisecondMaxValue==null)this.millisecondMaxValue=999;return this.millisecondMaxValue}
,isc.A.getAmpmOptions=function isc_TimeItem_getAmpmOptions(){if(this.ampmValues)return this.ampmValues;var _1=["AM","PM"];return _1}
,isc.A.setHours=function isc_TimeItem_setHours(_1){if(this.useTextField){var _2=this.textField.getValue();if(_2==null){var _3=isc.DateUtil.create();_2=isc.DateUtil.createLogicalTime(_1,_3.getMinutes(),0)}else{_2.setHours(_1)}
this.textField.setValue(_2)}else{if(!this.getHourValues().contains(_1)){this.logWarn("setHours: "+_1+" is not a valid option")}else{this.hourItem.setValue(_1)}
}
}
,isc.A.setMinutes=function isc_TimeItem_setMinutes(_1){if(this.useTextField){var _2=this.textField.getValue();if(_2==null){var _3=isc.DateUtil.create();_2=isc.DateUtil.createLogicalTime(_3.getHours(),_1,0)}else{_2.setMinutes(_1)}
this.textField.setValue(_2)}else{if(!this.getMinuteValues().contains(_1)){this.logWarn("setMinutes: "+_1+" is not a valid option")}else{this.minuteItem.setValue(_1)}
}
}
,isc.A.setSeconds=function isc_TimeItem_setSeconds(_1){if(this.useTextField){var _2=this.textField.getValue();_2.setSeconds(_1);this.textField.setValue(_2)}else{if(!this.getSecondValues().contains(_1)){this.logWarn("setSeconds: "+_1+" is not a valid option")}else{this.secondItem.setValue(_1)}
}
}
,isc.A.setMilliseconds=function isc_TimeItem_setMilliseconds(_1){if(this.useTextField){var _2=this.textField.getValue();_2.setMilliseconds(_1);this.textField.setValue(_2)}else{if(!this.getMillisecondValues().contains(_1)){this.logWarn("setMilliseconds: "+_1+" is not a valid option")}else{this.millisecondItem.setValue(_1)}
}
}
,isc.A.getSelectorFormat=function isc_TimeItem_getSelectorFormat(){return this.selectorFormat}
,isc.A.getDuration=function isc_TimeItem_getDuration(_1){_1=_1||this.getDefaultDurationTimeUnit();var _2=this.getValue();if(!isc.isA.Date(_2))return null;var _3=_2.getHours(),_4=_2.getMinutes(),_5=_2.getSeconds(),_6=_2.getMilliseconds(),_7=(_3*60*60*1000)+(_4*60*1000)+(_5*1000)+_6
;if(_1=="second")return _7/1000;else if(_1=="minute")return _7/1000/60;else if(_1=="hour")return _7/1000/60/60;else return _7}
,isc.A.getDefaultDurationTimeUnit=function isc_TimeItem_getDefaultDurationTimeUnit(){if(this.millisecondItem&&this.millisecondItem.isVisible())return"millisecond";if(this.secondItem&&this.secondItem.isVisible())return"second";if(this.minuteItem&&this.minuteItem.isVisible())return"minute";if(this.hourItem&&this.hourItem.isVisible())return"hour"}
,isc.A.setItems=function isc_TimeItem_setItems(_1){var _2=isc.TimeItem,_3=this.getSelectorFormat()
;if(_1!=null&&_1.length!=0){this.logWarn("setItems() called for timeItem with itemList:"+_1+" - ignoring, and making use of default date fields")}
_1=this.items=[];if(this.useTextField){var _4={textAlign:this.textAlign,showInlineStyle:this.showInlineStyle,inlineStyleSuffix:this.inlineStyleSuffix,emptyDisplayValue:this.emptyDisplayValue,invalidTimeStringMessage:this.invalidTimeStringMessage,operator:this.operator,title:this.title,allowEmptyValue:this.allowEmptyValue,getDefaultValue:function(){return this.parentItem.getDefaultValue()},validateOnChange:this.validateOnChange,validators:this.validators,type:this.type,parentItem:this
};if(this.textBoxStyle!=null)_4.textBoxStyle=this.textBoxStyle;var _5=isc.addProperties({},this.textFieldDefaults,_2.TEXT_FIELD,this.textFieldProperties);if(_5.selectOnClick==null)_5.selectOnClick=this.selectOnClick;if(_5.selectOnFocus==null)_5.selectOnFocus=this.selectOnFocus;var _6;if(this.$119a()){_6={textAlign:this.isRTL()?isc.Canvas.RIGHT:isc.Canvas.LEFT,editorType:isc.NativeTimeItem,browserInputType:this.getBrowserInputType()
}}else{_6={type:"time",editorType:isc.TextItem,useMask:this.useMask,formatterMap:this.formatterMap,$30o:function(){return this.parentItem.$30o()
},getDisplayValue:function(_17){return this.parentItem.getDisplayValue(_17)
}
};if(this.useMask){var _7=this.$30o(),_8=this.formatterMap[_7];if(_8==null){_6.useMask=false;_6.mask=null;this.logWarn("Mask will not be used because timeFormatter "+_7+" is not recognized")}else{if(_8.formatter)this.timeFormatter=_8.formatter;_6.mask=_8.mask}
if(_6.mask){_6.maskSaveLiterals=true;if(_5.maskOverwriteMode==null)_5.maskOverwriteMode=true}
}else{_6.mask=null}
}
if(this.format)_6.format=this.format;var _9=isc.addProperties({},_4,_5,_6);_9.name="timeTextField";if(this.height&&(!this.textFieldProperties||!this.textFieldProperties.height))
{_9.height=this.getTextBoxHeight()}
if(!this.$119a()){if(this.parseEditorValue){_9.parseEditorValue=function innerTimeTextItem_parseEditorValue(_17,_18,_16){var _10=this.parentItem.parseEditorValue(_17,_18,this.parentItem);if(_10!=null&&!isc.isA.Date(_10)){var _11=_10;_10=isc.Time.parseInput(_10,true);if(_10==null)_10=_11}
return _10}}
if(this.formatEditorValue){_9.formatEditorValue=function innerTimeTextItem_formatEditorValue(_17,_18,_19,_16){var _12=this.parentItem.formatEditorValue(_17,_18,_19,this.parentItem);if(isc.isA.Date(_12)){_12=isc.Time.format(_12,this.$30o())}
return _12}}
}
_1.add(_9);var _13;this.hourItem=this.minuteItem=this.secondItem=this.millisecondItem=this.ampmItem=_13}else{for(var i=0;i<_3.length;i++){var _15=_3.charAt(i);var _16=null;if(_15=="H"&&this.showHourItem!=false){_16=isc.addProperties({title:this.hourItemTitle,titleStyle:this.titleStyle,prompt:this.hourItemPrompt},this.hourItemDefaults,_2.HOUR_ITEM,this.hourItemProperties,{name:"hourItem"}
);if(!_16.width){if(this.$178x==null){this.$178x=isc.SelectItem.$336p(this.getHourValues(),_16)}
_16.width=this.$178x;_16.minWidth=this.$178x}
}else if(_15=="M"&&this.showMinuteItem!=false){_16=isc.addProperties({title:this.minuteItemTitle,titleStyle:this.titleStyle,prompt:this.minuteItemPrompt},this.minuteItemDefaults,_2.MINUTE_ITEM,this.minuteItemProperties,{name:"minuteItem"}
);if(!_16.width){if(this.$178y==null){this.$178y=isc.SelectItem.$336p(this.getMinuteValues(),_16)}
_16.width=this.$178y;_16.minWidth=this.$178y}
}else if(_15=="S"&&this.showSecondItem!=false){_16=isc.addProperties({title:this.secondItemTitle,titleStyle:this.titleStyle,prompt:this.secondItemPrompt},this.secondItemDefaults,_2.SECOND_ITEM,this.secondItemProperties,{name:"secondItem"}
);if(!_16.width){if(this.$178z==null){this.$178z=isc.SelectItem.$336p(this.getSecondValues(),_16)}
_16.width=this.$178z;_16.minWidth=this.$178z}
}else if((_15=="L"||_15=="m")&&this.showMillisecondItem!=false){_16=isc.addProperties({title:this.millisecondItemTitle,titleStyle:this.titleStyle,prompt:this.millisecondItemPrompt},this.millisecondItemDefaults,_2.MILLISECOND_ITEM,this.millisecondItemProperties,{name:"millisecondItem"}
);if(!_16.width){if(this.$217k==null){this.$217k=isc.SelectItem.$336p(this.getMillisecondValues(),_16)}
_16.width=this.$217k;_16.minWidth=this.$217k}
}
if(_16){if(i>0){if(_16.cssText==null){_16.cssText="padding-left:3px;"}
}
_1.add(_16)}
}
if(!this.showing24HourTime()){_16=isc.addProperties({title:this.ampmItemTitle},this.ampmItemDefaults,_2.AMPM_SELECTOR,this.ampmItemProperties,{name:"ampmItem"});if(!_16.width){if(this.$180w==null){this.$180w=isc.SelectItem.$336p(this.getAmpmOptions(),_16)}
_16.width=this.$180w;_16.minWidth=this.$180w}
if(_16.cssText==null){_16.cssText="padding-left:3px;"}
_1.add(_16)}
}
this.Super("setItems",[_1],arguments);if(this.$161p())this.$1609();if(this.useTextField){this.textField=this.timeTextField}
}
);isc.B._maxIndex=isc.C+27;isc.A=isc.TimeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.short24TimeFormat="HH:MM";isc.A.shortTimeFormat="HH:MM [am|pm]";isc.A.long24TimeFormat="HH:MM:SS";isc.A.longTimeFormat="HH:MM:SS [am|pm]";isc.A.full24TimeFormat="HH:MM:SS.lll";isc.A.fullTimeFormat="HH:MM:SS.lll [am|pm]";isc.A.$g5="time";isc.A.formatterMap={toTime:{mask:"[0-1]#:[0-6]#:[0-6]# [ap]m",formatter:"toPaddedTime"},to24HourTime:{mask:"[0-2]#:[0-6]#:[0-6]#",formatter:"toPadded24HourTime"},toPaddedTime:{mask:"[0-1]#:[0-6]#:[0-6]# [ap]m"},toPadded24HourTime:{mask:"[0-2]#:[0-6]#:[0-6]#"},toShortTime:{mask:"[0-1]#:[0-6]# [ap]m",formatter:"toShortPaddedTime"},toShort24HourTime:{mask:"[0-2]#:[0-6]#",formatter:"toShortPadded24HourTime"},toShortPaddedTime:{mask:"[0-1]#:[0-6]# [ap]m"},toShortPadded24HourTime:{mask:"[0-2]#:[0-6]#"}
};isc.A.validators=[{type:"isTime"}
];isc.B.push(isc.A.$1609=function isc_TimeItem__updatePendingStatuses(){var _1=this.$161p()&&this.pendingStatus;if(this.useTextField){var _2=this.textField;if(_2!=null)_2.setFixedPendingStatus(_1)}else{var _3=this.$160w(),_4;if(!isc.isA.Date(_3))_4=null;else if(_3.logicalTime)_4=_3;else _4=isc.DateUtil.getLogicalTimeOnly(_3);var _5=this._value,_6;if(!isc.isA.Date(_5))_6=null;else{_6=_5}
var _7=this.hourItem;if(_7!=null){if(!_1){_7.setFixedPendingStatus(false)}else if(_4==null||_6==null){_7.setFixedPendingStatus(true)}else{var _8=_4.getHours(),_9=_6.getHours();if(!this.showing24HourTime()){_8=_8%12;_9=_9%12}
_7.setFixedPendingStatus(_8!=_9)}
}
var _10=this.minuteItem;if(_10!=null){_10.setFixedPendingStatus(_1&&(_4==null||_6==null||_4.getMinutes()!=_6.getMinutes()))}
var _11=this.secondItem;if(_11!=null){_11.setFixedPendingStatus(_1&&(_4==null||_6==null||_4.getSeconds()!=_6.getSeconds()))}
var _12=this.millisecondItem;if(_12!=null){_12.setFixedPendingStatus(_1&&(_4==null||_6==null||_4.getMilliseconds()!=_6.getMilliseconds()))}
var _13=this.ampmItem;if(_13!=null){_13.setFixedPendingStatus(_1&&(_4==null||_6==null||(_4.getHours()<12)!=(_6.getHours()<12)))}
}
}
,isc.A.$85m=function isc_TimeItem__shouldAllowExpressions(){if(!this.useTextField)return false;return(this.allowExpressions!=false)}
,isc.A.getOperator=function isc_TimeItem_getOperator(_1){if(!this.operator)return"equals";return this.operator}
,isc.A.$712=function isc_TimeItem__getShowHintInField(){return!!(this.$207e()&&this.hint)}
,isc.A.$207e=function isc_TimeItem__mayShowHintInField(){return!!(this.useTextField&&this.showHint&&this.$2257())}
,isc.A.getHint=function isc_TimeItem_getHint(){if(!this.showHint||this.$712())return null;if(this.hint!=null)return this.hint;return this.getDefaultHint()}
,isc.A.getDefaultHint=function isc_TimeItem_getDefaultHint(){if(!this.useTextField)return null;var _1=this.$30o();switch(_1){case"to24HourTime":case"toPadded24HourTime":return this.long24TimeFormat;case"toTime":case"toPaddedTime":return this.longTimeFormat;case"toShort24HourTime":case"toShortPadded24HourTime":return this.short24TimeFormat;case"toShortTime":case"toShortPaddedTime":return this.shortTimeFormat;case"toFullTime":case"toFullPaddedTime":return this.fullTimeFormat}
return null}
,isc.A.$119a=function isc_TimeItem__useNativeTimeInput(){return this.useTextField&&this.getBrowserInputType()==this.$g5}
,isc.A.getDefaultValue=function isc_TimeItem_getDefaultValue(){var _1=this.defaultValue;if(!_1&&!this.allowEmptyValue)_1=isc.TimeItem.DEFAULT_TIME;if(_1&&!isc.isA.Date(_1))
_1=isc.Time.parseInput(_1);return _1}
,isc.A.getCriteriaValue=function isc_TimeItem_getCriteriaValue(){if(this.$85m())return this.textField.getElementValue();var _1=this.getValue();if(_1==null||isc.is.emptyString(_1))return null;if(!isc.isA.Date(_1))_1=isc.Time.parseInput(String(_1));return _1}
,isc.A.getCriterion=function isc_TimeItem_getCriterion(_1){var _2,_3=this.getOperator(_1,isc.isAn.Array(_5)),_4=this.getCriteriaFieldName();var _5=this.getCriteriaValue();if(_5==null||isc.is.emptyString(_5))return;if(this.$85m()){_2=this.parseValueExpressions(_5,_4,_3);if(_2!=null){if("equals"!=_2.operator){return _2}
_5=_2.value}
}
if(isc.isA.String(_5)){_5=isc.Time.parseInput(_5)}
if(isc.isA.Date(_5)&&"exact"!=_1){_2={_constructor:"AdvancedCriteria",fieldName:_4,operator:"betweenInclusive",start:isc.Time.createLogicalTime(_5.getHours(),_5.getMinutes(),0,0),end:isc.Time.createLogicalTime(_5.getHours(),_5.getMinutes(),59,999),value:_5
};return _2}
_2={fieldName:_4,operator:_3,value:_5
};return _2}
,isc.A.canEditCriterion=function isc_TimeItem_canEditCriterion(_1,_2){if(_1.fieldName!=null&&_1.fieldName==this.getCriteriaFieldName()&&isc.isA.Date(_1.value))
{return true}
return this.Super("canEditCriterion",arguments)}
,isc.A.$111i=function isc_TimeItem__formatCriterionValue(_1){return this.mapValueToDisplay(_1)}
,isc.A.updateValue=function isc_TimeItem_updateValue(){if(this.$20l)return;this.$20l=true;var _1;if(this.useTextField){this.timeTextField.updateValue();_1=this.timeTextField.getValue();if(_1==isc.emptyString)_1=null}else{var _2,_3,_4,_5;if(this.hourItem!=null){_2=+this.hourItem.getValue()}
if(this.minuteItem!=null){_3=+this.minuteItem.getValue()}
if(this.secondItem!=null){_4=+this.secondItem.getValue()}
if(this.millisecondItem!=null){_5=+this.millisecondItem.getValue()}
if(this.ampmItem!=null){var _6=this.ampmItem.getValue(),_7=this.getAmpmOptions()
;if(_6==_7[1]&&_2<12)_2+=12;else if(_6==_7[0]&&_2==12)_2=0}
_1=isc.DateUtil.createLogicalTime(_2,_3,_4,_5)}
delete this.$20l;return this.storeValue(_1)}
,isc.A.saveValue=function isc_TimeItem_saveValue(_1){var _2=this.Super("saveValue",arguments);if(this.$161p())this.$1609();return _2}
,isc.A.getItemValue=function isc_TimeItem_getItemValue(_1,_2){if(this.isInactiveHTML()){if(_1==this.textField){return _2}else if(isc.isA.Date(_2)){switch(_1){case this.millisecondItem:return _2.getMilliseconds();case this.secondItem:return _2.getSeconds();case this.minuteItem:return _2.getMinutes();case this.hourItem:var _3=_2.getHours();if(!this.showing24HourTime()){if(_3>11)_3-=12;if(_3==0)_3=12}
return _3}
}
}
return this.Super("getItemValue",arguments)}
,isc.A.setValue=function isc_TimeItem_setValue(_1){var _2=_1,_3;if(isc.isA.String(_2)){var _4=isc.Time.parseInput(_2,true);if(isc.isA.Date(_4))_2=_4}else if(_1===_3&&!this.useTextField){_2=this.getDefaultValue();if(_2===_3)_2=isc.Time.parseInput(isc.TimeItem.DEFAULT_TIME)}
if(this.useTextField){this.textField.setValue(_2)}else if(isc.isA.Date(_2)){var _5=_2.getHours(),_6=_2.getMinutes(),_7=_2.getSeconds()
;if(!this.showing24HourTime()){if(_5>11)_5-=12;if(_5==0)_5=12}
if(_5<10)_5=isc.NumberUtil.stringify(_5,2);if(this.hourItem)this.hourItem.setValue(_5);if(_6<10)_6=isc.NumberUtil.stringify(_6,2);if(this.minuteItem)this.minuteItem.setValue(_6);if(_7<10)_7=isc.NumberUtil.stringify(_7,2);if(this.secondItem)this.secondItem.setValue(_7);if(this.millisecondItem)this.millisecondItem.setValue(_2.getMilliseconds());var _8=this.ampmItem,_9=this.getAmpmOptions()
;if(_8)_8.setValue(_2.getHours()>11?_9[1]:_9[0])}
return this.Super("setValue",[_2],arguments)}
,isc.A.getValue=function isc_TimeItem_getValue(){if(this.useTextField){var _1=this.textField.getValue();var _2=isc.Time.parseInput(String(_1),true);if(_2!=null)_1=_2;return _1}
var h=this.hourItem?+this.hourItem.getValue():0,m=this.minuteItem?+this.minuteItem.getValue():0,s=this.secondItem?+this.secondItem.getValue():0,_6=this.millisecondItem?+this.millisecondItem.getValue():0
;var _7=this.ampmItem;if(_7!=null){var _8=_7.getValue(),_9=this.getAmpmOptions()
;if(_8==_9[1]&&h<12)h+=12;else if(_8==_9[0]&&h==12)h=0}
return isc.DateUtil.createLogicalTime(h,m,s,_6)}
,isc.A.getEnteredValue=function isc_TimeItem_getEnteredValue(){if(this.useTextField&&this.textField!=null){return this.textField.getEnteredValue()}
return this.getValue()}
,isc.A.compareValues=function isc_TimeItem_compareValues(_1,_2){if(_1==_2)return true;if(isc.isA.Date(_1)&&isc.isA.Date(_2)&&isc.Time.compareTimes(_1,_2))return true;return false}
,isc.A.init=function isc_TimeItem_init(){if(this.use24HourTime==null)this.use24HourTime=isc.Time.use24HourTime;this.Super("init",arguments)}
,isc.A.$30o=function isc_TimeItem__getTimeFormatter(){var _1=this.timeFormatter;if(_1==null){_1=this.use24HourTime?this.timeFormatter24Hour:this.timeFormatter12Hour}
if(_1==null&&this.displayFormat!=null&&isc.SimpleType.inheritsFrom(this.type,"time"))
{_1=this.displayFormat}else{if(_1==null)_1=this.form.timeFormatter}
return _1}
,isc.A.$851=function isc_TimeItem__formatAsTime(){return true}
,isc.A.$kk=function isc_TimeItem__canFocus(){if(this.canFocus!=null)return this.canFocus;return true}
,isc.A.focusInItem=function isc_TimeItem_focusInItem(){if(!this.isVisible())return;if(this.useTextField){if(this.textField)this.textField.focusInItem()}else{var _1=this.getSelectorFormat(),_2=_1.charAt(0)
;if(_2=="H"&&this.hourItem)this.hourItem.focusInItem();if(_2=="M"&&this.minuteItem)this.minuteItem.focusInItem();if(_2=="S"&&this.secondItem)this.secondItem.focusInItem();if(_2=="L"&&this.millisecondItem)this.millisecondItem.focusInItem()}
}
,isc.A.setSelectionRange=function isc_TimeItem_setSelectionRange(_1,_2){if(this.textField)return this.textField.setSelectionRange(_1,_2)}
,isc.A.getSelectionRange=function isc_TimeItem_getSelectionRange(){if(this.textField)return this.textField.getSelectionRange()}
,isc.A.selectValue=function isc_TimeItem_selectValue(){if(this.textField)return this.textField.selectValue()}
,isc.A.deselectValue=function isc_TimeItem_deselectValue(_1){if(this.textField)return this.textField.deselectValue()
}
,isc.A.setHint=function isc_TimeItem_setHint(_1){if(this.useTextField&&this.showHintInField){this.textField.setHint(_1)}else{this.Super("setHint",arguments)}
}
);isc.B._maxIndex=isc.C+30;isc.ClassFactory.defineClass("ToolbarItem","CanvasItem");isc.A=isc.ToolbarItem.getPrototype();isc.A.canFocus=true;isc.A.shouldSaveValue=false;isc.A.showTitle=false;isc.A.buttonSpace=4;isc.A.startRow=true;isc.A.endRow=true;isc.A.colSpan="*";isc.A.canvasConstructor='Toolbar';isc.A.vertical=false;isc.A.buttonAutoFit=true;isc.A=isc.ToolbarItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.$18y=function isc_ToolbarItem__createCanvas(){var _1=(this.buttons||this.items||[]),_2=this.buttonProperties||{};isc.addProperties(_2,{handleActivate:function(){var _3=this.parentElement.canvasItem,_4=_3.form;if(this.click!=null)return this.click(_4,_3)}
});if(this.buttonAutoFit!=null&&_2.autoFit==null){_2.autoFit=this.buttonAutoFit}
if(this.buttonBaseStyle&&!_2.baseStyle){_2.baseStyle=this.buttonBaseStyle}
if(this.buttonTitleStyle&&!_2.titleStyle){_2.titleStyle=this.buttonTitleStyle}
this.$20r(_1);this.canvas={overflow:isc.Canvas.VISIBLE,buttons:_1,membersMargin:this.buttonSpace,vertical:this.vertical,buttonProperties:_2};var _5=this.height,_6=this.width;if(!isc.isA.Number(_6)&&this.$8t)
_6=isc.isA.Number(this.$8t[0])?this.$8t[0]:null;if(!isc.isA.Number(_5)&&this.$8t)
_5=isc.isA.Number(this.$8t[1])?this.$8t[1]:null;if(_5)this.canvas.height=_5;if(_6)this.canvas.width=_6;if(this.buttonConstructor!=null)
this.canvas.buttonConstructor=this.buttonConstructor;if(this.createButtonsOnInit!=null){this.canvas.createButtonsOnInit=this.createButtonsOnInit}
return this.Super("$18y",arguments)}
,isc.A.$20r=function isc_ToolbarItem__updateButtons(_1){if(!_1||_1.length==0)return;for(var i=0;i<_1.length;i++){if(_1[i].click&&isc.isA.String(_1[i].click)){_1[i].click=isc.Func.expressionToFunction("form,item",_1[i].click)}
}
}
,isc.A.getButton=function isc_ToolbarItem_getButton(_1){return isc.Class.getArrayItem(_1,this.buttons,"name")}
,isc.A.addButton=function isc_ToolbarItem_addButton(_1,_2){this.buttons=this.buttons||[];this.buttons.addAt(_1,_2);this.setButtons(this.buttons)}
,isc.A.removeButton=function isc_ToolbarItem_removeButton(_1){var _2=isc.Class.getArrayItemIndex(_1,this.buttons,"name");if(_2!=-1){this.buttons.removeAt(_2);this.setButtons(this.buttons)}
}
,isc.A.setButtons=function isc_ToolbarItem_setButtons(_1){this.$20r(_1);this.buttons=_1;if(!this.canvas)return;this.canvas.setButtons(_1)}
,isc.A.setItems=function isc_ToolbarItem_setItems(_1){return this.setButtons(_1)}
);isc.B._maxIndex=isc.C+7;isc.ClassFactory.defineClass("UploadItem","TextItem");isc.A=isc.UploadItem.getPrototype();isc.A.$183="FILE";isc.A.textBoxStyle="uploadItem";isc.A.$16b={onchange:isc.FormItem.$12y
};isc.A.$105m=true;isc.A.multiple=true;isc.A.maintainSelectionOnTransform=false;isc.A=isc.UploadItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.writeTextBoxWidth=isc.Browser.isMoz&&isc.Browser.version>=22;isc.A.checkFileScript="        var $629 = target;\r        async function checkFiles(callback) {\r            var element = $629.getDataElement(),\r                files = element && element.files;\r            if (files == null || files.length == 0) {\r                callback(null);\r            } else {\r                for (var i = 0; i < files.length; i++) {\r                    var file = files[i];\r                    try {\r                        \r                        var oneByteBlob = await file.slice(0,1);\r                        var oneByteText = await oneByteBlob.text();\r                    } catch (e) {\r                        isc.logWarn(\"Attempting to access file encountered an error:\" + e);\r                        console.log(e);\r                        callback(false);\r                        return;\r                    }\r                }\r                callback(true);\r            }\r        }\r        return checkFiles;";isc.B.push(isc.A.shouldFixRowHeight=function isc_UploadItem_shouldFixRowHeight(){return true}
,isc.A.shouldWriteTextBoxWidth=function isc_UploadItem_shouldWriteTextBoxWidth(){if(this.writeTextBoxWidth!=null)return this.writeTextBoxWidth;return false}
,isc.A.shouldWriteTextBoxHeight=function isc_UploadItem_shouldWriteTextBoxHeight(){if(this.writeTextBoxHeight!=null)return this.writeTextBoxHeight;return false}
,isc.A.getTextBoxWidth=function isc_UploadItem_getTextBoxWidth(_1){if(!this.shouldWriteTextBoxWidth())return null;return this.Super("getTextBoxWidth",arguments)}
,isc.A.getTextBoxHeight=function isc_UploadItem_getTextBoxHeight(_1){if(!this.shouldWriteTextBoxHeight())return null;return this.Super("getTextBoxHeight",arguments)}
,isc.A.$143=function isc_UploadItem__sizeTextBoxAsContentBox(){return false}
,isc.A.$149=function isc_UploadItem__getEventMaskWidth(){var _1=this.getElementWidth();if(!isc.isA.Number(_1))_1=185;return _1}
,isc.A.$10y=function isc_UploadItem__updateValue(_1){_1=this.mapDisplayToValue(_1);if(_1==this._value)return true;var _2=this.handleChange(_1,this._value);if(this.$17n!=_1){this.logWarn("Upload Items do not support programmatically modifying the value entered by the user. Ignoring attempt to update from change handler")}
this.saveValue(this.mapDisplayToValue(this.getElementValue()));delete this.$17n;this.handleChanged(this._value);return _2}
,isc.A.redrawn=function isc_UploadItem_redrawn(){this.Super("redrawn",arguments);this.updateValue(this.getElementValue())}
,isc.A.setElementReadOnly=function isc_UploadItem_setElementReadOnly(_1){this.$176(!_1&&!this.isDisabled())}
,isc.A.setValue=function isc_UploadItem_setValue(_1){var _2=this.getValue();if(_1==null||isc.isAn.emptyString(_1)){if(_2==null||isc.isAn.emptyString(_2))return;return this.Super("setValue",arguments)}
if(_1!=_2){this.logWarn("Attempting to set the value for an upload form item. This is disallowed for security reasons - returning the current value of the form item")}
return _2}
,isc.A.$12z=function isc_UploadItem__handleElementChanged(){this.Super("$12z",arguments);this.checkForImplicitSave();if(this.isDrawn())this.adjustOverflow()}
,isc.A.setElementValue=function isc_UploadItem_setElementValue(_1){if(_1==null||isc.isAn.emptyString(_1)){if(isc.Browser.isIE){this.redraw();return}
return this.Super("setElementValue",arguments)}
var _2=this.getElementValue();if(_1!=_2){this.logInfo("Attempting to set the value for an upload form item. This is disallowed for security reasons - returning the current value of the form item")}
return _2}
,isc.A.refreshDisplayValue=function isc_UploadItem_refreshDisplayValue(){}
,isc.A.$85m=function isc_UploadItem__shouldAllowExpressions(){return false}
,isc.A.$884=function isc_UploadItem__shouldSelectOnFocus(){return false}
,isc.A.checkFileAccess=function isc_UploadItem_checkFileAccess(_1){if(isc.Browser.supportsAsynchFunctions){var _2=new Function("target",this.checkFileScript)(this);_2(_1)}else{_1(true)}
}
);isc.B._maxIndex=isc.C+17;isc.UploadItem.markUnsupportedMethods(null,["getSelectionRange","setSelectionRange","selectValue","deselectValue"]);isc.defineClass("ComboBoxItem","TextItem","PickList");isc.defer("if (isc.ComboBoxItem.$b4.animatePickList == null) isc.ComboBoxItem.addProperties({ animatePickList: isc.Browser.isHandset || isc.Browser.isTablet });");if(isc.PickList)isc.ComboBoxItem.addMethods(isc.PickList.$146x)
isc.A=isc.ComboBoxItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.autoSizePickList=true;isc.A.pickerSearchFieldDefaults={width:"*",editorType:"TextItem",showTitle:false,showHintInField:true,browserAutoCorrect:false,getHint:function(){return this.creator.addUnknownValues?this.creator.pickerSearchOrNewValueFieldHint
:this.creator.pickerSearchFieldHint}
};isc.A.pickerSearchFieldHint="Search";isc.A.pickerSearchOrNewValueFieldHint="Search or enter new value";isc.A.pickerSearchFormConstructor=isc.DynamicForm;isc.A.pickerSearchFormDefaults={numCols:1,width:"100%",height:1,cellPadding:0,cellSpacing:0,layoutAlign:"middle",leftPadding:5,rightPadding:5,overflow:"visible"
};isc.A.pickerSearchIconDefaults={name:"search",inline:true,imgOnly:true,showRTL:true,click:function(_1,_2,_3){_2.focusInItem()}
};isc.A.showPickerSearchIcon=false;isc.A.pickerSearchIconSize=14;isc.A.pickerSearchIconSrc="Search";isc.A.pickerExitButtonConstructor=isc.NavigationButton;isc.A.pickerExitButtonTitle="Cancel";isc.A.pickerSaveButtonConstructor=isc.NavigationButton;isc.A.pickerSaveButtonTitle="Accept";isc.A.pickerClearButtonConstructor=isc.NavigationButton;isc.A.pickerClearButtonTitle="Clear";isc.A.emptyPickListMessage="No items to show";isc.A.showPickerIcon=true;isc.A.pickerIconWidth=15;isc.A.pickerIconHeight=null;isc.A.textBoxStyle="selectItemText";isc.A.pickerIconSrc="[SKIN]/DynamicForm/ComboBoxItem_PickButton_icon.gif";isc.A.pickerIconProperties={tabIndex:-1,showOver:true
};isc.A.modalPickList=false;isc.A.showPickListOnKeypress=true;isc.A.saveOnEnter=true;isc.A.$20s="Arrow_Up";isc.A.$20t="Arrow_Down";isc.A.$20u="Page_Up";isc.A.$20v="Page_Down";isc.A.$20w="Escape";isc.A.$10j="Enter";isc.A.$jf="Tab";isc.A.addUnknownValues=true;isc.A.allowEmptyValue=true;isc.A.mapEmptyDisplayValue=false;isc.A.$27r="none";isc.A.$1709=false;isc.A.filterDisplayValue=true;isc.A.autoFetchData=false;isc.A.filterWithValue=false;isc.A.searchStringTooShortMessage="Enter a longer search string to search";isc.B.push(isc.A.init=function isc_ComboBoxItem_init(){this.$249r();if(this.specialValues&&this.allowEmptyValue){this.allowEmptyValue=false}
return this.Super("init",arguments)}
,isc.A.$1397=function isc_ComboBoxItem__elementIsReadOnly(){var _1=this.Super("$1397",arguments);if(!_1&&this.hasPopOutPicker()){_1=true}
return _1}
,isc.A.createPickerNavigationBar=function isc_ComboBoxItem_createPickerNavigationBar(){var _1=isc.addProperties({},this.pickerSearchFieldDefaults,this.pickerSearchFieldProperties,{name:"s",handleKeyPress:function(){var _2=this.Super("handleKeyPress",arguments);if(_2!=false){var _3=this.creator.pickerSearchFieldKeyPress(this);_2=_3==null?_2:_3}
return _2},handleChanged:function(_7,_8){var _4=this.Super("handleChanged",arguments);this.creator.pickerSearchFieldChanged(this);return _4},creator:this
});if(this.showPickerSearchIcon){var _5=isc.addProperties({},this.pickerSearchIconDefaults,this.pickerSearchIconProperties);_5.width=_5.height=this.pickerSearchIconSize;_5.src=this.pickerSearchIconSrc;if(!_1.icons)_1.icons=[];_1.icons.add(_5)}
this.pickerSearchForm=this.createAutoChild("pickerSearchForm",{layoutAlign:"center",minWidth:280,width:"*",items:[_1]});this.pickerSearchField=this.pickerSearchForm.getItem("s");this.pickerSaveButton=this.createAutoChild("pickerSaveButton",{title:this.pickerSaveButtonTitle,click:function(){this.creator.pickerSaveButtonClick()},disabled:true,autoDraw:false,visibility:this.addUnknownValues?isc.Canvas.INHERIT
:isc.Canvas.HIDDEN,icon:"Accept",canAdaptWidth:true
});this.pickerClearButton=this.createAutoChild("pickerClearButton",{title:this.pickerClearButtonTitle,click:function(){this.creator.pickerClearButtonClick()},visibility:this.addUnknownValues||this.allowEmptyValue?isc.Canvas.INHERIT:isc.Canvas.HIDDEN,icon:"Cancel",canAdaptWidth:true
});this.pickerExitButton=this.createAutoChild("pickerExitButton",{title:this.pickerExitButtonTitle,click:function(){this.creator.pickerExitButtonClick()},icon:"Close",canAdaptWidth:true
});var _6=[this.pickerSearchForm,this.pickerClearButton,this.pickerExitButton];if(this.addUnknownValues)_6.addAt(this.pickerSaveButton,1);this.pickerNavigationBar=this.createAutoChild("pickerNavigationBar",{controls:_6})}
,isc.A.getEnteredValue=function isc_ComboBoxItem_getEnteredValue(){if(this.pickerSearchForm&&this.pickerSearchForm.isDrawn()&&this.pickerSearchForm.isVisible())
{return this.pickerSearchField.getEnteredValue()}
return this.Super("getEnteredValue",arguments)}
,isc.A.pickerSearchFieldKeyPress=function isc_ComboBoxItem_pickerSearchFieldKeyPress(_1,_2,_3,_4,_5){return this.handleSearchItemKeyPress(_1)}
,isc.A.pickerSearchFieldChanged=function isc_ComboBoxItem_pickerSearchFieldChanged(_1){this.$143h(_1.getEnteredValue());if(this.pickerSaveButton&&this.pickerSaveButton.isVisible()){this.pickerSaveButton.setDisabled(false)}
}
,isc.A.pickerExitButtonClick=function isc_ComboBoxItem_pickerExitButtonClick(){this.pickList.hide()}
,isc.A.pickerSaveButtonClick=function isc_ComboBoxItem_pickerSaveButtonClick(){var _1=this.pickerSearchForm.getValue("s");this.setElementValue(_1==null?"":_1);this.pickList.hide();this.$10y(_1,true)}
,isc.A.pickerClearButtonClick=function isc_ComboBoxItem_pickerClearButtonClick(){this.setElementValue("");this.pickList.hide();this.$10y("")}
,isc.A.setAddUnknownValues=function isc_ComboBoxItem_setAddUnknownValues(_1){this.addProperties({addUnknownValues:_1,changeOnKeypress:!_1
});this.setValue(null);if(this.pickerSaveButton){this.pickerSaveButton.setVisibility(_1);var _2=this.pickerNavigationBar.members.contains(this.pickerSaveButton);if(_1&&!_2){this.pickerNavigationBar.addMember(this.pickerSaveButton,1)}else if(!_1&&_2){this.pickerNavigationBar.removeMember(this.pickerSaveButton)}
}
if(this.pickerClearButton&&!this.allowEmptyValue){this.pickerClearButton.setVisibility(_1)}
}
,isc.A.drawn=function isc_ComboBoxItem_drawn(_1,_2,_3,_4){this.invokeSuper(isc.ComboBoxItem,"drawn",_1,_2,_3,_4);if(this.autoFetchData&&this.$19m()){if(this.getCanEdit()==false){this.autoFetchDataOnRedrawn=true}else{this.filterWithValue=false;this.fetchData(null,null,true)}
}
}
,isc.A.redrawn=function isc_ComboBoxItem_redrawn(_1,_2,_3,_4){this.invokeSuper(isc.ComboBoxItem,"redrawn",_1,_2,_3,_4);if(this.autoFetchDataOnRedrawn==true&&this.getCanEdit()){delete this.autoFetchDataOnRedrawn;this.filterWithValue=false;this.fetchData(null,null,true)}
}
,isc.A.pickListShown=function isc_ComboBoxItem_pickListShown(){if(this.pickList.isVisible()){this.$20x=this.ns.Page.setEvent("mouseDown",this,null,"$143i")}
}
,isc.A.$143i=function isc_ComboBoxItem__mouseDownWithPickList(){var _1=this.pickList;if(!_1||!_1.isVisible())return;if(isc.ComboBoxItem.$249p){return}
var _2=isc.EH.lastEvent.target;if(!_1.contains(_2,true)&&(!_1.$314||!_1.$314.menuTreeContains(_2,true))&&(!_1.filterEditor||_1.filterEditor.getEditForm()!=_2)
)
{var _3=false;if(_1.filterEditor){var _4=_1.filterEditor.getEditForm().getItems().getProperty("pickList");_4.addList(_1.filterEditor.getEditForm().getItems().getProperty("picker"));for(var i=0;i<_4.length;i++){if(_4[i]&&_4[i].contains(_2)){_3=true;break}
}
}
if(!_3){_1.hide()}
}
if(!this.$143j){this.$143j=this.ns.Page.setEvent("mouseUp",this,isc.Page.FIRE_ONCE,"$143k")}
if(!this.$43m){this.$43m=this.ns.Page.setEvent("dragStop",this,isc.Page.FIRE_ONCE,"$43n")}
}
,isc.A.$143k=function isc_ComboBoxItem__mouseUpWithPickList(){var _1=this.form.$ne();if(_1&&_1.item==this){this.ns.Page.clearEvent("dragStop",this.$43m);delete this.$43m;delete this.$143j;if(_1.overIcon!=null&&_1.overIcon!="picker"){return true}
return false}
if(!isc.Browser.isMobile||!this.hasPopOutPicker()){this.$43n(true)}else{this.delayCall("$43n",[true,true])}
}
,isc.A.$43n=function isc_ComboBoxItem__refocusFromPLMouseUp(_1,_2){if(_1==true){this.ns.Page.clearEvent("dragStop",this.$43m)}else{this.ns.Page.clearEvent("mouseUp",this.$143j)}
delete this.$43m;delete this.$143j;var _3=this.pickList;if(_2){if((!_3||!_3.isVisible())&&this.$200o()){this.focusInItem()}
return}
var _4=isc.EH.getTarget();if(_3&&_3.isVisible()&&_3.contains(_4,true)&&(!this.pickerSearchForm||!this.pickerSearchForm.contains(_4,true)))
{this.focusInItem()}
}
,isc.A.pickListHidden=function isc_ComboBoxItem_pickListHidden(){if(this.$20x)this.ns.Page.clearEvent("mouseDown",this.$20x);delete this.$20x;delete this.$111h}
,isc.A.handleKeyPress=function isc_ComboBoxItem_handleKeyPress(){if(!this.hasFocus||this.isReadOnly())return this.Super("handleKeyPress",arguments);var _1=this.handleSearchItemKeyPress(this);if(_1!=false)_1=this.Super("handleKeyPress",arguments);return _1}
,isc.A.invokePLBodyKeyPress=function isc_ComboBoxItem_invokePLBodyKeyPress(_1){var _2=this.pickList;if(!_2)return;_2.suppressNavigationFocus=true;var _3=_2.bodyKeyPress(isc.EH.lastEvent);delete _2.suppressNavigationFocus;return _3}
,isc.A.handleSearchItemKeyPress=function isc_ComboBoxItem_handleSearchItemKeyPress(_1){var _2=isc.EH.lastEvent.keyName,_3=this.pickList,_4=(_3?(_3.isDrawn()&&_3.isVisible()):false);if(_4&&(_2==this.$20v||_2==this.$20u)){var _5=this.invokePLBodyKeyPress(isc.EH.lastEvent);return _5}
var _6=_1.getEnteredValue(),_7=this.getValue(),_8=(!_6||_6==isc.emptyString);if(_1==this&&_2==this.$20t&&isc.EH.altKeyDown()){this.showPicker();return false}
if(_2==this.$20w&&this.addUnknownValues==false){var _9=this.$1416(_7);if(isc.isAn.emptyString(_9)&&this.$176g())
{this.$66t()}else{this.setElementValue(_9)}
}
var _10=_2==this.$10j,_11=false;if(_10&&(_4||this.addUnknownValues==true)){_11=this.shouldCompleteOnEnter()}
var _12=_4&&(_2==this.$20t||_2==this.$20s);this.$823=_12;if(_4){if(_10){if(_11){if(_3.anySelected()){this.invokePLBodyKeyPress(isc.EH.lastEvent);return false}else if(this.addUnknownValues){this.storeValue(_1.getElementValue(),true)
}
}
_3.hide()}else{if(_12||_2==this.$20w)
{this.invokePLBodyKeyPress(isc.EH.lastEvent);return false}
}
}else if(this.addUnknownValues){if(_10&&_11)this.updateValue()}
if(!this.addUnknownValues&&_1==this)this.$82s()}
,isc.A.shouldCompleteOnTab=function isc_ComboBoxItem_shouldCompleteOnTab(){return this.completeOnTab||(this.addUnknownValues==false)}
,isc.A.shouldCompleteOnEnter=function isc_ComboBoxItem_shouldCompleteOnEnter(){if(this.addUnknownValues==false)return true;else if(this.$823)return true;else if(this.completeOnEnter!=null)return this.completeOnEnter;else{return((this.form&&!this.form.isSearchForm)||!this.$19m())}
}
,isc.A.handleKeyDown=function isc_ComboBoxItem_handleKeyDown(){if(!this.hasFocus||this.isReadOnly())return this.Super("handleKeyDown",arguments);var _1=isc.EH.lastEvent.keyName,_2=_1==this.$jf,_3=_1==this.$10j,_4=this.pickList,_5=this.$128z();this.$82p=null;var _6=_2&&this.shouldCompleteOnTab()||_3&&this.shouldCompleteOnEnter();if((_2&&this.fetchValueOnTab)||(_3&&this.fetchValueOnEnter))
{var _7=this.$1282()||this.$82q();if(_6&&_5&&!_7&&_4!=null&&_4.data!=null&&!_4.data.isEmpty())
{this.$82r()}else{var _8=this.getEnteredValue(),_9=this.getDisplayFieldName(),_10=this.shouldFetchMissingDisplayValue(_8);if(_9!=null&&_4&&(isc.isA.ResultSet&&isc.isA.ResultSet(_4.data))&&(_4.data.allRowsCached()||(!_7&&_4.data.localData&&_4.data.allMatchingRowsCached())))
{_10=false;var _11=_4.data,_12=_11.localData.find(_9,_8);if(_12!=null)this.$953(_12)}
if(_10){this.$128v(_8);if(this.clearEnteredValuePendingReply){this.setElementValue("")}
}else{this.$10y(_8,true)}
if(_4)_4.hide()}
}else if(_6){if(this.$82q()){this.$82p=this.getEnteredValue();if(this.clearEnteredValuePendingReply){this.setElementValue("")}
}else if(_5){this.$82r()}
}
return this.Super("handleKeyDown",arguments)}
,isc.A.$82q=function isc_ComboBoxItem__loadingData(){return(this.$82m||this.$43j)}
,isc.A.chooseCurrentPickListValue=function isc_ComboBoxItem_chooseCurrentPickListValue(){var _1=this.pickList;var _2=_1.getSelectedRecord();if(_2!=null)_1.itemClick(_2)}
,isc.A.$82r=function isc_ComboBoxItem__fireTabCompletion(){this.chooseCurrentPickListValue()
}
,isc.A.refreshDisplayValue=function isc_ComboBoxItem_refreshDisplayValue(){if(this.$82q())return;if(this.$82t)return;return this.Super("refreshDisplayValue",arguments)}
,isc.A.handleEditorExit=function isc_ComboBoxItem_handleEditorExit(){if(this.$84z()||this.hasPopOutPicker()&&this.$19g){return}
this.$823=false;var _1=this.getEnteredValue(),_2=this.getValue();if(this.$82p!=null&&(this.$1563||this.$82p==_1)&&!this.$82q())
{this.$82r();this.$82p=null;_1=this.getEnteredValue()}
if(this.$82p==null&&!this.$1441){if(this.addUnknownValues){var _3=this.getOptionDataSource(),_4=this.getDisplayFieldName();if(_2==_1&&(_3==null||(_4!=null&&_2!=null&&!this.shouldFetchMissingValue(_2))))
{var _5=this.$1416(_2);if(_5!=_2){if(isc.isAn.emptyString(_5)&&this.$176g())
{this.$66t()}else{this.setElementValue(_5)}
}
}else if(_3!=null&&_4!=null
&&_1!=null&&_1!=""&&this.shouldFetchMissingDisplayValue(_1)
)
{this.$128v(_1)}
}else{if(!this.$82q()){if(this.isUnknownValue(_1)){this.setElementValue(this.getDisplayValue())}else{this.$10y(_1,true)}
}
}
}
this.$843=(this.$82p!=null);var _6=this.Super("handleEditorExit",arguments);this.$843=null;return _6}
,isc.A.$142r=function isc_ComboBoxItem__showValueAfterDraw(_1){if(_1&&this.$82t){this.setElementValue(this.$824)}else return this.Super("$142r",arguments)}
,isc.A.filterComplete=function isc_ComboBoxItem_filterComplete(){if(this.$19m()){var _1=this.$128m(false);if(_1){if(this.specialValues&&this.separateSpecialValues){this.updateSpecialValues(_1)}else{var _2=this.pickList.getOriginalData();if(isc.isA.ResultSet(_2)){var _3=_2.addSpecialValueRecords(this.getValueFieldName(),this.getDisplayFieldName(),_1);if(_3&&this.pickList)this.pickList.markForRedraw()}
}
}
}
var _4=isc.PickList.getPrototype().filterComplete;_4.apply(this,arguments)}
,isc.A.updateValueMap=function isc_ComboBoxItem_updateValueMap(_1){this.Super("updateValueMap",arguments);if(this.$192)delete this.$192}
,isc.A.getClientPickListData=function isc_ComboBoxItem_getClientPickListData(){if(this.$192)return this.$192;var _1=isc.PickList.optionsFromValueMap(this),_2=this.getValueFieldName();var _3=this.$128m(false);if(_3){if(this.separateSpecialValues){this.updateSpecialValues(_3)}else{_1.addListAt(_3,0)}
}
this.$192=_1;return _1}
,isc.A.$82o=function isc_ComboBoxItem__updateValueForFilterComplete(_1,_2,_3){this.selectDefaultItem();if(!this.hasFocus){var _4=this.getEnteredValue();if(this.$82p!=null&&(this.$1563||(this.hasFocus&&this.clearEnteredValuePendingReply&&!_4)||this.$82p==_4))
{this.$82r();this.$82p=null}
if(!this.addUnknownValues){if(this.isUnknownValue(_4)){if(!this.hasFocus){var _5=this.getDisplayValue();if(isc.isAn.emptyString(_5)&&this.$176g())
{this.$66t()}else{this.setElementValue(_5)}
this.$82u()}
}else if(!isc.isA.MultiComboBoxItem||!isc.isA.MultiComboBoxItem(this.creator)||!this.hasFocus)
{var r=this.getSelectedRecord();if(r&&r[this.valueField]==this._value&&r[this.displayField]==_4){this.pickList.selectionManager.selectSingle(r)}else{this.$10y(_4,true);_4=this.getEnteredValue();if(this.$176g()&&(_4==null||isc.is.emptyString(_4)))
{this.$66t()}
}
this.$82u()}
}
this.$844(this.getValue())}
this.$19v()}
,isc.A.updateDisplayValueMap=function isc_ComboBoxItem_updateDisplayValueMap(_1){this.Super("updateDisplayValueMap",arguments);if(this.$128n&&this.$847){var _2=this.getDisplayFieldName();if(_2){var _3=this.$847,_4=this.getValueFieldName(),_5=this.$128n,_6=false
;for(var i=0;i<_5.length;i++){var _8=_5[i],_9=_8[_4],_10=_3.find(_4,_9)
;if(_10!=null){_8[_2]=_10[_2];_6=true}
}
if(_6&&this.separateSpecialValues){if(this.separateValuesList)this.separateValuesList.markForRedraw()}
}
}
}
,isc.A.$82s=function isc_ComboBoxItem__markPending(){var _1=this.$82t;this.$82t=true;this.$824=this.getEnteredValue();if(!_1)this.updateState()}
,isc.A.$82u=function isc_ComboBoxItem__markNotPending(){if(!this.$82t)return;this.$82t=null;this.$824=null;this.updateState()}
,isc.A.getTextBoxStyle=function isc_ComboBoxItem_getTextBoxStyle(){if(this.pendingTextBoxStyle==null||!this.$82t||this.$68y()){if(this.$68y())return isc.TextItem.getInstanceProperty("textBoxStyle");return this.Super("getTextBoxStyle",arguments)}
return this.pendingTextBoxStyle}
,isc.A.$1748=function isc_ComboBoxItem__remappedDisplayValueUnchanged(_1){if(this.$66x){for(var i in this.$66x){if(i==_1){return false}
}
}
return this.Super("$1748",arguments)}
,isc.A.$10y=function isc_ComboBoxItem__updateValue(_1,_2){var _3=this.$84z(),_4=(!_2&&!this.$201&&(this.addUnknownValues==false||_3));var _5=false;if(this.addUnknownValues==false&&_4&&this.allowEmptyValue&&(_1==""))
{_4=false;if(!_3)_5=true}
if(!_4){this.$82u();var _6=this.mapDisplayToValue(_1);if(this.$201)this.explicitChoice=this.$201;if(this.compareValues(_6,this._value)){if(_5){this.refreshPickList(_1)}
return true}
this.explicitChoice=this.$201;return this.Super("$10y",arguments)}else{if(this.changeOnKeypress&&this.length!=null&&isc.isA.String(_1)&&_1.length>this.length){_1=_1.substring(0,this.length);this.setElementValue(_1)}
if(this.$84z())return;if(!this.$82t)return;if(this.$824!=this.getElementValue()){this.$824=this.getElementValue()}
if(this.$824==this.$111h)return;this.$111h=this.$824;this.refreshPickList(_1)}
}
,isc.A.$122m=function isc_ComboBoxItem__minimalUpdateValue(_1){this.refreshPickList(_1)}
,isc.A.handleChanged=function isc_ComboBoxItem_handleChanged(_1,_2){var _3=this.Super("handleChanged",arguments);this.refreshPickList(this.getEnteredValue());return _3}
,isc.A.refreshPickList=function isc_ComboBoxItem_refreshPickList(_1){var _2=(!_1||_1==isc.emptyString);if(!_2)delete this.$200;var _3=this.pickList,_4=this.$128z();if(_2&&!this.$200){if(_4)_3.hide()}else if(this.showPickListOnKeypress||_4){if(!this.$201&&this.hasFocus){this.$143h(_1)}
}
}
,isc.A.$143h=function isc_ComboBoxItem__refreshPickList(_1){if(!this.filterWithValue&&(this.$84k!=_1)){this.filterWithValue=true;delete this.$84k}
this.showPickList(true,true)}
,isc.A.selectDefaultItem=function isc_ComboBoxItem_selectDefaultItem(){if(this.pickList==null||this.pickList.destroyed)return;var _1=this.pickList.selectionManager;var _2;if(!this.addUnknownValues&&this.$824!=null){_2=this.getPickListRecordForValue(this.$824)
}else{_2=this.getSelectedRecord()}
if(_2){this.pickList.clearLastHilite();this.delayCall("selectItemFromValue",[_2[this.getValueFieldName()]]);return}
var _2=this.pickList.getRecord(0);if(_2==null||Array.isLoading(_2)||_2[this.pickList.isSeparatorProperty])return;_1.selectSingle(_2);this.pickList.clearLastHilite();this.pickList.scrollRecordIntoView(0)}
,isc.A.getSelectedRecord=function isc_ComboBoxItem_getSelectedRecord(){var _1=this.Super("getSelectedRecord",arguments);if(_1==null&&this._value!=null){_1=this.getPickListRecordForValue(this._value);if(_1!=null&&this.optionDataSource){var _2=this.$848([_1]);if(_2){this.$846();if(this.getDisplayFieldName()!=this.getValueFieldName()){this.updateDisplayValueMap()}
}
}
}
return _1}
,isc.A.getPickListRecordForValue=function isc_ComboBoxItem_getPickListRecordForValue(_1,_2){var _3;if(this.pickList==null||this.pickList.destroyed){if(this.progressiveLoading===true||this.progressiveLoading===false){if(this.pickListProperties==null)this.pickListProperties={};this.pickListProperties.progressiveLoading=this.progressiveLoading}
this.makePickList(false)}
if(_2==null)_2=this.getValueFieldName();if(this.pickList&&this.pickList.data){var d=this.pickList.data;if(isc.isA.ResultTree(d))d=d.$737||d.$27m;_3=d&&d.find(_2,_1)}
return _3}
,isc.A.$128s=function isc_ComboBoxItem__shouldFetchMissingValue(_1,_2){if(this.fetchMissingValues==false)return false;var _3=this.getOptionDataSource();if(_3==null)return false;var _4=this.Super("$128s",arguments);if(_4==false)return false;if(_1!=null&&_3){var _5=(this.pickList&&this.pickList.data&&!this.pickList.data.$882)?this.getPickListRecordForValue(_1,_2):null;if(_5!=null){this.$848([_5]);this.updateDisplayValueMap(true);return false}
}
return _4}
,isc.A.getPickListFilterOperator=function isc_ComboBoxItem_getPickListFilterOperator(){switch(this.textMatchStyle){case"startsWith":return"iStartsWith";case"exactCase":return"equals";case"exact":return"iEquals";case"substring":default:return"iContains"}
}
,isc.A.getPickerSearchValue=function isc_ComboBoxItem_getPickerSearchValue(){if(this.pickerSearchForm&&this.pickerSearchForm.isVisible()){return this.pickerSearchForm.getValue("s")}
var _1=this.$82p;if(_1==null){if(this.$1441){_1=this.getValue()}else _1=this.getEnteredValue()}
return _1
}
,isc.A.getPickListFilterCriteria=function isc_ComboBoxItem_getPickListFilterCriteria(){var _1=this.getOptionCriteriaCopy(),_2=this.pickListCriteria,_3=this.getOptionDataSource()
;if(_1!=null&&this.useOptionTextMatchStyleInPickList&&_1._constructor!="AdvancedCriteria"&&this.textMatchStyle!=this.optionTextMatchStyle)
{_1=isc.DataSource.convertCriteria(_1,this.optionTextMatchStyle,_3)}
if(_2!=null){_2=isc.addProperties({},_2);if(_1==null)_1=_2;else{_1=(_3||isc.DS).combineCriteria(_1,_2)}
}
if(this.alwaysFilterWithValue||this.filterWithValue){var _4=this.filterFields;if(_4==null){_4=[this.getDisplayFieldName()||this.getValueFieldName()]
}
var _5=this.$82p||this.getPickerSearchValue();var _6;if(_4.length==1){_6={};_6[_4[0]]=_5}else{_6={_constructor:"AdvancedCriteria",operator:"or",criteria:[]
}
for(var i=0;i<_4.length;i++){_6.criteria.add({fieldName:_4[i],value:_5,operator:this.getPickListFilterOperator()
})}
}
if(_1==null)_1=_6;else _1=(_3||isc.DS).combineCriteria(_1,_6,"and",this.textMatchStyle)}
if(_1&&this.form){_1=isc.DataSource.resolveDynamicCriteria(_1,this.form.getRuleContext())}
return _1||{}}
,isc.A.isEntryTooShortToFilter=function isc_ComboBoxItem_isEntryTooShortToFilter(){var _1=this;if(this.pickerSearchField
&&this.pickerSearchField.isDrawn()&&this.pickerSearchField.isVisible())
{_1=this.pickerSearchField}
var _2=_1.getEnteredValue();var _3=(this.minimumSearchLength&&(_2!=null&&_2.length<this.minimumSearchLength));var _4=((this.filterWithValue||this.alwaysFilterWithValue)&&_3);return _4}
,isc.A.getEntryTooShortMessage=function isc_ComboBoxItem_getEntryTooShortMessage(){return this.searchStringTooShortMessage}
,isc.A.$849=function isc_ComboBoxItem__refreshForDisplayValueChange(){if(!this.hasFocus)return true;if(!this.addUnknownValues)return!this.$82t;return!!this.explicitChoice}
,isc.A.elementBlur=function isc_ComboBoxItem_elementBlur(){this.Super("elementBlur",arguments);if(isc.Browser.isMobile||this.hasPopOutPicker()){this.delayCall("hidePickListOnBlur",[true],100)}else{this.hidePickListOnBlur()}
}
,isc.A.hidePickListOnBlur=function isc_ComboBoxItem_hidePickListOnBlur(_1){delete this.$111h;if(_1&&((this.hasFocus&&this.containerWidget.hasFocus)||(this.pickList&&this.pickList.body.hasFocus))
)
{return}
if(isc.ComboBoxItem.$249p){return}
if(this.pickList&&this.pickList.$93s){return}
var _2=this.pickList,_3=isc.EH,_4=_3.lastEvent;if(this.$84z()||(isc.Browser.isIE&&this.getActiveElement()==this.getDataElement())
)
{return}
delete this.$19i;delete this.$43i;delete this.$19g;if(_2&&_2.isVisible()&&_2.formItem==this){_2.hide()}
this.updateState()}
,isc.A.$84z=function isc_ComboBoxItem__mouseDownInPickList(){var _1=this.pickList;if(!_1||!_1.isVisible()||!_1.isDrawn())return false;var _2=isc.EH,_3=isc.EH.lastEvent;if((_3.eventType=="selectionChange"&&_1.contains(isc.EH.mouseDownTarget()))
||((_3.eventType==_2.MOUSE_DOWN||_3.eventType==_2.CLICK||_3.eventType==_2.MOUSE_UP||_3.eventType==_2.POINTER_DOWN||_3.eventType==_2.POINTER_CANCEL||_3.eventType==_2.POINTER_UP||(_3.eventType==_2.MOUSE_MOVE&&_2.stillWithinMouseDownTarget())
)&&(_1.contains(_3.target,true)||(_1.filterEditor&&_1.filterEditor.getEditForm()==_3.target)||(this.pickerSearchForm&&this.pickerSearchForm.contains(_3.target,true))
))
)
{return true}
return false}
,isc.A.editorEnter=function isc_ComboBoxItem_editorEnter(_1,_2,_3){this.$66s()}
,isc.A.editorExit=function isc_ComboBoxItem_editorExit(_1,_2,_3){if(this.$176g()&&(_3==null||isc.isAn.emptyString(_3)))
{this.$66t()}
}
,isc.A.showPicker=function isc_ComboBoxItem_showPicker(){var _1=this.hasPopOutPicker();if(!_1){this.focusInItem()}
this.filterWithValue=this.minimumSearchLength;var _2=this.getEnteredValue(),_3=(!_2||_2==isc.emptyString);this.$84k=_2;this.$200=_3;this.showPickList();if(_1&&this.pickerSearchForm){if(!_3&&this.addUnknownValues&&this.isUnknownValue(_2))
{this.pickerSearchForm.setValues({s:_2})}else{this.pickerSearchForm.clearValues()}
if(this.pickerSaveButton)this.pickerSaveButton.disable();if(_1&&this.pickList){this.delayCall("delayedFocusOnPickListBody",null,0)}
}
}
);isc.evalBoundary;isc.B.push(isc.A.delayedFocusOnPickListBody=function isc_ComboBoxItem_delayedFocusOnPickListBody(){var _1=this.pickList?this.pickList.body:null;if(_1!=null)_1.focus()}
,isc.A.renderDisabledEventMask=function isc_ComboBoxItem_renderDisabledEventMask(){if(isc.Browser.isMobile&&this.hasPopOutPicker())return true;return this.Super("renderDisabledEventMask",arguments)}
,isc.A.$200o=function isc_ComboBoxItem__shouldFocusInPickerIcon(){if(!isc.Browser.isMobile||!this.hasPopOutPicker())return false;var _1=this.getPickerIcon();return this.$16f(_1,true)&&_1.canFocus!=false}
,isc.A.getFocusElement=function isc_ComboBoxItem_getFocusElement(){var _1=this.invokeSuper(isc.ComboBoxItem,"getFocusElement");return _1&&this.$200o()?this.$16g(this.getPickerIcon()):_1}
,isc.A.handleClick=function isc_ComboBoxItem_handleClick(){if(!this.isDisabled()&&!this.isReadOnly()&&this.hasPopOutPicker()){if(this.$200o())this.focusInItem();this.showPicker()}
return this.Super("handleClick",arguments)}
,isc.A.pickValue=function isc_ComboBoxItem_pickValue(_1){this.$66s();if(this.dataSetType=="tree"&&this.pickList&&this.pickList.selection){var _2=this.pickList.selection.lastSelectionItem;if(_2){_2=isc.addProperties({},_2);delete _2.children;this.$848([_2]);this.$846();if(this.getDisplayFieldName()!=this.getValueFieldName()){this.updateDisplayValueMap()}
}
}
var _3=this.$1416(_1);this.setElementValue(_3);if(this.hasFocus)this.selectValue();this.$201=true;this.$66x={};this.$66x[_3]=_1;this.$10y(_3);delete this.$201}
,isc.A.setValueMap=function isc_ComboBoxItem_setValueMap(){this.Super("setValueMap",arguments);if(this.pickList){if(this.pickList.isVisible())this.pickList.hide();delete this.pickList.formItem
this.setUpPickList(this.pickList.isVisible())}
if(this.addUnknownValues){var _1=this.getDisplayValue();if(isc.isAn.emptyString(_1)&&this.$176g()){this.$66t()}else{this.setElementValue(_1)}
}
}
,isc.A.setValue=function isc_ComboBoxItem_setValue(_1,_2,_3,_4,_5){var _6=this._value!=_1;if(!_6){if(this.$82t&&(this.$82p!=null||this.hasFocus))
{this.setElementValue(this.$824);return}
}
this.$82u();this.$43o=true;this.invokeSuper(isc.ComboBoxItem,"setValue",_1,_2,_3,_4,_5);delete this.$43o;if(!this.hasFocus&&this.$176g()&&this.getHint()){var _7;if(_1===_7||_1==null||isc.is.emptyString(_1)){this.$66t()}
}
if(_3||_1==null){this.explicitChoice=false}else if(_6){this.explicitChoice=true}
}
,isc.A.getDefaultValue=function isc_ComboBoxItem_getDefaultValue(){var _1=this.Super("getDefaultValue",arguments);if(_1==null&&this.defaultToFirstOption){_1=this.getFirstOptionValue()}
return _1}
,isc.A.makePickList=function isc_ComboBoxItem_makePickList(_1){var _2=this.$294z();if(!isc.ComboBoxItem.$1695&&_2!=null&&_2.showFilterEditor)
{this.logWarn("ComboBoxItem.pickListProperties specified with 'showFilterEditor' set to true. The 'showFilterEditor' property is not supported for the pickList of a ComboBoxItem and may result in unexpected user experience.");isc.ComboBoxItem.$1695=true}
this.$128m(false);if(this.progressiveLoading===true||this.progressiveLoading===false){if(this.pickListProperties==null)this.pickListProperties={};this.pickListProperties.progressiveLoading=this.progressiveLoading}
if(!this.filterLocally&&this.specialValues&&!this.separateSpecialValues&&this.$19m())
{if(this.pickListProperties==null)
this.pickListProperties={};if(this.pickListProperties.dataProperties==null)
this.pickListProperties.dataProperties={};this.pickListProperties.dataProperties.fetchMode="basic"}
var _3=isc.PickList.getPrototype().makePickList;return _3.apply(this,arguments)}
,isc.A.shouldGenerateExactMatchCriteria=function isc_ComboBoxItem_shouldGenerateExactMatchCriteria(){if(this.generateExactMatchCriteria!=null)return this.generateExactMatchCriteria;var _1=this.form.getDataSource();if(_1&&_1.supportsAdvancedCriteria())return true;return false}
,isc.A.hasAdvancedCriteria=function isc_ComboBoxItem_hasAdvancedCriteria(){if(this.Super("hasAdvancedCriteria",arguments))return true;if(this.explicitChoice&&this.shouldGenerateExactMatchCriteria())
return true;return false}
,isc.A.$182a=function isc_ComboBoxItem__usePickListFilterAsCriteria(){return this.addUnknownValues&&!this.explicitChoice&&this.operator==null}
,isc.A.getCriteriaFieldName=function isc_ComboBoxItem_getCriteriaFieldName(){if(this.criteriaField!=null)return this.criteriaField;if(this.displayField!=null&&this.$182a()){return this.displayField}
return this.getDataPath()||this.getFieldName()}
,isc.A.getCriteriaValue=function isc_ComboBoxItem_getCriteriaValue(){if(this.displayField!=null&&!this.$1441&&this.$182a())
{var _1=this.getEnteredValue();if(_1!=this.emptyDisplayValue){return _1}
}
return this.Super("getCriteriaValue",arguments)}
,isc.A.getOperator=function isc_ComboBoxItem_getOperator(_1){var _2;if(this.operator!=null){_2=this.operator}else if(this.$182a()){_2=this.getPickListFilterOperator()}else{if(this.shouldGenerateExactMatchCriteria()){_2="equals"
}else{_2=this.Super("getOperator",arguments)}
}
return _2}
,isc.A.canEditSimpleCriterion=function isc_ComboBoxItem_canEditSimpleCriterion(_1){if(this.getDataPath()&&_1==this.getDataPath())return true;if(this.criterionField)return _1==this.criterionField;if(this.displayField&&_1==this.displayField)return true;return this.getFieldName()==_1}
,isc.A.setSimpleCriterion=function isc_ComboBoxItem_setSimpleCriterion(_1,_2){if(this.criterionField==null&&this.displayField!=null&&_2==this.displayField){this.setValue(_1,null,true)}else{this.setValue(_1)}
}
,isc.A.canEditCriterion=function isc_ComboBoxItem_canEditCriterion(_1,_2){if(!this.addUnknownValues){return this.Super("canEditCriterion",arguments)}
if(this.getDataPath()&&_1.fieldName==this.getDataPath())return true;var _3=_1.fieldName,_4=this.criterionField||this.getFieldName(),_5=this.Super("getOperator",[]);if(_3!=null){if(this.displayField==null){if(_3==_4){return _1.operator==_5
||_1.operator==this.getPickListFilterOperator()}
}else{if(_3==_4){return _1.operator==_5}else if(_3==this.displayField){return _1.operator==this.getPickListFilterOperator()}
}
}
return false}
,isc.A.setCriterion=function isc_ComboBoxItem_setCriterion(_1){if(!this.addUnknownValues||this.displayField==null||_1.fieldName!=this.displayField)
{return this.Super("setCriterion",arguments)}
var _2=_1.value;this.setElementValue(_2);this.$43f(_2);var _3=this.mapDisplayToValue(_2);if(!this.compareValues(_3,this._value))this.saveValue(_3)}
,isc.A.$43f=function isc_ComboBoxItem__checkForDisplayFieldValue(_1,_2){var _3=(this.$17b(_1,true)!=null);if(_3){return}
if(this.$43j){this.$43k=true;return}
if(this.pickList!=null&&this.pickList.formItem==this&&isc.isA.ResultSet(this.pickList.data)&&this.pickList.data.allRowsCached())
{return}
this.invokeSuper(isc.ComboBoxItem,"$43f",_1)}
,isc.A.$17b=function isc_ComboBoxItem__mapKey(_1,_2,_3,_4,_5,_6){var _7=this.invokeSuper(isc.ComboBoxItem,"$17b",_1,true,_3,_4,_5,_6);if(_7==null&&this.getDisplayFieldName()!=null){var _8=this.$19o(_1,false),_9;if(_8!==_9){_7=_8}else if(this.specialValues){var _10=this.specialValues;if(isc.isA.String(_10))_10=this.getGlobalReference(_10);if(!isc.isAn.Array(_10)){if(isc.PickList.emptyStoredValue&&_1===null){_1=isc.PickList.emptyStoredValue}
if(_10[_1]!==_9)_7=_10[_1]}
}
}
if(_7==null&&!_2)_7=_1;return _7}
,isc.A.mapDisplayToValue=function isc_ComboBoxItem_mapDisplayToValue(_1,_2,_3,_4){if(this.$66x){for(var i in this.$66x){if(i==_1){return this.$66x[i]}
}
delete this.$66x}
if(this.getDisplayFieldName()!=null){var _6;_6=(_1==this.emptyDisplayValue)?null
:this.$19o(_1,true);if(_6!=null)_1=_6}
return this.invokeSuper(isc.ComboBoxItem,"mapDisplayToValue",_1,_2,_3,_4)}
,isc.A.$85m=function isc_ComboBoxItem__shouldAllowExpressions(){return false}
,isc.A.$17h=function isc_ComboBoxItem__getAutoCompleteSetting(){return this.$27r}
);isc.B._maxIndex=isc.C+84;isc.ComboBoxItem.registerStringMethods({dataArrived:"startRow,endRow,data",getPickListFilterCriteria:""});isc.defineClass("BoundDSFieldPicker","ComboBoxItem");isc.A=isc.BoundDSFieldPicker.getPrototype();isc.A.width="*";isc.A.addUnknownValues=false;isc.A=isc.BoundDSFieldPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_BoundDSFieldPicker_init(){if(this.requiresDSField){var _1=this.requiresDSField,_2=this.form.getValues(),_3=_2[_1]
;if(_3){var _4=isc.DS.get(_3),_5=(_4?_4.getFieldNames():null)
;this.valueMap=_5}
}else{this.logInfo("BoundDSFieldPicker specified on '"+this.name+"' without a requiresDSField attribute")}
this.Super("init",arguments)}
);isc.B._maxIndex=isc.C+1;isc.defineClass("BoundDSMultiFieldPicker","SelectItem");isc.A=isc.BoundDSMultiFieldPicker.getPrototype();isc.A.width="*";isc.A.addUnknownValues=false;isc.A.multiple=true;isc.A.multipleAppearance="picklist";isc.A=isc.BoundDSMultiFieldPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_BoundDSMultiFieldPicker_init(){if(this.requiresDSField){var _1=this.requiresDSField,_2=this.form.getValues(),_3=_2[_1]
;if(_3){var _4=isc.DS.get(_3),_5=(_4?_4.getFieldNames():null)
;this.valueMap=_5}
}else{this.logInfo("BoundDSMultiFieldPicker specified on '"+this.name+"' without a requiresDSField attribute")}
this.Super("init",arguments)}
);isc.B._maxIndex=isc.C+1;isc.defineClass("SingleFieldPicker","SelectItem");isc.A=isc.SingleFieldPicker.getPrototype();isc.A.width="*";isc.A.allowEmptyValue=true;isc.A.addUnknownValues=false;isc.A.multiple=false;isc.A=isc.SingleFieldPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_SingleFieldPicker_init(){if(this.form&&this.form.currentComponent&&this.form.currentComponent.liveObject){var _1=this.form.currentComponent.liveObject,_2=[],_3={}
;if(_1.getAllFields){_2=_1.getAllFields()||[]}else{var _4=_1.optionDataSource||_1.dataSource;if(isc.isA.String(_4))_4=isc.DS.get(_4);if(_4){_2=_4.getFieldNames().map(function(_7){return{name:_7}})}
}
for(var i=0;i<_2.length;i++){var _6=_2[i];if(_6.excludeFromState)continue;_3[_6.name]=_6.name}
this.valueMap=_3}else{this.logInfo("SingleFieldPicker specified without the expected context")}
this.Super("init",arguments)}
);isc.B._maxIndex=isc.C+1;isc.defineClass("LayoutMemberPicker","SelectItem");isc.A=isc.LayoutMemberPicker.getPrototype();isc.A.width="*";isc.A.allowEmptyValue=true;isc.A.addUnknownValues=false;isc.A.multiple=false;isc.A=isc.LayoutMemberPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_LayoutMemberPicker_init(){if(this.form&&this.form.currentComponent&&this.form.currentComponent.liveObject){var _1=this.form.currentComponent.liveObject,_2=_1.getMembers(),_3=[]
;for(var i=0;i<_2.length;i++){_3.add(_2[i].getLocalId())}
this.valueMap=_3}else{this.logInfo("LayoutMemberPicker specified without the expected context")}
this.Super("init",arguments)}
);isc.B._maxIndex=isc.C+1;isc.defineClass("TabSetTabPicker","SelectItem");isc.A=isc.TabSetTabPicker.getPrototype();isc.A.width="*";isc.A.allowEmptyValue=true;isc.A.addUnknownValues=false;isc.A.multiple=false;isc.A=isc.TabSetTabPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_TabSetTabPicker_init(){if(this.form&&this.form.currentComponent&&this.form.currentComponent.liveObject){var _1=this.form.currentComponent.liveObject,_2=_1.tabs,_3={}
;for(var i=0;i<_2.length;i++){var _5=_2[i],_6=_5.title||_5.name||"Tab "+i
;_3[i]=_6}
this.valueMap=_3}else{this.logInfo("TabSetTabPicker specified without the expected context")}
this.Super("init",arguments)}
);isc.B._maxIndex=isc.C+1;isc.defineClass("NavItemPicker","SelectItem");isc.A=isc.NavItemPicker.getPrototype();isc.A.width="*";isc.A.allowEmptyValue=true;isc.A.addUnknownValues=false;isc.A.multiple=false;isc.A=isc.NavItemPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_NavItemPicker_init(){if(this.form&&this.form.currentComponent&&this.form.currentComponent.liveObject){var _1=this.form.currentComponent.liveObject,_2=_1.getAllItems(),_3={}
;if(_2){_2.map(function(_6){var _4=_6.autoId||_6.id,_5=_6.title
;_3[_4]=_5+(_4!=_5?" ("+_4+")":"")})}
this.valueMap=_3}else{this.logInfo("NavItemPicker specified without the expected context")}
this.Super("init",arguments)}
);isc.B._maxIndex=isc.C+1;isc.defineClass("ProjectDataSourcePicker","SelectItem");isc.A=isc.ProjectDataSourcePicker.getPrototype();isc.A.width="*";isc.A.addUnknownValues=false;isc.A.multiple=false;isc.A.allowEmptyValue=true;isc.A.emptyDisplayValue="[none]";isc.A.emptyPickListMessage="No project DataSources";isc.A=isc.ProjectDataSourcePicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_ProjectDataSourcePicker_init(){var _1=this.form.builder;this.valueMap=_1.getProjectDataSourceNames();this.Super("init",arguments);if(_1.project&&_1.project.datasources){this.observe(_1.project.datasources,"dataChanged","observer.dataSourcesChanged();")}
}
,isc.A.dataSourcesChanged=function isc_ProjectDataSourcePicker_dataSourcesChanged(){var _1=this.form.builder;this.setValueMap(_1.getProjectDataSourceNames())}
);isc.B._maxIndex=isc.C+2;isc.defineClass("DynamicFormPicker","SelectItem")
isc.A=isc.DynamicFormPicker.getPrototype();isc.A.width="*";isc.A.addUnknownValues=false;isc.A.multiple=false;isc.A.allowEmptyValue=true;isc.A.emptyDisplayValue="[none]";isc.A.emptyPickListMessage="No DynamicForms found";isc.A=isc.DynamicFormPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_DynamicFormPicker_init(){var _1=this.form.builder,_2=_1.getEditNodesByType("DynamicForm")
;this.valueMap=_2.getProperty("ID");this.Super("init",arguments)}
);isc.B._maxIndex=isc.C+1;isc.defineClass("NonFormDBCPicker","SelectItem")
isc.A=isc.NonFormDBCPicker.getPrototype();isc.A.width="*";isc.A.addUnknownValues=false;isc.A.multiple=false;isc.A.allowEmptyValue=true;isc.A.emptyDisplayValue="[none]";isc.A.emptyPickListMessage="No DataBoundComponents found";isc.A=isc.NonFormDBCPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_NonFormDBCPicker_init(){var _1=this.form.builder,_2=_1.getEditNodesByType(["ListGrid","TreeGrid","TileGrid","FacetChart"])
;this.valueMap=_2.getProperty("ID");this.Super("init",arguments)}
);isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("MultiComboBoxItem","CanvasItem");isc.A=isc.MultiComboBoxItem;isc.A.FLOW="flow";isc.A.FLOW_REVERSE="flowReverse";isc.A.HORIZONTAL="horizontal";isc.A.HORIZONTAL_REVERSE="horizontalReverse";isc.A.VERTICAL="vertical";isc.A.VERTICAL_REVERSE="verticalReverse";isc.A.$96a="$96b";isc.A.defaultHint="Enter values";isc.A=isc.MultiComboBoxItem;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$96d=isc.Array.$96d;isc.B.push(isc.A.$96c=function isc_c_MultiComboBoxItem__binarySearch(_1,_2,_3,_4){if(!_3){_3=isc.MultiComboBoxItem.$96d}
var _5;if(_4===_5){_4=true}
return isc.Array.$96c(_2,_1,_3,_4)}
,isc.A.$96e=function isc_c_MultiComboBoxItem__transferMember(_1,_2,_3,_4,_5){var _6=_1.getMember(_2);if(_1.Class=="FlowLayout"||_3.Class=="FlowLayout"){_1.removeMember(_6,_5)}
_3.addMember(_6,_4,_5)}
,isc.A.$96f=function isc_c_MultiComboBoxItem__transferMembers(_1,_2,_3,_4,_5,_6){var _7=isc.MultiComboBoxItem.$96e;for(var i=0;i<_1;++i){_7(_2,_3,_4,_5+i,_6)}}
,isc.A.$96g=function isc_c_MultiComboBoxItem__transferMembersReverse(_1,_2,_3,_4,_5,_6){var _7=isc.MultiComboBoxItem.$96e;for(var i=0;i<_1;++i){_7(_2,_3+(_1-i-1),_4,_5+i,_6)}}
,isc.A.isOrderReversedForStyle=function isc_c_MultiComboBoxItem_isOrderReversedForStyle(_1){return _1==isc.MultiComboBoxItem.HORIZONTAL||_1==isc.MultiComboBoxItem.FLOW_REVERSE||_1==isc.MultiComboBoxItem.VERTICAL_REVERSE}
);isc.B._maxIndex=isc.C+5;isc.A=isc.MultiComboBoxItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.shouldSaveValue=true;isc.A.autoDestroy=true;isc.A.pickListConstructor=isc.ComboBoxItem.getInstanceProperty("pickListConstructor");isc.A.pickTreeConstructor=isc.ComboBoxItem.getInstanceProperty("pickTreeConstructor");isc.A.dataSetType=isc.ComboBoxItem.getInstanceProperty("dataSetType");isc.A.rootNodeId=isc.ComboBoxItem.getInstanceProperty("rootNodeId");isc.A.autoOpenTree=isc.ComboBoxItem.getInstanceProperty("autoOpenTree");isc.A.addUnknownValues=false;isc.A.alwaysExitOnTab=true;isc.A.autoFetchData=false;isc.A.comboBoxDefaults={name:"cb",_autoAssignedName:true,showTitle:false,width:"*",showHintInField:true,completeOnTab:false,completeOnEnter:false,fetchValueOnTab:true,fetchValueOnEnter:true,loadingDisplayValue:null,clearEnteredValuePendingReply:true,shouldSaveValue:false,editorType:"ComboBoxItem",getTitle:function(){var _1=this.creator;return _1.getTitle.apply(_1,arguments)},handleKeyDown:function(_1,_2,_3){var _4=isc.EH.lastEvent.keyName,_5=_4==this.$jf;if(!this.hasFocus||this.isReadOnly()||!_5||this.creator.alwaysExitOnTab)
{return this.Super("handleKeyDown",arguments)}
var _6=this.pickList,_7=this.$128z(),_8=this.getEnteredValue(),_9=this.getDisplayFieldName(),_10=this.shouldFetchMissingDisplayValue(_8),_11=this.$1282()||this.$82q();if(_9!=null&&!_11&&_6&&(isc.isA.ResultSet&&isc.isA.ResultSet(_6.data))&&_6.data.localData&&_6.data.allMatchingRowsCached())
{_10=false;var _12=_6.data,_13=_12.localData.find(_9,_8);if(_13!=null)this.$953(_13)}
if(!this.creator.addUnknownValues){var _14;if(!_10&&(_14=this.mapDisplayToValue(_8))!=null)
{this.$10y(_8,true);if(_6)_6.hide()}
}else{if(_10){this.$128v(_8);if(this.clearEnteredValuePendingReply){this.setElementValue("")}
}else{this.$10y(_8,true)}
if(_6)_6.hide()}
this.invokeSuper(isc.ComboBoxItem,"handleKeyDown",_1,_2,_3);return false},changed:function(_1,_2){this.creator.$96p(_1,_2)},blur:function(_1,_2){this.creator.$161g(_1,_2,false)},focus:function(_1,_2){this.creator.$161g(_1,_2,true)}};isc.A.comboFormDefaults={_constructor:"DynamicForm",autoParent:"none",numCols:1,cellPadding:0,writeFormTag:false};isc.A.valueLayoutDefaults={tileMargin:0,layoutMargin:0};isc.A.buttonConstructor="IButton";isc.A.buttonDefaults={canHover:true,align:"left",icon:"[SKIN]actions/remove.png",iconAlign:"right",iconOrientation:"right",click:function(){this.creator.$1289(this)},hover:function(){this.creator.$wb();return false},focusChanged:function(_1){this.creator.$161h(this,_1)}};isc.A.pendingButtonStyle="buttonPending";isc.A.deselectedButtonStyle="buttonDeselected";isc.A.layoutStyle=isc.MultiComboBoxItem.FLOW;isc.A.comboBoxWidth=130;isc.A.useInsertionOrder=true;isc.B.push(isc.A.$170z=function isc_MultiComboBoxItem__canvasFocusChanged(){var _1=this.canvas&&this.canvas.containsFocus();if(!_1&&this.comboBox&&this.comboBox.pickList){_1=this.comboBox.pickList.containsFocus()}
if(!_1)_1=this.getFocusedButton()!=null;if(_1!=this.hasFocus){this.hasFocus=_1;var _2=this.form;if(this.canvas.containsFocus()){if(_2.getFocusSubItem()!==this){_2.setFocusItem(this);this.elementFocus()}
}else{this.elementBlur();if(_2.getFocusSubItem()===this)_2.setFocusItem(null)}
}}
,isc.A.getFocusedButton=function isc_MultiComboBoxItem_getFocusedButton(){var _1=false;for(var _2 in this.$96j){if(this.$96j.hasOwnProperty(_2)){var _3=this.$96j[_2];if(_3&&_3.containsFocus&&_3.containsFocus()){return _3}
}
}
return}
,isc.A.sortOrder=function isc_MultiComboBoxItem_sortOrder(_1,_2){var _3=this.getDisplayFieldName(),a=_1[_3],b=_2[_3];return isc.MultiComboBoxItem.$96d(a,b)}
);isc.B._maxIndex=isc.C+3;isc.A=isc.MultiComboBoxItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.loadingDisplayValue=null;isc.A.$77l="button";isc.A.$131u="$131v";isc.A.$161u="$161v";isc.B.push(isc.A.init=function isc_MultiComboBoxItem_init(){this.multiple=true;this.autoTrimMultipleValues=false;this.$161a=isc.Set.create();this.fetchMissingValues=true;if(this.value==null&&this.defaultValue!=null){this.value=this.defaultValue}
this.$96h=[];this.$96i=[];this.$96j={};this.$96k=[];return this.Super("init",arguments)}
,isc.A.setAddUnknownValues=function isc_MultiComboBoxItem_setAddUnknownValues(_1){var _2=this.addUnknownValues;this.addUnknownValues=_1;if(this.comboBox!=null&&_2!=_1){this.comboBox.setAddUnknownValues(_1);this.setValue(null);if(_1)this.invalidateDisplayValueCache()}}
,isc.A.$89y=function isc_MultiComboBoxItem__getCanvasTabDescendents(_1,_2){var _3=(this.alwaysExitOnTab||!this.$134m());if(!_3){this.Super("$89y",[this.comboForm,_2],arguments)}
if(this.useInsertionOrder){var k=0,_5=this.$96h.length;for(;k<_5;++k){var _6=this.$96s(k,false);_2.add(this.$96u.getMember(_6))}
}else{var j=0,_8=this.$96i.length;for(;j<_8;++j){var _6=this.$96s(false,j);_2.add(this.$96u.getMember(_6))}
}
if(_3){this.Super("$89y",[this.comboForm,_2],arguments)}}
,isc.A.$161i=function isc_MultiComboBoxItem__isStoredValueReverseOfButtonValues(){var _1=this.layoutStyle,_2=this.isRTL();return(this.useInsertionOrder&&((_1===isc.MultiComboBoxItem.FLOW&&!_2)||(_1===isc.MultiComboBoxItem.FLOW_REVERSE&&_2)||(_1===isc.MultiComboBoxItem.HORIZONTAL&&!_2)||(_1===isc.MultiComboBoxItem.HORIZONTAL_REVERSE&&_2)||_1===isc.MultiComboBoxItem.VERTICAL_REVERSE))}
,isc.A.$96l=function isc_MultiComboBoxItem__storeValue(){var _1=!!this.pendingStatus;var _2;if(this.useInsertionOrder){_2=this.$96h.duplicate();if(this.$161i()){_2.reverse()}
}else{_2=this.$96i.duplicate()}
if(this.deselectedButtonStyle!=null&&this.$161r()){var _3=this.$96j;for(var _4=_2.length;_4>0;--_4){var _5=_2[_4-1],_6=_3[_5];if(_6.$161w){_2.removeAt(_4-1)}
}
}
if(_2.length==0){this.storeValue(null)}else{this.storeValue(_2)}
if(_1&&!!this.pendingStatus)this.$161j()}
,isc.A.$96m=function isc_MultiComboBoxItem__createButtonForValue(_1,_2){var _3={title:_2,width:1,overflow:"hidden"
};if(!this.$96o()){_3.width=this.canvas.getWidth()}else{_3.overflow="visible"}
var _4=this.createAutoChild(this.$77l,_3,isc.IButton);this.$96j[_1]=_4;_4[isc.MultiComboBoxItem.$96a]=_1;return _4}
,isc.A.$96p=function isc_MultiComboBoxItem__comboBoxItemChanged(_1,_2){var _3=_2.getValue();if(_3==null||isc.isAn.emptyString(_3))return;if(!_2.$19m()){var _4=true;if(!this.addUnknownValues){var _5=true,_6=this.getValueMap();if(_6!=null){if(isc.isAn.Array(_6)){if(_6.contains(_3))_5=false}else if(isc.isAn.Object(_6)){for(var _7 in _6){if(_7==_3)_5=false}
}
}
if(_5)_4=false}
if(_4&&this.$96r(_3)){this.$96l()}
}else{var _8=this.comboBox.$847,_9=this.getValueFieldName(),_10=(_8==null?null:_8.find(_9,_3));;if(_10==null){_10=this.comboBox.getSelectedRecord()}
if(_10==null&&this.addUnknownValues){_10={};_10[_9]=_3;var _11=this.getDisplayFieldName();if(_11)_10[_11]=_3}
if(_10!=null){var _12=this.$953(_10);this.updateDisplayValueMap(false);if(this.$96r(_3))this.$96l()}
}
_2.clearValue()}
,isc.A.$161g=function isc_MultiComboBoxItem__comboBoxItemFocusChanged(_1,_2,_3){var _4=this.form,_5=this.ns.EH.getFocusCanvas();if(_5!=null&&this.canvas.contains(_5,true)){if(_4.getFocusSubItem()!==this){_4.setFocusItem(this);this.elementFocus()}
}else{this.elementBlur();if(_4.getFocusSubItem()===this)_4.setFocusItem(null)}}
,isc.A.$134m=function isc_MultiComboBoxItem__isComboFormFirst(){var _1=this.useInsertionOrder,_2=this.layoutStyle;return(_1&&_2==isc.MultiComboBoxItem.HORIZONTAL)||_2==isc.MultiComboBoxItem.FLOW_REVERSE||_2==isc.MultiComboBoxItem.HORIZONTAL_REVERSE||_2==isc.MultiComboBoxItem.VERTICAL||(_1&&_2==isc.MultiComboBoxItem.VERTICAL_REVERSE)}
,isc.A.$96s=function isc_MultiComboBoxItem__transformIndex(_1,_2,_3){var _4=this.useInsertionOrder,_5=this.layoutStyle,_6=this.$96h.length,_7;if(_4){if(_5==isc.MultiComboBoxItem.FLOW||_5==isc.MultiComboBoxItem.FLOW_REVERSE){_7=_6-_1-1;if(_3){++_7}
}else{_7=_1}
}else{_7=_2}
if(this.$134m()){++_7}
return _7}
,isc.A.$96t=function isc_MultiComboBoxItem__getSortOrder(){var _1=this.getValueMap();if(_1==null&&this.getOptionDataSource()!=null){var _2=this,_3=this.getValueFieldName();return function(_9,_10){var _4=_2.$847,_5=(_4==null?null:_4.find(_3,_9)),_6=(_4==null?null:_4.find(_3,_10));if(_5==null||_6==null){var _7=_2.getOptionDataSource(),_8=(_7==null?null:_7.getCacheData());if(_8!=null){if(_5==null)_5=_8.find(_3,_9);if(_6==null)_6=_8.find(_3,_10)}
if(_5==null||_6==null){if(_5==null){_5={};_5[_3]=_9}
if(_6==null){_6={};_6[_3]=_10}
}
}
return _2.sortOrder.call(_2,_5,_6)}
}else{return isc.MultiComboBoxItem.$96d}}
,isc.A.$96r=function isc_MultiComboBoxItem__insertButtonForValue(_1){var _2=this.$96t();var j=isc.MultiComboBoxItem.$96c(_1,this.$96i,_2),_4=(j>=0),_5=false;if(!_4){j=-(j+1);var _6=this.getDisplayValue(_1),_7=this.$96m(_1,_6),_8=this.$96s(0,j,true);this.$96h.unshift(_1);this.$96i.addAt(_1,j);this.$96u.addMember(_7,_8)}else{var _8=this.$96s(!this.useInsertionOrder||this.$96h.indexOf(_1),j,false);var _9=this.$96u.getMember(_8);if(!_9.$161w){_9.animateFade(50,function(){_9.animateFade(100,null,100)},100)}else{_5=true;_9.$161w=false;_9.enable();_9.setBaseStyle(this.$161x());if(isc.Canvas.ariaEnabled())_9.setAriaState("hidden",!_9.isVisible())}
}
return!_4||_5}
,isc.A.$1289=function isc_MultiComboBoxItem__buttonClick(_1){if(this.isReadOnly()){return}
var _2=_1.hasFocus,_3=_1[isc.MultiComboBoxItem.$96a],_4=this.$96t(),j=isc.MultiComboBoxItem.$96c(_3,this.$96i,_4),k=this.$96h.indexOf(_3);var _7=this.deselectedButtonStyle;if(_7!=null&&this.$161r()&&this.$161a.has(_3)){_1.disable();_1.setBaseStyle(_7);_1.$161w=true}else{delete this.$96j[_3];var _8=this.$96u;_8.hideMember(_1,{target:this,methodName:this.$131u,args:[_8,_1]
});this.$955(_3);this.updateDisplayValueMap(false);this.$96h.splice(k,1);this.$96i.splice(j,1)}
if(isc.Canvas.ariaEnabled()&&!_1.destroyed)_1.setAriaState("hidden",true);if(_2){var _9=this.$96h.length;if(_9>0){var _10;if(this.useInsertionOrder){var _11=Math.max(0,k-1),_10=this.$96j[this.$96h[_11]]}else{var _12=Math.min(j,_9-1),_10=this.$96j[this.$96i[_12]]}
_10.focus()}else{this.comboBox.focusInItem()}
}
this.$96l()}
,isc.A.$161h=function isc_MultiComboBoxItem__buttonFocusChanged(_1,_2){var _3=this.form,_4=(_2?_1:this.ns.EH.getFocusCanvas());if(_4!=null&&this.canvas.contains(_4,true)){if(_3.getFocusSubItem()!==this){_3.setFocusItem(this);this.elementFocus(true)}
}else{this.elementBlur();if(_3.getFocusSubItem()===this)_3.setFocusItem(null)}}
,isc.A.$131v=function isc_MultiComboBoxItem__finishedHidingButton(_1,_2){_1.removeMember(_2,true);_2.destroy()}
,isc.A.$161v=function isc_MultiComboBoxItem__finishedHidingButtons(_1,_2){_1.removeMembers(_2,true);_2.callMethod("destroy")}
,isc.A.$96v=function isc_MultiComboBoxItem__removeAllButtons(){var _1=this.$96u;if(this.layoutStyle===isc.MultiComboBoxItem.FLOW||this.layoutStyle==isc.MultiComboBoxItem.FLOW_REVERSE){var _2;if(this.$134m()){_2=_1.tiles.slice(1)}else{_2=_1.tiles.slice(0,-1)}
for(var _3=_2.length;_3>0;--_3){var _4=_2[_3-1];_1.removeTile(_4);_4.destroy()}
}else{var _5;if(this.$134m()){_5=_1.members.slice(1)}else{_5=_1.members.slice(0,-1)}
_1.removeMembers(_5,true);_5.callMethod("destroy")}
if(!this.isDrawn()){this.invalidateDisplayValueCache(false)}
this.$96j={};this.$96h=[];this.$96i=[];this.$96k=[]}
,isc.A.drawn=function isc_MultiComboBoxItem_drawn(){var _1=this.Super("drawn",arguments),_2;if(this.$96w!==_2){var _3=this.getDisplayValue(this.$96w);this.showValue(_3,this.$96w,this.form,this);delete this.$96w}
return _1}
,isc.A.redrawn=function isc_MultiComboBoxItem_redrawn(){var _1=this.Super("redrawn",arguments);var _2=this.comboBox;if(_2!=null&&isc.screenReader)_2.addContentRoles();return _1}
,isc.A.showValue=function isc_MultiComboBoxItem_showValue(_1,_2,_3,_4){if(!this.isDrawn()){this.$96w=_2}else if(!_2){this.$96v()}else if(isc.isAn.Array(_2)){this.$96v();for(var i=0,_6=_2.length;i<_6;++i){var _7=_2[i];if(this.$959(_7)){this.$96r(_7,_1[i])}else{this.$96k.push(_7)}
}
}
this.$161j()}
,isc.A.$959=function isc_MultiComboBoxItem__isValueInCache(_1){return(!this.optionDataSource||(this.$17b(_1,true)!==null))}
,isc.A.$849=function isc_MultiComboBoxItem__refreshForDisplayValueChange(){return this.comboBox.$849.apply(this.comboBox,arguments)}
,isc.A.setValueMap=function isc_MultiComboBoxItem_setValueMap(_1){this.Super("setValueMap",arguments);this.comboBox.setValueMap.apply(this.comboBox,arguments)}
,isc.A.updateValueMap=function isc_MultiComboBoxItem_updateValueMap(_1){this.Super("updateValueMap",false);if(_1){var _2=this.$96t(),_3=this.$96o(),_4=this.useInsertionOrder,_5=this.$96h.length;var _6=this.canvas.getWidth();var _7=[];for(var i=0;i<_5;++i){var _9=this.$96h[i],_10=this.getDisplayValue(_9),j=isc.MultiComboBoxItem.$96c(_9,_7,_2),_12=this.$96j[_9];_12.setTitle(_10);if(!_3){_12.setWidth(_6)}
_12.setAutoFit(_3);_7.addAt(_9,-(j+1))}
var _13=this.$96i;this.$96i=_7;if(!_4){var _14=this.$96u,_15;for(var i=0;i<_5;++i){var _9=_13[i],j=_7.indexOf(_9);if(i!=j){_14.reorderMember(this.$96s(_15,i,false),this.$96s(_15,j,false))}
}
}
if(!this.$96k.isEmpty()){var _16=this.$96k.length,_17=0;for(var i=0;i<_16;++i){var j=i-_17,_9=this.$96k[j];if(this.$959(_9)){var _10=this.getDisplayValue(_9);this.$96r(_9,_10);this.$96k.splice(j,1);++_17}
}
}
}}
,isc.A.setLayoutStyle=function isc_MultiComboBoxItem_setLayoutStyle(_1){var _2=this.layoutStyle;if(!_1||(_2==_1)){return}
var _3=isc.MultiComboBoxItem.FLOW,_4=isc.MultiComboBoxItem.FLOW_REVERSE,_5=isc.MultiComboBoxItem.HORIZONTAL,_6=isc.MultiComboBoxItem.HORIZONTAL_REVERSE,_7=isc.MultiComboBoxItem.VERTICAL,_8=isc.MultiComboBoxItem.VERTICAL_REVERSE,_9=isc.MultiComboBoxItem.$96e,_10=isc.MultiComboBoxItem.$96f,_11=isc.MultiComboBoxItem.$96g,_12=this.useInsertionOrder,_13=this.comboBoxWidth,_14=true,_15=this.$96h.length,_16=_2==_5||_2==_4||_2==_8,_17=isc.MultiComboBoxItem.isOrderReversedForStyle(_1),_18=(_12?_11:_10)
;if(_1==_3||_1==_4){if(!isc.FlowLayout){isc.Log.logWarn("The ISC_Grids module must be loaded to use layoutStyle:\"flow\".  The MultiComboBoxItem will continue to use the \""+_2+"\" layout style.");return}
var _19=this.$96x(),_20=_19.animateTileChange;_19.animateTileChange=false;_9(this.$96u,(!_12&&_16?_15:0),_19,0,_14);_18(_15,this.$96u,0,_19,0,_14);this.canvas.removeMember(0,_14);this.$96u.destroy();this.$96u=_19;this.canvas.addMember(_19,0,_14)}else if(_1==_5||_1==_6||_1==_7||_1==_8)
{var _21=(_1==_5||_1==_6),_22=(_2==_5||_2==_6),_23=(_21?this.$96y:this.$96z);if(_2==_3||_2==_4||(_21!=_22))
{var _19=_23.call(this);if(_2==_3||_2==_4){this.$96u.animateTileChange=false;_9(this.$96u,_15,_19,0,_14);_18(_15,this.$96u,0,_19,(!_12&&_17?0:1),_14)}else if(_12||(_16==_17)){_10(_15+1,this.$96u,0,_19,0,_14)}else{_9(this.$96u,(_16?_15:0),_19,0,_14);_10(_15,this.$96u,0,_19,(_16?1:0),_14)}
this.canvas.removeMember(this.$96u,_14);this.$96u.destroy();this.$96u=_19;this.canvas.addMember(_19,0,_14);if(_12&&_17){this.$96u.reverseOrder=true;this.$96u.reflow()}
}else if(_12){if(_17!=_16){this.$96u.reverseOrder=_17;this.$96u.reflow()}
}else{if(!_17){_9(this.$96u,_15,this.$96u,0,_14)}else{_9(this.$96u,0,this.$96u,_15,_14)}
}
}else{return}
this.layoutStyle=_1;this.comboForm.setWidth(_1==_7||_1==_8
?"100%":_13);this.$960(this.$96o(_1));var _24;if(_20!==_24){_19.animateTileChange=_20}}
,isc.A.destroy=function isc_MultiComboBoxItem_destroy(){if(this.comboForm)this.comboForm.destroy();if(this.$96u)this.$96u.destroy();this.Super("destroy",arguments)}
,isc.A.handleEditorExit=function isc_MultiComboBoxItem_handleEditorExit(){var _1=this.$843;this.$843=true;var _2=this.Super("handleEditorExit",arguments);this.$843=_1;return _2}
,isc.A.$960=function isc_MultiComboBoxItem__setAutoFitButtons(_1){var _2=this.$96u;if(!_2)return;var _3=_2.getMembersLength(),_4=this.canvas.getWidth()
;for(var i=0;i<_3;i++){var _6=_2.getMember(i);if(isc.isA.StatefulCanvas(_6)){if(!_1)_6.setWidth(_4);_6.setAutoFit(_1)}
}}
,isc.A.setAutoFitButtons=function isc_MultiComboBoxItem_setAutoFitButtons(_1){var _2=this.$96o(),_3=this.$96o(null,_1);this.autoFitButtons=_1;if(_2!=_3){this.$960(_3)}}
,isc.A.$18y=function isc_MultiComboBoxItem__createCanvas(){if((this.layoutStyle==isc.MultiComboBoxItem.FLOW||this.layoutStyle==isc.MultiComboBoxItem.FLOW_REVERSE)&&!isc.FlowLayout){isc.Log.logWarn("The ISC_Grids module must be loaded to use layoutStyle:\"flow\".  The MultiComboBoxItem will default to using the \""+isc.MultiComboBoxItem.VERTICAL_REVERSE+"\" layout style.");this.layoutStyle=isc.MultiComboBoxItem.VERTICAL_REVERSE}
var _1;if(this.layoutStyle==isc.MultiComboBoxItem.FLOW||this.layoutStyle==isc.MultiComboBoxItem.FLOW_REVERSE||this.layoutStyle==isc.MultiComboBoxItem.HORIZONTAL||this.layoutStyle==isc.MultiComboBoxItem.HORIZONTAL_REVERSE)
{_1=this.comboBoxWidth}else{_1="100%"}
var _2=isc.addProperties({ID:this.ID+isc.$ag+"comboBox",hint:isc.MultiComboBoxItem.defaultHint},this.comboBoxDefaults,{displayField:this.displayField,valueField:this.valueField,pickListConstructor:this.pickListConstructor,pickTreeConstructor:this.pickTreeConstructor,dataSetType:this.dataSetType,rootNodeId:this.rootNodeId,autoOpenTree:this.autoOpenTree
},this.comboBoxProperties,{getOptionDataSource:function(_8,_9,_10,_11){return this.creator.getOptionDataSource(_8,_9,_10,_11)},getValueFieldName:function(_8,_9,_10,_11){return this.creator.getValueFieldName(_8,_9,_10,_11)},getDisplayFieldName:function(_8,_9,_10,_11){return this.creator.getDisplayFieldName(_8,_9,_10,_11)},creator:this,optionDataSource:this.optionDataSource,optionOperationId:this.optionOperationId,autoFetchData:this.autoFetchData,valueMap:this.valueMap,addUnknownValues:this.addUnknownValues,changeOnKeypress:!this.addUnknownValues
}
);var _3=this.addAutoChild("comboForm",{width:_1,items:[_2],visibility:this.renderAsReadOnly()||this.renderAsStatic()?isc.Canvas.HIDDEN:isc.Canvas.INHERIT,readOnlyDisplay:this.getReadOnlyDisplay(),canEdit:this.getCanEdit()
});var _4=this.comboBox=_3.getItem(0);var _5=isc.addProperties({},this.canvasDefaults,this.canvasProperties,{autoDraw:false,height:1
});var _6=isc.MultiComboBoxItem.isOrderReversedForStyle(this.layoutStyle);if(this.layoutStyle==isc.MultiComboBoxItem.HORIZONTAL||this.layoutStyle==isc.MultiComboBoxItem.HORIZONTAL_REVERSE){this.$96u=this.$96y();this.$96u.reverseOrder=_6}else if(this.layoutStyle==isc.MultiComboBoxItem.VERTICAL||this.layoutStyle==isc.MultiComboBoxItem.VERTICAL_REVERSE)
{var _7=this.width;if(_7!=null&&!_5.width){if(isc.isA.Number(_7))_7-=this.$141();_5.width=_7}
this.$96u=this.$96z();this.$96u.reverseOrder=_6}else if(this.layoutStyle==isc.MultiComboBoxItem.FLOW||this.layoutStyle==isc.MultiComboBoxItem.FLOW_REVERSE){this.$96u=this.$96x();this.$96u.reverseOrder=_6}
this.$96u.addMember(_3);_5.members=[this.$96u];this.canvas=isc.HLayout.create(_5);this.Super("$18y",arguments)}
,isc.A.$161x=function isc_MultiComboBoxItem__getNormalButtonStyle(){var _1,_2;if((_1=this.buttonProperties)!=null&&(_2=_1.baseStyle)!=null)
{return _2}else if((_1=this.buttonDefaults)!=null&&(_2=_1.baseStyle)!=null)
{return _2}else{var _3=isc.ClassFactory.getClass(this.getAutoChildClass(this.$77l,isc.IButton));return _3.$b4.baseStyle}}
,isc.A.$161j=function isc_MultiComboBoxItem__updatePendingStyles(){if(!this.$161p())return;var _1=this.pendingButtonStyle;if(_1==null)return;var _2=this.$161x();if(_1===_2)return;var _3=this.$96u;if(!this.pendingStatus){if(this.useInsertionOrder){var _4=this.$96h,_5=_4.length;for(var k=0;k<_5;++k){_3.getMember(this.$96s(k,false,false)).setBaseStyle(_2)}
}else{var _7=this.$96i,_8=_7.length;for(var j=0;j<_8;++j){_3.getMember(this.$96s(false,j,false)).setBaseStyle(_2)}
}
}else{var _10=this.$160w();var _11;if(_10==null)_11=0;else if(!isc.isAn.Array(_10)){_10=[_10];_11=1}else{_11=_10.length}
if(this.useInsertionOrder){var _4=this.$96h,_5=_4.length,_12=this.$161i();var i=0,k;for(;i<_11&&i<_5;++i){k=_12?_5-1-i:i;if(!isc.Canvas.compareValues(_10[i],_4[k]))break;var _14=_3.getMember(this.$96s(k,false,false));if(!_14.$161w)_14.setBaseStyle(_2)}
for(;i<_5;++i){k=_12?_5-1-i:i;_3.getMember(this.$96s(k,false,false)).setBaseStyle(_1)}
}else{var _7=this.$96i,_8=_7.length,_15=this.$96t();var i=0,j=0;while(i<_11&&j<_8){var _16=_15(_10[i],_7[j]);if(_16<0){++i}else if(_16==0){var _14=_3.getMember(this.$96s(false,j,false));if(!_14.$161w)_14.setBaseStyle(_2);++i;++j}else{_3.getMember(this.$96s(false,j,false)).setBaseStyle(_1);++j}
}
for(;j<_8;++j){_3.getMember(this.$96s(false,j,false)).setBaseStyle(_1)}
}
}}
,isc.A.$1607=function isc_MultiComboBoxItem__pendingStatusChanged(_1){if(!_1){var _2=this.$161a;_2.clear();var _3=this._value;if(isc.isAn.Array(_3)){var _4=_3.length;for(var i=0;i<_4;++i){_2.add(_3[i])}
}else{_2.add(_3)}
if(this.deselectedButtonStyle!=null&&this.$161r()){var _6=[],_7=this.$96u;if(this.layoutStyle===isc.MultiComboBoxItem.FLOW||this.layoutStyle===isc.MultiComboBoxItem.FLOW_REVERSE){var _8=_7.tiles,_9=_8.length;for(var _10=_9-1;_10>0;--_10){var _11=_8[_10-1];if(_11.$161w)_6.add(_11)}
}else{var _12;if(this.$134m()){_12=_7.members.slice(1)}else{_12=_7.members.slice(0,-1)}
for(var i=0,_13=_12.length;i<_13;++i){var _11=_12[i];if(_11.$161w)_6.add(_11)}
}
var _14=_6.length;if(_14>0){_7.hideMembers(_6,{target:this,methodName:this.$161u,args:[_7,_6]
});var _15=this.$96t(),_16=this.$96j;for(var i=0;i<_14;++i){var _11=_6[i],_3=_11[isc.MultiComboBoxItem.$96a],j=isc.MultiComboBoxItem.$96c(_3,this.$96i,_15),k=this.$96h.indexOf(_3);delete _16[_3];this.$955(_3);this.updateDisplayValueMap(false);this.$96h.splice(k,1);this.$96i.splice(j,1)}
}
}
}
this.Super("$1607",arguments)}
,isc.A.$1608=function isc_MultiComboBoxItem__defaultPendingStatusChangedBehavior(_1){this.Super("$1608",arguments);this.$161j()}
,isc.A.$152r=function isc_MultiComboBoxItem__canEditChanged(_1){if((this.canEditChanged==null||this.canEditChanged(_1)!=false)&&this.canvas!=null)
{this.comboForm.setCanEdit(_1);this.comboForm.setVisibility(this.renderAsReadOnly()||this.renderAsStatic()?isc.Canvas.HIDDEN:isc.Canvas.INHERIT);this.canvas.setDisabled(this.shouldDisableCanvas())}}
,isc.A.$152p=function isc_MultiComboBoxItem__readOnlyDisplayChanged(_1){if((this.readOnlyDisplayChanged==null||this.readOnlyDisplayChanged(_1)!=false)&&this.canvas!=null)
{this.comboForm.setReadOnlyDisplay(_1);this.comboForm.setVisibility(this.renderAsReadOnly()||this.renderAsStatic()?isc.Canvas.HIDDEN:isc.Canvas.INHERIT)}}
,isc.A.$96o=function isc_MultiComboBoxItem__getAutoFitButtons(_1,_2){var _2=_2||this.autoFitButtons,_1=_1||this.layoutStyle;if(_1==isc.MultiComboBoxItem.HORIZONTAL||_1==isc.MultiComboBoxItem.HORIZONTAL_REVERSE)
{return true}else if(this.autoFitButtons!=null){return this.autoFitButtons}else if(_1==isc.MultiComboBoxItem.FLOW||this.layoutStyle===isc.MultiComboBoxItem.FLOW_REVERSE){return true}else{return false}}
,isc.A.$96y=function isc_MultiComboBoxItem__createHStack(){return isc.HStack.create(this.valueLayoutDefaults,this.valueLayoutProperties,{creator:this,autoDraw:false,canFocus:false,canHover:true,height:1,members:[],animateMembers:true,animateMemberTime:100,hover:function(){this.creator.$wb();return false}
})}
,isc.A.$96z=function isc_MultiComboBoxItem__createVStack(){return isc.VStack.create(this.valueLayoutDefaults,this.valueLayoutProperties,{creator:this,autoDraw:false,canFocus:false,canHover:true,height:1,members:[],animateMembers:true,animateMemberTime:100,hover:function(){this.creator.$wb();return false}
})}
,isc.A.$96x=function isc_MultiComboBoxItem__createFlowLayout(){return isc.FlowLayout.create(this.valueLayoutDefaults,this.valueLayoutProperties,{creator:this,autoDraw:false,canFocus:false,canHover:true,tiles:[],height:1,animateTileChange:false,overflow:"visible",getMember:function(_7){return this.getTile(_7)},getMemberNumber:function(_7){if(isc.isA.Number(_7)){return _7}
var _1=this.getLength();for(var i=0;i<_1;++i){if(_7===this.getTile(i)){return i}
}
return-1},getMembers:function(){var _3=[],_4=this.getLength();for(var i=0;i<_4;++i){var _5=this.getTile(i);_3.add(_5)}
return _3},getMembersLength:function(_7){return this.getLength()},addMember:function(_7,_8){this.addTile(_7,_8);this.layoutTiles()},removeMember:function(_7){this.removeTile(_7)},removeMembers:function(_7){var _6=_7.length;for(var i=0;i<_6;++i){this.removeTile(_7[i])}
},hideMember:function(_7,_8){_7.hide();this.fireCallback(_8)},hideMembers:function(_7,_8){_7.callMethod("hide");this.fireCallback(_8)},reorderMember:function(_7,_8){if(_7!=_8){var _5=this.getTile(_7);this.removeMember(_5);this.addMember(_5,_8)}
},hover:function(){this.creator.$wb();return false}
})}
);isc.B._maxIndex=isc.C+40;if(isc.ListGrid!=null&&isc.Shuttle!=null){isc.defineClass("MultiPickerItem","StaticTextItem");isc.A=isc.MultiPickerItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.selectionStyle="pickList";isc.A.canSelectText=false;isc.A.wrap=false;isc.A.clipValue=true;isc.A.clipStaticValue=true;isc.A.canFocus=true;isc.A.alwaysShowControlBox=true;isc.A.showPickerIcon=true;isc.A.applyHeightToTextBox=true;isc.A.updateTextBoxOnOver=false;isc.A.width=220;isc.A.height=22;isc.A.textBoxStyle="selectItemLiteText";isc.A.controlStyle="selectItemLiteControl";isc.A.readOnlyTextBoxStyle="staticTextItem";isc.A.readOnlyControlStyle=null;isc.A.pickerIconSrc="sprite:cssClass:comboBoxItemPicker;size:24,32;offset:6,12;";isc.A.pickerIconWidth=16;isc.A.pickerIconHeight=20;isc.A.multiple=true;isc.A.deriveUniqueValues=false;isc.A.createValueRecords=true;isc.A.includeSelectedParents=false;isc.A.canSelectFolders=true;isc.A.cascadeSelection=true;isc.A.toggleUseUnselectedValuesOnSelectAll=false;isc.A.selectAllWhileFiltered="whenLoaded";isc.A.useUnselectedValues=false;isc.A.defaultUseUnselectedValues=false;isc.A.compareContextRecursive=true;isc.A.textMatchStyle="substring";isc.A.optionDSRequestPassthroughs=["sortBy","keepParentsOnFilter","parentNode"
];isc.A.useSelectedValuesPrefix="None Except:";isc.A.useUnselectedValuesPrefix="All Except:";isc.A.pickListWidth=250;isc.A.expansionWidth=500;isc.A.shuttleWidth=500;isc.A.pickListHeight=400;isc.A.expansionHeight=500;isc.A.shuttleHeight=400;isc.A.selectAllButtonTitle="Select All";isc.A.selectAllWhileFiltered_disabledPrompt="Select All disabled while filtered";isc.A.selectAllWhileFiltered_partialCachePrompt="Unable to Select All as the full set of options has not been fetched from the server.";isc.A.selectAllButtonConstructor="ToolStripButton";isc.A.selectAllButtonDefaults={getTitle:function(){return this.creator.selectAllButtonTitle},click:function(){this.creator.selectAllClick()}
};isc.A.deselectAllButtonTitle="Clear All";isc.A.deselectAllWhileFiltered_disabledPrompt="Clear All disabled while filtered";isc.A.deselectAllWhileFiltered_partialCachePrompt="Unable to Clear All as the full set of options has not been fetched from the server.";isc.A.deselectAllButtonConstructor="ToolStripButton";isc.A.deselectAllButtonDefaults={getTitle:function(){return this.creator.deselectAllButtonTitle},click:function(){this.creator.deselectAllClick()}
};isc.A.expandIconSrc="[SKINIMG]/actions/expand_right.png";isc.A.collapseIconSrc="[SKINIMG]/actions/collapse_left.png";isc.A.expansionIconConstructor="ToolStripButton";isc.A.expansionIconDefaults={iconSize:11,prompt:"Click to expand",showRollOverIcon:false,showDownIcon:false,click:function(){this.creator.toggleExpansion()}
};isc.A.expandedPickListFields=null;isc.A.pickerToolbarConstructor="HLayout";isc.A.pickerToolbarDefaults={membersMargin:3,height:25
};isc.A.filterHint="Filter";isc.A.filterIconSrc="[SKINIMG]actions/view.png";isc.A.filterIconWidth=16;isc.A.filterIconHeight=16;isc.A.filterIconDefaults={name:"view",hspace:5,inline:true,inlineIconAlign:"right",baseStyle:"icon",tabIndex:-1
};isc.A.filterFormConstructor="DynamicForm";isc.A.showFilterForm=true;isc.A.filterPickListOnKeypress=true;isc.A.filterFormDefaults={numCols:1,cellPadding:0,extraSpace:4,colWidths:"*",width:"100%",initWidget:function(){var _1=isc.addProperties({},this.creator.filterIconDefaults,this.creator.filterIconProperties);if(this.creator.filterIconSrc!=null)_1.src=this.creator.filterIconSrc;if(this.creator.filterIconWidth!=null)_1.width=this.creator.filterIconWidth;if(this.creator.filterIconHeight!=null)_1.height=this.creator.filterIconHeight;var _2=[{name:"filter",showTitle:false,editorType:"TextItem",hint:this.creator.filterHint,showHintInField:true,width:"*",icons:this.creator.showFilterIcon!=false?[_1]:null,changed:function(_6,_3,_7){var _3=_6.creator,_4=_3.getPickListComponent(),_5=_4?_4.fetchDelay:300;if(_3.filterPickListOnKeypress){_3.fireOnPause("filterPickListOnKeypress",{target:_3,methodName:"filterPickList",args:[_7]},_5
)}
},keyPress:function(){if(isc.EH.getKey()=="Enter"){this.form.creator.filterPickList(this.getValue())}
}
}
]
this.setItems(_2);return this.Super("initWidget",arguments)}
};isc.A.shuttleConstructor="Shuttle";isc.A.shuttleDefaults={width:"100%",height:"*",selectionUpdated:function(){this.updateItemValue()},updateItemValue:function(){this.creator.pickerSelectionUpdated()}
};isc.A.pickListConstructor="ListGrid";isc.A.pickListCommonDefaults={$wo:function(_1,_2,_3,_4){var _5=this.creator.getOptionCriteria();var _6=this.creator.getOptionDataSource();var _7;_7=_5;var _8=this.creator.getExtraOptionCriteria();if(_8!=null){_7=_6?_6.combineCriteria(_7,_8,"and","substring"):isc.DataSource.combineCriteria(_7,_8,"and","substring")}
var _9=this.creator.getOptionFilterContext();var _10=this.creator.getValue()||[];if(this.data&&this.data.invalidateCache){if(_6!=null){if(!_10.equals(this.$254c)||(_6.compareCriteria(_7,this.$252v)!=0)||!this.creator.$260v(_9,this.$260w))
{this.data.invalidateCache()}
}
}
this.$252v=_7;this.$254c=_10;this.$260w=_9;return this.Super("$wo",arguments)},canShowFilterEditor:false,showHeader:false,width:"100%",height:"*",autoFitMaxHeight:300,setSelectedByValue:function(_1,_2){if(_1==null)return;var _3=this.selectionManager.defaultIsSelected!=_2;if(!isc.isA.Array(_1))_1=[_1];for(var i=0;i<_1.length;i++){this.selectionManager.setSelectedByKey(_1[i],_3)}
this.updateSelectionList()},getSelectedRecords:function(){var _1=this.selectionManager.getSelectionByKeys(true,true);if(isc.isA.Tree(this.data)){var _2=this.creator.shouldIncludeSelectedParents();if(!_2){for(var i=_1.length;i>=0;i--){if(this.data.hasChildren(_1[i])){_1.removeAt(i)}
}
}
}
return _1},getSelectedValues:function(){var _1=this.getSelectedRecords();var _2=[];for(var i=0;i<_1.length;i++){_2.add(_1[i][this.targetField])}
return _2},$66d:function(){this.updateSelectionList();this.creator.updateSelectAllButtons();return this.Super("$66d",arguments)},updateSelectionList:function(){if(this.creator.showSelectionList){var _1=this.getSelectedRecords();if(_1.length>0){if(this.creator.selectionListLabel)this.creator.selectionListLabel.show();var _2=[];for(var i=0;i<_1.length;i++){_2.add(_1[i][this.creator.getValueFieldName()])}
var _4={operator:"inSet",value:_2,fieldName:this.creator.getValueFieldName()
}
this.creator.selectionList.fetchData(_4,null,{selectedRecords:_1});this.creator.selectionList.show()}else{if(this.creator.selectionListLabel)this.creator.selectionListLabel.hide();this.creator.selectionList.hide()}
}
},selectionUpdated:function(){this.updateItemValue();this.updateSelectionList()},updateItemValue:function(){this.creator.pickerSelectionUpdated()}
};isc.A.pickListDefaults={};isc.A.pickTreeConstructor="TreeGrid";isc.A.pickTreeDefaults={autoOpenTree:"all",loadDataOnDemand:false,keepParentsOnFilter:true
};isc.A.pickerLayoutConstructor="VLayout";isc.A.pickerLayoutDefaults={layoutMargin:5,overflow:"hidden",styleName:"multiPickerLayout",hide:function(){this.Super("hide",arguments);this.creator.pickerHidden()}
};isc.A.showSelectionListLabel=true;isc.A.selectionListLabelConstructor="Label";isc.A.selectionListLabelDefaults={height:25,valign:"bottom",padding:3,dynamicContents:true,contents:"${this.creator.getSelectionListTitle()}"
};isc.A.unselectedSelectionListTitle="Excluded Items";isc.A.selectedSelectionListTitle="Included Items";isc.A.showSelectionList=true;isc.A.selectionListConstructor="ListGrid";isc.A.selectionListDefaults={showHeader:false,autoFitData:"vertical",height:1,autoFitMaxHeight:150,selectionType:"none",canRemoveRecords:true,removeRecordClick:function(_1){var _2=this.getRecord(_1),_3=_2[this.targetField];var _4=this.creator.getPickListComponent();_4.setSelectedByValue(_3,false);_4.updateItemValue()}
};isc.A.canExpand=true;isc.A.wireFrameDefaults={styleName:"resizeWireFrame"
};isc.A.expanded=false;isc.B.push(isc.A.$1618=function isc_MultiPickerItem__getClipValue(){if(this.renderAsStatic())return this.$1617();return!!this.clipValue
}
,isc.A.$157g=function isc_MultiPickerItem__shouldVerticallyCenterTextBox(){return true}
,isc.A.shouldDeriveUniqueValues=function isc_MultiPickerItem_shouldDeriveUniqueValues(){return this.deriveUniqueValues&&!this.$253d()}
,isc.A.canCreateValueRecords=function isc_MultiPickerItem_canCreateValueRecords(){return this.shouldDeriveUniqueValues()}
,isc.A.$253d=function isc_MultiPickerItem__usePickTree(){return this.selectionStyle=="pickTree"}
,isc.A.shouldIncludeSelectedParents=function isc_MultiPickerItem_shouldIncludeSelectedParents(){if(!this.canSelectFolders)return false;if(!this.cascadeSelection)return true;return this.includeSelectedParents}
,isc.A.shouldCascadeSelection=function isc_MultiPickerItem_shouldCascadeSelection(){return this.canSelectFolders&&this.cascadeSelection}
,isc.A.setUseUnselectedValues=function isc_MultiPickerItem_setUseUnselectedValues(_1,_2){var _3=this.getPickListComponent();if(!_3){if(!_2)this.storeValue([]);this.useUnselectedValues=_1;return}
var _4=_3.selectionManager;var _5;if(!_2){_5=(_4.getSelectionByKeys(true).length>0);_4.clearSelection(true)}
_4.setDefaultIsSelected(_1);if(_5||(_1!=this.useUnselectedValues)){this.useUnselectedValues=_1;_3.markForRedraw();_3.updateItemValue();_3.updateSelectionList()}
if(this.selectionListLabel)this.selectionListLabel.markForRedraw()}
,isc.A.getSourceList=function isc_MultiPickerItem_getSourceList(){if(this.shouldDeriveOptionsFromValueMap())return this.$252w();return this.sourceList}
,isc.A.shouldDeriveOptionsFromValueMap=function isc_MultiPickerItem_shouldDeriveOptionsFromValueMap(){return this.sourceList==null&&this.valueMap!=null}
,isc.A.$252w=function isc_MultiPickerItem__getSourceListFromValueMap(){var _1=this.getValueMap();if(_1==null)return null;var _2=[];if(this.allowEmptyValue){_2[0]={}
_2[0][this.getValueFieldName()]=null}
if(isc.isAn.Array(_1)){for(var i=0;i<_1.length;i++){_2.push({});_2[_2.length-1][this.getValueFieldName()]=_1[i]}
}else{for(var _4 in _1){var _5={};_5[this.getValueFieldName()]=_4;var _6=this.getDisplayFieldName(true);if(_6){_5[_6]=_1[_4]}
_2.add(_5)}
}
return _2}
,isc.A.getDisplayFieldName=function isc_MultiPickerItem_getDisplayFieldName(_1){var _2=_1?this.displayField:this.Super("getDisplayFieldName",arguments);if(_2==null&&this.shouldDeriveOptionsFromValueMap()){var _3=this.getValueMap();if(isc.isAn.Object(_3)&&!isc.isAn.Array(_3)){_2=this.getValueFieldName()+"$190e"}
}
return _2}
,isc.A.getOptionCriteria=function isc_MultiPickerItem_getOptionCriteria(){if(this.optionCriteria!=null){return this.optionCriteria}
if(this.sourceList&&this.sourceList.getCriteria){return this.sourceList.getCriteria()}
}
,isc.A.getExtraOptionCriteria=function isc_MultiPickerItem_getExtraOptionCriteria(){return null}
,isc.A.getOptionFetchOperation=function isc_MultiPickerItem_getOptionFetchOperation(){if(this.optionOperationId!=null){return this.optionOperationId}
var _1=this.getSourceListOperationId();return _1}
,isc.A.getSourceListOperationId=function isc_MultiPickerItem_getSourceListOperationId(){var _1=this.getSourceList();if(_1&&_1.getOperationId){return _1.getOperationId("fetch")}
}
,isc.A.getOptionFilterContext=function isc_MultiPickerItem_getOptionFilterContext(){var _1={};var _2=this.getSourceListFilterContext();if(_2!=null)isc.addProperties(_1,_2);if(this.optionFilterContext){isc.addProperties(_1,this.optionFilterContext)}
if(this.textMatchStyle!=null)_1.textMatchStyle=this.textMatchStyle;_1.operationType="fetch";return _1}
,isc.A.$260v=function isc_MultiPickerItem__filterContextsMatch(_1,_2){if(_1==_2)return true;if(_1==null)_1={};if(_2==null)_2={};if(_1.operationId!=_2.operationId){return false}
if(_1.textMatchStyle!=_2.textMatchStyle){return false}
if(_1.parameters!=_2.parameters){var _3=isc.Canvas.compareValuesRecursive;isc.Canvas.compareValuesRecursive=this.compareContextRecursive;var _4=isc.Canvas.compareValues(_1.parameters,_2.parameters);isc.Canvas.compareValuesRecursive=_3;if(!_4)return false}
return true}
,isc.A.getSourceListFilterContext=function isc_MultiPickerItem_getSourceListFilterContext(){var _1=this.getSourceList();if(_1){var _2=_1.context||_1.requestProperties;if(_2!=null){_2=isc.addProperties({},_2);delete _2.componentId}
return _2}
}
,isc.A.getSelectionImplicitCriteria=function isc_MultiPickerItem_getSelectionImplicitCriteria(){return this.getOptionCriteria()}
,isc.A.getOptionDataSource=function isc_MultiPickerItem_getOptionDataSource(){if(this.optionDataSource!=null)return isc.DataSource.get(this.optionDataSource);var _1=this.getSourceList();if(_1!=null&&_1.dataSource!=null)return isc.DataSource.get(_1.dataSource);var _2=this.Super("getOptionDataSource",arguments);return _2}
,isc.A.$272d=function isc_MultiPickerItem__useForeignDisplayField(){var _1=this.getSourceList()!=null;if(_1)return false;return this.Super("$272d",arguments)}
,isc.A.$281z=function isc_MultiPickerItem__getTargetFieldValueDataSource(_1,_2){return this.getPickerDataSource()}
,isc.A.getPickerDataSource=function isc_MultiPickerItem_getPickerDataSource(){if(this.$252x==null){var _1=this.getID()+"$252x";var _2=this.getOptionDataSource();if(this.shouldDeriveOptionsFromValueMap())_2=null;var _3;if(_2!=null)_3=_2.getFields();else{var _4=this.getValueFieldName(),_5=this.getDisplayFieldName();_3=[{name:_4}
];if(_5!=null){_3.push({name:_5})}
}
var _6=[];if(_2!=null){for(var _7 in _3){var _8=_3[_7];if(_8.foreignKey!=null){var _9=isc.DataSource.getForeignDSName(_8),_10=isc.DataSource.getForeignFieldName(_8);if(_9==_2.getID()){_9=_1;_6.add({name:_7,foreignKey:_9+"."+_10
})}
}else if(_8.includeFrom!=null){_6.add({name:_7,includeFrom:null
})}
}
}else{_6=_3}
this.$252x=isc.DataSource.create({ID:_1,creator:this,_generated:true,inheritsFrom:_2,fields:_6,dropUnknownCriteria:false,sendExtraFields:true,clientOnly:true,dataProtocol:"clientCustom",$254d:function(){if(this.creator.canCreateValueRecords()){return true}
return false},transformRequest:function(_39){var _11=_39.operationId=="selectedItemsFetch";var _12,_13;var _14=this.creator.getOptionFilterContext();var _15=this.creator.optionDSRequestPassthroughs;for(var i=0;i<_15.length;i++){if(_39[_15[i]]!=null&&_14[_15[i]]==null){_14[_15[i]]=_39[_15[i]]}
}
var _17=this.$254d();var _18=this.creator.getValue();if(_18==null)_18=[];else if(!isc.isA.Array(_18))_18=[_18];var _19=[];var _20;var _21;if(_11&&_17){_24=_39.selectedRecords;_25=true;_20=true}else{_13=this.creator.getOptionCriteria();_12=this.creator.getOptionDataSource();_21=this.creator.shouldDeriveUniqueValues();var _4=this.creator.getValueFieldName();if(_21){_14.groupBy=[_4];var _5=this.creator.getDisplayFieldName();if(_5!=null){_14.groupBy.push(_5)}
}
var _22;var _23=this.creator.getSourceList();var _24=_23;var _25=false;if(_24!=null){if(!_11){_22=_13;var _26=this.creator.getExtraOptionCriteria();if(_26!=null){_22=_12.combineCriteria(_22,_26,"and","substring")}
}
var _27,_28;_25=isc.isA.Array(_24)||(isc.isA.Tree(_24)&&!isc.isA.ResultTree(_24));if(_25){_27=null;_28=this.compareCriteria(_22,_27,_14)}else{if(isc.ResultSet&&isc.isA.ResultSet(_24)&&_24.allMatchingRowsCached())
{if(_24.allRowsCached()){_25=true;_27=null;_24=_24.allRows;_28=this.compareCriteria(_22,_27,_14)}else{if(_11){_28=0;_25=true}else if(_24.allMatchingRowsCached()){if(_24.allRows!=null){_27=_24.allRowsCriteria
}else{_27=_12.combineCriteria(_24.getImplicitCriteria(),_24.getCriteria())}
if(_27&&_27._constructor!="AdvancedCriteria"){var _29=_24.context.textMatchStyle||"exact"
_27=isc.DataSource.convertCriteria(_27,_29)}
_28=this.compareCriteria(_22,_27,_14);_25=_28>=0;_24=_24.allRows||_24.localData}
if(_25){for(var i=0;i<_18.length;i++){if(_24.findIndex(_4,_18[i])==-1){if(!_17){_25=false;break}else{_19.add(_18[i])}
}
}
}
}
}else if(isc.Tree&&isc.isA.Tree(_24)&&_24.dataFetchMode!="paged"&&!_24.loadDataOnDemand&&_24.getLoadState(_24.getRoot())=="loaded")
{if(isc.ResultTree&&isc.isA.ResultTree(_24)){if(_24.completeTree){_25=true;_27=null;_24=_24.completeTree;_28=this.compareCriteria(_22,_27,_14)}else{_27=_12.combineCriteria(_24.getImplicitCriteria(),_24.criteria);if(_27&&_27._constructor!="AdvancedCriteria"){var _29=_24.context.textMatchStyle||"exact"
_27=isc.DataSource.convertCriteria(_27,_29)}
if(_11){_25=true;_28=0}else{_28=this.compareCriteria(_22,_27,_14);_25=(_28>=0)}
}
if(_25&&!_17){for(var i=0;i<_18.length;i++){if(_24.find(_4,_18[i])==null){if(!_17){_25=false;break}else{_19.add(_18[i])}
}
}
}
}else{_25=true;_27=null;_28=this.compareCriteria(_22,_27,_14)}
if(_25){var _30=_24.getAllNodes(_24.getRoot());_30=_24.getCleanNodeData(_30,false,false);_24=_30}
}
}
}
}
if(_25){var _31=_24;if(!_20){_31=this.applyFilter(_31,_22,_14)}
if(_21){_31=this.applyClientSummaries(_14,_31)}
if(_17){for(var i=0;i<_19.length;i++){var _32={};_32[_4]=_18[i];_31.add(_32)}
}else if(_19.length>0){this.logWarn("Unable to find value field records in sourceList cache for:"+_19)}
var _33=this.getClientOnlyFetchResponse(_39,_31);var _34=_33[0];_34.data=_33[1];this.delayCall("processResponse",[_39.requestId,_34]);return}else{var _35=this.creator.getOptionFetchOperation();if(_35!=null)_14.operationId=_35;_14.clientContext={originalRequest:_39
};_14.startRow=_39.startRow;_14.endRow=_39.endRow;var _36=_13;if(!_11){var _26=this.creator.getExtraOptionCriteria();if(_26!=null&&!isc.isAn.emptyObject(_26)){if(_18.length>0){var _37={operator:"inSet",fieldName:_4,value:_18};_26=_12.combineCriteria(_37,_26,"or","substring")}
_36=_12.combineCriteria(_36,_26,"and","substring")}
}
if(_39.data!=null){_36=_12.combineCriteria(_36,_39.data,"and","substring")}
_12.fetchData(_36,{target:this,methodName:"remoteFetchComplete"},_14
)}
return _39.data},remoteFetchComplete:function(_39,_40,_41){var _38=_41.clientContext.originalRequest;this.processResponse(_38.requestId,{status:0,data:_40,startRow:_39.startRow,endRow:_39.endRow,totalRows:_39.totalRows
}
)}
})}
return this.$252x}
,isc.A.$1416=function isc_MultiPickerItem__getDisplayValue(_1,_2){var _3=this.Super("$1416",arguments);var _4;if(_2&&_1===_4){_1=this.getValue()}
if(this.toggleUseUnselectedValuesOnSelectAll&&_1!=null&&isc.isA.Array(_1)&&_1.length>0){return(this.useUnselectedValues?this.useUnselectedValuesPrefix:this.useSelectedValuesPrefix)+" "+_3}
return _3}
,isc.A.pickerIconClick=function isc_MultiPickerItem_pickerIconClick(){if(this.isReadOnly())return;this.showFilterList();return false}
,isc.A.click=function isc_MultiPickerItem_click(){if(this.isReadOnly())return;this.showFilterList()}
,isc.A.getPickListWidth=function isc_MultiPickerItem_getPickListWidth(){if(this.selectionStyle=="shuttle")return this.shuttleWidth;if(this.pickListWidth!=null)return this.pickListWidth;return this.getWidth()}
,isc.A.getPickListHeight=function isc_MultiPickerItem_getPickListHeight(){if(this.selectionStyle=="shuttle")return this.shuttleHeight;return this.pickListHeight}
,isc.A.getPickListFields=function isc_MultiPickerItem_getPickListFields(){var _1=this.Super("getPickListFields",arguments);return isc.clone(_1)}
,isc.A.$276h=function isc_MultiPickerItem__shouldShowFilterForm(){return this.showFilterForm&&!this.expanded&&this.selectionStyle=="pickList"&&!this.$276i}
,isc.A.$276j=function isc_MultiPickerItem__shouldShowFilterEditor(){return this.$276i||(this.selectionStyle=="pickList"&&this.showFilterForm&&this.expanded)}
,isc.A.$276k=function isc_MultiPickerItem__shouldShowHeader(){if(this.$276l)return true;return this.expanded}
,isc.A.getPickListComponent=function isc_MultiPickerItem_getPickListComponent(){return this.$253d()?this.pickTree:this.pickList}
,isc.A.getSelectionListTitle=function isc_MultiPickerItem_getSelectionListTitle(){return this.useUnselectedValues?this.unselectedSelectionListTitle:this.selectedSelectionListTitle}
,isc.A.filterPickList=function isc_MultiPickerItem_filterPickList(_1){var _2=this.getPickListComponent();if(!_2)return;var _3;if(_1!=null){var _4=this.getDisplayFieldName()||this.getValueFieldName();_3={};_3[_4]=_1}
_2.filterData(_3);this.updateSelectAllButtons()}
,isc.A.updateSelectAllButtons=function isc_MultiPickerItem_updateSelectAllButtons(){if(!this.selectAllButton)return;var _1=this.getPickListComponent();if(!_1)return;var _2=_1.getCriteria(),_3=_2==null||isc.isA.emptyObject(_2),_4=!_3;if(this.selectAllWhileFiltered=="disable"&&_4){this.selectAllButton.setPrompt(this.selectAllWhileFiltered_disabledPrompt);this.selectAllButton.setDisabled(true);this.deselectAllButton.setPrompt(this.deselectAllWhileFiltered_disabledPrompt);this.deselectAllButton.setDisabled(true)}else{if(this.selectAllWhileFiltered=="all"){_3=true}
if(_3&&this.toggleUseUnselectedValuesOnSelectAll){this.selectAllButton.setPrompt(null);this.deselectAllButton.setPrompt(null);this.selectAllButton.setDisabled(false);this.deselectAllButton.setDisabled(false)}else{var _5=!isc.isA.ResultSet(_1.data)||(_3?_1.data.allRowsCached()
:_1.data.allMatchingRowsCached());this.selectAllButton.setDisabled(!_5);this.selectAllButton.setPrompt(!_5?this.selectAllWhileFiltered_partialCachePrompt:null);this.deselectAllButton.setDisabled(!_5);this.deselectAllButton.setPrompt(!_5?this.deselectAllWhileFiltered_partialCachePrompt:null)}
}
}
,isc.A.shouldShowExpansionIcon=function isc_MultiPickerItem_shouldShowExpansionIcon(){return this.canExpand&&this.expandedPickListFields!=null}
,isc.A.toggleExpansion=function isc_MultiPickerItem_toggleExpansion(){var _1=this.getPickListComponent();if(!_1)return;var _2=this.expanded;this.expanded=!_2;this.expansionIcon.setIcon(this.expanded?this.collapseIconSrc:this.expandIconSrc);if(!this.pickerLayout.isDrawn()||!this.pickerLayout.isVisible()){this.completeToggleExpansion();return}
var _3=this.getPageLeft(),_4=this.getPickListWidth();var _5=(_3+_4)-isc.Page.getWidth();if(_5>0){_3-=_5
}
var _6=[_3,this.getPageTop()+this.getHeight(),_4,this.getPickListHeight()
];if(!this.pickerLayout.isBelow){_6[1]-=(this.getHeight()+_6[3])
}
if(this.expanded){var _7=_6[0];var _8=_6[1];var _9=isc.Page.getWidth(),_10=isc.Page.getHeight();if(_9<(this.expansionWidth+_7)){_6[0]=_9-this.expansionWidth}
_6[2]=this.expansionWidth;if(!this.pickerLayout.isBelow){_6[1]-=(this.expansionHeight-_6[3]);if(_6[1]<0)_6[1]=0}
_6[3]=this.expansionHeight;if(_10<(_6[3]+_6[1])){_6[1]=_10-this.expansionHeight}
}
if(this.wireFrame==null){this.wireFrame=this.createAutoChild("wireFrame")}
this.wireFrame.setRect(this.pickerLayout.getPageRect());this.wireFrame.bringToFront();this.wireFrame.show();this.wireFrame.animateRect(_6[0],_6[1],_6[2],_6[3],{target:this,methodName:"expansionResizeComplete"}
)}
);isc.evalBoundary;isc.B.push(isc.A.expansionResizeComplete=function isc_MultiPickerItem_expansionResizeComplete(){this.wireFrame.hide();this.pickerLayout.setPageRect(this.wireFrame.getPageRect());this.completeToggleExpansion()}
,isc.A.completeToggleExpansion=function isc_MultiPickerItem_completeToggleExpansion(){var _1=this.filterForm&&this.$276h();if(this.filterForm){this.filterForm.setVisibility(_1?"inherit":"hidden")}
var _2=false;var _3;var _4=this.getPickListComponent();if(!this.expanded&&_4.showFilterEditor&&!this.$276i){_2=true;_3=_1?_4.filterEditor.getEditForm().getValue(this.getDisplayFieldName())
:null}
_4.setShowHeader(this.$276k());if(this.showFilterForm){_4.setShowFilterEditor(this.$276j())}
_4.setFields(this.expanded?this.expandedPickListFields:this.getPickListFields());if(_2){if(this.filterForm)this.filterForm.setValue("filter",_3);this.filterPickList(_3)}
}
,isc.A.init=function isc_MultiPickerItem_init(){var _1=window.isc_supportsMultiPickerItem;_1=true;if(!_1){this.logWarn("MultiPickerItem is not supported in this build");this.$2787=true}
return this.Super("init",arguments)}
,isc.A.showFilterList=function isc_MultiPickerItem_showFilterList(){if(this.$2787)return;if(this.pickerLayout==null){this.pickerLayout=this.createAutoChild("pickerLayout");var _1=this.getValueFieldName();if(this.selectionStyle!="shuttle"){this.selectAllButton=this.createAutoChild("selectAllButton");this.deselectAllButton=this.createAutoChild("deselectAllButton");var _2=[];if(this.showSelectAllButton!==false)_2.push(this.selectAllButton);if(this.showDeselectAllButton!==false)_2.push(this.deselectAllButton);if(this.shouldShowExpansionIcon()){this.expansionIcon=this.createAutoChild("expansionIcon",{icon:this.expandIconSrc});_2.addList([isc.LayoutSpacer.create({width:"*"}),this.expansionIcon
])}
this.pickerToolbar=this.createAutoChild("pickerToolbar",{members:_2
})
if(this.showFilterForm){this.filterForm=this.createAutoChild("filterForm")}
var _3;if(this.$253d()){var _4=this;var _5=isc.addProperties({},this.pickListCommonDefaults,{selectionAppearance:"checkbox",showSelectedStyle:false,showPartialSelection:true,cascadeSelection:this.shouldCascadeSelection(),canSelectRecord:function(_23){if(!_4.canSelectFolders&&this.data.isFolder(_23))return false;return this.Super("canSelectRecord",arguments)},showDisabledSelectionCheckbox:false,leaveSelectionCheckboxGap:false,selectionManagerProperties:{defaultIsSelected:this.useUnselectedValues,trackByKey:true,trackUnloadedItems:true,keyField:this.getValueFieldName()
},targetField:_1,dataSource:this.getPickerDataSource(),fields:this.getPickListFields()
}
);if(this.initialSort!=null)_5.initialSort=this.initialSort;if(this.sortField!=null)_5.sortField=this.sortField;if(this.sortDirection!=null)_5.sortDirection=this.sortDirection;_3=this.pickTree=this.createAutoChild("pickTree",_5);this.showFilterForm=false;this.$276i=_3.showFilterEditor;this.$276l=_3.showHeader}else{var _5=isc.addProperties({},this.pickListCommonDefaults,{selectionAppearance:"checkbox",selectionManagerProperties:{defaultIsSelected:this.useUnselectedValues,trackByKey:true,trackUnloadedItems:true,keyField:this.getValueFieldName()
},targetField:_1,dataSource:this.getPickerDataSource(),fields:this.getPickListFields()
}
);if(this.initialSort!=null)_5.initialSort=this.initialSort;if(this.sortField!=null)_5.sortField=this.sortField;if(this.sortDirection!=null)_5.sortDirection=this.sortDirection;if(this.pickListFetchDelay!=null)_5.fetchDelay=this.pickListFetchDelay;if(this.filterPickListOnKeypress!=null)_5.filterOnKeypress=this.filterPickListOnKeypress;_3=this.pickList=this.createAutoChild("pickList",_5);this.$276i=this.pickList.showFilterEditor;this.$276l=this.pickList.showHeader}
var _6=[];if(_2.length>0){_6.push(this.pickerToolbar)}
if(this.showFilterForm){if(!this.$276h()){this.filterForm.setVisibility("hidden")}
_6.add(this.filterForm)}
_6.add(_3);this.pickerLayout.setMembers(_6);if(this.showSelectionList){if(this.showSelectionListLabel){this.selectionListLabel=this.createAutoChild("selectionListLabel");this.pickerLayout.addMember(this.selectionListLabel)}
var _7={dataSource:this.getPickerDataSource(),fetchOperation:"selectedItemsFetch",fields:this.getPickListFields(),targetField:_1
};if(this.initialSort!=null)_7.initialSort=this.initialSort;if(this.sortField!=null)_7.sortField=this.sortField;if(this.sortDirection!=null)_7.sortDirection=this.sortDirection;this.selectionList=this.createAutoChild("selectionList",_7);this.pickerLayout.addMember(this.selectionList)}
}else{this.shuttle=this.createAutoChild("shuttle",{initialSort:this.initialSort,sortField:this.sortField,sortDirection:this.sortDirection,sourceGridProperties:{setImplicitCriteria:function(_23,_24,_25){var _8=this.dataObjectSupportsFilter(this.data);var _9=this.getDataSource();if(_9&&(_25||_8)){var _10=_9.combineCriteria(this.getCriteria(),_23);this.checkForOptionCriteriaChange(_10)}
return this.Super("setImplicitCriteria",arguments)},$wo:function(_23,_24,_25,_26){this.checkForOptionCriteriaChange(_24);return this.Super("$wo",arguments)},checkForOptionCriteriaChange:function(_23){if(!this.data||!this.data.invalidateCache)return;var _11=this.creator;var _12=_11.creator;var _13=_12.getOptionCriteria();var _14=_12.getOptionDataSource();if(_14&&!this.willFetchData(_23)){if(_14.compareCriteria(_13,this.$252v)!=0){this.data.invalidateCache()}
}
this.$252v=_13}
},targetField:_1,dataSource:this.getPickerDataSource(),fields:this.getPickListFields()
});this.pickerLayout.addMember(this.shuttle)}
}
var _3=this.getPickListComponent();var _15=this.getHeight(),_16=this.getPageTop()+_15,_17=this.getPickListHeight();var _18=true;if(_16+_17>isc.Page.getHeight()&&(_16-(_17+_15)>0)){_16-=(_17+_15);_18=false}
this.pickerLayout.isBelow=_18;var _19=this.getPageLeft(),_20=this.getPickListWidth();var _21=(_19+_20)-isc.Page.getWidth();if(_21>0){_19-=_21
}
this.pickerLayout.setRect(_19,_16,_20,_17);this.pickerLayout.placeNear(_19,_16);var _22=this.pickerLayout;this.pickerLayout.show();this.$254e(true);if(!this.pickerLayout.clickMaskUp()){this.pickerLayout.showClickMask(function(){_22.hide()},"softCancel"
)}
this.pickerLayout.bringToFront()}
,isc.A.$254e=function isc_MultiPickerItem__refreshFilterList(_1){this.$254f=true;var _2=this.getPickListComponent();if(_2){_2.selection.clearSelection(true);if(_1){if(this.filterForm)this.filterForm.clearValues();_2.fetchData()}
var _3=this.getValue();if(_3!=null){_2.setSelectedByValue(_3,true)}else{_2.updateSelectionList()}
_2.markForRedraw()}else if(this.shuttle){this.shuttle.clearSelection();this.shuttle.setSelectedByValue(this.getValue(),true)}
delete this.$254f}
,isc.A.pickerHidden=function isc_MultiPickerItem_pickerHidden(){if(this.expanded)this.toggleExpansion();if(this.toggleUseUnselectedValuesOnSelectAll&&this.defaultUseUnselectedValues!=null&&(this.getValue()==null||this.getValue().length==0))
{this.setUseUnselectedValues(this.defaultUseUnselectedValues)}
this.focusInItem()}
,isc.A.selectAllClick=function isc_MultiPickerItem_selectAllClick(){var _1=this.getPickListComponent();if(!_1)return;var _2=this.toggleUseUnselectedValuesOnSelectAll;if(_2){var _3=_1.getCriteria();if(_3!=null&&!isc.isA.emptyObject(_3)){if(this.selectAllWhileFiltered!="all"){_2=false}
}
}
if(_2){this.setUseUnselectedValues(true)}else{var _1=this.getPickListComponent();var _4=_1.data;var _5=isc.ResultSet&&isc.isA.ResultSet(_4);if(_4&&(!_5||_4.allMatchingRowsCached())){if(isc.Tree&&isc.isA.Tree(_4)&&!this.canSelectFolders){var _6=_4.getDescendantLeaves(_4.getRoot());_1.selection.selectList(_6)}else{_1.selection.selectAll()}
_1.updateItemValue();_1.updateSelectionList()}else{isc.warn("Some records have not been loaded - unable to select all")}
}
}
,isc.A.deselectAllClick=function isc_MultiPickerItem_deselectAllClick(){var _1=this.getPickListComponent();if(!_1)return;var _2=this.toggleUseUnselectedValuesOnSelectAll;if(_2){var _3=_1.getCriteria();if(_3!=null&&!isc.isA.emptyObject(_3)){if(this.selectAllWhileFiltered!="all"){_2=false}
}
}
if(_2){this.setUseUnselectedValues(false)}else{var _4=_1.data;if(isc.Tree&&isc.isA.Tree(_4)&&!this.canSelectFolders){var _5=_4.getDescendantLeaves(_4.getRoot());_1.selection.deselectList(_5)}else{_1.selection.deselectAll()}
_1.updateItemValue();_1.updateSelectionList()}
}
,isc.A.pickerSelectionUpdated=function isc_MultiPickerItem_pickerSelectionUpdated(){if(this.$254f)return;var _1=this.selectionStyle=="shuttle"?this.shuttle:this.getPickListComponent();this.storeValue(_1.getSelectedValues(),true)}
,isc.A.setValue=function isc_MultiPickerItem_setValue(){this.Super("setValue",arguments);if(this.pickerLayout&&this.pickerLayout.isVisible()){this.$254e();var _1=this.getPickListComponent();if(_1){_1.updateSelectionList()}
}
}
,isc.A.getTextBoxCellCSS=function isc_MultiPickerItem_getTextBoxCellCSS(){var _1=this.Super("getTextBoxCellCSS",arguments);_1=_1||"";if(!this.renderAsStatic())_1+="line-height:"+this.getInnerHeight()+"px;";return _1}
);isc.B._maxIndex=isc.C+50}else{isc.Log.logWarn("Source for standard MultiPickerItem class included in this module, but required related class (ListGrid) is not loaded. This can occur if the Forms module is loaded without the Grids module. MultiPickerItem class, and classes inheriting from this such as SetFilterItem will be defined as a simple subclass of StaticTextItem.","moduleDependencies");isc.ClassFactory.defineClass("MultiPickerItem","StaticTextItem")}
isc.defineClass("SetFilterItem","MultiPickerItem");isc.A=isc.SetFilterItem;isc.A.editorOperators=["inSet","notInSet"];isc.A=isc.SetFilterItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.selectionStyle="pickList";isc.A.toggleUseUnselectedValuesOnSelectAll=true;isc.A.useUnselectedValues=true;isc.A.defaultUseUnselectedValues=true;isc.A.selectedOperator="inSet";isc.A.unselectedOperator="notInSet";isc.A.deriveUniqueValues=true;isc.A.clearComponentTargetFieldCriteria=true;isc.A.includePathInInSetCriteria=false;isc.A.allowEmptyStringInArrayCriterion=true;isc.B.push(isc.A.getSourceList=function isc_SetFilterItem_getSourceList(){var _1=this.Super("getSourceList",arguments);if(_1==null&&this.shouldDeriveOptionsFromFilterTargetComponent()){_1=this.filterTargetComponent.data}
return _1}
,isc.A.shouldDeriveOptionsFromFilterTargetComponent=function isc_SetFilterItem_shouldDeriveOptionsFromFilterTargetComponent(){if(this.shouldDeriveOptionsFromValueMap())return false;var _1=this.filterTargetComponent&&this.filterTargetComponent.data;var _2=isc.DataSource.get(this.optionDataSource);return(_1&&(isc.isA.ResultSet(_1)||isc.isA.ResultTree(_1))&&(_2==null||_1.dataSource==_2))}
,isc.A.showFilterList=function isc_SetFilterItem_showFilterList(){var _1=false;if(isc.isA.ListGrid(this.filterTargetComponent)&&this.filterTargetComponent.filterEditor!=null)
{if(this.filterTargetComponent.filterEditor.pendingActionOnPause("performFilter")){_1=!isc.RPCManager.startQueue();this.filterTargetComponent.filterEditor.performFilter(null,null,null,true)}
}
this.Super("showFilterList",arguments);if(_1)isc.RPCManager.sendQueue()}
,isc.A.shouldGetCriteriaFromFilterTarget=function isc_SetFilterItem_shouldGetCriteriaFromFilterTarget(){if(!this.filterTargetComponent||this.optionCriteria!=null||this.shouldDeriveOptionsFromValueMap())
{return false}
var _1=isc.DataSource.get(this.optionDataSource);return(_1==null||_1==this.filterTargetComponent.getDataSource())}
,isc.A.getOptionCriteria=function isc_SetFilterItem_getOptionCriteria(){if(this.shouldGetCriteriaFromFilterTarget()){return this.filterTargetComponent.getImplicitCriteria(true)}else if(this.optionCriteria!=null){return this.optionCriteria}
return this.Super("getOptionCriteria",arguments)}
,isc.A.getExtraOptionCriteria=function isc_SetFilterItem_getExtraOptionCriteria(){if(!this.shouldGetCriteriaFromFilterTarget())return this.Super("getExtraOptionCriteria");var _1=this.getOptionDataSource();var _2;var _3=this.form,_4=this.form.grid;var _5=_4!=null&&isc.isA.RecordEditor(_4)&&_4.isAFilterEditor()&&_4.sourceWidget==this.filterTargetComponent;if(_5){_2=this.filterTargetComponent.getCriteria()}else{_2=_3.getValuesAsCriteria()}
_2=isc.DataSource.copyCriteria(_2);if(this.clearComponentTargetFieldCriteria&&_2&&_2._constructor=="AdvancedCriteria"&&_2.operator=="and"&&_2.criteria)
{var _6=_2.criteria;for(var i=0;i<_6.length;i++){if(this.canEditCriterion(_6[i])){_6.removeAt(i);break}
}
}
var _8=this.filterTargetComponent.autoFetchTextMatchStyle;if(this.filterTargetComponent.getFilterWindowCriteria){var _9=this.filterTargetComponent.getFilterWindowCriteria();if(_9!=null){_2=_1.combineCriteria(_9,_2,null,_8)}
}
if(_5){this.filterTargetComponent.checkForSearchForm();if(this.filterTargetComponent.searchFormCriteria){_2=_1.combineCriteria(this.filterTargetComponent.searchFormCriteria,_2,null,_8
)}
}else{var _10=this.filterTargetComponent.getFilterEditorCriteria?this.filterTargetComponent.getFilterEditorCriteria():null;if(_10){_2=_1.combineCriteria(_10,_2,null,_8
)}
}
return _2}
,isc.A.getSourceListFilterContext=function isc_SetFilterItem_getSourceListFilterContext(){var _1=this.getSourceList(),_2=this.filterTargetComponent;if(_2!=null&&(_1==null||(_1.context==null&&_1.requestProperties==null)))
{var _3=_2.fetchRequestProperties;var _4=_2.dataProperties,_5=_4&&_4.requestProperties;if(_3!=null||_5!=null){return isc.addProperties({},_3,_5)}
}
return this.Super("getSourceListFilterContext",arguments)}
,isc.A.getSourceListOperationId=function isc_SetFilterItem_getSourceListOperationId(){var _1=this.getSourceList(),_2=this.filterTargetComponent;if(_2!=null&&(_1==null||(_1.context==null&&_1.requestProperties==null)))
{if(_2.fetchOperation)return _2.fetchOperation}
return this.Super("getSourceListOperationId",arguments)}
,isc.A.getDisplayFieldName=function isc_SetFilterItem_getDisplayFieldName(){if(this.filterByPrimaryKey&&this.valueField==null&&this.displayField==null)
{return this.name}
return this.Super("getDisplayFieldName",arguments)}
,isc.A.getValueFieldName=function isc_SetFilterItem_getValueFieldName(){if(this.valueField!=null)return this.valueField;if(this.$253d()&&this.filterByPrimaryKey){var _1=this.getOptionDataSource(),_2=_1&&_1.getPrimaryKeyFieldName();if(_2!=null)return _2}
if(this.filterTargetComponent!=null){return this.name}
return this.Super("getValueFieldName",arguments)}
,isc.A.init=function isc_SetFilterItem_init(_1,_2,_3,_4){if(this.isInGrid()){var _5=this.getListGrid();var _6=(isc.isA.RecordEditor(_5)&&_5.sourceWidget&&_5.sourceWidget.filterEditor==_5);if(_6){this.filterTargetComponent=_5.sourceWidget;if(isc.isA.TreeGrid(this.filterTargetComponent)){var _7=this.filterTargetComponent.getField(this.name);if(_7!=null&&_7.treeField){this.filterByPrimaryKey=true;var _8=isc.addProperties({},_1,_2,_3,_4);if(_8.selectionStyle==null){this.selectionStyle="pickTree"}
}
}
}
}
this.operator=this.useUnselectedValues?this.unselectedOperator:this.selectedOperator;return this.Super("init",arguments)}
,isc.A.canEditCriterion=function isc_SetFilterItem_canEditCriterion(_1){return(_1.fieldName==this.getCriteriaFieldName()&&(_1.operator==this.selectedOperator||_1.operator==this.unselectedOperator)
)}
,isc.A.setCriterion=function isc_SetFilterItem_setCriterion(_1){var _2=this.getCriterion();var _3=true;if(_2==null){if(_1==null)_3=false}else if(_1!=null){var _4=_2.value||[];if(_2.operator==_1.operator&&_4.equals(_1.value))
{_3=false}
}
this.$254g=true;if(_3){var _5=_1&&_1.operator;if(_5!=this.selectedOperator&&_5!=this.unselectedOperator){_5=this.defaultUseUnselectedValues?this.unselectedOperator:this.selectedOperator}
this.setUseUnselectedValues(_5==this.unselectedOperator,true)}
var _6=_1&&_1.value;this.setValue(_6);delete this.$254g}
,isc.A.pickerSelectionUpdated=function isc_SetFilterItem_pickerSelectionUpdated(){if(this.$254g)return;return this.Super('pickerSelectionUpdated',arguments)}
,isc.A.getCriteriaFieldName=function isc_SetFilterItem_getCriteriaFieldName(){if(this.filterByPrimaryKey&&this.criteriaField==null){return this.getValueFieldName()}
return this.Super("getCriteriaFieldName",arguments)}
,isc.A.shouldIncludePathInInSetCriteria=function isc_SetFilterItem_shouldIncludePathInInSetCriteria(){if(this.includePathInInSetCriteria!=null)return this.includePathInInSetCriteria;if(this.filterTargetComponent!=null&&!this.filterTargetComponent.keepParentsOnFilter)return true;return false}
,isc.A.getCriteriaValue=function isc_SetFilterItem_getCriteriaValue(){if(this.$253d()&&this.operator=="inSet"&&this.shouldIncludePathInInSetCriteria()){var _1=[];var _2=this.pickTree;if(_2!=null){var _3=this.pickTree.targetField;var _4=this.pickTree.selectionManager.getSelectionByKeys(true,false);for(var i=0;i<_4.length;i++){var _6=_4[i][_3];if(_6==null||_1.contains(_6))continue;_1.add(_6);if(!this.cascadeSelection){var _7=this.pickTree.data.getParents();for(var _8=0;_8<_7.length;_8++){var _6=_7[i][_3];if(_6==null||_1.contains(_6))continue;_1.add(_6)}
}
}
return _1}
}
return this.Super("getCriteriaValue",arguments)}
,isc.A.setUseUnselectedValues=function isc_SetFilterItem_setUseUnselectedValues(_1){this.operator=_1?this.unselectedOperator:this.selectedOperator;this.Super("setUseUnselectedValues",arguments)}
);isc.B._maxIndex=isc.C+18;isc.defineClass("ShuttleItem","CanvasItem");isc.A=isc.ShuttleItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.width=400;isc.A.height=200;isc.A.shuttleConstructor="Shuttle";isc.A.shuttleDefaults={selectionUpdated:function(){this.canvasItem.saveValue(this.getSelectedValues())}
};isc.B.push(isc.A.$18y=function isc_ShuttleItem__createCanvas(){var _1=this.shuttleFields;var _2=this.getValueFieldName();var _3=this.getDisplayFieldName()||_2;if(_1==null){_1=[{name:_3}]}
var _4={dataSource:this.getOptionDataSource(),valueField:_2,fields:_1,selectedValues:this.getValue()
};this.shuttle=this.canvas=this.createAutoChild("shuttle",_4);return this.Super("$18y",arguments)}
,isc.A.showValue=function isc_ShuttleItem_showValue(_1,_2){if(!this.canvas)return;this.canvas.clearSelection(false);this.canvas.setSelectedByValue(_2,true)}
);isc.B._maxIndex=isc.C+2;isc.ClassFactory.defineClass("FileItem","CanvasItem");isc.A=isc.FileItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.shouldSaveValue=true;isc.A.$105m=true;isc.A.multiple=true;isc.A.editFormConstructor="DynamicForm";isc.A.editFormDefaults={numCols:1,colWidths:["*"],autoDraw:false,cellPadding:0,_redrawWithParent:false,redrawOnResize:false,canSubmit:true,getSaveOperationType:function(){if(this.targetItem&&this.targetItem.form)
return this.targetItem.form.getSaveOperationType();return this.Super("getSaveOperationType",arguments)}
};isc.A.uploadItemConstructor=isc.TUploadItem||isc.UploadItem;isc.A.displayFormConstructor="DynamicForm";isc.A.displayFormDefaults={autoDraw:false,_redrawWithParent:false,redrawOnResize:false,canSubmit:true
};isc.A.displayItemConstructor="StaticTextItem";isc.A.displayCanvasConstructor="Canvas";isc.A.$12f="blob";isc.A.viewIconSrc="View";isc.A.downloadIconSrc="Download";isc.B.push(isc.A.setMultiple=function isc_FileItem_setMultiple(_1){this.multiple=_1;if(this.isDrawn())this.redraw()}
,isc.A.$18y=function isc_FileItem__createCanvas(){if(!isc.isA.Canvas(this.canvas)){this.$861=this.isReadOnly();this.canvas=(this.$861?this.$862()
:this.$863())}
this.containerWidget.addChild(this.canvas)}
,isc.A.$862=function isc_FileItem__createReadOnlyCanvas(){var _1={};var _2=isc.addProperties({},this.displayItemDefaults,this.displayItemProperties,{type:"text",editorType:this.displayItemConstructor,width:this.width,height:"*",name:this.getFieldName(),showTitle:false
}
);var _3=isc.addProperties({width:"100%",height:10},this.displayFormDefaults,this.displayFormProperties,{action:this.action,targetItem:this,items:[_2]
}
);var _4=isc.isA.Class(this.displayFormConstructor)?this.displayFormConstructor:isc[this.displayFormConstructor];this.displayForm=_4.create(_3);var _5=isc.addProperties({width:"100%",height:10,visibility:"hidden"},this.displayCanvasDefaults,this.displayCanvasProperties
);var _6=isc.isA.Class(this.displayCanvasConstructor)?this.displayCanvasConstructor:isc[this.displayCanvasConstructor];this.displayCanvas=_6.create(_5)}
,isc.A.$863=function isc_FileItem__createEditableCanvas(){var _1=isc.addProperties({},this.editFormDefaults,this.editFormProperties,{action:this.action,targetItem:this,checkFileAccessOnSubmit:this.form.checkFileAccessOnSubmit,visibility:"hidden",addOperation:this.form.addOperation,updateOperation:this.form.updateOperation,removeOperation:this.form.removeOperation,fetchOperation:this.form.fetchOperation,items:[isc.addProperties({},this.uploadItemDefaults,this.uploadItemProperties,{name:this.getFieldName(),showTitle:false,targetItem:this,editorType:this.uploadItemConstructor,width:isc.isA.Number(this.width)?this.width:null,height:isc.isA.Number(this.height)?this.height:null,multiple:this.multiple,multipleValueSeparator:this.multipleValueSeparator,accept:this.accept,capture:this.capture,getElementName:function(){return this.getFieldName()},changed:function(_5,_6,_7){this.targetItem.storeValue(_7)},$17u:function(){var _2=this.targetItem;return _2.$17u.apply(_2,arguments)}
}
),{name:"_transaction",type:"HiddenItem"}
]
}
);var _3=isc.isA.Class(this.editFormConstructor)?this.editFormConstructor:isc[this.editFormConstructor];var _4=this.editForm=_3.create(_1);_4.redrawIfDirty();this.uploadItem=_4.items[0];return _4}
,isc.A.getFileTitle=function isc_FileItem_getFileTitle(_1,_2){var _3=this.form,_4=_3.getDataSource(),_5=(_4?_4.getFilenameField(this.name):null)||this.name+"_filename",_6=_2[_5];return _6}
,isc.A.$152r=function isc_FileItem__canEditChanged(_1,_2){this.redraw();return this.Super("$152r",arguments)}
,isc.A.redraw=function isc_FileItem_redraw(){var _1=this.isReadOnly();if(this.$861!=_1){this.$173n()}else if(this.canvas&&!_1){var _2=this.editForm.getItem(0);if(this.multiple!=_2.multiple){_2==null;this.$173n()}
}
this.Super("redraw",arguments)}
,isc.A.$173n=function isc_FileItem__recreateCanvas(){var _1=this.getValue();if(this.canvas){delete this.canvas.canvasItem;this.canvas.destroy(true)}
if(this.displayForm&&this.displayForm!=this.canvas){this.displayForm.destroy(true);delete this.displayForm}
if(this.displayCanvas&&this.displayCanvas!=this.canvas){this.displayCanvas.destroy(true);delete this.displayCanvas}
this.$861=this.isReadOnly();this.setCanvas(this.$861?this.$862()
:this.$863());this.setValue(_1)}
,isc.A.setValue=function isc_FileItem_setValue(_1){if(this.isReadOnly()){var _2=this.form,_3=_2.getValues()
;if((_1!=null&&!isc.isA.emptyString(_1))){if(this.canvas!=this.displayForm){this.setCanvas(this.displayForm)}
var _4=isc.addProperties({},_3);_4[this.getFieldName()]=_1;this.displayForm.setValues(_4);if(this.displayCanvas)this.displayCanvas.hide();this.displayForm.show()}else{if(this.canvas!=this.displayCanvas){this.setCanvas(this.displayCanvas)}
this.setCanvasContent(_1);if(this.displayForm)this.displayForm.hide();this.displayCanvas.show()}
return this.Super("setValue",arguments)}else{if(_1==null||isc.isA.emptyString(_1)){this.canvas.items[0].setValue(_1);return this.Super("setValue",arguments)}
return this.canvas.items[0].setValue(_1)}
}
,isc.A.setCanvasContent=function isc_FileItem_setCanvasContent(_1){var _2=this.getFormRecord();if((this.type=="imageFile"||this.type=="viewFile")&&this.showFileInline!=false){this.canvas.setHeight("*");this.canvas.setWidth("*");this.canvas.setContents(this.getImageHTML(_1,_2)||"&nbsp;")}else{if(this.showFileInline==true){this.logWarn("setValue(): Unsupported field-type for showFileInline: "+this.type)}
this.canvas.setHeight(20);this.canvas.setWidth("*");this.canvas.setContents(this.getViewDownloadHTML(_1,_2)||"&nbsp;")}
}
,isc.A.setWidth=function isc_FileItem_setWidth(_1){if(this.canvas&&!this.isReadOnly()){this.canvas.items[0].setWidth(_1)}
this.Super("setWidth",arguments)}
,isc.A.setHeight=function isc_FileItem_setHeight(_1){if(this.canvas&&!this.isReadOnly()){this.canvas.items[0].setHeight(_1)}
this.Super("setHeight",arguments)}
,isc.A.getViewDownloadHTML=function isc_FileItem_getViewDownloadHTML(_1,_2){if(_2==null)return null;var _3=this.form,_4=_3.valuesManager,_5=_3.getDataSource(),_6=_5?_5.getField(this.name):null,_7=this.getFileTitle(_1,_2),_8=_5?_5.getPrimaryKeyFieldNames():null,_9=(_8==null)
;if(_6&&!_6.filenameSuppressed&&(_7==null||isc.isAn.emptyString(_7))){return this.emptyCellValue}
if(_8){var _10=_4?_4.getValues():_3.getValues();for(var i=0;i<_8.length;i++){var _12=_8[i];if(isc.DynamicForm.$70o(_12,this,_10,_3,true)==null){_9=true;break}
}
}
if(_9){return this.emptyCellValue}
return"<nobr>"+this.$137i()+"&nbsp;"+this.$137j()+(_7?"&nbsp;"+_7:"")+"</nobr>"}
,isc.A.$137i=function isc_FileItem__getViewIconSrc(){return isc.Canvas.imgHTML({src:this.viewIconSrc,width:16,height:16,extraCSSText:"cursor:"+isc.Canvas.POINTER_OR_HAND,eventStuff:" onclick='"+this.getID()+".viewFile()'"
})}
,isc.A.$137j=function isc_FileItem__getDownloadIconSrc(){return isc.Canvas.imgHTML({src:this.downloadIconSrc,width:16,height:16,extraCSSText:"cursor:"+isc.Canvas.POINTER_OR_HAND,eventStuff:" onclick='"+this.getID()+".downloadFile()'"
})}
,isc.A.getFormDataSource=function isc_FileItem_getFormDataSource(){var _1=this.form.getDataSource()||(this.form.valuesManager?this.form.valuesManager.getDataSource():null)
;return _1}
,isc.A.getFormRecord=function isc_FileItem_getFormRecord(){var _1=this.form.valuesManager?this.form.valuesManager.getValues():null;if(!_1||isc.isAn.emptyObject(_1))_1=this.form.getValues();return _1}
,isc.A.getImageHTML=function isc_FileItem_getImageHTML(_1,_2){if(!_2||isc.isAn.emptyObject(_2))return;const _3=this.name+"$68c",_4=this.getFormDataSource(),_5=_4?_4.getField(this.name):null,_6=this.getFileTitle(_2[this.name],_2)
;_1=_2[_3];if(_1==null&&_5&&(_5.filenameSuppressed||_6)){const _7=this.form.getField(this.name),_8=isc.Canvas.getFieldImageDimensions(_7,_2);_1=_2[_3]=isc.Canvas.imgHTML(_4.getFileURL(_2,this.name),_8.width,_8.height,null,null,isc.Canvas.$1625)}
return _1}
,isc.A.viewFile=function isc_FileItem_viewFile(){isc.DS.get(this.getFormDataSource()).viewFile(this.getFormRecord(),this.name)}
,isc.A.downloadFile=function isc_FileItem_downloadFile(){isc.DS.get(this.getFormDataSource()).downloadFile(this.getFormRecord(),this.name)}
,isc.A.$85m=function isc_FileItem__shouldAllowExpressions(){return false}
);isc.B._maxIndex=isc.C+21;if(isc.ListGrid){isc.ClassFactory.defineClass("RelationItem","CanvasItem");isc.A=isc.RelationItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.canvasConstructor="ListGrid";isc.A.canvasDefaults={canEdit:true
};isc.A.pickerConstructor="RelationPicker";isc.A.showEditButton=true;isc.A.editButtonDefaults={click:"item.showPicker(item.showPickerModal(), icon)",prompt:"Edit new/selected item"
};isc.A.showRemoveButton=true;isc.A.removeButtonDefaults={src:"[SKIN]DynamicForm/Remove_icon.gif",click:"item.removeSelectedData()",prompt:"Remove selected item"
};isc.A.canEditWithNoMasterRecord=false;isc.B.push(isc.A.getValuesComponent=function isc_RelationItem_getValuesComponent(){var _1=this.form,_2=this.form?this.form.valuesManager:null;if(_2!=null)return _2;return _1}
,isc.A.showPickerModal=function isc_RelationItem_showPickerModal(){var _1=this.getValuesComponent();return _1&&!_1.saveOperationIsAdd()}
);isc.B._maxIndex=isc.C+2;isc.A=isc.RelationItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_RelationItem_init(){this.hasMasterRecord=false;this.Super("init",arguments);if(this.showEditButton)this.editButton=this.addIcon(this.editButtonDefaults);if(this.showRemoveButton)this.removeButton=this.addIcon(this.removeButtonDefaults)}
,isc.A.getPickerData=function isc_RelationItem_getPickerData(){var _1=this.canvas.getSelectedRecord();if(_1)return _1;var _2=this.getValuesComponent();return this.getDataSource().getForeignKeysByRelation(_2.getValues(),_2.dataSource)}
,isc.A.showPicker=function isc_RelationItem_showPicker(_1,_2,_3,_4){if(_3==null)_3={};_3.dataSource=this.dataSource;this.Super("showPicker",[_1,_2,_3,_4],arguments);var _5={};var _6=this.getValuesComponent();if(!_6.saveOperationIsAdd()){_5=this.getDataSource().getForeignKeysByRelation(_6.getValues(),_6.dataSource)}
this.picker.setForeignKeyValues(_5)}
,isc.A.getValue=function isc_RelationItem_getValue(){return}
,isc.A.removeSelectedData=function isc_RelationItem_removeSelectedData(){this.canvas.removeSelectedData()}
,isc.A.setValue=function isc_RelationItem_setValue(){this.delayCall("filterRelation")}
,isc.A.filterRelation=function isc_RelationItem_filterRelation(){var _1=this.getValuesComponent();var _2=_1.getValues();var _3=this.isDisabled();if(_1.saveOperationIsAdd()){this.canvas.setData([]);this.hasMasterRecord=false}else{var _4=this.getDataSource();if(_4){this.canvas.filterData(_4.getForeignKeysByRelation(_2,_1.dataSource));this.hasMasterRecord=true}
}
if(_3!=this.isDisabled()){this.updateDisabled()}
if(this.picker){this.picker.clearData()}}
,isc.A.isDisabled=function isc_RelationItem_isDisabled(){var _1=this.Super("isDisabled",arguments);if(_1)return true;if(this.canEditWithNoMasterRecord)return false;return!!this.hasMasterRecord}
,isc.A.$85m=function isc_RelationItem__shouldAllowExpressions(){return false}
);isc.B._maxIndex=isc.C+9;isc.defineClass("RelationPicker","VLayout");isc.A=isc.RelationPicker.getPrototype();isc.A.className="dialogBackground";isc.A=isc.RelationPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.creatorName="picker";isc.B.push(isc.A.initWidget=function isc_RelationPicker_initWidget(){this.Super("initWidget",arguments);this.addAutoChild("editor",{dataSource:this.dataSource},"DynamicForm");this.addAutoChild("toolbar",{membersMargin:2
},"HLayout");this.addAutoChild("saveButton",{title:"Save",click:"this.picker.editor.saveData(this.picker.getID()+'.hide()')"
},"AutoFitButton",this.toolbar);this.addAutoChild("clearButton",{title:"Clear",click:"this.picker.clearData();"
},"AutoFitButton",this.toolbar);this.addAutoChild("cancelButton",{title:"Cancel",click:"this.picker.hide();this.picker.clearData()"
},"AutoFitButton",this.toolbar)}
,isc.A.hide=function isc_RelationPicker_hide(){this.Super("hide",arguments);this.hideClickMask()}
,isc.A.setData=function isc_RelationPicker_setData(_1){this.editor.setData(_1)}
,isc.A.getData=function isc_RelationPicker_getData(){return this.editor.getValues()}
,isc.A.clearData=function isc_RelationPicker_clearData(){this.editor.clearValues();this.setData(this.foreignKeyValues)}
,isc.A.dataChanged=function isc_RelationPicker_dataChanged(){}
,isc.A.setForeignKeyValues=function isc_RelationPicker_setForeignKeyValues(_1){this.foreignKeyValues=_1}
);isc.B._maxIndex=isc.C+7;}
if(isc.ListGrid){isc.ClassFactory.defineClass("MultiFileItem","RelationItem");isc.A=isc.MultiFileItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.pickerConstructor="MultiFilePicker";isc.A.canvasDefaults={showHeader:false,canHover:true,cellHoverHTML:function(_1,_2,_3){if(this.canvasItem.form.saveOperationIsAdd()){var _4=_1[this.getFieldName(_3)];if(_4&&this.displayShortName){_4=_4.replace(/^.*[\\\/]/,isc.emptyString)
}
return _4}
},getCellValue:function(_1,_2,_3){var _1=this.Super("getCellValue",arguments);if(this.canvasItem.form.saveOperationIsAdd()){if(!this.displayShortName||!_1)return _1;_1=_1.replace(/.*(\\|\/)/g,isc.emptyString)}
return _1}
};isc.A.emptyMessage="Click icon to add...";isc.A.editButtonPrompt="Add files";isc.A.removeButtonPrompt="Remove selected files";isc.A.pickerUploadButtonInitialTitle="OK";isc.A.pickerUploadButtonTitle="Save";isc.A.pickerCancelButtonTitle="Cancel";isc.A.pickerAddAnotherFileButtonTitle="<u>Add&nbsp;another</u>";isc.A.pickerUploadProgressLabel="Saving ${fileName} ${formattedFileSize}";isc.A.displayShortName=true;isc.A.iconWidth=16;isc.A.iconHeight=16;isc.A.addFilesIcon="[SKIN]MultiUploadItem/icon_add_files.png";isc.A.editButtonDefaults=isc.addProperties({},isc.RelationItem.getInstanceProperty('editButtonDefaults'),{showOver:false
});isc.A.removeFilesIcon="[SKIN]MultiUploadItem/icon_remove_files.png";isc.A.removeButtonDefaults=isc.addProperties({},isc.RelationItem.getInstanceProperty('removeButtonDefaults'),{showOver:false
});isc.A.canEditWithNoMasterRecord=true;isc.B.push(isc.A.getDynamicDefaults=function isc_MultiFileItem_getDynamicDefaults(_1){if(_1=="canvas"){var _2={};if(this.emptyMessage!=null)_2.emptyMessage=this.emptyMessage;if(this.displayShortName!=null)_2.displayShortName=this.displayShortName;return _2}
return this.Super("getDynamicDefaults",arguments)}
,isc.A.showPickerModal=function isc_MultiFileItem_showPickerModal(){return true}
);isc.B._maxIndex=isc.C+2;isc.A=isc.MultiFileItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_MultiFileItem_init(){this.editButtonDefaults=isc.addDefaults({prompt:this.editButtonPrompt,src:this.addFilesIcon
},this.editButtonDefaults);this.removeButtonDefaults=isc.addDefaults({prompt:this.removeButtonPrompt,src:this.removeFilesIcon
},this.removeButtonDefaults);this.pickerProperties=isc.addProperties({},this.pickerProperties,{uploadWithoutPKButtonName:this.pickerUploadButtonInitialTitle,uploadWithPKButtonName:this.pickerUploadButtonTitle,cancelButtonName:this.pickerCancelButtonTitle,addAnotherFileButtonProperties:{contents:this.pickerAddAnotherFileButtonTitle
},progressMeterProperties:{progressLabelProperties:{dynamicContents:false,dynamicContentVars:null,contents:null,getContents:function(){var _1=this.creator,_2=_1.creator.creator,_3=_2.pickerUploadProgressLabel,_4=_3.evalDynamicString(_2,{fileName:_1.fileName,formattedFileSize:_1.getFormattedFileSize()
})
;return"<b><nobr>"+_4+"</nobr></b>"},show:function(){this.setContents(this.getContents());this.Super("show",arguments)}
}
}
});return this.Super("init",arguments)}
,isc.A.removeSelectedData=function isc_MultiFileItem_removeSelectedData(){var _1=this.getValuesComponent();if(!_1.saveOperationIsAdd())return this.Super("removeSelectedData",arguments);var _2=this.canvas.getSelection();var _3=_2.length;for(var i=0;i<_3;++i){this.picker.removeUploadField(_2[i]._form,true)}}
,isc.A.formSaved=function isc_MultiFileItem_formSaved(_1,_2,_3){if(this.picker){this.showPicker(true,this.editButton);var _4=this.getValuesComponent();this.picker.setForeignKeyValues(this.getDataSource().getForeignKeysByRelation(_3,_4.dataSource)
);var _5=this;this.picker.saveData(function(){_5.saveDataCallback()});return false}else{this.saveDataCallback()}}
,isc.A.saveDataCallback=function isc_MultiFileItem_saveDataCallback(){if(this.picker)this.picker.hide();this.getValuesComponent().formSavedComplete();if(this.picker&&isc.ResultSet&&!isc.isA.ResultSet(this.canvas.data)){this.canvas.setData([]);if(this.picker.hasKeys()){this.canvas.fetchData(this.picker.foreignKeyValues)}
}}
,isc.A.pickerDataChanged=function isc_MultiFileItem_pickerDataChanged(_1){if(!this.getValuesComponent().saveOperationIsAdd())return;this.canvas.setData(this.picker.getData())}
,isc.A.destroy=function isc_MultiFileItem_destroy(){if(this.picker)this.picker.destroy();this.Super("destroy",arguments)}
);isc.B._maxIndex=isc.C+6;isc.defineClass("MultiFilePicker","VStack");isc.A=isc.MultiFilePicker.getPrototype();isc.A.height=1;isc.A.layoutMargin=10;isc.A.showInWindow=false;isc.A.styleName="windowBackground";isc.A.minUploadFields=1;isc.A.minFileSizeForProgressBar=204800;isc.A.progressCheckFrequency=1000;isc.A.progressMeterConstructor="MultiFileProgressMeter";isc.A.uploadLayoutConstructor="VStack";isc.A.uploadWithPKButtonName="Save";isc.A.uploadWithoutPKButtonName="OK";isc.A.cancelButtonName="Cancel";isc.A.showUploadRemoveButton=true;isc.A.uploadWithoutPK=false;isc.A.title="Add files";isc.A.dialogWrapperProperties={_constructor:"Window",showHeader:true,showMinimizeButton:false,showCloseButton:false,autoSize:true,headerProperties:{margin:-2},bodyProperties:{layoutMargin:10,margin:-2}
};isc.A=isc.MultiFilePicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.addAnotherFileButtonDefaults={canFocus:true,contents:"<u>Add&nbsp;another</u>"};isc.A.addFilesIcon="[SKIN]MultiUploadItem/icon_add_files.png";isc.A.removeFilesIcon="[SKIN]MultiUploadItem/icon_remove_files.png";isc.A.creatorName="picker";isc.A.revertDataOnHide=true;isc.B.push(isc.A.initWidget=function isc_MultiFilePicker_initWidget(){this.Super("initWidget",arguments);this.addAutoChild("uploadLayout",{height:1});this.addAutoChild("addAnotherFileButton",{width:75,height:20,align:"left",cursor:isc.Canvas.HAND,icon:this.addFilesIcon,click:"this.picker.addUploadField()"
},"Label");this.addAutoChild("toolbar",{width:1,height:1,membersMargin:10,layoutMargin:10,layoutAlign:"right"
},"HStack");this.addAutoChild("saveButton",{title:this.hasKeys()?this.uploadWithPKButtonName:this.uploadWithoutPKButtonName,width:80,updateTitle:function(){var _1=this.parentElement.picker;var _2=_1.hasKeys()?_1.uploadWithPKButtonName:_1.uploadWithoutPKButtonName;if(_2!=this.title)this.setTitle(_2)},click:function(){var _1=this.parentElement.picker;if(!_1.hasKeys()&&!_1.uploadWithoutPK){_1.hide();_1.dataChanged()}else{_1.saveData()}
},observes:[{source:this,message:"setForeignKeyValues",action:"observer.updateTitle()"}]
},"IButton",this.toolbar);this.addAutoChild("cancelButton",{title:this.cancelButtonName,width:80,click:function(){this.picker.hide();if(this.picker.shouldRevertDataOnHide())this.picker.revertData()}
},"IButton",this.toolbar);this.clearData()}
,isc.A.shouldRevertDataOnHide=function isc_MultiFilePicker_shouldRevertDataOnHide(){return this.revertDataOnHide}
,isc.A.hasKeys=function isc_MultiFilePicker_hasKeys(){return(this.foreignKeyValues&&!isc.isAn.emptyObject(this.foreignKeyValues))}
,isc.A.setForeignKeyValues=function isc_MultiFilePicker_setForeignKeyValues(_1){this.foreignKeyValues=_1}
,isc.A.revertData=function isc_MultiFilePicker_revertData(){this.clearData(true)}
,isc.A.clearData=function isc_MultiFilePicker_clearData(_1){var _2=this.getForms(),_3=0
;for(var i=_2.length-1;i>=0;i--){var _5=false;if(_1)_5=(_2[i].newlyAdded==true);else _5=true;if(isc.isAn.emptyObject(_2[i].getValues()))_5=true;if(_5)this.removeUploadField(_2[i]);else _3++}
for(var i=_3;i<this.minUploadFields;i++)this.addUploadField()}
,isc.A.getBinaryFieldName=function isc_MultiFilePicker_getBinaryFieldName(){var _1;if(this.dataSource==null){isc.logWarn("A datasource must be defined on a MultiFileItem ("+this.id+") or it will both not function and elements will not render properly.")}else{var _2=isc.DataSource.get(this.dataSource),_3=_2.getFields();for(var _4 in _3){if(_3[_4].type=="binary"||_3[_4].type=="imageFile"){_1=_4;break}
}
if(_1==null){isc.logWarn("The datasource defined on a MultiFileItem ("+this.id+") must define a binary field")}
}
return _1}
,isc.A.addUploadField=function isc_MultiFilePicker_addUploadField(){var _1=this.creator?this.creator.form:null;var _2=this.getBinaryFieldName();var _1=this.createAutoChild("uploadForm",{checkFileAccessOnSubmit:_1&&_1.checkFileAccessOnSubmit,dataSource:this.dataSource,cellPadding:0,numCols:2,colWidths:['*','*'],width:250,newlyAdded:true,elementChanged:function(){this.Super("elementChanged",arguments);this.picker.dataChanged()},fields:[{name:_2,multiple:false}
]
},isc.DynamicForm);var _3=this.createAutoChild("uploadFormLayout",{members:[_1],height:21
},isc.HLayout);this.uploadLayout.addMember(_3);if(this.showUploadRemoveButton){var _4=this.createAutoChild("uploadRemoveButton",{form:_1,picker:this,contents:isc.emptyString,cursor:isc.Canvas.HAND,icon:this.removeFilesIcon,click:"this.picker.removeUploadField(this.form, true)",iconSpacing:6,width:22,height:20
},isc.Label);_3.addMember(_4,0)}
if(this.maxUploadFields&&this.maxUploadFields<=this.uploadLayout.getMembers().length)
this.addAnotherFileButton.hide()}
,isc.A.removeUploadField=function isc_MultiFilePicker_removeUploadField(_1,_2){if(_1.$203){isc.rpc.cancelQueue(_1.$203);this.transactionNum=null;if(this.progressMeter)this.progressMeter.hide()}
if(_1.parentElement)_1.parentElement.destroy();if(_2&&this.uploadLayout.getMembers().length<this.minUploadFields){this.addUploadField()}
if(this.maxUploadFields&&this.maxUploadFields>this.uploadLayout.getMembers().length){this.addAnotherFileButton.show()}
this.dataChanged()}
,isc.A.getForms=function isc_MultiFilePicker_getForms(){return this.uploadLayout.getMembers().callMethod("getMember",this.showUploadRemoveButton?1:0)}
,isc.A.dataChanged=function isc_MultiFilePicker_dataChanged(){}
,isc.A.show=function isc_MultiFilePicker_show(){var _1=this.getForms();if(_1){var _2=this.getBinaryFieldName();for(var i=0;i<_1.length;i++){var _4;if(_1[i].getValue(_2)!=_4){_1[i].newlyAdded=false}
}
}
this.Super("show",arguments);if(this.showInWindow&&!this.dialogWrapper){this.setLayoutMargin(0);this.addAutoChild("dialogWrapper",{title:this.title});this.dialogWrapper.addItem(this.uploadLayout);this.dialogWrapper.addItem(this.addAnotherFileButton);this.dialogWrapper.addItem(this.toolbar)}}
,isc.A.hide=function isc_MultiFilePicker_hide(){this.Super("hide",arguments);this.hideClickMask()}
,isc.A.getData=function isc_MultiFilePicker_getData(){var _1=[];var _2=this.getForms();for(var i=0;i<_2.length;i++){var _4=_2[i];if(!_4)continue;var _5=_4.getValues();if(isc.isAn.emptyObject(_5))continue;_5._form=_4;_1[_1.length]=_5}
return _1}
,isc.A.saveData=function isc_MultiFilePicker_saveData(_1){if(!_1)_1=this.saveCallback;if(!_1)_1=this.getID()+".hide()";this.saveCallback=_1;var _2=this.getForms();this.saveButton.setTitle(this.uploadWithPKButtonName);var _3;var _4;while(_2.length>0){_3=_2[0];_4=_3.getFields()[0].getValue();if(!_4){this.removeUploadField(_3);_2.remove(_3)}
else break}
if(_2.length==0){if(this.progressMeter){this.progressMeter.hide()}
this.transactionNum=null;delete this.saveCallback;this.fireCallback(_1);this.clearData();return}
if(!_3.validate())return;if(!this.progressMeter){this.progressMeter=this.createAutoChild("progressMeter",{progressCheckFrequency:this.progressCheckFrequency
});this.addMember(this.progressMeter,0)}
_4=_4.replace(/.*(\\|\/)/g,isc.emptyString);this.progressMeter.setFileName(_4);this.progressMeter.hideProgressBar();this.progressMeter.show();if(this.hasKeys()){for(var _5 in this.foreignKeyValues)_3.setValue(_5,this.foreignKeyValues[_5])}
var _6=this,_7=_3.saveData(function(_8,_9,_7){_6.saveDataCallback(_7,_8,_9)},{params:{formID:_3.getID()},willHandleError:true,form:_3,showPrompt:false,saveDataCallback:_1,timeout:0
}
);this.transactionNum=_7.transactionNum;_3.$203=this.transactionNum;this.progressCheck(_3.getID(),this.transactionNum)}
,isc.A.saveDataCallback=function isc_MultiFilePicker_saveDataCallback(_1,_2,_3){var _4=_1.form;if(_2.status!=isc.RPCResponse.STATUS_SUCCESS){this.progressMeter.hide();this.transactionNum=null;if(_2.status==isc.RPCResponse.STATUS_VALIDATION_ERROR){_4.setErrors(_2.errors,true)}else{isc.RPCManager.handleError(_2,_1)}
return}
_4.$203=null;this.removeUploadField(_4);this.saveData(_1.saveDataCallback);if(this.callingFormItem&&this.callingFormItem.fileUploaded){this.callingFormItem.fileUploaded(_1,_2)}}
,isc.A.progressCheck=function isc_MultiFilePicker_progressCheck(_1,_2){this.lastProgressCheckTime=new Date().getTime();isc.DMI.callBuiltin({methodName:"uploadProgressCheck",callback:this.getID()+".progressCallback(rpcRequest, rpcResponse, data, "+_2+")",arguments:_1,requestParams:{willHandleError:true,showPrompt:false,formID:_1}
})}
,isc.A.progressCallback=function isc_MultiFilePicker_progressCallback(_1,_2,_3,_4){var _5=_1.formID;var _6=window[_5];if(!_6||this.transactionNum!==_4)return;if(_2.status!=isc.RPCResponse.STATUS_SUCCESS)this.progressCheck(_5);if(_3.errors){isc.rpc.cancelQueue(this.transactionNum);_6.setErrors(_3.errors,true);this.saveButton.show();this.transactionNum=null;this.progressMeter.hide();return}
this.progressMeter.setFileSize(_3.totalBytes);if(_3.totalBytes<this.minFileSizeForProgressBar){this.progressMeter.hideProgressBar();return}
this.progressMeter.setBytesReceived(_3.bytesSoFar);this.progressMeter.showProgressBar();this.progressMeter.setPercentDone(100*_3.bytesSoFar/_3.totalBytes);var _7=this.progressCheckFrequency-(new Date().getTime()-this.lastProgressCheckTime);if(_7<0)_7=0;this.delayCall("progressCheck",[_5,_4],_7)}
);isc.B._maxIndex=isc.C+18;isc.defineClass("MultiFileProgressMeter","VStack");isc.A=isc.MultiFileProgressMeter;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.formatBytes=function isc_c_MultiFileProgressMeter_formatBytes(_1){var _2;if(_1<1024){_1=Math.round(_1/1024);_2="B"}else if(_1<(1024*1024)){_1=Math.round(_1/1024);_2="KB"}else{_1=Math.round(_1/(1024*1024)*100)/100;_2="MB"}
return _1+"&nbsp;"+_2}
);isc.B._maxIndex=isc.C+1;isc.A=isc.MultiFileProgressMeter.getPrototype();isc.A.height=50;isc.A=isc.MultiFileProgressMeter.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_MultiFileProgressMeter_initWidget(){this.Super("initWidget",arguments);this.progressLabelProperties=isc.addDefaults(this.progressLabelProperties,{dynamicContentsVars:{progressMeter:this},dynamicContents:true,contents:"<b><nobr>Saving ${progressMeter.fileName} ${progressMeter.getFormattedFileSize()}</nobr></b>"
});this.addAutoChild("progressLabel",{height:1
},"Canvas")}
,isc.A.setFileName=function isc_MultiFileProgressMeter_setFileName(_1){this.fileName=_1;delete this.fileSize;this.bytesSoFar=0;this.bytesReceived=0;this.progressLabel.markForRedraw();if(this.progressBar)this.setPercentDone(0)}
,isc.A.setFileSize=function isc_MultiFileProgressMeter_setFileSize(_1){this.fileSize=_1;this.progressLabel.markForRedraw()}
,isc.A.setBytesReceived=function isc_MultiFileProgressMeter_setBytesReceived(_1){this.bytesSoFar=this.bytesReceived;;this.bytesReceived=_1;this.progressLabel.markForRedraw()}
,isc.A.getFormattedFileSize=function isc_MultiFileProgressMeter_getFormattedFileSize(){if(!this.fileSize)return isc.emptyString;var _1="<br>";if(this.bytesReceived){_1+=isc.MultiFileProgressMeter.formatBytes(this.bytesReceived)+" of "}
_1+=isc.MultiFileProgressMeter.formatBytes(this.fileSize);if(this.bytesSoFar&&this.progressCheckFrequency){var _2=this.bytesReceived-this.bytesSoFar;_2=isc.MultiFileProgressMeter.formatBytes(_2*1000/this.progressCheckFrequency);_1+=" ("+_2+"/sec)"}
return _1}
,isc.A.showProgressBar=function isc_MultiFileProgressMeter_showProgressBar(){this.addAutoChild("progressBar",{overflow:"visible"
},"Progressbar");this.progressBar.show()}
,isc.A.hideProgressBar=function isc_MultiFileProgressMeter_hideProgressBar(){if(this.progressBar)this.progressBar.hide()}
,isc.A.setPercentDone=function isc_MultiFileProgressMeter_setPercentDone(_1){this.progressBar.setPercentDone(_1)}
);isc.B._maxIndex=isc.C+8;}
isc.addGlobal("MultiUploadItem",isc.MultiFileItem);isc.addGlobal("MultiUploadPicker",isc.MultiFilePicker);if(isc.ListGrid){isc.defineClass("DialogUploadItem","StaticTextItem");isc.A=isc.DialogUploadItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.iconHeight=16;isc.A.iconWidth=16;isc.A.icons=[{src:"[SKIN]MultiUploadItem/icon_add_files.png",name:"upload",prompt:"Upload File",click:"item.showPicker(true)"},{src:"[SKIN]MultiUploadItem/icon_remove_files.png",name:"remove",prompt:"Remove File",click:"item.removeFile()"}
];isc.A.pickerConstructor="DialogUploadPicker";isc.A.noFileString="[NONE]";isc.B.push(isc.A.init=function isc_DialogUploadItem_init(){this.Super("init",arguments);if(!this.pickerDefaults)this.pickerDefaults={};isc.addProperties(this.pickerDefaults,{dataSource:this.dataSource
})}
,isc.A.mapValueToDisplay=function isc_DialogUploadItem_mapValueToDisplay(_1){return _1==null?this.noFileString:this.Super("mapValueToDisplay",arguments)}
,isc.A.showPicker=function isc_DialogUploadItem_showPicker(){this.Super("showPicker",arguments);var _1=this.getValue('primaryKey');this.picker.foreignKeyValues={primaryKey:_1
}}
,isc.A.removeFile=function isc_DialogUploadItem_removeFile(){var _1=this.getValue();if(_1!=this.defaultValue){var _2=isc.DataSource.get(this.dataSource);_2.removeData({primaryKey:_1},this.getID()+".removeFileCallback(dsResponse)")}}
,isc.A.removeFileCallback=function isc_DialogUploadItem_removeFileCallback(_1){if(_1.status!=isc.DSResponse.STATUS_SUCCESS){isc.warn("Unable to remove file: "+_1.data);return}
this.setValue(this.defaultValue)}
,isc.A.fileUploaded=function isc_DialogUploadItem_fileUploaded(_1,_2){var _3=_2.data;var _4={};_4[_3.primaryKey]=_3.file_filename;this.setValueMap(_4);this.setValue(_3.primaryKey)}
,isc.A.destroy=function isc_DialogUploadItem_destroy(){if(this.picker)this.picker.destroy();this.Super("destroy",arguments)}
,isc.A.$85m=function isc_DialogUploadItem__shouldAllowExpressions(){return false}
);isc.B._maxIndex=isc.C+8;isc.defineClass("DialogUploadPicker","MultiFilePicker");isc.A=isc.DialogUploadPicker.getPrototype();isc.A.maxUploadFields=1;isc.A.uploadWithoutPKButtonName="Upload";isc.A.uploadWithPKButtonName="Upload";isc.A.showUploadRemoveButton=false;isc.A.uploadWithoutPK=true}
if(isc.ListGrid){isc.ClassFactory.defineClass("SOAPUploadItem","DialogUploadItem");isc.A=isc.SOAPUploadItem.getPrototype();isc.A.dataSource="sessionFiles"}isc.ClassFactory.defineClass("SpinnerItem","TextItem");isc.A=isc.SpinnerItem;isc.A.INCREASE_ICON={};isc.A.DECREASE_ICON={};isc.A=isc.SpinnerItem.getPrototype();isc.A.defaultType="float";isc.A.changeOnKeypress=false;isc.A.canTabToIcons=false;isc.A.height=18;isc.A.unstackedTextBoxStyle="textItem";isc.A.step=1;isc.A.increaseIconDefaults={src:"[SKIN]/DynamicForm/Spinner_increase_icon.png",name:"increase",showOver:false,redrawOnShowIcon:true,showFocusedWithItem:false,imgOnly:true,hspace:0
};isc.A.decreaseIconDefaults={src:"[SKIN]/DynamicForm/Spinner_decrease_icon.png",name:"decrease",showOver:false,redrawOnShowIcon:true,showFocusedWithItem:false,imgOnly:true,hspace:0
};isc.A.stackedIconsWidth=16;isc.A.stackedIconsHeight=18;isc.A.unstackedIncreaseIconDefaults={src:"[SKIN]/DynamicForm/Spinner_increase_icon.png",width:18,height:18,name:"increase",showOver:false,showFocusedWithItem:false,imgOnly:true,hspace:0
};isc.A.unstackedDecreaseIconDefaults={src:"[SKIN]/DynamicForm/Spinner_decrease_icon.png",width:18,height:18,name:"decrease",showOver:false,showFocusedWithItem:false,imgOnly:true,hspace:0
};isc.A=isc.SpinnerItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.writeSpinnersIntoControlTable=true;isc.A.$132h="<td tabIndex='-1' style='font-size:0px'";isc.A.$132i=" rowspan='2'>";isc.A.$132j="</td>";isc.A.$1480="increase";isc.A.$1481="decrease";isc.A.hasInternalNavigation=true;isc.B.push(isc.A.init=function isc_SpinnerItem_init(){this.Super("init",arguments);var _1=this.step;if(_1!=null&&!isc.isA.Number(_1)){_1=parseFloat(_1);if(!isc.isA.Number(_1))_1=1;this.step=_1}
}
,isc.A.usingStackedMode=function isc_SpinnerItem_usingStackedMode(){if(this.writeStackedIcons!=null)return this.writeStackedIcons;return!isc.Browser.isTouch}
,isc.A.$14v=function isc_SpinnerItem__setUpIcons(){if(this.icons==null)this.icons=[];var _1,_2;if(this.usingStackedMode()){var _1=this.increaseIcon,_2=this.decreaseIcon
;if(!_1){_1=this.increaseIcon=isc.addProperties({},this.increaseIconDefaults,isc.SpinnerItem.INCREASE_ICON,this.increaseIconProperties),_1.inline=false;if(_1.width==null)_1.width=this.stackedIconsWidth;if(_1.height==null)_1.height=Math.round(this.stackedIconsHeight/2)}
if(!_2){_2=this.decreaseIcon=isc.addProperties({},this.decreaseIconDefaults,isc.SpinnerItem.DECREASE_ICON,this.decreaseIconProperties);_2.inline=false;if(_2.width==null)_2.width=this.stackedIconsWidth;if(_2.height==null)_2.height=Math.round(this.stackedIconsHeight/2)}
var _3=this.icons.getProperty("name");if(!_3.contains(_1.name))this.icons.addAt(_1,0);if(!_3.contains(_2.name))this.icons.addAt(_2,1)}else{if(!this.unstackedIncreaseIcon&&!this.unstackedDecreaseIcon){_1=this.unstackedIncreaseIcon=isc.addProperties({},this.unstackedIncreaseIconDefaults,this.unstackedIncreaseIconProperties);_2=this.unstackedDecreaseIcon=isc.addProperties({},this.unstackedDecreaseIconDefaults,this.unstackedDecreaseIconProperties);if(_1.inline==null)_1.inline=false;if(_2.inline==null)_2.inline=false;this.icons.addListAt([_2,_1],0)}
}
this.Super("$14v",arguments)}
,isc.A.$156r=function isc_SpinnerItem__supportsInlineIcons(){if(this.$169p==null)return false;return true}
,isc.A.$186e=function isc_SpinnerItem__writeSpinnersIntoControlTable(){return this.writeSpinnersIntoControlTable&&this.showIcons&&this.usingStackedMode()}
,isc.A.$1857=function isc_SpinnerItem__writeControlTable(){if(this.Super("$1857"))return true;if(this.$186e())return true;return false}
,isc.A.$16e=function isc_SpinnerItem__writeIconIntoItem(_1){if(this.$186e()&&((_1==this.increaseIcon)||(_1==this.decreaseIcon)))
{return true}
return this.Super("$16e",arguments)}
,isc.A.$186d=function isc_SpinnerItem__getPickerIconCellValue(){var _1=this.Super("$186d",arguments);if(this.$186e()){var _2=this.$186f();_2[7]=this.getIconHTML(this.getIcon("increase"));_2[12]=this.getIconHTML(this.getIcon("decrease"));var _3=_2.join("");if(_1==null){_1=_3}else{_1="<table cellPadding=0 cellSpacing=0><tr><td>"+_1+"</td><td>"+_3+"</td></table>"}
}
return _1}
,isc.A.getTextBoxWidth=function isc_SpinnerItem_getTextBoxWidth(_1){var _2=this.Super("getTextBoxWidth",arguments);if(this.$186e()){var _3=this.increaseIcon;_2-=(_3.width||this.iconWidth);if(_3.hspace)_2-=_3.hspace;if(_3.baseStyle)_2-=isc.Element.$yp(_3.baseStyle)}
return _2}
,isc.A.getLogicalTextBoxWidth=function isc_SpinnerItem_getLogicalTextBoxWidth(){var _1=this.Super("getLogicalTextBoxWidth",arguments);if(this.$186e()){var _2=this.increaseIcon;_1-=(_2.width||this.iconWidth);if(_2.hspace)_1-=_2.hspace;if(_2.baseStyle)_1-=isc.Element.$yp(_2.baseStyle);if(this.controlStyle){_1-=isc.Element.$yp(this.getControlStyle())}
}
return _1}
,isc.A.getIconsHTML=function isc_SpinnerItem_getIconsHTML(){if(this.$186e()){return this.Super("getIconsHTML",arguments)}
if(!this.showIcons)return isc.emptyString;var _1=this.$16j(true);if(!this.usingStackedMode()||!this.getIcon("increase").visible){return this.Super("getIconsHTML",arguments)}
var _2=this.$186f();var _3=this.icons.length-2;if(_3<this.$132k){_2.splice(9+4*_3,4*(this.$132k-_3));this.$132k=_3}else{var d=_3-this.$132k;if(d>0){var _5=[9,0];_5[2+4*d-1]=null;_2.splice.apply(_2,_5);this.$132k=_3}
}
if(this.renderAsStatic()){_2[7]=null;_2[12+4*this.$132k]=null}else{_2[7]=this.getIconHTML(this.getIcon("increase"));_2[12+4*this.$132k]=this.getIconHTML(this.getIcon("decrease"))}
var i=9;for(var d=0;d<this.icons.length;++d){var _7=this.icons[d];if(_7.name=="increase"||_7.name=="decrease")continue;if(!_7.visible||this.$16e(_7)){_2[i]=null;_2[i+1]=null;_2[i+2]=null;_2[i+3]=null}else{_2[i]=this.$132h;_2[i+1]=this.$132i;_2[i+2]=this.getIconHTML(_7);_2[i+3]=this.$132j;delete _7.$181a}
i+=4}
return _2.join(isc.emptyString)}
,isc.A.$186f=function isc_SpinnerItem__getSpinnerTableTemplate(){var _1=this.$204;if(_1==null){var _2=this.$132h,_3={},_4=this.$16l(_3),_5=this.$16m(_3);_1=this.$204=["<table role='presentation' style='margin-top:",_5,";margin-bottom:",_5,"' border=0 cellpadding=0 cellspacing=0><tbody><tr>",_2,">",null,"</td>","</tr><tr>",_2,">",null,"</td></tr></tbody></table>"
];this.$132k=0}
return _1}
,isc.A.getIconHTML=function isc_SpinnerItem_getIconHTML(_1){if(this.$68y()||(this.getCanEdit()==false&&this.renderAsStatic())){return null}
return this.Super("getIconHTML",arguments)}
,isc.A.getControlStyle=function isc_SpinnerItem_getControlStyle(){var _1=(this.getCanEdit()==false&&this.renderAsStatic()?this.getReadOnlyTextBoxStyle():this.controlStyle),_2=this.$15x(_1,this.$13p)
;return _2}
,isc.A.getTextBoxStyle=function isc_SpinnerItem_getTextBoxStyle(){if(this.usingStackedMode()){if(this.$68y())return isc.TextItem.getInstanceProperty("textBoxStyle");else return this.Super("getTextBoxStyle",arguments)}
if(this.$68y()&&this.unstackedPrintTextBoxStyle){return this.$15x(this.unstackedPrintTextBoxStyle,this.$13q)}
var _1=(this.getCanEdit()==false&&this.renderAsStatic()?this.getReadOnlyTextBoxStyle():this.unstackedTextBoxStyle),_2=this.$15x(_1,this.$13q)
;return _2}
,isc.A.getReadOnlyTextBoxStyle=function isc_SpinnerItem_getReadOnlyTextBoxStyle(){if(this.usingStackedMode())return this.Super("getReadOnlyTextBoxStyle",arguments);return this.unstackedReadOnlyTextBoxStyle||(this.form?this.form.readOnlyTextBoxStyle:"staticTextItem")}
,isc.A.$16m=function isc_SpinnerItem__getIconVMargin(_1){if(_1==this.getIcon("increase")||_1==this.getIcon("decrease"))return 0;return this.Super("$16m",arguments)}
,isc.A.getTotalIconsWidth=function isc_SpinnerItem_getTotalIconsWidth(){var _1=this.Super("getTotalIconsWidth",arguments);if(!this.$186e()&&_1>0&&this.usingStackedMode()){var _2=Math.max(this.getIcon("increase").width,this.getIcon("decrease").width);_1-=_2}
return _1}
,isc.A.mouseStillDown=function isc_SpinnerItem_mouseStillDown(_1,_2,_3){if(this.isDisabled()||this.isReadOnly())return;this.$205++;if(this.$18j)this.updateValue();var _4=_3.nativeTarget;var _5=this.$116r,_6=null;var _7=this.getIcon("increase"),_8=this.$16v(_7),_9=this.getIcon("decrease"),_10=this.$16v(_9)
;if(_8&&(_4==_8||_8.contains(_4)))
{_6=_7}else if(_10&&(_4==_10||_10.contains(_4)))
{_6=_9}
if(_5!=_6){this.$205=1;if(_5!=null){var _11=this.$16v(_5);if(_11){this.$123(_5.name,_11)}
}
this.$116r=_6;if(_6!=null){if(!isc.Browser.isTouch&&this.$166()!=null&&this.$166()==this.$15h())
{this.blurItem()}
var _11=this.$16v(_6);if(_11){this.$121(_6.name,_11)}
}
}
if(_6!=null){if(_6.name===this.$1480){this.increaseValue()}else if(_6.name===this.$1481){this.decreaseValue()}
}
}
,isc.A.mouseDown=function isc_SpinnerItem_mouseDown(_1,_2,_3){if(this.isDisabled()||this.isReadOnly())return;this.$205=0;isc.Page.setEvent(isc.EH.MOUSE_UP,this,isc.Page.FIRE_ONCE,"$116s")}
,isc.A.$116s=function isc_SpinnerItem__clearLastTargetIcon(){var _1=this.$116r;if(_1!=null){var _2=this.$16v(_1);if(_2){this.$123(_1.name,_2)}
}
this.$116r=null;if(!isc.Browser.isTouch)this.focusInItem()}
,isc.A.handleKeyPress=function isc_SpinnerItem_handleKeyPress(_1,_2){var _3=_1.keyName,_4=this.isReadOnly()
;var _5=this.Super("handleKeyPress",arguments);if(this.changeOnKeypress){var _6=this.$17n||_3;if(_6=="-"){this.$17n=0;this.isNegative=true;return true}else if(_6==isc.NumberUtil.decimalSymbol){this.isNegative=false;this.setValue("0.0");this.setSelectionRange(2,3);return false}if(_6==_3){this.isNegative=false
}
}
if(_5==false){return false}
if(!_4&&_3=="Arrow_Up"){this.increaseValue();return false}
if(!_4&&_3=="Arrow_Down"){this.decreaseValue();return false}
return _5}
,isc.A.getNextValue=function isc_SpinnerItem_getNextValue(_1,_2){return this.$118d(_1,_2)}
,isc.A.getPreviousValue=function isc_SpinnerItem_getPreviousValue(_1,_2){return this.$118d(_1,_2)}
,isc.A.$118d=function isc_SpinnerItem__defaultGetNextValue(_1,_2){var _3=this.min,_4=this.max;var _5,_6;if(Math.round(_2)==_2){_5=0
}else{var _7=_2+"";_5=_7.length-(_7.indexOf(".")+1)}
if(Math.round(_1)==_1){_6=0}else{var _8=_1+"";_6=_8.length-(_8.indexOf(".")+1)}
_1+=_2;var _9=Math.max(_5,_6);if(_9>0){_1=parseFloat(_1.toFixed(_9))}
if(_2>0&&_4!=null&&_1>_4)_1=_4;else if(_2<0&&_3!=null&&_1<_3)_1=_3;return _1}
,isc.A.increaseValue=function isc_SpinnerItem_increaseValue(){this.updateValue();var _1=this.getValue();if(_1!=null&&this.max==_1)return;var _2=this.$205;var _3=this.form.mouseStillDownDelay;var _4=this.step*(_2!=null?Math.pow(2,Math.floor(this.$205/(2000/_3)
)
):1);return this.$118e(_1,_4,true)}
,isc.A.decreaseValue=function isc_SpinnerItem_decreaseValue(){this.updateValue();var _1=this.getValue();if(_1!=null&&this.min==_1)return;var _2=this.$205;var _3=this.form.mouseStillDownDelay;var _4=(0-this.step)*(_2!=null?Math.pow(2,Math.floor(this.$205/(2000/_3)
)
):1);return this.$118e(_1,_4,false)}
,isc.A.$118e=function isc_SpinnerItem__modifyValue(_1,_2,_3){var _4=this.min,_5=this.max;if(!isc.isA.Number(_1)){_1=0;if((_4!=null&&_1<_4)||(_5!=null&&_1>_5)){_1=(_4!=null?_4:_5)}
}
if(_4==null&&_5==null){_1=_3
?this.getNextValue(_1,_2)
:this.getPreviousValue(_1,_2)}else{_1=this.$118d(_1,_2)}
var _6=this.form,_7=this.form?this.form.getValues():null,_8=(this.formatEditorValue!=null)
?this.formatEditorValue(_1,_7,_6,this)
:_1;this.setElementValue(_8);this.updateValue()}
,isc.A.mapDisplayToValue=function isc_SpinnerItem_mapDisplayToValue(_1){_1=this.Super("mapDisplayToValue",arguments);if(_1=="-"){_1=0}
if(isc.isA.String(_1)){var _2=parseFloat(_1);if(_2==_1)_1=_2}
return _1}
,isc.A.isInRange=function isc_SpinnerItem_isInRange(_1){if(this.max!=null){if(this.max<_1)return false}else if(this.min==null){if(0<=this.step){if((_1<this.getPreviousValue(_1,-this.step))||(this.getNextValue(_1,this.step)<_1))
{return false}
}else{if((_1>this.getPreviousValue(_1,-this.step))||(this.getNextValue(_1,this.step)>_1))
{return false}
}
}
if(this.min!=null){if(_1<this.min)return false}
return true}
,isc.A.updateValue=function isc_SpinnerItem_updateValue(){var _1=this.getElementValue();_1=this.mapDisplayToValue(_1);if(_1==this._value)return;if(_1!=null&&(isNaN(_1)==true||!this.isInRange(_1))){var _2=this.mapValueToDisplay(this._value);this.setElementValue(_2);return}
this.Super("updateValue",arguments)}
,isc.A.setValue=function isc_SpinnerItem_setValue(_1,_2,_3,_4,_5,_6){if(_1!=null&&isNaN(_1)==false){var _7=_1;if(_1!=-0)parseFloat(_1);if(_7==_1)_1=_7;else{this.logWarn("setValue(): passed '"+_1+"'. This is not a valid number - rejecting this value");_1=null}
}
if(_1!=null){if(this.max!=null&&_1>this.max){this.logWarn("setValue passed "+_1+" - exceeds specified maximum. Clamping to this.max.");_1=this.max}
if(this.min!=null&&_1<this.min){this.logWarn("setValue passed "+_1+" - less than specified minimum. Clamping to this.min.");_1=this.min}
if(this.max==null&&this.min==null){var _8=this.getNextValue(_1,this.step),_9=this.getPreviousValue(_1,-this.step);if(0<=this.step){if(_1<_9){this.logWarn("setValue passed "+_1+" - less than the previous value "+_9+". Setting to the previous value.");_1=_9}
if(_8<_1){this.logWarn("setValue passed "+_1+" - greater than the next value "+_8+". Setting to the next value.");_1=_8}
}else{if(_1>_9){this.logWarn("setValue passed "+_1+" - greater than the previous value "+_9+". Setting to the previous value.");_1=_9}
if(_8>_1){this.logWarn("setValue passed "+_1+" - less than the next value "+_8+". Setting to the next value.");_1=_8}
}
}
}
return this.invokeSuper(isc.SpinnerItem,"setValue",_1,_2,_3,_4,_5,_6)}
);isc.B._maxIndex=isc.C+32;isc.ClassFactory.defineClass("SliderItem","CanvasItem");isc.A=isc.SliderItem.getPrototype();isc.A.defaultType="float";isc.A.width=150;isc.A.vertical=false;isc.A.minValue=1;isc.A.maxValue=100;isc.A.roundValues=true;isc.A.roundPrecision=1;isc.A.defaultValue=1;isc.A.valueStyle="sliderValue";isc.A.valueTextStyle="sliderValueText";isc.A.pendingValueStyle="sliderValuePendingText";isc.A.shouldSaveValue=true;isc.A.sliderConstructor="Slider";isc.A.sliderDefaults={autoDraw:false,showTitle:false,overflow:"visible",padding:0,hover:function(){var _1=this.canvasItem;if(_1!=null){_1.$wb();return false}
},valueChanged:function(){var _1=this.canvasItem;if(_1!=null)_1.sliderChange()}
};isc.A.autoDestroy=true;isc.A=isc.SliderItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.changeOnDrag=true;isc.B.push(isc.A.init=function isc_SliderItem_init(){this.Super("init",arguments);this.$207=this.getDefaultValue()}
,isc.A.$18y=function isc_SliderItem__createCanvas(){var _1=this.canvas=this.addAutoChild("slider",{canHover:this.$161p(),vertical:this.vertical,minValue:this.minValue,maxValue:this.maxValue,value:this.defaultValue,numValues:this.numValues,roundValues:this.roundValues,roundPrecision:this.roundPrecision,tabIndex:this.globalTabIndex,valueStyle:this.valueStyle,valueFormat:this.format,width:this.width,height:this.height
},this.sliderConstructor,this.container);if(_1!=null){this.observe(_1._track,"$lf",this.sliderPartFocusChanged);this.observe(_1._thumb,"$lf",this.sliderPartFocusChanged);if(_1._thumb.triggerArea!=null){this.observe(_1._thumb.triggerArea,"$lf",this.sliderPartFocusChanged)}
}
this.Super("$18y",arguments)}
,isc.A.sliderPartFocusChanged=function isc_SliderItem_sliderPartFocusChanged(){var _1=this.form,_2=this.ns.EH.getFocusCanvas();if(_2!=null&&this.canvas.contains(_2,true)){if(_1.getFocusSubItem()!==this){_1.setFocusItem(this);this.elementFocus()}
}else{this.elementBlur();if(_1.getFocusSubItem()===this)_1.setFocusItem(null)}
}
,isc.A.$1608=function isc_SliderItem__defaultPendingStatusChangedBehavior(_1){this.Super("$1608",arguments);var _2=_1?this.pendingValueStyle:this.valueTextStyle;if(this.isDisabled()||this.renderAsDisabled())_2+="Disabled";this.canvas.setValueStyle(_2)}
,isc.A.updateState=function isc_SliderItem_updateState(){this.Super("updateState",arguments);var _1=!!this.pendingStatus?this.pendingValueStyle:this.valueTextStyle;if(this.isDisabled()||this.renderAsDisabled())_1+="Disabled";this.canvas.setValueStyle(_1)}
,isc.A.setValue=function isc_SliderItem_setValue(_1){this.$17g=true;var _2;if(_1==null){_2=this.getDefaultValue();if(_2!=null)_1=_2}
this.$207=_1;this.canvas.setValue(_1,(_2!=null))}
,isc.A.getValue=function isc_SliderItem_getValue(){return this.canvas.getValue()}
,isc.A.sliderChange=function isc_SliderItem_sliderChange(){var _1=this.canvas.getValue();if(this.$207!=_1){if(this.changeOnDrag||!this.canvas.valueIsChanging()){this.$10y(_1);this.$207=_1}
}else{this.saveValue(_1)}
}
,isc.A.setMinValue=function isc_SliderItem_setMinValue(_1){this.canvas.setMinValue(_1);this.minValue=_1}
,isc.A.setMaxValue=function isc_SliderItem_setMaxValue(_1){this.canvas.setMaxValue(_1);this.maxValue=_1}
,isc.A.setNumValues=function isc_SliderItem_setNumValues(_1){this.canvas.setNumValues(_1);this.numValues=_1}
,isc.A.clearing=function isc_SliderItem_clearing(){this.canvas&&this.canvas.hideValueLabel()}
,isc.A.$85m=function isc_SliderItem__shouldAllowExpressions(){return false}
,isc.A.propertyChanged=function isc_SliderItem_propertyChanged(_1,_2){if(_1=="vertical"){this.canvas.setVertical(_2)}
this.Super("propertyChanged",arguments)}
);isc.B._maxIndex=isc.C+14;isc.ClassFactory.defineClass("ColorItem","TextItem");isc.addGlobal("ColorPickerItem",isc.ColorItem);isc.A=isc.ColorItem.getPrototype();isc.A.changeOnBlur=true;isc.A.changeOnKeypress=false;isc.A.pickerConstructor="ColorPicker";isc.A.pickerDefaults={colorSelected:function(_1,_2){this.callingFormItem.$1551(_1,_2)
},pickerCancelled:function(){this.callingFormItem.$183d()}
};isc.A.showPickerIcon=true;isc.A.showEmptyPickerIcon=false;isc.A.pickerIconWidth=18;isc.A.pickerIconHeight=18;isc.A.pickerIconHSpace=2;isc.A.pickerIconSrc="[SKIN]/DynamicForm/ColorPicker_icon.png";isc.A.pickerIconPrompt="Click to select a new color";isc.A.defaultPickerMode="simple";isc.A.allowComplexMode=true;isc.A.supportsTransparency=true;isc.A.browserSpellCheck=false;isc.A.defaultType="color";isc.A=isc.ColorItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$1508="empty";isc.A.$229b="overlay";isc.A.retainColorNames=false;isc.A.upperCaseHexValues=true;isc.A.storageFormat="hex";isc.A.displayFormat="hex";isc.B.push(isc.A.handleKeyPress=function isc_ColorItem_handleKeyPress(_1,_2){var _3=this.Super("handleKeyPress",arguments);if(isc.EH.getKey()==this.$10j){this.updateValue()}
return _3}
,isc.A.updateValue=function isc_ColorItem_updateValue(){var _1=isc.tinycolor(this.getElementValue());if(_1.isValid()){if(!this.supportsTransparency){if(_1.getOriginalInput()=="transparent"){_1=isc.tinycolor("#ffffff")}else{_1.setAlpha(1)}
}
this.setElementValue(this.toDisplayFormat(_1))}
this.Super("updateValue",arguments);if(this.showPickerIcon){this.modifyPickerIcon()}
if(this.colorChanged)this.colorChanged(this.getColor())}
,isc.A.toStorageFormat=function isc_ColorItem_toStorageFormat(_1){var _2=isc.tinycolor(_1);if(_2.isValid()){if(_2.getOriginalInput()=="transparent")return"transparent";if(this.storageFormat=="hex"){if(this.retainColorNames&&_2.$2214=="name")return _2.toString("name");var _3;if(_2.getAlpha()!=1&&this.supportsTransparency){_3=_2.toHex8String()}else{_3=_2.toHexString()}
return this.upperCaseHexValues?_3.toUpperCase():_3}else{return _2.toRgbString()}
}
return""}
,isc.A.toDisplayFormat=function isc_ColorItem_toDisplayFormat(_1){var _2=isc.tinycolor(_1);if(_2.isValid()){if(_2.getOriginalInput()=="transparent")return"transparent";if(this.displayFormat=="hex"){if(this.retainColorNames&&_2.$2214=="name")return _2.toString("name");var _3;if(_2.getAlpha()!=1&&this.supportsTransparency){_3=_2.toHex8String()}else{_3=_2.toHexString()}
return this.upperCaseHexValues?_3.toUpperCase():_3}else{return _2.toRgbString()}
}
return""}
,isc.A.mapDisplayToValue=function isc_ColorItem_mapDisplayToValue(_1){var _2=isc.tinycolor(_1);if(_2.isValid()){return this.toStorageFormat(_2)}
return _1}
,isc.A.mapValueToDisplay=function isc_ColorItem_mapValueToDisplay(_1){if(_1=="transparent")return"transparent";var _2=isc.tinycolor(_1);if(_2.isValid()){return this.toDisplayFormat(_2)}
return _1||""}
,isc.A.getColor=function isc_ColorItem_getColor(){return isc.tinycolor(this.getValue())}
,isc.A.getDefaultValue=function isc_ColorItem_getDefaultValue(){var _1=this.Super("getDefaultValue",arguments);if(_1&&!isc.isA.color(_1)){this.logWarn("Default value:"+_1+" is not a valid color identifier. Ignoring this default.");_1=this.defaultValue=null}
return _1}
,isc.A.showPicker=function isc_ColorItem_showPicker(){var _1=isc.addProperties({},this.pickerDefaults);_1.defaultPickMode=this.defaultPickerMode;_1.allowComplexMode=this.allowComplexMode;_1.supportsTransparency=this.supportsTransparency;this.picker=isc.ColorPicker.getSharedColorPicker(_1);var _2=this.picker;var _3=_2.callingFormItem;if(_3!=this){_2.callingFormItem=this;_2.callingForm=this.form}
_2.setSupportsTransparency(this.supportsTransparency);if(_2.allowComplexMode){if(_2.$56c=='simple'){_2.modeToggleButton.setTitle(_2.moreButtonTitle)}else{_2.modeToggleButton.setTitle(_2.lessButtonTitle)}
}
_2.setColor(this.getColor());if(!this.isObserving(_2,"visibilityChanged")){this.observe(_2,"visibilityChanged",this.pickerVisibilityChanged)}
this.$183e=this.getValue();return this.Super("showPicker",arguments)}
,isc.A.$183d=function isc_ColorItem__pickerCancelled(){this.setValue(this.$183e);delete this.$183e}
,isc.A.$1551=function isc_ColorItem__pickerColorSelected(_1,_2){if(this.pickerColorSelected)this.pickerColorSelected(_1,_2);var _3=isc.tinycolor(_1);if(_3.isValid()){this.opacity=_2!=null?_2:100;_3.setAlpha(this.opacity/100);_1=this.toStorageFormat(_3)}
if(this.hasDataElement())this.setElementValue(_1);else this.setValue(_1);this.updateValue();if(this.pickerColorChanged)this.pickerColorChanged(_1)}
,isc.A.pickerColorSelected=function isc_ColorItem_pickerColorSelected(_1,_2){}
,isc.A.pickerVisibilityChanged=function isc_ColorItem_pickerVisibilityChanged(_1){if(!_1){this.focusInIcon("picker");this.ignore(this.picker,"visibilityChanged")}
}
,isc.A.setValue=function isc_ColorItem_setValue(_1,_2,_3,_4){var _5=isc.tinycolor(_1);if(_5.isValid()){if(_5.getOriginalInput()=="transparent")_1="transparent";else _1=this.toStorageFormat(_5);this.opacity=_5.getAlpha()*100}else _1=="";_1=this.invokeSuper(isc.ColorItem,"setValue",_1,_2,_3,_4);if(this.showPickerIcon){this.modifyPickerIcon()}
return _1}
,isc.A.modifyPickerIcon=function isc_ColorItem_modifyPickerIcon(){var _1=this.getPickerIcon();var _2=this.getValue();var _3=(_2==null||isc.isAn.emptyString(_2));var _4=this.getColor();if(_4.isValid()){_2=_4.toRgbString();_3=(_2==null||isc.isAn.emptyString(_2));this.setIconBackgroundColor(_1,_3?isc.emptyString:_4.toRgbString());if(_4.toString()=="transparent"){this.setIconCustomState(_1,"transparent")}else if(this.overlayPickerImage){var _5=this.$229b;_5+=_4.isDark()?"Light":"Dark";this.setIconCustomState(_1,_5)}else if(this.showEmptyPickerIcon){this.setIconCustomState(_1,_3?this.$1508:null)}
}else{this.setIconBackgroundColor(_1,isc.emptyString);if(this.overlayPickerImage){var _6=this.$229b+(isc.Page.isDarkSkin()?"Light":"Dark");this.setIconCustomState(_1,_6)
}else if(this.showEmptyPickerIcon){this.setIconCustomState(_1,this.$1508)}
}
this.updateState()}
);isc.B._maxIndex=isc.C+15;if(isc.ListGrid){isc.ClassFactory.defineClass("ValueMapEditor","VLayout");isc.A=isc.ValueMapEditor.getPrototype();isc.A.mapTypeConstructor=isc.Button;isc.A.mapTypeDefaults={autoDraw:false,width:"100%",click:function(){this.creator.canvasItem.toggleObjectArray()},showIf:function(){return this.creator.canvasItem.showMapTypeButton},getTitle:function(){var _1=this.creator.canvasItem,_2=_1.saveAsObject;if(_2)return _1.saveAsObjectTitle;else return _1.saveAsArrayTitle}
};isc.A.selectorConstructor=isc.ListGrid;isc.A.selectorDefaults={height:1,overflow:"visible",bodyOverflow:"visible",inherentHeight:true,showNewRecordRow:true,listEndEditAction:"next",canEdit:true,canRemoveRecords:true,editEvent:isc.EH.CLICK,cellHeight:22,selectionType:isc.Selection.NONE,selectOnEdit:false,leaveScrollbarGap:false,showSortArrow:isc.ListGrid.NONE,canSort:false,canResizeFields:false,$253v:function(){this.Super("$253v",arguments);if(this.creator&&this.creator.canvasItem)
this.creator.canvasItem.updateValue()},stopOnErrors:true,validateCellValue:function(_1,_2,_3,_4){var _5=this.getFieldName(_2),_6=this.creator.canvasItem,_7=_6.$208(_5,_1,_3);if(_7)return _7;return this.Super("validateCellValue",arguments)},cellContextClick:function(_1,_2,_3){var _4=this.creator.canvasItem.getSelectorContextMenu(_1);_4.showContextMenu();return false},displayHeaderContextMenu:function(){var _1=this.creator.canvasItem.getSelectorContextMenu();_1.showContextMenu();return false}
};isc.A=isc.ValueMapEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_ValueMapEditor_initWidget(){if(!this.canvasItem){this.logWarn("ValueMapEditors are not supported as standalone widgets at this time.");return}
this.Super("initWidget",arguments);this.addAutoChild("mapType",{});this.addAutoChild("selector",{newRecordRowMessage:this.canvasItem.newOptionRowMessage,showHeader:this.showHeader,fields:this.canvasItem.$209(),data:this.canvasItem.$21a()
})}
);isc.B._maxIndex=isc.C+1;isc.ClassFactory.defineClass("ValueMapItem","CanvasItem");isc.A=isc.ValueMapItem.getPrototype();isc.A.height=1;isc.A.autoDestroy=true;isc.A.shouldSaveValue=true;isc.A.showMapTypeButton=true;isc.A.showHeader=true;isc.A.newOptionRowMessage="Click to add a new option";isc.A.displayTitle="Display";isc.A.valueTitle="Value";isc.A.undefinedKeyErrorMessage="Each valueMap option must have a defined value";isc.A.duplicateValueErrorMessage="Please enter a unique value for this option";isc.A.saveAsArrayTitle="Stored == Displayed";isc.A.saveAsObjectTitle="Stored != Displayed";isc.A=isc.ValueMapItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.$18y=function isc_ValueMapItem__createCanvas(){if(this.canvas)return;if(this._value==null)this._value=[];this.canvas=isc.ValueMapEditor.create({autoDraw:false,_generated:true,ID:this.getID()+"$21b",canvasItem:this,showMapType:this.showMapTypeButton,showHeader:this.showHeader,height:this.height,overflow:isc.Canvas.VISIBLE
});this.Super("$18y",arguments)}
,isc.A.$21c=function isc_ValueMapItem__getMapTypeButton(){return this.canvas.mapType}
,isc.A.$21d=function isc_ValueMapItem__getSelectorGrid(){return this.canvas.selector}
,isc.A.$21a=function isc_ValueMapItem__getSelectorData(_1){var _1=_1||this.getValue();if(!_1)_1=this.saveAsObject?{}:[];var _2=[];if(isc.isAn.Array(_1)){for(var i=0;i<_1.length;i++){_2[i]={value:_1[i]}
}
}else{var i=0;for(var _4 in _1){_2[i]={value:_4,display:_1[_4]}
i++}
}
return _2}
,isc.A.$209=function isc_ValueMapItem__getSelectorFields(){if(!this.$21e||!this.$21f){this.$21e={name:"display",title:this.displayTitle};this.$21f={name:"value",title:this.valueTitle}}
var _1=[this.$21f];if(this.saveAsObject)_1.add(this.$21e);return _1}
,isc.A.$208=function isc_ValueMapItem__validateSelectorCellValue(_1,_2,_3){if(_1!="value")return;if(!this.saveAsObject&&this.allowDuplicates)return;var _4=this.$21d(),_5=_2>_4.data.getLength(),_6=this._value,_7;if(this.saveAsObject){if(_3==null||_3==""){return[this.undefinedKeyErrorMessage]
}
_7=isc.getKeys(_6)}else{_7=_6||[]}
var _8;if(_5){if(_7.contains(_3))_8=true}else{for(var i=0;i<_7.length;i++){if(_2==i)continue;if(_3==_7[i]){_8=true;break}
}
}
if(_8)return[this.duplicateValueErrorMessage];return null}
,isc.A.getSelectorContextMenu=function isc_ValueMapItem_getSelectorContextMenu(_1){if(!this.$21g){var _2=[{title:"Add new option",click:"menu.canvasItem.addOption()"},{title:"Delete option",enableIf:"menu.record != null",click:"menu.canvasItem.removeOption(menu.record)"
}
];if(this.showMapTypeButton){_2.add({dynamicTitle:"'Set ' + menu.canvasItem.$21h()",click:"menu.canvasItem.toggleObjectArray()"
}
)}
this.$21g=this.ns.Menu.create({canvasItem:this,ID:this.getID()+"$21i",data:_2
})}
this.$21g.record=_1;return this.$21g}
,isc.A.addOption=function isc_ValueMapItem_addOption(){this.$21d().startEditingNew()}
,isc.A.removeOption=function isc_ValueMapItem_removeOption(_1){var _2=this.$21d();_2.data.remove(_1);_2.data.dataChanged()}
,isc.A.$21h=function isc_ValueMapItem__getToggleObjectArrayTitle(){var _1=this.saveAsObject;return _1?this.saveAsArrayTitle
:this.saveAsObjectTitle}
,isc.A.toggleObjectArray=function isc_ValueMapItem_toggleObjectArray(){this.setSaveAsObject(!this.saveAsObject)}
,isc.A.setSaveAsObject=function isc_ValueMapItem_setSaveAsObject(_1){if(this.saveAsObject==_1)return;var _2,_3=this.getValue();if(_1){_2={};if(_3!=null){for(var i=0;i<_3.length;i++){_2[_3[i]]=_3[i]}
}
}else{_2=[];for(var _5 in _3){_2.add(_5)}
}
this._value=_2;this.saveAsObject=_1;var _6=this.$21d(),_7=this.$21a();if(!_6)return;_6.setData(_7);_6.setFields(this.$209());if(this.showMapTypeButton)this.$21c().markForRedraw()}
,isc.A.validate=function isc_ValueMapItem_validate(){var _1=this.$21d(),_2=_1&&_1.getEditRow()
;if(_2!=null&&_2>=0){var _3=_1.getEditValues(_2);if(!_3.value||_3.value=="")_1.cancelEditing();else _1.endEditing()}
if(_1.hasErrors())return false;return this.Super("validate",arguments)}
,isc.A.updateValue=function isc_ValueMapItem_updateValue(){var _1=this.$21d(),_2=_1.data,_3=this.saveAsObject,_4=_3?{}:[],_5;if(_3){var _6={};if(isc.isAn.Array(this._value)){_5=true}else{isc.addProperties(_6,this._value)}
var _7=isc.getKeys(_6);for(var i=0;i<_2.length;i++){var _9=_2[i],_10=_9.display;_4[_9.value]=_9.display;if(!_7.contains(_10)||(_6[_9.value]!=_10))
_5=true;delete _6[_9.value]}
if(isc.getKeys(_6).length!=0)_5=true}else{if(!isc.isAn.Array(this._value)||(this._value.length!=_2.length)){_5=true}
for(var i=0;i<_2.length;i++){var _9=_2[i],_10=_9.value;_4[i]=_10;if(!_5&&(this._value[i]!=_10))_5=true}
}
if(!_5)return;if(this.handleChange(_4,this._value)==false)return;_4=this.$17n;delete this.$17n;this.saveValue(_4)}
,isc.A.setValue=function isc_ValueMapItem_setValue(_1){this.$17g=true;if(_1!=null&&!isc.isAn.Object(_1)){this.logWarn("setValue() passed an invalid object. Must be a valueMap (either specified as an array or a raw JS object.");return
}
var _2=isc.isAn.Array(_1),_3=(!!this.saveAsObject);if(_1!=null&&_2==_3){this.logInfo("setValue() passed a valueMap of type "+(_2?"Array":"Object")+".  Updating this.saveAsObject to match this data type.");this.setSaveAsObject(!_2);_3=this.saveAsObject}
this._value=_1;this.$21d().setData(this.$21a())}
);isc.B._maxIndex=isc.C+15}
isc.defineClass("ArrayItem",isc.ValueMapItem);isc.A=isc.ArrayItem.getPrototype();isc.A.showMapTypeButton=false;isc.A.showHeader=false;isc.A.saveAsObject=false;isc.A.allowDuplicates=true;isc.A.newOptionRowMessage="Click to add values";isc.defineClass("MappingItem",isc.ValueMapItem);isc.A=isc.MappingItem.getPrototype();isc.A.showMapTypeButton=false;isc.A.saveAsObject=true;if(isc.ListGrid){isc.ClassFactory.defineClass("PickTreeItem","CanvasItem");isc.A=isc.PickTreeItem;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.$21j=function isc_c_PickTreeItem__itemSelected(_1){return this.canvasItem.$21j(_1)}
,isc.A.$21k=function isc_c_PickTreeItem__getButtonTitle(){var _1=this.getSelectedItem();if(_1==null){var _2=this.canvasItem,_3=this.canvasItem.getValue();if(_3!=null)return _2.mapValueToDisplay(_3)}
return this.Super("getTitle",arguments)}
,isc.A.$21l=function isc_c_PickTreeItem__treeDataLoaded(){var _1=this.canvasItem;_1.setValue(_1.getValue())}
);isc.B._maxIndex=isc.C+3;isc.A=isc.PickTreeItem.getPrototype();isc.A.canFocus=true;isc.A.shouldSaveValue=true;isc.A.buttonDefaults={height:19,hover:function(){var _1=this.canvasItem;if(_1!=null){_1.$wb();return false}
}
};isc.A.buttonConstructor="TreeMenuButton";isc.A.pendingButtonStyle="buttonPending";isc.A.emptyMenuMessage="No items to display";isc.A.emptyDisplayValue=null;isc.A=isc.PickTreeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$77l="button";isc.A.width=null;isc.B.push(isc.A.init=function isc_PickTreeItem_init(){this.Super("init",arguments);if(this.optionDataSource==null&&this.dataSource==null&&this.valueTree==null){this.logWarn("This form item requires a 'valueTree'.")}
}
,isc.A.getOptionDataSource=function isc_PickTreeItem_getOptionDataSource(){var _1=this.optionDataSource||this.dataSource;if(_1!=null)_1=isc.DataSource.get(_1);return _1}
,isc.A.getDisplayValue=function isc_PickTreeItem_getDisplayValue(){return this.canvas.getTitle()}
,isc.A.setValueTree=function isc_PickTreeItem_setValueTree(_1){this.valueTree=_1;if(this.canvas){this.canvas.setData(this.valueTree)}
}
,isc.A.$18y=function isc_PickTreeItem__createCanvas(){var _1={getTitle:isc.PickTreeItem.$21k,canFocus:this.$kk(),canHover:this.$161p(),dataSource:this.getOptionDataSource(),criteria:this.optionCriteria,menu:{$1053:this.optionOperationId},data:this.valueTree,canSelectParentItems:this.canSelectParentItems,itemSelected:isc.PickTreeItem.$21j,emptyMenuMessage:this.emptyMenuMessage,unselectedTitle:this.$1054(),loadDataOnDemand:this.loadDataOnDemand,treeDataLoaded:isc.PickTreeItem.$21l,displayField:this.displayField,dataProperties:(this.dataProperties==null?{}:this.dataProperties)
};if(_1.width==null&&this.width!=null){var _2=this.getInnerWidth();var _3=0;if(this.icons&&this.icons.length>0){for(var i=0;i<this.icons.length;i++){_3+=this.getIconWidth(this.icons[i])+this.iconHSpace}
}
if(!isc.isA.Number(_2)){_1.width=_2}else{_1.width=Math.max(1,_2-_3)}
}
this.canvas=this.addAutoChild(this.$77l,_1,this.buttonConstructor,this.container);this.autoDestroy=true;this.Super("$18y",arguments);if(this._value!=null)this.setValue(this._value)}
,isc.A.$21j=function isc_PickTreeItem__itemSelected(_1){var _2=this.$21m(_1);this.$93r=_1;var _3=this.$10y(_2);if(_3==false)delete this.$93r;if(this.getValue()!=_2)_3=false;return _3}
,isc.A.saveValue=function isc_PickTreeItem_saveValue(_1,_2){if(this.$93r!=null){this.$21n=this.$93r;delete this.$93r}else{this.$21n=this.$21s(_1);if(this.canvas){this.canvas.setSelectedItem(this.$21n)}
}
return this.Super("saveValue",arguments)}
,isc.A.showValue=function isc_PickTreeItem_showValue(_1,_2){var _3=this.$21s(_2);if(_3!=null){this.canvas.setSelectedItem(_3)}else{var _4=this.$1605(_2,true);this.canvas.setTitle(_4)}
}
,isc.A.$1605=function isc_PickTreeItem__getDisplayValueForOldValueHover(_1,_2){var _3;if(!_2&&(_3=this.$21s(_1))!=null){return this.canvas.$161k(_3)}else{var _4=this.optionDataSource||this.dataSource;var _5=!_4||(this.$17b(_1,true)!==null),_6=_5?_1:"";return _6}
}
,isc.A.$1608=function isc_PickTreeItem__defaultPendingStatusChangedBehavior(_1){this.Super("$1608",arguments);var _2=this.pendingButtonStyle;if(_2==null)return;var _3;if(this.buttonProperties!=null&&this.buttonProperties.baseStyle!=null){_3=this.buttonProperties.baseStyle}else if(this.buttonDefaults!=null&&this.buttonDefaults.baseStyle!=null){_3=this.buttonDefaults.baseStyle}else{var _4=isc.ClassFactory.getClass(this.getAutoChildClass(this.$77l,isc.IButton));_3=_4.$b4.baseStyle}
if(_2===_3)return;this.button.setBaseStyle(_1?_2:_3)}
,isc.A.$21m=function isc_PickTreeItem__mapNodeToValue(_1){if(this.$21o())return this.valueTree.getPath(_1);return _1[this.$21p()]}
,isc.A.$21o=function isc_PickTreeItem__usePathAsId(){return(!this.valueField&&this.valueTree&&(this.valueTree.modelType!="parent"))}
,isc.A.$21p=function isc_PickTreeItem__getValueFieldName(){var _1=this.valueField;if(!_1){_1=this.valueTree?this.valueTree.idField
:this.$21q()}
return _1}
,isc.A.$21q=function isc_PickTreeItem__getPrimaryKeyFieldName(){if(!this.getOptionDataSource())return null;if(!this.$21r){var _1=isc.DataSource.getDataSource(this.getOptionDataSource()),_2=_1.getPrimaryKeyFieldNames(),_3=isc.isAn.Array(_2)?_2[0]:_2;if(isc.isAn.Array(_2)&&_2.length>1){this.logWarn("Multiple primary key fields not supported by PickTreeItem - using '"+_3+"' as single primary key field")}
this.$21r=_3}
return this.$21r}
,isc.A.getSelectedNode=function isc_PickTreeItem_getSelectedNode(){return this.$21n}
,isc.A.getSelectedRecord=function isc_PickTreeItem_getSelectedRecord(){return this.getSelectedNode()}
,isc.A.updateValueMap=function isc_PickTreeItem_updateValueMap(_1){this.Super("updateValueMap",arguments);if(_1)this.canvas.markForRedraw()}
,isc.A.$21s=function isc_PickTreeItem__getNode(_1){if(!_1)return null;var _2=(this.getOptionDataSource()&&this.canvas?this.canvas.getTree():this.valueTree);if(this.$21o())return this.valueTree.find(_1);return _2.find(this.$21p(),_1)}
,isc.A.$85m=function isc_PickTreeItem__shouldAllowExpressions(){return false}
,isc.A.fetchData=function isc_PickTreeItem_fetchData(){var _1=this.getOptionDataSource();if(_1==null){this.logWarn("fetchData() called on pickTree item with no option data source. Ignoring.");return}
var _2=this.canvas.getTree();if(!_2||!_2.invalidateCache){return}
_2.invalidateCache()}
,isc.A.$1054=function isc_PickTreeItem__getEmptyDisplayValue(){if(this.emptyDisplayValue!=null){return this.emptyDisplayValue}else{var _1=isc[this.buttonConstructor],_2=_1&&_1.getInstanceProperty("unselectedTitle");return _2||""}
}
,isc.A.setEmptyDisplayValue=function isc_PickTreeItem_setEmptyDisplayValue(_1){this.emptyDisplayValue=_1;if(this.button!=null){this.button.unselectedTitle=this.$1054()}
}
);isc.B._maxIndex=isc.C+22;isc.defineClass("IPickTreeItem","PickTreeItem");isc.A=isc.IPickTreeItem.getPrototype();isc.A.buttonConstructor="ITreeMenuButton"}
isc.ClassFactory.defineClass("PopUpTextAreaItem","StaticTextItem");isc.A=isc.PopUpTextAreaItem.getPrototype();isc.A.canFocus=true;isc.A.wrap=false;isc.A.width=150;isc.A.clipValue=true;isc.A.popUpOnEnter=false;isc.A.popUpOnAnyClick=true;isc.A.textAreaWidth=100;isc.A.textAreaHeight=100;isc.A.iconOnly=false;isc.A.popUpIconSrc="[SKIN]/DynamicForm/PopUpTextAreaEditor_icon.gif";isc.A.popUpIconWidth=20;isc.A.popUpIconHeight=20;isc.A.iconVAlign=isc.Canvas.CENTER;isc.A=isc.PopUpTextAreaItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.isMultiLineEditor=true;isc.A.hasInternalNavigation=true;isc.B.push(isc.A.$14v=function isc_PopUpTextAreaItem__setUpIcons(){if(this.icons==null)this.icons=[];else this.icons=this.icons.duplicate();if(this.showPopUpIcon!=false){var _1={name:"popUpIcon",src:this.popUpIconSrc,showOver:false,width:this.popUpIconWidth,height:this.popUpIconHeight,click:this.$43p
};this.icons.addAt(_1,0)}
this.Super("$14v",arguments)}
,isc.A.$43p=function isc_PopUpTextAreaItem__popUpIconClick(_1,_2,_3){if(_2.popUpOnAnyClick||_2.isDisabled()||_2.isReadOnly())return;_2.showPopUp(true)}
,isc.A.handleCellClick=function isc_PopUpTextAreaItem_handleCellClick(){if(this.Super("handleCellClick")==false)return false;if(this.popUpOnAnyClick&&!this.isDisabled()&&!this.isReadOnly()){var _1=isc.EH.lastEvent.itemInfo,_2=this.getIcon(_1.overIcon);if(!_2||(_2&&_2==this.icons[0]))this.showPopUp(true)}
}
,isc.A.showPopUp=function isc_PopUpTextAreaItem_showPopUp(_1){var _2=this.getValue();if(!this.$21t)this.setupPopUpForm();if(!this.$21t.isDrawn()){this.$21t.draw()}
this.placePopUp();var _3=this.$21t.getItem("textArea");_3.setValue(_2);this.$21t.bringToFront();this.$21t.show();if(_1)this.$21t.delayCall("focusInItem",["textArea"]);this.$21t.showClickMask({target:this,methodName:"hidePopUp"},true,[this.$21t])
}
,isc.A.visibilityChanged=function isc_PopUpTextAreaItem_visibilityChanged(){if(!this.isVisible())this.$21u()}
,isc.A.$21u=function isc_PopUpTextAreaItem__hiddenObservation(){var _1=this.$21t;if(!_1||!(_1.isVisible()&&_1.isDrawn()))return;_1.clear()}
,isc.A.moved=function isc_PopUpTextAreaItem_moved(){this.$21v()}
,isc.A.$21v=function isc_PopUpTextAreaItem__movedObservation(){var _1=this.$21t;if(!_1||!(_1.isVisible()&&_1.isDrawn()))return;var _2=this.getTop(),_3=this.getLeft(),_4=this.getInnerWidth(),_5=this.getInnerHeight(),_6=this.containerWidget,_7=_6.getScrollTop(),_8=_6.getScrollLeft(),_9=_6.getViewportWidth(),_10=_6.getViewportHeight()
;if(_2<_7||(_2+_5)>(_7+_10)||_3<_8||(_3+_4)>(_8+_9))
{_1.clear()}else{this.placePopUp()}
}
,isc.A.zIndexChanged=function isc_PopUpTextAreaItem_zIndexChanged(){var _1=this.$21t;if(!_1||!(_1.isVisible()&&_1.isDrawn()))return;_1.bringToFront()}
,isc.A.placePopUp=function isc_PopUpTextAreaItem_placePopUp(){var _1=this.getTextAreaTop(),_2=this.getTextAreaLeft(),_3=this.getTextAreaWidth(),_4=this.getTextAreaHeight();this.$21t.moveTo(_2,_1);this.$21t.resizeTo(_3,_4);var _5=this.$21t.getItem("textArea");_5.setWidth(_3);_5.setHeight(_4)}
,isc.A.setupPopUpForm=function isc_PopUpTextAreaItem_setupPopUpForm(){if(this.$21t!=null)return;var _1=isc.DynamicForm.create({autoDraw:false,ID:this.getID()+"$21t",_generated:true,separateContentInsertion:false,cellPadding:0,targetItem:this,values:{textArea:this.getValue()},items:[{name:"textArea",showTitle:false,type:"textArea",selectOnFocus:true,targetItem:this,focus:function(_4){this.targetItem.textAreaFocus()},keyDown:function(_4,_5,_6,_7){this.targetItem.$18i();return this.targetItem.textAreaKeyDown(_4,_6,_7)},keyPress:function(_4,_5,_6,_7){return this.targetItem.textAreaKeyPress(_4,_6,_7)},blur:function(){this.targetItem.textAreaBlur()}
}
],hide:function(_4,_5,_6,_7){var _2=this.invokeSuper(isc.DynamicForm,"hide",_4,_5,_6,_7);this.hideClickMask();return _2},clear:function(_4,_5,_6,_7){var _2=this.Super("clear",arguments);this.hideClickMask();return _2}
});_1.updateTabPositionOnDraw=false;_1.updateTabPositionOnReparent=false;isc.TabIndexManager.moveTarget(_1.ID,this.ID,0);this.$21t=_1;var _3=this.containerWidget;_1.observe(_3,"destroy","observer.clear();observer.destroy()")}
,isc.A.hidePopUp=function isc_PopUpTextAreaItem_hidePopUp(){if(this.$21t){this.updateValue();this.$21t.clear()}
}
,isc.A.destroy=function isc_PopUpTextAreaItem_destroy(){if(this.$21t){this.$21t.destroy();delete this.$21t}
return this.Super("destroy",arguments)}
,isc.A.getTextAreaTop=function isc_PopUpTextAreaItem_getTextAreaTop(){var _1=this.getPageTop();if(isc.Browser.isIE)_1-=1;return _1}
,isc.A.getTextAreaLeft=function isc_PopUpTextAreaItem_getTextAreaLeft(){return this.getPageLeft()}
,isc.A.getTextAreaWidth=function isc_PopUpTextAreaItem_getTextAreaWidth(){return Math.max(this.textAreaWidth,this.getInnerWidth())}
,isc.A.getTextAreaHeight=function isc_PopUpTextAreaItem_getTextAreaHeight(){return this.textAreaHeight}
,isc.A.mapValueToDisplay=function isc_PopUpTextAreaItem_mapValueToDisplay(){if(this.iconOnly)return"";return this.Super("mapValueToDisplay",arguments)}
,isc.A.textAreaBlur=function isc_PopUpTextAreaItem_textAreaBlur(){this.hidePopUp()}
,isc.A.textAreaFocus=function isc_PopUpTextAreaItem_textAreaFocus(){}
,isc.A.textAreaKeyPress=function isc_PopUpTextAreaItem_textAreaKeyPress(_1,_2,_3){}
,isc.A.textAreaKeyDown=function isc_PopUpTextAreaItem_textAreaKeyDown(_1,_2,_3){}
,isc.A.setValue=function isc_PopUpTextAreaItem_setValue(_1){var _2=this.mapValueToDisplay(this.getValue());this.Super("setValue",arguments);var _3=this.mapValueToDisplay(this.getValue());if(_2!=_3){this.setElementValue(_3)
if(this.$21t&&this.$21t.isVisible()){this.$21t.setValue("textArea",_3)}
}
}
,isc.A.updateValue=function isc_PopUpTextAreaItem_updateValue(){if(this.$21t&&this.$21t.isVisible()&&!this.$21t.$10u)
{var _1=this.$21t.getItem("textArea");_1.updateValue();var _2=this.$21t.getValue("textArea");this.setElementValue(this.mapValueToDisplay(_2));this.$10y(_2)}else{return this.Super("updateValue",arguments)}
}
,isc.A.setElementValue=function isc_PopUpTextAreaItem_setElementValue(_1){if(this.iconOnly)return;return this.Super("setElementValue",arguments)}
,isc.A.focusInItem=function isc_PopUpTextAreaItem_focusInItem(){if(this.$21t&&this.$21t.isVisible()&&this.$21t.isDrawn()){this.$21t.focusInItem('textArea')}else if(this.showIcons){this.focusInIcon(this.icons[0])}else{this.showPopUp(true)}
}
,isc.A.syntheticShiftFocus=function isc_PopUpTextAreaItem_syntheticShiftFocus(_1){if(!this.isValidTabStop())return false;if(this.$21t&&this.$21t.isVisible()&&this.$21t.isDrawn()&&this.$21t.hasFocus)
{return false}
this.focusInItem();return true}
,isc.A.$173=function isc_PopUpTextAreaItem__setElementTabIndex(_1){if(!this.isVisible()||!this.containerWidget.isDrawn())return;this.$175()}
,isc.A.setElementReadOnly=function isc_PopUpTextAreaItem_setElementReadOnly(_1){}
);isc.B._maxIndex=isc.C+29;isc.ClassFactory.defineClass("SearchForm","DynamicForm");isc.A=isc.SearchForm.getPrototype();isc.A.canEditFieldAttribute="canFilter";isc.A.isSearchForm=true;isc.A.hiliteRequiredFields=false;isc.A.operationType="fetch";isc.A.$66m=true;isc.A.allowEmptyValues=true;isc.A.storeAtomicValues=true;isc.A.storeDisplayValues=false;isc.A.searchOnEnter=true;isc.A.useMultiSelectForValueMaps=true;isc.A=isc.SearchForm.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$21w="DateItem";isc.A.search=isc.Class.NO_OP;isc.A.criteriaChanged=isc.Class.NO_OP;isc.A.criteriaChangedDelay=200;isc.A.defaultDateEditorType="DateRangeItem";isc.A.savedSearchAbstractType="searchForm";isc.B.push(isc.A.createItem=function isc_SearchForm_createItem(_1,_2,_3,_4,_5){var _6=this.getDataSource(),_7=_6?_6.getField(_1.name)!=null:false;if(_7){var _8=isc.FormItemFactory.getItemClassName(_1,_2,this),_9=isc.FormItemFactory.getItemClass(_8);if(_9==isc.DateItem&&_1&&(_1.useTextField==null))
_1.useTextField=true;if(_1.allowEmptyValue==null){_1.allowEmptyValue=this.allowEmptyValues}
}
return this.invokeSuper(isc.SearchForm,"createItem",_1,_2,_3,_4,_5)}
,isc.A.validate=function isc_SearchForm_validate(_1,_2,_3,_4,_5,_6){if(this.validateTypeOnly){return this.invokeSuper(isc.SearchForm,"validate",_1,_2,true,_4,_5,_6)}else{return this.invokeSuper(isc.SearchForm,"validate",_1,_2,_3,_4,_5,_6)}
}
,isc.A.submitValues=function isc_SearchForm_submitValues(_1,_2){if(this.onSearch!=null){return this.onSearch(this.getValuesAsCriteria(),this)}
if(this.search!=null){return this.search(this.getValuesAsCriteria(),this)}
}
,isc.A.$167p=function isc_SearchForm__itemChanged(_1,_2){this.Super("$167p",arguments);if(this.criteriaChanged!=null){if(this.criteriaChangedDelay==null||this.criteriaChangedDelay==0){this.$2168()}else{isc.EH.fireOnPause("criteriaChanged",{target:this,methodName:"$2168"},this.criteriaChangedDelay
)}
}
}
,isc.A.$2168=function isc_SearchForm__fireCriteriaChanged(){if(this.criteriaChanged==null||this.criteriaChanged==isc.Class.NO_OP&&!this.$268h)
{return}
this.criteriaChanged(this.getValuesAsCriteria(),this)}
,isc.A.getEditorType=function isc_SearchForm_getEditorType(_1){var _2=_1.filterEditorType||_1.editorType;if(_2==isc.DynamicForm.$178h){_2=null}
if(_2!=null)return _2;var _3=_1.type;if(_3&&(isc.SimpleType.inheritsFrom(_3,"date")||isc.SimpleType.inheritsFrom(_3,"datetime")))
{return this.defaultDateEditorType}
var _4=_3==isc.SearchForm.$12e||_3==isc.SearchForm.$52x||_3==isc.SearchForm.$677;if(_4)return"StaticTextItem";return this.Super("getEditorType",arguments)}
,isc.A.$2169=function isc_SearchForm__shouldSaveOnEnter(){return this.searchOnEnter||this.Super("$2169",arguments)}
);isc.B._maxIndex=isc.C+7;isc.A=isc.SearchForm.getPrototype();isc.A.showFilterFieldsOnly=true;isc.A.validateTypeOnly=true;isc.A.disableUnboundCacheSync=true;isc.SearchForm.registerStringMethods({search:"criteria,form",onSearch:"criteria,form",criteriaChanged:"criteria,form"});isc.ClassFactory.defineClass("ValuesManager");isc.A=isc.ValuesManager;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getById=function isc_c_ValuesManager_getById(_1){var _2=window[_1]||null;return _2?(isc.isA.ValuesManager(_2)?_2:null):null}
);isc.B._maxIndex=isc.C+1;isc.A=isc.ValuesManager.getPrototype();isc.A.unknownErrorMessage=null;isc.A=isc.ValuesManager.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.operator="and";isc.B.push(isc.A.init=function isc_ValuesManager_init(){this.ns.ClassFactory.addGlobalID(this);if(this.unknownErrorMessage==null){this.unknownErrorMessage=isc.Canvas.getPrototype().unknownErrorMessage}
if(this.dataSource)this.bindToDataSource(this.dataSource);if(this.values==null)this.values={};isc.DynamicForm.$91f(this,this.values,{});if(this.members!=null){var _1=this.members;this.members=null;if(!isc.isAn.Array(_1))_1=[_1];for(var i=0;i<_1.length;i++){this.addMember(_1[i])}
}
this.rememberValues()}
,isc.A.destroy=function isc_ValuesManager_destroy(){var _1=this.members;if(_1){for(var i=_1.length-1;i>=0;i--){this.removeMember(_1[i])}
}
window[this.getID()]=null;this.Super("destroy",arguments)}
,isc.A.$49z=function isc_ValuesManager__saveDataReply(_1,_2,_3){var _4=this.getMembers();if(!this.suppressServerDataSync&&_2&&_2.status>=0&&_3!=null){if(isc.isAn.Array(_3))_3=_3[0];if(_1.data)_1.data=isc.shallowClone(_1.data);var _5=false;if(_4){for(var i=0;i<_4.length;i++){var _7=_4[i].dataPath;if(_7!=null&&_7!="/"){_5=true}else if(isc.isA.DynamicForm(_4[i])){var _8=_4[i].getItems(),_9=_8.getProperty("dataPath");for(var _10=0;_10<_9.length;_10++){if(_9[_10]!=null&&_9[_10]!="/"){_5=true;break}
}
}
if(_5)break}
}
if(_5){this.setValues(_3)}else{var _11=(_1.originalData||_1.data),_12=this.getValues();var _13=false,_14=true,_15;for(var _16 in _3){var _17=_11[_16]===_15?this.$10s[_16]:_11[_16];var _18=this.getField(_16);if(this.fieldValuesAreEqual(_18,_12[_16],_17)){if(!this.fieldValuesAreEqual(_18,_17,_3[_16])){_12[_16]=_3[_16];_13=true}
}else{_14=false}
}
if(_13){this.$10r(_12)}
var _8=this.getItems();for(var i=0;i<_8.length;i++){var _19=_8[i];if(isc.isAn.UploadItem(_19))continue;var _20=_19.dataPath||_19.name;if(_20==null)continue;var _21=isc.DynamicForm.$70o(_20,_19,_11,this,true,"edit");if(_21===_15||this.fieldValuesAreEqual(_19,_21,_19.getValue()))
{if(_13){var _22=isc.DynamicForm.$70o(_20,_19,_3,this,true,"edit");if(!this.fieldValuesAreEqual(_19,_21,_22)){_19.setValue(_22)}
}
}else{_14=false}
}
if(_14){this.rememberValues()}
}
if(this.saveOperationType=="add")delete this.saveOperationType;var _23=(this.members?this.members.duplicate():[]);for(var i=0;i<_23.length;i++){var _24=_23[i];if(!isc.isA.DynamicForm(_24))continue;_24.saveOperationType=null}
}
this.$491={request:_1,response:_2,serverData:_3
};this.$490=0;this.$181w=true;for(var i=0;i<_4.length;i++){if(_4[i]&&_4[i].updatePendingStyles)_4[i].updatePendingStyles()}
delete this.$181w;this.formSavedComplete()}
,isc.A.$71e=function isc_ValuesManager__updateMultipleMemberValue(_1,_2,_3,_4){var _5=this.$702(_1,_2);return this.$10y(_5,_3,_4,true)}
,isc.A.$10y=function isc_ValuesManager__updateValue(_1,_2,_3,_4){if(this.$835)return;if(!_4&&isc.isA.DynamicForm(_3)&&_3.getItem(_1)==null){this.$66q(_3,_1);return}
var _5=_3.getFullDataPath(),_6;if(!_4){var _6=_3&&_3.getField?_3.getField(_1):null,_7=_1;if(_7!=null&&isc.isAn.Object(_7)){_7=_7.dataPath||_7.name}
if(_7){if(_5==null||_7.startsWith(isc.Canvas.$70l)){_5=_7}else{_5=this.$702(_5,_7)}
}
if(_6==null){var _8=this.getDataSource();if(_8)_6=_8.getFieldForDataPath(_5)}
}else{if(!_5){_5=_1}else if(!_5.endsWith(isc.Canvas.$70l)){_5+=isc.Canvas.$70l+_1}else{_5+=_1}
}
isc.DynamicForm.$70n(_5,_6,_2,this.values,_3,true,"vm_updateValue");this.setValuesInRuleContext();var _9=_5.contains(isc.Canvas.$70l);if(_9&&this.autoSynchronize!==false){var _10=_5.split(isc.Canvas.$70l);if(parseInt(_10[_10.length-1])==_10[_10.length-1]){this.synchronizeMembers(_3)}else{var _11=this.getFieldsForDataPath(_5||_7);this.$835=true;for(var i=0;i<_11.length;i++){if(_11[i].form==_3)continue;_11[i].saveValue(_2);_11[i].$124t(_2)}
delete this.$835}
}
}
,isc.A.synchronizeMembers=function isc_ValuesManager_synchronizeMembers(_1){if(!this.members)return;this.$256w=false;for(var i=0;i<this.members.length;i++){if(!_1||this.members[i].selectionComponent==_1){this.synchronizeMember(this.members[i],null,true)}
}
this.setValuesInRuleContext(this.$256w)}
,isc.A.synchronizeMembersOnDataPath=function isc_ValuesManager_synchronizeMembersOnDataPath(_1){if(!this.members)return;this.$256w=false;for(var i=0;i<this.members.length;i++){if(this.members[i].dataPath==_1){this.synchronizeMember(this.members[i],null,true)}
}
this.setValuesInRuleContext(this.$256w)}
,isc.A.synchronizeMember=function isc_ValuesManager_synchronizeMember(_1,_2,_3){if(!_1)return;if(!this.members||!this.members.contains(_1)){this.logWarn("synchronizeMember called with component ID "+_1.ID+".  This component is not a member of this valuesManager");return}
this.$835=true;this.$707(_1,_2,_3);delete this.$835;if(this.memberSynchronized&&isc.isA.Function(this.memberSynchronized)){this.memberSynchronized(_1)}
}
,isc.A.$702=function isc_ValuesManager__combineDataPaths(_1,_2){if(isc.isAn.Object(_2)){_2=_2.dataPath||_2.name}
return isc.DynamicForm.$702(_1,_2)}
,isc.A.$66q=function isc_ValuesManager__itemlessValueWarning(_1,_2){this.logWarn("Member Form: "+_1+" has explicitly specified value for field[s] '"+_2+"', but has no item associated with this fieldName. Ignoring this value. Values may be set for fields with no associated form item directly on the valuesManager via valuesManager.setValues(), but not on member forms. See ValuesManager documentation for more info.")}
,isc.A.$10z=function isc_ValuesManager__clearValue(_1,_2){var _3=_2.getFullDataPath();if(_3)_1=this.$702(_3,_1);return isc.DynamicForm.$70m(_1,this.values)}
,isc.A.setValuesInRuleContext=function isc_ValuesManager_setValuesInRuleContext(_1){if(!this.members||this.members.length==0)return;var _2=_1;var _3=this.members[0];if(_3.ruleScope||_3.isRuleScope){var _4=this.getDataSource(),_5=this.getValues()
;if(_4&&isc.isA.DataSource(_4)){_3.provideRuleContext(_4.getID(),null,this,null,true);_3.provideRuleContext(_4.getID(),isc.shallowClone(_5),this,null,false);_2=false}
}
if(_2){_3.fireRuleContextChanged(_3)}
}
,isc.A.bindToDataSource=function isc_ValuesManager_bindToDataSource(_1){if(!isc.isA.DataSource(_1))_1=isc.DataSource.getDataSource(_1);if(_1!=null)this.dataSource=_1;if(_1!=null&&!this.isObserving(_1,"dataChanged")){this.observe(_1,"dataChanged","observer.vmDataSourceDataChanged(observed,dsResponse,dsRequest)")}
}
,isc.A.vmDataSourceDataChanged=function isc_ValuesManager_vmDataSourceDataChanged(_1,_2,_3){if(this.destroyed||this.destroying)return;var _4=this.getDataSource();if(_4.getID()!=_1.getID()){if(this.isObserving(_1,"dataChanged")){this.ignore(_1,"dataChanged")}
return}
if(_2.operationType=="update"){var _5=this.getValues()||{};var _6=_4.getPrimaryKeyFieldNames()||[];if(_6.length>0){var _7=isc.isAn.Array(_2.data)?_2.data:[_2.data],_8=isc.applyMask(this.values,_6)
;for(var i=0;i<_7.length;i++){var _10=isc.applyMask(_7[i],_6);if(isc.objectsAreEqual(_8,_10)){this.logInfo("Data updated by cache-sync");this.setValues(isc.addProperties({},_5,_7[i]));break}
}
}
}
}
,isc.A.setDataSource=function isc_ValuesManager_setDataSource(_1,_2){this.bindToDataSource(_1)}
,isc.A.getDataSource=function isc_ValuesManager_getDataSource(){if(isc.isA.String(this.dataSource)){if(this.serviceNamespace||this.serviceName){this.dataSource=this.lookupSchema()}else{var _1=isc.DS.get(this.dataSource);if(_1!=null)return _1;_1=this.getWindow()[this.dataSource];if(_1&&isc.isA.DataSource(_1))return(this.dataSource=_1)}
}
return this.dataSource}
,isc.A.lookupSchema=function isc_ValuesManager_lookupSchema(){var _1;if(this.serviceName)_1=isc.WebService.getByName(this.serviceName,this.serviceNamespace);else _1=isc.WebService.get(this.serviceNamespace);if((this.serviceNamespace||this.serviceName)&&_1==null){this.logWarn("Could not find WebService definition: "+(this.serviceName?"serviceName: "+this.serviceName:"")+(this.serviceNamespace?"   serviceNamespace: "+this.serviceNamespace:"")
+this.getStackTrace())}
if(!isc.isA.String(this.dataSource)){this.logWarn("this.dataSource was not a String in lookupSchema");return}
if(_1)return _1.getSchema(this.dataSource)}
,isc.A.getDataSourceField=function isc_ValuesManager_getDataSourceField(_1){var _2=this.getDataSource();if(!_2||!_1)return null;_1=_1.trimCharacters("/");var _3=this.getDataSource(),_4=_1.split("/"),_5;for(var i=0;i<_4.length;i++){if(isc.isAn.emptyString(_4[i]))continue;var _7=_4[i];_5=_3.getField(_7);_3=_5?isc.DataSource.getDataSource(_5.type):_3}
return _5}
,isc.A.getItems=function isc_ValuesManager_getItems(){if(!this.members)return[];var _1=[];for(var i=0;i<this.members.length;i++){var _3=this.members[i];if(!_3.getItems)continue;_1.addList(_3.getItems())}
return _1}
,isc.A.getFields=function isc_ValuesManager_getFields(){return this.getItems()}
,isc.A.getItem=function isc_ValuesManager_getItem(_1,_2){return this.$706(_1,true,_2)}
,isc.A.getField=function isc_ValuesManager_getField(_1){return this.getItem(_1)}
,isc.A.getFieldsForDataPath=function isc_ValuesManager_getFieldsForDataPath(_1){return this.getItem(_1,true)}
,isc.A.getMembers=function isc_ValuesManager_getMembers(){return this.members}
,isc.A.getMember=function isc_ValuesManager_getMember(_1){var _2=window[_1];if(this.members&&this.members.contains(_2))return _2;return null}
,isc.A.getMemberForField=function isc_ValuesManager_getMemberForField(_1,_2){return this.$706(_1,false,_2)}
,isc.A.$706=function isc_ValuesManager__findMemberByField(_1,_2,_3){if(!this.members||_1==null||isc.isAn.emptyString(_1))return null;var _4=_1.trimCharacters(isc.Canvas.$70l);var _5=_4.split(isc.Canvas.$70l);var _6=_3?[]:null;for(var i=0;i<this.members.length;i++){var _8=this.members[i],_9=_8.getFullDataPath();if(_9==isc.Canvas.$70l||isc.isAn.emptyString(_9)){_9=null}else if(_9!=null){_9=_9.trimCharacters(isc.Canvas.$70l)}
if(_5&&_5.length>0&&_9!=null){var _10=null;for(var _11=0;_11<_5.length;_11++){_10=!_10?_5[_11]
:(_10+isc.Canvas.$70l+_5[_11]);if(_9.endsWith(isc.Canvas.$70l)){_9=_9.substring(0,_9.length-1)}
if(_9==_10){if(!_2&&(_11==_5.length-1)){if(!_3)return _8;_6.add(_8);break}
if(_8.getField){var _12=_5.slice(_11+1).join(isc.Canvas.$70l);var _13=_8.getField(_12);if(_13){if(_2){if(!isc.isA.FormItem(_13))_13=null;if(_3){if(_13)_6.add(_13)}else{return _13
}
}else{if(_3)_6.add(_8);else return _8}
}
}
}
}
}else{if(this.members[i].getItem){var _14=this.members[i].getField(_1);if(!_14){if(_1.startsWith(isc.Canvas.$70l)){_14=this.members[i].getField(_1.substring(1))}
}
if(_14){if(_2){if(!isc.isA.FormItem(_14))_14=null;if(_3){if(_14)_6.add(_14)}else{return _14}
}else{if(_3)_6.add(_8);else return _8}
}
}
}
}
return _3?_6:null}
,isc.A.getFileItemForm=function isc_ValuesManager_getFileItemForm(){if(!this.members)return;var _1=false,_2;for(var i=0;i<this.members.length;i++){if(this.members[i].getFileItemForm==null)continue;var _4=this.members[i].getFileItemForm();if(_4){if(_1){this.logWarn("ValuesManager defined with more than one member form  containing a FileItem. This is not supported - binary data may only be uploaded from one FileItem when saving ValuesManager data")}else{_2=_4;_1=true}
}
}
return _2}
,isc.A.validate=function isc_ValuesManager_validate(_1,_2,_3,_4,_5,_6){if(this.disableValidation)return true;if(this.dataSource&&this.dataSource.useLocalValidators!=null&&this.useLocalValidators==false)return true;var _7=this.hasErrors();this.clearHiddenErrors();var _8=true,_9=this.dataSource?isc.addProperties({},this.getDataSource().getFields())
:null,_10={},_11={},_12=false;this.buildDataPathsRecursively(_11,"",this.getDataSource());if(!_5)this.$178d=[];else delete this.$178d;var _13=this.$178d;if(this.members){var _14=isc.rpc?isc.rpc.startQueue():false;for(var i=0;i<this.members.length;i++){if(!isc.isA.DynamicForm(this.members[i]))continue;var _16=this.members[i],_17=_16.disableValidation,_18=this.members[i].getItems();if(!_17){if(_16.handleHiddenValidationErrors!=null){this.logInfo("form level 'handleHiddenValidationErrors' method suppressed in favor of valuesManager level handler","validation");_16.$43q=_16.handleHiddenValidationErrors}
_16.handleHiddenValidationErrors=this.$43r}
for(var j=0;j<_18.length;j++){var _20=_18[j].getFullDataPath()||_18[j].getFieldName();_12=_12||(_20&&_20.contains(isc.Canvas.$70l));if(_9&&this.members[i].getDataSource()==this.getDataSource()){delete _9[_20]}
if(_11&&_20){delete _11[_20.trimCharacters(isc.Canvas.$70l)]}
}
var _21=_17?true:_16.validate(true,true,_3,_4,_5,true,_13);if(_4){if(_21!=true){if(_8==true)_8=_21;else this.$198t(_8,_21)}
continue}
_8=(_8&&_21);if(!_17){if(_16.$43s)_16.handleHiddenValidationErrors=_16.$43s;else delete _16.handleHiddenValidationErrors}
if(!_21){if(!(_16.isDrawn()&&_16.isVisible())){this.addHiddenErrors(_16.errors,_16)}else{this.addHiddenErrors(_16.getHiddenErrors(),_16)}
}
}
if(!_14&&isc.rpc)isc.rpc.sendQueue()}
var _22=this.getValues(),_23={},_24=_12?_11:_9;for(var _20 in _24){var _25=_24[_20],_10=_25.validators,_26=isc.DynamicForm.$70o(_20,_25,_22,null,true,"validate");if(_10!=null){for(var i=0;i<_10.length;i++){var _27=_10[i];if(!_27)continue;if(_26==null
&&_27.type!='required'&&_27.type!="requiredIf")
{continue}
if(!this.processValidator(_25,_27,_26,null,_22)){if(_23[_20]==null)_23[_20]=[];var _28=_27.errorMessage||this.unknownErrorMessage;_23[_20].add(_28)}
}
}
if(_23[_20]&&_23[_20].length==1){_23[_20]=_23[_20][0]}
}
if(_4){if(!isc.isAn.emptyObject(_23)){if(_8==true)_8=_23;else this.$198t(_8,_23)}
return _8}
this.addHiddenErrors(_23);var _29=this.hasErrors();if(_7||_29){this.showErrors(true)}
if(isc.getKeys(_23).length>0)_8=false;return _8}
,isc.A.$198t=function isc_ValuesManager__combineErrors(_1,_2){for(var _3 in _2){var _4=_1[_3],_5=_2[_3]
;_1[_3]=_4?this.$43t(_4,_5):_5}
}
,isc.A.valuesAreValid=function isc_ValuesManager_valuesAreValid(_1){var _2=this.validate(true,null,null,true,true);if(_2===true){return _1?null:true}else{return _1?_2:false}
}
,isc.A.checkForValidationErrors=function isc_ValuesManager_checkForValidationErrors(_1,_2){var _3=this.validate(true,null,null,true,true);if(_3===true)_3=null;var _4=this.getDataSource();if(_3||_2||!_4){if(_1!=null)this.fireCallback(_1,"errorMap",[_3]);return _3}
if(!_1){this.logWarn("checkForValidationErrors(): no callback has been provided, but not skipping server-side validation - this is invalid usage");return}
var _5=this.getValues(),_6=this.buildRequest(null,"validate");_6.editor=this;var _7=this;_4.validateData(_5,function(_8,_9){var _3=_8.status==isc.RPCResponse.STATUS_VALIDATION_ERROR&&_8.errors?_8.errors:null;if(_3&&!_7.reportRawServerErrors){_3=isc.DynamicForm.getSimpleErrors(_3)}
this.fireCallback(_1,"errorMap",[_3])},_6)}
,isc.A.buildDataPathsRecursively=function isc_ValuesManager_buildDataPathsRecursively(_1,_2,_3){if(!isc.isA.DataSource(_3))return;if(_3.$85e){this.logWarn("detected ds loop at: "+_2+", refusing to recurse further");return}
_3.$85e=true;var _4=_3.getFields();for(var _5 in _4){_1[_2+_5]=_4[_5];if(_3.fieldIsComplexType(_5)){var _6=_3.getSchema(_4[_5].type);this.buildDataPathsRecursively(_1,_2+_5+isc.Canvas.$70l,_6)}
}
delete _3.$85e}
,isc.A.getValidatedValues=function isc_ValuesManager_getValidatedValues(){if(!this.validate())return null;return this.getValues()}
,isc.A.$43r=function isc_ValuesManager__handleHiddenFormErrors(_1){var _2=this.valuesManager;_2.addHiddenErrors(_1,this);return false}
,isc.A.clearHiddenErrors=function isc_ValuesManager_clearHiddenErrors(){delete this.hiddenErrors}
,isc.A.addHiddenErrors=function isc_ValuesManager_addHiddenErrors(_1,_2){if(_1==null||isc.isAn.emptyObject(_1))return;if(!this.hiddenErrors)this.hiddenErrors={};if(_2){if(isc.isA.Canvas(_2))_2=_2.getID()}else _2=this.getID();if(!this.hiddenErrors[_2])this.hiddenErrors[_2]={};for(var _3 in _1){this.hiddenErrors[_2][_3]=this.$43t(this.hiddenErrors[_2][_3],_1[_3])}
}
,isc.A.getHiddenErrors=function isc_ValuesManager_getHiddenErrors(_1){if(!_1){this.synchHiddenErrors()}
if(!this.hiddenErrors)return null;var _2={};for(var _3 in this.hiddenErrors){this.assembleHiddenErrorsRecursively(_2,this.hiddenErrors[_3])}
return _2}
,isc.A.assembleHiddenErrorsRecursively=function isc_ValuesManager_assembleHiddenErrorsRecursively(_1,_2,_3,_4){if(_3==null)_3="";var _5=_3;if(_4!=null)_5+="["+_4+"]";if(isc.isA.List(_2)){for(var i=0;i<_2.length;i++){if(_2[i]!==null){if(isc.isAn.Object(_2[i])){this.assembleHiddenErrorsRecursively(_1,_2[i],_5,i)}else{if(_1[_5]==null)_1[_5]=[];_1[_5][i]=_2[i]}
}
}
}else if(isc.isAn.Object(_2)){for(var _7 in _2){if(isc.isAn.Object(_2[_7])){if(_5==""){this.assembleHiddenErrorsRecursively(_1,_2[_7],_7)}else{this.assembleHiddenErrorsRecursively(_1,_2[_7],_5+isc.Canvas.$70l+_7)}
}else{if(_5==""){_1[_7]=_2[_7]}else{_1[_5+isc.Canvas.$70l+_7]=_2[_7]}
}
}
}else{_1[_5]=_2}
return _1}
,isc.A.synchHiddenErrors=function isc_ValuesManager_synchHiddenErrors(){var _1=this.hiddenErrors,_2=this.getID();if(_1&&_1[_2]){for(var _3 in _1[_2]){var _4=_1[_2][_3],_5=this.getItem(_3),_6=_5?_5.form:null;if(_5){_6.addFieldErrors(_3,_4);delete _1[_2][_3]}
}
}
var _7=_1[_2];_1=this.hiddenErrors={};if(_7)_1[_2]=_7;if(this.members){for(var i=0;i<this.members.length;i++){if(!isc.isA.DynamicForm(this.members[i]))continue;var _9=this.members[i],_10=_9.getID(),_11=_9.errors;if(!_11||isc.isAn.emptyObject(_11))continue;if(!_9.isVisible()||!_9.isDrawn()){_11=isc.addProperties({},_11);_1[_10]=_11}else{for(var _3 in _11){var _5=_9.getItem(_3);if(!_5){if(!_1[_2])_1[_2]={};_1[_2][_3]=_11[_3];delete _11[_3]}else if(!_5.visible){if(!_1[_10])_1[_10]={};_1[_10][_3]=_11[_3]}
}
}
}
}
}
,isc.A.processValidator=function isc_ValuesManager_processValidator(_1,_2,_3,_4,_5){var _6=this.getDataSource(),_7=_2.applyWhen
;if(_7){if(_6==null){isc.logWarn("Conditional validator criteria ignored because form has no dataSource");return}else{var _8=_6.applyFilter([_5],_7);if(_8.length==0){isc.Validator.performAction(null,_1,_2,_5,this);return true}
}
}
var _9=null;if(_6){_9={dataSource:_6.getID()
}}
return isc.Validator.processValidator(_1,_2,_3,_4,_5,_9)}
,isc.A.$21z=function isc_ValuesManager__handleHiddenValidationErrors(_1){var _2=this.getHiddenErrors(_1);if(_2==null||isc.getKeys(_2).length==0)return;var _3;if(this.handleHiddenValidationErrors){_3=this.handleHiddenValidationErrors(_2)}
if(_3==false)return;var _4="Validation failed with the following errors:";var _5=isc.isAn.Array(_2)?_2:[_2];for(var i=0;i<_5.length;i++){var _7=_5[i];for(var _8 in _7){var _9=_2[_8];if(!isc.isAn.Array(_9))_9=[_9];if(_9.length==0)continue;_4+="\n"+_8+":";for(var i=0;i<_9.length;i++){_4+=(i==0?"- ":"\n - ")+_9[i]}
}
}
this.logInfo(_4,"validation")}
,isc.A.setErrors=function isc_ValuesManager_setErrors(_1,_2){this.clearHiddenErrors();if(isc.isA.List(_1))_1=_1[0];var _3=(this.members?this.members.duplicate():[]);for(var i=0;i<_3.length;i++){if(!isc.isA.DynamicForm(_3[i]))continue;var _5=_3[i],_6=!_5.isVisible()||!_5.isDrawn(),_7=_5.getItems(),_8={},_9={},_10=_5.getSelectionChain();for(var j=0;j<_7.getLength();j++){var _12=_7[j],_13=_12.getFullDataPath(),_14=_12.getFieldName(),_15=this.getItemErrors(_1,_13,_10);if(_15!=null){_8[_14]=_15;if(_6||!_12.visible){_9[_14]=_15}
this.deleteItemErrors(_1,_13,_10)}
}
_5.setErrors(_8,false);if(!isc.isAn.emptyObject(_9))
this.addHiddenErrors(_9,_5)}
this.addHiddenErrors(_1);if(_2)this.showErrors(true)}
,isc.A.getItemErrors=function isc_ValuesManager_getItemErrors(_1,_2,_3){var _4=_2.trimCharacters(isc.Canvas.$70l),_5=_4.contains(isc.Canvas.$70l);if(isc.isAn.Array(_1))_1=_1[0];if(!_5){var _6=_1[_2]}else{var _7=_4.split(isc.Canvas.$70l),_6=_1,_8=0;for(var i=0;i<_7.length;i++){_6=_6[_7[i]];if(isc.isAn.Array(_6)){if(_3.length>_8){_6=_6[_3[_8++]]}else{_6=_6[0]}
}
if(!_6)break}
}
if(_6){if(!isc.isAn.Array(_6))_6=[_6];var _10=[];for(var i=0;i<_6.length;i++){if(_6[i].errorMessage){_10.add(_6[i].errorMessage)}else{_10.add(_6[i])}
}
return _10.length>1?_10:_10[0]}
}
,isc.A.deleteItemErrors=function isc_ValuesManager_deleteItemErrors(_1,_2,_3){var _4=_2.trimCharacters(isc.Canvas.$70l),_5=_4.contains(isc.Canvas.$70l);if(isc.isAn.Array(_1))_1=_1[0];if(!_5){delete _1[_2]}else{var _6=_4.split(isc.Canvas.$70l);var _7=_1,_8=[],_9=0;for(var i=0;i<_6.length;i++){_8.add(_7);_7=_7[_6[i]];if(isc.isAn.Array(_7)){if(_3.length>_9){_7=_7[_3[_9++]]}else{_7=_7[0]}
}
if(!_7)break}
if(_7)_7=undefined;for(var i=_8.length-1;i>=0;i--){if(isc.isAn.emptyObject(_8[i])){delete _8[i]}
}
}
}
,isc.A.$43t=function isc_ValuesManager__addFieldErrors(_1,_2){if(!_1)return _2;if(!_2)return _1;if(!isc.isAn.Array(_1))_1=[_1];if(isc.isA.String(_2))_1.add(_2);else _1.addList(_2);return _1}
,isc.A.addFieldErrors=function isc_ValuesManager_addFieldErrors(_1,_2,_3){var _4=true;var _5=this.getMemberForField(_1);if(_5!=null&&isc.isA.DynamicForm(_5)){_5.addFieldErrors(_1,_2,false);var _6=_5.getItem();if(_5.isVisible()&&_5.isDrawn()&&_6&&_6.visible){_4=false}
}
if(_4){if(!this.hiddenErrors)this.hiddenErrors={};var _7=_5?_5.getID():this.getID();if(!this.hiddenErrors[_7])this.hiddenErrors[_7]={};this.hiddenErrors[_7][_1]=this.$43t(this.hiddenErrors[_7][_1],_2)}
if(_3)this.showFieldErrors(_1)}
,isc.A.setFieldErrors=function isc_ValuesManager_setFieldErrors(_1,_2,_3){var _4=true;var _5=this.getMemberForField(_1);if(_5!=null&&isc.isA.DynamicForm(_5)){_5.setFieldErrors(_1,_2,false);var _6=_5.getItem();if(_5.isVisible()&&_5.isDrawn()&&_6&&_6.visible){_4=false}
}
if(_4){if(!this.hiddenErrors)this.hiddenErrors={};this.hiddenErrors[_1]=_2}
if(_3)this.showFieldErrors(_1)}
,isc.A.clearErrors=function isc_ValuesManager_clearErrors(_1){this.setErrors({},_1)}
,isc.A.clearFieldErrors=function isc_ValuesManager_clearFieldErrors(_1,_2){var _3=this.getMemberForField(_1);if(_3&&isc.isA.DynamicForm(_3))_3.clearFieldErrors(_1,_2);if(this.hiddenErrors)delete this.hiddenErrors[_1]}
,isc.A.getErrors=function isc_ValuesManager_getErrors(){var _1=isc.addProperties({},this.getHiddenErrors(true));if(this.members){for(var i=0;i<this.members.length;i++){if(!isc.isA.DynamicForm(this.members[i]))continue;isc.addProperties(_1,this.members[i].getErrors())}
}
if(!isc.isA.emptyObject(_1))return _1
return null
}
,isc.A.getFieldErrors=function isc_ValuesManager_getFieldErrors(_1){var _2=this.getMemberForField(_1)
if(_2&&isc.isA.DynamicForm(_2))return _2.getFieldErrors(_1);if(this.hiddenErrors&&this.hiddenErrors[this.getID()])
return this.hiddenErrors[this.getID()][_1]}
,isc.A.hasErrors=function isc_ValuesManager_hasErrors(){if(this.hiddenErrors&&!isc.isA.emptyObject(this.hiddenErrors)){for(var _1 in this.hiddenErrors){if(this.hiddenErrors[_1]&&!isc.isAn.emptyObject(this.hiddenErrors[_1]))
return true}
}
if(this.members==null)return false;for(var i=0;i<this.members.length;i++){if(isc.isA.DynamicForm(this.members[i])&&this.members[i].hasErrors())return true}
return false}
,isc.A.hasFieldErrors=function isc_ValuesManager_hasFieldErrors(_1){var _2=this.getMemberForField(_1);if(_2&&isc.isA.DynamicForm(_2)&&_2.hasFieldErrors(_1))return true;var _3=this.getHiddenErrors(true);if(_3&&_3[_1]!=null)return true;return false}
,isc.A.showErrors=function isc_ValuesManager_showErrors(_1){if(this.members){for(var i=0;i<this.members.length;i++){if(!isc.isA.DynamicForm(this.members[i]))continue;if(!this.members[i].isDrawn())continue;this.members[i].$116a=true;this.members[i].showErrors()}
}
if(this.hiddenErrors!=null){this.$21z(_1)}
}
,isc.A.showFieldErrors=function isc_ValuesManager_showFieldErrors(_1){var _2=this.getMemberForField(_1);if(_2&&isc.isA.DynamicForm(_2)&&_2.isVisible()&&_2.isDrawn()){var _3=_2.getItem(_1);if(_3&&_3.visible){_3.redraw("Validation errors modified");return}
}
this.$21z()}
,isc.A.handleAsyncValidationReply=function(success,errors){}
,isc.A.$178e=function isc_ValuesManager__handleFormAsyncValidationReply(_1,_2,_3,_4){var _5=this.$178d;if(!_5||_5!==_4)return;if(_5.remove(_1)&&this.handleAsyncValidationReply!=null){this.logInfo("Asynchronous validation done - calling handleAsyncValidationReply()");this.handleAsyncValidationReply(_2,_3)}
delete this.$178d}
,isc.A.$178f=function isc_ValuesManager__addAsyncValidationMember(_1,_2){var _3=this.$178d;if(_3&&_3==_2)_3.add(_1)}
,isc.A.isPendingAsyncValidation=function isc_ValuesManager_isPendingAsyncValidation(){var _1=this.$178d;return _1!=null&&_1.length>0}
,isc.A.getValues=function isc_ValuesManager_getValues(_1){if(this.members!=null){var _2=isc.EH.getFocusCanvas();if(this.members.contains(_2)&&_2.updateFocusItemValue)_2.updateFocusItemValue(_1)}
return isc.addProperties({},this.values)}
);isc.evalBoundary;isc.B.push(isc.A.setValues=function isc_ValuesManager_setValues(_1){if(isc.isAn.Array(_1)){var _2=isc.isA.Object(_1[0]);this.logWarn("values specified as an array."+(_2?" Treating the first item in the array as intended values."
:" Ignoring specified values."));if(_2)_1=_1[0];else _1=null}
this.$10r(_1);if(this.members){this.$256w=false;for(var i=0;i<this.members.length;i++){this.synchronizeMember(this.members[i],null,true)}
this.setValuesInRuleContext(this.$256w)}
this.rememberValues()}
,isc.A.$10r=function isc_ValuesManager__saveValues(_1){var _2={};isc.DynamicForm.$91f(this,_1,_2);_1=_2;this.values=_1}
,isc.A.setData=function isc_ValuesManager_setData(_1){return this.setValues(_1)}
,isc.A.clearValues=function isc_ValuesManager_clearValues(){this.setValues({})}
,isc.A.getMemberValues=function isc_ValuesManager_getMemberValues(_1){var _2=this.getMember(_1);if(_2!=null)return _2.getValues()}
,isc.A.setMemberValues=function isc_ValuesManager_setMemberValues(_1,_2){var _3=this.getMember(_1);if(_3!=null){return _3.setValues(_2)}
}
,isc.A.getValuesAsCriteria=function isc_ValuesManager_getValuesAsCriteria(_1,_2){var _3;for(var i=0;i<this.members.length;i++){if(i==0){_3=this.members[i].getValuesAsCriteria(_1,_2)}else{_3=isc.DataSource.combineCriteria(_3,this.members[i].getValuesAsCriteria(_1,_2),this.operator,_2)}
}
if(_3==null||_3._constructor!="AdvancedCriteria"){if(_3==null)_3={};var _5=isc.addProperties({},this.getValues()),_6,_7=false;for(var _8 in _5){if(_3[_8]!==_6)delete _5[_8];else _7=true}
if(_7){this.logWarn("getValuesAsCriteria() returning simple criteria.Values object for this ValuesManager includes values for fields which are not associated with any member item:"+this.echo(_5)+". These values will be combined with the simple criteria retrieved from member forms, but developers should be aware that values not associated with any item are not supported for AdvancedCriteria.");_5=isc.DataSource.filterCriteriaForFormValues(_5)
if(_3==null)_3=_5;else isc.addProperties(_3,_5)}
}
return _3}
,isc.A.getValuesAsAdvancedCriteria=function isc_ValuesManager_getValuesAsAdvancedCriteria(_1,_2){return this.getValuesAsCriteria(true,_1,_2)}
,isc.A.rememberValues=function isc_ValuesManager_rememberValues(_1){var _2=this.getValues();var _3={},_4=[];isc.DynamicForm.$91f(this,_2,_3,_4);this.$10s=_3;this.$10t=_4;if(!_1&&this.members){for(var i=0;i<this.members.length;i++){var _6=this.members[i];if(isc.isA.DynamicForm(_6)&&_6.valuesHaveChanged()){_6.rememberValues()}
}
}
return this.$10s}
,isc.A.getOldValues=function isc_ValuesManager_getOldValues(){var _1={};isc.addProperties(_1,this.$10s);return _1}
,isc.A.getChangedValues=function isc_ValuesManager_getChangedValues(){return this.valuesHaveChanged(true)}
,isc.A.resetValues=function isc_ValuesManager_resetValues(){var _1={};isc.DynamicForm.$91f(this,this.$10s,_1);for(var i=0;i<this.$91h;i++){isc.DynamicForm.$70m(this.$91h[i],_1,this)}
this.setValues(_1)}
,isc.A.valuesHaveChanged=function isc_ValuesManager_valuesHaveChanged(_1){var _2=this.getValues();var _3=this.$10s||{};return isc.DynamicForm.valuesHaveChanged(this,_1,_2,_3)}
,isc.A.getValue=function isc_ValuesManager_getValue(_1,_2){return isc.DynamicForm.$70o(_1,this.getField(_1),this.values,_2,true,"vm_getValue")}
,isc.A.setValue=function isc_ValuesManager_setValue(_1,_2){var _3=false,_4,_5;if(this.members){var _6=this.getItem(_1,true);if(_6&&_6.length>0){for(var i=0;i<_6.length;i++){var _8=_6[i];if(_8&&_8.setValue){var _9=_8.type?isc.SimpleType.getType(_8.type):null,_10=_2,_11=(_2===_5);if(!_8.canEditOpaqueValues&&!_11&&_9&&_9.getAtomicValue&&_9.updateAtomicValue)
{_1=_8.getFullDataPath();isc.DynamicForm.$70n(_1,null,_2,this.values,null,true);_10=_9.getAtomicValue(_2)}
if(_11)_8.clearValue();else _8.setValue(_10);_3=true}
}
}
}
if(!_3){if(_2===_5){isc.DynamicForm.$70m(_1,this.values)}else{isc.DynamicForm.$70n(_1,null,_2,this.values,null,true)}
}
var _12=this.$706(_1,false,true);if(_12){for(var i=0;i<_12.length;i++){if(_4&&_4.setData){var _13=_1;if(_1.indexOf(isc.Canvas.$70l)!=-1){_13=_1.substring(0,_1.lastIndexOf(isc.Canvas.$70l));_4.setData(isc.DynamicForm.$70o(_13,null,this.values,_4,true))}
}
}
}
}
,isc.A.clearValue=function isc_ValuesManager_clearValue(_1){this.setValue(_1)}
,isc.A.addMember=function isc_ValuesManager_addMember(_1,_2){if(isc.isA.String(_1))_1=window[_1];if(!isc.isA.Canvas(_1)){this.logWarn("addMember() passed invalid object: "+this.echo(_1)+" - this should be a Canvas instance");return}
if(isc.isA.ValuesManager(_1.valuesManager)){_1.valuesManager.removeMember(_1)}else if(_1.valuesManager!=null){_1.valuesManager=null}
if(this.members==null)this.members=[];var _3=_1.getDataSource();if(_3!=null&&!_2&&_3!=this.getDataSource()){this.logWarn("addMember(): mismatched DataSources; new member form "+_1+" has dataSource: '"+_3.ID+"', valuesManager has DataSource "+(this.getDataSource()!=null?"'"+this.getDataSource().ID+"'":"[NONE]"))}
if(this.getDataSource()!=null&&_1.isMultipart&&_1.isMultipart()&&_1.isMultipart())
{this.logWarn("addMember(): new member form "+_1+" is flagged as using multipart encoding. Multipart forms require direct form submission to transfer uploaded files to the server - any uploaded files from this member form will be dropped when saving values from this ValuesManager to the server."
)}
if(_1.dataArity=="single"&&_1.autoTrackSelection){if(_1.selectionComponent==null||_1.$837){var _4=_1.getFullDataPath(),_5=_4?this.getDataSourceField(_4):null,_6=isc.DynamicForm.$70o(_4,null,this.values,_1,true),_7=isc.isAn.Array(_6)||(_5&&_5.multiple);if(_7){var _8=this.getMemberForField(_4,true);if(_8&&_8.length>0){for(var i=0;i<_8.length;i++){var _10=_8[i];if(_10.dataArity=="multiple"){_1.setSelectionComponent(_10);_1.$837=true;break}
}
}
}
}
}else{var _4=_1.getFullDataPath(),_11=this.getMemberForField(_4,true);if(_11&&_11.length>0){for(var i=0;i<_11.length;i++){if(_11[i].dataArity=="single"&&_11[i].autoTrackSelection&&(_11[i].selectionComponent==null||_11[i].$837==true))
{_11[i].setSelectionComponent(_1);_11[i].$837=true}
}
}
}
if(_1.dataArity=="multiple"&&_1.autoTrackSelection){var _4=_1.getFullDataPath(),_12=_4&&_4.contains(isc.Canvas.$70l);if(_12){var _13=_4.split(isc.Canvas.$70l);_4="/";for(var i=_13.length-2;i>=0;i--){for(var j=0;j<=i;j++){_4+=_13[j];if(j!=i)_4+="/"}
var _5=this.getDataSourceField(_4),_6=isc.DynamicForm.$70o(_4,null,this.values,_1,true),_7=isc.isAn.Array(_6)||(_5&&_5.multiple);if(_7)break}
}
if(_7){var _8=this.getMemberForField(_4,true);if(_8&&_8.length>0){for(var i=0;i<_8.length;i++){var _10=_8[i];if(_10.dataArity=="multiple"){_1.setSelectionComponent(_10);_1.$837=true;break}
}
}
}
var _4=_1.getFullDataPath();if(_4&&_4!=""){var _15=this.members;for(var i=0;i<_15.length;i++){if(_15[i]==_1)continue;if(_15[i].dataArity=="single")continue;var _16=_15[i].getFullDataPath();if(_16&&_16!=_4
&&_16.startsWith(_4))
{if(_15[i].selectionComponent!=null){if(_15[i].$837){var _17=_15[i].selectionComponent.getFullDataPath();if(_4.length>_17.length){_15[i].setSelectionComponent(_1);_15[i].$837=true}
}
}
}
}
}
}
this.members.add(_1);_1.valuesManager=this;if(_1.dataSource==null&&this.dataSource!=null&&_1.getFields){var _18=isc.isA.DynamicForm(_1)?_1.$834:_1.getAllFields();_18=_18||_1.getAllFields();var _4=_1.getFullDataPath();var _19=this.getDataSource();if(_4){var _19=_19.getDataSourceForDataPath(_4,true)}
_1.setDataSource(_19,_18)}
this.synchronizeMember(_1,true);_1.$703=_2;this.rememberValues(true);if(isc.isA.DynamicForm(_1)){if(_1.valuesHaveChanged())_1.rememberValues();this.observe(_1,"handleAsyncValidationReply","observer.$178e(this,success,errors,context)")}
if(this.$268m){_1.$268f=true;_1.$268g(this.$268m)}
}
,isc.A.$707=function isc_ValuesManager__setMemberValues(_1,_2,_3){if(_1.getFields==null)return;var _4=_1.getFullDataPath(),_5=this.getField(_4),_6=isc.DynamicForm.$70o(_4,null,this.values,_1,true),_7=isc.isAn.Array(_6)||(_5&&_5.multiple),_8=_1.selectionComponent;if(_7){if(_1.dataArity=="single"){if(_8!=null){var _9=_1.$71d,_10=false;for(var i=0;i<_6.length;i++){if(_6[i]==_9){_10=true;break}
}
if(_10){_6=_6[i]}else{_6=null;if(this.logIsDebugEnabled()){this.logDebug("Unable to locate selectionComponent's selected record in $707.  Record is: "+isc.Comm.serialize(_9))}
}
}else{if(isc.isAn.Array(_6))_6=_6[0]}
}
}else{if(_6!=null&&_1.dataArity=="multiple")_6=[_6]
}
if(!isc.isA.DynamicForm(_1)){if(!_1.setData)return;var _12=_1.getFullDataPath(),_13=_2?_1.getData():null;if(_6==null){if(_2){isc.DynamicForm.$70n(_12,null,_13,this.values,_1,true)}
}else{if(_2&&_13!=null&&!isc.isAn.emptyObject(_13)&&!isc.isAn.emptyArray(_13))
{this.logInfo("ValuesManager member:"+_1.getID()+" has existing values:"+this.echo(_13)+", replacing with values from this valuesManager:"+this.echo(_6))}
_1.setData(_6)}
}else{var _14=_1.getItems(),_15=false,_16={},_17;_1.$256u=true;for(var i=0;i<_14.getLength();i++){var _18=_14[i];var _19=_18.getTrimmedDataPath()||_18.getFieldName();if(_19==null)continue;var _4=_1.getFullDataPath(),_20=_19.startsWith(isc.Canvas.$70l),_21=_20?_19
:this.$702(_4,_19);var _22=isc.DynamicForm.$70o(_21,null,this.values,_1,true);if(!_20){var _23=isc.DynamicForm.$70o(_21,null,_1.values,_1,true);if(_23!==_17){this.logInfo("Member form "+_1+" has specified value for field '"+_21+"' which collides with an already specified value in this ValuesManager. Resetting the value on the member form.")}
}
if(_18.shouldSaveValue!=false&&_1.$425(_18)){_18.$426()}
if(_22!==_17){_1.setValue(_19,_22)}else{if(!_2)_1.clearValue(_19)}
_16[_19]=_22;if(_18.shouldSaveValue!=false){var _24=_1.getValue(_19);if(_24===_17){isc.DynamicForm.$70m(_21,this.values,_1,true)}else{isc.DynamicForm.$70n(_21,null,_24,this.values,_1,true)}
_15=true}
if(_18.formValuesChanged&&isc.isA.Function(_18.formValuesChanged))
_18.formValuesChanged();if(_15){if(_1.valuesChanged)_1.valuesChanged();if(_1.markForRedraw)_1.markForRedraw()}
}
if(_2){this.$709(_1)}
delete _1.$256u;if(!isc.isAn.emptyObject(_16)){for(var _25 in _16){var _5=_1.getField(_25),_22=_16[_25]
;if(_5){_1.$176k=false;_1.$253a(_5,_25,_22,true);delete _1.$176k}
}
if(_3){this.$256w=true}else{_1.fireRuleContextChanged(_1)}
}
}
}
,isc.A.$709=function isc_ValuesManager__findItemlessFormValues(_1,_2,_3,_4,_5){if(_2==null)_2=_1.getValues();if(_4==null)_4=[];for(var _6 in _2){var _7=_3?this.$702(_3,_6):_6;if(!_1.getItem(_7)){var _8=_2[_6];if(!isc.isAn.Object(_8)||isc.isA.Date(_8)||isc.isAn.Array(_8)){_4.add(_7);_1.clearValue(_7)}else{this.$709(_1,_8,_3,_4,true)}
}
}
if(!_5&&_4.length>0){this.$66q(_1,_4)}
}
,isc.A.addMembers=function isc_ValuesManager_addMembers(_1){if(!isc.isAn.Array(_1))this.addMember(_1);else{for(var i=0;i<_1.length;i++){this.addMember(_1[i])}
}
}
,isc.A.removeMember=function isc_ValuesManager_removeMember(_1){if(isc.isA.String(_1)){_1=isc.Class.getArrayItem(_1,this.members);if(_1==null)return}else if(this.members&&!this.members.contains(_1))return;if(isc.isA.DynamicForm(_1)){this.ignore(_1,"handleAsyncValidationReply");var _2=this.$178d;if(_2)_2.removeEvery(_1)}
if(this.$268m){delete _1.$268f;_1.$268k(this.$268m)}
if(this.members)this.members.remove(_1);_1.valuesManager=null;var _3=this.getDataSource();if(this.members&&this.members.length==0&&_3&&isc.isA.DataSource(_3)){_1.provideRuleContext(_3.getID(),null,this,null,true)}
}
,isc.A.removeMembers=function isc_ValuesManager_removeMembers(_1){if(!isc.isAn.Array(_1))this.removeMember(_1);else{for(var i=0;i<_1.length;i++){this.removeMember(_1[i])}
}
}
,isc.A.$268e=function isc_ValuesManager__observeBySearchTarget(_1){this.$268m=_1;for(var i=0;i<this.members.length;i++){this.members[i].$268f=true;this.members[i].$268g(_1)}
}
,isc.A.$268j=function isc_ValuesManager__ignoreBySearchTarget(_1){for(var i=0;i<this.members.length;i++){delete this.members[i].$268f;this.members[i].$268k(_1)}
delete this.$268m}
,isc.A.getPrintHTML=function isc_ValuesManager_getPrintHTML(){var _1=this.getValues(),_2=isc.StringBuffer.create();_2.append("<TABLE border=1><TR><TD align='center' style='font-weight:bold;'>Field</TD>","<TD align='center' style='font-weight:bold;'>Value</TD>");for(var _3 in _1){_2.append("<TR><TD>",_3,"</TD><TD>",_1[_3],"</TD></TR>")}
_2.append("</TABLE>");return _2.release(false)}
,isc.A.getAllDBCs=function isc_ValuesManager_getAllDBCs(_1){var _2=[];if(_1==null){for(var i=0;i<this.members.length;i++){_2.addAll(this.getAllDBCs(this.members[i]))}
var _4=[];for(var i=0;i<_2.length;i++){if(!_4.contains(_2[i]))_4.add(_2[i])}
return _4}
if(isc.isA.DataBoundComponent(_1))_2.add(_1);var _5=_1.children;if(!_5)return _2;for(var i=0;i<_5.length;i++){var _1=_5[i];if(isc.isA.DataBoundComponent(_1))_2.add(_1);_2.addAll(this.getAllDBCs(_1))}
return _2}
);isc.B._maxIndex=isc.C+87;isc.A=isc.ValuesManager;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.flatten=function isc_c_ValuesManager_flatten(_1){return isc.addPropertyList({},function $245c(_6,_7){if(_7===_2)_7="";var _2,_3=[],_4=Object.keys(_6).map(function(_8){if(typeof _6[_8]==='object'){return $245c(_6[_8],_7+(_7==''?'':"/")+_8)}
var _5={};_5[_7+(_7==''?'':"/")+_8]=_6[_8];return _5}
);return _3.concat.apply(_3,_4)}(_1))}
);isc.B._maxIndex=isc.C+1;isc.A=isc.ValuesManager.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.setEditValues=function isc_ValuesManager_setEditValues(_1){var _2=isc.ValuesManager.flatten(_1);this.editValues=_2;if(this.$245d){var _3=Object.keys(_2);for(var x=0;x<_3.length;x++){var _5=_3[x];var _6=_2[_5];if(this.$245d[_5]){var _7=this.$245d[_5];_7.setValue(_6)}
}
}
for(var x=0;x<this.members.length;x++){var _8=this.members[x];if(isc.isA.TabSet(_8)){this.setPendingStateOnTabSet(_8)}
}
}
,isc.A.setPendingStateOnTabSet=function isc_ValuesManager_setPendingStateOnTabSet(_1){var _2=_1.getFullDataPath()||"";for(var x=0;x<_1.tabs.length;x++){var _4=_1.tabs[x];if(_4.dataPath!==undefined){var _5=[_2,_4.dataPath].join("/");var _6=false;if(_5=="/"){_6=Object.keys(this.editValues).some(function(_7){return _7.split("/").length===2})}
else{_6=Object.keys(this.editValues).some(function(_7){return _7.indexOf(_5)===0
})}
_1.setTabPendingState(_4.name,_6)}
}
}
,isc.A.registerDataPathForItem=function isc_ValuesManager_registerDataPathForItem(_1,_2,_3){if(!this.$245d)this.$245d={};this.$245d[_3]=_2}
,isc.A.setItemPendingStatus=function isc_ValuesManager_setItemPendingStatus(_1,_2,_3){if(!this.$245e)this.$245e={};if(_3===false)delete this.$245e[_2];else this.$245e[_2]=_3}
);isc.B._maxIndex=isc.C+4;isc.ValuesManager.registerStringMethods({handleHiddenValidationErrors:"errors",submitValues:"values,valuesManager",itemChanged:"item,newValue"});if(isc.Window){isc.ClassFactory.defineClass("ColorPicker",isc.Window);isc.A=isc.ColorPicker;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getSharedColorPicker=function isc_c_ColorPicker_getSharedColorPicker(_1,_2){_1=_1||{};if(!isc.isA.ColorPicker(this.$56b)){this.$56b=isc.ColorPicker.create(_1)}else{if(_1.colorSelected==null)delete this.$56b.colorSelected;if(_1.colorChanged==null)delete this.$56b.colorChanged;this.$56b.setProperties(_1)}
if(!_2){var _3=this.$56b;if(_3.$56c!=_3.defaultPickMode){_3.$56c=_3.defaultPickMode;if(_3.$56c=='simple'){_3.removeComplexElements();if(_3.allowComplexMode){_3.modeToggleButton.setTitle(_3.moreButtonTitle)}
}else{if(!_3.$56i){_3.createComplexElements()}
_3.addComplexElements();_3.modeToggleButton.setTitle(_3.lessButtonTitle)}
}
_3.setHtmlColor(_3.defaultColor);_3.setOpacity(_3.defaultOpacity)}
return this.$56b}
);isc.B._maxIndex=isc.C+1;isc.addGlobal("ColorChooser",isc.ColorPicker);isc.A=isc.ColorPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.canFocusInHeaderButtons=true;isc.A.autoSize=true;isc.A.keepInParentRect=true;isc.A.isModal=true;isc.A.autoCenter=true;isc.A.autoDraw=false;isc.A.showMinimizeButton=false;isc.A.showOkButton=true;isc.A.okButtonConstructor="IButton";isc.A.okButtonDefaults={width:80,autoParent:"buttonLayout",click:function(){var _1=this.creator;if(_1.colorSelected){_1.colorSelected(_1.getHtmlColor(),_1.getOpacity())}
_1.hide()}};isc.A.showCancelButton=true;isc.A.cancelButtonConstructor="IButton";isc.A.cancelButtonDefaults={title:"Cancel",width:80,autoParent:"buttonLayout",click:function(){this.creator.$183f()}};isc.A.showModeToggleButton=true;isc.A.modeToggleButtonConstructor="IButton";isc.A.modeToggleButtonDefaults={width:80,autoParent:"buttonLayout",click:function(){this.creator.$56e()}};isc.A.showButtonLayout=true;isc.A.buttonLayoutConstructor="HLayout";isc.A.buttonLayoutDefaults={width:"*",defaultLayoutAlign:"center"};isc.A.bodyLayoutConstructor="VLayout";isc.A.bodyLayoutDefaults={autoDraw:false,width:"100%",height:"100%"};isc.A.contentLayoutConstructor="VLayout";isc.A.contentLayoutDefaults={autoDraw:false,resized:function(){if(this.creator.buttonLayout)this.creator.buttonLayout.setWidth(this.getVisibleWidth())}};isc.A.innerContentLayoutConstructor="HLayout";isc.A.innerContentLayoutDefaults={autoDraw:false,align:"center",membersMargin:5};isc.A.leftLayoutConstructor="VLayout";isc.A.leftLayoutDefaults={membersMargin:10};isc.A.rightLayoutConstructor="VLayout";isc.A.rightLayoutDefaults={autoDraw:false,membersMargin:5};isc.A.basicLabelConstructor="Label";isc.A.basicLabelDefaults={autoDraw:false,margin:0,paddingTop:5,paddingBottom:5,width:"100%",height:15,wrap:false};isc.A.formLayoutConstructor="VLayout";isc.A.formLayoutDefaults={autoDraw:false,membersMargin:4};isc.A.rgbFormConstructor="DynamicForm";isc.A.rgbFormDefaults={autoDraw:false,cellPadding:1,width:65,colWidths:[60,"*"]};isc.A.hslFormConstructor="DynamicForm";isc.A.hslFormDefaults={autoDraw:false,cellPadding:1,width:65,colWidths:[60,"*"]};isc.A.htmlFormConstructor="DynamicForm";isc.A.htmlFormDefaults={autoDraw:false,cellPadding:1,width:65};isc.A.crossHairDefaults={_constructor:"Img",autoDraw:false,imageWidth:16,imageHeight:16,width:16,height:16,imageType:"normal",canDrag:true,canDrop:true,dragAppearance:"target",picker:this,showDisabled:false,showImageDisabled:false,dragMove:function(){this.picker.$56s=true;this.picker.$56t(this.parentElement.getOffsetX(),this.parentElement.getOffsetY())}};isc.A.colorBoxDefaults={_constructor:"Canvas",autoDraw:false,width:"100%",height:"100%"};isc.A.opacityBoxStyle="colorChooserCell";isc.A.opacityBoxDefaults={_constructor:"Canvas",autoDraw:false,width:60,height:30,overflow:"hidden"};isc.A.luminosityStackDefaults={_constructor:"VStack",autoDraw:false,extraSpace:5,overflow:"hidden",styleName:"colorChooserCell"};isc.A.opacitySliderDefaults={_constructor:"Slider",autoDraw:false,vertical:false,minValue:0,maxValue:100,numValues:100,width:100,showTitle:false,showValue:false,labelWidth:10,showRange:false,value:100,dragStart:function(){return isc.EH.STOP_BUBBLING},dragMove:function(){return isc.EH.STOP_BUBBLING},dragStop:function(){return isc.EH.STOP_BUBBLING}};isc.A.defaultColor="#808080";isc.A.colorButtonSize=20;isc.A.colorButtonBaseStyle="colorChooserCell";isc.A.colorArray=["#000000","#993300","#333300","#003300","#003366","#000080","#333399","#333333","#800000","#FF6600","#808000","#008000","#008080","#0000FF","#666699","#808080","#FF0000","#FF9900","#99CC00","#339966","#33CCCC","#3366FF","#800080","#C0C0C0","#FF00FF","#FFCC00","#FFFF00","#00FF00","#00FFFF","#00CCFF","#993366","#FFFFFF","#FF99CC","#FFCC99","#FFFF99","#CCFFCC","#CCFFFF","#99CCFF","#CC99FF","#FFFFFF"];isc.A.numBasicColorRows=5;isc.A.numBasicColorColumns=8;isc.A.basicColorLayoutDefaults={_constructor:"VLayout",autoParent:"none"};isc.A.basicColorRowLayoutDefaults={_constructor:"HLayout",layoutBottomMargin:1,membersMargin:1};isc.A.basicColorSwatchDefaults={autoDraw:false,_constructor:"StatefulCanvas",overflow:"hidden",title:"",showFocusOutline:false,showTitle:false,showFocused:true,showRollOver:true,showFocusedAsOver:true,canFocus:true,click:function(){var _1=this.creator;_1.setHtmlColor(this.backgroundColor);_1.$56g(this.backgroundColor)}};isc.A.showLuminositySlider=false;isc.A.luminositySliderConstructor="Slider";isc.A.luminositySliderDefaults={autoDraw:true,minValue:0,maxValue:240,numValues:240,showTitle:false,showValue:false,showRange:false,dragStart:function(){return isc.EH.STOP_BUBBLING},dragMove:function(){return isc.EH.STOP_BUBBLING},dragStop:function(){return isc.EH.STOP_BUBBLING}};isc.A.swatchWidth=170;isc.A.swatchHeight=170;isc.A.lumStep=4;isc.A.lumWidth=15;isc.A.supportsTransparency=true;isc.A.opacityText="Lorem ipsum";isc.A.swatchImageURL="[SKIN]ColorPicker/spectrum.png";isc.A.swatchImageStyle="colorChooserCell";isc.A.crosshairImageURL="[SKIN]ColorPicker/crosshair.png";isc.A.lessButtonTitle="<< Less";isc.A.moreButtonTitle="More >>";isc.A.basicColorLabel="Basic Colors:";isc.A.selectedColorLabel="Selected Color:";isc.A.opacitySliderLabel="Opacity:";isc.A.defaultOpacity=100;isc.A.redFieldTitle="Red";isc.A.redFieldPrompt="The Red component of the selected color";isc.A.greenFieldTitle="Green";isc.A.greenFieldPrompt="The Green component of the selected color";isc.A.blueFieldTitle="Blue";isc.A.blueFieldPrompt="The Blue component of the selected color";isc.A.htmlFieldTitle="HTML";isc.A.htmlFieldPrompt="The selected color''s HTML coding";isc.A.hueFieldTitle="Hue";isc.A.hueFieldPrompt="The Hue (base tone) of the selected color";isc.A.satFieldTitle="Sat";isc.A.satFieldPrompt="The Saturation (color purity) of the selected color";isc.A.lumFieldTitle="Lum";isc.A.lumFieldPrompt="The Luminosity (brightness) of the selected color";isc.A.okButtonTitle="OK";isc.A.cancelButtonTitle="Cancel";isc.A.autoPosition=true;isc.A.autoCenterOnShow=true;isc.A.autoHide=null;isc.A.defaultPickMode="simple";isc.A.allowComplexMode=true;isc.A.$56f=true;isc.B.push(isc.A.closeClick=function isc_ColorPicker_closeClick(){this.hide()}
,isc.A.$183f=function isc_ColorPicker__cancel(){this.hide();if(this.pickerCancelled)this.pickerCancelled()}
);isc.B._maxIndex=isc.C+2;isc.A=isc.ColorPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.transparentIconSrc="[SKINIMG]DynamicForm/ColorPicker_icon_transparent.png";isc.A.selectTitle="Select a Color";isc.B.push(isc.A.show=function isc_ColorPicker_show(){if(this.autoPosition){this.autoCenter=false;var _1=isc.EH.getLastEvent();this.placeNear(_1.x,_1.y)}else{if(this.autoCenterOnShow)this.autoCenter=true}
this.Super("show",arguments);if(this.cancelButton){this.cancelButton.focus()}}
,isc.A.redraw=function isc_ColorPicker_redraw(){this.Super("redraw",arguments);if(this.autoPosition){this.autoCenter=false;this.placeNear(this.left,this.top)}}
,isc.A.initWidget=function isc_ColorPicker_initWidget(){this.Super("initWidget",arguments);this.title=this.selectTitle;this.$56c=this.defaultPickMode;if(!this.allowComplexMode){this.$56c="simple"}
this.addAutoChild("basicColorLayout");var _1=this.numBasicColorRows,_2=this.numBasicColorColumns;var _3={height:this.colorButtonSize
};for(var i=0;i<_1;++i){var _5=this.createAutoChild("basicColorRowLayout",_3);for(var j=0;j<_2;++j){var _7=this.createAutoChild("basicColorSwatch",{baseStyle:this.colorButtonBaseStyle,width:this.colorButtonSize,height:this.colorButtonSize,backgroundColor:this.colorArray[i*_2+j]
});_5.addMember(_7);if(j==_2-2&&i==_1-1){this.finalSwatchItem=this.createAutoChild("basicColorSwatch",{baseStyle:this.colorButtonBaseStyle,width:this.colorButtonSize,height:this.colorButtonSize,backgroundColor:this.colorArray[i*_2+j+1],visibility:!this.supportsTransparency?"visible":"hidden"
});_5.addMember(this.finalSwatchItem);this.transparentSwatchItem=isc.Img.create({baseStyle:this.colorButtonBaseStyle,width:this.colorButtonSize,height:this.colorButtonSize,backgroundColor:"transparent",src:this.transparentIconSrc,creator:this,showFocusOutline:false,showTitle:false,showDisabled:false,showImageDisabled:false,showFocused:true,canFocus:true,visibility:this.supportsTransparency?"visible":"hidden",click:function(){this.creator.setHtmlColor(this.backgroundColor);this.creator.$56g(this.backgroundColor)}
});_5.addMember(this.transparentSwatchItem);break}
}
this.basicColorLayout.addMember(_5)}
this.leftLayout=this.createAutoChild("leftLayout");this.leftLayout.addMember(this.basicColorLayout);this.innerContentLayout=this.createAutoChild("innerContentLayout");this.innerContentLayout.addMembers([this.leftLayout]);this.contentLayout=this.createAutoChild("contentLayout");this.contentLayout.addMembers([this.innerContentLayout]);this.bodyLayout=this.createAutoChild("bodyLayout");this.bodyLayout.addMember(this.contentLayout);this.$170v=this.showOkButton;if(this.$56c==="simple"){this.showOkButton=false}
if(!this.allowComplexMode){this.showModeToggleButton=false}
this.addAutoChild("buttonLayout");this.addAutoChild("okButton",{title:this.okButtonTitle});this.addAutoChild("cancelButton",{title:this.cancelButtonTitle});this.addAutoChild("modeToggleButton",{title:(this.$56c=="simple"&&this.allowComplexMode?this.moreButtonTitle:this.lessButtonTitle)
});if(this.$56c!="simple"){this.createComplexElements();this.addComplexElements()}
this.bodyLayout.addMember(this.buttonLayout);this.addItem(this.bodyLayout);this.setHtmlColor(this.defaultColor);this.$56h();this.setOpacity(this.defaultOpacity)}
,isc.A.draw=function isc_ColorPicker_draw(){this.Super("draw",arguments);if(this.buttonLayout)this.buttonLayout.setWidth(this.body.getVisibleWidth())}
,isc.A.createComplexElements=function isc_ColorPicker_createComplexElements(){if(this.$56c!='complex'){return}
this.rgbForm=this.createAutoChild("rgbForm",{picker:this,fields:[{name:"pickerRedVal",title:this.redFieldTitle,type:"text",width:50,defaultValue:this.$56j,prompt:this.redFieldPrompt,picker:this,changed:function(_5,_6,_7){this.picker.setRed(_7)}
},{name:"pickerGrnVal",title:this.greenFieldTitle,type:"text",width:50,defaultValue:this.$56k,prompt:this.greenFieldPrompt,picker:this,changed:function(_5,_6,_7){this.picker.setGreen(_7)}
},{name:"pickerBluVal",title:this.blueFieldTitle,type:"text",width:50,defaultValue:this.$56l,prompt:this.blueFieldPrompt,picker:this,changed:function(_5,_6,_7){this.picker.setBlue(_7)}
}
]
});this.hslForm=this.createAutoChild("hslForm",{picker:this,fields:[{name:"pickerHueVal",title:this.hueFieldTitle,type:"text",width:49,defaultValue:this.$56o,prompt:this.hueFieldPrompt,picker:this,changed:function(_5,_6,_7){this.picker.setHue(_7)}
},{name:"pickerSatVal",title:this.satFieldTitle,type:"text",width:49,defaultValue:this.$56p,prompt:this.satFieldPrompt,picker:this,changed:function(_5,_6,_7){this.picker.setSaturation(_7)}
},{name:"pickerLumVal",title:this.lumFieldTitle,type:"text",width:49,defaultValue:this.$56q,prompt:this.lumFieldPrompt,picker:this,changed:function(_5,_6,_7){this.picker.setLuminosity(_7)}
}
]
});this.htmlForm=this.createAutoChild("htmlForm",{picker:this,fields:[{name:"pickerHtmlVal",title:this.htmlFieldTitle,type:"text",width:140,defaultValue:this.$56m,prompt:this.htmlFieldPrompt,picker:this,changed:function(_5,_6,_7){this.picker.setHtmlColor(_7)}
}
]
});this.crossHair=this.createAutoChild("crossHair",{picker:this,src:this.crosshairImageURL
});var _1=isc.Canvas.measureContent(this.opacityText,this.opacityBoxStyle,true,true,{wrap:true,padding:2});this.colorBox=this.createAutoChild("colorBox",{picker:this,height:_1,backgroundColor:this.getHtmlColor()
});if(this.showOpacityBox!=false){this.opacityBox=this.createAutoChild("opacityBox",{picker:this,height:_1,contents:this.opacityText,styleName:this.opacityBoxStyle,children:[this.colorBox
]
})}
this.luminosityStack=this.createAutoChild("luminosityStack",{picker:this,height:this.swatchHeight+2,width:this.lumWidth,click:function(){var _2=this.picker.luminositySlider.$1260(true,[isc.EH.getX(),isc.EH.getY()-2],true);this.picker.luminositySlider.setValue(_2)}
});var _3=Math.ceil(this.swatchHeight/this.lumStep)
for(var i=0;i<_3;i++){this.luminosityStack.addMember(isc.Canvas.create({autoDraw:false,width:this.lumWidth,height:this.lumStep,margin:0,padding:0,overflow:"hidden"
}))}
this.luminositySlider=this.createAutoChild("luminositySlider",{length:this.swatchHeight,height:this.swatchHeight});this.opacitySlider=this.createAutoChild("opacitySlider",{autoDraw:false,picker:this
});this.$56z=isc.HLayout.create({membersMargin:5,defaultLayoutAlign:"center",width:this.swatchWidth+2,members:[isc.Label.create({autoDraw:false,contents:this.opacitySliderLabel,width:"*",height:10
}),this.opacitySlider
]
});this.rightLayout=this.createAutoChild("rightLayout",{members:[isc.HLayout.create({autoDraw:false,height:this.swatchHeight,membersMargin:5,members:[isc.Img.create({autoDraw:false,width:this.swatchWidth+2,height:this.swatchHeight+2,src:this.swatchImageURL,overflow:"hidden",styleName:this.swatchImageStyle,showDisabled:false,showImageDisabled:false,picker:this,click:function(){this.picker.$56t(this.getOffsetX(),this.getOffsetY())},children:[this.crossHair
]
})
]
}),isc.HLayout.create({autoDraw:false,membersMargin:5,width:this.swatchWidth+2,defaultLayoutAlign:"center",members:[isc.Label.create({autoDraw:false,contents:this.selectedColorLabel,width:"*",height:15
}),this.opacityBox
]
})
]
});this.$186j=isc.HLayout.create({autoDraw:false,height:"100%",width:1,overflow:"visible",members:[this.luminosityStack,this.luminositySlider
]
});if(this.luminositySlider)this.observe(this.luminositySlider,"valueChanged","observer.luminositySliderChanged()");if(this.opacitySlider)this.observe(this.opacitySlider,"valueChanged","observer.$562()")}
,isc.A.initComplexElements=function isc_ColorPicker_initComplexElements(){if(!this.luminositySlider)this.luminositySlider=this.createAutoChild("luminositySlider",{length:this.swatchHeight});this.luminositySlider.setValue(this.$56q);this.$56h();this.$563(this.$56o,this.$56p);if(this.$56m)this.setHtmlColor(this.$56m);this.colorBox.setBackgroundColor(isc.ColorUtils.hslToHtml(this.$56o,this.$56p,this.$56q));if(this.supportsTransparency){this.colorBox.setOpacity(this.$56d);if(!this.opacitySlider)this.opacitySlider=this.createAutoChild("opacitySlider",{length:this.swatchHeight});this.opacitySlider.setValue(this.$56d)}}
,isc.A.addComplexElements=function isc_ColorPicker_addComplexElements(){if(this.$56c!='complex'){return}
this.showOkButton=this.$170v;this.setAutoChild("okButton",{title:this.okButtonTitle});this.buttonLayout.setMembers([this.okButton,this.cancelButton,this.modeToggleButton]);if(!this.basicLabel){this.basicLabel=this.createAutoChild("basicLabel",{contents:this.basicColorLabel})}
if(!this.$186p){this.$186p=isc.HLayout.create({autoDraw:false,membersMargin:4,members:[this.rgbForm,this.hslForm
]
})}
if(!this.formLayout){this.formLayout=this.createAutoChild("formLayout");this.formLayout.addMembers([this.$186p,this.htmlForm])}
this.contentLayout.addMember(this.basicLabel,0);this.leftLayout.addMember(this.formLayout);if(this.supportsTransparency){this.rightLayout.addMember(this.$56z)}
this.innerContentLayout.addMember(this.rightLayout);this.innerContentLayout.addMember(this.$186j);this.initComplexElements()}
,isc.A.removeComplexElements=function isc_ColorPicker_removeComplexElements(){if(this.$56c=='complex'){return}
this.showOkButton=false;this.setAutoChild("okButton");if(this.formLayout){this.contentLayout.removeMembers([this.basicLabel]);this.leftLayout.removeMembers([this.formLayout]);this.innerContentLayout.removeMembers([this.rightLayout,this.$186j])}}
,isc.A.setSupportsTransparency=function isc_ColorPicker_setSupportsTransparency(_1){this.supportsTransparency=_1;if(this.$56c=='complex'){if(this.supportsTransparency){this.rightLayout.addMember(this.$56z);this.$56z.show()}else{this.rightLayout.removeMember(this.$56z)}
}
this.updateColorSwatch()}
,isc.A.updateColorSwatch=function isc_ColorPicker_updateColorSwatch(){if(this.supportsTransparency){this.finalSwatchItem.hide();this.transparentSwatchItem.show()}else{this.transparentSwatchItem.hide();this.finalSwatchItem.show()}}
,isc.A.getRed=function isc_ColorPicker_getRed(){return this.$56j}
,isc.A.getGreen=function isc_ColorPicker_getGreen(){return this.$56k}
,isc.A.getBlue=function isc_ColorPicker_getBlue(){return this.$56l}
,isc.A.getHue=function isc_ColorPicker_getHue(){return this.$56o}
,isc.A.getSaturation=function isc_ColorPicker_getSaturation(){return this.$56p}
,isc.A.getLuminosity=function isc_ColorPicker_getLuminosity(){return this.$56q}
,isc.A.getHtmlColor=function isc_ColorPicker_getHtmlColor(){return this.$56m}
,isc.A.getOpacity=function isc_ColorPicker_getOpacity(){return this.$56d}
,isc.A.setRed=function isc_ColorPicker_setRed(_1){if(_1<0)this.$56j=0;else if(_1>255)this.$56j=255;else this.$56j=_1/1;if(this.$56c=='complex'){this.rgbForm.setValue("pickerRedVal",this.$56j)}
if(this.$56f===true)
this.$564('rgb')}
,isc.A.setGreen=function isc_ColorPicker_setGreen(_1){if(_1<0)this.$56k=0;else if(_1>255)this.$56k=255;else this.$56k=_1/1;if(this.$56c=='complex'){this.rgbForm.setValue("pickerGrnVal",this.$56k)}
if(this.$56f===true)
this.$564('rgb')}
,isc.A.setBlue=function isc_ColorPicker_setBlue(_1){if(_1<0)this.$56l=0;else if(_1>255)this.$56l=255;else this.$56l=_1/1;if(this.$56c=='complex'){this.rgbForm.setValue("pickerBluVal",this.$56l)}
if(this.$56f===true)
this.$564('rgb')}
,isc.A.setHue=function isc_ColorPicker_setHue(_1){if(_1<0)this.$56o=0;else if(_1>239)this.$56o=239;else this.$56o=_1/1;if(this.$56c=='complex'){this.hslForm.setValue("pickerHueVal",this.$56o)}
if(this.$56f===true)
this.$564('hsl')}
,isc.A.setSaturation=function isc_ColorPicker_setSaturation(_1){if(_1<0)this.$56p=0;else if(_1>240)this.$56p=240;else this.$56p=_1/1;if(this.$56c=='complex'){this.hslForm.setValue("pickerSatVal",this.$56p)}
if(this.$56f===true){this.$564('hsl')}}
,isc.A.setLuminosity=function isc_ColorPicker_setLuminosity(_1,_2){if(_1<0)this.$56q=0;else if(_1>240)this.$56q=240;else this.$56q=_1/1;this.$105z=!_2;if(this.$56c=='complex'){this.hslForm.setValue("pickerLumVal",this.$56q)}
if(this.$56f===true)
this.$564('hsl')}
,isc.A.getColor=function isc_ColorPicker_getColor(){var _1=isc.tinycolor(this.getHtmlColor());if(_1.isValid()&&this.supportsTransparency){_1.setAlpha(this.getOpacity()/100)}
return _1}
,isc.A.setColor=function isc_ColorPicker_setColor(_1){_1=isc.tinycolor(_1);if(_1.isValid()){if(!this.supportsTransparency){if(_1.getOriginalInput()=="transparent")this.setHtmlColor("#ffffff");else this.setHtmlColor(_1.toHexString())}else{if(_1.getOriginalInput()=="transparent")this.setHtmlColor("transparent");else this.setHtmlColor(_1.toHexString());this.setOpacity(_1.getAlpha()*100)}
}}
,isc.A.setHtmlColor=function isc_ColorPicker_setHtmlColor(_1){if(_1=="transparent"){this.$217b=this.$56d;this.setOpacity(0);this.$2120=true}else{if(this.$2120){delete this.$2120;this.setOpacity(this.$217b);delete this.$217b}
if(isc.ColorUtils.colorNames[_1]){_1=isc.ColorUtils.colorNames[_1]}
if(_1.length==9){var o=_1.substring(7);_1=_1.substring(0,7);this.$56d=Math.round((parseInt(o,16)/255)*100)}
}
if(isc.ColorUtils.encodingIsValid(_1)===true){if(_1!="transparent")_1=_1.toUpperCase();this.$56m=_1;if(this.$56c=='complex'){this.htmlForm.setValue("pickerHtmlVal",this.$56m)}
if(this.$56f===true)
this.$564('html')}}
,isc.A.setOpacity=function isc_ColorPicker_setOpacity(_1){if(this.supportsTransparency){if(_1<0)this.$56d=100;else if(_1>100)this.$56d=100;else this.$56d=_1/1}else{this.$56d=100}
if(this.$56c=='complex'){if(this.$56f===true){this.$564('opacity')}
}}
,isc.A.$564=function isc_ColorPicker__changeColor(_1){if(_1=='rgb'){var _2=isc.ColorUtils.rgbToHsl(this.$56j,this.$56k,this.$56l);this.$56f=false;this.setHue(_2.h);this.setSaturation(_2.s);this.setLuminosity(_2.l,true);this.setHtmlColor(isc.ColorUtils.rgbToHtml(this.$56j,this.$56k,this.$56l));this.$56f=true;this.$563(this.$56o,this.$56p)}else if(_1=='hsl'){if(!this.$105z)this.$56q=120;var _3=isc.ColorUtils.hslToRgb(this.$56o,this.$56p,this.$56q);this.$56f=false;this.setRed(_3.r);this.setGreen(_3.g);this.setBlue(_3.b);this.setHtmlColor(isc.ColorUtils.rgbToHtml(this.$56j,this.$56k,this.$56l));this.$56f=true;if(this.$56o!=this.$565||this.$56p!=this.$566){this.$563(this.$56o,this.$56p)}
}else if(_1=='html'){var _3;if(this.$56m=="transparent"){this.$56d=0;_3={r:255,g:255,b:255}}else{_3=isc.ColorUtils.htmlToRgb(this.$56m)}
this.$56f=false;this.setRed(_3.r);this.setGreen(_3.g);this.setBlue(_3.b);var _2=isc.ColorUtils.rgbToHsl(this.$56j,this.$56k,this.$56l);this.setHue(_2.h);this.setSaturation(_2.s);this.setLuminosity(_2.l,true);this.$56f=true;this.$563(this.$56o,this.$56p)}
if(this.$56c=='complex'){if(!this.luminositySlider)this.luminositySlider=this.createAutoChild("luminositySlider",{length:this.swatchHeight});this.luminositySlider.setValue(this.$56q);this.hslForm.setValue("pickerLumVal",this.$56q)}
if(this.$56c=='complex'){this.colorBox.setBackgroundColor(isc.ColorUtils.hslToHtml(this.$56o,this.$56p,this.$56q))}
if(this.$56o!=this.$565||this.$56p!=this.$566){this.$56h()}
if(this.$56c=='complex'&&this.supportsTransparency){this.colorBox.setOpacity(this.$56d);if(this.opacitySlider!=null){var _4=this.opacitySlider,_5=_4.getValue(),_6=this.$56d;if(_6===null)_6=100;if(_5!=_6)this.opacitySlider.setValue(this.$56d)}
}
this.$565=this.$56o;this.$566=this.$56p;if(this.colorChanged)this.colorChanged()}
,isc.A.$56g=function isc_ColorPicker__oneClickColorSelected(_1){if(((this.autoHide===undefined||this.autoHide===null)&&this.$56c==="simple")
||this.autoHide===true)
{this.hide()}
if(this.$56c!='complex'&&this.colorSelected){this.colorSelected(_1,this.getOpacity())}}
,isc.A.$563=function isc_ColorPicker__positionCrossHair(_1,_2){if(_1==null||_2==null)return;if(this.$56c!='complex'){return}
if(this.$56s===true){this.$56s=false;return}
var _3=_1/239.0;var _4=_2/240.0;_3*=this.swatchWidth;_4=this.swatchHeight-(_4*this.swatchHeight);_3=parseInt(_3)-8;_4=parseInt(_4)-8;this.crossHair.setLeft(_3);this.crossHair.setTop(_4)}
,isc.A.$56t=function isc_ColorPicker__crosshairMoved(_1,_2){_1-=5;_2-=5;_1/=this.swatchWidth;_2=1.0-_2/this.swatchHeight;this.$56f=false;this.setHue(Math.floor(_1*239.0+0.5));this.$56f=true;this.setSaturation(Math.floor(_2*240.0+0.5))}
,isc.A.$56h=function isc_ColorPicker__setLumVals(){if(this.$56c!='complex'){return}
for(var i=0;i<this.swatchHeight/this.lumStep;i++){this.luminosityStack.members[i].setBackgroundColor(isc.ColorUtils.hslToHtml(this.$56o,this.$56p,240-(i*240/(this.swatchHeight/this.lumStep))
))}}
,isc.A.luminositySliderChanged=function isc_ColorPicker_luminositySliderChanged(){var _1=this.luminositySlider.getValue();if(this.$56q!=_1){this.setLuminosity(_1)}}
,isc.A.$562=function isc_ColorPicker__opSliderChanged(){this.setOpacity(this.opacitySlider.getValue())}
,isc.A.setCurrentPickMode=function isc_ColorPicker_setCurrentPickMode(_1){if(this.$56c==_1)return;if(_1=="simple"||!this.allowComplexMode){this.$56c="simple";this.removeComplexElements();if(this.allowComplexMode){this.modeToggleButton.setTitle(this.moreButtonTitle)}
}else{this.$56c="complex";if(!this.rightLayout){this.createComplexElements()}
this.addComplexElements();this.modeToggleButton.setTitle(this.lessButtonTitle)}
this.modeToggleButton.setState("");this.reflow();this.markForRedraw()}
,isc.A.$56e=function isc_ColorPicker__togglePickMode(){this.setCurrentPickMode(this.$56c=="simple"?"complex":"simple")}
);isc.B._maxIndex=isc.C+37;isc.ColorPicker.registerStringMethods({colorChanged:"",colorSelected:"color,opacity"});isc.defineClass("ColorUtils",isc.Class);isc.A=isc.ColorUtils;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.colorNames={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",burntsienna:"#ea7e5d",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"};isc.A.$270w={};isc.B.push(isc.A.hexToDec=function isc_c_ColorUtils_hexToDec(_1){return parseInt(_1,16)}
,isc.A.decToHex=function isc_c_ColorUtils_decToHex(_1){var d=_1/1;var h=d.toString(16);if(h.length==1){h="0"+h}
return h}
,isc.A.brightness=function isc_c_ColorUtils_brightness(_1,_2,_3){var _4=isc.ColorUtils.rgbToHsl(_1,_2,_3);return(_4.l/240.0)}
,isc.A.htmlBrightness=function isc_c_ColorUtils_htmlBrightness(_1){var _2=this.htmlToRgb(_1);return isc.ColorUtils.brightness(_2.r,_2.g,_2.b)}
,isc.A.encodingIsValid=function isc_c_ColorUtils_encodingIsValid(_1){return _1=='transparent'||(_1.substring(0,1)=='#'&&isc.isA.color(_1))}
,isc.A.rgbToHtml=function isc_c_ColorUtils_rgbToHtml(_1,_2,_3){var _4='#'+isc.ColorUtils.decToHex(_1)+isc.ColorUtils.decToHex(_2)+isc.ColorUtils.decToHex(_3);return _4}
,isc.A.hslToHtml=function isc_c_ColorUtils_hslToHtml(_1,_2,_3){var _4=isc.ColorUtils.hslToRgb(_1,_2,_3);var _5='#'+isc.ColorUtils.decToHex(_4.r)+isc.ColorUtils.decToHex(_4.g)+isc.ColorUtils.decToHex(_4.b);return _5}
,isc.A.htmlToRgb=function isc_c_ColorUtils_htmlToRgb(_1){var r=_1.substring(1,3);var g=_1.substring(3,5);var b=_1.substring(5,7);return{r:isc.ColorUtils.hexToDec(r),g:isc.ColorUtils.hexToDec(g),b:isc.ColorUtils.hexToDec(b)
}}
,isc.A.htmlToHsl=function isc_c_ColorUtils_htmlToHsl(_1){var r=_1.substring(1,3);var g=_1.substring(3,5);var b=_1.substring(5,7);return isc.ColorUtils.rgbToHsl(isc.ColorUtils.hexToDec(r),isc.ColorUtils.hexToDec(g),isc.ColorUtils.hexToDec(b))}
,isc.A.rgbToHsl=function isc_c_ColorUtils_rgbToHsl(_1,_2,_3){var _4=_1/255.0;var _5=_2/255.0;var _6=_3/255.0;var _7=Math.min(Math.min(_4,_5),_6);var _8=Math.max(Math.max(_4,_5),_6);var _9=_8-_7;var h=0,s=0,l=0;l=(_8+_7)/2.0;if(_8==_7){s=0;h=0}else{if(l<0.5){s=(_8-_7)/(_8+_7)}else{s=(_8-_7)/(2.0-_8-_7)
}
if(_4==_8)
h=(_5-_6)/_9;else if(_5==_8)
h=2+(_6-_4)/_9;else
h=4+(_4-_5)/_9}
h=Math.floor(h*40+0.5);if(h<0)h+=240;s=Math.floor(s*240+0.5);l=Math.floor(l*240+0.5);return{h:h,s:s,l:l}}
,isc.A.hslToRgb=function isc_c_ColorUtils_hslToRgb(_1,_2,_3){var _4=_1/239.0;var _5=_2/240.0;var _6=_3/240.0;var _7,_8,_9,_10,_11;var r=0,g=0,b=0;if(_5==0){r=_6;g=_6;b=_6}else{if(_6<0.5){_8=_6*(1.0+_5)}else{_8=(_6+_5)-(_6*_5)}
_7=(2.0*_6)-_8;_9=_4+0.3333;_10=_4;_11=_4-0.3333;if(_9<0)_9+=1.0;if(_10<0)_10+=1.0;if(_11<0)_11+=1.0;if(_9>1)_9-=1.0;if(_10>1)_10-=1.0;if(_11>1)_11-=1.0;if(_9*6.0<1)
r=_7+(_8-_7)*6.0*_9;else if(_9*2.0<1)
r=_8;else if(_9*3.0<2)
r=_7+(_8-_7)*(0.6667-_9)*6.0;else
r=_7;if(_10*6.0<1)
g=_7+(_8-_7)*6.0*_10;else if(_10*2.0<1)
g=_8;else if(_10*3.0<2)
g=_7+(_8-_7)*(0.6667-_10)*6.0;else
g=_7;if(_11*6.0<1)
b=_7+(_8-_7)*6.0*_11;else if(_11*2.0<1)
b=_8;else if(_11*3.0<2)
b=_7+(_8-_7)*(0.6667-_11)*6.0;else
b=_7}
r=Math.floor(r*255.0+0.5);g=Math.floor(g*255.0+0.5);b=Math.floor(b*255.0+0.5);return{r:r,g:g,b:b}}
,isc.A.isDark=function isc_c_ColorUtils_isDark(_1,_2,_3,_4,_5){var _6,_7;if(_2==null&&_3==null){_6=String(_1).toLowerCase();_7=this.colorNames[_1];if(_7)_6=_7}else{var _8;_7=+_1;if(isc.isA.Number(_7))_1=_7;else{_1=String(_1);_8=_1.indexOf('%');if(_8>0){_7=+_1.substring(0,_8);if(isc.isA.Number(_7))_1=_7*255/100}
}
if(_2==null)_2=0;else{_7=+_2;if(isc.isA.Number(_7))_2=_7;else{_2=String(_2);_8=_2.indexOf('%');if(_8>0){_7=+_2.substring(0,_8);if(isc.isA.Number(_7))_2=_7*255/100}
}
}
if(_3==null)_3=0;else{_7=+_3;if(isc.isA.Number(_7))_3=_7;else{_3=String(_3);_8=_3.indexOf('%');if(_8>0){_7=+_3.substring(0,_8);if(isc.isA.Number(_7))_3=_7*255/100}
}
}
if(!isc.isA.Number(_1)||!isc.isA.Number(_2)||!isc.isA.Number(_3)){_6="rgb("+_1+","+_2+","+_3+")"}else{_6=null}
}
if(isc.isA.String(_6)){if(_6 in this.$270w)return this.$270w[_6];var _9=new RegExp("#[a-f\\d]{3}(?:[a-f\\d](?:[a-f\\d]{2}(?:[a-f\\d]{2})?)?)?\\b","i"),_10=_9.exec(_6);if(_10){_6=_10[0];if(_6.length==4||_6.length==5){_1=parseInt(_6[1]+_6[1],16);_2=parseInt(_6[2]+_6[2],16);_3=parseInt(_6[3]+_6[3],16);if(_6.length==5){_4=parseInt(_6[4]+_6[4],16)}
}else{this.$102q(_6.length==7||_6.length==9);_1=parseInt(_6.substring(1,3),16);_2=parseInt(_6.substring(3,5),16);_3=parseInt(_6.substring(5,7),16);if(_6.length==8){_4=parseInt(_6.substring(7,9),16)/255}
}
}else{var _11=isc.Canvas.$271c();_11.setBackgroundColor(_6+" !important");_11.draw();var _12=_11.getClipHandle();if(_12){_6=isc.Element.getComputedStyleAttribute(_12,"background-color");if(_6){var _13=_6.indexOf("rgba("),_14;if(_13>=0){_14=_6.substring(_13+5)}else{var _15=_6.indexOf("rgb(");if(_15>=0){_14=_6.substring(_15+4)}
}
if(_14){var _16=_14.split(",");_1=!_16[0]?0:parseInt(_16[0],10);_2=!_16[1]?0:parseInt(_16[1],10);_3=!_16[2]?0:parseInt(_16[2],10);if(_16.length>=4&&_16[3])_4=parseInt(_16[3],10)/255}
}
}
_11.clear();_11.setBackgroundColor(null)}
}
if(!_5){_5=isc.Page.isDarkSkin()?"#000":"#fff"}
if(isc.isA.Number(_1)&&isc.isA.Number(_2)&&isc.isA.Number(_3)){_1=isc.Math.clamp(_1,0,255);_2=isc.Math.clamp(_2,0,255);_3=isc.Math.clamp(_3,0,255);var _17=0.2126*_1+0.7152*_2+0.0722*_3,_18=_17<128;if(_6)this.$270w[_6]=_18;return _18}
return false}
);isc.B._maxIndex=isc.C+12}
isc.ClassFactory.defineClass("NestedEditorItem","CanvasItem");isc.A=isc.NestedEditorItem.getPrototype();isc.A.shouldSaveValue=true;isc.A.isCriteriaEditor=false;isc.A.editorConstructor="DynamicForm";isc.A.editorDefaults={itemChanged:function(_1,_2){var _3=this.creator.isCriteriaEditor?this.getValuesAsCriteria()
:this.getValues();if(_3!=null){_3=isc.addProperties({},_3)}
this.creator.storeValue(_3)}
};isc.A=isc.NestedEditorItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_NestedEditorItem_init(){this.$67h();this.Super("init",arguments)}
,isc.A.$67h=function isc_NestedEditorItem__createEditor(){var _1;var _2={};if(this.form.dataSource){_1=isc.DataSource.getDataSource(this.form.dataSource);var _3=_1.getField(this.name);if(_3){_2.dataSource=_1.getFieldDataSource(_3)}
}
if(this.form&&this.form.showComplexFieldsRecursively){_2.showComplexFields=true;_2.showComplexFieldsRecursively=true}else{_2.showComplexFields=false}
if(this.grid){_2.width=this.getWidth();_2.overflow=isc.Canvas.CLIP_H}
_2.values=this.getValue();this.addAutoChild("editor",_2);this.canvas=this.editor}
,isc.A.showValue=function isc_NestedEditorItem_showValue(_1,_2){this.editor.setValues(_2)}
,isc.A.$85m=function isc_NestedEditorItem__shouldAllowExpressions(){return false}
);isc.B._maxIndex=isc.C+4;isc.ClassFactory.defineClass("NestedListEditorItem","CanvasItem");isc.A=isc.NestedListEditorItem.getPrototype();isc.A.shouldSaveValue=true;isc.A.editorConstructor="ListEditor";isc.A.editorDefaults={inlineEdit:false,height:155,saveRecord:function(){if(!this.form.validate())return false;var _1=this.form.getValues();this.showList();if(this.inlineEdit){this.grid.setEditValues(this.grid.getEditRow(),_1)}else{if(this.form.saveOperationType=="add"){this.grid.addData(_1)}else{isc.addProperties(this.currentRecord,_1);this.grid.markForRedraw()}
if(!this.inlineEdit){this.form.clearValues()}
this.creator.updateValue(this.grid.data)}
return true}
};isc.A=isc.NestedListEditorItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_NestedListEditorItem_init(){this.$67h();this.Super("init",arguments)}
,isc.A.isEditable=function isc_NestedListEditorItem_isEditable(){return true}
,isc.A.$67h=function isc_NestedListEditorItem__createEditor(){var _1;var _2={};if(this.form.dataSource){_1=isc.DataSource.getDataSource(this.form.dataSource);var _3=_1.getField(this.name);if(_3){_2.dataSource=_1.getFieldDataSource(_3)}
}
if(this.form&&this.form.showComplexFieldsRecursively){_2.formProperties={showComplexFields:true,showComplexFieldsRecursively:true
};_2.gridProperties={showComplexFields:true,showComplexFieldsRecursively:true,canRemoveRecords:true,saveLocally:true,data:[]
}}else{_2.formProperties={showComplexFields:false
};_2.gridProperties={showComplexFields:false,canRemoveRecords:true,saveLocally:true
}}
this.addAutoChild("editor",_2);this.canvas=this.editor}
,isc.A.updateValue=function isc_NestedListEditorItem_updateValue(_1){this.editor.setData(_1);this.$10y(_1)}
,isc.A.setValue=function isc_NestedListEditorItem_setValue(_1){this.editor.setData(_1);this.Super("setValue",arguments)}
,isc.A.$85m=function isc_NestedListEditorItem__shouldAllowExpressions(){return false}
);isc.B._maxIndex=isc.C+6;isc.ClassFactory.defineClass("ViewFileItem","FileItem");isc.A=isc.ViewFileItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.shouldSaveValue=false;isc.A.colSpan="*";isc.A.height=20;isc.A.width="*";isc.A.overflow="visible";isc.A.canEdit=false;isc.A.defaultType="viewFile";isc.B.push(isc.A.formValuesChanged=function isc_ViewFileItem_formValuesChanged(){this.setCanvasContent(null)}
);isc.B._maxIndex=isc.C+1;isc.defineClass("PanelHeader","ImgSectionHeader");isc.A=isc.PanelHeader.getPrototype();isc.A.width="100%";isc.A.height=22;isc.A.baseStyle="sectionHeader";isc.A=isc.PanelHeader.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.showSelectedIcon=false;isc.A.showRollOverIcon=false;isc.A.showDisabledIcon=false;isc.A.showDownIcon=false;isc.A.showFocusedIcon=false;isc.B.push(isc.A.initWidget=function isc_PanelHeader_initWidget(){this.setPanelTitleFromCanvas()}
,isc.A.setPanelTitleFromCanvas=function isc_PanelHeader_setPanelTitleFromCanvas(){if(this.canvas){if(this.canvas.title)this.title=this.canvas.title;if(this.canvas.icon)this.icon=this.canvas.icon}
}
);isc.B._maxIndex=isc.C+2;isc.PanelHeader.registerStringMethods({iconClick:""});isc.A=isc.Canvas.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.panelHeaderDefaults={_constructor:"PanelHeader"
};isc.A.panelHeaderProperties={};isc.A.panelHeaderPlacement="peer";isc.B.push(isc.A.setupPanelHeader=function isc_Canvas_setupPanelHeader(){if(!this.showPanelHeader)return;this.panelHeader=this.createAutoChild("panelHeader",{canvas:this,snapTo:"T"});if(isc.isA.Layout(this))this.panelHeaderPlacement="member";else this.panelHeaderPlacement="peer";this.panelHeaderPlacement="peer";if(this.panelHeaderPlacement=="member"){this.addMember(this.panelHeader,0)}
else if(this.panelHeaderPlacement=="peer"){this.addPeer(this.panelHeader);this.panelHeader.moveAbove(this);this.$wi(this.panelHeader,isc.Canvas.TOP)}
else if(this.panelHeaderPlacement=="custom"){}
}
);isc.B._maxIndex=isc.C+1;isc.A=isc.Canvas.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.panelActionControls=[];isc.B.push(isc.A.refreshPanelControls=function isc_Canvas_refreshPanelControls(){var _1=this.panelControls||[];if(!this.panelHeader.controls)this.panelHeader.controls=[];else this.panelHeader.controls.setLength(0);for(var i=0;i<_1.length;i++){var _3=_1.get(i),_4=null;if(isc.isAn.Object(_3)){_4=isc.addProperties({},_3)}else if(_3.startsWith("action:")){var _5=_3.substring(7,_3.length),_6=isc.Canvas.getRegisteredAction(_5);if(this.canPerformAction(_6)){if(this.showActionInPanel(_6))
_4=this.getPanelActionControl(_6)}
}else{_4=this.createAutoChild(_3)}
if(_4){this.panelHeader.controls.add(_4)}else{}
}
var _7=this.panelHeader;_7.addControls()}
,isc.A.canPerformAction=function isc_Canvas_canPerformAction(_1){var _2=_1.name,_3=_1.enableProperty||"can"+_2.substring(0,1).toUpperCase()+_2.substring(1,_2.length)
;return this[_3]&&this[_3]==true?true:false}
,isc.A.showActionInPanel=function isc_Canvas_showActionInPanel(_1){return _1.showInPanel}
,isc.A.getPanelActionControl=function isc_Canvas_getPanelActionControl(_1){var _2=this.panelActionControls[_1.name],_3=_1.controlConstructor||"ImgButton";_2=isc.ClassFactory.newInstance(_3,{ID:this.getID()+"_"+_1.name,width:18,height:18,src:_1.icon,showRollOver:false,showDown:false,showDisabled:false,showFocused:false,actionTarget:this,actionObject:_1,prompt:_1.tooltip,click:function(){this.actionTarget[this.actionObject.methodName]()}
}
);this.panelActionControls[_1.name]=_2;return this.panelActionControls[_1.name]}
,isc.A.showPrintPreview=function isc_Canvas_showPrintPreview(_1,_2,_3,_4){isc.Canvas.showPrintPreview(this,_1,_2,_3,_4)}
);isc.B._maxIndex=isc.C+5;isc.A=isc.Canvas;isc.A.$71k={};isc.A=isc.Canvas;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.registerAction=function isc_c_Canvas_registerAction(_1){if(!this.$71k[_1.name]){this.$71k[_1.name]=_1}
}
,isc.A.getRegisteredActionNames=function isc_c_Canvas_getRegisteredActionNames(){return isc.getKeys(this.$71k)}
,isc.A.getRegisteredActions=function isc_c_Canvas_getRegisteredActions(){return isc.getValues(this.$71k)}
,isc.A.getRegisteredActionIndex=function isc_c_Canvas_getRegisteredActionIndex(){var _1=this.getRegisteredActions(),_2=_1.makeIndex("name",false);return _2}
,isc.A.getRegisteredAction=function isc_c_Canvas_getRegisteredAction(_1){return this.$71k[_1]}
,isc.A.isActionRegistered=function isc_c_Canvas_isActionRegistered(_1){return!this.$71k[_1]?false:true}
);isc.B._maxIndex=isc.C+6;isc.defineClass("Action","Class");isc.A=isc.Action.getPrototype();isc.A.name=null;isc.A.title=null;isc.A.icon=null;isc.A.tooltip=null;isc.A.methodName=null;isc.A.controlConstructor="ImgButton";isc.A.enableProperty=null;isc.A.showInPanel=true;isc.Canvas.registerAction(isc.Action.create({name:"edit",title:"Edit",icon:"[SKINIMG]/actions/edit.png",tooltip:"Put the component into Edit mode",methodName:"startEditing",showInPanel:false
}));isc.Canvas.registerAction(isc.Action.create({name:"editNew",title:"Edit New",icon:"[SKINIMG]/SectionHeader/opener_closed.png",tooltip:"Add a new Record to the component",methodName:"startEditingNew",showInPanel:false
}));isc.Canvas.registerAction(isc.Action.create({name:"sort",title:"Sort",icon:"[SKINIMG]/actions/sort_ascending.png",tooltip:"Sort the records in the component",methodName:"sort",controlConstructor:"SortActionSelector",enableProperty:"canSortFields",showInPanel:false
}));isc.Canvas.registerAction(isc.Action.create({name:"export",title:"Export",icon:"[SKINIMG]/actions/redo.png",tooltip:"Export the data in the component",methodName:"exportData",showInPanel:true
}));isc.Canvas.registerAction(isc.Action.create({name:"print",title:"Print",icon:"[SKINIMG]/actions/print.png",tooltip:"Print the data in the component",methodName:"showPrintPreview",showInPanel:true
}));isc.defineClass("SortActionSelector","DynamicForm");isc.A=isc.SortActionSelector.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.width=100;isc.A.height=20;isc.A.numCols=4;isc.A.fields=[{name:"sortField",showTitle:false,colSpan:2,type:"select",width:80,prompt:"Sort Field",startRow:false,endRow:false,changed:function(_1,_2,_3){var _4=_1.getField("sortDirection").getValue(),_5=_4?"ascending":"descending";if(_1.actionTarget.sort)_1.actionTarget.sort(_3,_5);else _1.actionTarget.data.sortByProperty(_3,_4)}
},{name:"sortDirection",showTitle:true,showLabel:false,type:"checkbox",width:20,prompt:"Sort Direction: Checked is Ascending",startRow:false,endRow:false,changed:function(_1,_2,_3){var _4=_3,_5=_4?"ascending":"descending",_6=_1.getField("sortField").getValue();if(_1.actionTarget.sort)_1.actionTarget.sort(_6,_5);else _1.actionTarget.data.sortByProperty(_6,_4)}
}
];isc.B.push(isc.A.initWidget=function isc_SortActionSelector_initWidget(){this.Super("initWidget",arguments)}
,isc.A.draw=function isc_SortActionSelector_draw(){this.Super("draw",arguments);var _1=this.actionTarget.getDataSource(),_2=_1?isc.getValues(_1.getFields()):[],_3={};for(var i=0;i<_2.length;i++){var _5=_2.get(i);_3[_5.name]=_5.title}
this.getField("sortField").setValueMap(_3)}
);isc.B._maxIndex=isc.C+2;isc.ClassFactory.defineClass("ToggleSwitch","StatefulCanvas");isc.A=isc.ToggleSwitch.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.width=50;isc.A.height=22;isc.A.overflow="visible";isc.A.canFocus=true;isc.A.showRollOver=false;isc.A.showDown=false;isc.A.showFocused=false;isc.A.thumbOffset=2;isc.A.defaultValue=false;isc.A.toggleBaseStyle="toggleSwitch";isc.A.thumbConstructor="Canvas";isc.A.thumbDefaults={overflow:"hidden"
};isc.A.thumbBaseStyle="toggleSwitchThumb";isc.A.toggleOnThumbClick=true;isc.A.toggleOnKeypress=true;isc.A.animateThumb=true;isc.A.animateThumbTime=100;isc.B.push(isc.A.initWidget=function isc_ToggleSwitch_initWidget(){this.Super("initWidget",arguments);if(this.animateThumbTime==0)this.animateThumbTime=1;var _1=isc.addProperties({},this.thumbDefaults,{left:this.thumbOffset,top:this.thumbOffset,width:this.thumbSize!=null?this.thumbSize:1,height:this.thumbSize!=null?this.thumbSize:1,minHeight:1,animateTime:this.animateThumbTime
},this.thumbProperties);if(this.thumbRadius&&!_1.borderRadius)_1.borderRadius=this.thumbRadius;if(this.thumbSize){var _2=isc.Element.$yo(this.getToggleStyle());this.height=_1.height+(this.thumbOffset*2)+(_2*2)}
this.thumb=this.createAutoChild("thumb",_1);this.addChild(this.thumb)}
,isc.A.setValue=function isc_ToggleSwitch_setValue(_1){if(_1==null)_1=this.defaultValue;this.oldValue=this.value;this.value=_1;this.setBaseStyle(this.getToggleStyle());this.updateThumb()}
,isc.A.getToggleStyle=function isc_ToggleSwitch_getToggleStyle(){return this.toggleBaseStyle+(this.value?"On":"Off")}
,isc.A.getValue=function isc_ToggleSwitch_getValue(){return this.value}
,isc.A.valueChanged=function isc_ToggleSwitch_valueChanged(_1,_2){}
,isc.A.draw=function isc_ToggleSwitch_draw(){var _1=this.Super("draw",arguments);this.setValue(this.value)}
,isc.A.updateThumb=function isc_ToggleSwitch_updateThumb(){if(this.thumb.getVisibleHeight()!=this.thumbSize){var _1=Math.floor(this.getHeight()-this.getVBorderPad()-(this.thumbOffset*2));if(this.thumbSize)_1=this.thumbSize;this.thumbSize=_1;this.thumb.resizeTo(this.thumbSize,this.thumbSize)}
var _2=this,_3=!this.value?this.thumbOffset:this.getInnerWidth()-this.thumb.getVisibleWidth()-this.thumbOffset
;if(this.animateThumb){this.thumb.animateMove(_3,this.thumbOffset,function(){},this.animateThumbTime)}else{this.thumb.moveTo(_3,this.thumbOffset)}
this.thumb.setStyleName(this.thumbBaseStyle+(this.value?"On":"Off"))}
,isc.A.thumbClick=function isc_ToggleSwitch_thumbClick(){if(this.toggleOnThumbClick)this.toggleValue()}
,isc.A.toggleValue=function isc_ToggleSwitch_toggleValue(){this.setValue(!this.value)
this.valueChanged(this.value,this.oldValue)}
,isc.A.handleClick=function isc_ToggleSwitch_handleClick(){this.toggleValue();return this.Super("handleClick",arguments)}
,isc.A.handleKeyPress=function isc_ToggleSwitch_handleKeyPress(_1,_2){if(this.toggleOnKeypress){var _3=_1.keyName;switch(_3){case"Arrow_Left":if(this.value)this.toggleValue();return false;case"Arrow_Right":if(!this.value)this.toggleValue();return false;case"Space":this.toggleValue();return false}
}
return this.Super("handleKeyPress",arguments)}
);isc.B._maxIndex=isc.C+11;isc.ClassFactory.defineClass("ToggleItem","CanvasItem");isc.A=isc.ToggleItem.getPrototype();isc.A.width=60;isc.A.toggleConstructor="ToggleSwitch";isc.A.shouldSaveValue=true;isc.A.toggleDefaults={autoDraw:false,overflow:"visible",hover:function(){var _1=this.canvasItem;if(_1!=null){_1.$wb();return false}
},valueChanged:function(){var _1=this.canvasItem;if(_1!=null)_1.toggleChange()}
};isc.A.autoDestroy=true;isc.A=isc.ToggleItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_ToggleItem_init(){this.Super("init",arguments);this.$207=this.getDefaultValue()}
,isc.A.$18y=function isc_ToggleItem__createCanvas(){const _1=isc.addProperties({},this.canvasProperties);var _2=this.canvas=this.addAutoChild("toggle",_1,this.toggleConstructor,this.container);this.Super("$18y",arguments)}
,isc.A.setValue=function isc_ToggleItem_setValue(_1){this.$17g=true;var _2;if(_1==null){_2=this.getDefaultValue();if(_2!=null)_1=_2}
this.$207=_1;this.canvas.setValue(_1,(_2!=null));this.toggleChange()}
,isc.A.getValue=function isc_ToggleItem_getValue(){return this.canvas.getValue()==1}
,isc.A.toggleChange=function isc_ToggleItem_toggleChange(){var _1=this.canvas.getValue();if(this.$207!=_1){this.$10y(_1);this.$207=_1}else{this.saveValue(_1)}
}
,isc.A.shouldDisableCanvas=function isc_ToggleItem_shouldDisableCanvas(){return this.isDisabled()}
);isc.B._maxIndex=isc.C+6;isc.defineClass("Base64ImageDataItem",isc.CanvasItem);isc.A=isc.Base64ImageDataItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.width="100%";isc.A.shouldSaveValue=true;isc.A.accept="image/*";isc.A.mimeType=null;isc.A.autoSelectTimeout=1000;isc.A.showPreview=true;isc.A.previewFieldDefaults={name:"$2681",width:"*",height:100,type:"FormItem",canEdit:false,shouldSaveValue:false,showTitle:false,mapValueToDisplay:function(_1){var _2=this.form.creator.getDisplayValue(_1);if(!_2||!this.form.creator.mimeType)return isc.emptyString;var _3=this.form.creator.mimeType;if(_2.startsWith("iVBORw0KGgo")){_3="image/png"}else if(_2.startsWith("/9j/")&&_2.endsWith("/Z")){_3="image/jpeg"}else if(_3){_3=_3.trim()}
if(!_3)return isc.emptyString;var _4=this.getInnerWidth(),_5=this.getInnerHeight();if(!isc.isA.Number(_4)||_4<0||!isc.isA.Number(_5)||_5<0)
{return isc.emptyString}
return"<div style='height:"+_5+"px;overflow:hidden'><img src='data:"+_3+";base64,"+_2+"' style='max-width:"+_4+"px;max-height:"+_5+"px'></div>"}
};isc.A.imageFieldDefaults={type:"imageFile",titleOrientation:"top",showTitle:false,changed:function(_1,_2,_3){_1.creator.$2682()}
};isc.A.canvasDefaults={_constructor:"DynamicForm",width:"100%",numCols:1
};isc.B.push(isc.A.createCanvas=function isc_Base64ImageDataItem_createCanvas(_1,_2){var _3=isc.addProperties({},this.previewFieldDefaults,this.previewFieldProperties),_4=isc.addProperties({},this.imageFieldDefaults,this.imageFieldProperties,{name:this.imageFieldName||this.name,accept:this.accept,multiple:false
}),_5=!(isc.Browser.isIE&&isc.Browser.version<8),_6=this.showPreview&&_5,_7=_6?[_3,_4]:[_4];var _8=this.createAutoChild("canvas",{dataSource:this.dataSource||this.form.dataSource,fields:_7
});if(!_8.getDataSource()){this.logWarn("Without a DataSource, there is no fallback if the browser is unable to locally access a user-selected image file.")}
this.previewField=_6?_8.fields[0]:null;this.imageField=_8.fields[_8.fields.length-1];return _8}
,isc.A.setAccept=function isc_Base64ImageDataItem_setAccept(_1){this.accept=_1;var _2=this.getUploadItem();if(_2)_2.setProperty("accept",_1);if(!this.$2685(this.mimeType)){this.$2689(null,null)}
}
,isc.A.getPreviewItem=function isc_Base64ImageDataItem_getPreviewItem(){if(!this.canvas||this.canvas.destroyed||!this.previewField)return null;return this.canvas.getItem(this.previewField.name)}
,isc.A.getUploadItem=function isc_Base64ImageDataItem_getUploadItem(){if(!this.canvas||this.canvas.destroyed)return null;var _1=this.canvas.getItem(this.imageField.name);return _1.uploadItem}
,isc.A.showValue=function isc_Base64ImageDataItem_showValue(_1,_2,_3,_4){var _5=this.getPreviewItem();if(!_5)return;_5.setValue(_2)}
,isc.A.$2682=function isc_Base64ImageDataItem__scheduleAutoSelect(){if(this.$2683)isc.Timer.clear(this.$2683);this.$2683=this.delayCall("$2684",null,this.autoSelectTimeout)}
,isc.A.$2685=function isc_Base64ImageDataItem__acceptsMIMEType(_1){if(!_1)return false;if(_1=="image/png")return true;var _2=this.accept;if(!_2)return false;var _3=_1.indexOf("/");if(_3<=0){return false}
var _4=_1.substring(0,_3);if(new RegExp(",?\\s*"+RegExp.$2680(_4)+"/\\*\\s*,?").test(_2))return true;return new RegExp(",?\\s*"+RegExp.$2680(_1)+"\\s*,?").test(_2)}
,isc.A.$2684=function isc_Base64ImageDataItem__autoSelect(){delete this.$2683;var _1=this.getUploadItem();if(!_1)return;if(!window.FileReader||!window.Uint8Array||!window.btoa){this.$2686();return}
try{var _2=_1.getDataElement(),_3=_2.files[0],_4=_3.type;var _5=new window.FileReader;_5.onload=(function(){var _6=new window.Uint8Array(_5.result),_7=_6.length;if(_7>=8&&_6[0]==0x89&&_6[1]==0x50&&_6[2]==0x4e&&_6[3]==0x47&&_6[4]==0x0d&&_6[5]==0x0a&&_6[6]==0x1a&&_6[7]==0x0a)
{_4="image/png"}else if(_7>=4&&_6[0]==0xff&&_6[1]==0xd8&&_6[2]==0xff&&_6[_7-2]==0xff&&_6[_7-1]==0xd9)
{_4="image/jpeg"}else if(_4){_4=_4.trim()}
if(!_4){this.logError("No MIME type was inferred.");return}
if(!this.$2685(_4)){this.logError("This item does not accept MIME type '"+_4+"'.");return}
var _8="";for(var i=0;i<_7;++i){_8+=String.fromCharCode(_6[i])}
var _10=window.btoa(_8);this.setBase64Data(_4,_10)}).bind(this);_5.onerror=(function(){this.$2686()}).bind(this);_5.readAsArrayBuffer(_3)}catch(e){this.$2686()}
}
,isc.A.$2686=function isc_Base64ImageDataItem__autoSelectFallback(_1){if(!this.canvas||this.canvas.destroyed)return;this.logInfo("Unable to locally access the image file data. Falling back on image upload...");this.canvas.submit({target:this,methodName:"$2687"})}
,isc.A.$2687=function isc_Base64ImageDataItem__formSubmitCallback(_1,_2){if(!this.canvas||this.canvas.destroyed||!_2)return;var _3=this.canvas.getDataSource();if(!_3)return;var _4=new Image;_4.onload=(function(){this.$2688(_4)}).bind(this);_4.src=_3.getFileURL(_2);if(_4.complete)this.$2688(_4)}
,isc.A.$2688=function isc_Base64ImageDataItem__accessBase64Data(_1){if(_1.$149c)return;var _2=_1.naturalWidth,_3=_1.naturalHeight;if(!_2||!_3||!isc.DrawPane){this.$2689(null,null);return}
var _4=isc.DrawPane.create({top:-_3-100,width:_2,height:_3
});_4.addDrawItem(isc.DrawImage.create({src:_1.src,top:0,left:0,width:_2,height:_3
}),true);_4.getDataURL((function(_7){_4.destroy();if(!_7){this.$2689(null,null);return}
var _5="data:image/png;base64,";if(!_7.startsWith(_5)){this.logError("The data URL does not appear to be base64-encoded PNG: "+_7);return}
var _6=_7.substring(_5.length);this.$2689("image/png",_6)}).bind(this),"png");_1.$149c=true}
,isc.A.setBase64Data=function isc_Base64ImageDataItem_setBase64Data(_1,_2){if(!_1||!_2)return this.$2689(null,null);var _3=new Image;_3.onload=(function(){this.$269a(_3,_1,_2)}).bind(this);_3.src="data:"+_1+";base64,"+_2;if(_3.complete)this.$269a(_3,_1,_2)}
,isc.A.$269a=function isc_Base64ImageDataItem__handleImgLoaded(_1,_2,_3){if(_1.$149c)return;this.$102q(_2&&_3);var _4=_1.naturalWidth,_5=_1.naturalHeight;if(!_4||!_5){_2=null;_3=null}
this.$2689(_2,_3);_1.$149c=true}
,isc.A.$2689=function isc_Base64ImageDataItem__setValidatedBase64Data(_1,_2){this.mimeType=_1;this.storeValue(_2,true)}
);isc.B._maxIndex=isc.C+14;isc.defineClass("SavedSearchItem","SelectItem");isc.A=isc.SavedSearchItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.canAddSearch=false;isc.A.addSearchValue=null;isc.A.addSearchIcon="[SKINIMG]actions/add.png";isc.A.canModifyProperty=null;isc.A.editSearchIcon="[SKINIMG]/actions/edit.png";isc.A.editSearchIconSize=16;isc.A.editSearchHoverText="Save View Configuration";isc.A.canEditSearch=null;isc.A.canRemoveSearch=true;isc.A.canCopySearch=null;isc.A.targetComponent=null;isc.A.autoFetchDataOnRedrawn=true;isc.A.targetDataSource=null;isc.A.newRecordValues=null;isc.A.saveLastSearch=false;isc.A.saveDefaultSearch=true;isc.A.storedState=null;isc.A.savedSearchDS=null;isc.A.offlineStorageKey=null;isc.A.colSpan=1;isc.A.showTitle=false;isc.A.title="Views";isc.A.hint="Saved views...";isc.A.showHintInField=true;isc.A.pickListMaxWidth=500;isc.A.filterLocally=true;isc.B.push(isc.A.setTargetComponent=function isc_SavedSearchItem_setTargetComponent(_1){}
,isc.A.$239w=function isc_SavedSearchItem__initTargetComponent(_1,_2){if(!this.$239x)this.$239x={};if(isc.isA.String(_1)){var _3=_1;_1=this.form.getByLocalId(_3)||isc.Canvas.getById(_3);if(!_1){if(_2){this.logWarn("Unable to resolve targetComponent: "+_3)}
this.$267k=true;return}
delete this.$267k;if(this.targetComponent==_1)return;this.targetComponent=_1}
var _4=this.$239x.targetComponent;if(_4){if(_4==_1)return;this.logDebug("targetComponentChanged");isc.SavedSearches.suspendDefaultComponentFetch();if(_4.$241r){this.logDebug("removing autoFetchData deferral on previous targetComponent: "+_4.getID());isc.ss.restoreDefaultComponentFetch(_4,null,this.storedState,this.saveLastSearch)}
this.savedSearchDS=this.$239x.savedSearchDS;this.targetEditsCriteria=this.$239x.targetEditsCriteria;_4.stopSaveSearchesFromItem(this);this.$239x={}}
if(this.pickList){this.logDebug("destroying existing pickList");this.pickList.destroy();delete this.pickList}
if(_1==null)return;_1.startSaveSearchesFromItem(this);if(isc.isA.Canvas(_1)&&!_1.hasStableSavedSearchId()&&!_1.shouldUseTypeBasedSSId())
{this.logDebug("Can't target component "+_1.getID()+" right now because it has neither a savedSearchId nor a stable or local ID, and isn't a candidate for an auto-gen'd type-based SSID.  However, this item will track metadata (e.g. visibility) of extant DBCs and enable the target automatically once it can use an auto-gen'd type-based SSID");this.$267k=true;return}
delete this.$267k;this.$239x.savedSearchDS=this.savedSearchDS;if(this.savedSearchDS!=null){this.savedSearchDS=isc.DS.get(this.savedSearchDS)}
if(!this.savedSearchDS){if(this.offlineStorageKey!=null){this.savedSearchDS=isc.ss.getLocalDataSource(this.offlineStorageKey)}else{this.savedSearchDS=isc.ss.getSavedSearchDataSource(this.targetComponent)}
}
this.$239x.targetEditsCriteria=this.targetEditsCriteria;if(this.targetEditsCriteria===null){this.targetEditsCriteria=this.getTargetEditsCriteria()}
if(this.canEditSearch==null){this.canEditSearch=!this.targetEditsCriteria}
if(this.canCopySearch==null){this.canCopySearch=!this.targetEditsCriteria}
this.logDebug("tracking new targetComponent: "+_1.getLocalId());this.targetComponent=this.$239x.targetComponent=_1;this.projectId=this.form.getProjectId();this.screenId=this.form.getScreenId();if(!isc.isA.DataBoundComponent(this.targetComponent))return;isc.ss.suspendDefaultComponentFetch(_1)}
,isc.A.getSavedSearchId=function isc_SavedSearchItem_getSavedSearchId(){return isc.isA.Canvas(this.targetComponent)?isc.ss.getSavedSearchId(this.targetComponent)
:this.savedSearchId}
,isc.A.init=function isc_SavedSearchItem_init(){{this.delayCall("logWarn",["SavedSearchItem requires SmartClient Pro or better. See https://www.smartclient.com/product/ to find the edition right for you."],0)}
return this.Super("init",arguments)}
);isc.B._maxIndex=isc.C+4;isc.SavedSearchItem.registerStringMethods({searchChanged:"newCriteria,searchData"});isc.defineClass("SavedSearchForm","DynamicForm");isc.A=isc.SavedSearchForm.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.numCols=1;isc.A.height=1;isc.A.overflow="visible";isc.A.savedSearchItemConstructor="SavedSearchItem";isc.A.savedSearchItemDefaults={width:"*",searchChanged:function(_1,_2){if(this.form.searchChanged!=null)return this.form.searchChanged(_1,_2);return true}
};isc.A.ssiPassThroughs=["canAddSearch","addSearchValue","addSearchIcon","targetEditsCriteria","canModifyProperty","editSearchHoverText","removeSearchHoverText","copySearchHoverText","markAsDefaultHoverText","canEditSearch","canRemoveSearch","canCopySearch","targetComponent","targetDataSource","confirmRemoval","confirmRemovalMessage","adminRole","newRecordValues","saveLastSearch","saveDefaultSearch","storedState","offlineStorageKey","title","hint"
];isc.B.push(isc.A.initWidget=function isc_SavedSearchForm_initWidget(){var _1={editorType:this.savedSearchItemConstructor};var _2;for(var i=0;i<this.ssiPassThroughs.length;i++){var _4=this.ssiPassThroughs[i];if(this[_4]!==_2)_1[_4]=this[_4]}
isc.addProperties(_1,this.savedSearchItemDefaults,this.savedSearchItemProperties,{name:"savedSearchItem"}
);this.setItems([_1]);return this.Super("initWidget",arguments)}
,isc.A.getSavedSearchItem=function isc_SavedSearchForm_getSavedSearchItem(){return this.getItem("savedSearchItem")}
,isc.A.setTargetComponent=function isc_SavedSearchForm_setTargetComponent(_1){this.getSavedSearchItem().setTargetComponent(_1)}
);isc.B._maxIndex=isc.C+3;isc.SavedSearchForm.registerStringMethods({searchChanged:"newCriteria,searchData"});isc.defineClass("SavedSearchEditor","VLayout");isc.A=isc.SavedSearchEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.width="100%";isc.A.height="100%";isc.A.layoutMargin=10;isc.A.membersMargin=10;isc.A.mode="normal";isc.A.sharedSearchCheckboxDefaults={editorType:"CheckboxItem",shouldSaveValue:false,name:"$245m",changed:function(_1,_2,_3){var _4=_1.getItem("$245n");if(!_4)return;if(_3)_4.show();else{_4.clearValue();_4.hide()}
}};isc.A.sharedSearchTitle="Shared view (all users will see it)";isc.A.defaultSearchCheckboxDefaults={editorType:"CheckboxItem",shouldSaveValue:false,name:"$245n"};isc.A.defaultSearchTitle="Mark as default";isc.A.promptLabelDefaults={_constructor:"Label",height:1,autoDraw:false};isc.A.addSearchText="Enter a name for your Saved View, then enter criteria below.";isc.A.gridAddSearchText="Enter a name for your Saved View. The current configuration and filter criteria of the grid will be saved.";isc.A.reifyGridAddSearchText="Save the current grid view as a default view, visible to all users.<P>Enter a name for the search.";isc.A.editSearchText="Enter a new name for your Saved View, and edit criteria below.";isc.A.searchNameItemDefaults={editorType:"TextItem",showTitle:false,validators:[{type:"required"}
]};isc.A.filterBuilderDefaults={autoParent:"none",_constructor:"FilterBuilder",overflow:"visible",height:"*",topOperatorAppearance:"radio",showModeSwitcher:true};isc.A.cancelButtonDefaults={_constructor:"IButton",title:"Cancel",layoutAlign:"center",click:function(){this.creator.cancelButtonClicked()}};isc.A.formDefaults={_constructor:"DynamicForm",height:1,width:"*",titleOrientation:"top",autoDraw:false,autoFocus:true,linearOnMobile:true};isc.B.push(isc.A.showReifyUI=function isc_SavedSearchEditor_showReifyUI(){var _1=this.targetComponent;if(this.mode=="grid"&&_1&&_1.editingOn&&_1.editContext.isReify){return true
}
return false}
,isc.A.isAdminSearch=function isc_SavedSearchEditor_isAdminSearch(_1){var _2=this;if(!isc.ss.canCreateAdminSavedSearches(_2)){return false}
var _3=isc.ss.getSavedSearchDataSource(_2),_4=isc.ss.$2434(_2);return _3.recordMatchesFilter(_1,_4)}
,isc.A.getPromptLabelContents=function isc_SavedSearchEditor_getPromptLabelContents(_1){if(this.showReifyUI()){var _2=this.targetComponent;var _3=_2&&_2.getScreenId();if(_3!=null){return this.reifyGridAddSearchText}
}
return(this.mode=="grid"?this.gridAddSearchText:this.operation=="add"?this.addSearchText:this.editSearchText)}
,isc.A.cancelButtonClicked=function isc_SavedSearchEditor_cancelButtonClicked(){}
);isc.B._maxIndex=isc.C+4;isc.defineClass("EditSearchWindow","Window");isc.A=isc.EditSearchWindow.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.isModal=true;isc.A.width="65%";isc.A.minWidth=800;isc.A.maxWidth=1150;isc.A.canDragResize=true;isc.A.canDragReposition=true;isc.A.vertical=true;isc.A.autoCenter=true;isc.A.autoSize=true;isc.A.showMinimizeButton=false;isc.A.title="Save View Configuration";isc.A.savedSearchEditorDefaults={_constructor:"SavedSearchEditor",autoDraw:false};isc.B.push(isc.A.editComplete=function isc_EditSearchWindow_editComplete(_1){}
,isc.A.close=function isc_EditSearchWindow_close(){this.destroy()}
);isc.B._maxIndex=isc.C+2;isc.defineClass("DataPathItem","TextItem");isc.A=isc.DataPathItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.operationsTreeDefaults={_constructor:"TTreeGrid",autoDraw:false,recordDoubleClick:function(){this.creator.operationSelected()},getIcon:function(_1){var _2=this.creator.form.creator,_3=(_2&&_2.getServiceElementIcon)?_2.getServiceElementIcon(_1):null
;if(_3)return _3;return this.Super("getIcon",arguments)}
};isc.A.operationsTreeSelectButtonDefaults={_constructor:"TButton",autoDraw:false,title:"Select",click:function(){if(this.creator.operationsTree.anySelected())
this.creator.operationSelected()}
};isc.A.defaultIcons=[{src:"[SKINIMG]/actions/edit.png",click:"item.showOperationsTreeData()",width:16,height:16
},{src:"[SKINIMG]/actions/remove.png",click:"item.clearFormValues()",width:16,height:16
}
];isc.A.baseManagedProperties=["dataPath","schemaDataSource","serviceName","serviceNamespace"
];isc.B.push(isc.A.getPropertyName=function isc_DataPathItem_getPropertyName(_1){if(this.isInput)
return"input"+_1.substring(0,1).toUpperCase()+_1.substring(1);else return _1}
,isc.A.initManagedProperties=function isc_DataPathItem_initManagedProperties(){this.managedProperties=[];var _1=this.baseManagedProperties;for(var i=0;i<_1.length;i++){this.managedProperties.add(this.getPropertyName(_1[i]))}
}
,isc.A.keyPress=function isc_DataPathItem_keyPress(_1,_2,_3){if(_3!="Arrow_Left"&&_3!="Arrow_Right"&&_3!="Home"&&_3!="End")return false;this.Super("keyPress",arguments)}
,isc.A.init=function isc_DataPathItem_init(){this.icons=isc.clone(this.defaultIcons);this.initManagedProperties();this.Super("init",arguments);if(this.operationsTreeData){this.addAutoChildren(["operationsTree","operationsTreeSelectButton"])}
}
,isc.A.showOperationsTreeData=function isc_DataPathItem_showOperationsTreeData(){if(!this.operationsTreeData)return;if(!this.operationsTree)
this.addAutoChildren(["operationsTree","operationsTreeSelectButton"]);var _1;if(isc.isA.Tree(this.operationsTreeData)){_1=this.operationsTreeData}else{_1=isc.Tree.create({modelType:"children",root:{children:this.operationsTreeData},nameProperty:"name",childrenProperty:"children"
});_1.openAll()}
this.operationsTree.setData(_1);var _2=this.isInput?"formInputs":"formOutputs";var _3=_2+"/"+this.getValue(),_4=_1.find(_3)
;if(_4)this.operationsTree.selectRecord(_4);if(!this.schemaDialog){this.schemaDialog=isc.TWindow.create({title:"Select element from message",autoCenter:true,height:"90%",width:"60%",isModal:true,showModalMask:true,items:[isc.VLayout.create({width:"100%",height:"100%",members:[this.operationsTree,this.operationsTreeSelectButton]
})
]
})}else this.schemaDialog.show()}
,isc.A.operationSelected=function isc_DataPathItem_operationSelected(){var _1=this.operationsTree,_2=_1.data,_3=_1.getSelectedRecord()
;this.schemaDialog.hide();this.setDataPathProperties(_3)}
,isc.A.setDataPathProperties=function isc_DataPathItem_setDataPathProperties(_1){var _2=_1.defaults;this.dataPathProps=isc.applyMask(_2,this.managedProperties);if(this.logIsInfoEnabled()){this.logInfo("setDPProps, editNode: "+this.echoAll(_1)+" defaults: "+this.echo(_2)+", managedProps: "+this.managedProperties+", props: "+this.echo(this.dataPathProps))}
this.saveFormValues()}
,isc.A.saveFormValues=function isc_DataPathItem_saveFormValues(){for(var i=0;i<this.managedProperties.length;i++){var _2=this.managedProperties[i],_3=this.dataPathProps[_2];this.form.setValue(_2,_3)}
if(this.form.saveProperties){this.form.saveProperties(this.dataPathProps,this.form.currentComponent)}
}
,isc.A.clearFormValues=function isc_DataPathItem_clearFormValues(){for(var i=0;i<this.managedProperties.length;i++){this.form.setValue(this.managedProperties[i],null)}
if(this.form.saveProperties){this.form.saveProperties(this.dataPathProps,this.form.currentComponent)}
}
);isc.B._maxIndex=isc.C+9;isc.ClassFactory.defineClass("MeasureItem","TextItem");isc.A=isc.MeasureItem.getPrototype();isc.A.changeOnKeypress=false;isc.A.redrawOnChange=true;isc.A.canTabToIcons=false;isc.A=isc.MeasureItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.$o9="%";isc.B.push(isc.A.init=function isc_MeasureItem_init(){this.Super("init",arguments);if(this.type=="measure"){this.supportPercentAndExpand=true}
this.addMeasureValidator()}
,isc.A.addMeasureValidator=function isc_MeasureItem_addMeasureValidator(){var _1=this.getMeasureValidator();if(!_1)return;if(this.validators==null)this.validators=[];else if(!isc.isAn.Array(this.validators))this.validators=[this.validators];if(this.validators.$69){this.validators=this.validators.duplicate()}
this.validators.addAt(_1,0)}
,isc.A.getMeasureValidator=function isc_MeasureItem_getMeasureValidator(){var _1;if(this.type!="measure"){_1={type:"custom",defaultErrorMessage:"A relative size is not supported for this property",condition:function(_3,_1,_4,_5,_6){if(_4!=null&&isc.isA.String(_4)){_4=_4.replaceAll("\"","").trim();if(_4=="*"||_4.endsWith("%")){return false}
var _2=parseInt(_4);if(!isNaN(_2)){_4=_2}
_1.resultingValue=_4}
return true}
}}
return _1}
,isc.A.drawing=function isc_MeasureItem_drawing(_1){this.setIcons();this.Super("drawing",arguments)}
,isc.A.redrawing=function isc_MeasureItem_redrawing(){this.setIcons();this.Super("redrawing",arguments)}
,isc.A.mapValueToDisplay=function isc_MeasureItem_mapValueToDisplay(_1,_2,_3){return(this.supportPercentAndExpand?this.getUserValue(this.name):(_1||""))}
,isc.A.storeValue=function isc_MeasureItem_storeValue(_1){if(_1!=null&&isc.isA.String(_1)){_1=_1.replaceAll("\"","").trim();if(!this.supportPercentAndExpand&&(_1=="*"||isc.endsWith(_1,this.$o9))){}else if(!this.supportPercentAndExpand||!isc.endsWith(_1,this.$o9)){var _2=parseInt(_1);if(!isNaN(_2)){_1=_2}
}
}
return this.Super("storeValue",[_1])}
,isc.A.setIcons=function isc_MeasureItem_setIcons(){if(this.supportPercentAndExpand){var _1=this.getUserValue(this.name),_2=this.getDerivedValue(this.name)
;this.icons=this.getDerivedValueIcons(_2,_1);this.$14v()}
}
,isc.A.getLiveComponent=function isc_MeasureItem_getLiveComponent(){return(this.form&&this.form.currentComponent?this.form.currentComponent.liveObject:null)}
,isc.A.getUserValue=function isc_MeasureItem_getUserValue(_1){var _2=this.getLiveComponent(),_3=(_2?_2.editNode:null),_4=(_3?_3.defaults:{}),_5=_4[_1]
;return _5||""}
,isc.A.getDerivedValue=function isc_MeasureItem_getDerivedValue(_1){var _2=this.getLiveComponent(),_3=(_2&&_2.getProperty?_2.getProperty(_1):this.getValue())
;if(_3=="undefined")_3=null;return _3}
,isc.A.isPercent=function isc_MeasureItem_isPercent(_1){if(_1!=null&&isc.isA.String(_1))_1=_1.replaceAll("\"","");return(isc.isA.String(_1)&&_1.length>0&&"%"==_1.substring(_1.length-1,_1.length))}
,isc.A.isExpand=function isc_MeasureItem_isExpand(_1){if(_1!=null&&isc.isA.String(_1))_1=_1.replaceAll("\"","");return("*"==_1)}
,isc.A.getDerivedValueIcons=function isc_MeasureItem_getDerivedValueIcons(_1,_2){if(_1==null||_2==null)return null;var _3=(_2!=""?"Current value based on configured value of '"+_2+"'":"[no specified value]");var _4={name:"derivedValue",text:_1,width:32,inline:true,inlineIconAlign:"right",baseStyle:"measureItemCurrentValue",neverDisable:true,showFocused:false,showOver:false,prompt:_3
};return[_4]}
);isc.B._maxIndex=isc.C+14;isc.ClassFactory.defineClass("FormFieldMeasureItem","MeasureItem");isc.A=isc.FormFieldMeasureItem.getPrototype();isc.A.keyPressFilter="[0-9\*]";isc.ClassFactory.defineClass("EditorTypeItem","SelectItem");isc.A=isc.EditorTypeItem;isc.A.$2068={"text":[{title:"Text",className:"TextItem"},{title:"Text Area",className:"TextAreaItem"}
],"integer":[{title:"Integer",className:"IntegerItem"},{title:"Slider",className:"SliderItem"},{title:"Spinner",className:"SpinnerItem"}
],"float":[{title:"Float",className:"FloatItem"},{title:"Slider",className:"SliderItem"},{title:"Spinner",className:"SpinnerItem"}
],"date":[{title:"Date",className:"DateItem"},{title:"Relative Date",className:"RelativeDateItem"}
],"time":[{title:"Date",className:"DateItem"},{title:"Relative Date",className:"RelativeDateItem"}
],"valueMap":[{title:"Select",className:"SelectItem"},{title:"Radio Buttons",className:"RadioGroupItem"},{title:"Combo Box",className:"ComboBoxItem"},{title:"Multi Combo Box",className:"MultiComboBoxItem"}
],"enum":[{title:"Select",className:"SelectItem"},{title:"Combo Box",className:"ComboBoxItem"},{title:"Multi Combo Box",className:"MultiComboBoxItem"}
]
};isc.A=isc.EditorTypeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.width="*";isc.A.displayField="title";isc.A.valueField="className";isc.A.emptyPickListMessage="No alternate editors";isc.B.push(isc.A.setValue=function isc_EditorTypeItem_setValue(_1){this.assignDataSource();var _2=this.isDataBound(),_3=false,_4=(!_2?"Editor type is changed by dragging a new component into place":null)
;if(_2){_3=(this.optionDataSource.getCacheData().length>0);_4="No other editors are available for the current data type"}
this.setDisabled(!_3);this.setPrompt(_4);return this.Super("setValue",arguments)}
,isc.A.destroy=function isc_EditorTypeItem_destroy(){if(this.optionDataSource){this.optionDataSource.destroy();this.optionDataSource=null}
this.Super("destroy",arguments)}
,isc.A.getLiveComponent=function isc_EditorTypeItem_getLiveComponent(){return(this.form&&this.form.currentComponent?this.form.currentComponent.liveObject:null)}
,isc.A.getLiveComponentType=function isc_EditorTypeItem_getLiveComponentType(){var _1=this.getLiveComponent(),_2=_1.type
;if(_1.form){var _3=_1.form,_4=_3.getDataSource()
;if(_4){var _5=_4.getField(_1.name);if(_5){_2=_5.type}
}
}
var _6=(_1.getOptionDataSource?_1.getOptionDataSource():_1.optionDataSource);if(_1.valueMap&&!_6){_2="valueMap"}else if(_1.valueMap||_6){_2="enum"}
return _2}
,isc.A.isDataBound=function isc_EditorTypeItem_isDataBound(){var _1=this.getLiveComponent(),_2=(_1&&_1.form?_1.form.getDataSource():null)
;return(_2!=null)}
,isc.A.assignDataSource=function isc_EditorTypeItem_assignDataSource(){if(!this.optionDataSource){var _1=this.ID+"$2069";this.optionDataSource=isc.DataSource.create({ID:_1,clientOnly:true,fields:[{name:"title",type:"string"},{name:"className",type:"string"}
]
})}
var _2=this.getLiveComponentType();this.optionDataSource.setCacheData([]);if(_2){var _3=isc.EditorTypeItem.$2068[_2];if(_3){var _4=[{title:"Available editors for data type \""+_2+"\"",enabled:false}
];_4.addList(_3);this.optionDataSource.setCacheData(_4)}
}
}
);isc.B._maxIndex=isc.C+6;if(isc.ListGrid){isc.defineClass("RelativeDateItem","CanvasItem");isc.A=isc.RelativeDateItem;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getAbsoluteDate=function isc_c_RelativeDateItem_getAbsoluteDate(_1,_2,_3,_4){var _5=false;if(isc.SimpleType.inheritsFrom(_3,"date"))
{_5=true}
var _6=isc.DateUtil.getAbsoluteDate(_1,_2,_4,_5);return _6}
,isc.A.getPeriodName=function isc_c_RelativeDateItem_getPeriodName(_1){return isc.DateUtil.getTimeUnitName(_1)}
,isc.A.getPeriodKey=function isc_c_RelativeDateItem_getPeriodKey(_1){return isc.DateUtil.getTimeUnitKey(_1)}
,isc.A.parseRelativeDateString=function isc_c_RelativeDateItem_parseRelativeDateString(_1){return isc.DateUtil.parseRelativeDateString(_1)}
,isc.A.isRelativeDate=function isc_c_RelativeDateItem_isRelativeDate(_1){return isc.DateUtil.isRelativeDate(_1)}
);isc.B._maxIndex=isc.C+5;isc.A=isc.RelativeDateItem.getPrototype();isc.A.height=20;isc.A.cellHeight=20;isc.A.canFocus=true;isc.A.timeUnitOptions=["day","week","month"];isc.A.showPastOptions=true;isc.A.showFutureOptions=true;isc.A.allowAbsoluteDates=true;isc.A.rangeRoundingGranularity={"year":"day","month":"day","week":"day","day":"day","hour":"minute","minute":"second","second":"second"
};isc.A.millisecondsAgoTitle="N milliseconds ago";isc.A.secondsAgoTitle="N seconds ago";isc.A.minutesAgoTitle="N minutes ago";isc.A.hoursAgoTitle="N hours ago";isc.A.daysAgoTitle="N days ago";isc.A.weeksAgoTitle="N weeks ago";isc.A.monthsAgoTitle="N months ago";isc.A.quartersAgoTitle="N quarters ago";isc.A.yearsAgoTitle="N years ago";isc.A.millisecondsFromNowTitle="N milliseconds from now";isc.A.secondsFromNowTitle="N seconds from now";isc.A.minutesFromNowTitle="N minutes from now";isc.A.hoursFromNowTitle="N hours from now";isc.A.daysFromNowTitle="N days from now";isc.A.weeksFromNowTitle="N weeks from now";isc.A.monthsFromNowTitle="N months from now";isc.A.quartersFromNowTitle="N quarters from now";isc.A.yearsFromNowTitle="N years from now";isc.A.defaultValue={_constructor:"RelativeDate",value:"$today"
};isc.A.operator="greaterThan";isc.A.presetOptions={"$today":"Today","$yesterday":"Yesterday","$tomorrow":"Tomorrow","$weekAgo":"Current day of last week","$weekFromNow":"Current day of next week","$monthAgo":"Current day of last month","$monthFromNow":"Current day of next month"
};isc.A.saveOnEnter=true;isc.A.$146c=130;isc.A.valueFieldDefaults={editorType:"ComboBoxItem",showTitle:false,shouldSaveValue:false,validateOnChange:false,width:"100%",getInnerWidth:function(_1){var _2=this.Super("getInnerWidth",arguments);var _3=this.form.canvasItem;if(_3==null||this.$11e()||!_3.$142()||!isc.isA.Number(_2)){return Math.max(0,_2)}
return Math.max(0,_2-_3.$141())},keyPress:function(_1,_2,_3,_4){if(_3=="Enter"){var _5=_2.canvasItem;if(_5&&_5.form)
_5.form.handleKeyPress(isc.EH.lastEvent)}
},pickValue:function(){this.form.canvasItem.setBaseDate();this.Super("pickValue",arguments)},hasErrors:function(){var _1=this.form.canvasItem;if(_1)return _1.hasErrors();return this.Super("hasErrors",arguments)}
};isc.A.defaultQuantity=1;isc.A.minQuantity=0;isc.A.maxQuantity=999999;isc.A.quantityFieldWidth=50;isc.A.quantityFieldDefaults={editorType:"SpinnerItem",min:0,step:1,showTitle:false,shouldSaveValue:false,selectOnFocus:true,$184a:function(_1,_2,_3){_1.updateValue();var _4=_2.canvasItem;if(_4&&_4.form){_4.updateValue();if(_3)_4.form.handleKeyPress(isc.EH.lastEvent)}
},blur:function(_1,_2){_2.$184a(_2,_1)},keyPress:function(_1,_2,_3,_4){if(_3=="Enter"){_1.$184a(_1,_2,true)}
},hasErrors:function(){var _1=this.form.canvasItem;if(_1)return _1.hasErrors();return this.Super("hasErrors",arguments)}
};isc.A.showChooserIcon=true;isc.A.pickerIconDefaults={name:"chooserIcon",showOver:false,showFocused:false,showFocusedWithItem:false,neverDisable:true
};isc.A.pickerIconSrc="[SKIN]/DynamicForm/DatePicker_icon.gif";isc.A.pickerIconWidth=16;isc.A.pickerIconHeight=16;isc.A.iconVAlign="center";isc.A.pickerIconPrompt="Show Date Chooser";isc.A.pickerConstructor="DateChooser";isc.A.showCalculatedDateField=true;isc.A.invalidCalculatedDatePrompt="";isc.A.calculatedDateFieldDefaults={editorType:"BlurbItem",border:"1px solid black;",width:"*",setValue:function(_1){if(_1==null||_1==""){_1=this.defaultValue}
var _2=this.Super("setValue",arguments);this.checkDateRangeValidator();return _2},formatValue:function(_1){if(!_1||_1=="")return"";return"("+_1+")"},startRow:isc.Browser.isHandset?true:false,showTitle:false,shouldSaveValue:false
};isc.A.startDate=null;isc.A.endDate=null;isc.A.centuryThreshold=isc.DateItem.DEFAULT_CENTURY_THRESHOLD;isc.A.shouldSaveValue=true;isc.A.editCriteriaInInnerForm=false;isc.A.editorConstructor="DynamicForm";isc.A.editorDefaults={numCols:4,cellPadding:0,colWidths:["*",50,22,"*"],itemChanged:function(_1,_2){this.creator.updateValue()},itemKeyPress:function(_1,_2,_3){var _1=this.canvasItem;if(_1&&_1.form){return _1.$18d(_1,_1.form,_2,_3)}
}
};isc.A.useSharedPicker=false;isc.A.pickerDefaults={closeOnEscapeKeypress:true,showCancelButton:true,autoHide:true
};isc.A.showChooserFiscalYearPicker=false;isc.A.showChooserWeekPicker=false;isc.A=isc.RelativeDateItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.autoDestroy=true;isc.A.$113r=null;isc.A.showPickerTimeItem=true;isc.A.defaultType="datetime";isc.A.use24HourTime=true;isc.A.generateValidator=true;isc.B.push(isc.A.init=function isc_RelativeDateItem_init(){this.$2337=true;this.validators=this.validators||[];var _1=this.validators.find("type","isDate");if(_1)this.validators.remove(_1);this.validators.add({type:"isDateOrRelativeDate"});this.checkDateRangeValidator();this.$67h();this.Super("init",arguments);delete this.$2337}
,isc.A.$67h=function isc_RelativeDateItem__createEditor(){var _1;var _2={$76z:true};this.addAutoChild("editor",_2);this.canvas=this.editor;var _3=this,_4=[],_5=2
;if(this.valueFieldWidth==null){var _6=isc.DateTimeItem.getInstanceProperty("width"),_7=isc.ComboBoxItem.getInstanceProperty("pickerIconWidth")
;_6=Math.max(this.$146c,_6+_7);this.valueFieldWidth=_6}
var _8=(this.valueFieldProperties&&this.valueFieldProperties.editorType)
||this.valueFieldDefaults.editorType;if(this.allowAbsoluteDates==false){this.showChooserIcon=false;_8="SelectItem"}
_4[0]=isc.addProperties({},this.valueFieldDefaults,this.valueFieldProperties,{valueMap:this.getValueFieldOptions()
},{name:"valueField",editorType:_8,showPending:this.showPending,showErrorStyle:this.showErrorStyle}
);_4[1]=isc.addProperties({},this.quantityFieldDefaults,this.quantityFieldProperties,{defaultValue:this.defaultQuantity,min:this.minQuantity,max:this.maxQuantity,width:((isc.Browser.isHandset)?2:1)*this.quantityFieldWidth,minWidth:((isc.Browser.isHandset)?2:1)*this.quantityFieldWidth
},{name:"quantityField",showPending:this.showPending,showErrorStyle:this.showErrorStyle}
);if(this.showChooserIcon){_5=3;_4[2]={name:"iconPlaceholder",type:"staticText",width:1,showTitle:false,showErrorStyle:this.showErrorStyle,showErrorPickerIcon:this.showErrorPickerIcon,canFocus:true,$872:function(){return false},focusInItem:function(){this.focusInIcon(this.icons[0])},$11s:function(_13){return false},getIconHTML:function(_10){if(this.$68y()||(this.getCanEdit()==false&&this.renderAsStatic())){return null}
return this.Super("getIconHTML",arguments)},iconVAlign:"center",icons:[isc.addProperties(this.pickerIconDefaults,this.pickerIconProperties,{click:function(){if(!_3.isReadOnly()){_3.showPicker()}
},prompt:this.pickerIconPrompt,width:this.pickerIconWidth,height:this.pickerIconHeight
}
)
],hasErrors:function(){var _9=this.form.canvasItem;if(_9)return _9.hasErrors();return this.Super("hasErrors",arguments)}
};var _10=_4[2].icons[0];if(!_10.src)_10.src=this.pickerIconSrc;if(!_10.baseStyle)_10.baseStyle=this.pickerIconStyle;if(_10.showError==null)_10.showError=this.showErrorPickerIcon}
var _11=this.getType(),_12=false;if(isc.SimpleType.inheritsFrom(_11,"date"))
{_12=this.isLogicalDate=true}
this.setBaseDate();if(this.showCalculatedDateField){_4[_5]=isc.addProperties({},this.calculatedDateFieldDefaults,this.calculatedDateFieldProperties,{cellStyle:this.getHintStyle(),textBoxStyle:this.getHintStyle(),defaultValue:this.invalidCalculatedDatePrompt},{name:"calculatedDateField"}
);if(this.getHintPlacement()=="below"){_4[_5].startRow=true;_4[_5].colSpan="*";_4[_5].height=this.hintHeight}
}
this.canvas.setFields(_4);this.valueField=this.canvas.getField("valueField");this.quantityField=this.canvas.getField("quantityField");if(this.showCalculatedDateField)
this.calculatedDateField=this.canvas.getField("calculatedDateField");if(this.showChooserIcon){this.iconPlaceholder=this.canvas.getField("iconPlaceholder");this.pickerIcon=this.iconPlaceholder.icons.find("name","chooserIcon")}
this.setValue(this.value||(this.form&&this.form.getValues()[this.name])||this.defaultValue)}
,isc.A.getBaseDate=function isc_RelativeDateItem_getBaseDate(){return this.baseDate}
,isc.A.setBaseDate=function isc_RelativeDateItem_setBaseDate(_1){this.baseDate=_1||(this.isLogicalDate?isc.DateUtil.createLogicalDate():new Date())}
,isc.A.updateEditor=function isc_RelativeDateItem_updateEditor(){if(!this.valueField||!this.quantityField)return;var _1,_2,_3=false;if(this.valueField.hasFocus){_1=this.valueField;_2=this.valueField.getSelectionRange()}else if(this.quantityField.hasFocus){_1=this.quantityField;_2=this.quantityField.getSelectionRange()}
var _4=this.valueField.getValue(),_5=this.quantityField.getValue();var _6=(_4&&isc.isA.String(_4)&&this.relativePresets[_4]);if(!_6){_3=true;this.editor.colWidths=[this.valueFieldWidth,22,"*","*"];this.quantityField.hide()}else{_3=true;this.editor.colWidths=[this.valueFieldWidth,this.quantityFieldWidth,22,"*"];this.quantityField.show()}
if(this.calculatedDateField){var _4=this.getAbsoluteDate();var _7=this.calculatedDateField.getValue();var _8=!_4?"":""+this.formatDate(_4)+"";if(_7!=_8){_3=true;this.calculatedDateField.setValue(_8)}
}
if(_3&&_1!=null){if(!_6&&_1==this.quantityField){this.valueField.focusInItem()}
}
if(this.$161p())this.$1609()}
,isc.A.$1607=function isc_RelativeDateItem__pendingStatusChanged(_1){this.$1609()}
,isc.A.$1609=function isc_RelativeDateItem__updatePendingStatuses(){var _1=this.$161p()&&this.pendingStatus&&this.valueHasChanged();if(this.valueField){this.valueField.setFixedPendingStatus(_1);this.valueField.updateState()}
if(this.quantityField){this.quantityField.setFixedPendingStatus(_1);this.quantityField.updateState()}
}
,isc.A.getValueFieldOptions=function isc_RelativeDateItem_getValueFieldOptions(_1){if(_1&&this.$113r)return this.$113r;var _2=isc.addProperties({},this.presetOptions);this.relativePresets={};for(var i=0;i<this.timeUnitOptions.length;i++){var _4=this.timeUnitOptions[i];if(this.showPastOptions){_2[_4+"_ago"]=this[_4+"sAgoTitle"];this.relativePresets[_4+"_ago"]=true}
if(this.showFutureOptions){_2[_4+"_fromNow"]=this[_4+"sFromNowTitle"];this.relativePresets[_4+"_fromNow"]=true}
}
this.$113r=_2;return _2}
,isc.A.setValue=function isc_RelativeDateItem_setValue(_1,_2){this.$2081=true;this.$17g=true;if(!this.valueField)return this.Super("setValue",arguments);if(_1==null&&!_2){var _3=this.getDefaultValue();if(_3!=null){_1=_3;if(this._value==_3)this._value=null}
}
if(isc.isA.Date(_1)&&_1.$84l!=null&&this.compareValues(this.$84m,_1.$84l))
{if(_1.getTime()==_1.$84n){_1=_1.$84l}
}
var _4=false;if(_1){if(isc.DateUtil.isRelativeDateShortcut(_1)){if(!this.valueField.valueMap[_1]){_1=isc.DateUtil.mapRelativeDateShortcut(_1)}
}else{var _5=_1&&isc.DateUtil.mapToRelativeDateShortcut(_1);if(_5&&_5!=_1&&this.valueField.valueMap[_5]){if(this.allowMapValueToShortcut)_1=_5}
}
}
this.setBaseDate();if(_1==null){this.valueField.setValue(null)}else if(isc.isA.Date(_1)||this.valueField.valueMap[_1]||(_1.value&&this.valueField.valueMap[_1.value]))
{var _6=isc.isA.Date(_1);_4=!_6;this.valueField.setValue(_6?this.formatDate(_1):_1.value?_1.value:_1)}else if(this.timeUnitOptions.contains(_1)){_4=true;_1+="_fromNow";this.valueField.setValue(_1)}else if(isc.isA.String(_1)&&isc.isA.Date(this.parseDate(_1,this.getInputFormat()))){_1=this.parseDate(_1,this.getInputFormat());this.valueField.setValue(this.formatDate(_1))}else{var _7,_4=isc.RelativeDateItem.isRelativeDate(_1);if(_4||isc.isA.String(_1)){_7=isc.RelativeDateItem.getAbsoluteDate(_1,this.getBaseDate(),this.getType(),this.rangePosition)}
if(!isc.isA.Date(_7)){_4=false;this.valueField.setValue(null)}else{var _8=_4?_1.value:_1;_8=isc.DateUtil.mapRelativeDateShortcut(_8,this.rangePosition);var _9,_10,_11=isc.RelativeDateItem.parseRelativeDateString(_8),_12=isc.RelativeDateItem.getPeriodName(_11.period),_13=(_11.direction=="+"?"fromNow":"ago")
;_10=_11?_11.countValue:null;_9=_12&&_11.period==_11.period.toLowerCase()?_12.toLowerCase()+"_"+_13:null;if(_11.qualifier){if(/^[+-]0[A-Z]+$/.test(_11.qualifier)){if(_1.rangePosition==null&&this.allowAbsoluteDates==false){_1.rangePosition=(_11.qualifier.charAt(0)=="-"?"start":"end")}
if(_1.rangePosition)_11.qualifier=null}
}
if(!_11.qualifier&&_9&&this.valueField.valueMap[_9]){this.valueField.setValue(_9);this.quantityField.setValue(_10);_4=true}else{_4=false;if(this.allowAbsoluteDates==false){this.logWarn("setValue() passed an invalid RelativeDate value: "+_8+".  This value cannot be represented in a RelativeDateItem "+(_11.qualifier?"(qualifiers, like "+_11.qualifier+", are invalid) "
:"")+"and cannot be converted to an absoluteDate because allowAbsoluteDates is set to false.  The item's value will be cleared.");_1=null}else{this.valueField.setValue(this.formatDate(_7));_1=_7}
}
}
}
if(_4){this.$84m=this.getDataValue();_1=this.$84m}else{this.$84m=null}
if(this.$2337)this.saveValue(_1);else this.storeValue(_1);this.updateEditor();this.$1609();this.$2081=false}
,isc.A.$84o=function isc_RelativeDateItem__convertToAbsoluteDate(_1){var _2=_1.value?_1.value:_1;var _3=isc.DateUtil.getDefaultRangePosition(_2)||this.rangePosition;var _4=isc.RelativeDateItem.getAbsoluteDate(_2,this.getBaseDate(),this.getType(),_3);if(isc.isA.Date(_4)){_4.$84l=_1;_4.$84n=_4.getTime()}
return _4}
,isc.A.getAbsoluteDate=function isc_RelativeDateItem_getAbsoluteDate(){return this.getDataValue(true)}
,isc.A.getRelativeDate=function isc_RelativeDateItem_getRelativeDate(){var _1=this.valueField.getValue(),_2=this.quantityField.getValue()
;if(!_1||!isc.isA.String(_1))return null;var _3=_1.substring(0,1);if(_3=="+"||_3=="-"||(_3=="$"&&this.getValueFieldOptions(true)[_1]))
{return this.getRelativeDateObject(_1)}
var _4=_1.indexOf("_");if(_4>=0){var _5=_1.substring(0,_4),_6=(_1.substring(_4+1)=="ago"),_7=isc.RelativeDateItem.getPeriodKey(_5)
;if(_7){var _8=(_6?"-":"+")+_2+_7;if(this.rangePosition!=null){var _9=this.rangePosition=="end"?"+":"-",_10=this.rangeRoundingGranularity[_5];if(_10!=null&&_10.toLowerCase()!="millisecond"){_10=isc.RelativeDateItem.getPeriodKey(_10).toUpperCase();_8+="["+_9+"0"+_10+"]"}
}
return this.getRelativeDateObject(_8)}
}
return null}
,isc.A.getRelativeDateObject=function isc_RelativeDateItem_getRelativeDateObject(_1){return isc.DateUtil.getRelativeDateObject(_1,this.rangePosition)}
,isc.A.getDataValue=function isc_RelativeDateItem_getDataValue(_1){var _2=this.valueField.getValue(),_3;if(_2==null||isc.isAn.emptyString(_2)){_3=null}else{var _4=this.getRelativeDate();if(_4){if(_1){if(!_4.value.startsWith("$")||this.getValueFieldOptions(true)[_4.value]){_3=this.$84o(_4)}
}else{_3=_4}
}else{_3=this.parseDate(_2,this.getInputFormat())}
if(isc.isA.Date(_3)){var _5=this.getType();if(_5){if(!isc.SimpleType.inheritsFrom(_5,"datetime")&&!isc.SimpleType.inheritsFrom(_5,"time"))
{_3.logicalDate=true}
}
if(this.rangePosition){_3.rangePosition=this.rangePosition}
}
}
return _3}
,isc.A.updateValue=function isc_RelativeDateItem_updateValue(){if(!this.valueField||!this.quantityField)return;var _1=this._value,_2=this.$84m,_3=this.getDataValue(false)
;if(!_1&&_3)this.setBaseDate();var _4=(_3==null||isc.isA.Date(_3))
?_3
:this.$84o(_3);if(_3!=_4){this.$84m=_3}else{this.$84m=null}
if(_1==_3)return;this.$10y(_3);this.updateEditor();if(this.$161p()){this.$1609()}
}
,isc.A.hasAdvancedCriteria=function isc_RelativeDateItem_hasAdvancedCriteria(){return(this.valueField&&this.valueField.getValue()!=null)}
,isc.A.getCriterion=function isc_RelativeDateItem_getCriterion(_1){var _2=this.getDataValue(_1);if(_2==null)return null;if(isc.isA.Date(_2)&&this.rangePosition=="end"){if(_2.getSeconds()==0)_2.setSeconds(59);if(_2.getMilliseconds()==0)_2.setMilliseconds(999)}
var _3=this.getCriteriaFieldName();return{operator:this.operator,value:_2,fieldName:_3}}
,isc.A.getCellHeight=function isc_RelativeDateItem_getCellHeight(){var _1=this.Super("getCellHeight",arguments);if(isc.Browser.isIE&&this.useTextField&&isc.isA.Number(_1))_1+=2;return _1}
,isc.A.getFiscalCalendar=function isc_RelativeDateItem_getFiscalCalendar(){return this.fiscalCalendar||isc.DateUtil.getFiscalCalendar()}
,isc.A.setFiscalCalendar=function isc_RelativeDateItem_setFiscalCalendar(_1){this.fiscalCalendar=_1}
,isc.A.showPicker=function isc_RelativeDateItem_showPicker(){var _1={};if(isc.Browser.isHandset){_1.width=isc.Page.getWidth();_1.height=isc.Page.getHeight();_1.left=0;_1.top=0}
var _2=this.shouldShowPickerTimeItem();var _3=isc.addProperties({showTimeItem:_2},this.pickerDefaults,_1,this.pickerProperties
);if(!this.picker){if(this.useSharedPicker){this.picker=isc.DateChooser.getSharedDateChooser(_3,this.getType())}else{this.picker=isc[this.pickerConstructor].create(isc.addProperties({},_3,{_generated:true,autoHide:true,showCancelButton:true,closeOnEscapeKeypress:true
}
)
)}
if(!this.picker.isDrawn()){this.picker.moveTo(null,-9999);this.picker.draw()}
}else{if(isc.getKeys(_3).length>0){this.picker.setProperties(_3)}
}
var _4=this.picker;var _5=_4.callingFormItem;if(_5!=this){if(_5)_5.ignore(_4,"dataChanged");this.observe(_4,"dataChanged","observer.pickerDataChanged(observed)");_4.callingFormItem=this;_4.callingForm=this.canvas;_4.locatorParent=this.canvas}
if(this.inputFormat)_4.inputFormat=this.inputFormat;_4.startYear=_4.startYear=null;_4.endDate=_4.endYear=null;var _6=this.getStartDate();if(_6){_4.startDate=_6.duplicate();_4.startYear=_6.getFullYear()}
var _7=this.getEndDate();if(_7){_4.endDate=_7.duplicate();_4.endYear=_7.getFullYear()}
_4.fiscalCalendar=this.getFiscalCalendar();_4.showFiscalYearChooser=this.showChooserFiscalYearPicker;_4.showWeekChooser=this.showChooserWeekPicker;_4.use24HourTime=this.use24HourTime;if(this.pickerTimeItemProperties){_4.timeItemProperties=isc.addProperties({},_4.timeItemProperties,this.pickerTimeItemProperties)}
var _8=this.getAbsoluteDate();if(_4.setData){if(isc.isA.Date(_8)&&!isNaN(_8.getTime())){_4.setData(_8,true)}else{var _9=new Date();if(this.rangePosition=="start"){_9=isc.DateUtil.getStartOf(_9,"D")}else if(this.rangePosition=="end"){_9=isc.DateUtil.getEndOf(_9,"D")}
_4.setData(_9,true)}
_4.$1275=true}
var _10=this.Super("showPicker",arguments);return _10}
,isc.A.shouldShowPickerTimeItem=function isc_RelativeDateItem_shouldShowPickerTimeItem(){if(this.showPickerTimeItem==false)return false;return isc.SimpleType.inheritsFrom(this.getType(),"datetime")}
,isc.A.getPickerRect=function isc_RelativeDateItem_getPickerRect(){var _1=this.getPageLeft(),_2=this.getPageTop(),_3=isc.DateItem.getChooserWidth()+3,_4=isc.DateItem.getChooserHeight()+3,_5=this.canvas,_6
;_6=_5.getItem("iconPlaceholder");_1+=_6.getLeft();_1+=Math.round((_6.getVisibleWidth()-(this.getPickerIconWidth()/2))-
(_3/2));_2+=Math.round((this.getPickerIconHeight()/2)-(_4/2));return[_1,_2]}
,isc.A.updateDisabled=function isc_RelativeDateItem_updateDisabled(){this.Super("updateDisabled",arguments);if(this.iconPlaceholder&&this.iconPlaceholder.isVisible()){this.iconPlaceholder.redraw()}
}
,isc.A.pickerDataChanged=function isc_RelativeDateItem_pickerDataChanged(_1){var _2=_1.getData();var _3=this.getType(),_4=isc.SimpleType.inheritsFrom(_3,"date")||isc.SimpleType.inheritsFrom(_3,"datetime"),_5=isc.SimpleType.inheritsFrom(_3,"datetime");if((!_4||_5)){if(!this.showPickerTimeItem){this.setToZeroTime(_2);if(this.rangePosition=="end"){_2=isc.DateUtil.getEndOf(_2,"D");_2.rangePosition=this.rangePosition}
}else{if(this.rangePosition=="end"){_2.rangePosition=this.rangePosition;if(_2.getSeconds()==0)_2.setSeconds(59);if(_2.getMilliseconds()==0)_2.setMilliseconds(999)}
}
}
this.$20l=true;this.valueField.setValue(this.formatDate(_2));this.$20l=false;this.updateValue();if(!this.hasFocus)this.focusInItem()}
,isc.A.getStartDate=function isc_RelativeDateItem_getStartDate(){if(!this.startDate)return null;var _1=this.parseDate(this.startDate);if(!isc.isA.Date(_1)){this.logWarn("startDate was not in valid date format - using default start date");_1=isc.DateItem.getPrototype().getStartDate()}
return _1}
,isc.A.getEndDate=function isc_RelativeDateItem_getEndDate(){if(!this.endDate)return null;var _1=this.parseDate(this.endDate);if(!isc.isA.Date(_1)){this.logWarn("endDate was not in valid date format - using default end date");_1=isc.DateItem.getPrototype().getEndDate()}
return _1}
,isc.A.parseDate=function isc_RelativeDateItem_parseDate(_1,_2){if(isc.isA.Date(_1))return _1;if(_1==null||isc.isAn.emptyString(_1))return null;if(_2==null)_2=this.getInputFormat();var _3=this.getType(),_4=isc.SimpleType.inheritsFrom(_3,"date")||isc.SimpleType.inheritsFrom(_3,"datetime"),_5=isc.SimpleType.inheritsFrom(_3,"datetime"),_6=_4&&!_5;var _7=isc.DateUtil.parseInput(_1,_2,this.centuryThreshold,true,!_6);if(isc.isA.Date(_7)&&!_6){var _8=this.getEnteredValue();if(_8!=null&&!isc.isA.Function(_2)){var _9=isc.DateUtil.isDatetimeString(_8,_2);if(!_9){this.setToZeroTime(_7);if(this.rangePosition=="end")_7=isc.DateUtil.getEndOf(_7,"D")}
}
}
return _7}
,isc.A.formatDate=function isc_RelativeDateItem_formatDate(_1){if(!isc.isA.Date(_1))return _1;var _2=this.$45i();var _3=this.getType(),_4=false,_5=isc.SimpleType.inheritsFrom(_3,"date");if(!_5||isc.SimpleType.inheritsFrom(_3,"datetime"))_4=true;if(_4){return _1.toShortDatetime(_2,true)}else{return _1.toShortDate(_2,!_5)}
}
,isc.A.getInputFormat=function isc_RelativeDateItem_getInputFormat(){if(this.inputFormat)return this.inputFormat;var _1=this.$45i();if(_1){return isc.DateUtil.mapDisplayFormatToInputFormat(_1)}
return null}
,isc.A.getEnteredValue=function isc_RelativeDateItem_getEnteredValue(){if(this.valueField)return this.valueField.getValue();return this.getValue()}
,isc.A.getValue=function isc_RelativeDateItem_getValue(){var _1=this.Super("getValue",arguments);return _1||(this.valueField&&this.valueField.getValue())}
,isc.A.propertyChanged=function isc_RelativeDateItem_propertyChanged(_1){if(_1=="startDate"||_1=="endDate"){this.checkDateRangeValidator()}
this.Super("propertyChanged",arguments)}
);isc.B._maxIndex=isc.C+33}
if(isc.ListGrid){isc.defineClass("DateRangeItem","CanvasItem");isc.A=isc.DateRangeItem;isc.A.editorOperators=["greaterOrEqual","lessOrEqual","greaterThan","lessThan"];isc.A=isc.DateRangeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.fieldLayout="vertical";isc.A.defaultType="date";isc.A.shouldSaveValue=true;isc.A.fromTitle="From";isc.A.toTitle="To";isc.A.allowRelativeDates=false;isc.A.validateCriteria=true;isc.A.dateRangeFormConstructor="DynamicForm";isc.A.dateRangeFormDefaults={margin:0,padding:0,itemChanged:function(_1,_2){var _3=this.getValues(),_4={_constructor:"DateRange"};if(_3.fromField!=null)_4.start=_3.fromField;if(_3.toField!=null)_4.end=_3.toField;this.creator.$10y(_4)}};isc.A.relativeItemConstructor="RelativeDateItem";isc.A.absoluteItemConstructor="DateItem";isc.A.absoluteDateTimeItemConstructor="DateTimeItem";isc.B.push(isc.A.setFromDate=function isc_DateRangeItem_setFromDate(_1){this.fromDate=_1;if(this.fromField)this.fromField.setValue(this.fromDate)}
,isc.A.setToDate=function isc_DateRangeItem_setToDate(_1){this.toDate=_1;if(this.toField)this.toField.setValue(this.toDate)}
,isc.A.hasAdvancedCriteria=function isc_DateRangeItem_hasAdvancedCriteria(){return this.fromField&&this.toField&&(this.fromField.getValue()!=null||this.toField.getValue()!=null)}
,isc.A.getCriterion=function isc_DateRangeItem_getCriterion(_1){if(this.validateCriteria){if(!this.validateRange())return null}
_1=_1||!this.allowRelativeDates;var _2=_1?this.fromField.getValue():this.fromField.getRelativeDate()||this.fromField.getValue(),_3=_2!=null,_4=_1?this.toField.getValue():this.toField.getRelativeDate()||this.toField.getValue(),_5=_4!=null,_6=null
;if(_3||_5){_6={_constructor:"AdvancedCriteria",operator:"and",criteria:[]};if(_3){if(isc.DateUtil.isRelativeDate(_2)){if(isc.DateUtil.isRelativeDateShortcut(_2.value)){var _7=isc.DateUtil.getDefaultRangePosition(_2.value)||"start";_2.rangePosition=_7}
}
if(this.fromField.isLogicalDate){_2.logicalDate=true}
_6.criteria.add({fieldName:this.getCriteriaFieldName(),operator:"greaterOrEqual",value:_2
})}
if(_5){if(isc.DateUtil.isRelativeDate(_4)){if(isc.DateUtil.isRelativeDateShortcut(_4.value)){var _8=isc.DateUtil.getDefaultRangePosition(_4.value)||"end";_4.rangePosition=_8}
}
if(this.toField.isLogicalDate){_4.logicalDate=true}
_6.criteria.add({fieldName:this.getCriteriaFieldName(),operator:"lessOrEqual",value:_4
})}
}
return _6}
,isc.A.validateRange=function isc_DateRangeItem_validateRange(){var _1=true,_2=false,_3=false
;if(this.fromField){var _4=this.fromField.getValue();if(isc.isA.Date(_4)){if(!this.fromField.validate())_1=false}else if(!isc.DateUtil.mapsToDate(_4)){if(_4==null)_2=true;else _1=false}
}
if(this.toField){var _5=this.toField.getValue();if(isc.isA.Date(_5)){if(!this.toField.validate())_1=false}else if(!isc.DateUtil.mapsToDate(_5)){if(_5==null)_3=true;else _1=false}
}
if(_1&&_2&&_3)_1=false;if(_1){_1=this.fromField.validate()&&this.toField.validate()}
return _1}
,isc.A.canEditCriterion=function isc_DateRangeItem_canEditCriterion(_1){if(_1==null)return false;var _2=this.getCriteriaFieldName();if(_1.operator=="and"){var _3=_1.criteria;if(_3.length==0||_3.length>2){return false}else if(_3.length==1){var _4=_3[0];if(_4.fieldName!=_2)return false;if(_4.operator=="equals"){this.logWarn("DynamicForm editing Advanced criteria. Includes criterion for field "+_2+". A dateRange editor is showing for this field and the existing criteria has operator: "+_4.operator+". DateRange items can only edit criteria greaterThan/greaterOrEqual or lessThan/lessOrEqual. However, for the 'equals' operator, a dateRange will be constructed for you, as greaterOrEqual to [value] and lessOrEqual to [value], ie, one day.");return true}
}
for(var i=0;i<_3.length;i++){var _6=_3[i];if(_6.fieldName!=_2)return false;if(_6.operator!="greaterThan"&&_6.operator!="greaterOrEqual"
&&_6.operator!="lessThan"&&_6.operator!="lessOrEqual")
{this.logWarn("DynamicForm editing Advanced criteria. Includes criterion for field "+_2+". A dateRange editor is showing for this field but the existing criteria has operator:"+_6.operator+". DateRange items can only edit criteria greaterThan/greaterOrEqual or lessThan/lessOrEqual so leaving this unaltered.");return false}
}
return true}else if(_1.fieldName==_2){var _7="DynamicForm editing Advanced criteria. Includes criterion for field "+_2+". A dateRange editor is showing for this field and the existing criteria has operator:"+_1.operator+". DateRange items can only edit criteria greaterThan/greaterOrEqual or lessThan/lessOrEqual";if(_1.operator=="equals"){this.logWarn(_7+". However, for the 'equals' operator, a dateRange will be constructed for you, as greaterOrEqual to [value] and lessOrEqual to [value], ie, one day.");return true}
if(_1.operator!="greaterThan"&&_1.operator!="greaterOrEqual"
&&_1.operator!="lessThan"&&_1.operator!="lessOrEqual")
{this.logWarn(_7+" so leaving this unaltered.");return false}
return true}
return false}
,isc.A.setCriterion=function isc_DateRangeItem_setCriterion(_1){if(!_1)return;if(_1.operator=="equals"){var _2={_constructor:"AdvancedCriteria",operator:"and",criteria:[{fieldName:_1.fieldName,operator:"greaterOrEqual",value:_1.value},{fieldName:_1.fieldName,operator:"lessOrEqual",value:_1.value}
]};_1=_2}
var _3,_4;if(_1.operator=="and"){_3=_1.criteria.find("operator","greaterThan");if(!_3)_3=_1.criteria.find("operator","greaterOrEqual");_4=_1.criteria.find("operator","lessThan");if(!_4)_4=_1.criteria.find("operator","lessOrEqual")}else{if(_1.operator=="greaterThan")_3=_1;else if(_1.operator=="greaterOrEqual")_3=_1;else if(_1.operator=="lessThan")_4=_1;else if(_1.operator=="lessOrEqual")_4=_1}
if(_3!=null){var _5=_3.value;if(isc.isA.String(_5)){_5=new Date(_5);if(isNaN(_5.getTime()))_5=_3.value}
this.fromField.setValue(_5)}
if(_4!=null){var _6=_4.value;if(isc.isA.String(_6)){_6=new Date(_6);if(isNaN(_6.getTime()))_6=_4.value}
this.toField.setValue(_6)}}
);isc.B._maxIndex=isc.C+7;isc.A=isc.DateRangeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.autoDestroy=true;isc.A.invalidRangeErrorMessage="'To' field value cannot be earlier than 'From' field value.";isc.B.push(isc.A.init=function isc_DateRangeItem_init(){if(this.getType()==null)this.type="date";if(this.validators)this.validators.remove(this.validators.find("type","isDate"));this.$67h();this.Super("init",arguments)}
,isc.A.$67h=function isc_DateRangeItem__createEditor(){var _1;var _2={$76z:true
};if(this.form.dataSource){_1=isc.DataSource.getDataSource(this.form.dataSource);var _3=_1.getField(this.name);if(_3){_2.dataSource=_1.getFieldDataSource(_3)}
}
if(this.form&&this.form.showComplexFieldsRecursively){_2.showComplexFields=true;_2.showComplexFieldsRecursively=true}else{_2.showComplexFields=false}
_2.height=22;var _4=this.innerTitleOrientation||this.titleOrientation||this.form.titleOrientation||"left";_2.titleOrientation=_4;if(_4=="left"){if(this.fieldLayout=="vertical"){_2.numCols=2;_2.colWidths=[50,"*"]}else{_2.numCols=4;_2.colWidths=[50,"*",50,"*"]}
}else if(_4=="right"){if(this.fieldLayout=="vertical"){_2.numCols=2;_2.colWidths=["*",50]}else{_2.numCols=4;_2.colWidths=["*",50,"*",50]}
}else{if(this.fieldLayout=="vertical"){_2.numCols=1;_2.colWidths=["*"]}else{_2.numCols=2;_2.colWidths=["*","*"]}
}
this.addAutoChild("dateRangeForm",_2);this.canvas=this.dateRangeForm;var _5=this.getType(),_6=false;if(isc.SimpleType.inheritsFrom(_5,"date"))
{_6=true}
if(!this.baseDate)this.baseDate=new Date();if(_6)this.baseDate=isc.DateUtil.getLogicalDateOnly(this.baseDate);var _7=this,_8=this.allowRelativeDates?this.relativeItemConstructor:(_6?this.absoluteItemConstructor:this.absoluteDateTimeItemConstructor),_9=[]
;_9[0]=isc.addProperties({},this.fromFieldDefaults,this.fromFieldProperties,{_constructor:this.fromFieldConstructor||_8,name:"fromField",baseDate:this.baseDate,dateFormatter:(this.dateDisplayFormat||this.dateFormatter),type:this.getType(),canEdit:this.canEdit,inputFormat:(this.dateInputFormat||this.inputFormat),rangePosition:"start",title:this.fromTitle,defaultValue:this.fromDate,useTextField:(!this.allowRelativeDates?true:null),validateOnChange:true,validateOnExit:true
}
);if(!_9[0].hasOwnProperty("rangePosition")){_9[0].rangePosition="start"}
_9[1]=isc.addProperties({},this.toFieldDefaults,this.toFieldProperties,{_constructor:this.toFieldConstructor||_8,name:"toField",baseDate:this.baseDate,dateFormatter:(this.dateDisplayFormat||this.dateFormatter),type:this.getType(),canEdit:this.canEdit,inputFormat:(this.dateInputFormat||this.inputFormat),rangePosition:"end",title:this.toTitle,defaultValue:this.toDate,useTextField:(!this.allowRelativeDates?true:null),validateOnChange:true,validateOnExit:true,init:function(){var _10=this.Super("init",arguments);this.validators.add({type:"custom",errorMessage:this.form.creator.invalidRangeErrorMessage,condition:function(_13,_14,_15,_16){if(_15==null)return true;var _11=isc.DateUtil.getAbsoluteDate(_15),_12=isc.DateUtil.getAbsoluteDate(_16.fromField)
;if(_12==null)return true;return _11>=_12}
});return _10}
}
);if(!_9[1].hasOwnProperty("rangePosition")){_9[1].rangePosition="end"}
this.canvas.setFields(_9);this.toField=this.canvas.getField("toField");this.fromField=this.canvas.getField("fromField");if(this.defaultValue){this.setValue(this.defaultValue)}else{if(this.fromDate)this.setFromDate(this.fromDate);if(this.toDate)this.setToDate(this.toDate)}
}
,isc.A.fieldChanged=function isc_DateRangeItem_fieldChanged(){}
,isc.A.setValue=function isc_DateRangeItem_setValue(_1){var _2=_1?_1.start:null,_3=_1?_1.end:null,_4=isc.RelativeDateItem;if(!this.allowRelativeDates&&_4.isRelativeDate(_2))this.setFromDate(null);else this.setFromDate(_2);if(!this.allowRelativeDates&&_4.isRelativeDate(_3))this.setToDate(null);else this.setToDate(_3);this.Super("setValue",arguments)}
,isc.A.getValue=function isc_DateRangeItem_getValue(){var _1=this.allowRelativeDates,_2=this.isDrawn(),_3=this.fromField,_4=this.toField,_5=null,_6=null
;if(_3){if(_1&&_3.getRelativeDate)_5=_3.getRelativeDate()
if(_5==null)_5=_3.getValue();if(_5!=null&&this.type=="date"){_5.logicalDate=true}
}else{_5=this.fromDate}
if(_4){if(_1&&_4.getRelativeDate)_6=_4.getRelativeDate();if(_6==null)_6=_4.getValue();if(_6!=null&&this.type=="date"){_6.logicalDate=true}
}else{_6=this.toDate}
if(_5==null&&_6==null)return null;var _7={_constructor:"DateRange"};if(_5!=null)_7.start=_5;if(_6!=null)_7.end=_6;return _7}
);isc.B._maxIndex=isc.C+5;if(isc.Window){isc.defineClass("DateRangeDialog","Window");isc.A=isc.DateRangeDialog;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.askForRange=function isc_c_DateRangeDialog_askForRange(_1,_2,_3,_4){var _5=isc.DateRangeDialog.create({allowRelativeDates:_1!=null?_1:true,rangeItemProperties:_2,callback:_4
},_3);_5.show()}
);isc.B._maxIndex=isc.C+1;isc.A=isc.DateRangeDialog.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.isModal=true;isc.A.showModalMask=true;isc.A.dismissOnEscape=true;isc.A.autoCenter=true;isc.A.autoSize=true;isc.A.autoFocus=true;isc.A.vertical="true";isc.A.showMinimizeButton=false;isc.A.headerIconProperties={src:"[SKIN]/DynamicForm/DatePicker_icon.gif"};isc.A.returnCriterion=false;isc.A.headerTitle="Select Date Range";isc.A.mainLayoutDefaults={_constructor:"VLayout",height:105,layoutMargin:5};isc.A.rangeFormDefaults={_constructor:"DynamicForm",numCols:1,height:"100%",autoParent:"mainLayout"};isc.A.rangeItemConstructor="DateRangeItem";isc.A.rangeItemDefaults={allowRelativeDates:true,showTitle:false};isc.A.buttonLayoutDefaults={_constructor:"HLayout",width:"100%",height:1,layoutAlign:"right",align:"right",membersMargin:5,autoParent:"mainLayout"};isc.A.clearButtonTitle="Clear";isc.A.clearButtonConstructor="IButton";isc.A.clearButtonDefaults={width:80,canFocus:true,autoParent:"buttonLayout",click:function(){this.creator.clearValues()}};isc.A.okButtonTitle="OK";isc.A.okButtonConstructor="IButton";isc.A.okButtonDefaults={width:80,canFocus:true,autoParent:"buttonLayout",click:function(){this.creator.accept()}};isc.A.cancelButtonTitle="Cancel";isc.A.cancelButtonConstructor="IButton";isc.A.cancelButtonDefaults={width:80,canFocus:true,autoParent:"buttonLayout",click:function(){this.creator.cancel()}};isc.A.destroyOnClose=true;isc.B.push(isc.A.keyPress=function isc_DateRangeDialog_keyPress(){var _1=isc.EH.getKey();if(_1=="Enter"){this.accept()}}
,isc.A.closeClick=function isc_DateRangeDialog_closeClick(){this.cancel()}
,isc.A.destroy=function isc_DateRangeDialog_destroy(){if(this.rangeForm){this.rangeForm.markForDestroy()}
this.Super("destroy",arguments)}
);isc.B._maxIndex=isc.C+3;isc.A=isc.DateRangeDialog.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_DateRangeDialog_initWidget(){this.title=this.headerTitle;this.Super("initWidget",arguments);this.addAutoChild("mainLayout");this.mainLayout.setWidth("100%");if(!this.type)this.type="date";var _1=isc.addProperties({_constructor:this.rangeItemConstructor},this.rangeItemDefaults,this.rangeItemProperties,{name:"rangeItem",fromDate:this.fromDate,toDate:this.toDate,type:this.type,dateDisplayFormat:this.dateDisplayFormat
}
);this.addAutoChild("rangeForm",{$76z:true,items:[_1]
}
);var _2=this.rangeItem=this.rangeForm.getField("rangeItem");var _3=_2.innerTitleOrientation||_2.titleOrientation||"left";_2.canvas.titleOrientation=_3;if(_3=="left"||_3=="right"){_2.canvas.numCols=2;_2.canvas.colWidths=[50,"*"]}else{_2.canvas.numCols=1;_2.canvas.colWidths=["*"]}
this.addAutoChild("buttonLayout");this.addAutoChild("clearButton",{canFocus:true,title:this.clearButtonTitle});this.addAutoChild("okButton",{canFocus:true,title:this.okButtonTitle});this.addAutoChild("cancelButton",{canFocus:true,title:this.cancelButtonTitle});this.addItem(this.mainLayout);if(this.rangeItem.value){if(isc.DataSource.isAdvancedCriteria(this.rangeItem.value)){this.rangeItem.setCriterion(this.rangeItem.value)}else this.rangeItem.setValue(this.rangeItem.value)}
}
,isc.A.clearValues=function isc_DateRangeDialog_clearValues(){if(this.rangeItem){this.rangeItem.setValue(null);if(this.autoValidate)this.rangeItem.validateRange()}
}
,isc.A.accept=function isc_DateRangeDialog_accept(){if(this.rangeItem.getValue()){if(this.autoValidate&&!this.rangeItem.validateRange()){return}
}
this.finished(this.rangeItem.returnCriterion?this.rangeItem.getCriterion():this.rangeItem.getValue()
)}
,isc.A.cancel=function isc_DateRangeDialog_cancel(){this.hide();if(this.item){this.rangeItem.setFromDate(this.item.fromDate);this.rangeItem.setToDate(this.item.toDate)}
if(this.destroyOnClose)this.markForDestroy()}
,isc.A.finished=function isc_DateRangeDialog_finished(_1){if(this.callback)this.fireCallback(this.callback,"value",[_1]);this.hide();if(this.destroyOnClose)this.markForDestroy()}
);isc.B._maxIndex=isc.C+5;isc.defineClass("MiniDateRangeItem","StaticTextItem");isc.A=isc.MiniDateRangeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.controlStyle="textItem";isc.A.clipValue=true;isc.A.applyHeightToTextBox=true;isc.A.wrap=false;isc.A.valign="middle";isc.A.iconVAlign="middle";isc.A.height=20;isc.A.width=100;isc.A.defaultType="date";isc.A.shouldSaveValue=true;isc.A.rangeDialogConstructor="DateRangeDialog";isc.A.rangeDialogDefaults={autoDraw:false,destroyOnClose:false};isc.A.canFocus=true;isc.A.canTabToIcons=true;isc.A.fromDateOnlyPrefix="Since";isc.A.toDateOnlyPrefix="Before";isc.A.pickerIconPrompt="Show Date Chooser";isc.A.showPickerIcon=true;isc.A.pickerIconSrc="[SKIN]/DynamicForm/DatePicker_icon.gif";isc.A.pickerIconDefaults={width:16,height:16,showOver:false,showFocused:false,showFocusedWithItem:false,hspace:0,click:function(_1,_2,_3){if(!_2.isReadOnly()&&!_2.isDisabled()){_2.showRangeDialog();return false}
}};isc.A.allowRelativeDates=true;isc.B.push(isc.A.$207e=function isc_MiniDateRangeItem__mayShowHintInField(){return true}
,isc.A.$157g=function isc_MiniDateRangeItem__shouldVerticallyCenterTextBox(){return true}
,isc.A.$872=function isc_MiniDateRangeItem__canFocusInTextBox(){return false}
,isc.A.$173=function isc_MiniDateRangeItem__setElementTabIndex(_1,_2){if(!this.$kk()||!this.isDrawn())return;if(!_2)this.$175()}
,isc.A.handleClick=function isc_MiniDateRangeItem_handleClick(){if(!this.isReadOnly()&&!this.isDisabled())this.showRangeDialog()}
);isc.B._maxIndex=isc.C+5;isc.A=isc.MiniDateRangeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.autoValidate=true;isc.B.push(isc.A.init=function isc_MiniDateRangeItem_init(){this.Super("init",arguments);if(this.validators)this.validators.remove(this.validators.find("type","isDate"));var _1=this.getType();var _2=isc.addProperties({},this.rangeDialogProperties?this.rangeDialogProperties.rangeItemProperties:null,{allowRelativeDates:this.allowRelativeDates,criteriaField:this.criteriaField,type:_1,canEdit:this.canEdit
}
);this.addAutoChild("rangeDialog",{type:_1,item:this,autoValidate:this.autoValidate,fromDate:this.fromDate,toDate:this.toDate,rangeItemProperties:_2,dateDisplayFormat:this.dateDisplayFormat,callback:this.getID()+".rangeDialogCallback(value)"
}
);this.rangeItem=this.rangeDialog.rangeItem;this.rangeItem.name=this.name;if(this.defaultValue){this.setValue(this.defaultValue)}
}
,isc.A.validate=function isc_MiniDateRangeItem_validate(){return this.rangeItem.validateRange()}
,isc.A.setAutoValidate=function isc_MiniDateRangeItem_setAutoValidate(_1){this.autoValidate=_1;if(this.rangeDialog)this.rangeDialog.autoValidate=this.autoValidate}
,isc.A.showRangeDialog=function isc_MiniDateRangeItem_showRangeDialog(){this.rangeDialog.show();var _1=this.rangeDialog.rangeItem;_1.setFromDate(this.fromDate);_1.setToDate(this.toDate);this.rangeDialog.rangeForm.children[0].clearErrors();_1.validateRange()}
,isc.A.rangeDialogCallback=function isc_MiniDateRangeItem_rangeDialogCallback(_1){if(!this.$10y(_1))return;this.displayValue(_1)}
,isc.A.hasAdvancedCriteria=function isc_MiniDateRangeItem_hasAdvancedCriteria(){return this.rangeItem!=null&&this.rangeItem.hasAdvancedCriteria()}
,isc.A.getCriterion=function isc_MiniDateRangeItem_getCriterion(){var _1=this.rangeItem?this.rangeItem.getCriterion():null;return _1}
,isc.A.setCriterion=function isc_MiniDateRangeItem_setCriterion(_1){if(this.rangeItem){this.rangeItem.setCriterion(_1);var _2=this.rangeItem.getValue();this.setValue(_2,null,true)}
}
,isc.A.canEditCriterion=function isc_MiniDateRangeItem_canEditCriterion(_1){return this.rangeItem?this.rangeItem.canEditCriterion(_1):false}
,isc.A.setValue=function isc_MiniDateRangeItem_setValue(_1,_2,_3){this.updateStoredDates(_1);if(!_3){this.rangeItem.setFromDate(this.fromDate);this.rangeItem.setToDate(this.toDate)}
var _4=[this.getValue()];this.Super("setValue",_4,arguments)}
,isc.A.updateStoredDates=function isc_MiniDateRangeItem_updateStoredDates(_1){if(_1!=null){if(isc.DataSource.isAdvancedCriteria(_1)){var _2={};for(var i=0;i<_1.criteria.length;i++){var _4=_1.criteria[i];if(_4.operator=="greaterThan"||_4.operator=="greaterOrEqual")
_2.start=_4.value;else if(_4.operator=="lessThan"||_4.operator=="lessOrEqual")
_2.end=_4.value}
_1=_2
}
this.fromDate=!_1.start?null:_1.start;this.toDate=!_1.end?null:_1.end}else{this.fromDate=null;this.toDate=null;this.prompt=""}
}
,isc.A.saveValue=function isc_MiniDateRangeItem_saveValue(){this.Super("saveValue",arguments);this.updateStoredDates(this._value)}
,isc.A.displayValue=function isc_MiniDateRangeItem_displayValue(_1){var _2=this.mapValueToDisplay(_1)||"";this.setElementValue(_2,_1)}
,isc.A.setElementValue=function isc_MiniDateRangeItem_setElementValue(_1,_2,_3,_4,_5){var _6=(_1==null||isc.isAn.emptyString(_1)||_1==this.emptyDisplayValue);if(!this.$127p&&!this.$127q&&this.$712())
{if(_6){var _7=this.$15h();if(_7!=null)
_7.className=this.$66v();var _8=this.getHint();_1=String.htmlStringToString(_8);this.$1563=true}else{if(this.$1563){var _7=this.$15h();if(_7!=null)_7.className=this.getTextBoxStyle()}
this.$1563=false}
}
this.$19z=_1;return this.invokeSuper(isc.MiniDateRangeItem,"setElementValue",_1,_2,_3,_4,_5)}
,isc.A.mapValueToDisplay=function isc_MiniDateRangeItem_mapValueToDisplay(_1){if(_1==null)return"";var _2=_1.start,_3=_1.end,_4=isc.RelativeDateItem;if(_2&&isc.DateUtil.isRelativeDate(_2)){if(isc.DateUtil.isRelativeDateShortcut(_2.value)){var _5=isc.DateUtil.getDefaultRangePosition(_2.value)||"start";_2.rangePosition=_5}
}
if(_3&&isc.DateUtil.isRelativeDate(_3)){if(isc.DateUtil.isRelativeDateShortcut(_3.value)){var _5=isc.DateUtil.getDefaultRangePosition(_3.value)||"end";_3.rangePosition=_5}
}
var _6=(_4.isRelativeDate(_2)?_4.getAbsoluteDate(_2.value,null,null,_2.rangePosition||"start"):_2),_7=(_4.isRelativeDate(_3)?_4.getAbsoluteDate(_3.value,null,null,_3.rangePosition||"end"):_3)
;var _8;if(_6||_7){if(this.dateDisplayFormat||this.format){if(_6)_8=this.formatDate(_6);if(_7){if(_8)_8+=" - "+this.formatDate(_7);else _8=this.formatDate(_7)}
}else _8=isc.DateUtil.getFormattedDateRangeString(_6,_7);if(!_6)_8=this.toDateOnlyPrefix+" "+_8;else if(!_7)_8=this.fromDateOnlyPrefix+" "+_8}
this.prompt=_8||"";return this.prompt}
,isc.A.getValue=function isc_MiniDateRangeItem_getValue(){if(!this.rangeItem)return;return this.rangeItem.getValue()}
,isc.A.formatDate=function isc_MiniDateRangeItem_formatDate(_1){if(!isc.isA.Date(_1))return _1;var _2=this.getType(),_3=isc.SimpleType.inheritsFrom(_2,"date");return _1.toShortDate(this.$45i(),!_3)}
,isc.A.getCriteriaValue=function isc_MiniDateRangeItem_getCriteriaValue(){return this.getCriterion()}
,isc.A.destroy=function isc_MiniDateRangeItem_destroy(){if(this.rangeDialog)this.rangeDialog.markForDestroy();this.Super("destroy",arguments)}
);isc.B._maxIndex=isc.C+19}}
if(isc.Portal){isc.defineClass("EntityEditorHeader","VLayout");isc.A=isc.EntityEditorHeader.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.height=1;isc.A.padding=10;isc.A.border="2px solid black";isc.A.headerLayoutDefaults={_constructor:"VLayout",width:"100%",height:1,membersMargin:5
};isc.A.headerLabelTitle="<B><H2>Editing ${entityType}</H2><br><H3>This UI lets you edit the entire data-structure for this Entity-type</H3></B>";isc.A.headerLabelDefaults={_constructor:"Label",width:"100%",height:30,autoParent:"headerLayout"
};isc.A.showDetailLabel=false;isc.A.defaultDetailLabelTitle="<B><H3>This UI lets you edit the entire data-structure for this Entity-type</H3></B>";isc.A.detailLabelTitle="<B><H3>$entityComment</H3></B>";isc.A.detailLabelDefaults={_constructor:"Label",width:"100%",height:20,autoParent:"headerLayout"
};isc.A.unknownEntityTitle="[Unknown Entity-type]";isc.B.push(isc.A.initWidget=function isc_EntityEditorHeader_initWidget(){var _1=this.headerLabelTitle;var _2=this.detailLabelTitle;if(this.dataSource)this.getDataSource(this.dataSource);if(!this.entityName)this.entityName=this.getEntityName(this.dataSource);if(!this.entityComment)this.entityComment=this.getEntityComment(this.dataSource);if(this.entityName)
_1=_1.evalDynamicString(this,{entityType:this.entityName});if(this.entityComment)
_2=_2.evalDynamicString(this,{entityType:this.entityComment});this.headerLayout=this.addAutoChild("headerLayout");this.headerLabel=this.addAutoChild("headerLabel",{contents:_1});this.detailLabel=this.addAutoChild("detailLabel",{contents:_2});this.headerLayout.addMembers([this.headerLabel,this.detailLabel]);this.addMember(this.headerLayout)}
,isc.A.getEntityName=function isc_EntityEditorHeader_getEntityName(_1){var _2=this.unknownEntityTitle;if(_1){if(isc.isA.Function(_1.getEntityName))
_2=_1.getEntityName();else _2=_1.ID}
return _2}
,isc.A.getEntityComment=function isc_EntityEditorHeader_getEntityComment(_1){var _2=this.defaultDetailLabelTitle;if(_1){if(isc.isA.Function(_1.getEntityComment))
_2=_1.getEntityComment();else _2="Allows hierarchical editing of data in "+_1.ID+" DataSource"}
return _2}
);isc.B._maxIndex=isc.C+3;isc.defineClass("EntityEditorForm","Portlet");isc.A=isc.EntityEditorForm.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.addButtonDefaults={_constructor:"IButton",title:"Add",autoFit:true,layoutAlign:"right",click:function(){this.creator.addRecord()}
};isc.A.formDefaults={_constructor:"DynamicForm",numCols:6,colWidths:["*","*","*","*","*","*"],width:"100%",implicitSave:true,initWidget:function(){this.Super("initWidget",arguments);if(this.record&&this.relation){var _1={};if(!this.relation.direction){_1[this.relation.baseFieldName]=this.record[this.relation.baseFieldName]}else{_1[this.relation.baseFieldName]=this.record[this.relation.relatedFieldName]}
this.fetchData(_1)}
},implicitSaveCallback:function(_1){if(!this.record||!this.record[this.relation.baseFieldName]){this.creator.setRecord(_1);this.setValues(_1);this.saveOperationType="update"}
}
};isc.B.push(isc.A.initWidget=function isc_EntityEditorForm_initWidget(){this.Super("initWidget",arguments);this.addAutoChild("addButton");this.addAutoChild("form",isc.addProperties({},this.formProperties,{dataSource:this.dataSource,title:this.title,record:this.record,relation:this.relation
}
)
);if(isc.isA.Portlet(this))this.addItems([this.addButton,this.form]);else this.addMembers([this.addButton,this.form])}
,isc.A.fetchData=function isc_EntityEditorForm_fetchData(){var _1={};if(!this.relation.direction){if(this.isTopLevel())
_1[this.relation.baseFieldName]=this.record[this.relation.baseFieldName]}else{_1[this.relation.baseFieldName]=this.record[this.relation.relatedFieldName]}
this.form.fetchData(_1)}
,isc.A.addRecord=function isc_EntityEditorForm_addRecord(){var _1={};if(!this.relation.direction){if(!this.isTopLevel())
_1[this.relation.baseFieldName]=this.record[this.relation.baseFieldName]}else{_1[this.relation.baseFieldName]=this.record[this.relation.relatedFieldName]}
this.record=_1;this.form.editNewRecord(_1)}
,isc.A.isTopLevel=function isc_EntityEditorForm_isTopLevel(){return this.relation.relatedDS==null}
,isc.A.setRecord=function isc_EntityEditorForm_setRecord(_1){if(this.isTopLevel()){this.creator.updateTopLevel()}else{this.fetchData()}
this.record=_1;this.form.record=_1;if(this.addButton)this.addButton.setDisabled(this.record==null)}
,isc.A.getData=function isc_EntityEditorForm_getData(){return null}
,isc.A.getCriteria=function isc_EntityEditorForm_getCriteria(){return this.form.getValuesAsCriteria()}
,isc.A.enterSearchMode=function isc_EntityEditorForm_enterSearchMode(_1){this.addButton.setDisabled(true);this.record=this.form.record=null;this.form.implicitSave=false;this.form.setData([]);if(_1)this.form.setValues(_1)}
,isc.A.exitSearchMode=function isc_EntityEditorForm_exitSearchMode(){}
);isc.B._maxIndex=isc.C+9;isc.defineClass("EntityEditorGrid","Portlet");isc.A=isc.EntityEditorGrid.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.addButtonDefaults={_constructor:"IButton",title:"Add",autoFit:true,layoutAlign:"right",click:function(){this.creator.addRecord()}
};isc.A.gridDefaults={_constructor:"ListGrid",width:"100%",height:"100%",autoFitMaxRecords:4,autoFetchData:false,canEdit:true,autoSaveEdits:true,initWidget:function(){if(this.record&&this.relation){this.initialCriteria={};this.initialCriteria[this.relation.baseFieldName]=this.record[this.relation.relatedFieldName]}
this.Super("initWidget",arguments)}
};isc.B.push(isc.A.initWidget=function isc_EntityEditorGrid_initWidget(){this.addAutoChild("addButton");if(!isc.isA.DataSource(this.dataSource))
this.dataSource=isc.DS.get(this.dataSource);this.addAutoChild("grid",isc.addProperties({},this.gridProperties,{dataSource:this.dataSource,title:this.title,record:this.record,relation:this.relation
}
)
);if(this.record)this.fetchData();if(this.addButton)this.addButton.setDisabled(this.record==null);if(isc.isA.Portlet(this))this.addItems([this.addButton,this.grid]);else this.addMembers([this.addButton,this.grid]);this.Super("initWidget",arguments)}
,isc.A.setData=function isc_EntityEditorGrid_setData(_1){}
,isc.A.fetchData=function isc_EntityEditorGrid_fetchData(){var _1={};if(this.record){_1[this.relation.baseFieldName]=this.record[this.relation.relatedFieldName]}
this.grid.fetchData(_1)}
,isc.A.addRecord=function isc_EntityEditorGrid_addRecord(){var _1={};_1[this.relation.baseFieldName]=this.record[this.relation.relatedFieldName];this.grid.startEditingNew(_1)}
,isc.A.setRecord=function isc_EntityEditorGrid_setRecord(_1){this.record=_1;this.fetchData();if(this.addButton)this.addButton.setDisabled(this.record==null)}
,isc.A.getData=function isc_EntityEditorGrid_getData(){return null}
,isc.A.getCriteria=function isc_EntityEditorGrid_getCriteria(){return this.grid.getFilterEditorCriteria()}
,isc.A.enterSearchMode=function isc_EntityEditorGrid_enterSearchMode(_1){this.addButton.setDisabled(true);this.record=this.grid.record=null;this.grid.setData([]);this.grid.setShowFilterEditor(true);if(_1)this.grid.setCriteria(_1)}
,isc.A.exitSearchMode=function isc_EntityEditorGrid_exitSearchMode(){}
);isc.B._maxIndex=isc.C+9;isc.defineClass("EntityEditor","VLayout");isc.A=isc.EntityEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.membersMargin=10;isc.A.padding=10;isc.A.dataSource="";isc.A.modeFormDefaults={_constructor:"DynamicForm",height:1,width:"100%",fields:[{name:"edit",title:"options",defaultToFirstOption:true,valueMap:["Edit","Search"],changed:function(_1,_2,_3){_1.creator.setMode(_3)}
}
]
};isc.A.formEntityDefaults={_constructor:"EntityEditorForm",height:1,width:"100%"
};isc.A.gridEntityDefaults={_constructor:"EntityEditorGrid",height:1,width:"100%"
};isc.A.showTabset=false;isc.A.tabsetDefaults={_constructor:"TabSet",width:"100%",height:"100%"
};isc.A.portalDefaults={_constructor:"PortalLayout",width:"100%",height:"100%",showColumnMenus:false,numColumns:1
};isc.B.push(isc.A.getDataSourceHierarchy=function isc_EntityEditor_getDataSourceHierarchy(_1,_2){var _3=[];if(!isc.isA.DataSource(_1))
_1=isc.DS.getDataSource(_1);if(!isc.isA.DataSource(_1)){this.logWarn("No datasource provided..");return _3}
if(!_2)_2=[];if(_2.contains(_1.ID)){return null}
var _4=isc.getValues(_1.getFields()),_5=[]
;for(var i=0;i<_4.length;i++){if(_4[i].foreignKey!=null){_5.add(_4[i])}
}
var _7=_1.ID,_8=[],_9=[];isc.DS.registerDataSource(_1);var _10=_1.getChildDataSources();if(_10){for(var i=0;i<_10.length;i++){var _11=_10[i],_12=isc.getValues(_11.getFields())
;for(var j=0;j<_12.length;j++){var _14=_12[j];if(!_14.foreignKey||isc.DS.getForeignDSName(_14,_11)!=_1.ID)continue;var _15=isc.DS.getForeignFieldName(_14,_11);var _16=_4.find("name",_15);if(_16&&_14.entityEditMode!="picker"){var _17=_7,_18=_16.name,_19=_11.ID,_20=_14.name,_21=_16.relationArity,_22="out"
;if(!_2.contains(_19)){_3.add({baseDS:_19,baseFieldName:_20,relatedDS:_17,relatedFieldName:_18,relationArity:_16.relationArity
})}
}
}
}
}
for(var j=0;j<_5.length;j++){var _16=_5[j];if(!_16.foreignKey)continue;var _23=isc.DS.getForeignFieldName(_16,_1),_11=isc.DS.getDataSource(isc.DS.getForeignDSName(_16,_1)),_12=isc.getValues(_11.getFields());var _14=_12.find("name",_23);if(_14&&_16.entityEditMode!="picker"){var _17=_7,_18=_16.name,_19=this.getDSName(_11),_20=_14.name,_21=_16.relationArity,_22="out"
;if(!_2.contains(_19)){_3.add({baseDS:_19,baseFieldName:_20,relatedDS:_17,relatedFieldName:_18,relationArity:_21,direction:_22
})}
}
}
return _3}
,isc.A.getDSName=function isc_EntityEditor_getDSName(_1){if(isc.isA.String(_1))return _1;if(isc.isA.DataSource(_1))return _1.ID;return null}
);isc.B._maxIndex=isc.C+2;isc.A=isc.EntityEditor.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.initWidget=function isc_EntityEditor_initWidget(){this.vertical=true;if(!isc.isA.DataSource(this.dataSource))
this.dataSource=isc.DS.getDataSource(this.dataSource);if(!this.dataSource)this.logWarn("No dataSource provided - no entity to edit");else this.entityTree=this.getEntityTree();this.addAutoChild("modeForm");this.addAutoChild("tabset");this.addAutoChild("portal");this.addMember(this.modeForm);if(this.tabset)this.addMember(this.tabset);if(this.portal)this.addMember(this.portal)}
,isc.A.getEntityTree=function isc_EntityEditor_getEntityTree(){if(!isc.isA.DataSource(this.dataSource))
return{baseDS:"NoDSProvided",relations:[]};var _1={baseDS:this.dataSource.ID,baseFieldName:this.dataSource.getPrimaryKeyFieldNames()[0],relations:[]
};_1.relations=this.getDataSourceHierarchy(this.dataSource);return _1}
,isc.A.fetchDataByPK=function isc_EntityEditor_fetchDataByPK(_1){if(!this.dataSource)return;var _2=this;this.dataSource.fetchData(_1,function(_3,_4){_2.fetchDataReply(_4)}
)}
,isc.A.fetchDataReply=function isc_EntityEditor_fetchDataReply(_1){this.clearEntity();this.record=_1[0];this.showEntity()}
,isc.A.clearEntity=function isc_EntityEditor_clearEntity(){if(this.entities&&this.entities.length>0){if(this.showTabset){for(var i=this.tabset.tabs.length-1;i>=0;i--){this.entities[i].markForDestroy();this.tabset.removeTab(i)}
}else if(this.portal){this.portal.members.removeAll();for(var i=this.entities.length-1;i>=0;i--){this.entities[i].markForDestroy()}
}else{for(var i=this.members.length-1;i>=1;i--){this.removeMember(i);this.entities[i-1].markForDestroy()}
}
}
this.entities=[];this.record=null}
,isc.A.showEntity=function isc_EntityEditor_showEntity(){var _1=this.entityTree;if(!this.entities)this.entities=[];if(!this.entityTree)return;this.addEditor(_1);this.topLevelComponent=this.entities[0];if(_1&&_1.relations&&_1.relations.length>0){for(var i=0;i<_1.relations.length;i++){var _3=_1.relations[i];if(this.shouldShowEntity(_3.baseDS)){if(_3.relationArity=="one"){this.addEditor(_3)}else{this.addGrid(_3)}
}
}
}
}
,isc.A.updateTopLevel=function isc_EntityEditor_updateTopLevel(){for(var i=1;i<this.entities.length;i++){this.entities[i].setRecord(this.topLevelComponent.record)}
}
,isc.A.getData=function isc_EntityEditor_getData(){return[]}
,isc.A.getDataSourceSpec=function isc_EntityEditor_getDataSourceSpec(_1,_2){if(this.dataSources){var _3=this.dataSources[_1];if(!_3)_3=this.dataSources[_1+"!"+_2];return _3}
return null}
,isc.A.getRelatedEditorProperties=function isc_EntityEditor_getRelatedEditorProperties(_1,_2){var _3=this.getDataSourceSpec(_1,_2);if(_3)return _3.editorProperties;return null}
,isc.A.shouldShowEntity=function isc_EntityEditor_shouldShowEntity(_1){if(this.dataSources){var _2=this.dataSources[_1],_3;if(_2===_3)return true;return(_2!==null)}
return true}
,isc.A.addEditor=function isc_EntityEditor_addEditor(_1){var _2=this.createAutoChild("formEntity",{height:"100%",width:"100%",dataSource:_1.baseDS,title:this.getEntityTitle(_1),record:this.record,relation:_1,formProperties:this.getRelatedEditorProperties(_1.baseDS,_1.relatedFieldName)
});this.addEntityLink(_2);this.logWarn("adding linked single-record entity")}
,isc.A.addGrid=function isc_EntityEditor_addGrid(_1){var _2=this.createAutoChild("gridEntity",{height:"100%",width:"100%",dataSource:_1.baseDS,title:this.getEntityTitle(_1),record:this.record,relation:_1,gridProperties:this.getRelatedEditorProperties(_1.baseDS,_1.relatedFieldName)
});this.addEntityLink(_2);this.logWarn("added linked multiple-record entity")}
,isc.A.addEntityLink=function isc_EntityEditor_addEntityLink(_1){this.entities.add(_1);if(this.showTabset){this.addEntityTab(_1)}else{var _2=_1.relation,_3=this.getDataSourceSpec(_2.baseDS,_2.relatedFieldName),_4=(_3&&_3.rowNum!=null?_3.rowNum:-1),_5=(_3&&_3.offsetInRow!=null?_3.offsetInRow:-1)
;if(this.portal){if(_3&&_3.userHeight!=null){_1.updateUserSize(_3.userHeight,_1.$o5)}
if(_4!=-1){this.portal.getColumn(0).addPortletToExistingRow(_1,_4,_5)}else{this.portal.getColumn(0).addPortlet(_1)}
}
else this.addMember(_1)}
}
,isc.A.getEntityName=function isc_EntityEditor_getEntityName(_1){var _2=this.getDSName(_1.baseDS),_3=this.getDSName(_1.relatedDS),_4=_1.relatedFieldName||_1.baseFieldName
;return _2+"_"+_4}
,isc.A.getEntityTitle=function isc_EntityEditor_getEntityTitle(_1){var _2=this.getDataSourceSpec(_1.baseDS,_1.baseFieldName),_3=this.getDSName(_1.baseDS),_4=this.getDSName(_1.relatedDS),_5=_1.relatedFieldName||_1.baseFieldName,_6
;if(_2&&_2.entityTitle){_6=_2.entityTitle}else if(!_4){_6=isc.DS.getAutoTitle(_3)}else if(_3!=_4){_6=isc.DS.getAutoTitle(_3)}else{_6=isc.DS.getAutoTitle(_5)}
return _6}
,isc.A.addEntityTab=function isc_EntityEditor_addEntityTab(_1){var _2=this.getEntityName(_1.relation),_3=this.getEntityTitle(_1.relation);if(_1){_1.setWidth("100%");_1.setHeight("100%")}
this.tabset.addTab({name:_2,title:_3,pane:_1,relation:_1.relation
})}
,isc.A.setMode=function isc_EntityEditor_setMode(_1){var i,_3;if(_1=="Search"){if(this.entities&&this.entities.length>0){for(i=0;i<this.entities.length;i++){_3=this.entities[i];if(isc.isA.EntityEditorGrid(_3)){_3.enterSearchMode(this.getEntityCriteria(_3));_3.markForRedraw()}else if(isc.isA.EntityEditorForm(_3)){_3.enterSearchMode(this.getEntityCriteria(_3));_3.markForRedraw()}
}
}
}else{if(!this.entityCriteria)this.entityCriteria={};if(this.entities&&this.entities.length>0){for(i=0;i<this.entities.length;i++){_3=this.entities[i];var _4=_3.getCriteria();if(_4){this.entityCriteria[_3.getID()]={relation:_3.relation,criteria:_4
}
}
}
}
}
}
,isc.A.getEntityCriteria=function isc_EntityEditor_getEntityCriteria(_1){if(this.entityCriteria){return this.entityCriteria[_1.getID()]}
return null}
);isc.B._maxIndex=isc.C+19}
if(isc.ListGrid){isc.defineClass("PresetCriteriaItem","SelectItem");isc.PresetCriteriaItem.addClassMethods({})
isc.A=isc.PresetCriteriaItem.getPrototype();isc.A.canFocus=true;isc.A.customOptionTitle="Custom...";isc.A.shouldSaveValue=true;isc.A=isc.PresetCriteriaItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.init=function isc_PresetCriteriaItem_init(){if(!this.options)this.options={};this.valueMap={};for(var _1 in this.options){this.valueMap[_1]=_1}
if(this.showCustomOption){this.options["customOption"]=null;this.valueMap["customOption"]=this.customOptionTitle}
this.Super("init",arguments)}
,isc.A.pickValue=function isc_PresetCriteriaItem_pickValue(_1,_2){if(_1=="customOption"){if(!_2){if(this.getCustomCriteria&&isc.isA.Function(this.getCustomCriteria)){this.getCustomCriteria(this.getID()+".getCustomCriteriaReply(criteria,title)");return}
}
}
return this.Super("pickValue",arguments)}
,isc.A.getCustomCriteria=function isc_PresetCriteriaItem_getCustomCriteria(_1){}
,isc.A.getCustomCriteriaReply=function isc_PresetCriteriaItem_getCustomCriteriaReply(_1,_2){this.valueMap["customOption"]=_2||this.valueMap["customOption"];this.options["customOption"]=_1}
,isc.A.getCriteriaValue=function isc_PresetCriteriaItem_getCriteriaValue(){return this.getCriterion()}
,isc.A.hasAdvancedCriteria=function isc_PresetCriteriaItem_hasAdvancedCriteria(){return true}
,isc.A.getCriterion=function isc_PresetCriteriaItem_getCriterion(){var _1=this.getValue(),_2=this.options[_1]
;return _2}
,isc.A.updateCriteriaFieldNames=function isc_PresetCriteriaItem_updateCriteriaFieldNames(_1){for(var _2 in _1){var _3=_1[_2];if(isc.DataSource.isAdvancedCriteria(_3)){_3=this.updateCriteriaFieldNames(_3)}else{if(!_3.fieldName){_3.fieldName=this.getCriteriaFieldName()}
}
}
return _1}
,isc.A.setValue=function isc_PresetCriteriaItem_setValue(_1){_1=this.matchCriteria(_1);this.Super("setValue",arguments)}
,isc.A.setValueMap=function isc_PresetCriteriaItem_setValueMap(_1){return null}
,isc.A.canEditCriterion=function isc_PresetCriteriaItem_canEditCriterion(_1){var _2=isc.DS.isAdvancedCriteria(_1)?isc.DS.getCriteriaFields(_1).getUniqueItems():_1.criteria?_1.criteria.getProperty("fieldName").getUniqueItems():[_1.fieldName]
;var _3=this.getCriteriaFieldName();return _2.contains(_3)}
,isc.A.setCriterion=function isc_PresetCriteriaItem_setCriterion(_1){this.setValue(isc.shallowClone(_1))}
,isc.A.matchCriteria=function isc_PresetCriteriaItem_matchCriteria(_1,_2){var _3=_2||this.options;if(_1==null)return null;for(var _4 in _3){var _5=_3[_4];if(this.objectsAreEqual(_5,_1)){return _4}else{var _6=isc.DS.compressNestedCriteria(isc.shallowClone(_5))||{};if(_6.criteria&&_6.criteria.length==1){_6=_6.criteria[0]}
if(this.objectsAreEqual(_6,_1)){return _4}
}
}
return _1}
,isc.A.objectsAreEqual=function isc_PresetCriteriaItem_objectsAreEqual(_1,_2){if(!_1&&!_2)return true;if(!_1||!_2)return false;for(var _3 in _1){if(_3=="_constructor")continue;var _4=_1[_3],_5=_2[_3]
;if(isc.isAn.Array(_4)){for(var i=0;i<_4.length;i++){if(isc.isAn.Object(_4[i])){if(!this.objectsAreEqual(_4[i],_5[i]))return false}else{if(_4[i]!=_5[i])return false}
}
}else if(isc.isA.Date(_4)){if(isc.DateUtil.compareDates(_4,_5)!=0)return false}else if(isc.isAn.Object(_4)){if(!this.objectsAreEqual(_4,_5))return false}else{if(_1[_3]!=_2[_3])return false}
}
return true}
);isc.B._maxIndex=isc.C+14;isc.defineClass("PresetDateRangeItem","PresetCriteriaItem");isc.A=isc.PresetDateRangeItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.customOptionTitle="Custom Date Range";isc.A.hasInternalNavigation=true;isc.B.push(isc.A.getCustomCriteria=function isc_PresetDateRangeItem_getCustomCriteria(_1){this.$03=_1;isc.DateRangeDialog.askForRange(true,{returnCriterion:true,criteriaField:this.getCriteriaFieldName(),value:this.options["customOption"]
},null,this.getID()+".getCustomCriteriaReply(value)"
)}
,isc.A.getCustomCriteriaReply=function isc_PresetDateRangeItem_getCustomCriteriaReply(_1,_2){var _3=this.$03;delete this.$03;this.clearValue();this.Super("getCustomCriteriaReply",arguments);this.pickValue("customOption",true)}
,isc.A.getCriterion=function isc_PresetDateRangeItem_getCriterion(){var _1=this.getValue(),_2=this.options[_1]
;return _2}
);isc.B._maxIndex=isc.C+3}
if(isc.FlowLayout!=null){isc.defineClass("ImagePicker","VLayout");isc.A=isc.ImagePicker;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getSharedImagePicker=function isc_c_ImagePicker_getSharedImagePicker(_1,_2){_1=_1||{};if(!isc.isAn.ImagePicker(this.$2050)){this.$2050=isc.ImagePicker.create(_1)}else{if(_1.acceptSelection==null)delete this.$2050.acceptSelection;if(_1.cancelSelection==null)delete this.$2050.cancelSelection;this.$2050.setProperties(_1)}
if(!_2){var _3=this.$2050}
return this.$2050}
);isc.B._maxIndex=isc.C+1;isc.A=isc.ImagePicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.defaultWidth=400;isc.A.defaultHeight=400;isc.A.title="Image Picker";isc.A.thumbnailSize=null;isc.A.thumbnailWidth=null;isc.A.thumbnailHeight=null;isc.A.pickerLayoutDefaults={_constructor:"VLayout",autoDraw:false,width:"100%",height:"100%",layoutMargin:5,membersMargin:5
};isc.A.imageStackDefaults={_constructor:"SectionStack",autoDraw:false,width:"100%",height:"*",overflow:"auto",headerHeight:30,padding:0,visibilityMode:"multiple"
};isc.A.showActionIcons=true;isc.A.actionIconsTitle="Action Icons";isc.A.actionIconsLayoutDefaults={_constructor:"ImageLayout",autoDraw:false,iconGroup:"action"
};isc.A.showHeaderIcons=true;isc.A.headerIconsTitle="Header Icons";isc.A.headerIconBaseStyle="headerIcon";isc.A.headerIconsLayoutDefaults={_constructor:"ImageLayout",autoDraw:false,styleName:"windowHeader",iconGroup:"header"
};isc.A.showCustomImages=false;isc.A.customImagesLayoutDefaults={_constructor:"ImageLayout",autoDraw:false
};isc.A.customImagesTitle="Custom Images";isc.A.tipText="Upload images to DropBox or a similar service and enter the public URL below";isc.A.editFormDefaults={_constructor:"DynamicForm",autoDraw:false,width:"100%",padding:0,autoFocusOnError:false
};isc.A.buttonLayoutDefaults={_constructor:"HLayout",autoDraw:false,width:"100%",height:1,align:"right",membersMargin:10
};isc.A.okButtonTitle="Ok";isc.A.okButtonDefaults={_constructor:"IButton",autoDraw:false,click:function(){this.creator.$2054()
}
};isc.A.cancelButtonTitle="Cancel";isc.A.cancelButtonDefaults={_constructor:"IButton",autoDraw:false,click:function(){this.creator.$2062()}
};isc.A.clearOnCancel=true;isc.A.urlValidationTimeout=10000;isc.A.urlValidationPrompt="Validating image URL ${loadingImage}";isc.B.push(isc.A.setShowActionIcons=function isc_ImagePicker_setShowActionIcons(_1){this.showActionIcons=_1;if(this.showActionIcons){this.imageStack.showSection("action")}else{this.imageStack.hideSection("action")}
}
,isc.A.setShowHeaderIcons=function isc_ImagePicker_setShowHeaderIcons(_1){this.showHeaderIcons=_1;if(this.showHeaderIcons){this.imageStack.showSection("headerIcons")}else{this.imageStack.hideSection("headerIcons")}
}
,isc.A.initWidget=function isc_ImagePicker_initWidget(){this.Super("initWidget",arguments);if(this.thumbnailSize==null){if(isc.ImagePicker.getPrototype().thumbnailSize==null){var _1=isc.FormItem.getPrototype().iconWidth;isc.ImagePicker.addProperties({thumbnailSize:_1})}
this.thumbnailSize=isc.ImagePicker.getPrototype().thumbnailSize}
this.createCustomChildren()}
,isc.A.createCustomChildren=function isc_ImagePicker_createCustomChildren(){this.addAutoChild("pickerLayout");var _1=this.thumbnailWidth||this.thumbnailSize,_2=this.thumbnailHeight||this.thumbnailSize
;var _3=[];this.imageLayouts=[];if(this.showActionIcons){this.addAutoChild("actionIconsLayout",{tileWidth:_1,tileHeight:_2});this.imageLayouts.add(this.actionIconsLayout);_3.add({name:"action",title:this.actionIconsTitle,expanded:true,items:[this.actionIconsLayout]})}
if(this.showHeaderIcons){this.addAutoChild("headerIconsLayout",{tileWidth:_1,tileHeight:_2,iconBaseStyle:this.headerIconBaseStyle});this.imageLayouts.add(this.headerIconsLayout);_3.add({name:"headerIcons",title:this.headerIconsTitle,expanded:true,items:[this.headerIconsLayout]})}
if(this.showCustomImages){this.addAutoChild("customImagesLayout",{tileWidth:_1,tileHeight:_2});this.imageLayouts.add(this.customImagesLayout);_3.add({name:"customIcons",title:this.customImagesTitle,expanded:true,items:[this.customImagesLayout]})}
this.addAutoChild("imageStack",{sections:_3});var _4={};_4.items=[{name:"imageBlurb",editorType:"BlurbItem",width:"*",value:this.tipText,wrap:true,styleName:"labelAnchor"
},{name:"imageURL",title:"Image",width:"*",mapValueToDisplay:function(_9){if(!_9||_9=="")return"";if(this.selectedImage){var _5=this.selectedImage.imageRecord;if(_5){var _6=!_5.name?_5.src:"["+_5.name+"]";return _6}
}
return _9},getValue:function(){var _5=this.selectedImage&&this.selectedImage.imageRecord;if(_5){if(_5.name)return _5.name;var _7=isc.Media.getStockIconKeyForSrc(_5.src);if(_7)return _7;return _5.src}
return this.Super("getValue",arguments)},isStockImage:function(){return this.selectedImage&&this.selectedImage.imageRecord},clearValueIconDefaults:{text:"&#x2715;",width:12,inline:true,inlineIconAlign:"right",neverDisable:true,showFocused:false,showOver:false,prompt:"Clear the current value",showIf:"return false;",click:function(_9,_10,_11){_10.clearValue()}
},init:function(){this.icons=[isc.addProperties({},this.clearValueIconDefaults,this.clearValueIconProperties,{name:"clearValue"}
)];this.Super("init",arguments)},setValue:function(){var _6=this.Super("setValue",arguments);if(this.getValue()!=null)this.showIcon("clearValue");else this.hideIcon("clearValue");this.setCanEdit(!this.selectedImage||!this.selectedImage.imageRecord);return _6},clearValue:function(){this.hideIcon("clearValue");this.Super("clearValue",arguments);this.form.creator.clearSelectedImage();this.setCanEdit(true)},change:function(_9,_10){delete this.$222r},editorExit:function(_9,_10,_11){this.form.creator.validateURL()},itemHoverHTML:function(_9,_10){var _5=_9.selectedImage&&_9.selectedImage.imageRecord;if(!_5)return;var _8=isc.Canvas.imgHTML(_5.src)+"<br>"+_5.src;return _8}
}
];this.addAutoChild("editForm",_4);this.okButton=this.createAutoChild("okButton",{title:this.okButtonTitle});this.cancelButton=this.createAutoChild("cancelButton",{title:this.cancelButtonTitle});this.buttonLayout=this.createAutoChild("buttonLayout",{members:[this.cancelButton,this.okButton]
});this.pickerLayout.addMembers([this.imageStack,this.editForm,this.buttonLayout
])}
,isc.A.clearSelectedImage=function isc_ImagePicker_clearSelectedImage(){if(this.selectedImage){this.selectedImage.clearSelected();this.selectedImage=null}
this.selectedImageRecord=null;this.updateEditor()}
,isc.A.selectImage=function isc_ImagePicker_selectImage(_1){if(!this.isDrawn()){this.$207b=_1;if(_1&&_1.src){this.editForm.setValues({imageURL:_1.src})}
return}
this.clearSelectedImage();if(_1==null)return;var _2=_1;if(!isc.isAn.Img(_2)){var _3=isc.isA.String(_2)?_2:_2.src||_2.fromSrc;_2=this.findImage(_3)}
if(isc.isAn.Img(_2)){this.selectedImage=_2;this.selectedImageRecord=_2.imageRecord;_2.showSelected()}else{this.selectedImageRecord={src:_3}}
this.updateEditor()}
,isc.A.$2054=function isc_ImagePicker__pickerSelectionChanged(_1){var _2=this,_3=this.editForm.getItem("imageURL")
;if(this.isValidatingURL()||_3.isFocused()){this.$222s=true;this.showValidatingPrompt();if(!this.isValidatingURL()){this.validateURL()}
return}
if(_3.hasErrors()){isc.warn("An image couldn't be loaded from the provided URL. Save anyway?",function(_6){if(_6){_3.clearErrors();_2.$2054(true)}
},{buttons:[isc.Dialog.NO,isc.Dialog.YES],autoFocusButton:1
});return}
if(!_1){this.showValidatingPrompt();_2.$222s=true;this.validateURL();return}
this.editForm.clearErrors(true);var _4=this.selectedImage||{};var _5=_4&&_4.imageRecord;var _6=_3.getValue();if(!_5||_5.name!=_6&&_5.src!=_6){_3.selectedImage=null;this.selectedImage=null;this.selectedImageRecord={src:_6,custom:true}}else{this.selectedImageRecord=_4.imageRecord}
this.$2063(this.selectedImageRecord)}
,isc.A.$2063=function isc_ImagePicker__acceptSelection(_1){if(this.acceptSelection)this.acceptSelection(_1)}
,isc.A.$2062=function isc_ImagePicker__cancelSelection(){if(this.clearOnCancel)this.clearSelectedImage();if(this.cancelSelection)this.cancelSelection()}
,isc.A.findImage=function isc_ImagePicker_findImage(_1){var _2=null;for(var i=0;i<this.imageLayouts.length;i++){var _4=this.imageLayouts[i].findImage(_1);if(_4){_2=_4;break}
}
return _2}
,isc.A.updateEditor=function isc_ImagePicker_updateEditor(){var _1=this.editForm.getItem("imageURL");var _2=this.selectedImage;_1.selectedImage=_2;var _3=_2&&_2.imageRecord;_1.setValue(_3?_3.name||_3.src:null)}
,isc.A.validateURL=function isc_ImagePicker_validateURL(){if(this.$222t){this.$222u=true;return}
var _1=this;var _2=function(_6){var _3=(_6==null);delete _1.$222t;if(_1.$222s)isc.clearPrompt();if(!_3){_1.editForm.setFieldErrors("imageURL","An image could not be downloaded from the provided URL ("+_6+")",true);delete _1.$222s}else{_1.editForm.clearErrors(true);_1.editForm.getItem("imageURL").$222r=true;if(!_1.revalidate&&_1.$222s){delete _1.$222s;_1.$2054(true);return}
}
if(_1.$222u){delete _1.$222u;_1.validateURL()}
};var _4=this.editForm.getValue("imageURL");if(_4&&_4.contains("dropbox.com")&&_4.contains("dl=0")&&!_4.contains("raw=1")){_4=_4.replace("dl=0","raw=1");this.editForm.setValue("imageURL",_4)}
if(this.urlNeedsValidating()){this.$222t=true;var _5=isc.Page.getURL(this.editForm.getValue("imageURL"));isc.RPC.sendRequest({actionURL:_5,httpMethod:"GET",timeout:this.urlValidationTimeout,useSimpleHttp:true,useHttpProxy:true,willHandleError:true,callback:function(_8,_9,_10){var _6;if(_8.status==isc.RPCResponse.STATUS_TRANSPORT_ERROR){if(_8.httpResponseCode!=null){_6="HTTP error: "+_8.httpResponseCode}else{_6="transport data"}
}else if(_8.status==isc.RPCResponse.STATUS_UNKNOWN_HOST_ERROR){_6="unknown host"}else if(_8.status==isc.RPCResponse.STATUS_CONNECTION_RESET_ERROR){_6="connection reset"}else if(_8.status==isc.RPCResponse.STATUS_SERVER_TIMEOUT){_6="request timeout"}else{var _7=_8&&_8.httpHeaders&&_8.httpHeaders["content-type"];if(!_7||!_7.startsWith("image/")){_6="image data not returned"}
}
_2(_6)}
})}else{_2()}
}
,isc.A.isValidatingURL=function isc_ImagePicker_isValidatingURL(){return this.$222t}
,isc.A.urlNeedsValidating=function isc_ImagePicker_urlNeedsValidating(){var _1=this.editForm.getValue("imageURL");if(!_1||_1.startsWith("data:"))return false;var _2=this.editForm.getItem("imageURL");var _3=_2.isStockImage();if(_3)return false;var _4=_2.$222r;if(_4)return false;var _5=this.editForm.getOldValues(),_6=_5.imageURL,_7=(!_6||(_6&&_1&&_1.length>0&&_6!=_1))
;return _7}
,isc.A.showValidatingPrompt=function isc_ImagePicker_showValidatingPrompt(){isc.showPrompt(this.urlValidationPrompt)}
);isc.B._maxIndex=isc.C+15;isc.defineClass("ImageLayout","FlowLayout");isc.A=isc.ImageLayout.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.width="100%";isc.A.height="100%";isc.A.overflow="auto";isc.A.tileMargin=5;isc.A.animateTileChange=false;isc.A.autoDraw=false;isc.A.iconBaseStyle="icon";isc.A.iconOverBorder="1px solid grey";isc.A.imageTileDefaults={_constructor:"Img",autoDraw:false,baseStyle:"icon",imageType:"center",border:"1px solid transparent",normalBorder:"1px solid transparent",selectedBorder:"1px solid green",showSelected:false,click:function(){this.layout.selectImage(this)},mouseOver:function(){this.setBorder(this.overBorder)},mouseOut:function(){this.setBorder(this._selected?this.selectedBorder:this.normalBorder)},showSelected:function(){this._selected=true;this.setBorder(this.selectedBorder)},clearSelected:function(){this._selected=false;this.setBorder(this.normalBorder)}
};isc.B.push(isc.A.initWidget=function isc_ImageLayout_initWidget(){this.Super("initWidget",arguments);this.images=[];if(this.iconGroup!=null){this.dataSource=isc.Media.getStockIconDS(this.iconGroup);this.$206o=true}
}
,isc.A.show=function isc_ImageLayout_show(){this.Super("show",arguments);if(this.$206o){this.$206o=false;this.delayCall("loadImages")}
}
,isc.A.getImageRecords=function isc_ImageLayout_getImageRecords(){return this.dataSource?this.dataSource.cacheData.duplicate():[]}
,isc.A.loadImages=function isc_ImageLayout_loadImages(){if(!this.dataSource){isc.logWarn("No datasource for widget with ID "+this.getID());return}
this.tiles=[];var _1=this.getImageRecords();for(var i=0;i<_1.length;i++){var _3=_1[i];if(_3.width==null)_3.width=this.tileWidth||this.tileSize;if(_3.height==null)_3.height=this.tileHeight||this.tileSize;this.addImageTile(_3)}
this.tiles=this.images;var _4=this.creator.$207b;if(_4){var _5=isc.isAn.Object(_4)?_4.src:_4;var _6=this.findImage(_5);if(_6){this.selectImage(_6);delete this.creator.$207b}
}
this.delayCall("layoutTiles")}
,isc.A.findImage=function isc_ImageLayout_findImage(_1){if(!this.images)return null;return this.images.find("src",_1)}
,isc.A.addImageTile=function isc_ImageLayout_addImageTile(_1){this.images.add(this.createAutoChild("imageTile",{imageRecord:_1,src:_1.src,prompt:_1.name,width:_1.width,height:_1.height,imageWidth:_1.width,imageHeight:_1.height,layout:this,baseStyle:this.iconBaseStyle,overBorder:this.iconOverBorder
}))}
,isc.A.clearSelectedImage=function isc_ImageLayout_clearSelectedImage(){if(this.selectedImage)this.selectedImage.clearSelected();this.selectedImage=null;this.selectedImageRecord=null}
,isc.A.selectImage=function isc_ImageLayout_selectImage(_1){this.clearSelectedImage();if(!_1)return false;this.selectedImage=_1;this.selectedImageRecord=_1.imageRecord;this.selectedImage.showSelected();if(this.creator.selectImage)this.creator.selectImage(this.selectedImage)}
);isc.B._maxIndex=isc.C+8}
isc.defineClass("ImageChooserItem","TextItem");isc.A=isc.ImageChooserItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.changeOnKeypress=false;isc.A.textColor="#999999";isc.A.disableIconsOnReadOnly=false;isc.A.updatePickerIconOnOver=false;isc.A.formatOnBlur=true;isc.A.formatOnFocusChange=true;isc.A.pickerWindowDefaults={_constructor:"Window",canDragResize:true,canDragMove:true,autoSize:true,isModal:true,showMinimizeButton:false,modalMaskOpacity:0
};isc.A.pickerTitle="Image Picker";isc.A.pickerConstructor="ImagePicker";isc.A.pickerDefaults={autoDraw:false,acceptSelection:function(_1){this.callingFormItem.$205z(_1)
},cancelSelection:function(){this.callingFormItem.$183d()}
};isc.A.showPickerIcon=true;isc.A.pickerIconHSpace=2;isc.A.pickerIconPrompt="Click to select an image";isc.A.pickerIconDefaults={showOver:false,showFocused:false
};isc.A.clearValueIconDefaults={text:"&#x2715;",width:12,inline:true,inlineIconAlign:"right",neverDisable:true,showFocused:false,showOver:false,prompt:"Clear the current value",showIf:"return false;",click:function(_1,_2,_3){_2.clearValue()}
};isc.A.showActionIcons=true;isc.A.showHeaderIcons=true;isc.A.useSharedPicker=false;isc.B.push(isc.A.$1397=function isc_ImageChooserItem__elementIsReadOnly(){return true}
,isc.A.init=function isc_ImageChooserItem_init(){this.icons=[isc.addProperties({},this.clearValueIconDefaults,this.clearValueIconProperties,{name:"clearValue"}
)];this.Super("init",arguments)}
,isc.A.mapValueToDisplay=function isc_ImageChooserItem_mapValueToDisplay(_1){if(!_1||_1=="")return"";var _2=this.getImageProperties();if(_2){var _3=!_2.name?_2.src:"["+_2.name+"]";return _3}
return _1}
,isc.A.showPicker=function isc_ImageChooserItem_showPicker(){var _1=isc.addProperties({},this.pickerDefaults,this.pickerProperties);if(this.useSharedPicker){this.picker=isc.ImagePicker.getSharedImagePicker(_1)}else if(!this.picker){this.picker=isc.ImagePicker.create(_1)}
if(!this.pickerWindow){this.pickerWindow=this.createAutoChild("pickerWindow",{title:this.pickerTitle,items:[this.picker]}
)}
var _2=this.picker;var _3=_2.callingFormItem;if(_3!=this){_2.callingFormItem=this;_2.callingForm=this.form}
var _4=this.getImageProperties();_2.selectImage(_4);this.pickerWindow.moveTo(0,-1000);this.pickerWindow.show();this.pickerWindow.placeNear(isc.EH.getX(),isc.EH.getY())}
,isc.A.$183d=function isc_ImageChooserItem__pickerCancelled(){this.pickerWindow.hide();if(this.pickerCancelled){this.pickerCancelled()}
}
,isc.A.$205z=function isc_ImageChooserItem__pickerImageSelected(_1){this.pickerWindow.hide();this.setImageRecord(_1);if(this.pickerImageSelected){this.pickerImageSelected(this.imageRecord)}
}
,isc.A.setImageRecord=function isc_ImageChooserItem_setImageRecord(_1){var _2=this.imageRecord=_1;this.setValue(_2&&(_2.name||_2.parsedURL||_2.src))}
,isc.A.itemHoverHTML=function isc_ImageChooserItem_itemHoverHTML(_1,_2){if(!_1.imageRecord)return;var _3=_1.imageRecord;var _4=isc.Canvas.imgHTML(_3.src)+"<br>"+_3.src;return _4}
,isc.A.setValue=function isc_ImageChooserItem_setValue(_1,_2,_3,_4){if(_1!=null&&_1!=""){if(!this.$207a(_1)){_1=this._value}
}
this.storeValue(_1,true);return _1}
,isc.A.saveValue=function isc_ImageChooserItem_saveValue(){this.Super("saveValue",arguments);if(this.getValue()!=null)this.showIcon("clearValue");else this.hideIcon("clearValue")}
,isc.A.clearValue=function isc_ImageChooserItem_clearValue(){this.imageRecord=null;this.Super("clearValue",arguments)}
,isc.A.getImageProperties=function isc_ImageChooserItem_getImageProperties(){var _1=this.getValue();if(_1==null||_1.length==0)return null;var _2=this.imageRecord||{};if(_1!=_2.src){_2=isc.Media.getStockIcon(_1,"src");if(!_2)_2=isc.Media.getStockIcon(_1,"parsedURL");if(!_2){_2={src:_1}}
this.imageRecord=_2}
return this.imageRecord}
,isc.A.$207a=function isc_ImageChooserItem__isValidURL(_1){var _2=isc.Media.getStockIconKeyForSrc(_1,null,this);if(_2)return true;var _3=isc.Page.getURL(_1);var _4=/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[\-;:&=\+\$,\w]+@)?[A-Za-z0-9\.\-]+|(?:www\.|[\-;:&=\+\$,\w]+@)[A-Za-z0-9\.\-]+)((?:\/[\+~%\/\.\w\-_]*)?\??(?:[\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?)/;return _4.test(_3)}
);isc.B._maxIndex=isc.C+13;isc.ClassFactory.defineClass("StatefulImageChooser","Window");isc.A=isc.StatefulImageChooser.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.title="Image Picker";isc.A.autoSize=true;isc.A.isModal=true;isc.A.instructionText="Select an Image for each state you would like to represent";isc.A.instructionLabelConstructor=isc.Label;isc.A.instructionLabelDefaults={align:"center",height:1,overflow:"visible",padding:5
};isc.A.imageChooserFormConstructor=isc.DynamicForm;isc.A.imageChooserFormDefaults={width:300
};isc.A.imageChooserItemDefaults={editorType:"ImageChooserItem"
};isc.A.toolbarConstructor=isc.HLayout;isc.A.toolbarDefaults={height:1,width:"100%",membersMargin:5,layoutMargin:5,align:"right"
};isc.A.clearButtonTitle="Clear All";isc.A.clearButtonDefaults={_constructor:"IButton",autoDraw:false,click:function(){this.creator.clearClick()
}
};isc.A.okButtonTitle="OK";isc.A.okButtonDefaults={_constructor:"IButton",autoDraw:false,click:function(){this.creator.okClick()
}
};isc.A.autoDismiss=true;isc.A.cancelButtonTitle="Cancel";isc.A.cancelButtonDefaults={_constructor:"IButton",autoDraw:false,click:function(){this.creator.cancelClick()
}
};isc.B.push(isc.A.initWidget=function isc_StatefulImageChooser_initWidget(){this.instructionLabel=this.createAutoChild("instructionLabel",{contents:this.instructionText
});this.imageChooserForm=this.createAutoChild("imageChooserForm",{items:this.getItemsForStates()
});this.clearButton=this.createAutoChild("clearButton",{title:this.clearButtonTitle});this.okButton=this.createAutoChild("okButton",{title:this.okButtonTitle});this.cancelButton=this.createAutoChild("cancelButton",{title:this.cancelButtonTitle});this.toolbar=this.createAutoChild("toolbar",{members:[this.clearButton,isc.LayoutSpacer.create({width:"*"}),this.cancelButton,this.okButton
]
});this.items=[this.instructionLabel,this.imageChooserForm,this.toolbar];if(this.bodyProperties==null){this.bodyProperties={}}
this.bodyProperties.minBreadthMember=this.imageChooserForm;return this.Super("initWidget",arguments)}
,isc.A.getItemsForStates=function isc_StatefulImageChooser_getItemsForStates(){var _1=[];if(this.states==null)return _1;for(var _2 in this.states){_1.add(isc.addProperties({name:_2,title:this.states[_2],pickerTitle:"Image Picker - "+this.states[_2]+" state"
},this.imageChooserItemDefaults,this.imageChooserItemProperties))}
return _1}
,isc.A.clearClick=function isc_StatefulImageChooser_clearClick(){this.imageChooserForm.clearValues()}
,isc.A.okClick=function isc_StatefulImageChooser_okClick(){if(this.autoDismiss)this.clear();this.dataAccepted()}
,isc.A.cancelClick=function isc_StatefulImageChooser_cancelClick(){this.clear()}
,isc.A.setStates=function isc_StatefulImageChooser_setStates(_1){if(isc.objectsAreEqual(_1,this.states))return;this.states=_1;this.imageChooserForm.setItems(this.getItemsForStates())}
,isc.A.getData=function isc_StatefulImageChooser_getData(){return this.imageChooserForm.getValues()}
,isc.A.setData=function isc_StatefulImageChooser_setData(_1){this.imageChooserForm.setValues(_1)}
,isc.A.getImageRecords=function isc_StatefulImageChooser_getImageRecords(){var _1={},_2=this.imageChooserForm.getItems();for(var i=0;i<_2.length;i++){var _4=_2[i],_5=_4.getImageProperties();if(_5!=null){_1[_4.name]=_5}
}
return _1}
,isc.A.setImageRecords=function isc_StatefulImageChooser_setImageRecords(_1){this.imageChooserForm.clearValues();for(var _2 in _1){var _3=this.imageChooserForm.getItem(_2);if(_3==null){this.logWarn("setImageRecrods passed image value for state:"+_2+". This state is not included in the specified 'states' for this component and cannot be displayed")}else{_3.setImageRecord(_1[_2])}
}
}
,isc.A.dataAccepted=function isc_StatefulImageChooser_dataAccepted(){}
);isc.B._maxIndex=isc.C+11;isc.ClassFactory.defineClass("StatefulImageChooserItem","TextItem");isc.A=isc.StatefulImageChooserItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.textColor="#999999";isc.A.showPickerIcon=true;isc.A.pickerIconHSpace=2;isc.A.pickerIconSize=20;isc.A.pickerIconPrompt="Click to select images";isc.A.clearValueIconDefaults={text:"&#x2715;",width:12,inline:true,inlineIconAlign:"right",neverDisable:true,showFocused:false,showOver:false,prompt:"Clear the current value",showIf:"return false",click:function(_1,_2,_3){_2.imageRecords=null;_2.storeValue(null,true)}
};isc.A.pickerTitle="Image Picker";isc.A.pickerConstructor=isc.StatefulImageChooser;isc.A.pickerDefaults={dataAccepted:function(){this.creator.chooserDataAccepted(this.getImageRecords(),true)}
};isc.A.defaultStates={_base:"Normal",Focused:"Focused",Selected:"Selected",Over:"Over",Down:"Down",Disabled:"Disabled"
};isc.A.defaultCombinedStates={_base:"Normal",Focused:"Focused",Selected:"Selected",Over:"Over",Down:"Down",FocusedOver:"Focused+Over",SelectedOver:"Selected+Over",FocusedSelected:"Focused+Selected",FocusedSelectedOver:"Focused+Selected+Over",FocusedSelectedDown:"Focused+Selected+Down",Disabled:"Disabled",SelectedDisabled:"Selected+Disabled"
};isc.A.showCombinedStates=true;isc.B.push(isc.A.$1397=function isc_StatefulImageChooserItem__elementIsReadOnly(){return true}
,isc.A.init=function isc_StatefulImageChooserItem_init(){if(this.icons==null)this.icons=[];this.icons.addAt(isc.addProperties({},this.clearValueIconDefaults,this.clearValueIconProperties,{name:"clearValue"}
),0);return this.Super("init",arguments)}
,isc.A.saveValue=function isc_StatefulImageChooserItem_saveValue(){this.Super("saveValue",arguments);if(this.getValue()!=null)this.showIcon("clearValue");else this.hideIcon("clearValue")}
,isc.A.showPicker=function isc_StatefulImageChooserItem_showPicker(){if(this.picker==null){this.picker=this.createAutoChild("picker",{title:this.pickerTitle,states:this.getStates()
}
)}else{this.picker.setStates(this.getStates())}
this.picker.setImageRecords(this.getImageRecords());this.picker.placeNear(isc.EH.getX(),isc.EH.getY());this.picker.show()}
,isc.A.chooserDataAccepted=function isc_StatefulImageChooserItem_chooserDataAccepted(_1){this.imageRecords=_1;var _2;if(_1!=null){_2={};for(var _3 in _1){_2[_3]=_1[_3].parsedURL||_1[_3].src}
}
this.storeValue(_2,true)}
,isc.A.click=function isc_StatefulImageChooserItem_click(_1,_2){this.showPicker()}
,isc.A.itemHoverHTML=function isc_StatefulImageChooserItem_itemHoverHTML(_1,_2){var _3=this.getImageRecords();if(!_3||isc.isAn.emptyObject(_3))return;var _4="<table border=0><tr><td><b>State</b></td><td><b>Image</b></td></tr>";for(var _5 in _3){var _6=_3[_5];_4+="<tr><td>"+_5+"</td><td>"
+isc.Canvas.imgHTML(_6.src)+"<br>"+_6.src}
return _4}
,isc.A.getImageRecords=function isc_StatefulImageChooserItem_getImageRecords(){return this.imageRecords
}
,isc.A.setValue=function isc_StatefulImageChooserItem_setValue(_1,_2,_3,_4){if(_1==null){this.imageRecords=null}else if(isc.isAn.Object(_1)){this.imageRecords={};for(var _5 in _1){var _6=isc.Img.resolveStatefulImgConfigEntry(_5,_1),_7=isc.Canvas.getImgURL(_6);var _8=isc.Media.getStockIcon(_7,"src")||isc.Media.getStockIcon(_7,"parsedURL")||{src:_7};this.imageRecords[_5]=_8}
}
return this.Super("setValue",arguments)}
,isc.A.mapValueToDisplay=function isc_StatefulImageChooserItem_mapValueToDisplay(_1){if(this.imageRecords==null)return this.Super("mapValueToDisplay",arguments);var _2=[];for(var _3 in this.imageRecords){var _4=this.imageRecords[_3];_2.add(_4.name?"["+_4.name+"]":_4.src)}
return _2.join(", ")}
,isc.A.getStates=function isc_StatefulImageChooserItem_getStates(){if(this.states!=null)return this.states;if(this.showCombinedStates){return isc.addProperties({},this.defaultCombinedStates)}else{return isc.addProperties({},this.defaultStates)}
}
);isc.B._maxIndex=isc.C+11;isc.defineClass("MenuChooserItem","SelectItem");isc.A=isc.MenuChooserItem.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.valueField="id";isc.A.displayField="name";isc.A.sortField="id";isc.B.push(isc.A.init=function isc_MenuChooserItem_init(){this.$227z=this.initValueMap();this.Super("init",arguments)}
,isc.A.destroy=function isc_MenuChooserItem_destroy(){if(this.$2270)this.$2270.destroy();this.Super("destroy",arguments)}
,isc.A.getOptionDataSource=function isc_MenuChooserItem_getOptionDataSource(){if(!this.$2270){this.$2270=isc.DS.create({clientOnly:true,fields:[{name:"id",primaryKey:true},{name:"name"}
],cacheData:this.$227z
})}
return this.$2270}
,isc.A.getComponent=function isc_MenuChooserItem_getComponent(){return this.creator.currentComponent}
,isc.A.getEditContext=function isc_MenuChooserItem_getEditContext(){var _1=this.creator,_2=_1.currentComponent,_3=_2.liveObject,_4=_3.editContext
;return _4}
,isc.A.initMenuInstances=function isc_MenuChooserItem_initMenuInstances(){var _1=this.creator,_2=_1.builder,_3=_2.getEditNodesByType("Menu")
;this.liveMenus=(_3?_3.getProperty("liveObject"):null)||[]}
,isc.A.initValueMap=function isc_MenuChooserItem_initValueMap(){this.initMenuInstances();var _1=[];for(var i=0;i<this.liveMenus.length;i++){var _3=this.liveMenus[i];_1.add({id:_3.ID,name:_3.ID})}
return _1}
);isc.B._maxIndex=isc.C+7;isc._nonDebugModules=(isc._nonDebugModules!=null?isc._nonDebugModules:[]);isc._nonDebugModules.push('Forms');isc.checkForDebugAndNonDebugModules();isc._moduleEnd=isc._Forms_end=(isc.timestamp?isc.timestamp():new Date().getTime());if(isc.Log&&isc.Log.logIsInfoEnabled('loadTime'))isc.Log.logInfo('Forms module init time: '+(isc._moduleEnd-isc._moduleStart)+'ms','loadTime');delete isc.definingFramework;if(isc.Page)isc.Page.handleEvent(null,"moduleLoaded",{moduleName:'Forms',loadTime:(isc._moduleEnd-isc._moduleStart)});}else{if(window.isc&&isc.Log&&isc.Log.logWarn)isc.Log.logWarn("Duplicate load of module 'Forms'.");}
